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.
 
 
 

1 lines
4.8 MiB

{"version":3,"sources":["fineui.ie.js","webpack:///webpack/bootstrap","webpack:///typescript/bundle.ts","webpack:///typescript/index.ts","webpack:///typescript/core/decorator/decorator.ts"],"names":["_classCallCheck","instance","Constructor","TypeError","e","o","t","r","exports","n","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","prototype","hasOwnProperty","p","s","Math","globalThis","window","self","Function","this","u","f","v","h","y","target","global","stat","a","noTargetGet","forced","undefined","sham","String","enforce","split","unsafe","source","join","toString","slice","g","x","WeakMap","has","set","getterFor","type","arguments","length","style","display","appendChild","src","contentWindow","document","open","write","close","F","stopped","result","next","done","stop","configurable","writable","push","version","mode","copyright","apply","promise","resolve","reject","getOwnPropertyDescriptor","random","min","ceil","floor","isNaN","getPrototypeOf","constructor","error","propertyIsEnumerable","1","valueOf","createElement","concat","getOwnPropertyNames","getOwnPropertySymbols","normalize","replace","toLowerCase","data","NATIVE","POLYFILL","keys","b","O","S","j","w","E","P","IteratorPrototype","A","BUGGY_SAFARI_ITERATORS","T","k","I","M","entries","name","values","proto","setPrototypeOf","Array","__proto__","indexOf","includes","isArray","forEach","map","filter","some","every","find","findIndex","callee","charAt","string","index","charCodeAt","codeAt","Promise","return","from","location","setImmediate","clearImmediate","process","MessageChannel","Dispatch","postMessage","protocol","host","nextTick","now","test","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","clear","allSettled","then","status","reason","RegExp","exec","lastIndex","isExtensible","objectID","weakData","REQUIRED","fastKey","getWeakData","onFreeze","iterator","max","defineProperties","assign","L","_","R","C","D","N","z","G","V","$","U","W","H","JSON","q","stringify","B","K","Q","Y","J","X","Z","tt","nt","et","QObject","rt","findChild","ot","it","tag","description","ut","ct","ft","pt","at","st","lt","wrap","for","keyFor","useSetter","useSimple","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","kind","Arguments","fetch","versions","v8","createEvent","dispatchEvent","PromiseRejectionEvent","all","notified","reactions","state","ok","fail","domain","rejection","enter","exit","initEvent","emit","parent","catch","race","MutationObserver","WebKitMutationObserver","fn","createTextNode","observe","characterData","console","real","finally","Error","errors","message","AggregateError","try","any","unicode","groups","ignoreCase","multiline","dotAll","sticky","Map","getConstructor","setStrong","preventExtensions","first","last","size","key","previous","removed","delete","add","_global","BI","prepares","searchElement","fromIndex","len","abs","lastIndexOf","Number","log","warn","debug","info","time","dir","profile","exception","trace","assert","localStorage","items","setItem","Cache","addCookie","getItem","getCookie","removeItem","deleteCookie","falsy","skipArray","__ob__","$accessors","$vbthis","$vbsetter","arg","Date","Set","match","ua","navigator","userAgent","reg","_sort","sort","tmp","func","thisArg","args","arrayAggregator","array","setter","iteratee","accumulator","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","arrayPush","offset","arrayReduce","initAccum","arraySome","asciiToArray","baseFindKey","collection","eachFunc","baseFindIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","basePropertyOf","baseReduce","baseSortBy","comparer","baseTimes","baseUnary","baseValues","props","cacheHas","cache","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","iteratorToArray","mapToArray","overArg","transform","replaceHolders","PLACEHOLDER","safeGet","setToArray","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lodash","isObjectLike","LazyWrapper","LodashWrapper","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","pop","splice","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","hash","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","SetCache","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","copyObject","baseAssignIn","keysIn","baseAt","paths","skip","baseClamp","number","lower","upper","baseClone","bitmask","customizer","stack","isDeep","CLONE_DEEP_FLAG","isFlat","CLONE_FLAT_FLAG","isFull","CLONE_SYMBOLS_FLAG","isObject","initCloneArray","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","FUNC_ERROR_TEXT","baseDifference","isCommon","valuesLength","valuesIndex","baseEvery","baseExtremum","current","isSymbol","baseFilter","baseFlatten","depth","isStrict","isFlattenable","baseForOwn","baseFor","baseForOwnRight","baseForRight","baseFunctions","isFunction","baseGet","path","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","undefinedTag","nullTag","symToStringTag","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","baseIsArguments","baseIsDate","dateTag","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","arrayTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","COMPARE_PARTIAL_FLAG","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","mapTag","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_UNORDERED_FLAG","baseIsNative","isMasked","pattern","reIsNative","reIsHostCtor","toSource","baseIsRegExp","regexpTag","baseIsSet","setTag","baseIsTypedArray","isLength","typedArrayTags","baseIteratee","identity","baseMatchesProperty","baseMatches","property","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","newValue","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","isPlainObject","toPlainObject","baseOrderBy","orders","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","baseRandom","nativeFloor","nativeRandom","baseRange","step","nativeMax","nativeCeil","baseRest","setToString","overRest","nested","baseSlice","baseSome","baseToString","symbolToString","INFINITY","baseUniq","createSet","seenIndex","baseUnset","actions","action","baseZipObject","assignFunc","valsLength","castArrayLikeObject","stringToPath","castSlice","buffer","allocUnsafe","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","cloneSymbol","symbol","symbolValueOf","typedArray","compareAscending","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","objCriteria","othCriteria","ordersLength","order","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBaseEach","iterable","createBaseFor","createBind","wrapper","root","Ctor","isBind","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","partialsRight","holdersRight","argPos","ary","holdersCount","newHolders","isBindKey","reorder","isFlip","reverse","isAry","WRAP_ARY_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_FLIP_FLAG","createInverter","toIteratee","createPartial","createRange","toFinite","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_CURRY_BOUND_FLAG","newData","isLaziable","setData","setWrapToString","createWrap","toInteger","getData","mergeData","baseSetData","customDefaultsMerge","customOmitClone","isPartial","arrValue","othValue","compared","dataViewTag","arrayBufferTag","boolTag","numberTag","errorTag","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","objectProto","memoizeCapped","memoize","MAX_MEMOIZE_SIZE","srcBitmask","newBitmask","isCombo","WRAP_REARG_FLAG","otherArgs","indexes","oldArray","reference","updateWrapDetails","shortOut","count","lastCalled","stamp","nativeNow","remaining","HOT_SPAN","HOT_COUNT","funcToString","wrapFlags","pair","compact","drop","findLastIndex","flattenDeep","head","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","wrapperReverse","wrapped","wrapperValue","reduce","negate","isString","after","before","debounce","options","invokeFunc","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","rePropName","reRegExpChar","reEscapeChar","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","htmlEscapes","&","<",">","\"","'","parseFloat","parseInt","freeGlobal","freeSelf","freeExports","nodeType","freeModule","module","moduleExports","freeProcess","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","objectCreate","isConcatSpreadable","nativeGetSymbols","nativeIsBuffer","DataView","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","ctorString","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","groupBy","sortBy","defer","delay","assignIn","defaults","propsIndex","propsLength","defaultsDeep","mergeWith","invert","invertBy","merge","omit","pick","range","extend","each","isFilter","getIteratee","takeName","dropName","findLast","invokeMap","dropRight","takeRightWhile","takeWhile","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","names","define","amd","traverse","context","obj","_apply","_applyFunc","is","deepContains","UUID","str","isWidget","widget","Widget","View","createWidgets","item","createWidget","deepClone","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","formatEL","stripEL","trans2Element","widgets","wi","element","to","inverse","firstKey","res","lastKey","firstObject","lastObject","obj1","obj2","idx","backEach","backAny","backEvery","backFindKey","backFind","remove","contains","removeAt","string2Array","array2String","abc2Int","toUpperCase","int2Abc","num","DIGITS","makeObject","makeArrayByArray","isSorted","inherit","sb","sp","overrides","spp","superclass","init","initialized","freeze","isCapitalEqual","isWidthOrHeight","isNotNull","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTickHandler","pending","copies","callbacks","timerFunc","counter","observer","textNode","queueNextTick","cb","_resolve","getTime","performance","webkitNow","getDate","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","text","CRYPT_TYPE","AES","aesEncrypt","decrypt","aesDecrypt","leftPad","val","ch","format","isLeapYear","year","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","_MD","parseDateTime","fmt","today","yearlength","otherlength","substring","hr","sec","_MN","substr","getFullYear","getMonth","getHours","getMinutes","getSeconds","search","dt","timeZone","localTime","localOffset","getTimezoneOffset","utc","OB","config","_constructor","destroyed","_initProps","_init","_initRef","_defaultConfig","_initListeners","listeners","lis","eventName","ref","_purgeRef","_getEvents","events","on","fns","proxy","un","newFns","ifn","purgeListeners","fireEvent","destroy","tagName","attributes","disabled","invisible","invalid","baseCls","extraCls","cls","css","beforeInit","beforeCreate","created","render","beforeMount","mounted","shouldUpdate","update","beforeDestroy","_initRoot","_initElementWidth","_initElementHeight","_initVisual","_initState","_initRender","__asking","_render","__async","_initElement","_initEffects","widgetName","_isRoot","_parent","addWidget","_renderEngine","_isWidget","_baseCls","addClass","attr","_children","width","height","setEnable","setValid","_isMounted","els","_mount","_setParent","force","deep","lifeHook","isVisible","_mountChildren","isEnabled","_setEnable","isValid","_setValid","Events","MOUNT","isMounted","setWidth","setHeight","enable","child","_manualSetEnable","valid","_manualSetValid","_setVisible","visible","removeClass","setVisible","VIEW","doBehavior","getWidth","getHeight","getName","DESTROY","getWidgetByName","removeWidget","nameOrWidget","hasWidget","getText","setText","setValue","disable","__d","_unMount","UNMOUNT","isolate","DOM","hang","empty","_destroy","registerRenderEngine","engine","createFragment","createDocumentFragment","mount","container","hydrate","ws","patchProps","children","triggerLifeHook","append","kv","shortcut","component","xtype","getWidget","getObject","CryptoJS","C_lib","lib","Base","subtype","mixIn","$super","propertyName","WordArray","words","sigBytes","encoder","Hex","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","C_enc","enc","hexChars","bite","parse","hexStr","hexStrLength","Latin1","latin1Chars","fromCharCode","latin1Str","latin1StrLength","Utf8","decodeURIComponent","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","Hasher","cfg","_doReset","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","C_algo","HMAC","algo","Base64","_map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","FF","GG","HH","II","sin","MD5","_hash","offset_i","M_offset_i","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","HmacMD5","EvpKDF","keySize","iterations","compute","password","salt","derivedKey","derivedKeyWords","block","Cipher","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","_key","dataUpdate","finalProcessedData","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","ciphertext","StreamCipher","finalProcessedBlocks","C_mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","processBlock","encryptBlock","thisBlock","decryptBlock","C_pad","pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","BlockCipher","modeCreator","_mode","CipherParams","cipherParams","formatter","C_format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","derivedParams","ECB","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x2","x4","x8","RCON","keyWords","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","_doCryptBlock","s0","s1","s2","s3","round","t0","t1","t2","t3","base64Cipher","decipher","aspect","advice","exist","dispatcher","beforeArr","rs","method","afterArr","ii","aspectArr","_index","_keyStr","_utf8_encode","utftext","_utf8_decode","c3","c2","encode","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","decode","_prefix","setUsername","username","getUsername","_getKeyPrefix","_generateKey","expiresHours","cookieString","date","setTime","toUTCString","cookie","CellSizeAndPositionManager","cellCount","cellSizeGetter","estimatedCellSize","_cellSizeGetter","_cellCount","_estimatedCellSize","_cellSizeAndPositionData","_lastMeasuredIndex","configure","getCellCount","getEstimatedCellSize","getLastMeasuredIndex","getSizeAndPositionOfCell","lastMeasuredCellSizeAndPosition","getSizeAndPositionOfLastMeasuredCell","getTotalSize","getUpdatedOffsetForIndex","align","containerSize","currentOffset","targetIndex","datum","maxOffset","minOffset","idealOffset","totalSize","getVisibleCellRange","_findNearestCell","resetCell","_binarySearch","high","low","middle","_exponentialSearch","interval","lastMeasuredIndex","ScalingCellSizeAndPositionManager","maxScrollSize","_cellSizeAndPositionManager","_maxScrollSize","getOffsetAdjustment","safeTotalSize","offsetPercentage","_getOffsetPercentage","_safeOffsetToOffset","_offsetToSafeOffset","_ChineseFirstPY","oMultiDiff","19969","19975","19988","20048","20056","20060","20094","20127","20167","20193","20250","20256","20282","20285","20291","20314","20315","20340","20375","20389","20391","20415","20446","20447","20504","20608","20854","20857","20911","20985","21032","21048","21049","21089","21119","21242","21273","21305","21306","21330","21333","21345","21378","21397","21414","21442","21477","21480","21484","21494","21505","21512","21523","21537","21542","21549","21571","21574","21588","21589","21618","21621","21632","21654","21679","21683","21710","21719","21734","21769","21780","21804","21834","21899","21903","21908","21939","21956","21964","21970","22003","22031","22040","22060","22066","22079","22129","22179","22237","22244","22280","22300","22313","22331","22343","22351","22395","22412","22484","22500","22534","22549","22561","22612","22771","22831","22841","22855","22865","23013","23081","23487","23558","23561","23586","23614","23615","23631","23646","23663","23673","23762","23769","23780","23884","24055","24113","24162","24191","24273","24324","24377","24378","24439","24554","24683","24694","24733","24925","25094","25100","25103","25153","25170","25179","25203","25240","25282","25303","25324","25341","25373","25375","25384","25457","25528","25530","25552","25774","25874","26044","26080","26292","26333","26355","26366","26397","26399","26415","26451","26526","26552","26561","26588","26597","26629","26638","26646","26653","26657","26727","26894","26937","26946","26999","27099","27449","27481","27542","27663","27748","27784","27788","27795","27812","27850","27852","27895","27898","27973","27981","27986","27994","28044","28065","28177","28267","28291","28337","28463","28548","28601","28689","28805","28820","28846","28952","28975","29100","29325","29575","29602","30010","30044","30058","30091","30111","30229","30427","30465","30631","30655","30684","30707","30729","30796","30917","31074","31085","31109","31181","31192","31293","31400","31584","31896","31909","31995","32321","32327","32418","32420","32421","32438","32473","32488","32521","32527","32562","32564","32735","32793","33071","33098","33100","33152","33261","33324","33333","33406","33426","33432","33445","33486","33493","33507","33540","33544","33564","33617","33632","33636","33637","33694","33705","33728","33882","34067","34074","34121","34255","34259","34425","34430","34485","34503","34532","34552","34558","34593","34660","34892","34928","34999","35048","35059","35098","35203","35265","35299","35782","35828","35830","35843","35895","35977","36158","36228","36426","36466","36710","36711","36767","36866","36951","37034","37063","37218","37325","38063","38079","38085","38107","38116","38123","38224","38241","38271","38415","38426","38461","38463","38466","38477","38518","38551","38585","38704","38739","38761","38808","39048","39049","39052","39076","39271","39534","39552","39584","39647","39730","39748","40109","40479","40516","40536","40583","40765","40784","40840","40863","_checkPYCh","uni","_mkPYRslt","ignoreMulti","splitChar","arrRslt","multiLen","strlen","tmpStr","tmpArr","makeFirstPY","arrResult","cancelAnimationFrame","webkitCancelAnimationFrame","mozCancelAnimationFrame","oCancelAnimationFrame","msCancelAnimationFrame","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","MouseMoveTracker","onMove","onMoveEnd","domNode","_isDragging","_animationFrameID","_domNode","_onMove","_onMoveEnd","_onMouseMove","_onMouseUp","_didMouseMove","captureMouseMoves","event","_eventMoveToken","_eventUpToken","EventListener","listen","_deltaX","_deltaY","_x","clientX","_y","clientY","preventDefault","returnValue","releaseMouseMoves","isDragging","normalizeWheel","sX","sY","pX","pY","detail","wheelDelta","wheelDeltaY","wheelDeltaX","axis","HORIZONTAL_AXIS","PIXEL_STEP","deltaY","deltaX","deltaMode","LINE_HEIGHT","PAGE_HEIGHT","spinX","spinY","pixelX","pixelY","WheelHandler","onWheel","handleScrollX","handleScrollY","stopPropagation","_didWheel","_handleScrollX","_handleScrollY","_stopPropagation","_onWheelCallback","normalizedEvent","changed","cancelBubble","defaultComparator","Heap","_items","_size","_comparator","_heapify","elt","lastElt","_sinkDown","_bubbleUp","peek","parentIndex","parentElt","leftChildIndex","rightChildIndex","swapIndex","leftChild","rightChild","LinkHashMap","scope","re","LRU","limit","tail","_keymap","put","newer","older","returnEntry","node","Int32Array","xs","ceilLog2","PrefixIntervalTree","_half","_heap","getSize","sumUntil","sumTo","inclusiveEnd","begin","greatestLowerBound","leftSum","greatestStrictLowerBound","leastUpperBound","leastStrictUpperBound","uniform","initialValue","Queue","capacity","getElementByIndex","unshift","fromArray","Section","_indexMap","_indices","addCellIndex","getCellIndices","SECTION_SIZE","SectionManager","sectionSize","_sectionSize","_cellMetadata","_sections","indices","getSections","section","getCellMetadata","sectionXStart","sectionXStop","sectionYStart","sectionYStop","sections","sectionX","sectionY","getTotalSectionCount","registerCell","cellMetadatum","Tree","Node","addNode","newNode","addChild","isRoot","getRoot","initTree","nodes","queue","_toJSON","getChildren","toJSON","_toJSONWithNode","toJSONWithNode","param","_traverse","callback","_recursion","route","recursion","inOrderTraverse","_inOrderTraverse","getLeft","getRight","nrInOrderTraverse","preOrderTraverse","_preOrderTraverse","nrPreOrderTraverse","postOrderTraverse","_postOrderTraverse","nrPostOrderTraverse","preNode","isLeaf","getChildrenLength","getFirstChild","getLastChild","setLeft","left","setRight","right","setParent","getParent","getChild","getChildIndex","removeChildByIndex","behind","removeAllChilds","cur","equals","transformToArrayFormat","pId","newNodes","arrayFormat","transformToTreeFormat","sNodes","tmpMap","treeFormat","traversal","Vector","cross","sqrt","Region","isIntersects","isPointInside","vector1","vector2","vector3","getPosition","pos","BehaviorFactory","createBehavior","behavior","HighlightBehavior","RedMarkBehavior","Behavior","rule","Layout","scrollable","scrollx","scrolly","_init4Margin","_init4Scroll","top","bottom","overflow-x","overflow-y","appendFragment","frag","hasChild","_getChildName","_addElement","removeItemAt","_getOptions","_compare","item1","item2","aStack","bStack","className","areArrays","_getWrapper","_addItemAt","_removeItemAt","addItem","addItemAt","prependItem","prependTo","deleted","newItems","newChildren","shouldUpdateItem","updateItemAt","updated","del","addItems","fragment","added","prependItems","prepend","patchItem","oldVnode","vnode","updateChildren","oldCh","newCh","sameVnode","vnode1","vnode2","oldIndex","newIndex","opt","addVnodes","vnodes","startIdx","endIdx","insertBefore","removeVnodes","insert","isNext","insertKey","beforeKey","findOldVnode","vNode","beginIdx","found","oldStartIdx","newStartIdx","oldEndIdx","oldStartVnode","oldEndVnode","newEndIdx","newStartVnode","newEndVnode","sameOldVnode","stroke","removeIndex","populate","resize","_WidgetsPlugin","_ObjectPlugin","_ConfigPlugin","_GlobalWidgetConfigFn","_GlobalObjectConfigFn","widgetConfigFn","objectConfigFn","configWidget","registerWidget","relieveWidget","registerObject","relieveObject","Action","tar","actionPerformed","actionBack","ActionFactory","createAction","ShowAction","isInvalidDate","_eFormat","eFormat","neg","magnitudeNeg","magnitude","pow","integerLen","getInteger","precision","getPrecision","isValueCarry","isValueCarried","toFixed","formatExponential","isAllZero","formatLeft","valueLeftLen","roundNum","_dealNumberPrecision","fright","_numberFormat","numMod","fp","fleft","tp","tleft","tright","paddingZero","_dealWithRight","leftPlus","_dealWithLeft","rll","numReg","orilen","newnum","combo","com","tll","newstr","lres","cjkEncode","newText","code","cjkDecode","rightIdx","subText","eval","SPECIAL_TAGS","htmlEncode","replaceAll","htmlDecode","cjkEncodeDO","jsonEncode","useHasOwn","\b","\t","\n","\f","\r","\\","encodeString","encodeArray","__time__","jsonDecode","_hasDateInJson","json","jo","parseJSON","getEncodeURL","urlTemplate","ori","url","specialCharsMap","reserveSpecialCharsMap","initialChar","encodeChar","contentFormat","cv","needTrim","date2Str","parseFmt","str2Date","compileJFmt","jfmt","_DN","getDay","hour","getTimezone","flagch","char","object2Number","object2Date","object2Time","doBe","run","doHighLight","unHighLight","Single","doRedMark","unRedMark","Controller","EVENT_CHANGE","BroadcastController","_broadcasts","send","BubblesController","_const","bubbleHeight","bubblesManager","storeBubbles","Resizers","_createBubble","direct","level","direction","_getOffsetLeft","offsetStyle","bounds","_getOffsetTop","_getLeftPosition","position","getLeftPosition","_getBottomPosition","getBottomPosition","_getTopPosition","getTopPosition","_getRightPosition","getRightPosition","show","adjustYOffset","adjustXOffset","isTopSpaceEnough","isLeftSpaceEnough","isRightSpaceEnough","hide","bubble","LayerController","layerManager","zindex","zIndex_layer","_resize","layer","trigger","make","op","layout","outerWidth","outerHeight","_getLayout","removeAll","MaskersController","zIndex_masker","PopoverController","modal","floatManager","floatLayer","floatContainer","floatOpened","zIndex_popover","zindexMap","_check","popover","Popover","EVENT_CLOSE","__hasZIndexMask__","__releaseZIndexMask__","__buildZIndexMask__","setZindex","ResizeController","resizerManger","ev","resizer","TooltipsController","tooltipsManager","showingTips","_createTooltip","stopEvent","tooltip","tip","belowMouse","scrollHeight","pageX","pageY","bodyHeight","hover","KEYDOWN","BACKSPACE","SPACE","ENTER","CONFIRM","ERROR","PAUSE","CLEAR","ADD","EDITING","EMPTY","RESIZE","BEFOREEDIT","AFTEREDIT","STARTEDIT","STOPEDIT","CHANGE","EXPAND","COLLAPSE","CALLBACK","CLICK","STATECHANGE","BEFORESTATECHANGE","INIT","AFTERINIT","SCROLL","STARTLOAD","AFTERLOAD","BS","AS","SC","SF","SS","BVW","AVW","AV","BW","AW","WS","WF","BA","AA","BD","AD","UC","BTOPDF","ATOPDF","BTOEXCEL","ATOEXCEL","BTOWORD","ATOWORD","BTOIMAGE","ATOIMAGE","BTOHTML","ATOHTML","BIMEXCEL","AIMEXCEL","BPDFPRINT","APDFPRINT","BFLASHPRINT","AFLASHPRINT","BAPPLETPRINT","AAPPLETPRINT","BSEVERPRINT","ASERVERPRINT","BEMAIL","AEMAIL","pushArray","sArray","pushDistinct","pushDistinctArray","i18nText","_SDN","_FD","_SMN","_QN","_OFFSET","SECOND","MINUTE","HOUR","DAY","WEEK","getMonthDays","month","getLastDateOfMonth","getDayOfYear","getWeekNumber","week","startOfWeek","StartOfWeek","middleDay","offsetWeekStartCount","offsetWeekMiddleCount","setDate","ms","setMonth","getQuarter","getOffsetDate","getOffsetQuarter","day","monthDay","getQuarterStartMonth","quarterStartMonth","nowMonth","getQuarterStartDate","getQuarterEndDate","quarterEndMonth","getOffsetMonth","getWeekStartDate","getWeekEndDate","print","yWith4number","wn","qr","pm","ir","dy","isKhtml","par","Func","createDistinctName","getGBWidth","getSearchResult","keyword","py","matched","pidx","beforeFunc","sFunc","__self","afterFunc","ret","accAdd","arg1","arg2","r1","r2","cm","sub","accSub","mul","accMul","div","digitLength","eSplit","float2Fixed","dLen","times","num1","num2","others","_i","num1Changed","num2Changed","baseNum","leftValue","accDivide","startWith","startTag","endWith","endTag","getQuery","appendQuery","paras","perfectStart","allIndexOf","loc","i18nStore","addI18n","i18n","localeText","moduleInjection","constantInjection","modelInjection","model","storeInjection","store","serviceInjection","service","providerInjection","provider","configFunctions","configFn","providers","providerInstance","globalAction","actionFn","points","point","pointFn","Modules","getModule","getAllModules","Constants","getConstant","callPoint","inst","types","bfns","afns","Models","getModel","mixins","stores","Stores","getStore","services","Services","getService","Providers","getProvider","$get","Actions","runAction","act","runGlobalAction","getContext","ShowListener","eventObj","cardLayout","cardNameCreator","cardCreator","emptyFn","afterCardCreated","afterCardShow","ob","cardName","isCardExisted","card","addCardByName","showCardByName","StyleLoaderManager","stylesManager","loadStyle","styleString","styles","getElementsByTagName","setAttribute","styleSheet","cssText","removeStyle","parentNode","Logic","createLogic","LogicFactory","Type","Vertical","Horizontal","Table","HorizontalFill","logic","VerticalLayoutLogic","HorizontalLayoutLogic","TableLayoutLogic","HorizontalFillLayoutLogic","createLogicTypeByDirection","Direction","Top","Bottom","Custom","Left","Right","createLogicItemsByDirection","dynamic","hgap","vgap","lgap","rgap","tgap","bgap","columns","rows","columnSize","rowSize","_isSupportFlex","isSupportFlex","isSupportCss3","isIE","supportFlex","isLessIE8","getIEVersion","verticalAlign","VerticalAlign","Middle","horizontalAlign","HorizontalAlign","Center","justOneItem","attachEvent","stylesCreated","requestFrame","raf","cancelFrame","resetTriggers","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","offsetWidth","offsetHeight","checkTriggers","__resizeLast__","scrollListener","__resizeRAF__","__resizeListeners__","animation","animationstring","keyframeprefix","animationstartevent","domPrefixes","startEvents","pfx","elm","animationName","animationKeyframes","animationStyle","createStyles","addResizeListener","getComputedStyle","innerHTML","removeResizeListener","detachEvent","removeEventListener","ResizeDetector","ready","fromElement","toElement","elemData","jQuery","eventKey","handler","namespace","fromChildren","toChildren","doms","dom","isExist","preloadImages","srcArray","onload","complete","images","Image","onerror","getTextSizeWidth","fontSize","span","appendTo","getTextSizeHeight","getScrollWidth","_scrollWidth","ul","overflow","clientWidth","getImage","fillStyle","backgroundColor","canvas","ratio","ctx","font","measureText","textBaseline","fillText","backColor","toDataURL","isColor","color","isRGBColor","isHexColor","isDarkColor","hex","rgb","rgb2json","hex2rgb","grayLevel","getContrastColor","rgb2hex","rgbColour","rgbValues","red","green","blue","hexColour","int2hex","rgba2json","json2rgb","json2rgba","rgba","strNum","hexdig","tempValue","colorArray","rgba2rgb","rgbColor","bgColor","popup","extraWidth","getInnerLeftPosition","getInnerRightPosition","viewBounds","extraHeight","isInnerLeftSpaceEnough","windowBounds","isInnerRightSpaceEnough","isBottomSpaceEnough","isRightSpaceLarger","isBottomSpaceLarger","getLeftAlignPosition","getLeftAdaptPosition","getRightAlignPosition","comboBounds","getRightAdaptPosition","getTopAlignPosition","needAdaptHeight","comboOffset","popupBounds","adaptHeight","getTopAdaptPosition","getBottomAlignPosition","getBottomAdaptPosition","getCenterAdaptPosition","getMiddleAdaptPosition","getComboPositionByDirections","directions","leftRight","topBottom","innerLeftRight","isNeedAdaptHeight","tbFirst","lrFirst","firstDir","tW","tH","change","getComboPosition","maxHeight","resetHeight","eventType","capture","registerDefault","__isIE","__IEVersion","agent","v1","v2","isIE9Below","isEdge","isChrome","isFireFox","isOpera","isSafari","isMac","isWindows","humpString","htmlStyle","documentElement","_toHumb","$0","$1","isArraylike","createOptions","optionsCache","core_rnotwhite","flag","internalData","elem","pvt","acceptData","thisCache","internalKey","expando","getByName","isNode","core_deletedIds","guid","camelCase","internalRemoveData","isEmptyDataObject","cleanData","support","deleteExpando","dataAttr","rmultiDash","getAttribute","rbrace","returnTrue","returnFalse","sibling","winnow","elements","qualifier","keep","grep","retVal","filtered","isSimple","inArray","createSafeFragment","list","nodeNames","safeFrag","findOrAppend","ownerDocument","disableScript","getAttributeNode","specified","restoreScript","rscriptTypeMasked","removeAttribute","setGlobalEval","elems","refElements","cloneCopyEvent","dest","hasData","oldData","curData","handle","fixCloneNodeIssues","nodeName","noCloneEvent","removeEvent","outerHTML","html5Clone","manipulation_rcheckableType","defaultChecked","checked","defaultSelected","selected","getAll","core_strundefined","querySelectorAll","childNodes","fixDefaultChecked","vendorPropName","capName","origName","cssPrefixes","isHidden","showHide","hidden","css_defaultDisplay","setPositiveNumber","subtract","rnumsplit","augmentWidthOrHeight","extra","isBorderBox","cssExpand","getWidthOrHeight","valueIsBorderBox","getStyles","boxSizing","curCSS","rnumnonpx","boxSizingReliable","doc","elemdisplay","actualDisplay","iframe","contentDocument","detach","body","buildParams","traditional","rbracket","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","originalOptions","jqXHR","inspect","inspected","prefilterOrFactory","dataTypeOrTransport","seekingTransport","transports","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","responses","firstDataType","finalDataType","contents","responseFields","mimeType","getResponseHeader","converters","ajaxConvert","response","conv2","conv","prev","dataFilter","createStandardXHR","XMLHttpRequest","createActiveXHR","ActiveXObject","createFxNow","fxNow","createTweens","tweeners","Animation","animationPrefilters","deferred","Deferred","always","tick","currentTime","startTime","duration","percent","tweens","notifyWith","resolveWith","opts","specialEasing","originalProperties","createTween","tween","Tween","easing","gotoEnd","rejectWith","propFilter","fx","timer","anim","progress","hooks","cssHooks","defaultPrefilter","dataShow","toggle","oldfire","orig","handled","_queueHooks","unqueued","fire","overflowX","overflowY","inlineBlockNeedsLayout","zoom","shrinkWrapBlocks","rfxtypes","_removeData","genFx","includeWidth","which","opacity","getWindow","defaultView","parentWindow","readyList","rootjQuery","_jQuery","_$","class2type","core_version","core_concat","core_push","core_slice","core_indexOf","core_toString","core_hasOwn","core_trim","selector","core_pnum","rtrim","rquickExpr","rsingleTag","rvalidchars","rvalidbraces","rvalidescape","rvalidtokens","rmsPrefix","rdashAlpha","fcamelCase","letter","completed","readyState","jquery","parseHTML","getElementById","pushStack","prevObject","copyIsArray","isReady","readyWait","holdReady","hold","off","msg","keepScripts","parsed","scripts","buildFragment","parseXML","xml","DOMParser","parseFromString","async","loadXML","globalEval","execScript","results","second","inv","access","chainable","emptyGet","raw","bulk","frameElement","doScroll","doScrollCheck","Callbacks","firing","memory","fired","firingLength","firingIndex","firingStart","stopOnFalse","unique","lock","locked","fireWith","tuples","newDefer","tuple","returned","notify","pipe","stateString","when","subordinate","resolveValues","updateFunc","contexts","progressValues","progressContexts","resolveContexts","select","isSupported","getSetAttribute","leadingWhitespace","firstChild","tbody","htmlSerialize","hrefNormalized","cssFloat","checkOn","optSelected","enctype","cloneNode","boxModel","compatMode","reliableMarginRight","pixelPosition","noCloneChecked","optDisabled","radioValue","appendChecked","checkClone","lastChild","click","submit","focusin","backgroundClip","clearCloneStyle","marginDiv","tds","divReset","reliableHiddenOffsets","doesNotIncludeMarginInBodyOffset","offsetTop","marginRight","noData","embed","applet","removeData","dequeue","startLength","speeds","timeout","clearQueue","nodeHook","boolHook","rclass","rreturn","rfocusable","rclickable","rboolean","ruseDefault","getSetInput","removeAttr","removeProp","propFix","classes","clazz","proceed","toggleClass","stateVal","isBool","classNames","hasClass","valHooks","option","selectedIndex","one","notxml","nType","isXMLDoc","attrHooks","propName","attrNames","tabindex","readonly","class","maxlength","cellspacing","cellpadding","rowspan","colspan","usemap","frameborder","contenteditable","propHooks","tabIndex","attributeNode","href","button","setAttributeNode","createAttribute","rformElems","rkeyEvent","rmouseEvent","rfocusMorph","rtypenamespace","handleObjIn","special","eventHandle","handleObj","handlers","namespaces","origType","triggered","dispatch","delegateType","bindType","needsContext","expr","delegateCount","setup","mappedTypes","origCount","teardown","onlyHandlers","ontype","bubbleType","eventPath","Event","isTrigger","namespace_re","noBubble","isPropagationStopped","isDefaultPrevented","_default","fix","handlerQueue","delegateTarget","preDispatch","currentTarget","isImmediatePropagationStopped","postDispatch","sel","originalEvent","fixHook","fixHooks","mouseHooks","keyHooks","srcElement","metaKey","original","charCode","keyCode","eventDoc","clientLeft","clientTop","relatedTarget","load","focus","activeElement","blur","beforeunload","simulate","isSimulated","defaultPrevented","getPreventDefault","timeStamp","stopImmediatePropagation","mouseenter","mouseleave","related","submitBubbles","form","_submit_bubble","changeBubbles","_just_changed","focusinBubbles","attaches","origFn","unbind","delegate","undelegate","triggerHandler","isNative","rnative","createCache","Expr","cacheLength","markFunction","Sizzle","seed","old","nid","newContext","newSelector","preferredDoc","setDocument","documentIsXML","getByClassName","getElementsByClassName","qsa","rbuggyQSA","tokenize","rescape","toSelector","rsibling","qsaError","siblingCheck","diff","sourceIndex","MAX_NEGATIVE","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","parseOnly","tokens","soFar","preFilters","cached","tokenCache","preFilter","rcomma","rcombinators","matchExpr","addCombinator","matcher","combinator","base","checkNonElements","doneName","outerCache","dirkey","dirruns","cachedruns","elementMatcher","matchers","condense","unmatched","newUnmatched","setMatcher","postFilter","postFinder","postSelector","preMap","postMap","preexisting","multipleContexts","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","relative","implicitRelative","matchContext","matchAnyContext","outermostContext","matcherFromGroupMatchers","elementMatchers","setMatchers","matcherCachedRuns","bySet","byElement","superMatcher","expandContext","setMatched","matchedCount","outermost","contextBackup","dirrunsUnique","uniqueSort","token","runescape","funescape","compile","setFilters","isXML","hasDuplicate","docElem","rbuggyMatches","sortOrder","classCache","compilerCache","strundefined","whitespace","characterEncoding","identifier","operators","pseudos","rpseudo","ridentifier","ID","CLASS","NAME","TAG","ATTR","PSEUDO","CHILD","rinputs","rheader","rattributeQuotes","escaped","tagNameNoComments","createComment","pass","getElementsByName","getIdNotName","attrHandle","attrId","matchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","aup","ap","bp","detectDuplicates","duplicates","textContent","nodeValue","selectors","createPseudo"," ","+","~","excess","unquoted","operator","check","what","simple","forward","ofType","nodeIndex","useCache","pseudo","not","innerText","lang","elemLang","hasFocus","enabled","header","even","odd","gt","radio","checkbox","file","image","filters","runtil","rparentsprev","rneedsContext","guaranteedUnique","targets","closest","prevAll","addBack","andSelf","parents","parentsUntil","until","nextAll","nextUntil","prevUntil","siblings","rinlinejQuery","rnoshimcache","rleadingWhitespace","rxhtmlTag","rtagName","rtbody","rhtml","rnoInnerhtml","rchecked","rscriptType","rcleanScript","wrapMap","legend","area","thead","tr","col","td","safeFragment","fragmentDiv","optgroup","tfoot","colgroup","caption","th","wrapAll","html","wrapInner","unwrap","replaceWith","domManip","keepData","dataAndEvents","deepDataAndEvents","table","hasScripts","iNoClone","ajax","throws","insertAfter","destElements","srcElements","inPage","selection","safe","ralpha","ropacity","rposition","rdisplayswap","rmargin","rrelNum","BODY","cssShow","visibility","cssNormalTransform","letterSpacing","fontWeight","bool","cssNumber","columnCount","fillOpacity","lineHeight","orphans","widows","zIndex","cssProps","float","swap","_computed","minWidth","maxWidth","getPropertyValue","currentStyle","rsLeft","runtimeStyle","pixelLeft","margin","border","suffix","expanded","parts","r20","rCRLF","rsubmitterTypes","rsubmittable","serialize","serializeArray","fnOver","fnOut","ajaxLocParts","ajaxLocation","ajax_nonce","ajax_rquery","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","rurl","_load","prefilters","allTypes","params","responseText","success","active","lastModified","etag","isLocal","processData","contentType","accepts","*","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","nativeStatusText","headers","isSuccess","modified","statusText","timeoutTimer","transport","responseHeadersString","ifModified","cacheURL","callbackContext","statusCode","fireGlobals","globalEventContext","completeDeferred","responseHeaders","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","abort","finalText","crossDomain","hasContent","beforeSend","getScript","getJSON","script","text script","scriptCharset","charset","onreadystatechange","isAbort","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","xhrCallbacks","xhrSupported","xhrId","xhrOnUnloadAbort","xhr","cors","xhrFields","err","firefoxAccessException","unload","rfxnum","rrun","unit","scale","maxIterations","tweener","prefilter","eased","cssFn","speed","animate","fadeTo","optall","doAnimation","finish","stopQueue","timers","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","linear","swing","cos","PI","setInterval","clearInterval","slow","fast","animated","setOffset","win","box","getBoundingClientRect","pageYOffset","pageXOffset","curElem","curOffset","curCSSTop","curCSSLeft","calculatePosition","curPosition","curTop","curLeft","using","offsetParent","parentOffset","scrollTo","Height","Width","content","","defaultExtra","insets","hasIgnoredBounds","__textKeywordMarked__","textLeft","tidx","ps","getDomHeight","hasVerticalScroll","hasHorizonScroll","clientHeight","getStyle","computedStyle","styleFloat","__isMouseInBounds__","offset2Body","zIndexMask","domArray","indexMask","mask","z-index","$import","loadReady","must","$scripts","_LOADED","$links","ext","link","rel","multiply","divide","acc","fractionDigits","RangeError","MAX","MIN","EVENT_RESPONSE_TIME","zIndex_popup","zIndex_tip","emptyStr","Key","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","KeyCode","COMMA","DELETE","DOWN","END","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","TAB","UP","Status","SUCCESS","WRONG","START","WAITING","READY","RUNNING","OUTOFBOUNDS","NULL","Axis","Selection","Default","None","Multi","All","Stretch","AbsoluteCenterLayout","AbsoluteHorizontalLayout","AbsoluteVerticalLayout","CenterAdaptLayout","_ref","HorizontalAdaptLayout","LeftRightVerticalAdaptLayout","llgap","lrgap","lhgap","rlgap","rrgap","rhgap","layoutArray","textAlign","LeftVerticalAdaptLayout","RightVerticalAdaptLayout","TableAdaptLayout","$table","white-space","max-width","vertical-align","margin-top","margin-left","margin-right","margin-bottom","VerticalAdaptLayout","HorizontalAutoLayout","FloatHorizontalLayout","InlineCenterAdaptLayout","InlineLayout","whiteSpace","InlineVerticalAdaptLayout","FlexCenterLayout","flex-shrink","FlexHorizontalCenter","FlexHorizontalLayout","FlexVerticalCenter","FlexVerticalLayout","FlexWrapperCenterLayout","$wrapper","FlexWrapperHorizontalCenter","FlexWrapperHorizontalLayout","FlexWrapperVerticalCenter","FlexWrapperVerticalLayout","AbsoluteLayout","AdaptiveLayout","BorderLayout","regions","CardLayout","showIndex","tItem","defaultShowName","getCardByName","_deleteCardByName","deleteCardByName","cardItem","lastShowIndex","showLastCard","setDefaultShowName","getDefaultShowName","getAllCardNames","getShowingCard","deleteAllCard","hideAllCard","isAllCardHide","removeName","DefaultLayout","DivisionLayout","opitons","firstElement","row","widths","heights","column","totalW","lastW","totalH","FloatLeftLayout","FloatRightLayout","GridLayout","HorizontalLayout","border-spacing","border-collapse","$tr","HorizontalCellLayout","*display","*zoom","LatticeLayout","TableLayout","HTapeLayout","VTapeLayout","TdLayout","VerticalLayout","WindowLayout","CenterLayout","FloatCenterLayout","HorizontalCenterLayout","VerticalCenterLayout","MODE","BufferPool","_Shared","SharingPool","shared","cat","Req","factory","require","Fix","_$1","makeHashCode","rhashcode","_toString","parsePath","bailRE","segments","$$skips","cloneShadow","__ref__","isShadowEqual","getMixins","mixinInjection","runBinaryFunction","binarys","watch","vm","expOrFn","$watch","$vm","user","exps","watchers","running","oldValue","sync","isGlobal","getter","$$skipArray","_getter","currentModels","_loop","models","initState","_stateWatchers","_loop2","_key2","userDef","Watcher","_modelHashId","listener","defaultCallback","initComputed","_computedWatchers","_computedOrder","initWatch","watchObj","_watchers","createWatcher","injectMethod","$digest","initMethods","methods","initMixins","mixinType","mixin$$1","defineContext","getSingleContext","childContext","_contextWatchers","digestState","dirty","watcher","digestComputed","dirtyQueue","cleanQueue","digestContext","contextListeners","digest","stateDirty","contextDirty","computedDirty","ttl","TTL","_ttl","_ttl2","executeWatchListeners","syncListeners","asyncListeners","listner","refreshAllDefineModel","allDefineModelInstances","insta","getAllModelInstances","allModelInstances","refreshAll","Model","getModelID","originalMethods","_len","channel","port","SymbolProto","ObjProto","deepEq","_wrapped","aCtor","bCtor","falsy$1","||","&&","(",")","getInstance","nextListener","callbackMap","queueNextListener","alive","watch$$1","orgEvent","delta","absDelta","offsetX","offsetY","pageHeight","lowestDelta","shouldAdjustOldDeltas","normalizeOffset","boundingRect","deltaFactor","nullLowestDeltaTimeout","nullLowestDelta","adjustOldDeltas","toFix","toBind","documentMode","mousewheel","onmousewheel","unmousewheel","Pane","tipText","overlap","onLoaded","_assertTip","_tipText","loading","loadingAnimation","setTipVisible","Layers","_loading","loaded","EVENT_LOADED","conf","title","warningTitle","tipType","_showToolTip","getTipType","getTitle","getWarningTitle","Tooltips","_hideTooltip","enableHover","_clearTimeOut","showTimeout","hideTimeout","_hoverBinded","_e","disabledHover","setTitle","setWarningTitle","isReadOnly","Text","highLight","padding-left","padding-right","padding-top","padding-bottom","_getTextWrap","textOverflow","_getShowText","setStyle","BasicButton","forceSelected","forceNotSelected","disableSelected","shadow","isShadowShowingOnSelected","setSelected","bindEvent","_createShadow","assertMask","$mask","mouseup","_hover","isSelected","clk","isOnce","destroyWhenHide","getBubble","BubblePopupBarView","EVENT_CLICK_TOOLBAR_BUTTON","hideView","onClick","BubbleCombo","EVENT_BEFORE_POPUPVIEW","isViewVisible","showView","hand","triggerArr","mouseDown","mousedown","_trigger","dblclick","doClick","_doClick","isDisableSelected","isForceSelected","isForceNotSelected","beforeClick","dishover","NodeButton","setOpened","isOpened","triggerCollapse","triggerExpand","Tip","ButtonGroup","behaviors","chooseType","_createBtns","_btnsCreator","buttons","btn","CHOOSE_TYPE_SINGLE","CHOOSE_TYPE_NONE","_packageBtns","btns","_packageSimpleItems","_packageItems","packBtns","_packageLayout","lay","_isSimpleLayout","removeItems","setNotSelectedValue","setEnabledValue","getNotSelectedValue","getAllButtons","getAllLeaves","getSelectedButtons","getNotSelectedButtons","getIndexByValue","getNodeById","getNodeByValue","CHOOSE_TYPE_MULTI","CHOOSE_TYPE_ALL","CHOOSE_TYPE_DEFAULT","ButtonTree","leaves","vs","TreeView","selectedValues","itemsCreator","_stop","_createTree","_loadMore","setSelectedValue","tree","_selectTreeNode","treeId","treeNode","_configSetting","getCheckStatus","half","checkNode","getUrl","_getParentValues","beforeExpand","isAjaxing","Msg","toast","ajaxGetNodes","onAsyncSuccess","halfCheck","zTree","totalCount","perTime","updateNode","selectNode","onAsyncError","textStatus","errorThrown","reloadType","reAsyncChildNodes","beforeCheck","track","treeObj","getSelectedNodes","onCheck","onExpand","onCollapse","setting","autoParam","otherParam","simpleData","showIcon","expandSpeed","nameIsHTML","dblClickExpand","getParentNode","_getNodeValue","_getHalfSelectedValues","checkState","parentValues","_buildTree","storeValues","_getTree","_addTreeNode","_getSelectedValues","hashMap","rootNoots","getNodes","_dealWidthNodes","ns","isParent","setLoading","hasNext","setLoaded","setEnd","addNodes","_initTree","hasChecked","getCheckedNodes","checkAll","setNode","checkAllNodes","expandAll","updateValue","refresh","getNodesByParam","REQ_TYPE_INIT_DATA","REQ_TYPE_ADJUST_DATA","REQ_TYPE_SELECT_DATA","REQ_TYPE_GET_SELECTED_DATA","EVENT_INIT","EVENT_AFTERINIT","AsyncTree","TreeRenderPageService","subNodeListGetter","tId","getZTreeObj","_beforeExpandNode","tNode","pNode","_getJoinValue","pushNodeList","removeNodeList","_join","valueA","valueB","checkedValues","PartTree","lastSearchValue","_getUnionValue","curSelectedValue","notSelectedValue","new_values","_union","ListTreeView","_constants","SPLIT","_checkValue","chkboxType","_transArrayToMap","treeArrays","_transMapToArray","treeMap","storeValue","ListAsyncTree","ListPartTree","Maskers","Bubbles","Popovers","Broadcasts","StyleLoaders","CollectionView","cellSizeAndPositionGetter","horizontalOverscanSize","verticalOverscanSize","renderedCells","renderedKeys","renderRange","_scrollLock","_debounceRelease","scroll","_calculateChildrenToRender","EVENT_SCROLL","_calculateSizeAndPositionData","_populate","cellMetadata","sectionManager","_sectionManager","_height","_width","_cellRenderers","_lastRenderedCellIndices","_cellGroupRenderer","rendered","_getMaxScrollLeft","_getMaxScrollTop","minY","maxY","minX","maxX","childrenToDisplay","renderedWidgets","lefts","tops","leftMap","topMap","leftBorder","rightBorder","topBorder","bottomBorder","assertMinBorder","MAX_VALUE","assertMaxBorder","_left","_top","startTopIndex","endTopIndex","startLeftIndex","endLeftIndex","existSet","addSet","deleteArray","addedItems","_reRange","setScrollLeft","setScrollTop","setOverflowX","setOverflowY","getScrollLeft","getScrollTop","getMaxScrollLeft","getMaxScrollTop","_clearChildren","restore","cell","Combo","isDefaultInit","isNeedAdjustHeight","isNeedAdjustWidth","adjustLength","hideChecker","comboClass","hoverClass","_initCombo","_initPullDownAction","_popupView","_hideView","EVENT_EXPAND","EVENT_COLLAPSE","EVENT_TRIGGER_CHANGE","_assertPopupView","_toggle","_assertPopupViewRender","popupView","enterPopup","evs","EVENT_AFTER_INIT","_rendered","_hideIf","adjustWidth","adjustHeight","isHide","EVENT_BEFORE_HIDEVIEW","EVENT_AFTER_HIDEVIEW","EVENT_AFTER_POPUPVIEW","resetListWidth","maxW","resetListHeight","resetWidth","getPopupPosition","Expander","expanderClass","_expanded","_initExpander","expander","isExpanded","ComboGroup","son","VirtualGroup","buttonMap","Loader","hasPrev","_prevLoad","_nextLoad","button_group","Navigation","single","tab","cardMap","setSelect","_deleteOtherCards","currCardName","_assertCard","getSelect","getSelectedCard","Searcher","isAutoSearch","isAutoSync","allowSearchBlank","onSearch","adapter","masker","editor","_search","_startSearch","_stopSearch","_pauseSearch","_isSearching","EVENT_START","startSearch","pauseSearch","EVENT_PAUSE","stopSearch","EVENT_STOP","_getLastSearchKeyword","getItems","finding","EVENT_SEARCHING","searchResult","matchResult","setAdapter","doSearch","isSearching","hasMatched","adjustView","getKeyword","getKeywords","Switcher","switcherClass","_initSwitcher","switcher","_created","Tab","curr","removeTab","cardname","getSelectedTab","getTab","EL","ele","$pop","messageShows","toastStack","alert","_show","confirm","prompt","min_width","autoClose","Toast","EVENT_DESTORY","hasCancel","controlItems","north","center","east","south","GridView","overscanColumnCount","overscanRowCount","rowHeightGetter","columnWidthGetter","_getOverscanIndices","overscanCellsCount","startIndex","stopIndex","overscanStartIndex","overscanStopIndex","visibleColumnIndices","_columnSizeAndPositionManager","visibleRowIndices","_rowSizeAndPositionManager","horizontalOffsetAdjustment","verticalOffsetAdjustment","_renderedColumnStartIndex","_renderedColumnStopIndex","_renderedRowStartIndex","_renderedRowStopIndex","overscanColumnIndices","overscanRowIndices","rowCount","columnStartIndex","columnStopIndex","rowStartIndex","rowStopIndex","minRowDatum","minColumnDatum","maxRowDatum","maxColumnDatum","rowIndex","rowDatum","columnIndex","columnDatum","_rowIndex","_columnIndex","_getRealMaxScrollLeft","totalWidth","estimatedColumnSize","estimatedRowSize","setColumnCount","setRowCount","setEstimatedColumnSize","setEstimatedRowSize","_constant","SIZE","SMALL","NORMAL","BIG","HEADER_HEIGHT","footer","closable","startX","startY","tracker","_calculateSize","dragger","compareHeight","EVENT_OPEN","BarPopover","EVENT_CANCEL","EVENT_CONFIRM","PopupView","minHeight","innerVGap","tool","tabs","min-width","mouseover","_createTool","_createTab","_createView","toolbar","_createToolBar","min-height","tbHeight","tabHeight","toolHeight","max-height","SearcherView","redmark","searcher","spliter","ListView","overscanHeight","renderedIndex","_calculateBlocksToRender","lastWidth","lastHeight","_renderMoreIf","minContentHeight","cnt","getElementHeight","addedHeight","VirtualList","topBlank","bottomBlank","minContentHeightFrom","minContentHeightTo","needDestroyed","firstFragment","lastFragment","currentFragment","lastCache","Pager","dynamicShow","dynamicShowFirstLast","dynamicShowPrevNext","pages","jump","firstPage","lastPage","currPage","dict","poor","flow","EVENT_AFTER_POPULATE","getCurrentPage","setAllPages","LoadingBar","_reset","IconButton","iconWidth","iconHeight","icon","ImageButton","setImageWidth","setImageHeight","getImageWidth","getImageHeight","setSrc","getSrc","Button","iconCls","ghost","textWidth","textHeight","TextButton","BlankIconIconTextItem","iconCls1","iconCls2","blankWidth","textHgap","textVgap","textLgap","textRgap","blank","icon1","icon2","BlankIconTextIconItem","BlankIconTextItem","IconTextIconItem","leftIconWrapperWidth","rightIconWrapperWidth","IconTextItem","iconWrapperWidth","TextIconItem","TextItem","IconTextIconNode","IconTextNode","TextIconNode","TextNode","Editor","inputType","validationChecker","quitChecker","allowBlank","watermark","errorText","outline","_assertWaterMark","contentWrapper","Input","EVENT_FOCUS","_checkError","EVENT_BLUR","_setErrorVisible","EVENT_CLICK","EVENT_KEY_DOWN","EVENT_QUICK_DOWN","EVENT_VALID","_checkWaterMark","EVENT_ERROR","isEditing","EVENT_RESTRICT","EVENT_EMPTY","EVENT_ENTER","EVENT_SPACE","EVENT_BACKSPACE","EVENT_REMOVE","EVENT_CHANGE_CONFIRM","_checkToolTip","disabledWaterMark","setErrorText","getErrorText","setWaterMark","disabledError","disableError","enableError","disableWaterMark","enableWaterMark","selectAll","onKeyDown","getLastValidValue","getLastChangedValue","MultifileEditor","multiple","maxSize","accept","File","EVENT_UPLOADSTART","EVENT_PROGRESS","EVENT_UPLOADED","upload","TextAreaEditor","_focus","_blur","Html","Icon","Iframe","setName","Img","ImageCheckbox","Checkbox","files","sendFile","multipart","boundary","CRLF","fileName","getAsBinary","sendAsBinary","fileSize","rpe","attachO","attach_type","filename","attach_array","onloadstart","total","simulation","onprogress","onabort","FormData","onloadprogress","interactive","sendFiles","sent","_wrap","self_","clean","attach","errorCode","errorMsg","fileType","attach_names","attachNum","_events","tempFile","errorType","replaceChild","totalProp","currentProp","ctrlKey","inputEventValid","_keydown","_keydown_","_clk","_click","_focusDebounce","_blurDebounce","keydown","keyup","focusout","_checkValidationOnValueChange","_isEditing","_lastValidValue","_defaultState","_start","lastValidValue","_lastChangedValue","_lastValue","_pause","lastValue","_valueChange","_lastSubmitValue","textValue","ImageRadio","Radio","AbstractLabel","_createJson","_createCenterEl","_createNotCenterEl","line-height","adaptLayout","HtmlLabel","IconLabel","Label","Link","Bubble","mousemove","_createBubbleText","_bottom","_right","Tooltip","texts","setLevel","Trigger","setKey","getKey","CustomTree","_formatItems","roots","_consts","BUTTON","LEVEL","ICO_LOADING","SWITCH","NODECREATED","ASYNC_SUCCESS","ASYNC_ERROR","REMOVE","SELECTED","UNSELECTED","ICON","SPAN","UL","line","ROOT","ROOTS","CENTER","BOTTOM","NOLINE","LINE","folder","OPEN","CLOSE","DOCU","CURSELECTED","_setting","addDiyDom","autoCancelSelected","fontCss","selectedMulti","showLine","showTitle","txtSelectedEnable","idKey","pIdKey","rootPId","leaf","beforeAsync","beforeDblClick","beforeRightClick","beforeMouseDown","beforeMouseUp","beforeCollapse","beforeRemove","onNodeCreated","onDblClick","onRightClick","onMouseDown","onMouseUp","onRemove","setRoot","expandTriggerFlag","curSelectedList","noSelection","createdNodes","zId","_ver","_initCache","getCache","setCache","_bindEvent","consts","tools","srcEvent","clickFlag","onSelected","onUnSelected","_unbindEvent","_eventProxy","getSetting","nodeEventType","treeEventType","nodeEventCallback","treeEventCallback","eqs","getNodeMainDom","getMDom","attrName","getNodeCache","onSwitchNode","onClickNode","onZTreeMousedown","onZTreeMouseup","onZTreeDblclick","onZTreeContextmenu","proxyResult","_initNode","isFirstNode","isLastNode","openFlag","childKey","parentTId","zAsync","getPreNode","getNextNode","fixPIdKeyValue","proxys","beforeA","afterA","innerBeforeA","innerAfterA","zTreeTools","addNodeCache","getNodeCacheId","addAfterA","addBeforeA","addInnerAfterA","addInnerBeforeA","addInitBind","addInitUnBind","unbindEvent","addInitCache","initCache","addInitNode","initNode","addInitProxy","initProxy","isFirst","addInitRoot","initRoot","addNodesData","setNodeLineIcos","addSelectedNode","isSelectedNode","addCreatedNode","addZTreeTools","exSetting","getAfterA","getBeforeA","getInnerAfterA","getInnerBeforeA","getNodeByParam","getNodeName","nameKey","getNodeTitle","getNodesByParamFuzzy","getNodesByFilter","isSingle","invokeParam","tmpResult","getRoots","getSettings","getZTreeTools","treeTools","nextNode","removeNodeCache","removeSelectedNode","setZTreeTools","transformTozTreeFormat","parentKey","bindTree","eventParam","-moz-user-select","unbindTree","doProxy","uCanDo","switchNode","cancelPreSelectedNode","fun","zt","canAsync","str1","str2","curDom","targetExpr","isChildOrSelf","parentId","isSilent","target_switchObj","$$","target_icoObj","target_ulObj","replaceSwitchClass","replaceIcoClass","createNodes","expandCollapseParentNode","appendNodes","initFlag","tmpPNode","tmpPChild","childHtml","makeDOMNodeMainBefore","makeDOMNodeLine","makeDOMNodeNameBefore","makeDOMNodeIcon","makeDOMNodeNameAfter","makeUlHtml","makeDOMNodeMainAfter","appendParentULDom","nObj","ulObj","asyncNode","icoObj","tmpParam","pKey","spKey","_tmpV","excludeNode","createNodeCallback","zTreeHtml","expandCollapseNode","expandFlag","animateFlag","_callback","switchObj","iconOpen","iconClose","makeNodeIcoStyle","expandCollapseSonNode","treeNodes","selfAnimateSign","nameStr","makeNodeIcoClass","makeNodeLineClass","makeNodeUrl","fontcss","makeNodeFontCss","fontStyle","makeNodeTarget","icoCss","iconSkin","icoStyle","lineClass","makeNodeLineClassEx","urlKey","makeUlLineClass","removeChildNodes","tmp_switchObj","tmp_icoObj","setFirstNode","childLength","setLastNode","removeNode","tmp_ulObj","newLast","tmp_first_switchObj","newName","tmpName","tmpList","addFlag","setNodeFontCss","aObj","ulLine","setNodeName","setNodeTarget","setNodeUrl","_z","zSetting","zNodes","addCallback","xNewNodes","cancelSelectedNode","expandNode","sonSign","callbackFlag","getNodeByTId","getNodeIndex","transformTozTreeNodes","simpleNodes","transformToArray","checkTypeFlag","CHECK","STYLE","DEFAULT","DISABLED","FALSE","TRUE","FULL","PART","FOCUS","TYPE_ALL","TYPE_LEVEL","autoCheckTrigger","chkStyle","nocheckInherit","chkDisabledInherit","radioType","radioCheckedList","_handler","onCheckNode","onMouseoverCheck","onMouseoutCheck","checkedKey","checkedOld","nocheck","chkDisabled","check_Child_State","check_Focus","_beforeA","makeChkFlag","makeChkClass","_zTreeTools","checkObj","checkNodeRelation","setChkClass","repairParentChkClassWithSelf","repairAllChk","getTreeCheckedNodes","getChangeCheckedNodes","getTreeChangeCheckedNodes","setChkDisabled","inheritParent","inheritChildren","repairSonChkDisabled","repairParentChkDisabled","_updateNode","getRadioCheckedList","checkedList","onlyOne","chkFlag","cNode","_event","_tools","_view","setSonNodeCheckBox","setParentNodeCheckBox","checkboxType","notEffectByOtherNode","fullStyle","chkName","repairChkClass","repairParentChkClass","sNode","srcNode","pSign","pNodes","hasDisable","_createNodes","_removeNode","_appendNodes","TreeRenderScrollService","nodeLists","hasBinded","_getNodeListBounds","nodeList","offsetLeft","_getTreeContainerBounds","_canNodePopulate","containerBounds","_isNodeInVisible","refreshAllNodes","refreshNodes","_getLoadingBar","loadWidget","IconChangeButton","setIcon","TriggerIconButton","HalfIconButton","HalfButton","MultiSelectItem","SingleSelectIconTextItem","SingleSelectItem","SingleSelectRadioItem","ArrowNode","FirstPlusGroupNode","IconArrowNode","LastPlusGroupNode","MidPlusGroupNode","MultiLayerIconArrowNode","PlusGroupNode","Switch","FirstTreeLeafItem","getId","getPId","IconTreeLeafItem","LastTreeLeafItem","MidTreeLeafItem","MultiLayerIconTreeLeafItem","isFront","TreeTextLeafItem","CalendarDateItem","Calendar","_dateCreator","De","mins","maxs","setFullYear","ymd","FDay","offSetFDay","PDay","NDay","lastMonth","currentDay","nextMonth","_getWeekLabel","days","_getItems","isFrontDate","newDate","isFinalDate","setMinDate","setMaxDate","getPageByDateJSON","page","getDateJSONByPage","months","YearCalendar","_yearCreator","getStartYear","startDate","endDate","INTERVAL","currentYear","years","isFrontYear","isFinalYear","getEndYear","tyears","getPageByYear","ArrowTreeGroupNodeCheckbox","CheckingMarkNode","FirstTreeNodeCheckbox","LastTreeNodeCheckbox","MidTreeNodeCheckbox","TreeNodeCheckbox","CustomColorChooser","ColorPickerEditor","farbtastic","Farbtastic","ColorChooser","colorPicker","ColorChooserPopup","EVENT_VALUE_CHANGE","_isRGBColor","colorEditor","_dealStoreColors","storeColors","_digestStoreColors","_getStoreColors","ColorPicker","customColorChooser","panel","more","PopupPanel","colors","que","setStoreColors","colorsArray","SimpleColorChooserPopup","SimpleColorChooser","ColorChooserTrigger","colorContainer","down","background-color","LongColorChooserTrigger","changeIcon","label","ColorPickerButton","_createMask","constants","REB_WIDTH","colorShow","RGB","checker","Ws","TextEditor","_checkEditors","none","lastColor","_isEmptyRGB","transparent","_showPreColor","SimpleColorPickerEditor","RADIUS","SQUARE","WIDTH","colorWrapper","wheel","overlay","hMarker","slMarker","_unpack","_pack","_setColor","unpack","hsl","_RGBToHSL","_updateDisplay","_setHSL","_HSLToRGB","m1","m2","_hueToRGB","angle","_absolutePosition","_widgetCoords","mouseX","mouseY","_doMouseMove","circleDrag","hue","atan2","sat","lum","TRIANGLE_LENGTH","_getAdjustLength","_showTriangle","_hideTriangle","_createTriangle","triangle","_createLeftTriangle","_createRightTriangle","_createTopTriangle","_createBottomTriangle","BubblePopupView","buttonOpt","TextBubblePopupBarView","EditorIconCheckCombo","baseClass","EditorTrigger","TextValueCheckComboPopup","editorIconCheckCombo","IconCombo","IconComboPopup","iconCombo","IconComboTrigger","isShowDown","_digest","IconTextValueCombo","IconTextValueComboPopup","textIconCombo","SearchTextValueCombo","SearchTextValueTrigger","getSearcher","TextValueComboPopup","stopEditing","triggerBtn","SearchTextValueComboPopup","defaultText","_setState","setState","vals","formatItems","TextValueCheckCombo","textIconCheckCombo","TextValueCombo","setTipType","SmallTextValueCombo","ClearEditor","EVENT_CLEAR","_checkClear","ShelterEditor","EVENT_CLICK_LABEL","_showHint","_checkText","_showInput","setTextStyle","getState","SignEditor","StateEditor","stateValue","_setText","SimpleStateEditor","mouseOut","MultiPopupView","buttongroup","ListPane","calback","Panel","titleButtons","_createTitle","LinearSegmentButton","LinearSegment","buttonGroup","SelectList","allSelected","setAllSelected","_checkAllSelected","selectLength","notSelectLength","isAlreadyAllSelected","isHalf","setHalfSelected","setToolBarVisible","isAllSelected","assist","LazyLoader","PAGE","loader","_getNextItems","lastNum","lastItems","nextItems","ListLoader","SortList","sortable","containment","connectWith","cursor","tolerance","$currentItem","holder","ui","over","sorted","getSortedValues","attribute","LoadingPane","__loaded","AllCountPager","pagerDirection","pagerIconCls","_getPagerIconCls","pager","preCls","nextCls","allPages","alwaysShowPager","setPagerVisible","setVPage","setCount","DirectionPager","horizontal","vertical","_createVPager","_createHPager","vpager","vlabel","hpager","hlabel","getVPage","getHPage","setHPage","hasVNext","hasHNext","hasVPrev","hasHPrev","setHPagerVisible","setVPagerVisible","vShow","hShow","DetailPager","_lock","_debouce","SegmentButton","Segment","MultiSelectBar","isAllCheckedBySelectedValue","isHalfCheckedBySelectedValue","halfSelected","isSelect","isHalfSelect","_setSelected","isHalfSelected","isAllChecked","LevelTree","_assertId","DisplayTree","ListDisplayTree","getFont","SimpleTreeView","_getValue","triggerWidth","IconTrigger","iconButton","IconTextTrigger","textCls","trigerButton","iconItem","textItem","setTextCls","oldCls","SelectIconTextTrigger","_digist","TextTrigger","SelectTextTrigger","formatValue","SmallSelectTextTrigger","SmallTextTrigger","MonthDateCombo","YearPopup","YearDateCombo","DatePicker","_year","_month","_checkLeftValid","_checkRightValid","YearPicker","DateCalendarPopup","selectedTime","_createNav","calendar","_day","datePicker","_checkMin","_checkMax","timeOb","MonthPopup","_createYearCalendar","selectedYear","backBtn","preBtn","navigation","DateTriangleTrigger","StaticDatePaneCard","_getNewCurrentDate","_setCalenderValue","_setDatePicker","_setCalendar","DynamicDatePane","Static","Dynamic","dateTab","DynamicDateHelper","getCalculation","dynamicPane","_checkValueValid","DynamicDateCombo","DateTimeCombo","popupHeight","popupWidth","comboAdjustHeight","minute","DateTimePopup","BUTTON_CANCEL_EVENT_CHANGE","hidePopupView","BUTTON_OK_EVENT_CHANGE","cancelButton","okButton","dateCombo","CALENDAR_EVENT_CHANGE","dateButton","timeSelect","DateTimeTrigger","_printTime","dateStr","StaticDateTimePaneCard","DynamicDateTimeSelect","DynamicDateTimePane","DownListCombo","popupview","DownListPopup","downlistcombo","EVENT_SON_VALUE_CHANGE","fatherValue","DownListGroup","downlistgroup","DownListItem","DownListGroupItem","childValues","nextIcon","singleValues","childValueMap","fatherValueMap","_createChildren","changedValue","valueObject","item_done","childValue","father","_createChildValue","el_done","_isGroup","_needSpliter","spliter_container","itemLength","valueItem","valueArray","_checkValues","joinValue","itemGroup","popupItem","fartherValue","getCalculationByDate","quarter","workDay","holidays","DynamicDateCard","OFFSET","CURRENT","getBeginDate","BEGIN","checkgroup","TYPE","YEAR","QUARTER","MONTH","workDayBox","plainValue","resultPane","dateType","_getParamJson","WORK_DAY","positionValue","comboItems","_getText","_createValue","valuesItems","valueMap","selectValues","allowEdit","storeTriggerValue","DynamicDateTrigger","dateStore","dateObj","_checkDynamicValue","DynamicDatePopup","BUTTON_CLEAR_EVENT_CHANGE","BUTTON_lABEL_EVENT_CHANGE","comboWrapper","DynamicDateParamItem","offsetCombo","buttonHeight","_getTabJson","textButton","_setInnerValue","yearLength","yearMonthLength","yearFullMonthLength","compareFormat","formatStr","_getStandardDateStr","_autoAppend","_dateCheck","_checkVoid","_getTitle","_getFormatString","formatArray","dateArray","newArray","_yearCheck","splitMonth","_monthCheck","getPositionText","baseText","endText","EVENT_TRIGGER_CLICK","DynamicDateTimeCombo","DynamicDateTimeTrigger","DynamicDateTimePopup","_checkHour","_formatValueToDoubleDigit","_autoSwitch","_checkMinute","_checkSecond","_checkBorder","setDownEnable","setUpEnable","_assertValue","hasSecond","suffixArray","suffixString","dateString","SearchEditor","keywords","SmallSearchEditor","SmallTextEditor","IntervalSlider","EDITOR_WIDTH","EDITOR_R_GAP","EDITOR_HEIGHT","SLIDER_WIDTH_HALF","SLIDER_WIDTH","SLIDER_HEIGHT","TRACK_HEIGHT","digit","valueOne","valueTwo","calculation","AccurateCalculationModel","grayTrack","blueTrack","_createTrackWrapper","labelOne","_checkValidation","oldValueOne","_getPercentByValue","significantPercent","_setSliderOnePosition","_setBlueTrack","_checkLabelPosition","labelTwo","oldValueTwo","_setSliderTwoPosition","sliderOne","sliderTwo","_draggable","_createLabelWrapper","_createSliderWrapper","_rePosBySizeAfterMove","isLeft","_getGrayTrackLength","_getValueByPercent","_rePosBySizeAfterStop","optimizeSize","startDrag","defaultSize","mouseMoveTracker","dotText","_checkOverlap","labelOneLeft","labelTwoLeft","isSliderOneLeft","_resetLabelPosition","needReverse","_setBlueTrackLeft","_setBlueTrackWidth","percentOne","percentTwo","_setAllPosition","two","_setErrorText","accurateSubtraction","accurateMultiplication","accurateDivisionTenExponent","accurateAddition","reduceValue","_setDraggableEnable","_getPrecision","pre","toPrecision","eIndex","decimalPartLength","sciencePartLength","setMinAndMax","minNumber","maxNumber","NaN","_getMagnitude","_formatDecimal","stringNumber1","stringNumber2","numDecimalLength","magnitudeDiff","needAddZero","numDecimal","_stringNumberFactory","numStrArray","numInteger","_accurateSubtraction","getDecimalMaxLength","addZero","resultTemp","integerResult","decimalMaxLength","decimalResultTemp","decimalResult","borrow","_accurateAddition","_accurateMultiplication","dec1Int2","_accurateDivisionTenExponent","int1dec2","dec1dec2","stringNumber","partDecimalResult","MultiLayerDownListPopup","_createPopupItems","fatherArrayValue","fValue","getChildrenValue","MultiLayerSelectTreeCombo","allowSearchValue","allowInsertValue","_getSyncConfig","_getAsyncConfig","_getBaseConfig","MultiLayerSelectTreePopup","_getSearchConfig","valueFormatter","MultiLayerSelectTreeTrigger","EVENT_ADD_ITEM","baseConfig","MultiLayerSelectTreeInsertSearchPane","setKeyword","keywordGetter","MultiLayerSelectLevelTree","addNotMatchTip","showTip","_initData","_getSearchItems","_fillTreeStructure4Search","_getChildren","MultiLayerSelectTreeFirstPlusGroupNode","needBlankLayers","MultiLayerSelectTreeLastPlusGroupNode","MultiLayerSelectTreeMidPlusGroupNode","MultiLayerSelectTreePlusGroupNode","MultiLayerSingleTreeCombo","MultiLayerSingleTreePopup","MultiLayerSingleTreeTrigger","MultiLayerSingleTreeInsertSearchPane","MultiLayerSingleLevelTree","MultiLayerSingleTreeFirstPlusGroupNode","_createNode","MultiLayerSingleTreeLastPlusGroupNode","MultiLayerSingleTreeMidPlusGroupNode","MultiLayerSingleTreePlusGroupNode","MultiLayerSingleTreeFirstTreeLeafItem","MultiLayerSingleTreeLastTreeLeafItem","MultiLayerSingleTreeMidTreeLeafItem","MultiSelectCheckPane","onClickContinueSelect","txt","continueSelect","DisplaySelectedList","_createItems","MultiSelectCombo","assertShowValue","_startValue","numberCounter","setButtonChecked","requesting","_itemsCreator4Trigger","MultiSelectTrigger","_setStartValue","_joinKeywords","_joinAll","EVENT_CLICK_ITEM","EVENT_BEFORE_COUNTER_POPUPVIEW","updateSelectedValue","EVENT_COUNTER_CLICK","MultiSelectPopupView","_adjust","EVENT_CLICK_CONFIRM","EVENT_CLICK_CLEAR","wants2Quit","_stopEditing","MultiSelectCheckSelectedSwitcher","refreshPlaceHolderWidth","_makeMap","selectedMap","REQ_GET_ALL_DATA","notSelectedMap","adjust","setStartValue","populateSwitcher","REQ_GET_DATA_LENGTH","MultiSelectNoBarCombo","MultiSelectInsertCombo","MultiSelectInsertTrigger","_addItem","addedValue","MultiSelectInsertNoBarCombo","MultiSelectInsertSearcher","wrapNumberCounter","MultiSelectLoader","startValue","firstItems","_scrollToTop","MultiSelectNoBarLoader","MultiSelectNoBarPopupView","MultiSelectSearcher","MultiSelectSearchInsertPane","tooltipClick","hasSameValue","isMatchTipVisible","MultiSelectSearchLoader","_filterValues","newValues","MultiSelectSearchPane","MultiSelectCheckSelectedButton","MultiSelectEditor","checkPane","me","MultiSelectInsertList","searcherPane","_showAdapter","_showSearcherPane","MultiSelectInsertNoBarList","MultiSelectList","_count","MultiSelectTree","MultiSelectTreePopup","MultiTreeCheckPane","backToPopup","configs","EVENT_CONTINUE_CLICK","MultiTreeCombo","showCounter","isPopupView","isInit","want2showCounter","MultiTreePopup","MultiTreeInsertCombo","MultiTreeSearchInsertPane","_assertShowValue","MultiTreeListCombo","MultiTreeCheckSelectedButton","indicator","checkSelected","addTip","partTree","isAddTipVisible","MultiTreeSearchPane","MultiListTreeSearcher","MultiTreeSearcher","getChildrenNode","NumberEditor","topBtn","_finetuning","bottomBtn","NumberInterval","typeError","numberError","signalError","editorWidth","numberErrorCls","less","less_equal","numTip","validation","closeMin","smallEditor","smallEditorBubbleType","smallTip","bigEditor","bigEditorBubbleType","bigTip","smallCombo","bigCombo","closeMax","_setValidEvent","_setErrorEvent","_setBlurEvent","_setFocusEvent","_setComboValueChangedEvent","_setEditorValueChangedEvent","_setTitle","smallValue","bigValue","bigComboValue","smallComboValue","NumberIntervalSingleEidtor","isStateValid","setMinEnable","setCloseMinEnable","setMaxEnable","setCloseMaxEnable","showNumTip","hideNumTip","setNumTip","getNumTip","combo_value","minComboValue","maxComboValue","SearchMultiTextValueCombo","_updateAllValue","getCounter","allValueGetter","allValue","_itemsCreator","_getItemsByTimes","_hasNextByTimes","kw","SearchMultiSelectTrigger","SearchMultiSelectLoader","SearchMultiSelectPopupView","SearchMultiSelectSearcher","SelectTreeFirstPlusGroupNode","SelectTreeLastPlusGroupNode","SelectTreeMidPlusGroupNode","SelectTreePlusGroupNode","SelectTreeCombo","SingleTreePopup","SelectTreeExpander","SelectTreePopup","SingleSelectSearchLoader","allowNoSelect","SingleSelectList","SingleSelectSearchInsertPane","SingleSelectSearchPane","SingleSelectCombo","SingleSelectTrigger","SingleSelectPopupView","SingleSelectInsertCombo","SingleSelectComboItem","SingleSelectLoader","SingleSelectSearcher","SingleSelectInsertList","_allData","SingleSelectEditor","SignTextEditor","SliderIconButton","LARGE_SIZE","NORMAL_SIZE","LARGE_OFFSET","NORMAL_OFFSET","slider","SingleSlider","TRACK_GAP_HALF","TRACK_GAP","sliderVertical","trackLength","_setLabelPosition","_setSliderPosition","thousandth","SingleSliderLabel","HEIGHT","SingleSliderNormal","minMax","_createTrack","EVENT_DRAG","SingleTreeCombo","SingleTreeTrigger","_checkTitle","TextValueDownListCombo","_createValueMap","currentVal","DownListSelectTextTrigger","_formatItemArray","sourceArray","targetArray","TimePopup","BUTTON_NOW_EVENT_CHANGE","TimeCombo","_setNowTime","nowTome","TimeTrigger","COMPARE_FORMAT","COMPLETE_COMPARE_FORMAT","FORMAT_ARRAY","DEFAULT_DATE_STRING","DEFAULT_HOUR","_formatValue","_getCompleteHMS","DateInterval","timeErrorCls","_createCombo","_clearTitle","smallDate","bigDate","smallObj","bigObj","TimeInterval","TimePeriods","DynamicYearCard","StaticYearCard","DynamicYearCombo","DynamicYearTrigger","DynamicYearPopup","_titleCreator","DynamicYearMonthCard","StaticYearMonthCard","_createMonths","monthMap","yearPicker","_checkMonthStatus","selectedMonth","minYear","maxYear","minMonth","maxMonth","yearInvalid","monthInvalid","newObj","DynamicYearMonthCombo","DynamicYearMonthTrigger","DynamicYearMonthPopup","yearEditor","_createEditor","monthEditor","isYear","_doEditorConfirm","_getStaticTitle","monthValue","hasYear","hasMonth","YearMonthInterval","_checkValid","smallDate4Check","bigDate4Check","DynamicYearQuarterCard","StaticYearQuarterCard","_createQuarter","selectedQuarter","DynamicYearQuarterCombo","DynamicYearQuarterTrigger","DynamicYearQuarterPopup","quarterEditor","quarterValue","AbstractAllValueChooser","perPage","_valueFormatter","resultItems","AllValueChooserCombo","AllValueChooserPane","AllValueMultiTextValueCombo","_digestValue","numOfPage","AbstractTreeValueChooser","_reqInitTreeNode","_reqAdjustTreeNode","_reqSelectedTreeNode","_reqDisplayTreeNode","_reqTreeNode","doCheck","newParents","llen","_getChildCount","createOneJson","_getTreeNode","getCount","dealWithSelectedValues","canFindKey","isSearchValueInParent","_deleteNode","searched","_getNode","expandSelectedValue","isChild","strs","childrenCount","_isMatch","notSearch","can","nk","nv","nodeSearch","_getAddedValueNode","isAllSelect","isCurAllSelected","isOpen","findSelectedObj","judgeState","selected_value","dealWithSelectedValue","nextNames","getCheckState","tempCheck","childCount","allNodes","_getAllChildren","parentCheckState","valueFind","findParentNode","pValues","AbstractListTreeValueChooser","ListTreeValueChooserInsertCombo","TreeValueChooserInsertCombo","TreeValueChooserCombo","TreeValueChooserPane","pane","AbstractValueChooser","ValueChooserInsertCombo","ValueChooserCombo","ValueChooserPane","eventsApi","allEvents","triggerEvents","listenTo","listeningTo","_listeningTo","_listenId","listenToOnce","eventSplitter","stopListening","a1","a2","a3","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","_routeToRegExp","router","history","_extractParameters","navigate","optional","History","checkUrl","routeStripper","rootStripper","pathStripper","started","atRoot","pathname","getSearch","getHash","getPath","decodeURI","getFragment","_hasPushState","_wantsHashChange","hashChange","_hasHashChange","_wantsPushState","pushState","_checkUrlInterval","silent","loadUrl","unRoute","_updateHash","keyOrFn","pushTarget","_target","targetStack","popTarget","pushContext","_context","contextStack","popContext","findStore","__cacheStore","createStore","needPop","_store","_widget","oldWatch","_create","pushed","unMount","unwatches","unwatch","additionFunc","ajaxComplete","nKeys","installedModules","__webpack_require__","moduleId","modules","fineui","Decorators","Target"],"mappings":";;AAk7oCA,QAASA,iBAAgBC,SAAUC,aAAe,KAAMD,mBAAoBC,cAAgB,KAAM,IAAIC,WAAU,sCAl7oC/G,SAASC,GAAY,QAASC,GAAEC,GAAG,GAAGC,EAAED,GAAG,MAAOC,GAAED,GAAGE,OAAQ,IAAIC,GAAEF,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ACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO;AACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,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BAEAwS,GAAG2yB,OAAO3yB,GAAIslM,e,0bC6FC,CACXC,W,0aAhEJ,U,onBC3BO,WACH,OAAO,SAAsBC,GACzBxlM,GAAGgnC,SAASw+J,EAAOt+J,MAAOs+J,K,QAO3B,WACH,OAAO,SAAyGA,GAC5GxlM,GAAGu9E,MAAMioH,EAAOt+J,MAAOs+J,K,QASxB,SAAkBlqE,GAA2G,IAAlE3hC,EAAkE,0DAAJ,GAC5H,OAAO,SAA2D9nG,GAC9D,+FACI0yM,OAAA,WACI,IAAMn/L,EAAQu0F,EAAKv0F,MAAQu0F,EAAKv0F,MAAMlU,MAAMpD,MAAQY,UAEpD,OAAOsR,GAAGi/E,OAAOC,SAASo8C,EAAMp0F,MAAO9hC,IAJ/C,GAAqBvT,K,mBAahBypI,E,2VAMTp+H,MAAA,WACI,MAAO,I,GAPqG64H,IAAIuF,O","file":"fineui.ie.min.js","sourcesContent":["!function(e){var r={};function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e})},o.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&\"object\"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,\"default\",{enumerable:!0,value:n}),2&t&&\"string\"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t[\"default\"]}:function(){return t};return o.d(n,\"a\",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p=\"\",o(o.s=78)}([function(e,t,n){(function(t){var n=function(t){return t&&t.Math==Math&&t};e.exports=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||Function(\"return this\")()}).call(this,n(82))},function(t,n,e){var r=e(0),o=e(22),i=e(31),u=e(56),c=r.Symbol,f=o(\"wks\");t.exports=function(t){return f[t]||(f[t]=u&&c[t]||(u?c:i)(\"Symbol.\"+t))}},function(t,n,e){var s=e(0),l=e(28).f,p=e(8),d=e(11),v=e(41),h=e(85),y=e(45);t.exports=function(t,n){var e,r,o,i,u=t.target,c=t.global,f=t.stat,a=c?s:f?s[u]||v(u,{}):(s[u]||{}).prototype;if(a)for(e in n){if(o=n[e],r=t.noTargetGet?(i=l(a,e))&&i.value:a[e],!y(c?e:u+(f?\".\":\"#\")+e,t.forced)&&r!==undefined){if(typeof o==typeof r)continue;h(o,r)}(t.sham||r&&r.sham)&&p(o,\"sham\",!0),d(a,e,o,t)}}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t}},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t))throw TypeError(String(t)+\" is not an object\");return t}},function(t,n,e){var r=e(3);t.exports=!r(function(){return 7!=Object.defineProperty({},\"a\",{get:function(){return 7}}).a})},function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},function(t,n,e){var r=e(6),o=e(9),i=e(21);t.exports=r?function(t,n,e){return o.f(t,n,i(1,e))}:function(t,n,e){return t[n]=e,t}},function(t,n,e){var r=e(6),o=e(51),i=e(5),u=e(39),c=Object.defineProperty;n.f=r?c:function(t,n,e){if(i(t),n=u(n,!0),i(e),o)try{return c(t,n,e)}catch(r){}if(\"get\"in e||\"set\"in e)throw TypeError(\"Accessors not supported\");return\"value\"in e&&(t[n]=e.value),t}},function(t,n,e){t.exports=e(0)},function(t,n,e){var c=e(0),r=e(22),f=e(8),a=e(7),s=e(41),o=e(52),i=e(13),u=i.get,l=i.enforce,p=String(o).split(\"toString\");r(\"inspectSource\",function(t){return o.call(t)}),(t.exports=function(t,n,e,r){var o=!!r&&!!r.unsafe,i=!!r&&!!r.enumerable,u=!!r&&!!r.noTargetGet;\"function\"==typeof e&&(\"string\"!=typeof n||a(e,\"name\")||f(e,\"name\",n),l(e).source=p.join(\"string\"==typeof n?n:\"\")),t!==c?(o?!u&&t[n]&&(i=!0):delete t[n],i?t[n]=e:f(t,n,e)):i?t[n]=e:s(n,e)})(Function.prototype,\"toString\",function(){return\"function\"==typeof this&&u(this).source||o.call(this)})},function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(84),p=e(0),d=e(4),v=e(8),h=e(7),y=e(30),g=e(23),x=p.WeakMap;a=l?(r=new x,o=r.get,i=r.has,u=r.set,c=function(t,n){return u.call(r,t,n),n},f=function(t){return o.call(r,t)||{}},function(t){return i.call(r,t)}):(g[s=y(\"state\")]=!0,c=function(t,n){return v(t,s,n),n},f=function(t){return h(t,s)?t[s]:{}},function(t){return h(t,s)}),t.exports={set:c,get:f,has:a,enforce:function(t){return a(t)?f(t):c(t,{})},getterFor:function(e){return function(t){var n;if(!d(t)||(n=f(t)).type!==e)throw TypeError(\"Incompatible receiver, \"+e+\" required\");return n}}}},function(t,n){t.exports=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t}},function(t,n,e){var r=e(38),o=e(29);t.exports=function(t){return r(o(t))}},function(t,n){t.exports=!1},function(t,n,e){var r=e(10),o=e(0),i=function(t){return\"function\"==typeof t?t:undefined};t.exports=function(t,n){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},function(t,n,e){var r=e(5),o=e(91),i=e(43),u=e(23),c=e(55),f=e(40),a=e(30)(\"IE_PROTO\"),s=\"prototype\",l=function(){},p=function(){var t,n=f(\"iframe\"),e=i.length,r=\"script\";for(n.style.display=\"none\",c.appendChild(n),n.src=String(\"javascript:\"),(t=n.contentWindow.document).open(),t.write(\"<script>document.F=Object</\"+r+\">\"),t.close(),p=t.F;e--;)delete p[s][i[e]];return p()};t.exports=Object.create||function(t,n){var e;return null!==t?(l[s]=r(t),e=new l,l[s]=null,e[a]=t):e=p(),n===undefined?e:o(e,n)},u[a]=!0},function(t,n,e){var r=e(29);t.exports=function(t){return Object(r(t))}},function(t,n,e){var d=e(5),v=e(125),h=e(32),y=e(25),g=e(126),x=e(127),m=function(t,n){this.stopped=t,this.result=n};(t.exports=function(t,n,e,r,o){var i,u,c,f,a,s,l,p=y(n,e,r?2:1);if(o)i=t;else{if(\"function\"!=typeof(u=g(t)))throw TypeError(\"Target is not iterable\");if(v(u)){for(c=0,f=h(t.length);c<f;c++)if((a=r?p(d(l=t[c])[0],l[1]):p(t[c]))&&a instanceof m)return a;return new m(!1)}i=u.call(t)}for(s=i.next;!(l=s.call(i)).done;)if(\"object\"==typeof(a=x(i,p,l.value,r))&&a&&a instanceof m)return a;return new m(!1)}).stop=function(t){return new m(!0,t)}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,e){var r=e(16),o=e(83);(t.exports=function(t,n){return o[t]||(o[t]=n!==undefined?n:{})})(\"versions\",[]).push({version:\"3.3.2\",mode:r?\"pure\":\"global\",copyright:\"© 2019 Denis Pushkarev (zloirock.ru)\"})},function(t,n){t.exports={}},function(t,n,e){var r=e(9).f,o=e(7),i=e(1)(\"toStringTag\");t.exports=function(t,n,e){t&&!o(t=e?t:t.prototype,i)&&r(t,i,{configurable:!0,value:n})}},function(t,n,e){var i=e(14);t.exports=function(r,o,t){if(i(r),o===undefined)return r;switch(t){case 0:return function(){return r.call(o)};case 1:return function(t){return r.call(o,t)};case 2:return function(t,n){return r.call(o,t,n)};case 3:return function(t,n,e){return r.call(o,t,n,e)}}return function(){return r.apply(o,arguments)}}},function(t,n){t.exports={}},function(t,n,e){\"use strict\";var o=e(14),r=function(t){var e,r;this.promise=new t(function(t,n){if(e!==undefined||r!==undefined)throw TypeError(\"Bad Promise constructor\");e=t,r=n}),this.resolve=o(e),this.reject=o(r)};t.exports.f=function(t){return new r(t)}},function(t,n,e){var r=e(6),o=e(37),i=e(21),u=e(15),c=e(39),f=e(7),a=e(51),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=u(t),n=c(n,!0),a)try{return s(t,n)}catch(e){}if(f(t,n))return i(!o.f.call(t,n),t[n])}},function(t,n){t.exports=function(t){if(t==undefined)throw TypeError(\"Can't call method on \"+t);return t}},function(t,n,e){var r=e(22),o=e(31),i=r(\"keys\");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,n){var e=0,r=Math.random();t.exports=function(t){return\"Symbol(\"+String(t===undefined?\"\":t)+\")_\"+(++e+r).toString(36)}},function(t,n,e){var r=e(33),o=Math.min;t.exports=function(t){return 0<t?o(r(t),9007199254740991):0}},function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(0<t?r:e)(t)}},function(t,n,e){var r=e(7),o=e(19),i=e(30),u=e(60),c=i(\"IE_PROTO\"),f=Object.prototype;t.exports=u?Object.getPrototypeOf:function(t){return t=o(t),r(t,c)?t[c]:\"function\"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?f:null}},function(t,n,e){var r=e(0),o=e(25),i=Function.call;t.exports=function(t,n,e){return o(i,r[t].prototype[n],e)}},function(t,n){t.exports=function(t){try{return{error:!1,value:t()}}catch(n){return{error:!0,value:n}}}},function(t,n,e){\"use strict\";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);n.f=i?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},function(t,n,e){var r=e(3),o=e(12),i=\"\".split;t.exports=r(function(){return!Object(\"z\").propertyIsEnumerable(0)})?function(t){return\"String\"==o(t)?i.call(t,\"\"):Object(t)}:Object},function(t,n,e){var o=e(4);t.exports=function(t,n){if(!o(t))return t;var e,r;if(n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;if(\"function\"==typeof(e=t.valueOf)&&!o(r=e.call(t)))return r;if(!n&&\"function\"==typeof(e=t.toString)&&!o(r=e.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")}},function(t,n,e){var r=e(0),o=e(4),i=r.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,n,e){var r=e(0),o=e(8);t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},function(t,n,e){var r=e(53),o=e(43).concat(\"length\",\"prototype\");n.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,n){t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},function(t,n){n.f=Object.getOwnPropertySymbols},function(t,n,e){var r=e(3),o=/#|\\.prototype\\./,i=function(t,n){var e=c[u(t)];return e==a||e!=f&&(\"function\"==typeof n?r(n):!!n)},u=i.normalize=function(t){return String(t).replace(o,\".\").toLowerCase()},c=i.data={},f=i.NATIVE=\"N\",a=i.POLYFILL=\"P\";t.exports=i},function(t,n,e){var r=e(53),o=e(43);t.exports=Object.keys||function(t){return r(t,o)}},function(t,n,e){\"use strict\";var g=e(2),x=e(119),m=e(34),b=e(48),O=e(24),S=e(8),j=e(11),r=e(1),w=e(16),E=e(26),o=e(66),P=o.IteratorPrototype,A=o.BUGGY_SAFARI_ITERATORS,T=r(\"iterator\"),k=\"values\",I=\"entries\",M=function(){return this};t.exports=function(t,n,e,r,o,i,u){x(e,n,r);var c,f,a,s=function(t){if(t===o&&h)return h;if(!A&&t in d)return d[t];switch(t){case\"keys\":case k:case I:return function(){return new e(this,t)}}return function(){return new e(this)}},l=n+\" Iterator\",p=!1,d=t.prototype,v=d[T]||d[\"@@iterator\"]||o&&d[o],h=!A&&v||s(o),y=\"Array\"==n&&d.entries||v;if(y&&(c=m(y.call(new t)),P!==Object.prototype&&c.next&&(w||m(c)===P||(b?b(c,P):\"function\"!=typeof c[T]&&S(c,T,M)),O(c,l,!0,!0),w&&(E[l]=M))),o==k&&v&&v.name!==k&&(p=!0,h=function(){return v.call(this)}),w&&!u||d[T]===h||S(d,T,h),E[n]=h,o)if(f={values:s(k),keys:i?h:s(\"keys\"),entries:s(I)},u)for(a in f)!A&&!p&&a in d||j(d,a,f[a]);else g({target:n,proto:!0,forced:A||p},f);return f}},function(t,n,e){var o=e(5),i=e(120);t.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,r=!1,t={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\").set).call(t,[]),r=t instanceof Array}catch(n){}return function(t,n){return o(t),i(n),r?e.call(t,n):t.__proto__=n,t}}():undefined)},function(t,n){t.exports=function(t,n,e){if(!(t instanceof n))throw TypeError(\"Incorrect \"+(e?e+\" \":\"\")+\"invocation\");return t}},function(t,n,e){var r=e(17);t.exports=r(\"navigator\",\"userAgent\")||\"\"},function(t,n,e){var r=e(6),o=e(3),i=e(40);t.exports=!r&&!o(function(){return 7!=Object.defineProperty(i(\"div\"),\"a\",{get:function(){return 7}}).a})},function(t,n,e){var r=e(22);t.exports=r(\"native-function-to-string\",Function.toString)},function(t,n,e){var u=e(7),c=e(15),f=e(54).indexOf,a=e(23);t.exports=function(t,n){var e,r=c(t),o=0,i=[];for(e in r)!u(a,e)&&u(r,e)&&i.push(e);for(;n.length>o;)u(r,e=n[o++])&&(~f(i,e)||i.push(e));return i}},function(t,n,e){var f=e(15),a=e(32),s=e(87),r=function(c){return function(t,n,e){var r,o=f(t),i=a(o.length),u=s(e,i);if(c&&n!=n){for(;u<i;)if((r=o[u++])!=r)return!0}else for(;u<i;u++)if((c||u in o)&&o[u]===n)return c||u||0;return!c&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}},function(t,n,e){var r=e(17);t.exports=r(\"document\",\"documentElement\")},function(t,n,e){var r=e(3);t.exports=!!Object.getOwnPropertySymbols&&!r(function(){return!String(Symbol())})},function(t,n,e){var r=e(12);t.exports=Array.isArray||function(t){return\"Array\"==r(t)}},function(t,n,e){n.f=e(1)},function(t,n,e){var b=e(25),O=e(38),S=e(19),j=e(32),w=e(101),E=[].push,r=function(d){var v=1==d,h=2==d,y=3==d,g=4==d,x=6==d,m=5==d||x;return function(t,n,e,r){for(var o,i,u=S(t),c=O(u),f=b(n,e,3),a=j(c.length),s=0,l=r||w,p=v?l(t,a):h?l(t,0):undefined;s<a;s++)if((m||s in c)&&(i=f(o=c[s],s,u),d))if(v)p[s]=i;else if(i)switch(d){case 3:return!0;case 5:return o;case 6:return s;case 2:E.call(p,o)}else if(g)return!1;return x?-1:y||g?g:p}};t.exports={forEach:r(0),map:r(1),filter:r(2),some:r(3),every:r(4),find:r(5),findIndex:r(6)}},function(t,n,e){var r=e(3);t.exports=!r(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},function(t,n,e){\"use strict\";var r=e(3);t.exports=function(t,n){var e=[][t];return!e||!r(function(){e.call(null,n||function(){throw 1},1)})}},function(t,n,e){var r=e(11),o=e(118),i=Object.prototype;o!==i.toString&&r(i,\"toString\",o,{unsafe:!0})},function(t,n,e){var o=e(12),i=e(1)(\"toStringTag\"),u=\"Arguments\"==o(function(){return arguments}());t.exports=function(t){var n,e,r;return t===undefined?\"Undefined\":null===t?\"Null\":\"string\"==typeof(e=function(t,n){try{return t[n]}catch(e){}}(n=Object(t),i))?e:u?o(n):\"Object\"==(r=o(n))&&\"function\"==typeof n.callee?\"Arguments\":r}},function(t,n,e){\"use strict\";var o=e(65).charAt,r=e(13),i=e(47),u=\"String Iterator\",c=r.set,f=r.getterFor(u);i(String,\"String\",function(t){c(this,{type:u,string:String(t),index:0})},function(){var t,n=f(this),e=n.string,r=n.index;return r>=e.length?{value:undefined,done:!0}:(t=o(e,r),n.index+=t.length,{value:t,done:!1})})},function(t,n,e){var f=e(33),a=e(29),r=function(c){return function(t,n){var e,r,o=String(a(t)),i=f(n),u=o.length;return i<0||u<=i?c?\"\":undefined:(e=o.charCodeAt(i))<55296||56319<e||i+1===u||(r=o.charCodeAt(i+1))<56320||57343<r?c?o.charAt(i):e:c?o.slice(i,i+2):r-56320+(e-55296<<10)+65536}};t.exports={codeAt:r(!1),charAt:r(!0)}},function(t,n,e){\"use strict\";var r,o,i,u=e(34),c=e(8),f=e(7),a=e(1),s=e(16),l=a(\"iterator\"),p=!1;[].keys&&(\"next\"in(i=[].keys())?(o=u(u(i)))!==Object.prototype&&(r=o):p=!0),r==undefined&&(r={}),s||f(r,l)||c(r,l,function(){return this}),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:p}},function(t,n,e){var r=e(0),o=e(121),i=e(122),u=e(8),c=e(1),f=c(\"iterator\"),a=c(\"toStringTag\"),s=i.values;for(var l in o){var p=r[l],d=p&&p.prototype;if(d){if(d[f]!==s)try{u(d,f,s)}catch(h){d[f]=s}if(d[a]||u(d,a,l),o[l])for(var v in i)if(d[v]!==i[v])try{u(d,v,i[v])}catch(h){d[v]=i[v]}}}},function(t,n,e){var r=e(0);t.exports=r.Promise},function(t,n,e){var o=e(11);t.exports=function(t,n,e){for(var r in n)o(t,r,n[r],e);return t}},function(t,n,e){\"use strict\";var r=e(17),o=e(9),i=e(1),u=e(6),c=i(\"species\");t.exports=function(t){var n=r(t),e=o.f;u&&n&&!n[c]&&e(n,c,{configurable:!0,get:function(){return this}})}},function(t,n,e){var o=e(1)(\"iterator\"),i=!1;try{var r=0,u={next:function(){return{done:!!r++}},\"return\":function(){i=!0}};u[o]=function(){return this},Array.from(u,function(){throw 2})}catch(c){}t.exports=function(t,n){if(!n&&!i)return!1;var e=!1;try{var r={};r[o]=function(){return{next:function(){return{done:e=!0}}}},t(r)}catch(c){}return e}},function(t,n,e){var o=e(5),i=e(14),u=e(1)(\"species\");t.exports=function(t,n){var e,r=o(t).constructor;return r===undefined||(e=o(r)[u])==undefined?n:i(e)}},function(t,n,e){var r,o,i,u=e(0),c=e(3),f=e(12),a=e(25),s=e(55),l=e(40),p=e(50),d=u.location,v=u.setImmediate,h=u.clearImmediate,y=u.process,g=u.MessageChannel,x=u.Dispatch,m=0,b={},O=\"onreadystatechange\",S=function(t){var n;b.hasOwnProperty(t)&&(n=b[t],delete b[t],n())},j=function(t){return function(){S(t)}},w=function(t){S(t.data)},E=function(t){u.postMessage(t+\"\",d.protocol+\"//\"+d.host)};v&&h||(v=function(t){for(var n=[],e=1;e<arguments.length;)n.push(arguments[e++]);return b[++m]=function(){(\"function\"==typeof t?t:Function(t)).apply(undefined,n)},r(m),m},h=function(t){delete b[t]},\"process\"==f(y)?r=function(t){y.nextTick(j(t))}:x&&x.now?r=function(t){x.now(j(t))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(p)?(i=(o=new g).port2,o.port1.onmessage=w,r=a(i.postMessage,i,1)):!u.addEventListener||\"function\"!=typeof postMessage||u.importScripts||c(E)?r=O in l(\"script\")?function(t){s.appendChild(l(\"script\"))[O]=function(){s.removeChild(this),S(t)}}:function(t){setTimeout(j(t),0)}:(r=E,u.addEventListener(\"message\",w,!1))),t.exports={set:v,clear:h}},function(t,n,e){var r=e(5),o=e(4),i=e(27);t.exports=function(t,n){if(r(t),o(n)&&n.constructor===t)return n;var e=i.f(t);return(0,e.resolve)(n),e.promise}},function(t,n,e){\"use strict\";var r=e(2),a=e(14),o=e(27),i=e(36),s=e(20);r({target:\"Promise\",stat:!0},{allSettled:function(t){var c=this,n=o.f(c),f=n.resolve,e=n.reject,r=i(function(){var r=a(c.resolve),o=[],i=0,u=1;s(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]={status:\"fulfilled\",value:t},--u||f(o))},function(t){e||(e=!0,o[n]={status:\"rejected\",reason:t},--u||f(o))})}),--u||f(o)});return r.error&&e(r.value),n.promise}})},function(t,n,e){\"use strict\";var r,o,u=e(139),c=RegExp.prototype.exec,f=String.prototype.replace,i=c,a=(r=/a/,o=/b*/g,c.call(r,\"a\"),c.call(o,\"a\"),0!==r.lastIndex||0!==o.lastIndex),s=/()??/.exec(\"\")[1]!==undefined;(a||s)&&(i=function(t){var n,e,r,o,i=this;return s&&(e=new RegExp(\"^\"+i.source+\"$(?!\\\\s)\",u.call(i))),a&&(n=i.lastIndex),r=c.call(i,t),a&&r&&(i.lastIndex=i.global?r.index+r[0].length:n),s&&r&&1<r.length&&f.call(r[0],e,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===undefined&&(r[o]=undefined)}),r}),t.exports=i},function(t,n,e){var r=e(23),o=e(4),i=e(7),u=e(9).f,c=e(31),f=e(145),a=c(\"meta\"),s=0,l=Object.isExtensible||function(){return!0},p=function(t){u(t,a,{value:{objectID:\"O\"+ ++s,weakData:{}}})},d=t.exports={REQUIRED:!1,fastKey:function(t,n){if(!o(t))return\"symbol\"==typeof t?t:(\"string\"==typeof t?\"S\":\"P\")+t;if(!i(t,a)){if(!l(t))return\"F\";if(!n)return\"E\";p(t)}return t[a].objectID},getWeakData:function(t,n){if(!i(t,a)){if(!l(t))return!0;if(!n)return!1;p(t)}return t[a].weakData},onFreeze:function(t){return f&&d.REQUIRED&&l(t)&&!i(t,a)&&p(t),t}};r[a]=!0},function(t,n,e){e(79),e(88),e(92),e(96),e(102),e(105),e(109),e(112),e(116),e(135),t.exports=e(142)},function(t,n,e){t.exports=e(80)},function(t,n,e){e(81);var r=e(10).Object,o=t.exports=function o(t,n,e){return r.defineProperty(t,n,e)};r.defineProperty.sham&&(o.sham=!0)},function(t,n,e){var r=e(2),o=e(6);r({target:\"Object\",stat:!0,forced:!o,sham:!o},{defineProperty:e(9).f})},function(t,n,e){\"use strict\";function r(t){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}var o=function(){return this}();try{o=o||new Function(\"return this\")()}catch(i){\"object\"===(\"undefined\"==typeof window?\"undefined\":r(window))&&(o=window)}t.exports=o},function(t,n,e){var r=e(0),o=e(41),i=\"__core-js_shared__\",u=r[i]||o(i,{});t.exports=u},function(t,n,e){var r=e(0),o=e(52),i=r.WeakMap;t.exports=\"function\"==typeof i&&/native code/.test(o.call(i))},function(t,n,e){var c=e(7),f=e(86),a=e(28),s=e(9);t.exports=function(t,n){for(var e=f(n),r=s.f,o=a.f,i=0;i<e.length;i++){var u=e[i];c(t,u)||r(t,u,o(n,u))}}},function(t,n,e){var r=e(17),o=e(42),i=e(44),u=e(5);t.exports=r(\"Reflect\",\"ownKeys\")||function(t){var n=o.f(u(t)),e=i.f;return e?n.concat(e(t)):n}},function(t,n,e){var r=e(33),o=Math.max,i=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):i(e,n)}},function(t,n,e){t.exports=e(89)},function(t,n,e){e(90);var r=e(10).Object;t.exports=function(t,n){return r.create(t,n)}},function(t,n,e){e(2)({target:\"Object\",stat:!0,sham:!e(6)},{create:e(18)})},function(t,n,e){var r=e(6),u=e(9),c=e(5),f=e(46);t.exports=r?Object.defineProperties:function(t,n){c(t);for(var e,r=f(n),o=r.length,i=0;i<o;)u.f(t,e=r[i++],n[e]);return t}},function(t,n,e){t.exports=e(93)},function(t,n,e){e(94);var r=e(10);t.exports=r.Object.assign},function(t,n,e){var r=e(2),o=e(95);r({target:\"Object\",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,n,e){\"use strict\";var p=e(6),r=e(3),d=e(46),v=e(44),h=e(37),y=e(19),g=e(38),o=Object.assign;t.exports=!o||r(function(){var t={},n={},e=Symbol(),r=\"abcdefghijklmnopqrst\";return t[e]=7,r.split(\"\").forEach(function(t){n[t]=t}),7!=o({},t)[e]||d(o({},n)).join(\"\")!=r})?function(t,n){for(var e=y(t),r=arguments.length,o=1,i=v.f,u=h.f;o<r;)for(var c,f=g(arguments[o++]),a=i?d(f).concat(i(f)):d(f),s=a.length,l=0;l<s;)c=a[l++],p&&!u.call(f,c)||(e[c]=f[c]);return e}:o},function(t,n,e){t.exports=e(97)},function(t,n,e){e(98);var r=e(10);t.exports=r.Object.getOwnPropertySymbols},function(t,n,e){\"use strict\";var r=e(2),o=e(0),i=e(16),u=e(6),c=e(56),f=e(3),a=e(7),s=e(57),l=e(4),p=e(5),d=e(19),v=e(15),h=e(39),y=e(21),g=e(18),x=e(46),m=e(42),b=e(99),O=e(44),S=e(28),j=e(9),w=e(37),E=e(8),P=e(11),A=e(22),T=e(30),k=e(23),I=e(31),M=e(1),L=e(58),_=e(100),F=e(24),R=e(13),C=e(59).forEach,D=T(\"hidden\"),N=\"Symbol\",z=\"prototype\",G=M(\"toPrimitive\"),V=R.set,$=R.getterFor(N),U=Object[z],W=o.Symbol,H=o.JSON,q=H&&H.stringify,B=S.f,K=j.f,Q=b.f,Y=w.f,J=A(\"symbols\"),X=A(\"op-symbols\"),Z=A(\"string-to-symbol-registry\"),tt=A(\"symbol-to-string-registry\"),nt=A(\"wks\"),et=o.QObject,rt=!et||!et[z]||!et[z].findChild,ot=u&&f(function(){return 7!=g(K({},\"a\",{get:function(){return K(this,\"a\",{value:7}).a}})).a})?function(t,n,e){var r=B(U,n);r&&delete U[n],K(t,n,e),r&&t!==U&&K(U,n,r)}:K,it=function(t,n){var e=J[t]=g(W[z]);return V(e,{type:N,tag:t,description:n}),u||(e.description=n),e},ut=c&&\"symbol\"==typeof W.iterator?function(t){return\"symbol\"==typeof t}:function(t){return Object(t)instanceof W},ct=function(t,n,e){t===U&&ct(X,n,e),p(t);var r=h(n,!0);return p(e),a(J,r)?(e.enumerable?(a(t,D)&&t[D][r]&&(t[D][r]=!1),e=g(e,{enumerable:y(0,!1)})):(a(t,D)||K(t,D,y(1,{})),t[D][r]=!0),ot(t,r,e)):K(t,r,e)},ft=function(n,t){p(n);var e=v(t),r=x(e).concat(pt(e));return C(r,function(t){u&&!at.call(e,t)||ct(n,t,e[t])}),n},at=function(t){var n=h(t,!0),e=Y.call(this,n);return!(this===U&&a(J,n)&&!a(X,n))&&(!(e||!a(this,n)||!a(J,n)||a(this,D)&&this[D][n])||e)},st=function(t,n){var e=v(t),r=h(n,!0);if(e!==U||!a(J,r)||a(X,r)){var o=B(e,r);return!o||!a(J,r)||a(e,D)&&e[D][r]||(o.enumerable=!0),o}},lt=function(t){var n=Q(v(t)),e=[];return C(n,function(t){a(J,t)||a(k,t)||e.push(t)}),e},pt=function(t){var n=t===U,e=Q(n?X:v(t)),r=[];return C(e,function(t){!a(J,t)||n&&!a(U,t)||r.push(J[t])}),r};c||(P((W=function(){if(this instanceof W)throw TypeError(\"Symbol is not a constructor\");var t=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,n=I(t),e=function(t){this===U&&e.call(X,t),a(this,D)&&a(this[D],n)&&(this[D][n]=!1),ot(this,n,y(1,t))};return u&&rt&&ot(U,n,{configurable:!0,set:e}),it(n,t)})[z],\"toString\",function(){return $(this).tag}),w.f=at,j.f=ct,S.f=st,m.f=b.f=lt,O.f=pt,u&&(K(W[z],\"description\",{configurable:!0,get:function(){return $(this).description}}),i||P(U,\"propertyIsEnumerable\",at,{unsafe:!0})),L.f=function(t){return it(M(t),t)}),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),C(x(nt),function(t){_(t)}),r({target:N,stat:!0,forced:!c},{\"for\":function(t){var n=String(t);if(a(Z,n))return Z[n];var e=W(n);return Z[n]=e,tt[e]=n,e},keyFor:function(t){if(!ut(t))throw TypeError(t+\" is not a symbol\");if(a(tt,t))return tt[t]},useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),r({target:\"Object\",stat:!0,forced:!c,sham:!u},{create:function(t,n){return n===undefined?g(t):ft(g(t),n)},defineProperty:ct,defineProperties:ft,getOwnPropertyDescriptor:st}),r({target:\"Object\",stat:!0,forced:!c},{getOwnPropertyNames:lt,getOwnPropertySymbols:pt}),r({target:\"Object\",stat:!0,forced:f(function(){O.f(1)})},{getOwnPropertySymbols:function(t){return O.f(d(t))}}),H&&r({target:\"JSON\",stat:!0,forced:!c||f(function(){var t=W();return\"[null]\"!=q([t])||\"{}\"!=q({a:t})||\"{}\"!=q(Object(t))})},{stringify:function(t){for(var n,e,r=[t],o=1;o<arguments.length;)r.push(arguments[o++]);if(e=n=r[1],(l(n)||t!==undefined)&&!ut(t))return s(n)||(n=function(t,n){if(\"function\"==typeof e&&(n=e.call(this,t,n)),!ut(n))return n}),r[1]=n,q.apply(H,r)}}),W[z][G]||E(W[z],G,W[z].valueOf),F(W,N),k[D]=!0},function(t,n,e){var r=e(15),o=e(42).f,i={}.toString,u=\"object\"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return u&&\"[object Window]\"==i.call(t)?function(t){try{return o(t)}catch(n){return u.slice()}}(t):o(r(t))}},function(t,n,e){var r=e(10),o=e(7),i=e(58),u=e(9).f;t.exports=function(t){var n=r.Symbol||(r.Symbol={});o(n,t)||u(n,t,{value:i.f(t)})}},function(t,n,e){var r=e(4),o=e(57),i=e(1)(\"species\");t.exports=function(t,n){var e;return o(t)&&(\"function\"==typeof(e=t.constructor)&&(e===Array||o(e.prototype))||r(e)&&null===(e=e[i]))&&(e=undefined),new(e===undefined?Array:e)(0===n?0:n)}},function(t,n,e){t.exports=e(103)},function(t,n,e){e(104);var r=e(10);t.exports=r.Object.getPrototypeOf},function(t,n,e){var r=e(2),o=e(3),i=e(19),u=e(34),c=e(60);r({target:\"Object\",stat:!0,forced:o(function(){u(1)}),sham:!c},{getPrototypeOf:function(t){return u(i(t))}})},function(t,n,e){t.exports=e(106)},function(t,n,e){e(107);var r=e(35);t.exports=r(\"Array\",\"forEach\")},function(t,n,e){\"use strict\";var r=e(2),o=e(108);r({target:\"Array\",proto:!0,forced:[].forEach!=o},{forEach:o})},function(t,n,e){\"use strict\";var r=e(59).forEach,o=e(61);t.exports=o(\"forEach\")?function(t){return r(this,t,1<arguments.length?arguments[1]:undefined)}:[].forEach},function(t,n,e){t.exports=e(110)},function(t,n,e){e(111);var r=e(35);t.exports=r(\"Array\",\"indexOf\")},function(t,n,e){\"use strict\";var r=e(2),o=e(54).indexOf,i=e(61),u=[].indexOf,c=!!u&&1/[1].indexOf(1,-0)<0,f=i(\"indexOf\");r({target:\"Array\",proto:!0,forced:c||f},{indexOf:function(t){return c?u.apply(this,arguments)||0:o(this,t,1<arguments.length?arguments[1]:undefined)}})},function(t,n,e){t.exports=e(113)},function(t,n,e){e(114);var r=e(35);t.exports=r(\"Function\",\"bind\")},function(t,n,e){e(2)({target:\"Function\",proto:!0},{bind:e(115)})},function(t,n,e){\"use strict\";var i=e(14),u=e(4),c=[].slice,f={};t.exports=Function.bind||function(n){var e=i(this),r=c.call(arguments,1),o=function(){var t=r.concat(c.call(arguments));return this instanceof o?function(t,n,e){if(!(n in f)){for(var r=[],o=0;o<n;o++)r[o]=\"a[\"+o+\"]\";f[n]=Function(\"C,a\",\"return new C(\"+r.join(\",\")+\")\")}return f[n](t,e)}(e,t.length,t):e.apply(n,t)};return u(e.prototype)&&(o.prototype=e.prototype),o}},function(t,n,e){t.exports=e(117),e(131),e(132),e(133),e(134)},function(t,n,e){e(62),e(64),e(67),e(124),e(75),e(130);var r=e(10);t.exports=r.Promise},function(t,n,e){\"use strict\";var r=e(63),o={};o[e(1)(\"toStringTag\")]=\"z\",t.exports=\"[object z]\"!==String(o)?function(){return\"[object \"+r(this)+\"]\"}:o.toString},function(t,n,e){\"use strict\";var o=e(66).IteratorPrototype,i=e(18),u=e(21),c=e(24),f=e(26),a=function(){return this};t.exports=function(t,n,e){var r=n+\" Iterator\";return t.prototype=i(o,{next:u(1,e)}),c(t,r,!1,!0),f[r]=a,t}},function(t,n,e){var r=e(4);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError(\"Can't set \"+String(t)+\" as a prototype\");return t}},function(t,n){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(t,n,e){\"use strict\";var r=e(15),o=e(123),i=e(26),u=e(13),c=e(47),f=\"Array Iterator\",a=u.set,s=u.getterFor(f);t.exports=c(Array,\"Array\",function(t,n){a(this,{type:f,target:r(t),index:0,kind:n})},function(){var t=s(this),n=t.target,e=t.kind,r=t.index++;return!n||r>=n.length?(t.target=undefined,{value:undefined,done:!0}):\"keys\"==e?{value:r,done:!1}:\"values\"==e?{value:n[r],done:!1}:{value:[r,n[r]],done:!1}},\"values\"),i.Arguments=i.Array,o(\"keys\"),o(\"values\"),o(\"entries\")},function(t,n,e){var r=e(1),o=e(18),i=e(8),u=r(\"unscopables\"),c=Array.prototype;c[u]==undefined&&i(c,u,o(null)),t.exports=function(t){c[u][t]=!0}},function(t,n,e){\"use strict\";var r,o,i,u,c=e(2),f=e(16),a=e(0),s=e(10),l=e(68),p=e(11),d=e(69),v=e(24),h=e(70),y=e(4),g=e(14),x=e(49),m=e(12),b=e(20),O=e(71),S=e(72),j=e(73).set,w=e(128),E=e(74),P=e(129),A=e(27),T=e(36),k=e(50),I=e(13),M=e(45),L=e(1)(\"species\"),_=\"Promise\",F=I.get,R=I.set,C=I.getterFor(_),D=l,N=a.TypeError,z=a.document,G=a.process,V=a.fetch,$=G&&G.versions,U=$&&$.v8||\"\",W=A.f,H=W,q=\"process\"==m(G),B=!!(z&&z.createEvent&&a.dispatchEvent),K=\"unhandledrejection\",Q=M(_,function(){var t=D.resolve(1),n=function(){},e=(t.constructor={})[L]=function(t){t(n,n)};return!((q||\"function\"==typeof PromiseRejectionEvent)&&(!f||t[\"finally\"])&&t.then(n)instanceof e&&0!==U.indexOf(\"6.6\")&&-1===k.indexOf(\"Chrome/66\"))}),Y=Q||!O(function(t){D.all(t)[\"catch\"](function(){})}),J=function(t){var n;return!(!y(t)||\"function\"!=typeof(n=t.then))&&n},X=function(p,d,v){var h;d.notified||(d.notified=!0,h=d.reactions,w(function(){for(var t=d.value,n=1==d.state,e=0;h.length>e;){var r,o,i,u=h[e++],c=n?u.ok:u.fail,f=u.resolve,a=u.reject,s=u.domain;try{c?(n||(2===d.rejection&&et(p,d),d.rejection=1),!0===c?r=t:(s&&s.enter(),r=c(t),s&&(s.exit(),i=!0)),r===u.promise?a(N(\"Promise-chain cycle\")):(o=J(r))?o.call(r,f,a):f(r)):a(t)}catch(l){s&&!i&&s.exit(),a(l)}}d.reactions=[],d.notified=!1,v&&!d.rejection&&tt(p,d)}))},Z=function(t,n,e){var r,o;B?((r=z.createEvent(\"Event\")).promise=n,r.reason=e,r.initEvent(t,!1,!0),a.dispatchEvent(r)):r={promise:n,reason:e},(o=a[\"on\"+t])?o(r):t===K&&P(\"Unhandled promise rejection\",e)},tt=function(e,r){j.call(a,function(){var t,n=r.value;if(nt(r)&&(t=T(function(){q?G.emit(\"unhandledRejection\",n,e):Z(K,e,n)}),r.rejection=q||nt(r)?2:1,t.error))throw t.value})},nt=function(t){return 1!==t.rejection&&!t.parent},et=function(t,n){j.call(a,function(){q?G.emit(\"rejectionHandled\",t):Z(\"rejectionhandled\",t,n.value)})},rt=function(n,e,r,o){return function(t){n(e,r,t,o)}},ot=function(t,n,e,r){n.done||(n.done=!0,r&&(n=r),n.value=e,n.state=2,X(t,n,!0))},it=function(e,r,o,t){if(!r.done){r.done=!0,t&&(r=t);try{if(e===o)throw N(\"Promise can't be resolved itself\");var i=J(o);i?w(function(){var t={done:!1};try{i.call(o,rt(it,e,t,r),rt(ot,e,t,r))}catch(n){ot(e,t,n,r)}}):(r.value=o,r.state=1,X(e,r,!1))}catch(n){ot(e,{done:!1},n,r)}}};Q&&(D=function(t){x(this,D,_),g(t),r.call(this);var n=F(this);try{t(rt(it,this,n),rt(ot,this,n))}catch(e){ot(this,n,e)}},(r=function(t){R(this,{type:_,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=d(D.prototype,{then:function(t,n){var e=C(this),r=W(S(this,D));return r.ok=\"function\"!=typeof t||t,r.fail=\"function\"==typeof n&&n,r.domain=q?G.domain:undefined,e.parent=!0,e.reactions.push(r),0!=e.state&&X(this,e,!1),r.promise},\"catch\":function(t){return this.then(undefined,t)}}),o=function(){var t=new r,n=F(t);this.promise=t,this.resolve=rt(it,t,n),this.reject=rt(ot,t,n)},A.f=W=function(t){return t===D||t===i?new o:H(t)},f||\"function\"!=typeof l||(u=l.prototype.then,p(l.prototype,\"then\",function(t,n){var e=this;return new D(function(t,n){u.call(e,t,n)}).then(t,n)},{unsafe:!0}),\"function\"==typeof V&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return E(D,V.apply(a,arguments))}}))),c({global:!0,wrap:!0,forced:Q},{Promise:D}),v(D,_,!1,!0),h(_),i=s[_],c({target:_,stat:!0,forced:Q},{reject:function(t){var n=W(this);return n.reject.call(undefined,t),n.promise}}),c({target:_,stat:!0,forced:f||Q},{resolve:function(t){return E(f&&this===i?D:this,t)}}),c({target:_,stat:!0,forced:Y},{all:function(t){var c=this,n=W(c),f=n.resolve,a=n.reject,e=T(function(){var r=g(c.resolve),o=[],i=0,u=1;b(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(c,t).then(function(t){e||(e=!0,o[n]=t,--u||f(o))},a)}),--u||f(o)});return e.error&&a(e.value),n.promise},race:function(t){var e=this,r=W(e),o=r.reject,n=T(function(){var n=g(e.resolve);b(t,function(t){n.call(e,t).then(r.resolve,o)})});return n.error&&o(n.value),r.promise}})},function(t,n,e){var r=e(1),o=e(26),i=r(\"iterator\"),u=Array.prototype;t.exports=function(t){return t!==undefined&&(o.Array===t||u[i]===t)}},function(t,n,e){var r=e(63),o=e(26),i=e(1)(\"iterator\");t.exports=function(t){if(t!=undefined)return t[i]||t[\"@@iterator\"]||o[r(t)]}},function(t,n,e){var u=e(5);t.exports=function(t,n,e,r){try{return r?n(u(e)[0],e[1]):n(e)}catch(i){var o=t[\"return\"];throw o!==undefined&&u(o.call(t)),i}}},function(t,n,e){var r,o,i,u,c,f,a,s,l=e(0),p=e(28).f,d=e(12),v=e(73).set,h=e(50),y=l.MutationObserver||l.WebKitMutationObserver,g=l.process,x=l.Promise,m=\"process\"==d(g),b=p(l,\"queueMicrotask\"),O=b&&b.value;O||(r=function(){var t,n;for(m&&(t=g.domain)&&t.exit();o;){n=o.fn,o=o.next;try{n()}catch(e){throw o?u():i=undefined,e}}i=undefined,t&&t.enter()},u=m?function(){g.nextTick(r)}:y&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(c=!0,f=document.createTextNode(\"\"),new y(r).observe(f,{characterData:!0}),function(){f.data=c=!c}):x&&x.resolve?(a=x.resolve(undefined),s=a.then,function(){s.call(a,r)}):function(){v.call(l,r)}),t.exports=O||function(t){var n={fn:t,next:undefined};i&&(i.next=n),o||(o=n,u()),i=n}},function(t,n,e){var r=e(0);t.exports=function(t,n){var e=r.console;e&&e.error&&(1===arguments.length?e.error(t):e.error(t,n))}},function(t,n,e){\"use strict\";var r=e(2),o=e(16),i=e(68),u=e(17),c=e(72),f=e(74),a=e(11);r({target:\"Promise\",proto:!0,real:!0},{\"finally\":function(n){var e=c(this,u(\"Promise\")),t=\"function\"==typeof n;return this.then(t?function(t){return f(e,n()).then(function(){return t})}:n,t?function(t){return f(e,n()).then(function(){throw t})}:n)}}),o||\"function\"!=typeof i||i.prototype[\"finally\"]||a(i.prototype,\"finally\",u(\"Promise\").prototype[\"finally\"])},function(t,n,e){\"use strict\";var r=e(2),o=e(6),i=e(34),u=e(48),c=e(18),f=e(9),a=e(21),s=e(20),l=e(8),p=e(5),d=e(13),v=d.set,h=d.getterFor(\"AggregateError\"),y=function(t,n){var e=this;if(!(e instanceof y))return new y(t,n);u&&(e=u(new Error(n),i(e)));var r=[];return s(t,r.push,r),o?v(e,{errors:r,type:\"AggregateError\"}):e.errors=r,n!==undefined&&l(e,\"message\",String(n)),e};y.prototype=c(Error.prototype,{constructor:a(5,y),message:a(5,\"\"),name:a(5,\"AggregateError\"),toString:a(5,function(){var t=(t=p(this).name)===undefined?\"AggregateError\":String(t),n=this.message;return t+\": \"+(n=n===undefined?\"\":String(n))})}),o&&f.f(y.prototype,\"errors\",{get:function(){return h(this).errors},configurable:!0}),r({global:!0},{AggregateError:y})},function(t,n,e){e(75)},function(t,n,e){\"use strict\";var r=e(2),o=e(27),i=e(36);r({target:\"Promise\",stat:!0},{\"try\":function(t){var n=o.f(this),e=i(t);return(e.error?n.reject:n.resolve)(e.value),n.promise}})},function(t,n,e){\"use strict\";var r=e(2),l=e(14),p=e(17),o=e(27),i=e(36),d=e(20),v=\"No one promise resolved\";r({target:\"Promise\",stat:!0},{any:function(t){var f=this,n=o.f(f),a=n.resolve,s=n.reject,e=i(function(){var r=l(f.resolve),o=[],i=0,u=1,c=!1;d(t,function(t){var n=i++,e=!1;o.push(undefined),u++,r.call(f,t).then(function(t){e||c||(c=!0,a(t))},function(t){e||c||(e=!0,o[n]=t,--u||s(new(p(\"AggregateError\"))(o,v)))})}),--u||s(new(p(\"AggregateError\"))(o,v))});return e.error&&s(e.value),n.promise}})},function(t,n,e){t.exports=e(136)},function(t,n,e){e(137);var r=e(35);t.exports=r(\"String\",\"replace\")},function(t,n,e){\"use strict\";var r=e(138),j=e(5),w=e(19),E=e(32),P=e(33),i=e(29),A=e(140),T=e(141),k=Math.max,I=Math.min,M=Math.floor,L=/\\$([$&'`]|\\d\\d?|<[^>]*>)/g,_=/\\$([$&'`]|\\d\\d?)/g;r(\"replace\",2,function(o,O,S){return[function(t,n){var e=i(this),r=t==undefined?undefined:t[o];return r!==undefined?r.call(t,e,n):O.call(String(e),t,n)},function(t,n){var e=S(O,t,this,n);if(e.done)return e.value;var r=j(t),o=String(this),i=\"function\"==typeof n;i||(n=String(n));var u,c=r.global;c&&(u=r.unicode,r.lastIndex=0);for(var f=[];;){var a=T(r,o);if(null===a)break;if(f.push(a),!c)break;\"\"===String(a[0])&&(r.lastIndex=A(o,E(r.lastIndex),u))}for(var s,l=\"\",p=0,d=0;d<f.length;d++){a=f[d];for(var v=String(a[0]),h=k(I(P(a.index),o.length),0),y=[],g=1;g<a.length;g++)y.push((s=a[g])===undefined?s:String(s));var x,m=a.groups,b=i?(x=[v].concat(y,h,o),m!==undefined&&x.push(m),String(n.apply(undefined,x))):function(i,u,c,f,a,t){var s=c+i.length,l=f.length,n=_;a!==undefined&&(a=w(a),n=L);return O.call(t,n,function(t,n){var e;switch(n.charAt(0)){case\"$\":return\"$\";case\"&\":return i;case\"`\":return u.slice(0,c);case\"'\":return u.slice(s);case\"<\":e=a[n.slice(1,-1)];break;default:var r=+n;if(0==r)return t;if(l<r){var o=M(r/10);return 0===o?t:o<=l?f[o-1]===undefined?n.charAt(1):f[o-1]+n.charAt(1):t}e=f[r-1]}return e===undefined?\"\":e})}(v,o,h,y,m,n);p<=h&&(l+=o.slice(p,h)+b,p=h+v.length)}return l+o.slice(p)}]})},function(t,n,e){\"use strict\";var l=e(8),p=e(11),d=e(3),v=e(1),h=e(76),y=v(\"species\"),g=!d(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:\"7\"},t},\"7\"!==\"\".replace(t,\"$<a>\")}),x=!d(function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e=\"ab\".split(t);return 2!==e.length||\"a\"!==e[0]||\"b\"!==e[1]});t.exports=function(e,t,n,r){var i,o,u,c,f=v(e),a=!d(function(){var t={};return t[f]=function(){return 7},7!=\"\"[e](t)}),s=a&&!d(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},\"split\"===e&&(n.constructor={},n.constructor[y]=function(){return n}),n[f](\"\"),!t});a&&s&&(\"replace\"!==e||g)&&(\"split\"!==e||x)||(i=/./[f],u=(o=n(f,\"\"[e],function(t,n,e,r,o){return n.exec===h?a&&!o?{done:!0,value:i.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}}))[0],c=o[1],p(String.prototype,e,u),p(RegExp.prototype,f,2==t?function(t,n){return c.call(t,this,n)}:function(t){return c.call(t,this)}),r&&l(RegExp.prototype[f],\"sham\",!0))}},function(t,n,e){\"use strict\";var r=e(5);t.exports=function(){var t=r(this),n=\"\";return t.global&&(n+=\"g\"),t.ignoreCase&&(n+=\"i\"),t.multiline&&(n+=\"m\"),t.dotAll&&(n+=\"s\"),t.unicode&&(n+=\"u\"),t.sticky&&(n+=\"y\"),n}},function(t,n,e){\"use strict\";var r=e(65).charAt;t.exports=function(t,n,e){return n+(e?r(t,n).length:1)}},function(t,n,e){var o=e(12),i=e(76);t.exports=function(t,n){var e=t.exec;if(\"function\"==typeof e){var r=e.call(t,n);if(\"object\"!=typeof r)throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==o(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return i.call(t,n)}},function(t,n,e){e(143),e(62),e(64),e(67);var r=e(10);t.exports=r.Map},function(t,n,e){\"use strict\";var r=e(144),o=e(147);t.exports=r(\"Map\",function(t){return function(){return t(this,arguments.length?arguments[0]:undefined)}},o,!0)},function(t,n,e){\"use strict\";var y=e(2),g=e(0),x=e(45),m=e(11),b=e(77),O=e(20),S=e(49),j=e(4),w=e(3),E=e(71),P=e(24),A=e(146);t.exports=function(r,t,n,o,i){var e,u,c,f,a,s=g[r],l=s&&s.prototype,p=s,d=o?\"set\":\"add\",v={},h=function(t){var e=l[t];m(l,t,\"add\"==t?function(t){return e.call(this,0===t?0:t),this}:\"delete\"==t?function(t){return!(i&&!j(t))&&e.call(this,0===t?0:t)}:\"get\"==t?function(t){return i&&!j(t)?undefined:e.call(this,0===t?0:t)}:\"has\"==t?function(t){return!(i&&!j(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};return x(r,\"function\"!=typeof s||!(i||l.forEach&&!w(function(){(new s).entries().next()})))?(p=n.getConstructor(t,r,o,d),b.REQUIRED=!0):x(r,!0)&&(u=(e=new p)[d](i?{}:-0,1)!=e,c=w(function(){e.has(1)}),f=E(function(t){new s(t)}),a=!i&&w(function(){for(var t=new s,n=5;n--;)t[d](n,n);return!t.has(-0)}),f||(((p=t(function(t,n){S(t,p,r);var e=A(new s,t,p);return n!=undefined&&O(n,e[d],e,o),e})).prototype=l).constructor=p),(c||a)&&(h(\"delete\"),h(\"has\"),o&&h(\"get\")),(a||u)&&h(d),i&&l.clear&&delete l.clear),v[r]=p,y({global:!0,forced:p!=s},v),P(p,r),i||n.setStrong(p,r,o),p}},function(t,n,e){var r=e(3);t.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(t,n,e){var i=e(4),u=e(48);t.exports=function(t,n,e){var r,o;return u&&\"function\"==typeof(r=n.constructor)&&r!==e&&i(o=r.prototype)&&o!==e.prototype&&u(t,o),t}},function(t,n,e){\"use strict\";var a=e(9).f,s=e(18),l=e(69),p=e(25),d=e(49),v=e(20),u=e(47),c=e(70),h=e(6),y=e(77).fastKey,r=e(13),g=r.set,x=r.getterFor;t.exports={getConstructor:function(t,e,r,o){var i=t(function(t,n){d(t,i,e),g(t,{type:e,index:s(null),first:undefined,last:undefined,size:0}),h||(t.size=0),n!=undefined&&v(n,t[o],t,r)}),c=x(e),u=function(t,n,e){var r,o,i=c(t),u=f(t,n);return u?u.value=e:(i.last=u={index:o=y(n,!0),key:n,value:e,previous:r=i.last,next:undefined,removed:!1},i.first||(i.first=u),r&&(r.next=u),h?i.size++:t.size++,\"F\"!==o&&(i.index[o]=u)),t},f=function(t,n){var e,r=c(t),o=y(n);if(\"F\"!==o)return r.index[o];for(e=r.first;e;e=e.next)if(e.key==n)return e};return l(i.prototype,{clear:function(){for(var t=c(this),n=t.index,e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=undefined),delete n[e.index],e=e.next;t.first=t.last=undefined,h?t.size=0:this.size=0},\"delete\":function(t){var n,e,r=c(this),o=f(this,t);return o&&(n=o.next,e=o.previous,delete r.index[o.index],o.removed=!0,e&&(e.next=n),n&&(n.previous=e),r.first==o&&(r.first=n),r.last==o&&(r.last=e),h?r.size--:this.size--),!!o},forEach:function(t){for(var n,e=c(this),r=p(t,1<arguments.length?arguments[1]:undefined,3);n=n?n.next:e.first;)for(r(n.value,n.key,this);n&&n.removed;)n=n.previous},has:function(t){return!!f(this,t)}}),l(i.prototype,r?{get:function(t){var n=f(this,t);return n&&n.value},set:function(t,n){return u(this,0===t?0:t,n)}}:{add:function(t){return u(this,t=0===t?0:t,t)}}),h&&a(i.prototype,\"size\",{get:function(){return c(this).size}}),i},setStrong:function(t,n,e){var r=n+\" Iterator\",o=x(n),i=x(r);u(t,n,function(t,n){g(this,{type:r,target:t,state:o(t),kind:n,last:undefined})},function(){for(var t=i(this),n=t.kind,e=t.last;e&&e.removed;)e=e.previous;return t.target&&(t.last=e=e?e.next:t.state.first)?\"keys\"==n?{value:e.key,done:!1}:\"values\"==n?{value:e.value,done:!1}:{value:[e.key,e.value],done:!1}:(t.target=undefined,{value:undefined,done:!0})},e?\"entries\":\"values\",!e,!0),c(n)}}}]);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}// Production steps of ECMA-262, Edition 5, 15.4.4.14\r\n// Reference: http://es5.github.io/#x15.4.4.14\r\nif (!Array.prototype.indexOf) {\r\n Array.prototype.indexOf = function (searchElement, fromIndex) {\r\n\r\n var k;\r\n\r\n // 1. Let o be the result of calling ToObject passing\r\n // the this value as the argument.\r\n if (this == null) {\r\n throw new TypeError(\"\\\"this\\\" is null or not defined\");\r\n }\r\n\r\n var o = Object(this);\r\n\r\n // 2. Let lenValue be the result of calling the Get\r\n // internal method of o with the argument \"length\".\r\n // 3. Let len be ToUint32(lenValue).\r\n var len = o.length >>> 0;\r\n\r\n // 4. If len is 0, return -1.\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n // 5. If argument fromIndex was passed let n be\r\n // ToInteger(fromIndex); else let n be 0.\r\n var n = fromIndex | 0;\r\n\r\n // 6. If n >= len, return -1.\r\n if (n >= len) {\r\n return -1;\r\n }\r\n\r\n // 7. If n >= 0, then Let k be n.\r\n // 8. Else, n<0, Let k be len - abs(n).\r\n // If k is less than 0, then let k be 0.\r\n k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\r\n\r\n // 9. Repeat, while k < len\r\n while (k < len) {\r\n // a. Let Pk be ToString(k).\r\n // This is implicit for LHS operands of the in operator\r\n // b. Let kPresent be the result of calling the\r\n // HasProperty internal method of o with argument Pk.\r\n // This step can be combined with c\r\n // c. If kPresent is true, then\r\n // i. Let elementK be the result of calling the Get\r\n // internal method of o with the argument ToString(k).\r\n // ii. Let same be the result of applying the\r\n // Strict Equality Comparison Algorithm to\r\n // searchElement and elementK.\r\n // iii. If same is true, return k.\r\n if (k in o && o[k] === searchElement) {\r\n return k;\r\n }\r\n k++;\r\n }\r\n return -1;\r\n };\r\n}\r\nif (!Array.prototype.lastIndexOf) {\r\n Array.prototype.lastIndexOf = function (searchElement /* , fromIndex*/) {\r\n \"use strict\";\r\n\r\n if (this === void 0 || this === null) {\r\n throw new TypeError();\r\n }\r\n\r\n var n, k,\r\n t = Object(this),\r\n len = t.length >>> 0;\r\n if (len === 0) {\r\n return -1;\r\n }\r\n\r\n n = len - 1;\r\n if (arguments.length > 1) {\r\n n = Number(arguments[1]);\r\n if (n != n) {\r\n n = 0;\r\n } else if (n != 0 && n != (1 / 0) && n != -(1 / 0)) {\r\n n = (n > 0 || -1) * Math.floor(Math.abs(n));\r\n }\r\n }\r\n\r\n for (k = n >= 0\r\n ? Math.min(n, len - 1)\r\n : len - Math.abs(n); k >= 0; k--) {\r\n if (k in t && t[k] === searchElement) {\r\n return k;\r\n }\r\n }\r\n return -1;\r\n };\r\n}\r\n/**\r\n * 特殊情况\r\n * Created by wang on 15/6/23.\r\n */\r\n// 解决console未定义问题 guy\r\n_global.console = _global.console || (function () {\r\n var c = {};\r\n c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile\r\n = c.clear = c.exception = c.trace = c.assert = function () {\r\n };\r\n return c;\r\n})();\r\n/*\r\n * 前端缓存\r\n */\r\n_global.localStorage || (_global.localStorage = {\r\n items: {},\r\n setItem: function (k, v) {\r\n BI.Cache.addCookie(k, v);\r\n },\r\n getItem: function (k) {\r\n return BI.Cache.getCookie(k);\r\n },\r\n removeItem: function (k) {\r\n BI.Cache.deleteCookie(k);\r\n },\r\n key: function () {\r\n\r\n },\r\n clear: function () {\r\n this.items = {};\r\n }\r\n});\r\nif (!Object.keys) {\r\n Object.keys = function(o) {\r\n if (o !== Object(o)) {\r\n throw new TypeError('Object.keys called on a non-object');\r\n }\r\n // fix的问题\r\n var falsy;\r\n var skipArray = {\r\n __ob__: falsy,\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy\r\n };\r\n var k = [], p;\r\n for (p in o) {\r\n if (!(p in skipArray)) {\r\n if (Object.prototype.hasOwnProperty.call(o, p)) {\r\n k.push(p);\r\n }\r\n }\r\n }\r\n return k;\r\n };\r\n}\r\n\r\nif (!Array.isArray) {\r\n Array.isArray = function(arg) {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\r\n/* 统一采用core-js的polyfill,此块暂去\r\n// https://stackoverflow.com/questions/10919915/ie8-getprototypeof-method\r\nif (typeof Object.getPrototypeOf !== \"function\") {\r\n Object.getPrototypeOf = \"\".__proto__ === String.prototype\r\n ? function (object) {\r\n return object.__proto__;\r\n }\r\n : function (object) {\r\n // May break if the constructor has been tampered with\r\n return object.constructor.prototype;\r\n };\r\n}\r\n */\r\n\r\nif(!Date.now) {\r\n Date.now = function () {\r\n return new Date().valueOf();\r\n };\r\n}if (typeof Set !== \"undefined\" && Set.toString().match(/native code/)) {\r\n\r\n} else {\r\n Set = function () {\r\n this.set = {};\r\n };\r\n Set.prototype.has = function (key) {\r\n return this.set[key] !== undefined;\r\n };\r\n Set.prototype.add = function (key) {\r\n this.set[key] = 1;\r\n };\r\n Set.prototype.clear = function () {\r\n this.set = {};\r\n };\r\n}// 修复ie9下sort方法的bug\r\n// IE的sort 需要显示声明返回-1, 0, 1三种比较结果才可正常工作,而Chrome, Firefox中可以直接返回true, false等\r\n// BI-36544 sort提供的参数就可以自定义返回值,不需要特别控制。这边使用冒泡相较于快排可能慢了点。\r\n// 这边先将webkit的限制去掉\r\n!function (window) {\r\n var ua = window.navigator.userAgent.toLowerCase(),\r\n reg = /msie/;\r\n if (reg.test(ua)) {\r\n var _sort = Array.prototype.sort;\r\n Array.prototype.sort = function (fn) {\r\n if (!!fn && typeof fn === \"function\") {\r\n if (this.length < 2) {\r\n return this;\r\n }\r\n var i = 0, j = i + 1, l = this.length, tmp, r = false, t = 0;\r\n for (; i < l; i++) {\r\n for (j = i + 1; j < l; j++) {\r\n t = fn.call(this, this[i], this[j]);\r\n r = (typeof t === \"number\" ? t :\r\n t ? 1 : 0) > 0;\r\n if (r === true) {\r\n tmp = this[i];\r\n this[i] = this[j];\r\n this[j] = tmp;\r\n }\r\n }\r\n }\r\n return this;\r\n }\r\n return _sort.call(this);\r\n\r\n };\r\n }\r\n}(window);/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}/**\r\n * @license\r\n * Lodash (Custom Build) <https://lodash.com/>\r\n * Build: `lodash core plus=\"debounce,throttle,get,set,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge,groupBy,uniqBy,before,after\"`\r\n * Copyright JS Foundation and other contributors <https://js.foundation/>\r\n * Released under MIT license <https://lodash.com/license>\r\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\r\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\r\n */\r\n;(function() {\r\n\r\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\r\n var undefined;\r\n\r\n /** Used as the semantic version number. */\r\n var VERSION = '4.17.5';\r\n\r\n /** Used as the size to enable large array optimizations. */\r\n var LARGE_ARRAY_SIZE = 200;\r\n\r\n /** Error message constants. */\r\n var FUNC_ERROR_TEXT = 'Expected a function';\r\n\r\n /** Used to stand-in for `undefined` hash values. */\r\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\r\n\r\n /** Used as the maximum memoize cache size. */\r\n var MAX_MEMOIZE_SIZE = 500;\r\n\r\n /** Used as the internal argument placeholder. */\r\n var PLACEHOLDER = '__lodash_placeholder__';\r\n\r\n /** Used to compose bitmasks for cloning. */\r\n var CLONE_DEEP_FLAG = 1,\r\n CLONE_FLAT_FLAG = 2,\r\n CLONE_SYMBOLS_FLAG = 4;\r\n\r\n /** Used to compose bitmasks for value comparisons. */\r\n var COMPARE_PARTIAL_FLAG = 1,\r\n COMPARE_UNORDERED_FLAG = 2;\r\n\r\n /** Used to compose bitmasks for function metadata. */\r\n var WRAP_BIND_FLAG = 1,\r\n WRAP_BIND_KEY_FLAG = 2,\r\n WRAP_CURRY_BOUND_FLAG = 4,\r\n WRAP_CURRY_FLAG = 8,\r\n WRAP_CURRY_RIGHT_FLAG = 16,\r\n WRAP_PARTIAL_FLAG = 32,\r\n WRAP_PARTIAL_RIGHT_FLAG = 64,\r\n WRAP_ARY_FLAG = 128,\r\n WRAP_REARG_FLAG = 256,\r\n WRAP_FLIP_FLAG = 512;\r\n\r\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\r\n var HOT_COUNT = 800,\r\n HOT_SPAN = 16;\r\n\r\n /** Used to indicate the type of lazy iteratees. */\r\n var LAZY_FILTER_FLAG = 1,\r\n LAZY_MAP_FLAG = 2,\r\n LAZY_WHILE_FLAG = 3;\r\n\r\n /** Used as references for various `Number` constants. */\r\n var INFINITY = 1 / 0,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_INTEGER = 1.7976931348623157e+308,\r\n NAN = 0 / 0;\r\n\r\n /** Used as references for the maximum length and index of an array. */\r\n var MAX_ARRAY_LENGTH = 4294967295;\r\n\r\n /** Used to associate wrap methods with their bit flags. */\r\n var wrapFlags = [\r\n ['ary', WRAP_ARY_FLAG],\r\n ['bind', WRAP_BIND_FLAG],\r\n ['bindKey', WRAP_BIND_KEY_FLAG],\r\n ['curry', WRAP_CURRY_FLAG],\r\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\r\n ['flip', WRAP_FLIP_FLAG],\r\n ['partial', WRAP_PARTIAL_FLAG],\r\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\r\n ['rearg', WRAP_REARG_FLAG]\r\n ];\r\n\r\n /** `Object#toString` result references. */\r\n var argsTag = '[object Arguments]',\r\n arrayTag = '[object Array]',\r\n asyncTag = '[object AsyncFunction]',\r\n boolTag = '[object Boolean]',\r\n dateTag = '[object Date]',\r\n errorTag = '[object Error]',\r\n funcTag = '[object Function]',\r\n genTag = '[object GeneratorFunction]',\r\n mapTag = '[object Map]',\r\n numberTag = '[object Number]',\r\n nullTag = '[object Null]',\r\n objectTag = '[object Object]',\r\n promiseTag = '[object Promise]',\r\n proxyTag = '[object Proxy]',\r\n regexpTag = '[object RegExp]',\r\n setTag = '[object Set]',\r\n stringTag = '[object String]',\r\n symbolTag = '[object Symbol]',\r\n undefinedTag = '[object Undefined]',\r\n weakMapTag = '[object WeakMap]';\r\n\r\n var arrayBufferTag = '[object ArrayBuffer]',\r\n dataViewTag = '[object DataView]',\r\n float32Tag = '[object Float32Array]',\r\n float64Tag = '[object Float64Array]',\r\n int8Tag = '[object Int8Array]',\r\n int16Tag = '[object Int16Array]',\r\n int32Tag = '[object Int32Array]',\r\n uint8Tag = '[object Uint8Array]',\r\n uint8ClampedTag = '[object Uint8ClampedArray]',\r\n uint16Tag = '[object Uint16Array]',\r\n uint32Tag = '[object Uint32Array]';\r\n\r\n /** Used to match HTML entities and HTML characters. */\r\n var reUnescapedHtml = /[&<>\"']/g,\r\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\r\n\r\n /** Used to match property names within property paths. */\r\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\r\n reIsPlainProp = /^\\w*$/,\r\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\r\n\r\n /**\r\n * Used to match `RegExp`\r\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\r\n */\r\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\r\n\r\n /** Used to match leading and trailing whitespace. */\r\n var reTrim = /^\\s+|\\s+$/g;\r\n\r\n /** Used to match wrap detail comments. */\r\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\r\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\r\n reSplitDetails = /,? & /;\r\n\r\n /** Used to match backslashes in property paths. */\r\n var reEscapeChar = /\\\\(\\\\)?/g;\r\n\r\n /** Used to match `RegExp` flags from their coerced string values. */\r\n var reFlags = /\\w*$/;\r\n\r\n /** Used to detect bad signed hexadecimal string values. */\r\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\r\n\r\n /** Used to detect binary string values. */\r\n var reIsBinary = /^0b[01]+$/i;\r\n\r\n /** Used to detect host constructors (Safari). */\r\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\r\n\r\n /** Used to detect octal string values. */\r\n var reIsOctal = /^0o[0-7]+$/i;\r\n\r\n /** Used to detect unsigned integer values. */\r\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\r\n\r\n /** Used to compose unicode character classes. */\r\n var rsAstralRange = '\\\\ud800-\\\\udfff',\r\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\r\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\r\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\r\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\r\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\r\n\r\n /** Used to compose unicode capture groups. */\r\n var rsAstral = '[' + rsAstralRange + ']',\r\n rsCombo = '[' + rsComboRange + ']',\r\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\r\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\r\n rsNonAstral = '[^' + rsAstralRange + ']',\r\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\r\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\r\n rsZWJ = '\\\\u200d';\r\n\r\n /** Used to compose unicode regexes. */\r\n var reOptMod = rsModifier + '?',\r\n rsOptVar = '[' + rsVarRange + ']?',\r\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\r\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\r\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\r\n\r\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\r\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\r\n\r\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\r\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\r\n\r\n /** Used to identify `toStringTag` values of typed arrays. */\r\n var typedArrayTags = {};\r\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r\n typedArrayTags[uint32Tag] = true;\r\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\r\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\r\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\r\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\r\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\r\n typedArrayTags[weakMapTag] = false;\r\n\r\n /** Used to identify `toStringTag` values supported by `_.clone`. */\r\n var cloneableTags = {};\r\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\r\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\r\n cloneableTags[boolTag] = cloneableTags[dateTag] =\r\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\r\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\r\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\r\n cloneableTags[numberTag] = cloneableTags[objectTag] =\r\n cloneableTags[regexpTag] = cloneableTags[setTag] =\r\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\r\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r\n cloneableTags[errorTag] = cloneableTags[funcTag] =\r\n cloneableTags[weakMapTag] = false;\r\n\r\n /** Used to map characters to HTML entities. */\r\n var htmlEscapes = {\r\n '&': '&amp;',\r\n '<': '&lt;',\r\n '>': '&gt;',\r\n '\"': '&quot;',\r\n \"'\": '&#39;'\r\n };\r\n\r\n /** Built-in method references without a dependency on `root`. */\r\n var freeParseFloat = parseFloat,\r\n freeParseInt = parseInt;\r\n\r\n /** Detect free variable `global` from Node.js. */\r\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\r\n\r\n /** Detect free variable `self`. */\r\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\r\n\r\n /** Used as a reference to the global object. */\r\n var root = freeGlobal || freeSelf || Function('return this')();\r\n\r\n /** Detect free variable `exports`. */\r\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\r\n\r\n /** Detect free variable `module`. */\r\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\r\n\r\n /** Detect the popular CommonJS extension `module.exports`. */\r\n var moduleExports = freeModule && freeModule.exports === freeExports;\r\n\r\n /** Detect free variable `process` from Node.js. */\r\n var freeProcess = moduleExports && freeGlobal.process;\r\n\r\n /** Used to access faster Node.js helpers. */\r\n var nodeUtil = (function() {\r\n try {\r\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\r\n } catch (e) {}\r\n }());\r\n\r\n /* Node.js helper references. */\r\n var nodeIsDate = nodeUtil && nodeUtil.isDate,\r\n nodeIsMap = nodeUtil && nodeUtil.isMap,\r\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\r\n nodeIsSet = nodeUtil && nodeUtil.isSet,\r\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * A faster alternative to `Function#apply`, this function invokes `func`\r\n * with the `this` binding of `thisArg` and the arguments of `args`.\r\n *\r\n * @private\r\n * @param {Function} func The function to invoke.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} args The arguments to invoke `func` with.\r\n * @returns {*} Returns the result of `func`.\r\n */\r\n function apply(func, thisArg, args) {\r\n switch (args.length) {\r\n case 0: return func.call(thisArg);\r\n case 1: return func.call(thisArg, args[0]);\r\n case 2: return func.call(thisArg, args[0], args[1]);\r\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\r\n }\r\n return func.apply(thisArg, args);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseAggregator` for arrays.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function arrayAggregator(array, setter, iteratee, accumulator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n setter(accumulator, value, iteratee(value), array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEach` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEach(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (iteratee(array[index], index, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.every` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n */\r\n function arrayEvery(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (!predicate(array[index], index, array)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.filter` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function arrayFilter(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.includes` for arrays without support for\r\n * specifying an index to search from.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludes(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n return !!length && baseIndexOf(array, value, 0) > -1;\r\n }\r\n\r\n /**\r\n * This function is like `arrayIncludes` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludesWith(array, value, comparator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(value, array[index])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.map` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function arrayMap(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n result[index] = iteratee(array[index], index, array);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Appends the elements of `values` to `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to append.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayPush(array, values) {\r\n var index = -1,\r\n length = values.length,\r\n offset = array.length;\r\n\r\n while (++index < length) {\r\n array[offset + index] = values[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduce` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the first element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduce(array, iteratee, accumulator, initAccum) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n if (initAccum && length) {\r\n accumulator = array[++index];\r\n }\r\n while (++index < length) {\r\n accumulator = iteratee(accumulator, array[index], index, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.some` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function arraySome(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (predicate(array[index], index, array)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the size of an ASCII `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n var asciiSize = baseProperty('length');\r\n\r\n /**\r\n * Converts an ASCII `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function asciiToArray(string) {\r\n return string.split('');\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\r\n * without support for iteratee shorthands, which iterates over `collection`\r\n * using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the found element or its key, else `undefined`.\r\n */\r\n function baseFindKey(collection, predicate, eachFunc) {\r\n var result;\r\n eachFunc(collection, function(value, key, collection) {\r\n if (predicate(value, key, collection)) {\r\n result = key;\r\n return false;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\r\n var length = array.length,\r\n index = fromIndex + (fromRight ? 1 : -1);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (predicate(array[index], index, array)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOf(array, value, fromIndex) {\r\n return value === value\r\n ? strictIndexOf(array, value, fromIndex)\r\n : baseFindIndex(array, baseIsNaN, fromIndex);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNaN` without support for number objects.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n */\r\n function baseIsNaN(value) {\r\n return value !== value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.property` without support for deep paths.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function baseProperty(key) {\r\n return function(object) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.propertyOf` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyOf(object) {\r\n return function(key) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\r\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} accumulator The initial value.\r\n * @param {boolean} initAccum Specify using the first or last element of\r\n * `collection` as the initial value.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\r\n eachFunc(collection, function(value, index, collection) {\r\n accumulator = initAccum\r\n ? (initAccum = false, value)\r\n : iteratee(accumulator, value, index, collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortBy` which uses `comparer` to define the\r\n * sort order of `array` and replaces criteria objects with their corresponding\r\n * values.\r\n *\r\n * @private\r\n * @param {Array} array The array to sort.\r\n * @param {Function} comparer The function to define sort order.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseSortBy(array, comparer) {\r\n var length = array.length;\r\n\r\n array.sort(comparer);\r\n while (length--) {\r\n array[length] = array[length].value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.times` without support for iteratee shorthands\r\n * or max array length checks.\r\n *\r\n * @private\r\n * @param {number} n The number of times to invoke `iteratee`.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the array of results.\r\n */\r\n function baseTimes(n, iteratee) {\r\n var index = -1,\r\n result = Array(n);\r\n\r\n while (++index < n) {\r\n result[index] = iteratee(index);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unary` without support for storing metadata.\r\n *\r\n * @private\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n */\r\n function baseUnary(func) {\r\n return function(value) {\r\n return func(value);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.values` and `_.valuesIn` which creates an\r\n * array of `object` property values corresponding to the property names\r\n * of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the array of property values.\r\n */\r\n function baseValues(object, props) {\r\n return arrayMap(props, function(key) {\r\n return object[key];\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a `cache` value for `key` exists.\r\n *\r\n * @private\r\n * @param {Object} cache The cache to query.\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function cacheHas(cache, key) {\r\n return cache.has(key);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the first unmatched string symbol.\r\n */\r\n function charsStartIndex(strSymbols, chrSymbols) {\r\n var index = -1,\r\n length = strSymbols.length;\r\n\r\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the last unmatched string symbol.\r\n */\r\n function charsEndIndex(strSymbols, chrSymbols) {\r\n var index = strSymbols.length;\r\n\r\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of `placeholder` occurrences in `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} placeholder The placeholder to search for.\r\n * @returns {number} Returns the placeholder count.\r\n */\r\n function countHolders(array, placeholder) {\r\n var length = array.length,\r\n result = 0;\r\n\r\n while (length--) {\r\n if (array[length] === placeholder) {\r\n ++result;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Used by `_.escape` to convert characters to HTML entities.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\r\n\r\n /**\r\n * Gets the value at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function getValue(object, key) {\r\n return object == null ? undefined : object[key];\r\n }\r\n\r\n /**\r\n * Checks if `string` contains Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\r\n */\r\n function hasUnicode(string) {\r\n return reHasUnicode.test(string);\r\n }\r\n\r\n /**\r\n * Converts `iterator` to an array.\r\n *\r\n * @private\r\n * @param {Object} iterator The iterator to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function iteratorToArray(iterator) {\r\n var data,\r\n result = [];\r\n\r\n while (!(data = iterator.next()).done) {\r\n result.push(data.value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `map` to its key-value pairs.\r\n *\r\n * @private\r\n * @param {Object} map The map to convert.\r\n * @returns {Array} Returns the key-value pairs.\r\n */\r\n function mapToArray(map) {\r\n var index = -1,\r\n result = Array(map.size);\r\n\r\n map.forEach(function(value, key) {\r\n result[++index] = [key, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a unary function that invokes `func` with its argument transformed.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {Function} transform The argument transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overArg(func, transform) {\r\n return function(arg) {\r\n return func(transform(arg));\r\n };\r\n }\r\n\r\n /**\r\n * Replaces all `placeholder` elements in `array` with an internal placeholder\r\n * and returns an array of their indexes.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {*} placeholder The placeholder to replace.\r\n * @returns {Array} Returns the new array of placeholder indexes.\r\n */\r\n function replaceHolders(array, placeholder) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value === placeholder || value === PLACEHOLDER) {\r\n array[index] = PLACEHOLDER;\r\n result[resIndex++] = index;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the value at `key`, unless `key` is \"__proto__\".\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function safeGet(object, key) {\r\n return key == '__proto__'\r\n ? undefined\r\n : object[key];\r\n }\r\n\r\n /**\r\n * Converts `set` to an array of its values.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the values.\r\n */\r\n function setToArray(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = value;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.indexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictIndexOf(array, value, fromIndex) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Gets the number of symbols in `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function stringSize(string) {\r\n return hasUnicode(string)\r\n ? unicodeSize(string)\r\n : asciiSize(string);\r\n }\r\n\r\n /**\r\n * Converts `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function stringToArray(string) {\r\n return hasUnicode(string)\r\n ? unicodeToArray(string)\r\n : asciiToArray(string);\r\n }\r\n\r\n /**\r\n * Gets the size of a Unicode `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function unicodeSize(string) {\r\n var result = reUnicode.lastIndex = 0;\r\n while (reUnicode.test(string)) {\r\n ++result;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts a Unicode `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function unicodeToArray(string) {\r\n return string.match(reUnicode) || [];\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /** Used for built-in method references. */\r\n var arrayProto = Array.prototype,\r\n funcProto = Function.prototype,\r\n objectProto = Object.prototype;\r\n\r\n /** Used to detect overreaching core-js shims. */\r\n var coreJsData = root['__core-js_shared__'];\r\n\r\n /** Used to resolve the decompiled source of functions. */\r\n var funcToString = funcProto.toString;\r\n\r\n /** Used to check objects for own properties. */\r\n var hasOwnProperty = objectProto.hasOwnProperty;\r\n\r\n /** Used to generate unique IDs. */\r\n var idCounter = 0;\r\n\r\n /** Used to detect methods masquerading as native. */\r\n var maskSrcKey = (function() {\r\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\r\n return uid ? ('Symbol(src)_1.' + uid) : '';\r\n }());\r\n\r\n /**\r\n * Used to resolve the\r\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\r\n * of values.\r\n */\r\n var nativeObjectToString = objectProto.toString;\r\n\r\n /** Used to infer the `Object` constructor. */\r\n var objectCtorString = funcToString.call(Object);\r\n\r\n /** Used to restore the original `_` reference in `_.noConflict`. */\r\n var oldDash = root._;\r\n\r\n /** Used to detect if a method is native. */\r\n var reIsNative = RegExp('^' +\r\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\r\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\r\n );\r\n\r\n /** Built-in value references. */\r\n var Buffer = moduleExports ? root.Buffer : undefined,\r\n Symbol = root.Symbol,\r\n Uint8Array = root.Uint8Array,\r\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\r\n getPrototype = overArg(Object.getPrototypeOf, Object),\r\n objectCreate = Object.create,\r\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\r\n splice = arrayProto.splice,\r\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\r\n symIterator = Symbol ? Symbol.iterator : undefined,\r\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\r\n\r\n var defineProperty = (function() {\r\n try {\r\n var func = getNative(Object, 'defineProperty');\r\n func({}, '', {});\r\n return func;\r\n } catch (e) {}\r\n }());\r\n\r\n /* Built-in method references for those with the same name as other `lodash` methods. */\r\n var nativeCeil = Math.ceil,\r\n nativeFloor = Math.floor,\r\n nativeGetSymbols = Object.getOwnPropertySymbols,\r\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\r\n nativeIsFinite = root.isFinite,\r\n nativeKeys = overArg(Object.keys, Object),\r\n nativeMax = Math.max,\r\n nativeMin = Math.min,\r\n nativeNow = Date.now,\r\n nativeRandom = Math.random,\r\n nativeReverse = arrayProto.reverse;\r\n\r\n /* Built-in method references that are verified to be native. */\r\n var DataView = getNative(root, 'DataView'),\r\n Map = getNative(root, 'Map'),\r\n Promise = getNative(root, 'Promise'),\r\n Set = getNative(root, 'Set'),\r\n WeakMap = getNative(root, 'WeakMap'),\r\n nativeCreate = getNative(Object, 'create');\r\n\r\n /** Used to store function metadata. */\r\n var metaMap = WeakMap && new WeakMap;\r\n\r\n /** Used to lookup unminified function names. */\r\n var realNames = {};\r\n\r\n /** Used to detect maps, sets, and weakmaps. */\r\n var dataViewCtorString = toSource(DataView),\r\n mapCtorString = toSource(Map),\r\n promiseCtorString = toSource(Promise),\r\n setCtorString = toSource(Set),\r\n weakMapCtorString = toSource(WeakMap);\r\n\r\n /** Used to convert symbols to primitives and strings. */\r\n var symbolProto = Symbol ? Symbol.prototype : undefined,\r\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\r\n symbolToString = symbolProto ? symbolProto.toString : undefined;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` object which wraps `value` to enable implicit method\r\n * chain sequences. Methods that operate on and return arrays, collections,\r\n * and functions can be chained together. Methods that retrieve a single value\r\n * or may return a primitive value will automatically end the chain sequence\r\n * and return the unwrapped value. Otherwise, the value must be unwrapped\r\n * with `_#value`.\r\n *\r\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\r\n * enabled using `_.chain`.\r\n *\r\n * The execution of chained methods is lazy, that is, it's deferred until\r\n * `_#value` is implicitly or explicitly called.\r\n *\r\n * Lazy evaluation allows several methods to support shortcut fusion.\r\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\r\n * the creation of intermediate arrays and can greatly reduce the number of\r\n * iteratee executions. Sections of a chain sequence qualify for shortcut\r\n * fusion if the section is applied to an array and iteratees accept only\r\n * one argument. The heuristic for whether a section qualifies for shortcut\r\n * fusion is subject to change.\r\n *\r\n * Chaining is supported in custom builds as long as the `_#value` method is\r\n * directly or indirectly included in the build.\r\n *\r\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\r\n *\r\n * The wrapper `Array` methods are:\r\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\r\n *\r\n * The wrapper `String` methods are:\r\n * `replace` and `split`\r\n *\r\n * The wrapper methods that support shortcut fusion are:\r\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\r\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\r\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\r\n *\r\n * The chainable wrapper methods are:\r\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\r\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\r\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\r\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\r\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\r\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\r\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\r\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\r\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\r\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\r\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\r\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\r\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\r\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\r\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\r\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\r\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\r\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\r\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\r\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\r\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\r\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\r\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\r\n * `zipObject`, `zipObjectDeep`, and `zipWith`\r\n *\r\n * The wrapper methods that are **not** chainable by default are:\r\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\r\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\r\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\r\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\r\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\r\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\r\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\r\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\r\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\r\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\r\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\r\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\r\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\r\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\r\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\r\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\r\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\r\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\r\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\r\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\r\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\r\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\r\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\r\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\r\n * `upperFirst`, `value`, and `words`\r\n *\r\n * @name _\r\n * @constructor\r\n * @category Seq\r\n * @param {*} value The value to wrap in a `lodash` instance.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2, 3]);\r\n *\r\n * // Returns an unwrapped value.\r\n * wrapped.reduce(_.add);\r\n * // => 6\r\n *\r\n * // Returns a wrapped value.\r\n * var squares = wrapped.map(square);\r\n *\r\n * _.isArray(squares);\r\n * // => false\r\n *\r\n * _.isArray(squares.value());\r\n * // => true\r\n */\r\n function lodash(value) {\r\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r\n if (value instanceof LodashWrapper) {\r\n return value;\r\n }\r\n if (hasOwnProperty.call(value, '__wrapped__')) {\r\n return wrapperClone(value);\r\n }\r\n }\r\n return new LodashWrapper(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.create` without support for assigning\r\n * properties to the created object.\r\n *\r\n * @private\r\n * @param {Object} proto The object to inherit from.\r\n * @returns {Object} Returns the new object.\r\n */\r\n var baseCreate = (function() {\r\n function object() {}\r\n return function(proto) {\r\n if (!isObject(proto)) {\r\n return {};\r\n }\r\n if (objectCreate) {\r\n return objectCreate(proto);\r\n }\r\n object.prototype = proto;\r\n var result = new object;\r\n object.prototype = undefined;\r\n return result;\r\n };\r\n }());\r\n\r\n /**\r\n * The function whose prototype chain sequence wrappers inherit from.\r\n *\r\n * @private\r\n */\r\n function baseLodash() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * The base constructor for creating `lodash` wrapper objects.\r\n *\r\n * @private\r\n * @param {*} value The value to wrap.\r\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\r\n */\r\n function LodashWrapper(value, chainAll) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__chain__ = !!chainAll;\r\n this.__index__ = 0;\r\n this.__values__ = undefined;\r\n }\r\n\r\n // Ensure wrappers are instances of `baseLodash`.\r\n lodash.prototype = baseLodash.prototype;\r\n lodash.prototype.constructor = lodash;\r\n\r\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LodashWrapper.prototype.constructor = LodashWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {*} value The value to wrap.\r\n */\r\n function LazyWrapper(value) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__dir__ = 1;\r\n this.__filtered__ = false;\r\n this.__iteratees__ = [];\r\n this.__takeCount__ = MAX_ARRAY_LENGTH;\r\n this.__views__ = [];\r\n }\r\n\r\n /**\r\n * Creates a clone of the lazy wrapper object.\r\n *\r\n * @private\r\n * @name clone\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the cloned `LazyWrapper` object.\r\n */\r\n function lazyClone() {\r\n var result = new LazyWrapper(this.__wrapped__);\r\n result.__actions__ = copyArray(this.__actions__);\r\n result.__dir__ = this.__dir__;\r\n result.__filtered__ = this.__filtered__;\r\n result.__iteratees__ = copyArray(this.__iteratees__);\r\n result.__takeCount__ = this.__takeCount__;\r\n result.__views__ = copyArray(this.__views__);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses the direction of lazy iteration.\r\n *\r\n * @private\r\n * @name reverse\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\r\n */\r\n function lazyReverse() {\r\n if (this.__filtered__) {\r\n var result = new LazyWrapper(this);\r\n result.__dir__ = -1;\r\n result.__filtered__ = true;\r\n } else {\r\n result = this.clone();\r\n result.__dir__ *= -1;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the unwrapped value from its lazy wrapper.\r\n *\r\n * @private\r\n * @name value\r\n * @memberOf LazyWrapper\r\n * @returns {*} Returns the unwrapped value.\r\n */\r\n function lazyValue() {\r\n var array = this.__wrapped__.value(),\r\n dir = this.__dir__,\r\n isArr = isArray(array),\r\n isRight = dir < 0,\r\n arrLength = isArr ? array.length : 0,\r\n view = getView(0, arrLength, this.__views__),\r\n start = view.start,\r\n end = view.end,\r\n length = end - start,\r\n index = isRight ? end : (start - 1),\r\n iteratees = this.__iteratees__,\r\n iterLength = iteratees.length,\r\n resIndex = 0,\r\n takeCount = nativeMin(length, this.__takeCount__);\r\n\r\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\r\n return baseWrapperValue(array, this.__actions__);\r\n }\r\n var result = [];\r\n\r\n outer:\r\n while (length-- && resIndex < takeCount) {\r\n index += dir;\r\n\r\n var iterIndex = -1,\r\n value = array[index];\r\n\r\n while (++iterIndex < iterLength) {\r\n var data = iteratees[iterIndex],\r\n iteratee = data.iteratee,\r\n type = data.type,\r\n computed = iteratee(value);\r\n\r\n if (type == LAZY_MAP_FLAG) {\r\n value = computed;\r\n } else if (!computed) {\r\n if (type == LAZY_FILTER_FLAG) {\r\n continue outer;\r\n } else {\r\n break outer;\r\n }\r\n }\r\n }\r\n result[resIndex++] = value;\r\n }\r\n return result;\r\n }\r\n\r\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\r\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LazyWrapper.prototype.constructor = LazyWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a hash object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Hash(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the hash.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Hash\r\n */\r\n function hashClear() {\r\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the hash.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Hash\r\n * @param {Object} hash The hash to modify.\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function hashDelete(key) {\r\n var result = this.has(key) && delete this.__data__[key];\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the hash value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function hashGet(key) {\r\n var data = this.__data__;\r\n if (nativeCreate) {\r\n var result = data[key];\r\n return result === HASH_UNDEFINED ? undefined : result;\r\n }\r\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\r\n }\r\n\r\n /**\r\n * Checks if a hash value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Hash\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function hashHas(key) {\r\n var data = this.__data__;\r\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\r\n }\r\n\r\n /**\r\n * Sets the hash `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the hash instance.\r\n */\r\n function hashSet(key, value) {\r\n var data = this.__data__;\r\n this.size += this.has(key) ? 0 : 1;\r\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\r\n return this;\r\n }\r\n\r\n // Add methods to `Hash`.\r\n Hash.prototype.clear = hashClear;\r\n Hash.prototype['delete'] = hashDelete;\r\n Hash.prototype.get = hashGet;\r\n Hash.prototype.has = hashHas;\r\n Hash.prototype.set = hashSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an list cache object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function ListCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the list cache.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf ListCache\r\n */\r\n function listCacheClear() {\r\n this.__data__ = [];\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the list cache.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function listCacheDelete(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n var lastIndex = data.length - 1;\r\n if (index == lastIndex) {\r\n data.pop();\r\n } else {\r\n splice.call(data, index, 1);\r\n }\r\n --this.size;\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the list cache value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function listCacheGet(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n return index < 0 ? undefined : data[index][1];\r\n }\r\n\r\n /**\r\n * Checks if a list cache value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf ListCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function listCacheHas(key) {\r\n return assocIndexOf(this.__data__, key) > -1;\r\n }\r\n\r\n /**\r\n * Sets the list cache `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the list cache instance.\r\n */\r\n function listCacheSet(key, value) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n ++this.size;\r\n data.push([key, value]);\r\n } else {\r\n data[index][1] = value;\r\n }\r\n return this;\r\n }\r\n\r\n // Add methods to `ListCache`.\r\n ListCache.prototype.clear = listCacheClear;\r\n ListCache.prototype['delete'] = listCacheDelete;\r\n ListCache.prototype.get = listCacheGet;\r\n ListCache.prototype.has = listCacheHas;\r\n ListCache.prototype.set = listCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a map cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function MapCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the map.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf MapCache\r\n */\r\n function mapCacheClear() {\r\n this.size = 0;\r\n this.__data__ = {\r\n 'hash': new Hash,\r\n 'map': new (Map || ListCache),\r\n 'string': new Hash\r\n };\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the map.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function mapCacheDelete(key) {\r\n var result = getMapData(this, key)['delete'](key);\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the map value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function mapCacheGet(key) {\r\n return getMapData(this, key).get(key);\r\n }\r\n\r\n /**\r\n * Checks if a map value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf MapCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function mapCacheHas(key) {\r\n return getMapData(this, key).has(key);\r\n }\r\n\r\n /**\r\n * Sets the map `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the map cache instance.\r\n */\r\n function mapCacheSet(key, value) {\r\n var data = getMapData(this, key),\r\n size = data.size;\r\n\r\n data.set(key, value);\r\n this.size += data.size == size ? 0 : 1;\r\n return this;\r\n }\r\n\r\n // Add methods to `MapCache`.\r\n MapCache.prototype.clear = mapCacheClear;\r\n MapCache.prototype['delete'] = mapCacheDelete;\r\n MapCache.prototype.get = mapCacheGet;\r\n MapCache.prototype.has = mapCacheHas;\r\n MapCache.prototype.set = mapCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n *\r\n * Creates an array cache object to store unique values.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [values] The values to cache.\r\n */\r\n function SetCache(values) {\r\n var index = -1,\r\n length = values == null ? 0 : values.length;\r\n\r\n this.__data__ = new MapCache;\r\n while (++index < length) {\r\n this.add(values[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Adds `value` to the array cache.\r\n *\r\n * @private\r\n * @name add\r\n * @memberOf SetCache\r\n * @alias push\r\n * @param {*} value The value to cache.\r\n * @returns {Object} Returns the cache instance.\r\n */\r\n function setCacheAdd(value) {\r\n this.__data__.set(value, HASH_UNDEFINED);\r\n return this;\r\n }\r\n\r\n /**\r\n * Checks if `value` is in the array cache.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf SetCache\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns `true` if `value` is found, else `false`.\r\n */\r\n function setCacheHas(value) {\r\n return this.__data__.has(value);\r\n }\r\n\r\n // Add methods to `SetCache`.\r\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\r\n SetCache.prototype.has = setCacheHas;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a stack cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Stack(entries) {\r\n var data = this.__data__ = new ListCache(entries);\r\n this.size = data.size;\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the stack.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Stack\r\n */\r\n function stackClear() {\r\n this.__data__ = new ListCache;\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the stack.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function stackDelete(key) {\r\n var data = this.__data__,\r\n result = data['delete'](key);\r\n\r\n this.size = data.size;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the stack value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function stackGet(key) {\r\n return this.__data__.get(key);\r\n }\r\n\r\n /**\r\n * Checks if a stack value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Stack\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function stackHas(key) {\r\n return this.__data__.has(key);\r\n }\r\n\r\n /**\r\n * Sets the stack `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the stack cache instance.\r\n */\r\n function stackSet(key, value) {\r\n var data = this.__data__;\r\n if (data instanceof ListCache) {\r\n var pairs = data.__data__;\r\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\r\n pairs.push([key, value]);\r\n this.size = ++data.size;\r\n return this;\r\n }\r\n data = this.__data__ = new MapCache(pairs);\r\n }\r\n data.set(key, value);\r\n this.size = data.size;\r\n return this;\r\n }\r\n\r\n // Add methods to `Stack`.\r\n Stack.prototype.clear = stackClear;\r\n Stack.prototype['delete'] = stackDelete;\r\n Stack.prototype.get = stackGet;\r\n Stack.prototype.has = stackHas;\r\n Stack.prototype.set = stackSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of the enumerable property names of the array-like `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @param {boolean} inherited Specify returning inherited property names.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function arrayLikeKeys(value, inherited) {\r\n var isArr = isArray(value),\r\n isArg = !isArr && isArguments(value),\r\n isBuff = !isArr && !isArg && isBuffer(value),\r\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\r\n skipIndexes = isArr || isArg || isBuff || isType,\r\n result = skipIndexes ? baseTimes(value.length, String) : [],\r\n length = result.length;\r\n\r\n for (var key in value) {\r\n if ((inherited || hasOwnProperty.call(value, key)) &&\r\n !(skipIndexes && (\r\n // Safari 9 has enumerable `arguments.length` in strict mode.\r\n key == 'length' ||\r\n // Node.js 0.10 has enumerable non-index properties on buffers.\r\n (isBuff && (key == 'offset' || key == 'parent')) ||\r\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\r\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\r\n // Skip index properties.\r\n isIndex(key, length)\r\n ))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `assignValue` except that it doesn't assign\r\n * `undefined` values.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignMergeValue(object, key, value) {\r\n if ((value !== undefined && !eq(object[key], value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignValue(object, key, value) {\r\n var objValue = object[key];\r\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the index at which the `key` is found in `array` of key-value pairs.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} key The key to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function assocIndexOf(array, key) {\r\n var length = array.length;\r\n while (length--) {\r\n if (eq(array[length][0], key)) {\r\n return length;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Aggregates elements of `collection` on `accumulator` with keys transformed\r\n * by `iteratee` and values set by `setter`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseAggregator(collection, setter, iteratee, accumulator) {\r\n baseEach(collection, function(value, key, collection) {\r\n setter(accumulator, value, iteratee(value), collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assign` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssign(object, source) {\r\n return object && copyObject(source, keys(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assignIn` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssignIn(object, source) {\r\n return object && copyObject(source, keysIn(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `assignValue` and `assignMergeValue` without\r\n * value checks.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function baseAssignValue(object, key, value) {\r\n if (key == '__proto__' && defineProperty) {\r\n defineProperty(object, key, {\r\n 'configurable': true,\r\n 'enumerable': true,\r\n 'value': value,\r\n 'writable': true\r\n });\r\n } else {\r\n object[key] = value;\r\n }\r\n }\r\n\r\n /**\r\n * The base implementation of `_.at` without support for individual paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Array} Returns the picked elements.\r\n */\r\n function baseAt(object, paths) {\r\n var index = -1,\r\n length = paths.length,\r\n result = Array(length),\r\n skip = object == null;\r\n\r\n while (++index < length) {\r\n result[index] = skip ? undefined : get(object, paths[index]);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clamp` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n */\r\n function baseClamp(number, lower, upper) {\r\n if (number === number) {\r\n if (upper !== undefined) {\r\n number = number <= upper ? number : upper;\r\n }\r\n if (lower !== undefined) {\r\n number = number >= lower ? number : lower;\r\n }\r\n }\r\n return number;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\r\n * traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to clone.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Deep clone\r\n * 2 - Flatten inherited properties\r\n * 4 - Clone symbols\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @param {string} [key] The key of `value`.\r\n * @param {Object} [object] The parent object of `value`.\r\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\r\n * @returns {*} Returns the cloned value.\r\n */\r\n function baseClone(value, bitmask, customizer, key, object, stack) {\r\n var result,\r\n isDeep = bitmask & CLONE_DEEP_FLAG,\r\n isFlat = bitmask & CLONE_FLAT_FLAG,\r\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\r\n\r\n if (customizer) {\r\n result = object ? customizer(value, key, object, stack) : customizer(value);\r\n }\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n if (!isObject(value)) {\r\n return value;\r\n }\r\n var isArr = isArray(value);\r\n if (isArr) {\r\n result = initCloneArray(value);\r\n if (!isDeep) {\r\n return copyArray(value, result);\r\n }\r\n } else {\r\n var tag = getTag(value),\r\n isFunc = tag == funcTag || tag == genTag;\r\n\r\n if (isBuffer(value)) {\r\n return cloneBuffer(value, isDeep);\r\n }\r\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\r\n if (!isDeep) {\r\n return isFlat\r\n ? copySymbolsIn(value, baseAssignIn(result, value))\r\n : copySymbols(value, baseAssign(result, value));\r\n }\r\n } else {\r\n if (!cloneableTags[tag]) {\r\n return object ? value : {};\r\n }\r\n result = initCloneByTag(value, tag, isDeep);\r\n }\r\n }\r\n // Check for circular references and return its corresponding clone.\r\n stack || (stack = new Stack);\r\n var stacked = stack.get(value);\r\n if (stacked) {\r\n return stacked;\r\n }\r\n stack.set(value, result);\r\n\r\n if (isSet(value)) {\r\n value.forEach(function(subValue) {\r\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n if (isMap(value)) {\r\n value.forEach(function(subValue, key) {\r\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n var keysFunc = isFull\r\n ? (isFlat ? getAllKeysIn : getAllKeys)\r\n : (isFlat ? keysIn : keys);\r\n\r\n var props = isArr ? undefined : keysFunc(value);\r\n arrayEach(props || value, function(subValue, key) {\r\n if (props) {\r\n key = subValue;\r\n subValue = value[key];\r\n }\r\n // Recursively populate clone (susceptible to call stack limits).\r\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\r\n * to provide to `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {Array} args The arguments to provide to `func`.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n function baseDelay(func, wait, args) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return setTimeout(function() { func.apply(undefined, args); }, wait);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.difference` without support\r\n * for excluding multiple arrays or iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Array} values The values to exclude.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n */\r\n function baseDifference(array, values, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n isCommon = true,\r\n length = array.length,\r\n result = [],\r\n valuesLength = values.length;\r\n\r\n if (!length) {\r\n return result;\r\n }\r\n if (iteratee) {\r\n values = arrayMap(values, baseUnary(iteratee));\r\n }\r\n if (comparator) {\r\n includes = arrayIncludesWith;\r\n isCommon = false;\r\n }\r\n else if (values.length >= LARGE_ARRAY_SIZE) {\r\n includes = cacheHas;\r\n isCommon = false;\r\n values = new SetCache(values);\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee == null ? value : iteratee(value);\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var valuesIndex = valuesLength;\r\n while (valuesIndex--) {\r\n if (values[valuesIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(values, computed, comparator)) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forEach` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEach = createBaseEach(baseForOwn);\r\n\r\n /**\r\n * The base implementation of `_.every` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`\r\n */\r\n function baseEvery(collection, predicate) {\r\n var result = true;\r\n baseEach(collection, function(value, index, collection) {\r\n result = !!predicate(value, index, collection);\r\n return result;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.max` and `_.min` which accepts a\r\n * `comparator` to determine the extremum value.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The iteratee invoked per iteration.\r\n * @param {Function} comparator The comparator used to compare values.\r\n * @returns {*} Returns the extremum value.\r\n */\r\n function baseExtremum(array, iteratee, comparator) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n current = iteratee(value);\r\n\r\n if (current != null && (computed === undefined\r\n ? (current === current && !isSymbol(current))\r\n : comparator(current, computed)\r\n )) {\r\n var computed = current,\r\n result = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.filter` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function baseFilter(collection, predicate) {\r\n var result = [];\r\n baseEach(collection, function(value, index, collection) {\r\n if (predicate(value, index, collection)) {\r\n result.push(value);\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.flatten` with support for restricting flattening.\r\n *\r\n * @private\r\n * @param {Array} array The array to flatten.\r\n * @param {number} depth The maximum recursion depth.\r\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\r\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\r\n * @param {Array} [result=[]] The initial result value.\r\n * @returns {Array} Returns the new flattened array.\r\n */\r\n function baseFlatten(array, depth, predicate, isStrict, result) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n predicate || (predicate = isFlattenable);\r\n result || (result = []);\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (depth > 0 && predicate(value)) {\r\n if (depth > 1) {\r\n // Recursively flatten arrays (susceptible to call stack limits).\r\n baseFlatten(value, depth - 1, predicate, isStrict, result);\r\n } else {\r\n arrayPush(result, value);\r\n }\r\n } else if (!isStrict) {\r\n result[result.length] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `baseForOwn` which iterates over `object`\r\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseFor = createBaseFor();\r\n\r\n /**\r\n * This function is like `baseFor` except that it iterates over properties\r\n * in the opposite order.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseForRight = createBaseFor(true);\r\n\r\n /**\r\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwn(object, iteratee) {\r\n return object && baseFor(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwnRight(object, iteratee) {\r\n return object && baseForRight(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.functions` which creates an array of\r\n * `object` function property names filtered from `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Array} props The property names to filter.\r\n * @returns {Array} Returns the function names.\r\n */\r\n function baseFunctions(object, props) {\r\n return arrayFilter(props, function(key) {\r\n return isFunction(object[key]);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.get` without support for default values.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseGet(object, path) {\r\n path = castPath(path, object);\r\n\r\n var index = 0,\r\n length = path.length;\r\n\r\n while (object != null && index < length) {\r\n object = object[toKey(path[index++])];\r\n }\r\n return (index && index == length) ? object : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\r\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\r\n var result = keysFunc(object);\r\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\r\n }\r\n\r\n /**\r\n * The base implementation of `getTag` without fallbacks for buggy environments.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n function baseGetTag(value) {\r\n if (value == null) {\r\n return value === undefined ? undefinedTag : nullTag;\r\n }\r\n return (symToStringTag && symToStringTag in Object(value))\r\n ? getRawTag(value)\r\n : objectToString(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.gt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n */\r\n function baseGt(value, other) {\r\n return value > other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.has` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHas(object, key) {\r\n return object != null && hasOwnProperty.call(object, key);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.hasIn` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHasIn(object, key) {\r\n return object != null && key in Object(object);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.intersection`, without support\r\n * for iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of shared values.\r\n */\r\n function baseIntersection(arrays, iteratee, comparator) {\r\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\r\n length = arrays[0].length,\r\n othLength = arrays.length,\r\n othIndex = othLength,\r\n caches = Array(othLength),\r\n maxLength = Infinity,\r\n result = [];\r\n\r\n while (othIndex--) {\r\n var array = arrays[othIndex];\r\n if (othIndex && iteratee) {\r\n array = arrayMap(array, baseUnary(iteratee));\r\n }\r\n maxLength = nativeMin(array.length, maxLength);\r\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\r\n ? new SetCache(othIndex && array)\r\n : undefined;\r\n }\r\n array = arrays[0];\r\n\r\n var index = -1,\r\n seen = caches[0];\r\n\r\n outer:\r\n while (++index < length && result.length < maxLength) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (!(seen\r\n ? cacheHas(seen, computed)\r\n : includes(result, computed, comparator)\r\n )) {\r\n othIndex = othLength;\r\n while (--othIndex) {\r\n var cache = caches[othIndex];\r\n if (!(cache\r\n ? cacheHas(cache, computed)\r\n : includes(arrays[othIndex], computed, comparator))\r\n ) {\r\n continue outer;\r\n }\r\n }\r\n if (seen) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invert` and `_.invertBy` which inverts\r\n * `object` with values transformed by `iteratee` and set by `setter`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform values.\r\n * @param {Object} accumulator The initial inverted object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseInverter(object, setter, iteratee, accumulator) {\r\n baseForOwn(object, function(value, key, object) {\r\n setter(accumulator, iteratee(value), key, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invoke` without support for individual\r\n * method arguments.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {Array} args The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n */\r\n function baseInvoke(object, path, args) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n var func = object == null ? object : object[toKey(last(path))];\r\n return func == null ? undefined : apply(func, object, args);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArguments`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n */\r\n function baseIsArguments(value) {\r\n return isObjectLike(value) && baseGetTag(value) == argsTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isDate` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n */\r\n function baseIsDate(value) {\r\n return isObjectLike(value) && baseGetTag(value) == dateTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isEqual` which supports partial comparisons\r\n * and tracks traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Unordered comparison\r\n * 2 - Partial comparison\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n */\r\n function baseIsEqual(value, other, bitmask, customizer, stack) {\r\n if (value === other) {\r\n return true;\r\n }\r\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\r\n return value !== value && other !== other;\r\n }\r\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqual` for arrays and objects which performs\r\n * deep comparisons and tracks traversed objects enabling objects with circular\r\n * references to be compared.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\r\n var objIsArr = isArray(object),\r\n othIsArr = isArray(other),\r\n objTag = objIsArr ? arrayTag : getTag(object),\r\n othTag = othIsArr ? arrayTag : getTag(other);\r\n\r\n objTag = objTag == argsTag ? objectTag : objTag;\r\n othTag = othTag == argsTag ? objectTag : othTag;\r\n\r\n var objIsObj = objTag == objectTag,\r\n othIsObj = othTag == objectTag,\r\n isSameTag = objTag == othTag;\r\n\r\n if (isSameTag && isBuffer(object)) {\r\n if (!isBuffer(other)) {\r\n return false;\r\n }\r\n objIsArr = true;\r\n objIsObj = false;\r\n }\r\n if (isSameTag && !objIsObj) {\r\n stack || (stack = new Stack);\r\n return (objIsArr || isTypedArray(object))\r\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\r\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\r\n }\r\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\r\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r\n\r\n if (objIsWrapped || othIsWrapped) {\r\n var objUnwrapped = objIsWrapped ? object.value() : object,\r\n othUnwrapped = othIsWrapped ? other.value() : other;\r\n\r\n stack || (stack = new Stack);\r\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\r\n }\r\n }\r\n if (!isSameTag) {\r\n return false;\r\n }\r\n stack || (stack = new Stack);\r\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMap` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n */\r\n function baseIsMap(value) {\r\n return isObjectLike(value) && getTag(value) == mapTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Array} matchData The property names, values, and compare flags to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n */\r\n function baseIsMatch(object, source, matchData, customizer) {\r\n var index = matchData.length,\r\n length = index,\r\n noCustomizer = !customizer;\r\n\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (index--) {\r\n var data = matchData[index];\r\n if ((noCustomizer && data[2])\r\n ? data[1] !== object[data[0]]\r\n : !(data[0] in object)\r\n ) {\r\n return false;\r\n }\r\n }\r\n while (++index < length) {\r\n data = matchData[index];\r\n var key = data[0],\r\n objValue = object[key],\r\n srcValue = data[1];\r\n\r\n if (noCustomizer && data[2]) {\r\n if (objValue === undefined && !(key in object)) {\r\n return false;\r\n }\r\n } else {\r\n var stack = new Stack;\r\n if (customizer) {\r\n var result = customizer(objValue, srcValue, key, object, source, stack);\r\n }\r\n if (!(result === undefined\r\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\r\n : result\r\n )) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNative` without bad shim checks.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n */\r\n function baseIsNative(value) {\r\n if (!isObject(value) || isMasked(value)) {\r\n return false;\r\n }\r\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\r\n return pattern.test(toSource(value));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isRegExp` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n */\r\n function baseIsRegExp(value) {\r\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isSet` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n */\r\n function baseIsSet(value) {\r\n return isObjectLike(value) && getTag(value) == setTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n */\r\n function baseIsTypedArray(value) {\r\n return isObjectLike(value) &&\r\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.iteratee`.\r\n *\r\n * @private\r\n * @param {*} [value=_.identity] The value to convert to an iteratee.\r\n * @returns {Function} Returns the iteratee.\r\n */\r\n function baseIteratee(value) {\r\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\r\n if (typeof value == 'function') {\r\n return value;\r\n }\r\n if (value == null) {\r\n return identity;\r\n }\r\n if (typeof value == 'object') {\r\n return isArray(value)\r\n ? baseMatchesProperty(value[0], value[1])\r\n : baseMatches(value);\r\n }\r\n return property(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeys(object) {\r\n if (!isPrototype(object)) {\r\n return nativeKeys(object);\r\n }\r\n var result = [];\r\n for (var key in Object(object)) {\r\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeysIn(object) {\r\n if (!isObject(object)) {\r\n return nativeKeysIn(object);\r\n }\r\n var isProto = isPrototype(object),\r\n result = [];\r\n\r\n for (var key in object) {\r\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.lt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n */\r\n function baseLt(value, other) {\r\n return value < other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.map` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function baseMap(collection, iteratee) {\r\n var index = -1,\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value, key, collection) {\r\n result[++index] = iteratee(value, key, collection);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matches` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatches(source) {\r\n var matchData = getMatchData(source);\r\n if (matchData.length == 1 && matchData[0][2]) {\r\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\r\n }\r\n return function(object) {\r\n return object === source || baseIsMatch(object, source, matchData);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\r\n *\r\n * @private\r\n * @param {string} path The path of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatchesProperty(path, srcValue) {\r\n if (isKey(path) && isStrictComparable(srcValue)) {\r\n return matchesStrictComparable(toKey(path), srcValue);\r\n }\r\n return function(object) {\r\n var objValue = get(object, path);\r\n return (objValue === undefined && objValue === srcValue)\r\n ? hasIn(object, path)\r\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.merge` without support for multiple sources.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} [customizer] The function to customize merged values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMerge(object, source, srcIndex, customizer, stack) {\r\n if (object === source) {\r\n return;\r\n }\r\n baseFor(source, function(srcValue, key) {\r\n if (isObject(srcValue)) {\r\n stack || (stack = new Stack);\r\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\r\n }\r\n else {\r\n var newValue = customizer\r\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = srcValue;\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n }, keysIn);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseMerge` for arrays and objects which performs\r\n * deep merges and tracks traversed objects enabling objects with circular\r\n * references to be merged.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {string} key The key of the value to merge.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} mergeFunc The function to merge values.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\r\n var objValue = safeGet(object, key),\r\n srcValue = safeGet(source, key),\r\n stacked = stack.get(srcValue);\r\n\r\n if (stacked) {\r\n assignMergeValue(object, key, stacked);\r\n return;\r\n }\r\n var newValue = customizer\r\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n var isCommon = newValue === undefined;\r\n\r\n if (isCommon) {\r\n var isArr = isArray(srcValue),\r\n isBuff = !isArr && isBuffer(srcValue),\r\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\r\n\r\n newValue = srcValue;\r\n if (isArr || isBuff || isTyped) {\r\n if (isArray(objValue)) {\r\n newValue = objValue;\r\n }\r\n else if (isArrayLikeObject(objValue)) {\r\n newValue = copyArray(objValue);\r\n }\r\n else if (isBuff) {\r\n isCommon = false;\r\n newValue = cloneBuffer(srcValue, true);\r\n }\r\n else if (isTyped) {\r\n isCommon = false;\r\n newValue = cloneTypedArray(srcValue, true);\r\n }\r\n else {\r\n newValue = [];\r\n }\r\n }\r\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\r\n newValue = objValue;\r\n if (isArguments(objValue)) {\r\n newValue = toPlainObject(objValue);\r\n }\r\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\r\n newValue = initCloneObject(srcValue);\r\n }\r\n }\r\n else {\r\n isCommon = false;\r\n }\r\n }\r\n if (isCommon) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, newValue);\r\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\r\n stack['delete'](srcValue);\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.orderBy` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\r\n * @param {string[]} orders The sort orders of `iteratees`.\r\n * @returns {Array} Returns the new sorted array.\r\n */\r\n function baseOrderBy(collection, iteratees, orders) {\r\n var index = -1;\r\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\r\n\r\n var result = baseMap(collection, function(value, key, collection) {\r\n var criteria = arrayMap(iteratees, function(iteratee) {\r\n return iteratee(value);\r\n });\r\n return { 'criteria': criteria, 'index': ++index, 'value': value };\r\n });\r\n\r\n return baseSortBy(result, function(object, other) {\r\n return compareMultiple(object, other, orders);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pick` without support for individual\r\n * property identifiers.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePick(object, paths) {\r\n return basePickBy(object, paths, function(value, path) {\r\n return hasIn(object, path);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @param {Function} predicate The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePickBy(object, paths, predicate) {\r\n var index = -1,\r\n length = paths.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var path = paths[index],\r\n value = baseGet(object, path);\r\n\r\n if (predicate(value, path)) {\r\n baseSet(result, castPath(path, object), value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseProperty` which supports deep paths.\r\n *\r\n * @private\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyDeep(path) {\r\n return function(object) {\r\n return baseGet(object, path);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.random` without support for returning\r\n * floating-point numbers.\r\n *\r\n * @private\r\n * @param {number} lower The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the random number.\r\n */\r\n function baseRandom(lower, upper) {\r\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\r\n * coerce arguments.\r\n *\r\n * @private\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} step The value to increment or decrement by.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the range of numbers.\r\n */\r\n function baseRange(start, end, step, fromRight) {\r\n var index = -1,\r\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\r\n result = Array(length);\r\n\r\n while (length--) {\r\n result[fromRight ? length : ++index] = start;\r\n start += step;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function baseRest(func, start) {\r\n return setToString(overRest(func, start, identity), func + '');\r\n }\r\n\r\n /**\r\n * The base implementation of `_.set`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseSet(object, path, value, customizer) {\r\n if (!isObject(object)) {\r\n return object;\r\n }\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n lastIndex = length - 1,\r\n nested = object;\r\n\r\n while (nested != null && ++index < length) {\r\n var key = toKey(path[index]),\r\n newValue = value;\r\n\r\n if (index != lastIndex) {\r\n var objValue = nested[key];\r\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\r\n if (newValue === undefined) {\r\n newValue = isObject(objValue)\r\n ? objValue\r\n : (isIndex(path[index + 1]) ? [] : {});\r\n }\r\n }\r\n assignValue(nested, key, newValue);\r\n nested = nested[key];\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * The base implementation of `setData` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetData = !metaMap ? identity : function(func, data) {\r\n metaMap.set(func, data);\r\n return func;\r\n };\r\n\r\n /**\r\n * The base implementation of `setToString` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetToString = !defineProperty ? identity : function(func, string) {\r\n return defineProperty(func, 'toString', {\r\n 'configurable': true,\r\n 'enumerable': false,\r\n 'value': constant(string),\r\n 'writable': true\r\n });\r\n };\r\n\r\n /**\r\n * The base implementation of `_.slice` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseSlice(array, start, end) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = end > length ? length : end;\r\n if (end < 0) {\r\n end += length;\r\n }\r\n length = start > end ? 0 : ((end - start) >>> 0);\r\n start >>>= 0;\r\n\r\n var result = Array(length);\r\n while (++index < length) {\r\n result[index] = array[index + start];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.some` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function baseSome(collection, predicate) {\r\n var result;\r\n\r\n baseEach(collection, function(value, index, collection) {\r\n result = predicate(value, index, collection);\r\n return !result;\r\n });\r\n return !!result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toString` which doesn't convert nullish\r\n * values to empty strings.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {string} Returns the string.\r\n */\r\n function baseToString(value) {\r\n // Exit early for strings to avoid a performance hit in some environments.\r\n if (typeof value == 'string') {\r\n return value;\r\n }\r\n if (isArray(value)) {\r\n // Recursively convert values (susceptible to call stack limits).\r\n return arrayMap(value, baseToString) + '';\r\n }\r\n if (isSymbol(value)) {\r\n return symbolToString ? symbolToString.call(value) : '';\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseUniq(array, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n length = array.length,\r\n isCommon = true,\r\n result = [],\r\n seen = result;\r\n\r\n if (comparator) {\r\n isCommon = false;\r\n includes = arrayIncludesWith;\r\n }\r\n else if (length >= LARGE_ARRAY_SIZE) {\r\n var set = iteratee ? null : createSet(array);\r\n if (set) {\r\n return setToArray(set);\r\n }\r\n isCommon = false;\r\n includes = cacheHas;\r\n seen = new SetCache;\r\n }\r\n else {\r\n seen = iteratee ? [] : result;\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var seenIndex = seen.length;\r\n while (seenIndex--) {\r\n if (seen[seenIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n if (iteratee) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(seen, computed, comparator)) {\r\n if (seen !== result) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unset`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The property path to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n */\r\n function baseUnset(object, path) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n return object == null || delete object[toKey(last(path))];\r\n }\r\n\r\n /**\r\n * The base implementation of `wrapperValue` which returns the result of\r\n * performing a sequence of actions on the unwrapped `value`, where each\r\n * successive action is supplied the return value of the previous.\r\n *\r\n * @private\r\n * @param {*} value The unwrapped value.\r\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseWrapperValue(value, actions) {\r\n var result = value;\r\n if (result instanceof LazyWrapper) {\r\n result = result.value();\r\n }\r\n return arrayReduce(actions, function(result, action) {\r\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\r\n }, result);\r\n }\r\n\r\n /**\r\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\r\n *\r\n * @private\r\n * @param {Array} props The property identifiers.\r\n * @param {Array} values The property values.\r\n * @param {Function} assignFunc The function to assign values.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function baseZipObject(props, values, assignFunc) {\r\n var index = -1,\r\n length = props.length,\r\n valsLength = values.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var value = index < valsLength ? values[index] : undefined;\r\n assignFunc(result, props[index], value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Casts `value` to an empty array if it's not an array like object.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Array|Object} Returns the cast array-like object.\r\n */\r\n function castArrayLikeObject(value) {\r\n return isArrayLikeObject(value) ? value : [];\r\n }\r\n\r\n /**\r\n * Casts `value` to a path array if it's not one.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {Array} Returns the cast property path array.\r\n */\r\n function castPath(value, object) {\r\n if (isArray(value)) {\r\n return value;\r\n }\r\n return isKey(value, object) ? [value] : stringToPath(toString(value));\r\n }\r\n\r\n /**\r\n * Casts `array` to a slice if it's needed.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {number} start The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the cast slice.\r\n */\r\n function castSlice(array, start, end) {\r\n var length = array.length;\r\n end = end === undefined ? length : end;\r\n return (!start && end >= length) ? array : baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a clone of `buffer`.\r\n *\r\n * @private\r\n * @param {Buffer} buffer The buffer to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Buffer} Returns the cloned buffer.\r\n */\r\n function cloneBuffer(buffer, isDeep) {\r\n if (isDeep) {\r\n return buffer.slice();\r\n }\r\n var length = buffer.length,\r\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\r\n\r\n buffer.copy(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `arrayBuffer`.\r\n *\r\n * @private\r\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\r\n * @returns {ArrayBuffer} Returns the cloned array buffer.\r\n */\r\n function cloneArrayBuffer(arrayBuffer) {\r\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\r\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `dataView`.\r\n *\r\n * @private\r\n * @param {Object} dataView The data view to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned data view.\r\n */\r\n function cloneDataView(dataView, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\r\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n\r\n /**\r\n * Creates a clone of `regexp`.\r\n *\r\n * @private\r\n * @param {Object} regexp The regexp to clone.\r\n * @returns {Object} Returns the cloned regexp.\r\n */\r\n function cloneRegExp(regexp) {\r\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\r\n result.lastIndex = regexp.lastIndex;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of the `symbol` object.\r\n *\r\n * @private\r\n * @param {Object} symbol The symbol object to clone.\r\n * @returns {Object} Returns the cloned symbol object.\r\n */\r\n function cloneSymbol(symbol) {\r\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\r\n }\r\n\r\n /**\r\n * Creates a clone of `typedArray`.\r\n *\r\n * @private\r\n * @param {Object} typedArray The typed array to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned typed array.\r\n */\r\n function cloneTypedArray(typedArray, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\r\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\r\n }\r\n\r\n /**\r\n * Compares values to sort them in ascending order.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {number} Returns the sort order indicator for `value`.\r\n */\r\n function compareAscending(value, other) {\r\n if (value !== other) {\r\n var valIsDefined = value !== undefined,\r\n valIsNull = value === null,\r\n valIsReflexive = value === value,\r\n valIsSymbol = isSymbol(value);\r\n\r\n var othIsDefined = other !== undefined,\r\n othIsNull = other === null,\r\n othIsReflexive = other === other,\r\n othIsSymbol = isSymbol(other);\r\n\r\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\r\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\r\n (valIsNull && othIsDefined && othIsReflexive) ||\r\n (!valIsDefined && othIsReflexive) ||\r\n !valIsReflexive) {\r\n return 1;\r\n }\r\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\r\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\r\n (othIsNull && valIsDefined && valIsReflexive) ||\r\n (!othIsDefined && valIsReflexive) ||\r\n !othIsReflexive) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Used by `_.orderBy` to compare multiple properties of a value to another\r\n * and stable sort them.\r\n *\r\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\r\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\r\n * of corresponding values.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {boolean[]|string[]} orders The order to sort by for each property.\r\n * @returns {number} Returns the sort order indicator for `object`.\r\n */\r\n function compareMultiple(object, other, orders) {\r\n var index = -1,\r\n objCriteria = object.criteria,\r\n othCriteria = other.criteria,\r\n length = objCriteria.length,\r\n ordersLength = orders.length;\r\n\r\n while (++index < length) {\r\n var result = compareAscending(objCriteria[index], othCriteria[index]);\r\n if (result) {\r\n if (index >= ordersLength) {\r\n return result;\r\n }\r\n var order = orders[index];\r\n return result * (order == 'desc' ? -1 : 1);\r\n }\r\n }\r\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\r\n // that causes it, under certain circumstances, to provide the same value for\r\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\r\n // for more details.\r\n //\r\n // This also ensures a stable sort in V8 and other engines.\r\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\r\n return object.index - other.index;\r\n }\r\n\r\n /**\r\n * Creates an array that is the composition of partially applied arguments,\r\n * placeholders, and provided arguments into a single array of arguments.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to prepend to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgs(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersLength = holders.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(leftLength + rangeLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++leftIndex < leftLength) {\r\n result[leftIndex] = partials[leftIndex];\r\n }\r\n while (++argsIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[holders[argsIndex]] = args[argsIndex];\r\n }\r\n }\r\n while (rangeLength--) {\r\n result[leftIndex++] = args[argsIndex++];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `composeArgs` except that the arguments composition\r\n * is tailored for `_.partialRight`.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to append to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgsRight(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersIndex = -1,\r\n holdersLength = holders.length,\r\n rightIndex = -1,\r\n rightLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(rangeLength + rightLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++argsIndex < rangeLength) {\r\n result[argsIndex] = args[argsIndex];\r\n }\r\n var offset = argsIndex;\r\n while (++rightIndex < rightLength) {\r\n result[offset + rightIndex] = partials[rightIndex];\r\n }\r\n while (++holdersIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[offset + holders[holdersIndex]] = args[argsIndex++];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Copies the values of `source` to `array`.\r\n *\r\n * @private\r\n * @param {Array} source The array to copy values from.\r\n * @param {Array} [array=[]] The array to copy values to.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function copyArray(source, array) {\r\n var index = -1,\r\n length = source.length;\r\n\r\n array || (array = Array(length));\r\n while (++index < length) {\r\n array[index] = source[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Copies properties of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy properties from.\r\n * @param {Array} props The property identifiers to copy.\r\n * @param {Object} [object={}] The object to copy properties to.\r\n * @param {Function} [customizer] The function to customize copied values.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copyObject(source, props, object, customizer) {\r\n var isNew = !object;\r\n object || (object = {});\r\n\r\n var index = -1,\r\n length = props.length;\r\n\r\n while (++index < length) {\r\n var key = props[index];\r\n\r\n var newValue = customizer\r\n ? customizer(object[key], source[key], key, object, source)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = source[key];\r\n }\r\n if (isNew) {\r\n baseAssignValue(object, key, newValue);\r\n } else {\r\n assignValue(object, key, newValue);\r\n }\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Copies own symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbols(source, object) {\r\n return copyObject(source, getSymbols(source), object);\r\n }\r\n\r\n /**\r\n * Copies own and inherited symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbolsIn(source, object) {\r\n return copyObject(source, getSymbolsIn(source), object);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.groupBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} [initializer] The accumulator object initializer.\r\n * @returns {Function} Returns the new aggregator function.\r\n */\r\n function createAggregator(setter, initializer) {\r\n return function(collection, iteratee) {\r\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\r\n accumulator = initializer ? initializer() : {};\r\n\r\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.assign`.\r\n *\r\n * @private\r\n * @param {Function} assigner The function to assign values.\r\n * @returns {Function} Returns the new assigner function.\r\n */\r\n function createAssigner(assigner) {\r\n return baseRest(function(object, sources) {\r\n var index = -1,\r\n length = sources.length,\r\n customizer = length > 1 ? sources[length - 1] : undefined,\r\n guard = length > 2 ? sources[2] : undefined;\r\n\r\n customizer = (assigner.length > 3 && typeof customizer == 'function')\r\n ? (length--, customizer)\r\n : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n customizer = length < 3 ? undefined : customizer;\r\n length = 1;\r\n }\r\n object = Object(object);\r\n while (++index < length) {\r\n var source = sources[index];\r\n if (source) {\r\n assigner(object, source, index, customizer);\r\n }\r\n }\r\n return object;\r\n });\r\n }\r\n\r\n /**\r\n * Creates a `baseEach` or `baseEachRight` function.\r\n *\r\n * @private\r\n * @param {Function} eachFunc The function to iterate over a collection.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseEach(eachFunc, fromRight) {\r\n return function(collection, iteratee) {\r\n if (collection == null) {\r\n return collection;\r\n }\r\n if (!isArrayLike(collection)) {\r\n return eachFunc(collection, iteratee);\r\n }\r\n var length = collection.length,\r\n index = fromRight ? length : -1,\r\n iterable = Object(collection);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (iteratee(iterable[index], index, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return collection;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseFor(fromRight) {\r\n return function(object, iteratee, keysFunc) {\r\n var index = -1,\r\n iterable = Object(object),\r\n props = keysFunc(object),\r\n length = props.length;\r\n\r\n while (length--) {\r\n var key = props[fromRight ? length : ++index];\r\n if (iteratee(iterable[key], key, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return object;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the optional `this`\r\n * binding of `thisArg`.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createBind(func, bitmask, thisArg) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return fn.apply(isBind ? thisArg : this, arguments);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function that produces an instance of `Ctor` regardless of\r\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r\n *\r\n * @private\r\n * @param {Function} Ctor The constructor to wrap.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCtor(Ctor) {\r\n return function() {\r\n // Use a `switch` statement to work with class constructors. See\r\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r\n // for more details.\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return new Ctor;\r\n case 1: return new Ctor(args[0]);\r\n case 2: return new Ctor(args[0], args[1]);\r\n case 3: return new Ctor(args[0], args[1], args[2]);\r\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n }\r\n var thisBinding = baseCreate(Ctor.prototype),\r\n result = Ctor.apply(thisBinding, args);\r\n\r\n // Mimic the constructor's `return` behavior.\r\n // See https://es5.github.io/#x13.2.2 for more details.\r\n return isObject(result) ? result : thisBinding;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to enable currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {number} arity The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCurry(func, bitmask, arity) {\r\n var Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length,\r\n placeholder = getHolder(wrapper);\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\r\n ? []\r\n : replaceHolders(args, placeholder);\r\n\r\n length -= holders.length;\r\n if (length < arity) {\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\r\n args, holders, undefined, undefined, arity - length);\r\n }\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return apply(fn, this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.find` or `_.findLast` function.\r\n *\r\n * @private\r\n * @param {Function} findIndexFunc The function to find the collection index.\r\n * @returns {Function} Returns the new find function.\r\n */\r\n function createFind(findIndexFunc) {\r\n return function(collection, predicate, fromIndex) {\r\n var iterable = Object(collection);\r\n if (!isArrayLike(collection)) {\r\n var iteratee = baseIteratee(predicate, 3);\r\n collection = keys(collection);\r\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\r\n }\r\n var index = findIndexFunc(collection, predicate, fromIndex);\r\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with optional `this`\r\n * binding of `thisArg`, partial application, and currying.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [partialsRight] The arguments to append to those provided\r\n * to the new function.\r\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r\n var isAry = bitmask & WRAP_ARY_FLAG,\r\n isBind = bitmask & WRAP_BIND_FLAG,\r\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\r\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\r\n isFlip = bitmask & WRAP_FLIP_FLAG,\r\n Ctor = isBindKey ? undefined : createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length;\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n if (isCurried) {\r\n var placeholder = getHolder(wrapper),\r\n holdersCount = countHolders(args, placeholder);\r\n }\r\n if (partials) {\r\n args = composeArgs(args, partials, holders, isCurried);\r\n }\r\n if (partialsRight) {\r\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\r\n }\r\n length -= holdersCount;\r\n if (isCurried && length < arity) {\r\n var newHolders = replaceHolders(args, placeholder);\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\r\n args, newHolders, argPos, ary, arity - length\r\n );\r\n }\r\n var thisBinding = isBind ? thisArg : this,\r\n fn = isBindKey ? thisBinding[func] : func;\r\n\r\n length = args.length;\r\n if (argPos) {\r\n args = reorder(args, argPos);\r\n } else if (isFlip && length > 1) {\r\n args.reverse();\r\n }\r\n if (isAry && ary < length) {\r\n args.length = ary;\r\n }\r\n if (this && this !== root && this instanceof wrapper) {\r\n fn = Ctor || createCtor(fn);\r\n }\r\n return fn.apply(thisBinding, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.invertBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} toIteratee The function to resolve iteratees.\r\n * @returns {Function} Returns the new inverter function.\r\n */\r\n function createInverter(setter, toIteratee) {\r\n return function(object, iteratee) {\r\n return baseInverter(object, setter, toIteratee(iteratee), {});\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the `this` binding\r\n * of `thisArg` and `partials` prepended to the arguments it receives.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} partials The arguments to prepend to those provided to\r\n * the new function.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createPartial(func, bitmask, thisArg, partials) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var argsIndex = -1,\r\n argsLength = arguments.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n args = Array(leftLength + argsLength),\r\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n\r\n while (++leftIndex < leftLength) {\r\n args[leftIndex] = partials[leftIndex];\r\n }\r\n while (argsLength--) {\r\n args[leftIndex++] = arguments[++argsIndex];\r\n }\r\n return apply(fn, isBind ? thisArg : this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.range` or `_.rangeRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new range function.\r\n */\r\n function createRange(fromRight) {\r\n return function(start, end, step) {\r\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\r\n end = step = undefined;\r\n }\r\n // Ensure the sign of `-0` is preserved.\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\r\n return baseRange(start, end, step, fromRight);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to continue currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {Function} wrapFunc The function to create the `func` wrapper.\r\n * @param {*} placeholder The placeholder value.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\r\n var isCurry = bitmask & WRAP_CURRY_FLAG,\r\n newHolders = isCurry ? holders : undefined,\r\n newHoldersRight = isCurry ? undefined : holders,\r\n newPartials = isCurry ? partials : undefined,\r\n newPartialsRight = isCurry ? undefined : partials;\r\n\r\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\r\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\r\n\r\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\r\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\r\n }\r\n var newData = [\r\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\r\n newHoldersRight, argPos, ary, arity\r\n ];\r\n\r\n var result = wrapFunc.apply(undefined, newData);\r\n if (isLaziable(func)) {\r\n setData(result, newData);\r\n }\r\n result.placeholder = placeholder;\r\n return setWrapToString(result, func, bitmask);\r\n }\r\n\r\n /**\r\n * Creates a set object of `values`.\r\n *\r\n * @private\r\n * @param {Array} values The values to add to the set.\r\n * @returns {Object} Returns the new set.\r\n */\r\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\r\n return new Set(values);\r\n };\r\n\r\n /**\r\n * Creates a function that either curries or invokes `func` with optional\r\n * `this` binding and partially applied arguments.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags.\r\n * 1 - `_.bind`\r\n * 2 - `_.bindKey`\r\n * 4 - `_.curry` or `_.curryRight` of a bound function\r\n * 8 - `_.curry`\r\n * 16 - `_.curryRight`\r\n * 32 - `_.partial`\r\n * 64 - `_.partialRight`\r\n * 128 - `_.rearg`\r\n * 256 - `_.ary`\r\n * 512 - `_.flip`\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to be partially applied.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\r\n if (!isBindKey && typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var length = partials ? partials.length : 0;\r\n if (!length) {\r\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\r\n partials = holders = undefined;\r\n }\r\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\r\n arity = arity === undefined ? arity : toInteger(arity);\r\n length -= holders ? holders.length : 0;\r\n\r\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\r\n var partialsRight = partials,\r\n holdersRight = holders;\r\n\r\n partials = holders = undefined;\r\n }\r\n var data = isBindKey ? undefined : getData(func);\r\n\r\n var newData = [\r\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\r\n argPos, ary, arity\r\n ];\r\n\r\n if (data) {\r\n mergeData(newData, data);\r\n }\r\n func = newData[0];\r\n bitmask = newData[1];\r\n thisArg = newData[2];\r\n partials = newData[3];\r\n holders = newData[4];\r\n arity = newData[9] = newData[9] === undefined\r\n ? (isBindKey ? 0 : func.length)\r\n : nativeMax(newData[9] - length, 0);\r\n\r\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\r\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\r\n }\r\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\r\n var result = createBind(func, bitmask, thisArg);\r\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\r\n result = createCurry(func, bitmask, arity);\r\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\r\n result = createPartial(func, bitmask, thisArg, partials);\r\n } else {\r\n result = createHybrid.apply(undefined, newData);\r\n }\r\n var setter = data ? baseSetData : setData;\r\n return setWrapToString(setter(result, newData), func, bitmask);\r\n }\r\n\r\n /**\r\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\r\n * objects into destination objects that are passed thru.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to merge.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @param {Object} source The parent object of `srcValue`.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\r\n if (isObject(objValue) && isObject(srcValue)) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, objValue);\r\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\r\n stack['delete'](srcValue);\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\r\n * objects.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {string} key The key of the property to inspect.\r\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\r\n */\r\n function customOmitClone(value) {\r\n return isPlainObject(value) ? undefined : value;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for arrays with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Array} array The array to compare.\r\n * @param {Array} other The other array to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `array` and `other` objects.\r\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r\n */\r\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n arrLength = array.length,\r\n othLength = other.length;\r\n\r\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(array);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var index = -1,\r\n result = true,\r\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\r\n\r\n stack.set(array, other);\r\n stack.set(other, array);\r\n\r\n // Ignore non-index properties.\r\n while (++index < arrLength) {\r\n var arrValue = array[index],\r\n othValue = other[index];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, arrValue, index, other, array, stack)\r\n : customizer(arrValue, othValue, index, array, other, stack);\r\n }\r\n if (compared !== undefined) {\r\n if (compared) {\r\n continue;\r\n }\r\n result = false;\r\n break;\r\n }\r\n // Recursively compare arrays (susceptible to call stack limits).\r\n if (seen) {\r\n if (!arraySome(other, function(othValue, othIndex) {\r\n if (!cacheHas(seen, othIndex) &&\r\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\r\n return seen.push(othIndex);\r\n }\r\n })) {\r\n result = false;\r\n break;\r\n }\r\n } else if (!(\r\n arrValue === othValue ||\r\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n }\r\n stack['delete'](array);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for comparing objects of\r\n * the same `toStringTag`.\r\n *\r\n * **Note:** This function only supports comparing values with tags of\r\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {string} tag The `toStringTag` of the objects to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\r\n switch (tag) {\r\n case dataViewTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n (object.byteOffset != other.byteOffset)) {\r\n return false;\r\n }\r\n object = object.buffer;\r\n other = other.buffer;\r\n\r\n case arrayBufferTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\r\n return false;\r\n }\r\n return true;\r\n\r\n case boolTag:\r\n case dateTag:\r\n case numberTag:\r\n // Coerce booleans to `1` or `0` and dates to milliseconds.\r\n // Invalid dates are coerced to `NaN`.\r\n return eq(+object, +other);\r\n\r\n case errorTag:\r\n return object.name == other.name && object.message == other.message;\r\n\r\n case regexpTag:\r\n case stringTag:\r\n // Coerce regexes to strings and treat strings, primitives and objects,\r\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\r\n // for more details.\r\n return object == (other + '');\r\n\r\n case mapTag:\r\n var convert = mapToArray;\r\n\r\n case setTag:\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\r\n convert || (convert = setToArray);\r\n\r\n if (object.size != other.size && !isPartial) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked) {\r\n return stacked == other;\r\n }\r\n bitmask |= COMPARE_UNORDERED_FLAG;\r\n\r\n // Recursively compare objects (susceptible to call stack limits).\r\n stack.set(object, other);\r\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\r\n stack['delete'](object);\r\n return result;\r\n\r\n case symbolTag:\r\n if (symbolValueOf) {\r\n return symbolValueOf.call(object) == symbolValueOf.call(other);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for objects with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n objProps = getAllKeys(object),\r\n objLength = objProps.length,\r\n othProps = getAllKeys(other),\r\n othLength = othProps.length;\r\n\r\n if (objLength != othLength && !isPartial) {\r\n return false;\r\n }\r\n var index = objLength;\r\n while (index--) {\r\n var key = objProps[index];\r\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\r\n return false;\r\n }\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var result = true;\r\n stack.set(object, other);\r\n stack.set(other, object);\r\n\r\n var skipCtor = isPartial;\r\n while (++index < objLength) {\r\n key = objProps[index];\r\n var objValue = object[key],\r\n othValue = other[key];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, objValue, key, other, object, stack)\r\n : customizer(objValue, othValue, key, object, other, stack);\r\n }\r\n // Recursively compare objects (susceptible to call stack limits).\r\n if (!(compared === undefined\r\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\r\n : compared\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n skipCtor || (skipCtor = key == 'constructor');\r\n }\r\n if (result && !skipCtor) {\r\n var objCtor = object.constructor,\r\n othCtor = other.constructor;\r\n\r\n // Non `Object` object instances with different constructors are not equal.\r\n if (objCtor != othCtor &&\r\n ('constructor' in object && 'constructor' in other) &&\r\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r\n result = false;\r\n }\r\n }\r\n stack['delete'](object);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which flattens the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function flatRest(func) {\r\n return setToString(overRest(func, undefined, flatten), func + '');\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable property names and symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeys(object) {\r\n return baseGetAllKeys(object, keys, getSymbols);\r\n }\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeysIn(object) {\r\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\r\n }\r\n\r\n /**\r\n * Gets metadata for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {*} Returns the metadata for `func`.\r\n */\r\n var getData = !metaMap ? noop : function(func) {\r\n return metaMap.get(func);\r\n };\r\n\r\n /**\r\n * Gets the name of `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {string} Returns the function name.\r\n */\r\n function getFuncName(func) {\r\n var result = (func.name + ''),\r\n array = realNames[result],\r\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\r\n\r\n while (length--) {\r\n var data = array[length],\r\n otherFunc = data.func;\r\n if (otherFunc == null || otherFunc == func) {\r\n return data.name;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the argument placeholder value for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to inspect.\r\n * @returns {*} Returns the placeholder value.\r\n */\r\n function getHolder(func) {\r\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\r\n return object.placeholder;\r\n }\r\n\r\n /**\r\n * Gets the data for `map`.\r\n *\r\n * @private\r\n * @param {Object} map The map to query.\r\n * @param {string} key The reference key.\r\n * @returns {*} Returns the map data.\r\n */\r\n function getMapData(map, key) {\r\n var data = map.__data__;\r\n return isKeyable(key)\r\n ? data[typeof key == 'string' ? 'string' : 'hash']\r\n : data.map;\r\n }\r\n\r\n /**\r\n * Gets the property names, values, and compare flags of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the match data of `object`.\r\n */\r\n function getMatchData(object) {\r\n var result = keys(object),\r\n length = result.length;\r\n\r\n while (length--) {\r\n var key = result[length],\r\n value = object[key];\r\n\r\n result[length] = [key, value, isStrictComparable(value)];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the native function at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the method to get.\r\n * @returns {*} Returns the function if it's native, else `undefined`.\r\n */\r\n function getNative(object, key) {\r\n var value = getValue(object, key);\r\n return baseIsNative(value) ? value : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the raw `toStringTag`.\r\n */\r\n function getRawTag(value) {\r\n var isOwn = hasOwnProperty.call(value, symToStringTag),\r\n tag = value[symToStringTag];\r\n\r\n try {\r\n value[symToStringTag] = undefined;\r\n var unmasked = true;\r\n } catch (e) {}\r\n\r\n var result = nativeObjectToString.call(value);\r\n if (unmasked) {\r\n if (isOwn) {\r\n value[symToStringTag] = tag;\r\n } else {\r\n delete value[symToStringTag];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\r\n if (object == null) {\r\n return [];\r\n }\r\n object = Object(object);\r\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\r\n return propertyIsEnumerable.call(object, symbol);\r\n });\r\n };\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\r\n var result = [];\r\n while (object) {\r\n arrayPush(result, getSymbols(object));\r\n object = getPrototype(object);\r\n }\r\n return result;\r\n };\r\n\r\n /**\r\n * Gets the `toStringTag` of `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n var getTag = baseGetTag;\r\n\r\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\r\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\r\n (Map && getTag(new Map) != mapTag) ||\r\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\r\n (Set && getTag(new Set) != setTag) ||\r\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\r\n getTag = function(value) {\r\n var result = baseGetTag(value),\r\n Ctor = result == objectTag ? value.constructor : undefined,\r\n ctorString = Ctor ? toSource(Ctor) : '';\r\n\r\n if (ctorString) {\r\n switch (ctorString) {\r\n case dataViewCtorString: return dataViewTag;\r\n case mapCtorString: return mapTag;\r\n case promiseCtorString: return promiseTag;\r\n case setCtorString: return setTag;\r\n case weakMapCtorString: return weakMapTag;\r\n }\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\r\n *\r\n * @private\r\n * @param {number} start The start of the view.\r\n * @param {number} end The end of the view.\r\n * @param {Array} transforms The transformations to apply to the view.\r\n * @returns {Object} Returns an object containing the `start` and `end`\r\n * positions of the view.\r\n */\r\n function getView(start, end, transforms) {\r\n var index = -1,\r\n length = transforms.length;\r\n\r\n while (++index < length) {\r\n var data = transforms[index],\r\n size = data.size;\r\n\r\n switch (data.type) {\r\n case 'drop': start += size; break;\r\n case 'dropRight': end -= size; break;\r\n case 'take': end = nativeMin(end, start + size); break;\r\n case 'takeRight': start = nativeMax(start, end - size); break;\r\n }\r\n }\r\n return { 'start': start, 'end': end };\r\n }\r\n\r\n /**\r\n * Extracts wrapper details from the `source` body comment.\r\n *\r\n * @private\r\n * @param {string} source The source to inspect.\r\n * @returns {Array} Returns the wrapper details.\r\n */\r\n function getWrapDetails(source) {\r\n var match = source.match(reWrapDetails);\r\n return match ? match[1].split(reSplitDetails) : [];\r\n }\r\n\r\n /**\r\n * Checks if `path` exists on `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @param {Function} hasFunc The function to check properties.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n */\r\n function hasPath(object, path, hasFunc) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n result = false;\r\n\r\n while (++index < length) {\r\n var key = toKey(path[index]);\r\n if (!(result = object != null && hasFunc(object, key))) {\r\n break;\r\n }\r\n object = object[key];\r\n }\r\n if (result || ++index != length) {\r\n return result;\r\n }\r\n length = object == null ? 0 : object.length;\r\n return !!length && isLength(length) && isIndex(key, length) &&\r\n (isArray(object) || isArguments(object));\r\n }\r\n\r\n /**\r\n * Initializes an array clone.\r\n *\r\n * @private\r\n * @param {Array} array The array to clone.\r\n * @returns {Array} Returns the initialized clone.\r\n */\r\n function initCloneArray(array) {\r\n var length = array.length,\r\n result = new array.constructor(length);\r\n\r\n // Add properties assigned by `RegExp#exec`.\r\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r\n result.index = array.index;\r\n result.input = array.input;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes an object clone.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneObject(object) {\r\n return (typeof object.constructor == 'function' && !isPrototype(object))\r\n ? baseCreate(getPrototype(object))\r\n : {};\r\n }\r\n\r\n /**\r\n * Initializes an object clone based on its `toStringTag`.\r\n *\r\n * **Note:** This function only supports cloning values with tags of\r\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @param {string} tag The `toStringTag` of the object to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneByTag(object, tag, isDeep) {\r\n var Ctor = object.constructor;\r\n switch (tag) {\r\n case arrayBufferTag:\r\n return cloneArrayBuffer(object);\r\n\r\n case boolTag:\r\n case dateTag:\r\n return new Ctor(+object);\r\n\r\n case dataViewTag:\r\n return cloneDataView(object, isDeep);\r\n\r\n case float32Tag: case float64Tag:\r\n case int8Tag: case int16Tag: case int32Tag:\r\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r\n return cloneTypedArray(object, isDeep);\r\n\r\n case mapTag:\r\n return new Ctor;\r\n\r\n case numberTag:\r\n case stringTag:\r\n return new Ctor(object);\r\n\r\n case regexpTag:\r\n return cloneRegExp(object);\r\n\r\n case setTag:\r\n return new Ctor;\r\n\r\n case symbolTag:\r\n return cloneSymbol(object);\r\n }\r\n }\r\n\r\n /**\r\n * Inserts wrapper `details` in a comment at the top of the `source` body.\r\n *\r\n * @private\r\n * @param {string} source The source to modify.\r\n * @returns {Array} details The details to insert.\r\n * @returns {string} Returns the modified source.\r\n */\r\n function insertWrapDetails(source, details) {\r\n var length = details.length;\r\n if (!length) {\r\n return source;\r\n }\r\n var lastIndex = length - 1;\r\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\r\n details = details.join(length > 2 ? ', ' : ' ');\r\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\r\n }\r\n\r\n /**\r\n * Checks if `value` is a flattenable `arguments` object or array.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\r\n */\r\n function isFlattenable(value) {\r\n return isArray(value) || isArguments(value) ||\r\n !!(spreadableSymbol && value && value[spreadableSymbol]);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like index.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r\n */\r\n function isIndex(value, length) {\r\n var type = typeof value;\r\n length = length == null ? MAX_SAFE_INTEGER : length;\r\n\r\n return !!length &&\r\n (type == 'number' ||\r\n (type != 'symbol' && reIsUint.test(value))) &&\r\n (value > -1 && value % 1 == 0 && value < length);\r\n }\r\n\r\n /**\r\n * Checks if the given arguments are from an iteratee call.\r\n *\r\n * @private\r\n * @param {*} value The potential iteratee value argument.\r\n * @param {*} index The potential iteratee index or key argument.\r\n * @param {*} object The potential iteratee object argument.\r\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\r\n * else `false`.\r\n */\r\n function isIterateeCall(value, index, object) {\r\n if (!isObject(object)) {\r\n return false;\r\n }\r\n var type = typeof index;\r\n if (type == 'number'\r\n ? (isArrayLike(object) && isIndex(index, object.length))\r\n : (type == 'string' && index in object)\r\n ) {\r\n return eq(object[index], value);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a property name and not a property path.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r\n */\r\n function isKey(value, object) {\r\n if (isArray(value)) {\r\n return false;\r\n }\r\n var type = typeof value;\r\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\r\n value == null || isSymbol(value)) {\r\n return true;\r\n }\r\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\r\n (object != null && value in Object(object));\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for use as unique object key.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\r\n */\r\n function isKeyable(value) {\r\n var type = typeof value;\r\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\r\n ? (value !== '__proto__')\r\n : (value === null);\r\n }\r\n\r\n /**\r\n * Checks if `func` has a lazy counterpart.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\r\n * else `false`.\r\n */\r\n function isLaziable(func) {\r\n var funcName = getFuncName(func),\r\n other = lodash[funcName];\r\n\r\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r\n return false;\r\n }\r\n if (func === other) {\r\n return true;\r\n }\r\n var data = getData(other);\r\n return !!data && func === data[0];\r\n }\r\n\r\n /**\r\n * Checks if `func` has its source masked.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\r\n */\r\n function isMasked(func) {\r\n return !!maskSrcKey && (maskSrcKey in func);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely a prototype object.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\r\n */\r\n function isPrototype(value) {\r\n var Ctor = value && value.constructor,\r\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\r\n\r\n return value === proto;\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` if suitable for strict\r\n * equality comparisons, else `false`.\r\n */\r\n function isStrictComparable(value) {\r\n return value === value && !isObject(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `matchesProperty` for source values suitable\r\n * for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function matchesStrictComparable(key, srcValue) {\r\n return function(object) {\r\n if (object == null) {\r\n return false;\r\n }\r\n return object[key] === srcValue &&\r\n (srcValue !== undefined || (key in Object(object)));\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.memoize` which clears the memoized function's\r\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\r\n *\r\n * @private\r\n * @param {Function} func The function to have its output memoized.\r\n * @returns {Function} Returns the new memoized function.\r\n */\r\n function memoizeCapped(func) {\r\n var result = memoize(func, function(key) {\r\n if (cache.size === MAX_MEMOIZE_SIZE) {\r\n cache.clear();\r\n }\r\n return key;\r\n });\r\n\r\n var cache = result.cache;\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the function metadata of `source` into `data`.\r\n *\r\n * Merging metadata reduces the number of wrappers used to invoke a function.\r\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r\n * may be applied regardless of execution order. Methods like `_.ary` and\r\n * `_.rearg` modify function arguments, making the order in which they are\r\n * executed important, preventing the merging of metadata. However, we make\r\n * an exception for a safe combined case where curried functions have `_.ary`\r\n * and or `_.rearg` applied.\r\n *\r\n * @private\r\n * @param {Array} data The destination metadata.\r\n * @param {Array} source The source metadata.\r\n * @returns {Array} Returns `data`.\r\n */\r\n function mergeData(data, source) {\r\n var bitmask = data[1],\r\n srcBitmask = source[1],\r\n newBitmask = bitmask | srcBitmask,\r\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\r\n\r\n var isCombo =\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\r\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\r\n\r\n // Exit early if metadata can't be merged.\r\n if (!(isCommon || isCombo)) {\r\n return data;\r\n }\r\n // Use source `thisArg` if available.\r\n if (srcBitmask & WRAP_BIND_FLAG) {\r\n data[2] = source[2];\r\n // Set when currying a bound function.\r\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\r\n }\r\n // Compose partial arguments.\r\n var value = source[3];\r\n if (value) {\r\n var partials = data[3];\r\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\r\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\r\n }\r\n // Compose partial right arguments.\r\n value = source[5];\r\n if (value) {\r\n partials = data[5];\r\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\r\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\r\n }\r\n // Use source `argPos` if available.\r\n value = source[7];\r\n if (value) {\r\n data[7] = value;\r\n }\r\n // Use source `ary` if it's smaller.\r\n if (srcBitmask & WRAP_ARY_FLAG) {\r\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r\n }\r\n // Use source `arity` if one is not provided.\r\n if (data[9] == null) {\r\n data[9] = source[9];\r\n }\r\n // Use source `func` and merge bitmasks.\r\n data[0] = source[0];\r\n data[1] = newBitmask;\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * This function is like\r\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * except that it includes inherited enumerable properties.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function nativeKeysIn(object) {\r\n var result = [];\r\n if (object != null) {\r\n for (var key in Object(object)) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `value` to a string using `Object.prototype.toString`.\r\n *\r\n * @private\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n */\r\n function objectToString(value) {\r\n return nativeObjectToString.call(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which transforms the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @param {Function} transform The rest array transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overRest(func, start, transform) {\r\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\r\n return function() {\r\n var args = arguments,\r\n index = -1,\r\n length = nativeMax(args.length - start, 0),\r\n array = Array(length);\r\n\r\n while (++index < length) {\r\n array[index] = args[start + index];\r\n }\r\n index = -1;\r\n var otherArgs = Array(start + 1);\r\n while (++index < start) {\r\n otherArgs[index] = args[index];\r\n }\r\n otherArgs[start] = transform(array);\r\n return apply(func, this, otherArgs);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the parent value at `path` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} path The path to get the parent value of.\r\n * @returns {*} Returns the parent value.\r\n */\r\n function parent(object, path) {\r\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\r\n }\r\n\r\n /**\r\n * Reorder `array` according to the specified indexes where the element at\r\n * the first index is assigned as the first element, the element at\r\n * the second index is assigned as the second element, and so on.\r\n *\r\n * @private\r\n * @param {Array} array The array to reorder.\r\n * @param {Array} indexes The arranged array indexes.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function reorder(array, indexes) {\r\n var arrLength = array.length,\r\n length = nativeMin(indexes.length, arrLength),\r\n oldArray = copyArray(array);\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Sets metadata for `func`.\r\n *\r\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r\n * period of time, it will trip its breaker and transition to an identity\r\n * function to avoid garbage collection pauses in V8. See\r\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\r\n * for more details.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setData = shortOut(baseSetData);\r\n\r\n /**\r\n * Sets the `toString` method of `func` to return `string`.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setToString = shortOut(baseSetToString);\r\n\r\n /**\r\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\r\n * with wrapper details in a comment at the top of the source body.\r\n *\r\n * @private\r\n * @param {Function} wrapper The function to modify.\r\n * @param {Function} reference The reference function.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Function} Returns `wrapper`.\r\n */\r\n function setWrapToString(wrapper, reference, bitmask) {\r\n var source = (reference + '');\r\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\r\n }\r\n\r\n /**\r\n * Creates a function that'll short out and invoke `identity` instead\r\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\r\n * milliseconds.\r\n *\r\n * @private\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new shortable function.\r\n */\r\n function shortOut(func) {\r\n var count = 0,\r\n lastCalled = 0;\r\n\r\n return function() {\r\n var stamp = nativeNow(),\r\n remaining = HOT_SPAN - (stamp - lastCalled);\r\n\r\n lastCalled = stamp;\r\n if (remaining > 0) {\r\n if (++count >= HOT_COUNT) {\r\n return arguments[0];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n return func.apply(undefined, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Converts `string` to a property path array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the property path array.\r\n */\r\n var stringToPath = memoizeCapped(function(string) {\r\n var result = [];\r\n if (string.charCodeAt(0) === 46 /* . */) {\r\n result.push('');\r\n }\r\n string.replace(rePropName, function(match, number, quote, subString) {\r\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Converts `value` to a string key if it's not a string or symbol.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {string|symbol} Returns the key.\r\n */\r\n function toKey(value) {\r\n if (typeof value == 'string' || isSymbol(value)) {\r\n return value;\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * Converts `func` to its source code.\r\n *\r\n * @private\r\n * @param {Function} func The function to convert.\r\n * @returns {string} Returns the source code.\r\n */\r\n function toSource(func) {\r\n if (func != null) {\r\n try {\r\n return funcToString.call(func);\r\n } catch (e) {}\r\n try {\r\n return (func + '');\r\n } catch (e) {}\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Updates wrapper `details` based on `bitmask` flags.\r\n *\r\n * @private\r\n * @returns {Array} details The details to modify.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Array} Returns `details`.\r\n */\r\n function updateWrapDetails(details, bitmask) {\r\n arrayEach(wrapFlags, function(pair) {\r\n var value = '_.' + pair[0];\r\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\r\n details.push(value);\r\n }\r\n });\r\n return details.sort();\r\n }\r\n\r\n /**\r\n * Creates a clone of `wrapper`.\r\n *\r\n * @private\r\n * @param {Object} wrapper The wrapper to clone.\r\n * @returns {Object} Returns the cloned wrapper.\r\n */\r\n function wrapperClone(wrapper) {\r\n if (wrapper instanceof LazyWrapper) {\r\n return wrapper.clone();\r\n }\r\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\r\n result.__actions__ = copyArray(wrapper.__actions__);\r\n result.__index__ = wrapper.__index__;\r\n result.__values__ = wrapper.__values__;\r\n return result;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array with all falsey values removed. The values `false`, `null`,\r\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to compact.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.compact([0, 1, false, 2, '', 3]);\r\n * // => [1, 2, 3]\r\n */\r\n function compact(array) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new array concatenating `array` with any additional arrays\r\n * and/or values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to concatenate.\r\n * @param {...*} [values] The values to concatenate.\r\n * @returns {Array} Returns the new concatenated array.\r\n * @example\r\n *\r\n * var array = [1];\r\n * var other = _.concat(array, 2, [3], [[4]]);\r\n *\r\n * console.log(other);\r\n * // => [1, 2, 3, [4]]\r\n *\r\n * console.log(array);\r\n * // => [1]\r\n */\r\n function concat() {\r\n var length = arguments.length;\r\n if (!length) {\r\n return [];\r\n }\r\n var args = Array(length - 1),\r\n array = arguments[0],\r\n index = length;\r\n\r\n while (index--) {\r\n args[index - 1] = arguments[index];\r\n }\r\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\r\n }\r\n\r\n /**\r\n * Creates an array of `array` values not included in the other given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.without, _.xor\r\n * @example\r\n *\r\n * _.difference([2, 1], [2, 3]);\r\n * // => [1]\r\n */\r\n var difference = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.drop([1, 2, 3]);\r\n * // => [2, 3]\r\n *\r\n * _.drop([1, 2, 3], 2);\r\n * // => [3]\r\n *\r\n * _.drop([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.drop([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function drop(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the index of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\r\n * // => 0\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findIndex(users, { 'user': 'fred', 'active': false });\r\n * // => 1\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findIndex(users, ['active', false]);\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findIndex(users, 'active');\r\n * // => 2\r\n */\r\n function findIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\r\n }\r\n\r\n /**\r\n * This method is like `_.findIndex` except that it iterates over elements\r\n * of `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\r\n * // => 2\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\r\n * // => 0\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastIndex(users, ['active', false]);\r\n * // => 2\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastIndex(users, 'active');\r\n * // => 0\r\n */\r\n function findLastIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length - 1;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = fromIndex < 0\r\n ? nativeMax(length + index, 0)\r\n : nativeMin(index, length - 1);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\r\n }\r\n\r\n /**\r\n * Flattens `array` a single level deep.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flatten([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, [3, [4]], 5]\r\n */\r\n function flatten(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, 1) : [];\r\n }\r\n\r\n /**\r\n * Recursively flattens `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, 3, 4, 5]\r\n */\r\n function flattenDeep(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, INFINITY) : [];\r\n }\r\n\r\n /**\r\n * Gets the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias first\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the first element of `array`.\r\n * @example\r\n *\r\n * _.head([1, 2, 3]);\r\n * // => 1\r\n *\r\n * _.head([]);\r\n * // => undefined\r\n */\r\n function head(array) {\r\n return (array && array.length) ? array[0] : undefined;\r\n }\r\n\r\n /**\r\n * Gets the index at which the first occurrence of `value` is found in `array`\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. If `fromIndex` is negative, it's used as the\r\n * offset from the end of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.indexOf([1, 2, 1, 2], 2);\r\n * // => 1\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.indexOf([1, 2, 1, 2], 2, 2);\r\n * // => 3\r\n */\r\n function indexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseIndexOf(array, value, index);\r\n }\r\n\r\n /**\r\n * Gets all but the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.initial([1, 2, 3]);\r\n * // => [1, 2]\r\n */\r\n function initial(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 0, -1) : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values that are included in all given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersection([2, 1], [2, 3]);\r\n * // => [2]\r\n */\r\n var intersection = baseRest(function(arrays) {\r\n var mapped = arrayMap(arrays, castArrayLikeObject);\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped)\r\n : [];\r\n });\r\n\r\n /**\r\n * Gets the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the last element of `array`.\r\n * @example\r\n *\r\n * _.last([1, 2, 3]);\r\n * // => 3\r\n */\r\n function last(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? array[length - 1] : undefined;\r\n }\r\n\r\n /**\r\n * Reverses `array` so that the first element becomes the last, the second\r\n * element becomes the second to last, and so on.\r\n *\r\n * **Note:** This method mutates `array` and is based on\r\n * [`Array#reverse`](https://mdn.io/Array/reverse).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.reverse(array);\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function reverse(array) {\r\n return array == null ? array : nativeReverse.call(array);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` from `start` up to, but not including, `end`.\r\n *\r\n * **Note:** This method is used instead of\r\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\r\n * returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function slice(array, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\r\n start = 0;\r\n end = length;\r\n }\r\n else {\r\n start = start == null ? 0 : toInteger(start);\r\n end = end === undefined ? length : toInteger(end);\r\n }\r\n return baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.take([1, 2, 3]);\r\n * // => [1]\r\n *\r\n * _.take([1, 2, 3], 2);\r\n * // => [1, 2]\r\n *\r\n * _.take([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.take([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function take(array, n, guard) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.takeRight([1, 2, 3]);\r\n * // => [3]\r\n *\r\n * _.takeRight([1, 2, 3], 2);\r\n * // => [2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function takeRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates an array of unique values, in order, from all given arrays using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.union([2], [1, 2]);\r\n * // => [2, 1]\r\n */\r\n var union = baseRest(function(arrays) {\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\r\n });\r\n\r\n /**\r\n * Creates a duplicate-free version of an array, using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons, in which only the first occurrence of each element\r\n * is kept. The order of result values is determined by the order they occur\r\n * in the array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniq([2, 1, 2]);\r\n * // => [2, 1]\r\n */\r\n function uniq(array) {\r\n return (array && array.length) ? baseUniq(array) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `iteratee` which is\r\n * invoked for each element in `array` to generate the criterion by which\r\n * uniqueness is computed. The order of result values is determined by the\r\n * order they occur in the array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n function uniqBy(array, iteratee) {\r\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts an array of grouped\r\n * elements and creates an array regrouping the elements to their pre-zip\r\n * configuration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.2.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n *\r\n * _.unzip(zipped);\r\n * // => [['a', 'b'], [1, 2], [true, false]]\r\n */\r\n function unzip(array) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var length = 0;\r\n array = arrayFilter(array, function(group) {\r\n if (isArrayLikeObject(group)) {\r\n length = nativeMax(group.length, length);\r\n return true;\r\n }\r\n });\r\n return baseTimes(length, function(index) {\r\n return arrayMap(array, baseProperty(index));\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array excluding all given values using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.pull`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...*} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.xor\r\n * @example\r\n *\r\n * _.without([2, 1, 2, 3], 1, 2);\r\n * // => [3]\r\n */\r\n var without = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, values)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates an array of grouped elements, the first of which contains the\r\n * first elements of the given arrays, the second of which contains the\r\n * second elements of the given arrays, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n */\r\n var zip = baseRest(unzip);\r\n\r\n /**\r\n * This method is like `_.fromPairs` except that it accepts two arrays,\r\n * one of property identifiers and one of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.4.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObject(['a', 'b'], [1, 2]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function zipObject(props, values) {\r\n return baseZipObject(props || [], values || [], assignValue);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\r\n * chain sequences enabled. The result of such sequences must be unwrapped\r\n * with `_#value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Seq\r\n * @param {*} value The value to wrap.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'pebbles', 'age': 1 }\r\n * ];\r\n *\r\n * var youngest = _\r\n * .chain(users)\r\n * .sortBy('age')\r\n * .map(function(o) {\r\n * return o.user + ' is ' + o.age;\r\n * })\r\n * .head()\r\n * .value();\r\n * // => 'pebbles is 1'\r\n */\r\n function chain(value) {\r\n var result = lodash(value);\r\n result.__chain__ = true;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method invokes `interceptor` and returns `value`. The interceptor\r\n * is invoked with one argument; (value). The purpose of this method is to\r\n * \"tap into\" a method chain sequence in order to modify intermediate results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * _([1, 2, 3])\r\n * .tap(function(array) {\r\n * // Mutate input array.\r\n * array.pop();\r\n * })\r\n * .reverse()\r\n * .value();\r\n * // => [2, 1]\r\n */\r\n function tap(value, interceptor) {\r\n interceptor(value);\r\n return value;\r\n }\r\n\r\n /**\r\n * This method is like `_.tap` except that it returns the result of `interceptor`.\r\n * The purpose of this method is to \"pass thru\" values replacing intermediate\r\n * results in a method chain sequence.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns the result of `interceptor`.\r\n * @example\r\n *\r\n * _(' abc ')\r\n * .chain()\r\n * .trim()\r\n * .thru(function(value) {\r\n * return [value];\r\n * })\r\n * .value();\r\n * // => ['abc']\r\n */\r\n function thru(value, interceptor) {\r\n return interceptor(value);\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.at`.\r\n *\r\n * @name at\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Seq\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _(object).at(['a[0].b.c', 'a[1]']).value();\r\n * // => [3, 4]\r\n */\r\n var wrapperAt = flatRest(function(paths) {\r\n var length = paths.length,\r\n start = length ? paths[0] : 0,\r\n value = this.__wrapped__,\r\n interceptor = function(object) { return baseAt(object, paths); };\r\n\r\n if (length > 1 || this.__actions__.length ||\r\n !(value instanceof LazyWrapper) || !isIndex(start)) {\r\n return this.thru(interceptor);\r\n }\r\n value = value.slice(start, +start + (length ? 1 : 0));\r\n value.__actions__.push({\r\n 'func': thru,\r\n 'args': [interceptor],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\r\n if (length && !array.length) {\r\n array.push(undefined);\r\n }\r\n return array;\r\n });\r\n });\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\r\n *\r\n * @name chain\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 }\r\n * ];\r\n *\r\n * // A sequence without explicit chaining.\r\n * _(users).head();\r\n * // => { 'user': 'barney', 'age': 36 }\r\n *\r\n * // A sequence with explicit chaining.\r\n * _(users)\r\n * .chain()\r\n * .head()\r\n * .pick('user')\r\n * .value();\r\n * // => { 'user': 'barney' }\r\n */\r\n function wrapperChain() {\r\n return chain(this);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence and returns the wrapped result.\r\n *\r\n * @name commit\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2];\r\n * var wrapped = _(array).push(3);\r\n *\r\n * console.log(array);\r\n * // => [1, 2]\r\n *\r\n * wrapped = wrapped.commit();\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n *\r\n * wrapped.last();\r\n * // => 3\r\n *\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperCommit() {\r\n return new LodashWrapper(this.value(), this.__chain__);\r\n }\r\n\r\n /**\r\n * Gets the next value on a wrapped object following the\r\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\r\n *\r\n * @name next\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the next iterator value.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 1 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 2 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': true, 'value': undefined }\r\n */\r\n function wrapperNext() {\r\n if (this.__values__ === undefined) {\r\n this.__values__ = toArray(this.value());\r\n }\r\n var done = this.__index__ >= this.__values__.length,\r\n value = done ? undefined : this.__values__[this.__index__++];\r\n\r\n return { 'done': done, 'value': value };\r\n }\r\n\r\n /**\r\n * Enables the wrapper to be iterable.\r\n *\r\n * @name Symbol.iterator\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the wrapper object.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped[Symbol.iterator]() === wrapped;\r\n * // => true\r\n *\r\n * Array.from(wrapped);\r\n * // => [1, 2]\r\n */\r\n function wrapperToIterator() {\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\r\n *\r\n * @name plant\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @param {*} value The value to plant.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2]).map(square);\r\n * var other = wrapped.plant([3, 4]);\r\n *\r\n * other.value();\r\n * // => [9, 16]\r\n *\r\n * wrapped.value();\r\n * // => [1, 4]\r\n */\r\n function wrapperPlant(value) {\r\n var result,\r\n parent = this;\r\n\r\n while (parent instanceof baseLodash) {\r\n var clone = wrapperClone(parent);\r\n clone.__index__ = 0;\r\n clone.__values__ = undefined;\r\n if (result) {\r\n previous.__wrapped__ = clone;\r\n } else {\r\n result = clone;\r\n }\r\n var previous = clone;\r\n parent = parent.__wrapped__;\r\n }\r\n previous.__wrapped__ = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.reverse`.\r\n *\r\n * **Note:** This method mutates the wrapped array.\r\n *\r\n * @name reverse\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _(array).reverse().value()\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function wrapperReverse() {\r\n var value = this.__wrapped__;\r\n if (value instanceof LazyWrapper) {\r\n var wrapped = value;\r\n if (this.__actions__.length) {\r\n wrapped = new LazyWrapper(this);\r\n }\r\n wrapped = wrapped.reverse();\r\n wrapped.__actions__.push({\r\n 'func': thru,\r\n 'args': [reverse],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(wrapped, this.__chain__);\r\n }\r\n return this.thru(reverse);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence to resolve the unwrapped value.\r\n *\r\n * @name value\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias toJSON, valueOf\r\n * @category Seq\r\n * @returns {*} Returns the resolved unwrapped value.\r\n * @example\r\n *\r\n * _([1, 2, 3]).value();\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperValue() {\r\n return baseWrapperValue(this.__wrapped__, this.__actions__);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the number of times the key was returned by `iteratee`. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': 1, '6': 2 }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.countBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': 2, '5': 1 }\r\n */\r\n var countBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n ++result[key];\r\n } else {\r\n baseAssignValue(result, key, 1);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\r\n * Iteration is stopped once `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * **Note:** This method returns `true` for\r\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\r\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\r\n * elements of empty collections.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.every([true, 1, null, 'yes'], Boolean);\r\n * // => false\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.every(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.every(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.every(users, 'active');\r\n * // => false\r\n */\r\n function every(collection, predicate, guard) {\r\n var func = isArray(collection) ? arrayEvery : baseEvery;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning an array of all elements\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * **Note:** Unlike `_.remove`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.reject\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * _.filter(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, { 'age': 36, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.filter(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function filter(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning the first element\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false },\r\n * { 'user': 'pebbles', 'age': 1, 'active': true }\r\n * ];\r\n *\r\n * _.find(users, function(o) { return o.age < 40; });\r\n * // => object for 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.find(users, { 'age': 1, 'active': true });\r\n * // => object for 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.find(users, ['active', false]);\r\n * // => object for 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.find(users, 'active');\r\n * // => object for 'barney'\r\n */\r\n var find = createFind(findIndex);\r\n\r\n /**\r\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\r\n * The iteratee is invoked with three arguments: (value, index|key, collection).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\r\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\r\n * or `_.forOwn` for object iteration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias each\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEachRight\r\n * @example\r\n *\r\n * _.forEach([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `1` then `2`.\r\n *\r\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forEach(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEach : baseEach;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The order of grouped values\r\n * is determined by the order they occur in `collection`. The corresponding\r\n * value of each key is an array of elements responsible for generating the\r\n * key. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': [4.2], '6': [6.1, 6.3] }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.groupBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': ['one', 'two'], '5': ['three'] }\r\n */\r\n var groupBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n result[key].push(value);\r\n } else {\r\n baseAssignValue(result, key, [value]);\r\n }\r\n });\r\n\r\n /**\r\n * Creates an array of values by running each element in `collection` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r\n *\r\n * The guarded methods are:\r\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\r\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\r\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\r\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * _.map([4, 8], square);\r\n * // => [16, 64]\r\n *\r\n * _.map({ 'a': 4, 'b': 8 }, square);\r\n * // => [16, 64] (iteration order is not guaranteed)\r\n *\r\n * var users = [\r\n * { 'user': 'barney' },\r\n * { 'user': 'fred' }\r\n * ];\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, 'user');\r\n * // => ['barney', 'fred']\r\n */\r\n function map(collection, iteratee) {\r\n var func = isArray(collection) ? arrayMap : baseMap;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Reduces `collection` to a value which is the accumulated result of running\r\n * each element in `collection` thru `iteratee`, where each successive\r\n * invocation is supplied the return value of the previous. If `accumulator`\r\n * is not given, the first element of `collection` is used as the initial\r\n * value. The iteratee is invoked with four arguments:\r\n * (accumulator, value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\r\n *\r\n * The guarded methods are:\r\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\r\n * and `sortBy`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduceRight\r\n * @example\r\n *\r\n * _.reduce([1, 2], function(sum, n) {\r\n * return sum + n;\r\n * }, 0);\r\n * // => 3\r\n *\r\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * return result;\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\r\n */\r\n function reduce(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduce : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\r\n }\r\n\r\n /**\r\n * The opposite of `_.filter`; this method returns the elements of `collection`\r\n * that `predicate` does **not** return truthy for.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.filter\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true }\r\n * ];\r\n *\r\n * _.reject(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.reject(users, { 'age': 40, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.reject(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.reject(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function reject(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, negate(baseIteratee(predicate, 3)));\r\n }\r\n\r\n /**\r\n * Gets the size of `collection` by returning its length for array-like\r\n * values or the number of own enumerable string keyed properties for objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @returns {number} Returns the collection size.\r\n * @example\r\n *\r\n * _.size([1, 2, 3]);\r\n * // => 3\r\n *\r\n * _.size({ 'a': 1, 'b': 2 });\r\n * // => 2\r\n *\r\n * _.size('pebbles');\r\n * // => 7\r\n */\r\n function size(collection) {\r\n if (collection == null) {\r\n return 0;\r\n }\r\n if (isArrayLike(collection)) {\r\n return isString(collection) ? stringSize(collection) : collection.length;\r\n }\r\n var tag = getTag(collection);\r\n if (tag == mapTag || tag == setTag) {\r\n return collection.size;\r\n }\r\n return baseKeys(collection).length;\r\n }\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **any** element of `collection`.\r\n * Iteration is stopped once `predicate` returns truthy. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.some([null, 0, 'yes', false], Boolean);\r\n * // => true\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.some(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.some(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.some(users, 'active');\r\n * // => true\r\n */\r\n function some(collection, predicate, guard) {\r\n var func = isArray(collection) ? arraySome : baseSome;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of elements, sorted in ascending order by the results of\r\n * running each element in a collection thru each iteratee. This method\r\n * performs a stable sort, that is, it preserves the original sort order of\r\n * equal elements. The iteratees are invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'barney', 'age': 34 }\r\n * ];\r\n *\r\n * _.sortBy(users, [function(o) { return o.user; }]);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\r\n *\r\n * _.sortBy(users, ['user', 'age']);\r\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\r\n */\r\n var sortBy = baseRest(function(collection, iteratees) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n var length = iteratees.length;\r\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\r\n iteratees = [];\r\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\r\n iteratees = [iteratees[0]];\r\n }\r\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Gets the timestamp of the number of milliseconds that have elapsed since\r\n * the Unix epoch (1 January 1970 00:00:00 UTC).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Date\r\n * @returns {number} Returns the timestamp.\r\n * @example\r\n *\r\n * _.defer(function(stamp) {\r\n * console.log(_.now() - stamp);\r\n * }, _.now());\r\n * // => Logs the number of milliseconds it took for the deferred invocation.\r\n */\r\n var now = function() {\r\n return root.Date.now();\r\n };\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The opposite of `_.before`; this method creates a function that invokes\r\n * `func` once it's called `n` or more times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {number} n The number of calls before `func` is invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var saves = ['profile', 'settings'];\r\n *\r\n * var done = _.after(saves.length, function() {\r\n * console.log('done saving!');\r\n * });\r\n *\r\n * _.forEach(saves, function(type) {\r\n * asyncSave({ 'type': type, 'complete': done });\r\n * });\r\n * // => Logs 'done saving!' after the two async saves have completed.\r\n */\r\n function after(n, func) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n < 1) {\r\n return func.apply(this, arguments);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func`, with the `this` binding and arguments\r\n * of the created function, while it's called less than `n` times. Subsequent\r\n * calls to the created function return the result of the last `func` invocation.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {number} n The number of calls at which `func` is no longer invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * jQuery(element).on('click', _.before(5, addContactToList));\r\n * // => Allows adding up to 4 contacts to the list.\r\n */\r\n function before(n, func) {\r\n var result;\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n > 0) {\r\n result = func.apply(this, arguments);\r\n }\r\n if (n <= 1) {\r\n func = undefined;\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\r\n * and `partials` prepended to the arguments it receives.\r\n *\r\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\r\n * property of bound functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to bind.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * function greet(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n *\r\n * var object = { 'user': 'fred' };\r\n *\r\n * var bound = _.bind(greet, object, 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bind(greet, object, _, '!');\r\n * bound('hi');\r\n * // => 'hi fred!'\r\n */\r\n var bind = baseRest(function(func, thisArg, partials) {\r\n var bitmask = WRAP_BIND_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bind));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(func, bitmask, thisArg, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a debounced function that delays invoking `func` until after `wait`\r\n * milliseconds have elapsed since the last time the debounced function was\r\n * invoked. The debounced function comes with a `cancel` method to cancel\r\n * delayed `func` invocations and a `flush` method to immediately invoke them.\r\n * Provide `options` to indicate whether `func` should be invoked on the\r\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\r\n * with the last arguments provided to the debounced function. Subsequent\r\n * calls to the debounced function return the result of the last `func`\r\n * invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the debounced function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.debounce` and `_.throttle`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to debounce.\r\n * @param {number} [wait=0] The number of milliseconds to delay.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=false]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {number} [options.maxWait]\r\n * The maximum time `func` is allowed to be delayed before it's invoked.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new debounced function.\r\n * @example\r\n *\r\n * // Avoid costly calculations while the window size is in flux.\r\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\r\n *\r\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\r\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\r\n * 'leading': true,\r\n * 'trailing': false\r\n * }));\r\n *\r\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\r\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\r\n * var source = new EventSource('/stream');\r\n * jQuery(source).on('message', debounced);\r\n *\r\n * // Cancel the trailing debounced invocation.\r\n * jQuery(window).on('popstate', debounced.cancel);\r\n */\r\n function debounce(func, wait, options) {\r\n var lastArgs,\r\n lastThis,\r\n maxWait,\r\n result,\r\n timerId,\r\n lastCallTime,\r\n lastInvokeTime = 0,\r\n leading = false,\r\n maxing = false,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n wait = toNumber(wait) || 0;\r\n if (isObject(options)) {\r\n leading = !!options.leading;\r\n maxing = 'maxWait' in options;\r\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n\r\n function invokeFunc(time) {\r\n var args = lastArgs,\r\n thisArg = lastThis;\r\n\r\n lastArgs = lastThis = undefined;\r\n lastInvokeTime = time;\r\n result = func.apply(thisArg, args);\r\n return result;\r\n }\r\n\r\n function leadingEdge(time) {\r\n // Reset any `maxWait` timer.\r\n lastInvokeTime = time;\r\n // Start the timer for the trailing edge.\r\n timerId = setTimeout(timerExpired, wait);\r\n // Invoke the leading edge.\r\n return leading ? invokeFunc(time) : result;\r\n }\r\n\r\n function remainingWait(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime,\r\n timeWaiting = wait - timeSinceLastCall;\r\n\r\n return maxing\r\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\r\n : timeWaiting;\r\n }\r\n\r\n function shouldInvoke(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime;\r\n\r\n // Either this is the first call, activity has stopped and we're at the\r\n // trailing edge, the system time has gone backwards and we're treating\r\n // it as the trailing edge, or we've hit the `maxWait` limit.\r\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\r\n }\r\n\r\n function timerExpired() {\r\n var time = now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time);\r\n }\r\n // Restart the timer.\r\n timerId = setTimeout(timerExpired, remainingWait(time));\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time);\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result;\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n clearTimeout(timerId);\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined;\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(now());\r\n }\r\n\r\n function debounced() {\r\n var time = now(),\r\n isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime);\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n timerId = setTimeout(timerExpired, wait);\r\n return invokeFunc(lastCallTime);\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = setTimeout(timerExpired, wait);\r\n }\r\n return result;\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n return debounced;\r\n }\r\n\r\n /**\r\n * Defers invoking the `func` until the current call stack has cleared. Any\r\n * additional arguments are provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to defer.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.defer(function(text) {\r\n * console.log(text);\r\n * }, 'deferred');\r\n * // => Logs 'deferred' after one millisecond.\r\n */\r\n var defer = baseRest(function(func, args) {\r\n return baseDelay(func, 1, args);\r\n });\r\n\r\n /**\r\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\r\n * provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.delay(function(text) {\r\n * console.log(text);\r\n * }, 1000, 'later');\r\n * // => Logs 'later' after one second.\r\n */\r\n var delay = baseRest(function(func, wait, args) {\r\n return baseDelay(func, toNumber(wait) || 0, args);\r\n });\r\n\r\n /**\r\n * Creates a function that memoizes the result of `func`. If `resolver` is\r\n * provided, it determines the cache key for storing the result based on the\r\n * arguments provided to the memoized function. By default, the first argument\r\n * provided to the memoized function is used as the map cache key. The `func`\r\n * is invoked with the `this` binding of the memoized function.\r\n *\r\n * **Note:** The cache is exposed as the `cache` property on the memoized\r\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\r\n * constructor with one whose instances implement the\r\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\r\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to have its output memoized.\r\n * @param {Function} [resolver] The function to resolve the cache key.\r\n * @returns {Function} Returns the new memoized function.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n * var other = { 'c': 3, 'd': 4 };\r\n *\r\n * var values = _.memoize(_.values);\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * values(other);\r\n * // => [3, 4]\r\n *\r\n * object.a = 2;\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * // Modify the result cache.\r\n * values.cache.set(object, ['a', 'b']);\r\n * values(object);\r\n * // => ['a', 'b']\r\n *\r\n * // Replace `_.memoize.Cache`.\r\n * _.memoize.Cache = WeakMap;\r\n */\r\n function memoize(func, resolver) {\r\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var memoized = function() {\r\n var args = arguments,\r\n key = resolver ? resolver.apply(this, args) : args[0],\r\n cache = memoized.cache;\r\n\r\n if (cache.has(key)) {\r\n return cache.get(key);\r\n }\r\n var result = func.apply(this, args);\r\n memoized.cache = cache.set(key, result) || cache;\r\n return result;\r\n };\r\n memoized.cache = new (memoize.Cache || MapCache);\r\n return memoized;\r\n }\r\n\r\n // Expose `MapCache`.\r\n memoize.Cache = MapCache;\r\n\r\n /**\r\n * Creates a function that negates the result of the predicate `func`. The\r\n * `func` predicate is invoked with the `this` binding and arguments of the\r\n * created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} predicate The predicate to negate.\r\n * @returns {Function} Returns the new negated function.\r\n * @example\r\n *\r\n * function isEven(n) {\r\n * return n % 2 == 0;\r\n * }\r\n *\r\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\r\n * // => [1, 3, 5]\r\n */\r\n function negate(predicate) {\r\n if (typeof predicate != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return function() {\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return !predicate.call(this);\r\n case 1: return !predicate.call(this, args[0]);\r\n case 2: return !predicate.call(this, args[0], args[1]);\r\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\r\n }\r\n return !predicate.apply(this, args);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that is restricted to invoking `func` once. Repeat calls\r\n * to the function return the value of the first invocation. The `func` is\r\n * invoked with the `this` binding and arguments of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var initialize = _.once(createApplication);\r\n * initialize();\r\n * initialize();\r\n * // => `createApplication` is invoked once\r\n */\r\n function once(func) {\r\n return before(2, func);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * created function and arguments from `start` and beyond provided as\r\n * an array.\r\n *\r\n * **Note:** This method is based on the\r\n * [rest parameter](https://mdn.io/rest_parameters).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.rest(function(what, names) {\r\n * return what + ' ' + _.initial(names).join(', ') +\r\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r\n * });\r\n *\r\n * say('hello', 'fred', 'barney', 'pebbles');\r\n * // => 'hello fred, barney, & pebbles'\r\n */\r\n function rest(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start === undefined ? start : toInteger(start);\r\n return baseRest(func, start);\r\n }\r\n\r\n /**\r\n * Creates a throttled function that only invokes `func` at most once per\r\n * every `wait` milliseconds. The throttled function comes with a `cancel`\r\n * method to cancel delayed `func` invocations and a `flush` method to\r\n * immediately invoke them. Provide `options` to indicate whether `func`\r\n * should be invoked on the leading and/or trailing edge of the `wait`\r\n * timeout. The `func` is invoked with the last arguments provided to the\r\n * throttled function. Subsequent calls to the throttled function return the\r\n * result of the last `func` invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the throttled function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.throttle` and `_.debounce`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to throttle.\r\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=true]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new throttled function.\r\n * @example\r\n *\r\n * // Avoid excessively updating the position while scrolling.\r\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\r\n *\r\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\r\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\r\n * jQuery(element).on('click', throttled);\r\n *\r\n * // Cancel the trailing throttled invocation.\r\n * jQuery(window).on('popstate', throttled.cancel);\r\n */\r\n function throttle(func, wait, options) {\r\n var leading = true,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (isObject(options)) {\r\n leading = 'leading' in options ? !!options.leading : leading;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n return debounce(func, wait, {\r\n 'leading': leading,\r\n 'maxWait': wait,\r\n 'trailing': trailing\r\n });\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a shallow clone of `value`.\r\n *\r\n * **Note:** This method is loosely based on the\r\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\r\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\r\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\r\n * arrays. The own enumerable properties of `arguments` objects are cloned\r\n * as plain objects. An empty object is returned for uncloneable values such\r\n * as error objects, functions, DOM nodes, and WeakMaps.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeep\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var shallow = _.clone(objects);\r\n * console.log(shallow[0] === objects[0]);\r\n * // => true\r\n */\r\n function clone(value) {\r\n return baseClone(value, CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.clone\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var deep = _.cloneDeep(objects);\r\n * console.log(deep[0] === objects[0]);\r\n * // => false\r\n */\r\n function cloneDeep(value) {\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * Performs a\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * comparison between two values to determine if they are equivalent.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.eq(object, object);\r\n * // => true\r\n *\r\n * _.eq(object, other);\r\n * // => false\r\n *\r\n * _.eq('a', 'a');\r\n * // => true\r\n *\r\n * _.eq('a', Object('a'));\r\n * // => false\r\n *\r\n * _.eq(NaN, NaN);\r\n * // => true\r\n */\r\n function eq(value, other) {\r\n return value === other || (value !== value && other !== other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely an `arguments` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArguments(function() { return arguments; }());\r\n * // => true\r\n *\r\n * _.isArguments([1, 2, 3]);\r\n * // => false\r\n */\r\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\r\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\r\n !propertyIsEnumerable.call(value, 'callee');\r\n };\r\n\r\n /**\r\n * Checks if `value` is classified as an `Array` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\r\n * @example\r\n *\r\n * _.isArray([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArray(document.body.children);\r\n * // => false\r\n *\r\n * _.isArray('abc');\r\n * // => false\r\n *\r\n * _.isArray(_.noop);\r\n * // => false\r\n */\r\n var isArray = Array.isArray;\r\n\r\n /**\r\n * Checks if `value` is array-like. A value is considered array-like if it's\r\n * not a function and has a `value.length` that's an integer greater than or\r\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r\n * @example\r\n *\r\n * _.isArrayLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLike(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLike('abc');\r\n * // => true\r\n *\r\n * _.isArrayLike(_.noop);\r\n * // => false\r\n */\r\n function isArrayLike(value) {\r\n return value != null && isLength(value.length) && !isFunction(value);\r\n }\r\n\r\n /**\r\n * This method is like `_.isArrayLike` except that it also checks if `value`\r\n * is an object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array-like object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArrayLikeObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject('abc');\r\n * // => false\r\n *\r\n * _.isArrayLikeObject(_.noop);\r\n * // => false\r\n */\r\n function isArrayLikeObject(value) {\r\n return isObjectLike(value) && isArrayLike(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a boolean primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\r\n * @example\r\n *\r\n * _.isBoolean(false);\r\n * // => true\r\n *\r\n * _.isBoolean(null);\r\n * // => false\r\n */\r\n function isBoolean(value) {\r\n return value === true || value === false ||\r\n (isObjectLike(value) && baseGetTag(value) == boolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a buffer.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\r\n * @example\r\n *\r\n * _.isBuffer(new Buffer(2));\r\n * // => true\r\n *\r\n * _.isBuffer(new Uint8Array(2));\r\n * // => false\r\n */\r\n var isBuffer = nativeIsBuffer || stubFalse;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Date` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n * @example\r\n *\r\n * _.isDate(new Date);\r\n * // => true\r\n *\r\n * _.isDate('Mon April 23 2012');\r\n * // => false\r\n */\r\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\r\n\r\n /**\r\n * Checks if `value` is an empty object, collection, map, or set.\r\n *\r\n * Objects are considered empty if they have no own enumerable string keyed\r\n * properties.\r\n *\r\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\r\n * jQuery-like collections are considered empty if they have a `length` of `0`.\r\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r\n * @example\r\n *\r\n * _.isEmpty(null);\r\n * // => true\r\n *\r\n * _.isEmpty(true);\r\n * // => true\r\n *\r\n * _.isEmpty(1);\r\n * // => true\r\n *\r\n * _.isEmpty([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isEmpty({ 'a': 1 });\r\n * // => false\r\n */\r\n function isEmpty(value) {\r\n if (value == null) {\r\n return true;\r\n }\r\n if (isArrayLike(value) &&\r\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\r\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\r\n return !value.length;\r\n }\r\n var tag = getTag(value);\r\n if (tag == mapTag || tag == setTag) {\r\n return !value.size;\r\n }\r\n if (isPrototype(value)) {\r\n return !baseKeys(value).length;\r\n }\r\n for (var key in value) {\r\n if (hasOwnProperty.call(value, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.isEqual(object, other);\r\n * // => true\r\n *\r\n * object === other;\r\n * // => false\r\n */\r\n function isEqual(value, other) {\r\n return baseIsEqual(value, other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a finite primitive number.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\r\n * @example\r\n *\r\n * _.isFinite(3);\r\n * // => true\r\n *\r\n * _.isFinite(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isFinite(Infinity);\r\n * // => false\r\n *\r\n * _.isFinite('3');\r\n * // => false\r\n */\r\n function isFinite(value) {\r\n return typeof value == 'number' && nativeIsFinite(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Function` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\r\n * @example\r\n *\r\n * _.isFunction(_);\r\n * // => true\r\n *\r\n * _.isFunction(/abc/);\r\n * // => false\r\n */\r\n function isFunction(value) {\r\n if (!isObject(value)) {\r\n return false;\r\n }\r\n // The use of `Object#toString` avoids issues with the `typeof` operator\r\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\r\n var tag = baseGetTag(value);\r\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like length.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r\n * @example\r\n *\r\n * _.isLength(3);\r\n * // => true\r\n *\r\n * _.isLength(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isLength(Infinity);\r\n * // => false\r\n *\r\n * _.isLength('3');\r\n * // => false\r\n */\r\n function isLength(value) {\r\n return typeof value == 'number' &&\r\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is the\r\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\r\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r\n * @example\r\n *\r\n * _.isObject({});\r\n * // => true\r\n *\r\n * _.isObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObject(_.noop);\r\n * // => true\r\n *\r\n * _.isObject(null);\r\n * // => false\r\n */\r\n function isObject(value) {\r\n var type = typeof value;\r\n return value != null && (type == 'object' || type == 'function');\r\n }\r\n\r\n /**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * _.isObjectLike({});\r\n * // => true\r\n *\r\n * _.isObjectLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObjectLike(_.noop);\r\n * // => false\r\n *\r\n * _.isObjectLike(null);\r\n * // => false\r\n */\r\n function isObjectLike(value) {\r\n return value != null && typeof value == 'object';\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Map` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n * @example\r\n *\r\n * _.isMap(new Map);\r\n * // => true\r\n *\r\n * _.isMap(new WeakMap);\r\n * // => false\r\n */\r\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\r\n\r\n /**\r\n * Checks if `value` is `NaN`.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\r\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\r\n * `undefined` and other non-number values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n * @example\r\n *\r\n * _.isNaN(NaN);\r\n * // => true\r\n *\r\n * _.isNaN(new Number(NaN));\r\n * // => true\r\n *\r\n * isNaN(undefined);\r\n * // => true\r\n *\r\n * _.isNaN(undefined);\r\n * // => false\r\n */\r\n function isNaN(value) {\r\n // An `NaN` primitive is the only value that is not equal to itself.\r\n // Perform the `toStringTag` check first to avoid errors with some\r\n // ActiveX objects in IE.\r\n return isNumber(value) && value != +value;\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\r\n * @example\r\n *\r\n * _.isNull(null);\r\n * // => true\r\n *\r\n * _.isNull(void 0);\r\n * // => false\r\n */\r\n function isNull(value) {\r\n return value === null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Number` primitive or object.\r\n *\r\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\r\n * classified as numbers, use the `_.isFinite` method.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\r\n * @example\r\n *\r\n * _.isNumber(3);\r\n * // => true\r\n *\r\n * _.isNumber(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isNumber(Infinity);\r\n * // => true\r\n *\r\n * _.isNumber('3');\r\n * // => false\r\n */\r\n function isNumber(value) {\r\n return typeof value == 'number' ||\r\n (isObjectLike(value) && baseGetTag(value) == numberTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a plain object, that is, an object created by the\r\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.8.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * _.isPlainObject(new Foo);\r\n * // => false\r\n *\r\n * _.isPlainObject([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isPlainObject({ 'x': 0, 'y': 0 });\r\n * // => true\r\n *\r\n * _.isPlainObject(Object.create(null));\r\n * // => true\r\n */\r\n function isPlainObject(value) {\r\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\r\n return false;\r\n }\r\n var proto = getPrototype(value);\r\n if (proto === null) {\r\n return true;\r\n }\r\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\r\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\r\n funcToString.call(Ctor) == objectCtorString;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `RegExp` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n * @example\r\n *\r\n * _.isRegExp(/abc/);\r\n * // => true\r\n *\r\n * _.isRegExp('/abc/');\r\n * // => false\r\n */\r\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Set` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n * @example\r\n *\r\n * _.isSet(new Set);\r\n * // => true\r\n *\r\n * _.isSet(new WeakSet);\r\n * // => false\r\n */\r\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\r\n\r\n /**\r\n * Checks if `value` is classified as a `String` primitive or object.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\r\n * @example\r\n *\r\n * _.isString('abc');\r\n * // => true\r\n *\r\n * _.isString(1);\r\n * // => false\r\n */\r\n function isString(value) {\r\n return typeof value == 'string' ||\r\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * _.isSymbol(Symbol.iterator);\r\n * // => true\r\n *\r\n * _.isSymbol('abc');\r\n * // => false\r\n */\r\n function isSymbol(value) {\r\n return typeof value == 'symbol' ||\r\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a typed array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n * @example\r\n *\r\n * _.isTypedArray(new Uint8Array);\r\n * // => true\r\n *\r\n * _.isTypedArray([]);\r\n * // => false\r\n */\r\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\r\n\r\n /**\r\n * Checks if `value` is `undefined`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r\n * @example\r\n *\r\n * _.isUndefined(void 0);\r\n * // => true\r\n *\r\n * _.isUndefined(null);\r\n * // => false\r\n */\r\n function isUndefined(value) {\r\n return value === undefined;\r\n }\r\n\r\n /**\r\n * Converts `value` to an array.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Array} Returns the converted array.\r\n * @example\r\n *\r\n * _.toArray({ 'a': 1, 'b': 2 });\r\n * // => [1, 2]\r\n *\r\n * _.toArray('abc');\r\n * // => ['a', 'b', 'c']\r\n *\r\n * _.toArray(1);\r\n * // => []\r\n *\r\n * _.toArray(null);\r\n * // => []\r\n */\r\n function toArray(value) {\r\n if (!value) {\r\n return [];\r\n }\r\n if (isArrayLike(value)) {\r\n return isString(value) ? stringToArray(value) : copyArray(value);\r\n }\r\n if (symIterator && value[symIterator]) {\r\n return iteratorToArray(value[symIterator]());\r\n }\r\n var tag = getTag(value),\r\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\r\n\r\n return func(value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a finite number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * _.toFinite(3.2);\r\n * // => 3.2\r\n *\r\n * _.toFinite(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toFinite(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toFinite('3.2');\r\n * // => 3.2\r\n */\r\n function toFinite(value) {\r\n if (!value) {\r\n return value === 0 ? value : 0;\r\n }\r\n value = toNumber(value);\r\n if (value === INFINITY || value === -INFINITY) {\r\n var sign = (value < 0 ? -1 : 1);\r\n return sign * MAX_INTEGER;\r\n }\r\n return value === value ? value : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toInteger(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toInteger('3.2');\r\n * // => 3\r\n */\r\n function toInteger(value) {\r\n var result = toFinite(value),\r\n remainder = result % 1;\r\n\r\n return result === result ? (remainder ? result - remainder : result) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to a number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n * @example\r\n *\r\n * _.toNumber(3.2);\r\n * // => 3.2\r\n *\r\n * _.toNumber(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toNumber(Infinity);\r\n * // => Infinity\r\n *\r\n * _.toNumber('3.2');\r\n * // => 3.2\r\n */\r\n function toNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n if (isObject(value)) {\r\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\r\n value = isObject(other) ? (other + '') : other;\r\n }\r\n if (typeof value != 'string') {\r\n return value === 0 ? value : +value;\r\n }\r\n value = value.replace(reTrim, '');\r\n var isBinary = reIsBinary.test(value);\r\n return (isBinary || reIsOctal.test(value))\r\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\r\n : (reIsBadHex.test(value) ? NAN : +value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a plain object flattening inherited enumerable string\r\n * keyed properties of `value` to own properties of the plain object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Object} Returns the converted plain object.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.assign({ 'a': 1 }, new Foo);\r\n * // => { 'a': 1, 'b': 2 }\r\n *\r\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\r\n * // => { 'a': 1, 'b': 2, 'c': 3 }\r\n */\r\n function toPlainObject(value) {\r\n return copyObject(value, keysIn(value));\r\n }\r\n\r\n /**\r\n * Converts `value` to a string. An empty string is returned for `null`\r\n * and `undefined` values. The sign of `-0` is preserved.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.toString(null);\r\n * // => ''\r\n *\r\n * _.toString(-0);\r\n * // => '-0'\r\n *\r\n * _.toString([1, 2, 3]);\r\n * // => '1,2,3'\r\n */\r\n function toString(value) {\r\n return value == null ? '' : baseToString(value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * This method is like `_.assign` except that it iterates over own and\r\n * inherited source properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extend\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assign\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\r\n */\r\n var assignIn = createAssigner(function(object, source) {\r\n copyObject(source, keysIn(source), object);\r\n });\r\n\r\n /**\r\n * Creates an object that inherits from the `prototype` object. If a\r\n * `properties` object is given, its own enumerable string keyed properties\r\n * are assigned to the created object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Object\r\n * @param {Object} prototype The object to inherit from.\r\n * @param {Object} [properties] The properties to assign to the object.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * function Shape() {\r\n * this.x = 0;\r\n * this.y = 0;\r\n * }\r\n *\r\n * function Circle() {\r\n * Shape.call(this);\r\n * }\r\n *\r\n * Circle.prototype = _.create(Shape.prototype, {\r\n * 'constructor': Circle\r\n * });\r\n *\r\n * var circle = new Circle;\r\n * circle instanceof Circle;\r\n * // => true\r\n *\r\n * circle instanceof Shape;\r\n * // => true\r\n */\r\n function create(prototype, properties) {\r\n var result = baseCreate(prototype);\r\n return properties == null ? result : baseAssign(result, properties);\r\n }\r\n\r\n /**\r\n * Assigns own and inherited enumerable string keyed properties of source\r\n * objects to the destination object for all destination properties that\r\n * resolve to `undefined`. Source objects are applied from left to right.\r\n * Once a property is set, additional values of the same property are ignored.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaultsDeep\r\n * @example\r\n *\r\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var defaults = baseRest(function(object, sources) {\r\n object = Object(object);\r\n\r\n var index = -1;\r\n var length = sources.length;\r\n var guard = length > 2 ? sources[2] : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n length = 1;\r\n }\r\n\r\n while (++index < length) {\r\n var source = sources[index];\r\n var props = keysIn(source);\r\n var propsIndex = -1;\r\n var propsLength = props.length;\r\n\r\n while (++propsIndex < propsLength) {\r\n var key = props[propsIndex];\r\n var value = object[key];\r\n\r\n if (value === undefined ||\r\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n object[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n });\r\n\r\n /**\r\n * This method is like `_.defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaults\r\n * @example\r\n *\r\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */\r\n var defaultsDeep = baseRest(function(args) {\r\n args.push(undefined, customDefaultsMerge);\r\n return apply(mergeWith, undefined, args);\r\n });\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the key of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findKey(users, function(o) { return o.age < 40; });\r\n * // => 'barney' (iteration order is not guaranteed)\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findKey(users, { 'age': 1, 'active': true });\r\n * // => 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findKey(users, 'active');\r\n * // => 'barney'\r\n */\r\n function findKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\r\n }\r\n\r\n /**\r\n * This method is like `_.findKey` except that it iterates over elements of\r\n * a collection in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findLastKey(users, function(o) { return o.age < 40; });\r\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastKey(users, { 'age': 36, 'active': true });\r\n * // => 'barney'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastKey(users, 'active');\r\n * // => 'pebbles'\r\n */\r\n function findLastKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\r\n }\r\n\r\n /**\r\n * Gets the value at `path` of `object`. If the resolved value is\r\n * `undefined`, the `defaultValue` is returned in its place.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.get(object, 'a[0].b.c');\r\n * // => 3\r\n *\r\n * _.get(object, ['a', '0', 'b', 'c']);\r\n * // => 3\r\n *\r\n * _.get(object, 'a.b.c', 'default');\r\n * // => 'default'\r\n */\r\n function get(object, path, defaultValue) {\r\n var result = object == null ? undefined : baseGet(object, path);\r\n return result === undefined ? defaultValue : result;\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct property of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': { 'b': 2 } };\r\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.has(object, 'a');\r\n * // => true\r\n *\r\n * _.has(object, 'a.b');\r\n * // => true\r\n *\r\n * _.has(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.has(other, 'a');\r\n * // => false\r\n */\r\n function has(object, path) {\r\n return object != null && hasPath(object, path, baseHas);\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct or inherited property of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.hasIn(object, 'a');\r\n * // => true\r\n *\r\n * _.hasIn(object, 'a.b');\r\n * // => true\r\n *\r\n * _.hasIn(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.hasIn(object, 'b');\r\n * // => false\r\n */\r\n function hasIn(object, path) {\r\n return object != null && hasPath(object, path, baseHasIn);\r\n }\r\n\r\n /**\r\n * Creates an object composed of the inverted keys and values of `object`.\r\n * If `object` contains duplicate values, subsequent values overwrite\r\n * property assignments of previous values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invert(object);\r\n * // => { '1': 'c', '2': 'b' }\r\n */\r\n var invert = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n result[value] = key;\r\n }, constant(identity));\r\n\r\n /**\r\n * This method is like `_.invert` except that the inverted object is generated\r\n * from the results of running each element of `object` thru `iteratee`. The\r\n * corresponding inverted value of each inverted key is an array of keys\r\n * responsible for generating the inverted value. The iteratee is invoked\r\n * with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invertBy(object);\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n *\r\n * _.invertBy(object, function(value) {\r\n * return 'group' + value;\r\n * });\r\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\r\n */\r\n var invertBy = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n if (hasOwnProperty.call(result, value)) {\r\n result[value].push(key);\r\n } else {\r\n result[value] = [key];\r\n }\r\n }, baseIteratee);\r\n\r\n /**\r\n * Creates an array of the own enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects. See the\r\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * for more details.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keys(new Foo);\r\n * // => ['a', 'b'] (iteration order is not guaranteed)\r\n *\r\n * _.keys('hi');\r\n * // => ['0', '1']\r\n */\r\n function keys(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keysIn(new Foo);\r\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r\n */\r\n function keysIn(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\r\n }\r\n\r\n /**\r\n * This method is like `_.assign` except that it recursively merges own and\r\n * inherited enumerable string keyed properties of source objects into the\r\n * destination object. Source properties that resolve to `undefined` are\r\n * skipped if a destination value exists. Array and plain object properties\r\n * are merged recursively. Other objects and value types are overridden by\r\n * assignment. Source objects are applied from left to right. Subsequent\r\n * sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {\r\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\r\n * };\r\n *\r\n * var other = {\r\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\r\n * };\r\n *\r\n * _.merge(object, other);\r\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\r\n */\r\n var merge = createAssigner(function(object, source, srcIndex) {\r\n baseMerge(object, source, srcIndex);\r\n });\r\n\r\n /**\r\n * This method is like `_.merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (_.isArray(objValue)) {\r\n * return objValue.concat(srcValue);\r\n * }\r\n * }\r\n *\r\n * var object = { 'a': [1], 'b': [2] };\r\n * var other = { 'a': [3], 'b': [4] };\r\n *\r\n * _.mergeWith(object, other, customizer);\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */\r\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n baseMerge(object, source, srcIndex, customizer);\r\n });\r\n\r\n /**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable property paths of `object` that are not omitted.\r\n *\r\n * **Note:** This method is considerably slower than `_.pick`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to omit.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omit(object, ['a', 'c']);\r\n * // => { 'b': '2' }\r\n */\r\n var omit = flatRest(function(object, paths) {\r\n var result = {};\r\n if (object == null) {\r\n return result;\r\n }\r\n var isDeep = false;\r\n paths = arrayMap(paths, function(path) {\r\n path = castPath(path, object);\r\n isDeep || (isDeep = path.length > 1);\r\n return path;\r\n });\r\n copyObject(object, getAllKeysIn(object), result);\r\n if (isDeep) {\r\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\r\n }\r\n var length = paths.length;\r\n while (length--) {\r\n baseUnset(result, paths[length]);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * The opposite of `_.pickBy`; this method creates an object composed of\r\n * the own and inherited enumerable string keyed properties of `object` that\r\n * `predicate` doesn't return truthy for. The predicate is invoked with two\r\n * arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omitBy(object, _.isNumber);\r\n * // => { 'b': '2' }\r\n */\r\n function omitBy(object, predicate) {\r\n return pickBy(object, negate(baseIteratee(predicate)));\r\n }\r\n\r\n /**\r\n * Creates an object composed of the picked `object` properties.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pick(object, ['a', 'c']);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var pick = flatRest(function(object, paths) {\r\n return object == null ? {} : basePick(object, paths);\r\n });\r\n\r\n /**\r\n * Creates an object composed of the `object` properties `predicate` returns\r\n * truthy for. The predicate is invoked with two arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pickBy(object, _.isNumber);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n function pickBy(object, predicate) {\r\n if (object == null) {\r\n return {};\r\n }\r\n var props = arrayMap(getAllKeysIn(object), function(prop) {\r\n return [prop];\r\n });\r\n predicate = baseIteratee(predicate);\r\n return basePickBy(object, props, function(value, path) {\r\n return predicate(value, path[0]);\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.get` except that if the resolved value is a\r\n * function it's invoked with the `this` binding of its parent object and\r\n * its result is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to resolve.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\r\n *\r\n * _.result(object, 'a[0].b.c1');\r\n * // => 3\r\n *\r\n * _.result(object, 'a[0].b.c2');\r\n * // => 4\r\n *\r\n * _.result(object, 'a[0].b.c3', 'default');\r\n * // => 'default'\r\n *\r\n * _.result(object, 'a[0].b.c3', _.constant('default'));\r\n * // => 'default'\r\n */\r\n function result(object, path, defaultValue) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length;\r\n\r\n // Ensure the loop is entered when path is empty.\r\n if (!length) {\r\n length = 1;\r\n object = undefined;\r\n }\r\n while (++index < length) {\r\n var value = object == null ? undefined : object[toKey(path[index])];\r\n if (value === undefined) {\r\n index = length;\r\n value = defaultValue;\r\n }\r\n object = isFunction(value) ? value.call(object) : value;\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\r\n * it's created. Arrays are created for missing index properties while objects\r\n * are created for all other missing properties. Use `_.setWith` to customize\r\n * `path` creation.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.set(object, 'a[0].b.c', 4);\r\n * console.log(object.a[0].b.c);\r\n * // => 4\r\n *\r\n * _.set(object, ['x', '0', 'y', 'z'], 5);\r\n * console.log(object.x[0].y.z);\r\n * // => 5\r\n */\r\n function set(object, path, value) {\r\n return object == null ? object : baseSet(object, path, value);\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.values(new Foo);\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * _.values('hi');\r\n * // => ['h', 'i']\r\n */\r\n function values(object) {\r\n return object == null ? [] : baseValues(object, keys(object));\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Number\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n * @example\r\n *\r\n * _.clamp(-10, -5, 5);\r\n * // => -5\r\n *\r\n * _.clamp(10, -5, 5);\r\n * // => 5\r\n */\r\n function clamp(number, lower, upper) {\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = undefined;\r\n }\r\n if (upper !== undefined) {\r\n upper = toNumber(upper);\r\n upper = upper === upper ? upper : 0;\r\n }\r\n if (lower !== undefined) {\r\n lower = toNumber(lower);\r\n lower = lower === lower ? lower : 0;\r\n }\r\n return baseClamp(toNumber(number), lower, upper);\r\n }\r\n\r\n /**\r\n * Produces a random number between the inclusive `lower` and `upper` bounds.\r\n * If only one argument is provided a number between `0` and the given number\r\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\r\n * floats, a floating-point number is returned instead of an integer.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Number\r\n * @param {number} [lower=0] The lower bound.\r\n * @param {number} [upper=1] The upper bound.\r\n * @param {boolean} [floating] Specify returning a floating-point number.\r\n * @returns {number} Returns the random number.\r\n * @example\r\n *\r\n * _.random(0, 5);\r\n * // => an integer between 0 and 5\r\n *\r\n * _.random(5);\r\n * // => also an integer between 0 and 5\r\n *\r\n * _.random(5, true);\r\n * // => a floating-point number between 0 and 5\r\n *\r\n * _.random(1.2, 5.2);\r\n * // => a floating-point number between 1.2 and 5.2\r\n */\r\n function random(lower, upper, floating) {\r\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\r\n upper = floating = undefined;\r\n }\r\n if (floating === undefined) {\r\n if (typeof upper == 'boolean') {\r\n floating = upper;\r\n upper = undefined;\r\n }\r\n else if (typeof lower == 'boolean') {\r\n floating = lower;\r\n lower = undefined;\r\n }\r\n }\r\n if (lower === undefined && upper === undefined) {\r\n lower = 0;\r\n upper = 1;\r\n }\r\n else {\r\n lower = toFinite(lower);\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = 0;\r\n } else {\r\n upper = toFinite(upper);\r\n }\r\n }\r\n if (lower > upper) {\r\n var temp = lower;\r\n lower = upper;\r\n upper = temp;\r\n }\r\n if (floating || lower % 1 || upper % 1) {\r\n var rand = nativeRandom();\r\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\r\n }\r\n return baseRandom(lower, upper);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\r\n * corresponding HTML entities.\r\n *\r\n * **Note:** No other characters are escaped. To escape additional\r\n * characters use a third-party library like [_he_](https://mths.be/he).\r\n *\r\n * Though the \">\" character is escaped for symmetry, characters like\r\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\r\n * unless they're part of a tag or unquoted attribute value. See\r\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\r\n * (under \"semi-related fun fact\") for more details.\r\n *\r\n * When working with HTML you should always\r\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\r\n * XSS vectors.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escape('fred, barney, & pebbles');\r\n * // => 'fred, barney, &amp; pebbles'\r\n */\r\n function escape(string) {\r\n string = toString(string);\r\n return (string && reHasUnescapedHtml.test(string))\r\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\r\n : string;\r\n }\r\n\r\n /**\r\n * Removes leading and trailing whitespace or specified characters from `string`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to trim.\r\n * @param {string} [chars=whitespace] The characters to trim.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {string} Returns the trimmed string.\r\n * @example\r\n *\r\n * _.trim(' abc ');\r\n * // => 'abc'\r\n *\r\n * _.trim('-_-abc-_-', '_-');\r\n * // => 'abc'\r\n *\r\n * _.map([' foo ', ' bar '], _.trim);\r\n * // => ['foo', 'bar']\r\n */\r\n function trim(string, chars, guard) {\r\n string = toString(string);\r\n if (string && (guard || chars === undefined)) {\r\n return string.replace(reTrim, '');\r\n }\r\n if (!string || !(chars = baseToString(chars))) {\r\n return string;\r\n }\r\n var strSymbols = stringToArray(string),\r\n chrSymbols = stringToArray(chars),\r\n start = charsStartIndex(strSymbols, chrSymbols),\r\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\r\n\r\n return castSlice(strSymbols, start, end).join('');\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that returns `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {*} value The value to return from the new function.\r\n * @returns {Function} Returns the new constant function.\r\n * @example\r\n *\r\n * var objects = _.times(2, _.constant({ 'a': 1 }));\r\n *\r\n * console.log(objects);\r\n * // => [{ 'a': 1 }, { 'a': 1 }]\r\n *\r\n * console.log(objects[0] === objects[1]);\r\n * // => true\r\n */\r\n function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }\r\n\r\n /**\r\n * This method returns the first argument it receives.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} value Any value.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n *\r\n * console.log(_.identity(object) === object);\r\n * // => true\r\n */\r\n function identity(value) {\r\n return value;\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the arguments of the created\r\n * function. If `func` is a property name, the created function returns the\r\n * property value for a given element. If `func` is an array or object, the\r\n * created function returns `true` for elements that contain the equivalent\r\n * source properties, otherwise it returns `false`.\r\n *\r\n * @static\r\n * @since 4.0.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} [func=_.identity] The value to convert to a callback.\r\n * @returns {Function} Returns the callback.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\r\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, _.iteratee(['user', 'fred']));\r\n * // => [{ 'user': 'fred', 'age': 40 }]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, _.iteratee('user'));\r\n * // => ['barney', 'fred']\r\n *\r\n * // Create custom iteratee shorthands.\r\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\r\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\r\n * return func.test(string);\r\n * };\r\n * });\r\n *\r\n * _.filter(['abc', 'def'], /ef/);\r\n * // => ['def']\r\n */\r\n function iteratee(func) {\r\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Creates a function that performs a partial deep comparison between a given\r\n * object and `source`, returning `true` if the given object has equivalent\r\n * property values, else `false`.\r\n *\r\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\r\n * partially applied.\r\n *\r\n * Partial comparisons will match empty array and empty object `source`\r\n * values against any array or object value, respectively. See `_.isEqual`\r\n * for a list of supported value comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Util\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': 1, 'b': 2, 'c': 3 },\r\n * { 'a': 4, 'b': 5, 'c': 6 }\r\n * ];\r\n *\r\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\r\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\r\n */\r\n function matches(source) {\r\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Adds all own enumerable string keyed function properties of a source\r\n * object to the destination object. If `object` is a function, then methods\r\n * are added to its prototype as well.\r\n *\r\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\r\n * avoid conflicts caused by modifying the original.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {Function|Object} [object=lodash] The destination object.\r\n * @param {Object} source The object of functions to add.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\r\n * @returns {Function|Object} Returns `object`.\r\n * @example\r\n *\r\n * function vowels(string) {\r\n * return _.filter(string, function(v) {\r\n * return /[aeiou]/i.test(v);\r\n * });\r\n * }\r\n *\r\n * _.mixin({ 'vowels': vowels });\r\n * _.vowels('fred');\r\n * // => ['e']\r\n *\r\n * _('fred').vowels().value();\r\n * // => ['e']\r\n *\r\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\r\n * _('fred').vowels();\r\n * // => ['e']\r\n */\r\n function mixin(object, source, options) {\r\n var props = keys(source),\r\n methodNames = baseFunctions(source, props);\r\n\r\n if (options == null &&\r\n !(isObject(source) && (methodNames.length || !props.length))) {\r\n options = source;\r\n source = object;\r\n object = this;\r\n methodNames = baseFunctions(source, keys(source));\r\n }\r\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\r\n isFunc = isFunction(object);\r\n\r\n arrayEach(methodNames, function(methodName) {\r\n var func = source[methodName];\r\n object[methodName] = func;\r\n if (isFunc) {\r\n object.prototype[methodName] = function() {\r\n var chainAll = this.__chain__;\r\n if (chain || chainAll) {\r\n var result = object(this.__wrapped__),\r\n actions = result.__actions__ = copyArray(this.__actions__);\r\n\r\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\r\n result.__chain__ = chainAll;\r\n return result;\r\n }\r\n return func.apply(object, arrayPush([this.value()], arguments));\r\n };\r\n }\r\n });\r\n\r\n return object;\r\n }\r\n\r\n /**\r\n * Reverts the `_` variable to its previous value and returns a reference to\r\n * the `lodash` function.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @returns {Function} Returns the `lodash` function.\r\n * @example\r\n *\r\n * var lodash = _.noConflict();\r\n */\r\n function noConflict() {\r\n if (root._ === this) {\r\n root._ = oldDash;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * This method returns `undefined`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Util\r\n * @example\r\n *\r\n * _.times(2, _.noop);\r\n * // => [undefined, undefined]\r\n */\r\n function noop() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * Creates a function that returns the value at `path` of a given object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': { 'b': 2 } },\r\n * { 'a': { 'b': 1 } }\r\n * ];\r\n *\r\n * _.map(objects, _.property('a.b'));\r\n * // => [2, 1]\r\n *\r\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\r\n * // => [1, 2]\r\n */\r\n function property(path) {\r\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\r\n }\r\n\r\n /**\r\n * Creates an array of numbers (positive and/or negative) progressing from\r\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\r\n * `start` is specified without an `end` or `step`. If `end` is not specified,\r\n * it's set to `start` with `start` then set to `0`.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} [step=1] The value to increment or decrement by.\r\n * @returns {Array} Returns the range of numbers.\r\n * @see _.inRange, _.rangeRight\r\n * @example\r\n *\r\n * _.range(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * _.range(-4);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * _.range(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * _.range(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * _.range(0);\r\n * // => []\r\n */\r\n var range = createRange();\r\n\r\n /**\r\n * This method returns a new empty array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {Array} Returns the new empty array.\r\n * @example\r\n *\r\n * var arrays = _.times(2, _.stubArray);\r\n *\r\n * console.log(arrays);\r\n * // => [[], []]\r\n *\r\n * console.log(arrays[0] === arrays[1]);\r\n * // => false\r\n */\r\n function stubArray() {\r\n return [];\r\n }\r\n\r\n /**\r\n * This method returns `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {boolean} Returns `false`.\r\n * @example\r\n *\r\n * _.times(2, _.stubFalse);\r\n * // => [false, false]\r\n */\r\n function stubFalse() {\r\n return false;\r\n }\r\n\r\n /**\r\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {string} [prefix=''] The value to prefix the ID with.\r\n * @returns {string} Returns the unique ID.\r\n * @example\r\n *\r\n * _.uniqueId('contact_');\r\n * // => 'contact_104'\r\n *\r\n * _.uniqueId();\r\n * // => '105'\r\n */\r\n function uniqueId(prefix) {\r\n var id = ++idCounter;\r\n return toString(prefix) + id;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Computes the maximum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the maximum value.\r\n * @example\r\n *\r\n * _.max([4, 2, 8, 6]);\r\n * // => 8\r\n *\r\n * _.max([]);\r\n * // => undefined\r\n */\r\n function max(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseGt)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Computes the minimum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the minimum value.\r\n * @example\r\n *\r\n * _.min([4, 2, 8, 6]);\r\n * // => 2\r\n *\r\n * _.min([]);\r\n * // => undefined\r\n */\r\n function min(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseLt)\r\n : undefined;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return wrapped values in chain sequences.\r\n lodash.after = after;\r\n lodash.assignIn = assignIn;\r\n lodash.before = before;\r\n lodash.bind = bind;\r\n lodash.chain = chain;\r\n lodash.compact = compact;\r\n lodash.concat = concat;\r\n lodash.countBy = countBy;\r\n lodash.create = create;\r\n lodash.debounce = debounce;\r\n lodash.defaults = defaults;\r\n lodash.defaultsDeep = defaultsDeep;\r\n lodash.defer = defer;\r\n lodash.delay = delay;\r\n lodash.difference = difference;\r\n lodash.drop = drop;\r\n lodash.filter = filter;\r\n lodash.flatten = flatten;\r\n lodash.flattenDeep = flattenDeep;\r\n lodash.groupBy = groupBy;\r\n lodash.initial = initial;\r\n lodash.intersection = intersection;\r\n lodash.invert = invert;\r\n lodash.invertBy = invertBy;\r\n lodash.iteratee = iteratee;\r\n lodash.keys = keys;\r\n lodash.map = map;\r\n lodash.matches = matches;\r\n lodash.merge = merge;\r\n lodash.mixin = mixin;\r\n lodash.negate = negate;\r\n lodash.omit = omit;\r\n lodash.omitBy = omitBy;\r\n lodash.once = once;\r\n lodash.pick = pick;\r\n lodash.range = range;\r\n lodash.reject = reject;\r\n lodash.rest = rest;\r\n lodash.set = set;\r\n lodash.slice = slice;\r\n lodash.sortBy = sortBy;\r\n lodash.take = take;\r\n lodash.takeRight = takeRight;\r\n lodash.tap = tap;\r\n lodash.throttle = throttle;\r\n lodash.thru = thru;\r\n lodash.toArray = toArray;\r\n lodash.union = union;\r\n lodash.uniq = uniq;\r\n lodash.uniqBy = uniqBy;\r\n lodash.unzip = unzip;\r\n lodash.values = values;\r\n lodash.without = without;\r\n lodash.zip = zip;\r\n lodash.zipObject = zipObject;\r\n\r\n // Add aliases.\r\n lodash.extend = assignIn;\r\n\r\n // Add methods to `lodash.prototype`.\r\n mixin(lodash, lodash);\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return unwrapped values in chain sequences.\r\n lodash.clamp = clamp;\r\n lodash.clone = clone;\r\n lodash.cloneDeep = cloneDeep;\r\n lodash.escape = escape;\r\n lodash.every = every;\r\n lodash.find = find;\r\n lodash.findIndex = findIndex;\r\n lodash.findKey = findKey;\r\n lodash.findLastIndex = findLastIndex;\r\n lodash.findLastKey = findLastKey;\r\n lodash.forEach = forEach;\r\n lodash.get = get;\r\n lodash.has = has;\r\n lodash.head = head;\r\n lodash.identity = identity;\r\n lodash.indexOf = indexOf;\r\n lodash.isArguments = isArguments;\r\n lodash.isArray = isArray;\r\n lodash.isArrayLike = isArrayLike;\r\n lodash.isBoolean = isBoolean;\r\n lodash.isDate = isDate;\r\n lodash.isEmpty = isEmpty;\r\n lodash.isEqual = isEqual;\r\n lodash.isFinite = isFinite;\r\n lodash.isFunction = isFunction;\r\n lodash.isNaN = isNaN;\r\n lodash.isNull = isNull;\r\n lodash.isNumber = isNumber;\r\n lodash.isObject = isObject;\r\n lodash.isPlainObject = isPlainObject;\r\n lodash.isRegExp = isRegExp;\r\n lodash.isString = isString;\r\n lodash.isUndefined = isUndefined;\r\n lodash.last = last;\r\n lodash.max = max;\r\n lodash.min = min;\r\n lodash.noConflict = noConflict;\r\n lodash.noop = noop;\r\n lodash.random = random;\r\n lodash.reduce = reduce;\r\n lodash.result = result;\r\n lodash.size = size;\r\n lodash.some = some;\r\n lodash.trim = trim;\r\n lodash.uniqueId = uniqueId;\r\n\r\n // Add aliases.\r\n lodash.each = forEach;\r\n lodash.first = head;\r\n\r\n mixin(lodash, (function() {\r\n var source = {};\r\n baseForOwn(lodash, function(func, methodName) {\r\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\r\n source[methodName] = func;\r\n }\r\n });\r\n return source;\r\n }()), { 'chain': false });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The semantic version number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @type {string}\r\n */\r\n lodash.VERSION = VERSION;\r\n\r\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\r\n arrayEach(['drop', 'take'], function(methodName, index) {\r\n LazyWrapper.prototype[methodName] = function(n) {\r\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\r\n\r\n var result = (this.__filtered__ && !index)\r\n ? new LazyWrapper(this)\r\n : this.clone();\r\n\r\n if (result.__filtered__) {\r\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\r\n } else {\r\n result.__views__.push({\r\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\r\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\r\n });\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\r\n return this.reverse()[methodName](n).reverse();\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods that accept an `iteratee` value.\r\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\r\n var type = index + 1,\r\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\r\n\r\n LazyWrapper.prototype[methodName] = function(iteratee) {\r\n var result = this.clone();\r\n result.__iteratees__.push({\r\n 'iteratee': getIteratee(iteratee, 3),\r\n 'type': type\r\n });\r\n result.__filtered__ = result.__filtered__ || isFilter;\r\n return result;\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\r\n arrayEach(['head', 'last'], function(methodName, index) {\r\n var takeName = 'take' + (index ? 'Right' : '');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this[takeName](1).value()[0];\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\r\n arrayEach(['initial', 'tail'], function(methodName, index) {\r\n var dropName = 'drop' + (index ? '' : 'Right');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\r\n };\r\n });\r\n\r\n LazyWrapper.prototype.compact = function() {\r\n return this.filter(identity);\r\n };\r\n\r\n LazyWrapper.prototype.find = function(predicate) {\r\n return this.filter(predicate).head();\r\n };\r\n\r\n LazyWrapper.prototype.findLast = function(predicate) {\r\n return this.reverse().find(predicate);\r\n };\r\n\r\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\r\n if (typeof path == 'function') {\r\n return new LazyWrapper(this);\r\n }\r\n return this.map(function(value) {\r\n return baseInvoke(value, path, args);\r\n });\r\n });\r\n\r\n LazyWrapper.prototype.reject = function(predicate) {\r\n return this.filter(negate(getIteratee(predicate)));\r\n };\r\n\r\n LazyWrapper.prototype.slice = function(start, end) {\r\n start = toInteger(start);\r\n\r\n var result = this;\r\n if (result.__filtered__ && (start > 0 || end < 0)) {\r\n return new LazyWrapper(result);\r\n }\r\n if (start < 0) {\r\n result = result.takeRight(-start);\r\n } else if (start) {\r\n result = result.drop(start);\r\n }\r\n if (end !== undefined) {\r\n end = toInteger(end);\r\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\r\n return this.reverse().takeWhile(predicate).reverse();\r\n };\r\n\r\n LazyWrapper.prototype.toArray = function() {\r\n return this.take(MAX_ARRAY_LENGTH);\r\n };\r\n\r\n // Add `LazyWrapper` methods to `lodash.prototype`.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\r\n isTaker = /^(?:head|last)$/.test(methodName),\r\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\r\n retUnwrapped = isTaker || /^find/.test(methodName);\r\n\r\n if (!lodashFunc) {\r\n return;\r\n }\r\n lodash.prototype[methodName] = function() {\r\n var value = this.__wrapped__,\r\n args = isTaker ? [1] : arguments,\r\n isLazy = value instanceof LazyWrapper,\r\n iteratee = args[0],\r\n useLazy = isLazy || isArray(value);\r\n\r\n var interceptor = function(value) {\r\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\r\n return (isTaker && chainAll) ? result[0] : result;\r\n };\r\n\r\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\r\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\r\n isLazy = useLazy = false;\r\n }\r\n var chainAll = this.__chain__,\r\n isHybrid = !!this.__actions__.length,\r\n isUnwrapped = retUnwrapped && !chainAll,\r\n onlyLazy = isLazy && !isHybrid;\r\n\r\n if (!retUnwrapped && useLazy) {\r\n value = onlyLazy ? value : new LazyWrapper(this);\r\n var result = func.apply(value, args);\r\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\r\n return new LodashWrapper(result, chainAll);\r\n }\r\n if (isUnwrapped && onlyLazy) {\r\n return func.apply(this, args);\r\n }\r\n result = this.thru(interceptor);\r\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\r\n };\r\n });\r\n\r\n // Add `Array` methods to `lodash.prototype`.\r\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\r\n var func = arrayProto[methodName],\r\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\r\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\r\n\r\n lodash.prototype[methodName] = function() {\r\n var args = arguments;\r\n if (retUnwrapped && !this.__chain__) {\r\n var value = this.value();\r\n return func.apply(isArray(value) ? value : [], args);\r\n }\r\n return this[chainName](function(value) {\r\n return func.apply(isArray(value) ? value : [], args);\r\n });\r\n };\r\n });\r\n\r\n // Map minified method names to their real names.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var lodashFunc = lodash[methodName];\r\n if (lodashFunc) {\r\n var key = (lodashFunc.name + ''),\r\n names = realNames[key] || (realNames[key] = []);\r\n\r\n names.push({ 'name': methodName, 'func': lodashFunc });\r\n }\r\n });\r\n\r\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\r\n 'name': 'wrapper',\r\n 'func': undefined\r\n }];\r\n\r\n // Add methods to `LazyWrapper`.\r\n LazyWrapper.prototype.clone = lazyClone;\r\n LazyWrapper.prototype.reverse = lazyReverse;\r\n LazyWrapper.prototype.value = lazyValue;\r\n\r\n // Add lazy aliases.\r\n lodash.prototype.first = lodash.prototype.head;\r\n\r\n if (symIterator) {\r\n lodash.prototype[symIterator] = wrapperToIterator;\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n // Some AMD build optimizers, like r.js, check for condition patterns like:\r\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\r\n // Expose Lodash on the global object to prevent errors when Lodash is\r\n // loaded by a script tag in the presence of an AMD loader.\r\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\r\n // Use `_.noConflict` to remove Lodash from the global object.\r\n root._ = lodash;\r\n\r\n // Define as an anonymous module so, through path mapping, it can be\r\n // referenced as the \"underscore\" module.\r\n define(function() {\r\n return lodash;\r\n });\r\n }\r\n // Check for `exports` after `define` in case a build optimizer adds it.\r\n else if (freeModule) {\r\n // Export for Node.js.\r\n (freeModule.exports = lodash)._ = lodash;\r\n // Export for CommonJS support.\r\n freeExports._ = lodash;\r\n }\r\n else {\r\n // Export to the global object.\r\n root._ = lodash;\r\n }\r\n}.call(this));\r\n/**\r\n * 基本函数\r\n * Create By GUY 2014\\11\\17\r\n *\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (!_global.BI) {\r\n _global.BI = {};\r\n}\r\n\r\n!(function (undefined) {\r\n var traverse = function (func, context) {\r\n return function (value, key, obj) {\r\n return func.call(context, key, value, obj);\r\n };\r\n };\r\n var _apply = function (name) {\r\n return function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n };\r\n var _applyFunc = function (name) {\r\n return function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[1] = _.isFunction(args[1]) ? traverse(args[1], args[2]) : args[1];\r\n return _[name].apply(_, args);\r\n };\r\n };\r\n\r\n // Utility\r\n _.extend(BI, {\r\n assert: function (v, is) {\r\n if (this.isFunction(is)) {\r\n if (!is(v)) {\r\n throw new Error(v + \" error\");\r\n } else {\r\n return true;\r\n }\r\n }\r\n if (!this.isArray(is)) {\r\n is = [is];\r\n }\r\n if (!this.deepContains(is, v)) {\r\n throw new Error(v + \" error\");\r\n }\r\n return true;\r\n },\r\n\r\n warn: function (message) {\r\n console.warn(message);\r\n },\r\n\r\n UUID: function () {\r\n var f = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n var str = \"\";\r\n for (var i = 0; i < 16; i++) {\r\n var r = parseInt(f.length * Math.random(), 10);\r\n str += f[r];\r\n }\r\n return str;\r\n },\r\n\r\n isWidget: function (widget) {\r\n return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);\r\n },\r\n\r\n createWidgets: function (items, options, context) {\r\n if (!BI.isArray(items)) {\r\n throw new Error(\"cannot create Widgets\");\r\n }\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n return BI.map(BI.flatten(items), function (i, item) {\r\n return BI.createWidget(item, BI.deepClone(options));\r\n });\r\n },\r\n\r\n createItems: function (data, innerAttr, outerAttr) {\r\n innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});\r\n outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});\r\n return BI.map(data, function (i, item) {\r\n if (BI.isArray(item)) {\r\n return BI.createItems(item, innerAttr, outerAttr);\r\n }\r\n if (item instanceof BI.Widget) {\r\n return BI.extend({}, innerAttr.shift(), outerAttr.shift(), {\r\n type: null,\r\n el: item\r\n });\r\n }\r\n if (innerAttr[0] instanceof BI.Widget) {\r\n outerAttr.shift();\r\n return BI.extend({}, item, {\r\n el: innerAttr.shift()\r\n });\r\n }\r\n if (item.el instanceof BI.Widget || (BI.View && item.el instanceof BI.View)) {\r\n innerAttr.shift();\r\n return BI.extend({}, outerAttr.shift(), { type: null }, item);\r\n }\r\n if (item.el) {\r\n return BI.extend({}, outerAttr.shift(), item, {\r\n el: BI.extend({}, innerAttr.shift(), item.el)\r\n });\r\n }\r\n return BI.extend({}, outerAttr.shift(), {\r\n el: BI.extend({}, innerAttr.shift(), item)\r\n });\r\n });\r\n },\r\n\r\n // 用容器包装items\r\n packageItems: function (items, layouts) {\r\n for (var i = layouts.length - 1; i >= 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n return BI.extend({}, layouts[i], {\r\n items: [\r\n BI.extend({}, layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n formatEL: function (obj) {\r\n if (obj && !obj.type && obj.el) {\r\n return obj;\r\n }\r\n return {\r\n el: obj\r\n };\r\n },\r\n\r\n // 剥开EL\r\n stripEL: function (obj) {\r\n return obj.type && obj || obj.el || obj;\r\n },\r\n\r\n trans2Element: function (widgets) {\r\n return BI.map(widgets, function (i, wi) {\r\n return wi.element;\r\n });\r\n }\r\n });\r\n\r\n // 集合相关方法\r\n _.each([\"where\", \"findWhere\", \"invoke\", \"pluck\", \"shuffle\", \"sample\", \"toArray\", \"size\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"get\", \"set\", \"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\", \"clamp\"], function (name) {\r\n if (name === \"any\") {\r\n BI[name] = _applyFunc(\"some\");\r\n } else {\r\n BI[name] = _applyFunc(name);\r\n }\r\n });\r\n _.extend(BI, {\r\n // 数数\r\n count: function (from, to, predicate) {\r\n var t;\r\n if (predicate) {\r\n for (t = from; t < to; t++) {\r\n predicate(t);\r\n }\r\n }\r\n return to - from;\r\n },\r\n\r\n // 倒数\r\n inverse: function (from, to, predicate) {\r\n return BI.count(to, from, predicate);\r\n },\r\n\r\n firstKey: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastKey: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n firstObject: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastObject: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n concat: function (obj1, obj2) {\r\n if (BI.isKey(obj1)) {\r\n return BI.map([].slice.apply(arguments), function (idx, v) {\r\n return v;\r\n }).join(\"\");\r\n }\r\n if (BI.isArray(obj1)) {\r\n return _.concat.apply([], arguments);\r\n }\r\n if (BI.isObject(obj1)) {\r\n return _.extend.apply({}, arguments);\r\n }\r\n },\r\n\r\n backEach: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n predicate(index, obj[index], obj);\r\n }\r\n return false;\r\n },\r\n\r\n backAny: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (predicate(index, obj[index], obj)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n backEvery: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (!predicate(index, obj[index], obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n backFindKey: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) {\r\n return key;\r\n }\r\n }\r\n },\r\n\r\n backFind: function (obj, predicate, context) {\r\n var key;\r\n if (BI.isArray(obj)) {\r\n key = BI.findLastIndex(obj, predicate, context);\r\n } else {\r\n key = BI.backFindKey(obj, predicate, context);\r\n }\r\n if (key !== void 0 && key !== -1) {\r\n return obj[key];\r\n }\r\n },\r\n\r\n remove: function (obj, target, context) {\r\n var isFunction = BI.isFunction(target);\r\n target = isFunction || BI.isArray(target) ? target : [target];\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n obj.splice(i--, 1);\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n delete obj[i];\r\n }\r\n });\r\n }\r\n },\r\n\r\n removeAt: function (obj, index) {\r\n index = BI.isArray(index) ? index : [index];\r\n var isArray = BI.isArray(obj), i;\r\n for (i = 0; i < index.length; i++) {\r\n if (isArray) {\r\n obj[index[i]] = \"$deleteIndex\";\r\n } else {\r\n delete obj[index[i]];\r\n }\r\n }\r\n if (isArray) {\r\n BI.remove(obj, \"$deleteIndex\");\r\n }\r\n },\r\n\r\n string2Array: function (str) {\r\n return str.split(\"&-&\");\r\n },\r\n\r\n array2String: function (array) {\r\n return array.join(\"&-&\");\r\n },\r\n\r\n abc2Int: function (str) {\r\n var idx = 0, start = \"A\", str = str.toUpperCase();\r\n for (var i = 0, len = str.length; i < len; ++i) {\r\n idx = str.charAt(i).charCodeAt(0) - start.charCodeAt(0) + 26 * idx + 1;\r\n if (idx > (2147483646 - str.charAt(i).charCodeAt(0) + start.charCodeAt(0)) / 26) {\r\n return 0;\r\n }\r\n }\r\n return idx;\r\n },\r\n\r\n int2Abc: function (num) {\r\n 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\"];\r\n var idx = num, str = \"\";\r\n if (num === 0) {\r\n return \"\";\r\n }\r\n while (idx !== 0) {\r\n var t = idx % 26;\r\n if (t === 0) {\r\n t = 26;\r\n }\r\n str = DIGITS[t - 1] + str;\r\n idx = (idx - t) / 26;\r\n }\r\n return str;\r\n }\r\n });\r\n\r\n // 数组相关的方法\r\n _.each([\"first\", \"initial\", \"last\", \"rest\", \"compact\", \"flatten\", \"without\", \"union\", \"intersection\",\r\n \"difference\", \"zip\", \"unzip\", \"object\", \"indexOf\", \"lastIndexOf\", \"sortedIndex\", \"range\", \"take\", \"takeRight\", \"uniqBy\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"findIndex\", \"findLastIndex\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n // 构建一个长度为length的数组\r\n makeArray: function (length, value) {\r\n var res = [];\r\n for (var i = 0; i < length; i++) {\r\n if (BI.isNull(value)) {\r\n res.push(i);\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n makeObject: function (array, value) {\r\n var map = {};\r\n for (var i = 0; i < array.length; i++) {\r\n if (BI.isNull(value)) {\r\n map[array[i]] = array[i];\r\n } else {\r\n map[array[i]] = BI.deepClone(value);\r\n }\r\n }\r\n return map;\r\n },\r\n\r\n makeArrayByArray: function (array, value) {\r\n var res = [];\r\n if (!array) {\r\n return res;\r\n }\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n if (BI.isArray(array[i])) {\r\n res.push(arguments.callee(array[i], value));\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n uniq: function (array, isSorted, iteratee, context) {\r\n if (array == null) {\r\n return [];\r\n }\r\n if (!_.isBoolean(isSorted)) {\r\n context = iteratee;\r\n iteratee = isSorted;\r\n isSorted = false;\r\n }\r\n iteratee && (iteratee = traverse(iteratee, context));\r\n return _.uniq.call(_, array, isSorted, iteratee, context);\r\n }\r\n });\r\n\r\n // 对象相关方法\r\n _.each([\"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\", \"create\", \"functions\", \"extend\", \"extendOwn\",\r\n \"defaults\", \"clone\", \"property\", \"propertyOf\", \"matcher\", \"isEqual\", \"isMatch\", \"isEmpty\",\r\n \"isElement\", \"isNumber\", \"isString\", \"isArray\", \"isObject\", \"isPlainObject\", \"isArguments\", \"isFunction\", \"isFinite\",\r\n \"isBoolean\", \"isDate\", \"isRegExp\", \"isError\", \"isNaN\", \"isUndefined\", \"zipObject\", \"cloneDeep\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n\r\n inherit: function (sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function () {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function () {\r\n }, spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n },\r\n\r\n init: function () {\r\n // 先把准备环境准备好\r\n while (BI.prepares && BI.prepares.length > 0) {\r\n BI.prepares.shift()();\r\n }\r\n BI.initialized = true;\r\n },\r\n\r\n has: function (obj, keys) {\r\n if (BI.isArray(keys)) {\r\n if (keys.length === 0) {\r\n return false;\r\n }\r\n return BI.every(keys, function (i, key) {\r\n return _.has(obj, key);\r\n });\r\n }\r\n return _.has.apply(_, arguments);\r\n },\r\n\r\n freeze: function (value) {\r\n // 在ES5中,如果这个方法的参数不是一个对象(一个原始值),那么它会导致 TypeError\r\n // 在ES2015中,非对象参数将被视为要被冻结的普通对象,并被简单地返回\r\n if (Object.freeze && BI.isObject(value)) {\r\n return Object.freeze(value);\r\n }\r\n return value;\r\n },\r\n\r\n // 数字和字符串可以作为key\r\n isKey: function (key) {\r\n return BI.isNumber(key) || (BI.isString(key) && key.length > 0);\r\n },\r\n\r\n // 忽略大小写的等于\r\n isCapitalEqual: function (a, b) {\r\n a = BI.isNull(a) ? a : (\"\" + a).toLowerCase();\r\n b = BI.isNull(b) ? b : (\"\" + b).toLowerCase();\r\n return BI.isEqual(a, b);\r\n },\r\n\r\n isWidthOrHeight: function (w) {\r\n if (typeof w === \"number\") {\r\n return w >= 0;\r\n } else if (typeof w === \"string\") {\r\n return /^\\d{1,3}%$/.exec(w) || w == \"auto\" || /^\\d+px$/.exec(w);\r\n }\r\n },\r\n\r\n isNotNull: function (obj) {\r\n return !BI.isNull(obj);\r\n },\r\n\r\n isNull: function (obj) {\r\n return typeof obj === \"undefined\" || obj === null;\r\n },\r\n\r\n isEmptyArray: function (arr) {\r\n return BI.isArray(arr) && BI.isEmpty(arr);\r\n },\r\n\r\n isNotEmptyArray: function (arr) {\r\n return BI.isArray(arr) && !BI.isEmpty(arr);\r\n },\r\n\r\n isEmptyObject: function (obj) {\r\n return BI.isEqual(obj, {});\r\n },\r\n\r\n isNotEmptyObject: function (obj) {\r\n return BI.isPlainObject(obj) && !BI.isEmptyObject(obj);\r\n },\r\n\r\n isEmptyString: function (obj) {\r\n return BI.isString(obj) && obj.length === 0;\r\n },\r\n\r\n isNotEmptyString: function (obj) {\r\n return BI.isString(obj) && !BI.isEmptyString(obj);\r\n },\r\n\r\n isWindow: function (obj) {\r\n return obj != null && obj == obj.window;\r\n }\r\n });\r\n\r\n // deep方法\r\n _.extend(BI, {\r\n deepClone: _.cloneDeep,\r\n deepExtend: _.merge,\r\n\r\n isDeepMatch: function (object, attrs) {\r\n var keys = BI.keys(attrs), length = keys.length;\r\n if (object == null) {\r\n return !length;\r\n }\r\n var obj = Object(object);\r\n for (var i = 0; i < length; i++) {\r\n var key = keys[i];\r\n if (!BI.isEqual(attrs[key], obj[key]) || !(key in obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n contains: function (obj, target, fromIndex) {\r\n if (!_.isArrayLike(obj)) obj = _.values(obj);\r\n return _.indexOf(obj, target, typeof fromIndex === \"number\" && fromIndex) >= 0;\r\n },\r\n\r\n deepContains: function (obj, copy) {\r\n if (BI.isObject(copy)) {\r\n return BI.any(obj, function (i, v) {\r\n if (BI.isEqual(v, copy)) {\r\n return true;\r\n }\r\n });\r\n }\r\n return BI.contains(obj, copy);\r\n },\r\n\r\n deepIndexOf: function (obj, target) {\r\n for (var i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n },\r\n\r\n deepRemove: function (obj, target) {\r\n var done = false;\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n obj.splice(i--, 1);\r\n done = true;\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if (BI.isEqual(target, obj[i])) {\r\n delete obj[i];\r\n done = true;\r\n }\r\n });\r\n }\r\n return done;\r\n },\r\n\r\n deepWithout: function (obj, target) {\r\n if (BI.isArray(obj)) {\r\n var result = [];\r\n for (var i = 0; i < obj.length; i++) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result.push(obj[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n var result = {};\r\n BI.each(obj, function (i, v) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result[i] = v;\r\n }\r\n });\r\n return result;\r\n\r\n },\r\n\r\n deepUnique: function (array) {\r\n var result = [];\r\n BI.each(array, function (i, item) {\r\n if (!BI.deepContains(result, item)) {\r\n result.push(item);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n // 比较两个对象得出不一样的key值\r\n deepDiff: function (object, other) {\r\n object || (object = {});\r\n other || (other = {});\r\n var result = [];\r\n var used = [];\r\n for (var b in object) {\r\n if (this.has(object, b)) {\r\n if (!this.isEqual(object[b], other[b])) {\r\n result.push(b);\r\n }\r\n used.push(b);\r\n }\r\n }\r\n for (var b in other) {\r\n if (this.has(other, b) && !BI.contains(used, b)) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n }\r\n });\r\n\r\n // 通用方法\r\n _.each([\"uniqueId\", \"result\", \"chain\", \"iteratee\", \"escape\", \"unescape\", \"before\", \"after\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n // 事件相关方法\r\n _.each([\"bind\", \"once\", \"partial\", \"debounce\", \"throttle\", \"delay\", \"defer\", \"wrap\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n _.extend(BI, {\r\n nextTick: (function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n if (typeof Promise !== \"undefined\") {\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(String(counter));\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function timerFunc() {\r\n counter = (counter + 1) % 2;\r\n textNode.data = String(counter);\r\n };\r\n } else if (typeof setImmediate !== \"undefined\") {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else {\r\n // Fallback to setTimeout.\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb) {\r\n var _resolve = void 0;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.apply(null, args);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve.apply(null, args);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n })()\r\n });\r\n\r\n // 数字相关方法\r\n _.each([\"random\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.extend(BI, {\r\n getTime: function () {\r\n if (_global.performance && _global.performance.now) {\r\n return _global.performance.now();\r\n }\r\n if (_global.performance && _global.performance.webkitNow) {\r\n return _global.performance.webkitNow();\r\n }\r\n if (Date.now) {\r\n return Date.now();\r\n }\r\n return BI.getDate().getTime();\r\n\r\n\r\n },\r\n\r\n parseInt: function (number) {\r\n var radix = 10;\r\n if (/^0x/g.test(number)) {\r\n radix = 16;\r\n }\r\n try {\r\n return parseInt(number, radix);\r\n } catch (e) {\r\n throw new Error(number + \"parse int error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n parseSafeInt: function (value) {\r\n var MAX_SAFE_INTEGER = 9007199254740991;\r\n return value\r\n ? this.clamp(this.parseInt(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\r\n : (value === 0 ? value : 0);\r\n },\r\n\r\n parseFloat: function (number) {\r\n try {\r\n return parseFloat(number);\r\n } catch (e) {\r\n throw new Error(number + \"parse float error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n isNaturalNumber: function (number) {\r\n if (/^\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isPositiveInteger: function (number) {\r\n if (/^\\+?[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNegativeInteger: function (number) {\r\n if (/^\\-[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isInteger: function (number) {\r\n if (/^\\-?\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNumeric: function (number) {\r\n return !isNaN(parseFloat(number)) && isFinite(number);\r\n },\r\n\r\n isFloat: function (number) {\r\n if (/^([+-]?)\\d*\\.\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isOdd: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 1;\r\n },\r\n\r\n isEven: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 0;\r\n },\r\n\r\n sum: function (array, iteratee, context) {\r\n var sum = 0;\r\n BI.each(array, function (i, item) {\r\n if (iteratee) {\r\n sum += Number(iteratee.apply(context, [i, item]));\r\n } else {\r\n sum += Number(item);\r\n }\r\n });\r\n return sum;\r\n },\r\n\r\n average: function (array, iteratee, context) {\r\n var sum = BI.sum(array, iteratee, context);\r\n return sum / array.length;\r\n }\r\n });\r\n\r\n // 字符串相关方法\r\n _.extend(BI, {\r\n trim: function () {\r\n return _.trim.apply(_, arguments);\r\n },\r\n\r\n toUpperCase: function (string) {\r\n return (string + \"\").toLocaleUpperCase();\r\n },\r\n\r\n toLowerCase: function (string) {\r\n return (string + \"\").toLocaleLowerCase();\r\n },\r\n\r\n isEndWithBlank: function (string) {\r\n return /(\\s|\\u00A0)$/.test(string);\r\n },\r\n\r\n isLiteral: function (exp) {\r\n var literalValueRE = /^\\s?(true|false|-?[\\d\\.]+|'[^']*'|\"[^\"]*\")\\s?$/;\r\n return literalValueRE.test(exp);\r\n },\r\n\r\n stripQuotes: function (str) {\r\n var a = str.charCodeAt(0);\r\n var b = str.charCodeAt(str.length - 1);\r\n return a === b && (a === 0x22 || a === 0x27)\r\n ? str.slice(1, -1)\r\n : str;\r\n },\r\n\r\n // background-color => backgroundColor\r\n camelize: function (str) {\r\n return str.replace(/-(.)/g, function (_, character) {\r\n return character.toUpperCase();\r\n });\r\n },\r\n\r\n // backgroundColor => background-color\r\n hyphenate: function (str) {\r\n return str.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n },\r\n\r\n isNotEmptyString: function (str) {\r\n return BI.isString(str) && !BI.isEmpty(str);\r\n },\r\n\r\n isEmptyString: function (str) {\r\n return BI.isString(str) && BI.isEmpty(str);\r\n },\r\n\r\n /**\r\n * 通用加密方法\r\n */\r\n encrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesEncrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 通用解密方法\r\n * @param type 解密方式\r\n * @param text 文本\r\n * @param key 种子\r\n * @return {*}\r\n */\r\n decrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesDecrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 对字符串中的'和\\做编码处理\r\n * @static\r\n * @param {String} string 要做编码处理的字符串\r\n * @return {String} 编码后的字符串\r\n */\r\n escape: function (string) {\r\n return string.replace(/('|\\\\)/g, \"\\\\$1\");\r\n },\r\n\r\n /**\r\n * 让字符串通过指定字符做补齐的函数\r\n *\r\n * var s = BI.leftPad('123', 5, '0');//s的值为:'00123'\r\n *\r\n * @static\r\n * @param {String} val 原始值\r\n * @param {Number} size 总共需要的位数\r\n * @param {String} ch 用于补齐的字符\r\n * @return {String} 补齐后的字符串\r\n */\r\n leftPad: function (val, size, ch) {\r\n var result = String(val);\r\n if (!ch) {\r\n ch = \" \";\r\n }\r\n while (result.length < size) {\r\n result = ch + result;\r\n }\r\n return result.toString();\r\n },\r\n\r\n /**\r\n * 对字符串做替换的函数\r\n *\r\n * var cls = 'my-class', text = 'Some text';\r\n * var res = BI.format('<div class=\"{0}\">{1}</div>', cls, text);\r\n * //res的值为:'<div class=\"my-class\">Some text</div>';\r\n *\r\n * @static\r\n * @param {String} format 要做替换的字符串,替换字符串1,替换字符串2...\r\n * @return {String} 做了替换后的字符串\r\n */\r\n format: function (format) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n return format.replace(/\\{(\\d+)\\}/g, function (m, i) {\r\n return args[i];\r\n });\r\n }\r\n });\r\n\r\n // 日期相关方法\r\n _.extend(BI, {\r\n /**\r\n * 是否是闰年\r\n * @param year\r\n * @returns {boolean}\r\n */\r\n isLeapYear: function (year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n },\r\n\r\n /**\r\n * 检测是否在有效期\r\n *\r\n * @param YY 年\r\n * @param MM 月\r\n * @param DD 日\r\n * @param minDate '1900-01-01'\r\n * @param maxDate '2099-12-31'\r\n * @returns {Array} 若无效返回无效状态\r\n */\r\n checkDateVoid: function (YY, MM, DD, minDate, maxDate) {\r\n var back = [];\r\n YY = YY | 0;\r\n MM = MM | 0;\r\n DD = DD | 0;\r\n minDate = BI.isString(minDate) ? minDate.match(/\\d+/g) : minDate;\r\n maxDate = BI.isString(maxDate) ? maxDate.match(/\\d+/g) : maxDate;\r\n if (YY < minDate[0]) {\r\n back = [\"y\"];\r\n } else if (YY > maxDate[0]) {\r\n back = [\"y\", 1];\r\n } else if (YY >= minDate[0] && YY <= maxDate[0]) {\r\n if (YY == minDate[0]) {\r\n if (MM < minDate[1]) {\r\n back = [\"m\"];\r\n } else if (MM == minDate[1]) {\r\n if (DD < minDate[2]) {\r\n back = [\"d\"];\r\n }\r\n }\r\n }\r\n if (YY == maxDate[0]) {\r\n if (MM > maxDate[1]) {\r\n back = [\"m\", 1];\r\n } else if (MM == maxDate[1]) {\r\n if (DD > maxDate[2]) {\r\n back = [\"d\", 1];\r\n }\r\n }\r\n }\r\n }\r\n return back;\r\n },\r\n\r\n checkDateLegal: function (str) {\r\n var ar = str.match(/\\d+/g);\r\n var YY = ar[0] | 0, MM = ar[1] | 0, DD = ar[2] | 0;\r\n if (ar.length <= 1) {\r\n return true;\r\n }\r\n if (ar.length <= 2) {\r\n return MM >= 1 && MM <= 12;\r\n }\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(YY) ? 29 : 28;\r\n return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];\r\n },\r\n\r\n parseDateTime: function (str, fmt) {\r\n var today = BI.getDate();\r\n var y = 0;\r\n var m = 0;\r\n var d = 1;\r\n // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。\r\n var a = str.split(/\\W+/);\r\n if (fmt.toLowerCase() == \"%y%x\" || fmt.toLowerCase() == \"%y%x%d\") {\r\n var yearlength = 4;\r\n var otherlength = 2;\r\n a[0] = str.substring(0, yearlength);\r\n a[1] = str.substring(yearlength, yearlength + otherlength);\r\n a[2] = str.substring(yearlength + otherlength, yearlength + otherlength * 2);\r\n }\r\n var b = fmt.match(/%./g);\r\n var i = 0, j = 0;\r\n var hr = 0;\r\n var min = 0;\r\n var sec = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n switch (b[i]) {\r\n case \"%d\":\r\n case \"%e\":\r\n d = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%X\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n case \"%x\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n\r\n case \"%Y\":\r\n case \"%y\":\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n break;\r\n\r\n case \"%b\":\r\n case \"%B\":\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n m = j;\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case \"%H\":\r\n case \"%I\":\r\n case \"%k\":\r\n case \"%l\":\r\n hr = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%P\":\r\n case \"%p\":\r\n if (/pm/i.test(a[i]) && hr < 12) {\r\n hr += 12;\r\n } else if (/am/i.test(a[i]) && hr >= 12) {\r\n hr -= 12;\r\n }\r\n break;\r\n\r\n case \"%M\":\r\n min = parseInt(a[i], 10);\r\n case \"%S\":\r\n sec = parseInt(a[i], 10);\r\n break;\r\n }\r\n }\r\n // if (!a[i]) {\r\n // continue;\r\n //\t}\r\n if (isNaN(y)) {\r\n y = today.getFullYear();\r\n }\r\n if (isNaN(m)) {\r\n m = today.getMonth();\r\n }\r\n if (isNaN(d)) {\r\n d = today.getDate();\r\n }\r\n if (isNaN(hr)) {\r\n hr = today.getHours();\r\n }\r\n if (isNaN(min)) {\r\n min = today.getMinutes();\r\n }\r\n if (isNaN(sec)) {\r\n sec = today.getSeconds();\r\n }\r\n if (y != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n y = 0;\r\n m = -1;\r\n d = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n if (a[i].search(/[a-zA-Z]+/) != -1) {\r\n var t = -1;\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n t = j;\r\n break;\r\n }\r\n }\r\n if (t != -1) {\r\n if (m != -1) {\r\n d = m + 1;\r\n }\r\n m = t;\r\n }\r\n } else if (parseInt(a[i], 10) <= 12 && m == -1) {\r\n m = a[i] - 1;\r\n } else if (parseInt(a[i], 10) > 31 && y == 0) {\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n } else if (d == 0) {\r\n d = a[i];\r\n }\r\n }\r\n if (y == 0) {\r\n y = today.getFullYear();\r\n }\r\n if (m != -1 && d != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n return today;\r\n },\r\n\r\n getDate: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {\r\n var localTime = dt.getTime();\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数\r\n var utc = localTime + localOffset; // utc即GMT时间标准时区\r\n return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);\r\n }\r\n return dt;\r\n\r\n },\r\n\r\n getTime: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone)) {\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;\r\n }\r\n return dt.getTime();\r\n\r\n }\r\n });\r\n})();\r\n!(function () {\r\n function extend () {\r\n var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy;\r\n for (; i < length; i++) {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null) {\r\n // Extend the base object\r\n for (name in options) {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy) {\r\n continue;\r\n }\r\n\r\n if (copy !== undefined) {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n\r\n /**\r\n * 客户端观察者,主要处理事件的添加、删除、执行等\r\n * @class BI.OB\r\n * @abstract\r\n */\r\n BI.OB = function (config) {\r\n this._constructor(config);\r\n };\r\n _.extend(BI.OB.prototype, {\r\n props: {},\r\n init: null,\r\n destroyed: null,\r\n\r\n _constructor: function (config) {\r\n this._initProps(config);\r\n this._init();\r\n this._initRef();\r\n },\r\n\r\n _defaultConfig: function (config) {\r\n return {};\r\n },\r\n\r\n _initProps: function (config) {\r\n var props = this.props;\r\n if (BI.isFunction(this.props)) {\r\n props = this.props(config);\r\n }\r\n this.options = extend(this._defaultConfig(config), props, config);\r\n },\r\n\r\n _init: function () {\r\n this._initListeners();\r\n this.init && this.init();\r\n },\r\n\r\n _initListeners: function () {\r\n var self = this;\r\n if (this.options.listeners != null) {\r\n _.each(this.options.listeners, function (lis) {\r\n (lis.target ? lis.target : self)[lis.once ? \"once\" : \"on\"]\r\n (lis.eventName, _.bind(lis.action, self));\r\n });\r\n delete this.options.listeners;\r\n }\r\n },\r\n\r\n // 获得一个当前对象的引用\r\n _initRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(this, this);\r\n }\r\n },\r\n\r\n //释放当前对象\r\n _purgeRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(null);\r\n this.options.ref = null;\r\n }\r\n },\r\n\r\n _getEvents: function () {\r\n if (!_.isArray(this.events)) {\r\n this.events = [];\r\n }\r\n return this.events;\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n on: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (!_.isArray(fns)) {\r\n fns = [];\r\n this._getEvents()[eventName] = fns;\r\n }\r\n fns.push(fn);\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个只执行一次的事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n once: function (eventName, fn) {\r\n var proxy = function () {\r\n fn.apply(this, arguments);\r\n this.un(eventName, proxy);\r\n };\r\n this.on(eventName, proxy);\r\n },\r\n /**\r\n * 解除观察者绑定的指定事件\r\n * @param {String} eventName 要解除绑定事件的名字\r\n * @param {Function} fn 事件对应的执行函数,该参数是可选的,没有该参数时,将解除绑定所有同名字的事件\r\n */\r\n un: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n\r\n /* alex:如果fn是null,就是把eventName上面所有方法都un掉*/\r\n if (fn == null) {\r\n delete this._getEvents()[eventName];\r\n } else {\r\n var fns = this._getEvents()[eventName];\r\n if (_.isArray(fns)) {\r\n var newFns = [];\r\n _.each(fns, function (ifn) {\r\n if (ifn != fn) {\r\n newFns.push(ifn);\r\n }\r\n });\r\n this._getEvents()[eventName] = newFns;\r\n }\r\n }\r\n },\r\n /**\r\n * 清除观察者的所有事件绑定\r\n */\r\n purgeListeners: function () {\r\n /* alex:清空events*/\r\n this.events = [];\r\n },\r\n /**\r\n * 触发绑定过的事件\r\n *\r\n * @param {String} eventName 要触发的事件的名字\r\n * @returns {Boolean} 如果事件函数返回false,则返回false并中断其他同名事件的执行,否则执行所有的同名事件并返回true\r\n */\r\n fireEvent: function () {\r\n var eventName = arguments[0].toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (BI.isArray(fns)) {\r\n if (BI.isArguments(arguments[1])) {\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, arguments[1]) === false) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, args) === false) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n destroy: function () {\r\n this.destroyed && this.destroyed();\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n})();/**\r\n * Widget超类\r\n * @class BI.Widget\r\n * @extends BI.OB\r\n *\r\n * @cfg {JSON} options 配置属性\r\n */\r\n\r\n!(function () {\r\n BI.Widget = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), {\r\n root: false,\r\n tagName: \"div\",\r\n attributes: null,\r\n data: null,\r\n\r\n tag: null,\r\n disabled: false,\r\n invisible: false,\r\n invalid: false,\r\n baseCls: \"\",\r\n extraCls: \"\",\r\n cls: \"\",\r\n css: null\r\n });\r\n },\r\n\r\n // 覆盖父类的_constructor方法,widget不走ob的生命周期\r\n _constructor: function () {\r\n },\r\n\r\n beforeInit: null,\r\n\r\n // 生命周期函数\r\n beforeCreate: null,\r\n\r\n created: null,\r\n\r\n render: null,\r\n\r\n beforeMount: null,\r\n\r\n mounted: null,\r\n\r\n shouldUpdate: null,\r\n\r\n update: function () {\r\n },\r\n\r\n beforeDestroy: null,\r\n\r\n destroyed: null,\r\n\r\n _init: function () {\r\n BI.Widget.superclass._init.apply(this, arguments);\r\n this._initRoot();\r\n this._initElementWidth();\r\n this._initElementHeight();\r\n this._initVisual();\r\n this._initState();\r\n this._initRender();\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(this._render, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n _render: function () {\r\n this.__asking = false;\r\n this.beforeCreate && this.beforeCreate();\r\n this._initElement();\r\n this._initEffects();\r\n this.created && this.created();\r\n },\r\n\r\n /**\r\n * 初始化根节点\r\n * @private\r\n */\r\n _initRoot: function () {\r\n var o = this.options;\r\n this.widgetName = o.widgetName || BI.uniqueId(\"widget\");\r\n this._isRoot = o.root;\r\n if (BI.isWidget(o.element)) {\r\n if (o.element instanceof BI.Widget) {\r\n this._parent = o.element;\r\n this._parent.addWidget(this.widgetName, this);\r\n } else {\r\n this._isRoot = true;\r\n }\r\n this.element = this.options.element.element;\r\n } else if (o.element) {\r\n // if (o.root !== true) {\r\n // throw new Error(\"root is a required property\");\r\n // }\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n this._isRoot = true;\r\n } else {\r\n this.element = BI.Widget._renderEngine.createElement(this);\r\n }\r\n this.element._isWidget = true;\r\n if (o._baseCls || o.baseCls || o.extraCls || o.cls) {\r\n this.element.addClass((o._baseCls || \"\") + \" \" + (o.baseCls || \"\") + \" \" + (o.extraCls || \"\") + \" \" + (o.cls || \"\"));\r\n }\r\n if (o.attributes) {\r\n this.element.attr(o.attributes);\r\n }\r\n if (o.data) {\r\n this.element.data(o.data);\r\n }\r\n if (o.css) {\r\n this.element.css(o.css);\r\n }\r\n this._children = {};\r\n },\r\n\r\n _initElementWidth: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.width)) {\r\n this.element.css(\"width\", o.width);\r\n }\r\n },\r\n\r\n _initElementHeight: function () {\r\n var o = this.options;\r\n if (BI.isWidthOrHeight(o.height)) {\r\n this.element.css(\"height\", o.height);\r\n }\r\n },\r\n\r\n _initVisual: function () {\r\n var o = this.options;\r\n if (o.invisible) {\r\n // 用display属性做显示和隐藏,否则jquery会在显示时将display设为block会覆盖掉display:flex属性\r\n this.element.css(\"display\", \"none\");\r\n }\r\n },\r\n\r\n _initEffects: function () {\r\n var o = this.options;\r\n if (o.disabled || o.invalid) {\r\n if (this.options.disabled) {\r\n this.setEnable(false);\r\n }\r\n if (this.options.invalid) {\r\n this.setValid(false);\r\n }\r\n }\r\n },\r\n\r\n _initState: function () {\r\n this._isMounted = false;\r\n },\r\n\r\n _initElement: function () {\r\n var self = this;\r\n var els = this.render && this.render();\r\n if (BI.isPlainObject(els)) {\r\n els = [els];\r\n }\r\n if (BI.isArray(els)) {\r\n BI.each(els, function (i, el) {\r\n BI.createWidget(el, {\r\n element: self\r\n });\r\n });\r\n }\r\n // if (this._isRoot === true || !(this instanceof BI.Layout)) {\r\n this._mount();\r\n // }\r\n },\r\n\r\n _setParent: function (parent) {\r\n this._parent = parent;\r\n },\r\n\r\n /**\r\n *\r\n * @param force 是否强制挂载子节点\r\n * @param deep 子节点是否也是按照当前force处理\r\n * @param lifeHook 生命周期钩子触不触发,默认触发\r\n * @param predicate 递归每个widget的回调\r\n * @returns {boolean}\r\n * @private\r\n */\r\n _mount: function (force, deep, lifeHook, predicate) {\r\n var self = this;\r\n if (!force && (this._isMounted || !this.isVisible() || this.__asking === true || !(this._isRoot === true || (this._parent && this._parent._isMounted === true)))) {\r\n return false;\r\n }\r\n lifeHook !== false && this.beforeMount && this.beforeMount();\r\n this._isMounted = true;\r\n this._mountChildren && this._mountChildren();\r\n BI.each(this._children, function (i, widget) {\r\n !self.isEnabled() && widget._setEnable(false);\r\n !self.isValid() && widget._setValid(false);\r\n widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate);\r\n });\r\n lifeHook !== false && this.mounted && this.mounted();\r\n this.fireEvent(BI.Events.MOUNT);\r\n predicate && predicate(this);\r\n return true;\r\n },\r\n\r\n _mountChildren: null,\r\n\r\n isMounted: function () {\r\n return this._isMounted;\r\n },\r\n\r\n setWidth: function (w) {\r\n this.options.width = w;\r\n this._initElementWidth();\r\n },\r\n\r\n setHeight: function (h) {\r\n this.options.height = h;\r\n this._initElementHeight();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n if (enable === true) {\r\n this.options.disabled = false;\r\n } else if (enable === false) {\r\n this.options.disabled = true;\r\n }\r\n // 递归将所有子组件使能\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetEnable && child._setEnable && child._setEnable(enable);\r\n });\r\n },\r\n\r\n _setValid: function (valid) {\r\n if (valid === true) {\r\n this.options.invalid = false;\r\n } else if (valid === false) {\r\n this.options.invalid = true;\r\n }\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n !child._manualSetValid && child._setValid && child._setValid(valid);\r\n });\r\n },\r\n\r\n _setVisible: function (visible) {\r\n if (visible === true) {\r\n this.options.invisible = false;\r\n } else if (visible === false) {\r\n this.options.invisible = true;\r\n }\r\n },\r\n\r\n setEnable: function (enable) {\r\n this._manualSetEnable = true;\r\n this._setEnable(enable);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setVisible: function (visible) {\r\n this._setVisible(visible);\r\n if (visible === true) {\r\n // 用this.element.show()会把display属性改成block\r\n this.element.css(\"display\", \"\");\r\n this._mount();\r\n } else if (visible === false) {\r\n this.element.css(\"display\", \"none\");\r\n }\r\n this.fireEvent(BI.Events.VIEW, visible);\r\n },\r\n\r\n setValid: function (valid) {\r\n this._manualSetValid = true;\r\n this._setValid(valid);\r\n if (valid === true) {\r\n this.element.removeClass(\"base-invalid invalid\");\r\n } else if (valid === false) {\r\n this.element.addClass(\"base-invalid invalid\");\r\n }\r\n },\r\n\r\n doBehavior: function () {\r\n var args = arguments;\r\n // 递归将所有子组件使有效\r\n BI.each(this._children, function (i, child) {\r\n child.doBehavior && child.doBehavior.apply(child, args);\r\n });\r\n },\r\n\r\n getWidth: function () {\r\n return this.options.width;\r\n },\r\n\r\n getHeight: function () {\r\n return this.options.height;\r\n },\r\n\r\n isValid: function () {\r\n return !this.options.invalid;\r\n },\r\n\r\n addWidget: function (name, widget) {\r\n var self = this;\r\n if (name instanceof BI.Widget) {\r\n widget = name;\r\n name = widget.getName();\r\n }\r\n if (BI.isKey(name)) {\r\n name = name + \"\";\r\n }\r\n name = name || widget.getName() || BI.uniqueId(\"widget\");\r\n if (this._children[name]) {\r\n throw new Error(\"name has already been existed\");\r\n }\r\n widget._setParent && widget._setParent(this);\r\n widget.on(BI.Events.DESTROY, function () {\r\n BI.remove(self._children, this);\r\n });\r\n return (this._children[name] = widget);\r\n },\r\n\r\n getWidgetByName: function (name) {\r\n if (!BI.isKey(name) || name === this.getName()) {\r\n return this;\r\n }\r\n name = name + \"\";\r\n var widget = void 0, other = {};\r\n BI.any(this._children, function (i, wi) {\r\n if (i === name) {\r\n widget = wi;\r\n return true;\r\n }\r\n other[i] = wi;\r\n });\r\n if (!widget) {\r\n BI.any(other, function (i, wi) {\r\n return (widget = wi.getWidgetByName(i));\r\n });\r\n }\r\n return widget;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var self = this;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.remove(this._children, nameOrWidget);\r\n } else {\r\n delete this._children[nameOrWidget];\r\n }\r\n },\r\n\r\n hasWidget: function (name) {\r\n return this._children[name] != null;\r\n },\r\n\r\n getName: function () {\r\n return this.widgetName;\r\n },\r\n\r\n setTag: function (tag) {\r\n this.options.tag = tag;\r\n },\r\n\r\n getTag: function () {\r\n return this.options.tag;\r\n },\r\n\r\n attr: function (key, value) {\r\n var self = this;\r\n if (BI.isPlainObject(key)) {\r\n BI.each(key, function (k, v) {\r\n self.attr(k, v);\r\n });\r\n return;\r\n }\r\n if (BI.isNotNull(value)) {\r\n return this.options[key] = value;\r\n }\r\n return this.options[key];\r\n },\r\n\r\n css: function (name, value) {\r\n return this.element.css(name, value);\r\n },\r\n\r\n getText: function () {\r\n\r\n },\r\n\r\n setText: function (text) {\r\n\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n setValue: function (value) {\r\n\r\n },\r\n\r\n isEnabled: function () {\r\n return !this.options.disabled;\r\n },\r\n\r\n isVisible: function () {\r\n return !this.options.invisible;\r\n },\r\n\r\n disable: function () {\r\n this.setEnable(false);\r\n },\r\n\r\n enable: function () {\r\n this.setEnable(true);\r\n },\r\n\r\n valid: function () {\r\n this.setValid(true);\r\n },\r\n\r\n invalid: function () {\r\n this.setValid(false);\r\n },\r\n\r\n invisible: function () {\r\n this.setVisible(false);\r\n },\r\n\r\n visible: function () {\r\n this.setVisible(true);\r\n },\r\n\r\n __d: function () {\r\n this.beforeDestroy && this.beforeDestroy();\r\n this.beforeDestroy = null;\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this._parent = null;\r\n this._isMounted = false;\r\n this.destroyed && this.destroyed();\r\n this.destroyed = null;\r\n },\r\n\r\n _unMount: function () {\r\n this.__d();\r\n this.fireEvent(BI.Events.UNMOUNT);\r\n this.purgeListeners();\r\n },\r\n\r\n isolate: function () {\r\n if (this._parent) {\r\n this._parent.removeWidget(this);\r\n }\r\n BI.DOM.hang([this]);\r\n },\r\n\r\n empty: function () {\r\n BI.each(this._children, function (i, widget) {\r\n widget && widget._unMount && widget._unMount();\r\n });\r\n this._children = {};\r\n this.element.empty();\r\n },\r\n\r\n _destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.purgeListeners();\r\n },\r\n\r\n destroy: function () {\r\n this.__d();\r\n this.element.destroy();\r\n this.fireEvent(BI.Events.DESTROY);\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n BI.Widget.registerRenderEngine = function (engine) {\r\n BI.Widget._renderEngine = engine;\r\n };\r\n BI.Widget.registerRenderEngine({\r\n createElement: function (widget) {\r\n if (BI.isWidget(widget)) {\r\n var o = widget.options;\r\n if (o.element) {\r\n return BI.$(o.element);\r\n }\r\n return BI.$(document.createElement(o.tagName));\r\n }\r\n return BI.$(widget);\r\n },\r\n createFragment: function () {\r\n return document.createDocumentFragment();\r\n }\r\n });\r\n\r\n BI.mount = function (widget, container, predicate, hydrate) {\r\n if (hydrate === true) {\r\n // 将widget的element元素都挂载好,并建立相互关系\r\n widget.element.data(\"__widgets\", [widget]);\r\n var res = widget._mount(true, false, false, function (w) {\r\n BI.each(w._children, function (i, child) {\r\n var ws = child.element.data(\"__widgets\");\r\n if (!ws) {\r\n ws = [];\r\n }\r\n ws.push(child);\r\n child.element.data(\"__widgets\", ws);\r\n });\r\n predicate && predicate.apply(this, arguments);\r\n });\r\n // 将新的dom树属性(事件等)patch到已存在的dom上\r\n var c = BI.Widget._renderEngine.createElement;\r\n BI.DOM.patchProps(widget.element, c(c(container).children()[0]));\r\n\r\n var triggerLifeHook = function (w) {\r\n w.beforeMount && w.beforeMount();\r\n w.mounted && w.mounted();\r\n BI.each(w._children, function (i, child) {\r\n triggerLifeHook(child);\r\n });\r\n };\r\n // 最后触发组件树生命周期函数\r\n triggerLifeHook(widget);\r\n return res;\r\n }\r\n if (container) {\r\n BI.Widget._renderEngine.createElement(container).append(widget.element);\r\n }\r\n return widget._mount(true, false, false, predicate);\r\n };\r\n})();(function () {\r\n var kv = {};\r\n BI.shortcut = BI.component = function (xtype, cls) {\r\n if (kv[xtype] != null) {\r\n _global.console && console.error(\"shortcut:[\" + xtype + \"] has been registed\");\r\n }\r\n kv[xtype] = cls;\r\n };\r\n\r\n // 根据配置属性生成widget\r\n var createWidget = function (config) {\r\n var cls = kv[config.type];\r\n\r\n if(!cls){\r\n throw new Error(\"组件\"+config.type +\"未定义\");\r\n }\r\n\r\n var widget = new cls();\r\n\r\n widget._initProps(config);\r\n widget._init();\r\n widget._initRef();\r\n\r\n return widget;\r\n };\r\n\r\n BI.createWidget = function (item, options, context) {\r\n // 先把准备环境准备好\r\n BI.init();\r\n var el, w;\r\n item || (item = {});\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n if (BI.isEmpty(item) && BI.isEmpty(options)) {\r\n return BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n if (BI.isWidget(item)) {\r\n return item;\r\n }\r\n if (item.type || options.type) {\r\n el = BI.extend({}, options, item);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (item.el && (item.el.type || options.type)) {\r\n el = BI.extend({}, options, item.el);\r\n w = BI.Plugin.getWidget(el.type, el);\r\n w.listeners = (w.listeners || []).concat([{\r\n eventName: BI.Events.MOUNT,\r\n action: function () {\r\n BI.Plugin.getObject(el.type, this);\r\n }\r\n }]);\r\n return w.type === el.type ? createWidget(w) : BI.createWidget(BI.extend({}, item, {type: w.type}, options));\r\n }\r\n if (BI.isWidget(item.el)) {\r\n return item.el;\r\n }\r\n throw new Error(\"无法根据item创建组件\");\r\n };\r\n\r\n BI.createElement = function () {\r\n var widget = BI.createWidget.apply(this, arguments);\r\n return widget.element;\r\n };\r\n\r\n})();\r\n!(function () {\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * CryptoJS core components.\r\n */\r\n BI.CRYPT_TYPE = BI.CRYPT_TYPE || {};\r\n BI.CRYPT_TYPE.AES = \"aes\";\r\n\r\n var CryptoJS = CryptoJS || (function (Math, undefined) {\r\n /**\r\n * CryptoJS namespace.\r\n */\r\n var C = {};\r\n\r\n /**\r\n * Library namespace.\r\n */\r\n var C_lib = C.lib = {};\r\n\r\n /**\r\n * Base object for prototypal inheritance.\r\n */\r\n var Base = C_lib.Base = (function () {\r\n function F () {\r\n }\r\n\r\n return {\r\n /**\r\n * Creates a new object that inherits from this object.\r\n *\r\n * @param {Object} overrides Properties to copy into the new object.\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * field: 'value',\r\n *\r\n * method: function () {\r\n * }\r\n * });\r\n */\r\n extend: function (overrides) {\r\n // Spawn\r\n F.prototype = this;\r\n var subtype = new F();\r\n\r\n // Augment\r\n if (overrides) {\r\n subtype.mixIn(overrides);\r\n }\r\n\r\n // Create default initializer\r\n if (!subtype.hasOwnProperty('init')) {\r\n subtype.init = function () {\r\n subtype.$super.init.apply(this, arguments);\r\n };\r\n }\r\n\r\n // Initializer's prototype is the subtype object\r\n subtype.init.prototype = subtype;\r\n\r\n // Reference supertype\r\n subtype.$super = this;\r\n\r\n return subtype;\r\n },\r\n\r\n /**\r\n * Extends this object and runs the init method.\r\n * Arguments to create() will be passed to init().\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var instance = MyType.create();\r\n */\r\n create: function () {\r\n var instance = this.extend();\r\n instance.init.apply(instance, arguments);\r\n\r\n return instance;\r\n },\r\n\r\n /**\r\n * Initializes a newly created object.\r\n * Override this method to add some logic when your objects are created.\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * init: function () {\r\n * // ...\r\n * }\r\n * });\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n * Copies properties into this object.\r\n *\r\n * @param {Object} properties The properties to mix in.\r\n *\r\n * @example\r\n *\r\n * MyType.mixIn({\r\n * field: 'value'\r\n * });\r\n */\r\n mixIn: function (properties) {\r\n for (var propertyName in properties) {\r\n if (properties.hasOwnProperty(propertyName)) {\r\n this[propertyName] = properties[propertyName];\r\n }\r\n }\r\n\r\n // IE won't copy toString using the loop above\r\n if (properties.hasOwnProperty('toString')) {\r\n this.toString = properties.toString;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = instance.clone();\r\n */\r\n clone: function () {\r\n return this.init.prototype.extend(this);\r\n }\r\n };\r\n }());\r\n\r\n /**\r\n * An array of 32-bit words.\r\n *\r\n * @property {Array} words The array of 32-bit words.\r\n * @property {number} sigBytes The number of significant bytes in this word array.\r\n */\r\n var WordArray = C_lib.WordArray = Base.extend({\r\n /**\r\n * Initializes a newly created word array.\r\n *\r\n * @param {Array} words (Optional) An array of 32-bit words.\r\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.create();\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\r\n */\r\n init: function (words, sigBytes) {\r\n words = this.words = words || [];\r\n\r\n if (sigBytes != undefined) {\r\n this.sigBytes = sigBytes;\r\n } else {\r\n this.sigBytes = words.length * 4;\r\n }\r\n },\r\n\r\n /**\r\n * Converts this word array to a string.\r\n *\r\n * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\r\n *\r\n * @return {string} The stringified word array.\r\n *\r\n * @example\r\n *\r\n * var string = wordArray + '';\r\n * var string = wordArray.toString();\r\n * var string = wordArray.toString(CryptoJS.enc.Utf8);\r\n */\r\n toString: function (encoder) {\r\n return (encoder || Hex).stringify(this);\r\n },\r\n\r\n /**\r\n * Concatenates a word array to this word array.\r\n *\r\n * @param {WordArray} wordArray The word array to append.\r\n *\r\n * @return {WordArray} This word array.\r\n *\r\n * @example\r\n *\r\n * wordArray1.concat(wordArray2);\r\n */\r\n concat: function (wordArray) {\r\n // Shortcuts\r\n var thisWords = this.words;\r\n var thatWords = wordArray.words;\r\n var thisSigBytes = this.sigBytes;\r\n var thatSigBytes = wordArray.sigBytes;\r\n\r\n // Clamp excess bits\r\n this.clamp();\r\n\r\n // Concat\r\n if (thisSigBytes % 4) {\r\n // Copy one byte at a time\r\n for (var i = 0; i < thatSigBytes; i++) {\r\n var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\r\n }\r\n } else if (thatWords.length > 0xffff) {\r\n // Copy one word at a time\r\n for (var i = 0; i < thatSigBytes; i += 4) {\r\n thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\r\n }\r\n } else {\r\n // Copy all words at once\r\n thisWords.push.apply(thisWords, thatWords);\r\n }\r\n this.sigBytes += thatSigBytes;\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes insignificant bits.\r\n *\r\n * @example\r\n *\r\n * wordArray.clamp();\r\n */\r\n clamp: function () {\r\n // Shortcuts\r\n var words = this.words;\r\n var sigBytes = this.sigBytes;\r\n\r\n // Clamp\r\n words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\r\n words.length = Math.ceil(sigBytes / 4);\r\n },\r\n\r\n /**\r\n * Creates a copy of this word array.\r\n *\r\n * @return {WordArray} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = wordArray.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone.words = this.words.slice(0);\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Creates a word array filled with random bytes.\r\n *\r\n * @param {number} nBytes The number of random bytes to generate.\r\n *\r\n * @return {WordArray} The random word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.random(16);\r\n */\r\n random: function (nBytes) {\r\n var words = [];\r\n for (var i = 0; i < nBytes; i += 4) {\r\n words.push((Math.random() * 0x100000000) | 0);\r\n }\r\n\r\n return new WordArray.init(words, nBytes);\r\n }\r\n });\r\n\r\n /**\r\n * Encoder namespace.\r\n */\r\n var C_enc = C.enc = {};\r\n\r\n /**\r\n * Hex encoding strategy.\r\n */\r\n var Hex = C_enc.Hex = {\r\n /**\r\n * Converts a word array to a hex string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The hex string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var hexChars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n hexChars.push((bite >>> 4).toString(16));\r\n hexChars.push((bite & 0x0f).toString(16));\r\n }\r\n\r\n return hexChars.join('');\r\n },\r\n\r\n /**\r\n * Converts a hex string to a word array.\r\n *\r\n * @param {string} hexStr The hex string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Hex.parse(hexString);\r\n */\r\n parse: function (hexStr) {\r\n // Shortcut\r\n var hexStrLength = hexStr.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < hexStrLength; i += 2) {\r\n words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\r\n }\r\n\r\n return new WordArray.init(words, hexStrLength / 2);\r\n }\r\n };\r\n\r\n /**\r\n * Latin1 encoding strategy.\r\n */\r\n var Latin1 = C_enc.Latin1 = {\r\n /**\r\n * Converts a word array to a Latin1 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Latin1 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var latin1Chars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n latin1Chars.push(String.fromCharCode(bite));\r\n }\r\n\r\n return latin1Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Latin1 string to a word array.\r\n *\r\n * @param {string} latin1Str The Latin1 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\r\n */\r\n parse: function (latin1Str) {\r\n // Shortcut\r\n var latin1StrLength = latin1Str.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < latin1StrLength; i++) {\r\n words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\r\n }\r\n\r\n return new WordArray.init(words, latin1StrLength);\r\n }\r\n };\r\n\r\n /**\r\n * UTF-8 encoding strategy.\r\n */\r\n var Utf8 = C_enc.Utf8 = {\r\n /**\r\n * Converts a word array to a UTF-8 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The UTF-8 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n try {\r\n return decodeURIComponent(escape(Latin1.stringify(wordArray)));\r\n } catch (e) {\r\n throw new Error('Malformed UTF-8 data');\r\n }\r\n },\r\n\r\n /**\r\n * Converts a UTF-8 string to a word array.\r\n *\r\n * @param {string} utf8Str The UTF-8 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\r\n */\r\n parse: function (utf8Str) {\r\n return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\r\n }\r\n };\r\n\r\n /**\r\n * Abstract buffered block algorithm template.\r\n *\r\n * The property blockSize must be implemented in a concrete subtype.\r\n *\r\n * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\r\n */\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\r\n /**\r\n * Resets this block algorithm's data buffer to its initial state.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm.reset();\r\n */\r\n reset: function () {\r\n // Initial values\r\n this._data = new WordArray.init();\r\n this._nDataBytes = 0;\r\n },\r\n\r\n /**\r\n * Adds new data to this block algorithm's buffer.\r\n *\r\n * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm._append('data');\r\n * bufferedBlockAlgorithm._append(wordArray);\r\n */\r\n _append: function (data) {\r\n // Convert string to WordArray, else assume WordArray already\r\n if (typeof data == 'string') {\r\n data = Utf8.parse(data);\r\n }\r\n\r\n // Append\r\n this._data.concat(data);\r\n this._nDataBytes += data.sigBytes;\r\n },\r\n\r\n /**\r\n * Processes available data blocks.\r\n *\r\n * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\r\n *\r\n * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\r\n *\r\n * @return {WordArray} The processed data.\r\n *\r\n * @example\r\n *\r\n * var processedData = bufferedBlockAlgorithm._process();\r\n * var processedData = bufferedBlockAlgorithm._process(!!'flush');\r\n */\r\n _process: function (doFlush) {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n var dataSigBytes = data.sigBytes;\r\n var blockSize = this.blockSize;\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count blocks ready\r\n var nBlocksReady = dataSigBytes / blockSizeBytes;\r\n if (doFlush) {\r\n // Round up to include partial blocks\r\n nBlocksReady = Math.ceil(nBlocksReady);\r\n } else {\r\n // Round down to include only full blocks,\r\n // less the number of blocks that must remain in the buffer\r\n nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\r\n }\r\n\r\n // Count words ready\r\n var nWordsReady = nBlocksReady * blockSize;\r\n\r\n // Count bytes ready\r\n var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\r\n\r\n // Process blocks\r\n if (nWordsReady) {\r\n for (var offset = 0; offset < nWordsReady; offset += blockSize) {\r\n // Perform concrete-algorithm logic\r\n this._doProcessBlock(dataWords, offset);\r\n }\r\n\r\n // Remove processed words\r\n var processedWords = dataWords.splice(0, nWordsReady);\r\n data.sigBytes -= nBytesReady;\r\n }\r\n\r\n // Return processed words\r\n return new WordArray.init(processedWords, nBytesReady);\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = bufferedBlockAlgorithm.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone._data = this._data.clone();\r\n\r\n return clone;\r\n },\r\n\r\n _minBufferSize: 0\r\n });\r\n\r\n /**\r\n * Abstract hasher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\r\n */\r\n var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Initializes a newly created hasher.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\r\n *\r\n * @example\r\n *\r\n * var hasher = CryptoJS.algo.SHA256.create();\r\n */\r\n init: function (cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this hasher to its initial state.\r\n *\r\n * @example\r\n *\r\n * hasher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-hasher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Updates this hasher with a message.\r\n *\r\n * @param {WordArray|string} messageUpdate The message to append.\r\n *\r\n * @return {Hasher} This hasher.\r\n *\r\n * @example\r\n *\r\n * hasher.update('message');\r\n * hasher.update(wordArray);\r\n */\r\n update: function (messageUpdate) {\r\n // Append\r\n this._append(messageUpdate);\r\n\r\n // Update the hash\r\n this._process();\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Finalizes the hash computation.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @example\r\n *\r\n * var hash = hasher.finalize();\r\n * var hash = hasher.finalize('message');\r\n * var hash = hasher.finalize(wordArray);\r\n */\r\n finalize: function (messageUpdate) {\r\n // Final message update\r\n if (messageUpdate) {\r\n this._append(messageUpdate);\r\n }\r\n\r\n // Perform concrete-hasher logic\r\n var hash = this._doFinalize();\r\n\r\n return hash;\r\n },\r\n\r\n blockSize: 512 / 32,\r\n\r\n /**\r\n * Creates a shortcut function to a hasher's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to create a helper for.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHelper: function (hasher) {\r\n return function (message, cfg) {\r\n return new hasher.init(cfg).finalize(message);\r\n };\r\n },\r\n\r\n /**\r\n * Creates a shortcut function to the HMAC's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to use in this HMAC helper.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHmacHelper: function (hasher) {\r\n return function (message, key) {\r\n return new C_algo.HMAC.init(hasher, key).finalize(message);\r\n };\r\n }\r\n });\r\n\r\n /**\r\n * Algorithm namespace.\r\n */\r\n var C_algo = C.algo = {};\r\n\r\n return C;\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var C_enc = C.enc;\r\n\r\n /**\r\n * Base64 encoding strategy.\r\n */\r\n var Base64 = C_enc.Base64 = {\r\n /**\r\n * Converts a word array to a Base64 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Base64 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n var map = this._map;\r\n\r\n // Clamp excess bits\r\n wordArray.clamp();\r\n\r\n // Convert\r\n var base64Chars = [];\r\n for (var i = 0; i < sigBytes; i += 3) {\r\n var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\r\n var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\r\n\r\n var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\r\n\r\n for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\r\n base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\r\n }\r\n }\r\n\r\n // Add padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n while (base64Chars.length % 4) {\r\n base64Chars.push(paddingChar);\r\n }\r\n }\r\n\r\n return base64Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Base64 string to a word array.\r\n *\r\n * @param {string} base64Str The Base64 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\r\n */\r\n parse: function (base64Str) {\r\n // Shortcuts\r\n var base64StrLength = base64Str.length;\r\n var map = this._map;\r\n\r\n // Ignore padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n var paddingIndex = base64Str.indexOf(paddingChar);\r\n if (paddingIndex != -1) {\r\n base64StrLength = paddingIndex;\r\n }\r\n }\r\n\r\n // Convert\r\n var words = [];\r\n var nBytes = 0;\r\n for (var i = 0; i < base64StrLength; i++) {\r\n if (i % 4) {\r\n var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\r\n var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\r\n words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\r\n nBytes++;\r\n }\r\n }\r\n\r\n return WordArray.create(words, nBytes);\r\n },\r\n\r\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\r\n };\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function (Math) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var Hasher = C_lib.Hasher;\r\n var C_algo = C.algo;\r\n\r\n // Constants table\r\n var T = [];\r\n\r\n // Compute constants\r\n (function () {\r\n for (var i = 0; i < 64; i++) {\r\n T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\r\n }\r\n }());\r\n\r\n /**\r\n * MD5 hash algorithm.\r\n */\r\n var MD5 = C_algo.MD5 = Hasher.extend({\r\n _doReset: function () {\r\n this._hash = new WordArray.init([\r\n 0x67452301, 0xefcdab89,\r\n 0x98badcfe, 0x10325476\r\n ]);\r\n },\r\n\r\n _doProcessBlock: function (M, offset) {\r\n // Swap endian\r\n for (var i = 0; i < 16; i++) {\r\n // Shortcuts\r\n var offset_i = offset + i;\r\n var M_offset_i = M[offset_i];\r\n\r\n M[offset_i] = (\r\n (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\r\n (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\r\n );\r\n }\r\n\r\n // Shortcuts\r\n var H = this._hash.words;\r\n\r\n var M_offset_0 = M[offset + 0];\r\n var M_offset_1 = M[offset + 1];\r\n var M_offset_2 = M[offset + 2];\r\n var M_offset_3 = M[offset + 3];\r\n var M_offset_4 = M[offset + 4];\r\n var M_offset_5 = M[offset + 5];\r\n var M_offset_6 = M[offset + 6];\r\n var M_offset_7 = M[offset + 7];\r\n var M_offset_8 = M[offset + 8];\r\n var M_offset_9 = M[offset + 9];\r\n var M_offset_10 = M[offset + 10];\r\n var M_offset_11 = M[offset + 11];\r\n var M_offset_12 = M[offset + 12];\r\n var M_offset_13 = M[offset + 13];\r\n var M_offset_14 = M[offset + 14];\r\n var M_offset_15 = M[offset + 15];\r\n\r\n // Working varialbes\r\n var a = H[0];\r\n var b = H[1];\r\n var c = H[2];\r\n var d = H[3];\r\n\r\n // Computation\r\n a = FF(a, b, c, d, M_offset_0, 7, T[0]);\r\n d = FF(d, a, b, c, M_offset_1, 12, T[1]);\r\n c = FF(c, d, a, b, M_offset_2, 17, T[2]);\r\n b = FF(b, c, d, a, M_offset_3, 22, T[3]);\r\n a = FF(a, b, c, d, M_offset_4, 7, T[4]);\r\n d = FF(d, a, b, c, M_offset_5, 12, T[5]);\r\n c = FF(c, d, a, b, M_offset_6, 17, T[6]);\r\n b = FF(b, c, d, a, M_offset_7, 22, T[7]);\r\n a = FF(a, b, c, d, M_offset_8, 7, T[8]);\r\n d = FF(d, a, b, c, M_offset_9, 12, T[9]);\r\n c = FF(c, d, a, b, M_offset_10, 17, T[10]);\r\n b = FF(b, c, d, a, M_offset_11, 22, T[11]);\r\n a = FF(a, b, c, d, M_offset_12, 7, T[12]);\r\n d = FF(d, a, b, c, M_offset_13, 12, T[13]);\r\n c = FF(c, d, a, b, M_offset_14, 17, T[14]);\r\n b = FF(b, c, d, a, M_offset_15, 22, T[15]);\r\n\r\n a = GG(a, b, c, d, M_offset_1, 5, T[16]);\r\n d = GG(d, a, b, c, M_offset_6, 9, T[17]);\r\n c = GG(c, d, a, b, M_offset_11, 14, T[18]);\r\n b = GG(b, c, d, a, M_offset_0, 20, T[19]);\r\n a = GG(a, b, c, d, M_offset_5, 5, T[20]);\r\n d = GG(d, a, b, c, M_offset_10, 9, T[21]);\r\n c = GG(c, d, a, b, M_offset_15, 14, T[22]);\r\n b = GG(b, c, d, a, M_offset_4, 20, T[23]);\r\n a = GG(a, b, c, d, M_offset_9, 5, T[24]);\r\n d = GG(d, a, b, c, M_offset_14, 9, T[25]);\r\n c = GG(c, d, a, b, M_offset_3, 14, T[26]);\r\n b = GG(b, c, d, a, M_offset_8, 20, T[27]);\r\n a = GG(a, b, c, d, M_offset_13, 5, T[28]);\r\n d = GG(d, a, b, c, M_offset_2, 9, T[29]);\r\n c = GG(c, d, a, b, M_offset_7, 14, T[30]);\r\n b = GG(b, c, d, a, M_offset_12, 20, T[31]);\r\n\r\n a = HH(a, b, c, d, M_offset_5, 4, T[32]);\r\n d = HH(d, a, b, c, M_offset_8, 11, T[33]);\r\n c = HH(c, d, a, b, M_offset_11, 16, T[34]);\r\n b = HH(b, c, d, a, M_offset_14, 23, T[35]);\r\n a = HH(a, b, c, d, M_offset_1, 4, T[36]);\r\n d = HH(d, a, b, c, M_offset_4, 11, T[37]);\r\n c = HH(c, d, a, b, M_offset_7, 16, T[38]);\r\n b = HH(b, c, d, a, M_offset_10, 23, T[39]);\r\n a = HH(a, b, c, d, M_offset_13, 4, T[40]);\r\n d = HH(d, a, b, c, M_offset_0, 11, T[41]);\r\n c = HH(c, d, a, b, M_offset_3, 16, T[42]);\r\n b = HH(b, c, d, a, M_offset_6, 23, T[43]);\r\n a = HH(a, b, c, d, M_offset_9, 4, T[44]);\r\n d = HH(d, a, b, c, M_offset_12, 11, T[45]);\r\n c = HH(c, d, a, b, M_offset_15, 16, T[46]);\r\n b = HH(b, c, d, a, M_offset_2, 23, T[47]);\r\n\r\n a = II(a, b, c, d, M_offset_0, 6, T[48]);\r\n d = II(d, a, b, c, M_offset_7, 10, T[49]);\r\n c = II(c, d, a, b, M_offset_14, 15, T[50]);\r\n b = II(b, c, d, a, M_offset_5, 21, T[51]);\r\n a = II(a, b, c, d, M_offset_12, 6, T[52]);\r\n d = II(d, a, b, c, M_offset_3, 10, T[53]);\r\n c = II(c, d, a, b, M_offset_10, 15, T[54]);\r\n b = II(b, c, d, a, M_offset_1, 21, T[55]);\r\n a = II(a, b, c, d, M_offset_8, 6, T[56]);\r\n d = II(d, a, b, c, M_offset_15, 10, T[57]);\r\n c = II(c, d, a, b, M_offset_6, 15, T[58]);\r\n b = II(b, c, d, a, M_offset_13, 21, T[59]);\r\n a = II(a, b, c, d, M_offset_4, 6, T[60]);\r\n d = II(d, a, b, c, M_offset_11, 10, T[61]);\r\n c = II(c, d, a, b, M_offset_2, 15, T[62]);\r\n b = II(b, c, d, a, M_offset_9, 21, T[63]);\r\n\r\n // Intermediate hash value\r\n H[0] = (H[0] + a) | 0;\r\n H[1] = (H[1] + b) | 0;\r\n H[2] = (H[2] + c) | 0;\r\n H[3] = (H[3] + d) | 0;\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n\r\n var nBitsTotal = this._nDataBytes * 8;\r\n var nBitsLeft = data.sigBytes * 8;\r\n\r\n // Add padding\r\n dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\r\n\r\n var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\r\n var nBitsTotalL = nBitsTotal;\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\r\n (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\r\n );\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\r\n (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\r\n );\r\n\r\n data.sigBytes = (dataWords.length + 1) * 4;\r\n\r\n // Hash final blocks\r\n this._process();\r\n\r\n // Shortcuts\r\n var hash = this._hash;\r\n var H = hash.words;\r\n\r\n // Swap endian\r\n for (var i = 0; i < 4; i++) {\r\n // Shortcut\r\n var H_i = H[i];\r\n\r\n H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\r\n (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\r\n }\r\n\r\n // Return final computed hash\r\n return hash;\r\n },\r\n\r\n clone: function () {\r\n var clone = Hasher.clone.call(this);\r\n clone._hash = this._hash.clone();\r\n\r\n return clone;\r\n }\r\n });\r\n\r\n function FF (a, b, c, d, x, s, t) {\r\n var n = a + ((b & c) | (~b & d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function GG (a, b, c, d, x, s, t) {\r\n var n = a + ((b & d) | (c & ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function HH (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function II (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n /**\r\n * Shortcut function to the hasher's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hash = CryptoJS.MD5('message');\r\n * var hash = CryptoJS.MD5(wordArray);\r\n */\r\n C.MD5 = Hasher._createHelper(MD5);\r\n\r\n /**\r\n * Shortcut function to the HMAC's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n * @param {WordArray|string} key The secret key.\r\n *\r\n * @return {WordArray} The HMAC.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hmac = CryptoJS.HmacMD5(message, key);\r\n */\r\n C.HmacMD5 = Hasher._createHmacHelper(MD5);\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var C_algo = C.algo;\r\n var MD5 = C_algo.MD5;\r\n\r\n /**\r\n * This key derivation function is meant to conform with EVP_BytesToKey.\r\n * www.openssl.org/docs/crypto/EVP_BytesToKey.html\r\n */\r\n var EvpKDF = C_algo.EvpKDF = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\r\n * @property {Hasher} hasher The hash algorithm to use. Default: MD5\r\n * @property {number} iterations The number of iterations to perform. Default: 1\r\n */\r\n cfg: Base.extend({\r\n keySize: 128 / 32,\r\n hasher: MD5,\r\n iterations: 1\r\n }),\r\n\r\n /**\r\n * Initializes a newly created key derivation function.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for the derivation.\r\n *\r\n * @example\r\n *\r\n * var kdf = CryptoJS.algo.EvpKDF.create();\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\r\n */\r\n init: function (cfg) {\r\n this.cfg = this.cfg.extend(cfg);\r\n },\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @example\r\n *\r\n * var key = kdf.compute(password, salt);\r\n */\r\n compute: function (password, salt) {\r\n // Shortcut\r\n var cfg = this.cfg;\r\n\r\n // Init hasher\r\n var hasher = cfg.hasher.create();\r\n\r\n // Initial values\r\n var derivedKey = WordArray.create();\r\n\r\n // Shortcuts\r\n var derivedKeyWords = derivedKey.words;\r\n var keySize = cfg.keySize;\r\n var iterations = cfg.iterations;\r\n\r\n // Generate key\r\n while (derivedKeyWords.length < keySize) {\r\n if (block) {\r\n hasher.update(block);\r\n }\r\n var block = hasher.update(password).finalize(salt);\r\n hasher.reset();\r\n\r\n // Iterations\r\n for (var i = 1; i < iterations; i++) {\r\n block = hasher.finalize(block);\r\n hasher.reset();\r\n }\r\n\r\n derivedKey.concat(block);\r\n }\r\n derivedKey.sigBytes = keySize * 4;\r\n\r\n return derivedKey;\r\n }\r\n });\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n * @param {Object} cfg (Optional) The configuration options to use for this computation.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var key = CryptoJS.EvpKDF(password, salt);\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\r\n */\r\n C.EvpKDF = function (password, salt, cfg) {\r\n return EvpKDF.create(cfg).compute(password, salt);\r\n };\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Cipher core components.\r\n */\r\n CryptoJS.lib.Cipher || (function (undefined) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\r\n var C_enc = C.enc;\r\n var Utf8 = C_enc.Utf8;\r\n var Base64 = C_enc.Base64;\r\n var C_algo = C.algo;\r\n var EvpKDF = C_algo.EvpKDF;\r\n\r\n /**\r\n * Abstract base cipher template.\r\n *\r\n * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\r\n * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\r\n * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\r\n * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\r\n */\r\n var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {WordArray} iv The IV to use for this operation.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Creates this cipher in encryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createEncryptor: function (key, cfg) {\r\n return this.create(this._ENC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Creates this cipher in decryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createDecryptor: function (key, cfg) {\r\n return this.create(this._DEC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Initializes a newly created cipher.\r\n *\r\n * @param {number} xformMode Either the encryption or decryption transormation mode constant.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\r\n */\r\n init: function (xformMode, key, cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Store transform mode and key\r\n this._xformMode = xformMode;\r\n this._key = key;\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this cipher to its initial state.\r\n *\r\n * @example\r\n *\r\n * cipher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-cipher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Adds data to be encrypted or decrypted.\r\n *\r\n * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.process('data');\r\n * var encrypted = cipher.process(wordArray);\r\n */\r\n process: function (dataUpdate) {\r\n // Append\r\n this._append(dataUpdate);\r\n\r\n // Process available blocks\r\n return this._process();\r\n },\r\n\r\n /**\r\n * Finalizes the encryption or decryption process.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after final processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.finalize();\r\n * var encrypted = cipher.finalize('data');\r\n * var encrypted = cipher.finalize(wordArray);\r\n */\r\n finalize: function (dataUpdate) {\r\n // Final data update\r\n if (dataUpdate) {\r\n this._append(dataUpdate);\r\n }\r\n\r\n // Perform concrete-cipher logic\r\n var finalProcessedData = this._doFinalize();\r\n\r\n return finalProcessedData;\r\n },\r\n\r\n keySize: 128 / 32,\r\n\r\n ivSize: 128 / 32,\r\n\r\n _ENC_XFORM_MODE: 1,\r\n\r\n _DEC_XFORM_MODE: 2,\r\n\r\n /**\r\n * Creates shortcut functions to a cipher's object interface.\r\n *\r\n * @param {Cipher} cipher The cipher to create a helper for.\r\n *\r\n * @return {Object} An object with encrypt and decrypt shortcut functions.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\r\n */\r\n _createHelper: (function () {\r\n function selectCipherStrategy (key) {\r\n if (typeof key == 'string') {\r\n return PasswordBasedCipher;\r\n } else {\r\n return SerializableCipher;\r\n }\r\n }\r\n\r\n return function (cipher) {\r\n return {\r\n encrypt: function (message, key, cfg) {\r\n return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\r\n },\r\n\r\n decrypt: function (ciphertext, key, cfg) {\r\n return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\r\n }\r\n };\r\n };\r\n }())\r\n });\r\n\r\n /**\r\n * Abstract base stream cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\r\n */\r\n var StreamCipher = C_lib.StreamCipher = Cipher.extend({\r\n _doFinalize: function () {\r\n // Process partial blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 1\r\n });\r\n\r\n /**\r\n * Mode namespace.\r\n */\r\n var C_mode = C.mode = {};\r\n\r\n /**\r\n * Abstract base block cipher mode template.\r\n */\r\n var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\r\n /**\r\n * Creates this mode for encryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\r\n */\r\n createEncryptor: function (cipher, iv) {\r\n return this.Encryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Creates this mode for decryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\r\n */\r\n createDecryptor: function (cipher, iv) {\r\n return this.Decryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Initializes a newly created mode.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\r\n */\r\n init: function (cipher, iv) {\r\n this._cipher = cipher;\r\n this._iv = iv;\r\n }\r\n });\r\n\r\n /**\r\n * Cipher Block Chaining mode.\r\n */\r\n var CBC = C_mode.CBC = (function () {\r\n /**\r\n * Abstract base CBC mode.\r\n */\r\n var CBC = BlockCipherMode.extend();\r\n\r\n /**\r\n * CBC encryptor.\r\n */\r\n CBC.Encryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // XOR and encrypt\r\n xorBlock.call(this, words, offset, blockSize);\r\n cipher.encryptBlock(words, offset);\r\n\r\n // Remember this block to use with next block\r\n this._prevBlock = words.slice(offset, offset + blockSize);\r\n }\r\n });\r\n\r\n /**\r\n * CBC decryptor.\r\n */\r\n CBC.Decryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // Remember this block to use with next block\r\n var thisBlock = words.slice(offset, offset + blockSize);\r\n\r\n // Decrypt and XOR\r\n cipher.decryptBlock(words, offset);\r\n xorBlock.call(this, words, offset, blockSize);\r\n\r\n // This block becomes the previous block\r\n this._prevBlock = thisBlock;\r\n }\r\n });\r\n\r\n function xorBlock (words, offset, blockSize) {\r\n // Shortcut\r\n var iv = this._iv;\r\n\r\n // Choose mixing block\r\n if (iv) {\r\n var block = iv;\r\n\r\n // Remove IV for subsequent blocks\r\n this._iv = undefined;\r\n } else {\r\n var block = this._prevBlock;\r\n }\r\n\r\n // XOR blocks\r\n for (var i = 0; i < blockSize; i++) {\r\n words[offset + i] ^= block[i];\r\n }\r\n }\r\n\r\n return CBC;\r\n }());\r\n\r\n /**\r\n * Padding namespace.\r\n */\r\n var C_pad = C.pad = {};\r\n\r\n /**\r\n * PKCS #5/7 padding strategy.\r\n */\r\n var Pkcs7 = C_pad.Pkcs7 = {\r\n /**\r\n * Pads data using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to pad.\r\n * @param {number} blockSize The multiple that the data should be padded to.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\r\n */\r\n pad: function (data, blockSize) {\r\n // Shortcut\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count padding bytes\r\n var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\r\n\r\n // Create padding word\r\n var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\r\n\r\n // Create padding\r\n var paddingWords = [];\r\n for (var i = 0; i < nPaddingBytes; i += 4) {\r\n paddingWords.push(paddingWord);\r\n }\r\n var padding = WordArray.create(paddingWords, nPaddingBytes);\r\n\r\n // Add padding\r\n data.concat(padding);\r\n },\r\n\r\n /**\r\n * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to unpad.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.unpad(wordArray);\r\n */\r\n unpad: function (data) {\r\n // Get number of padding bytes from last byte\r\n var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\r\n\r\n // Remove padding\r\n data.sigBytes -= nPaddingBytes;\r\n }\r\n };\r\n\r\n /**\r\n * Abstract base block cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\r\n */\r\n var BlockCipher = C_lib.BlockCipher = Cipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Mode} mode The block mode to use. Default: CBC\r\n * @property {Padding} padding The padding strategy to use. Default: Pkcs7\r\n */\r\n cfg: Cipher.cfg.extend({\r\n mode: CBC,\r\n padding: Pkcs7\r\n }),\r\n\r\n reset: function () {\r\n // Reset cipher\r\n Cipher.reset.call(this);\r\n\r\n // Shortcuts\r\n var cfg = this.cfg;\r\n var iv = cfg.iv;\r\n var mode = cfg.mode;\r\n\r\n // Reset block mode\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n var modeCreator = mode.createEncryptor;\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n var modeCreator = mode.createDecryptor;\r\n\r\n // Keep at least one block in the buffer for unpadding\r\n this._minBufferSize = 1;\r\n }\r\n this._mode = modeCreator.call(mode, this, iv && iv.words);\r\n },\r\n\r\n _doProcessBlock: function (words, offset) {\r\n this._mode.processBlock(words, offset);\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcut\r\n var padding = this.cfg.padding;\r\n\r\n // Finalize\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n // Pad data\r\n padding.pad(this._data, this.blockSize);\r\n\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n // Unpad data\r\n padding.unpad(finalProcessedBlocks);\r\n }\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 128 / 32\r\n });\r\n\r\n /**\r\n * A collection of cipher parameters.\r\n *\r\n * @property {WordArray} ciphertext The raw ciphertext.\r\n * @property {WordArray} key The key to this ciphertext.\r\n * @property {WordArray} iv The IV used in the ciphering operation.\r\n * @property {WordArray} salt The salt used with a key derivation function.\r\n * @property {Cipher} algorithm The cipher algorithm.\r\n * @property {Mode} mode The block mode used in the ciphering operation.\r\n * @property {Padding} padding The padding scheme used in the ciphering operation.\r\n * @property {number} blockSize The block size of the cipher.\r\n * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\r\n */\r\n var CipherParams = C_lib.CipherParams = Base.extend({\r\n /**\r\n * Initializes a newly created cipher params object.\r\n *\r\n * @param {Object} cipherParams An object with any of the possible cipher parameters.\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.lib.CipherParams.create({\r\n * ciphertext: ciphertextWordArray,\r\n * key: keyWordArray,\r\n * iv: ivWordArray,\r\n * salt: saltWordArray,\r\n * algorithm: CryptoJS.algo.AES,\r\n * mode: CryptoJS.mode.CBC,\r\n * padding: CryptoJS.pad.PKCS7,\r\n * blockSize: 4,\r\n * formatter: CryptoJS.format.OpenSSL\r\n * });\r\n */\r\n init: function (cipherParams) {\r\n this.mixIn(cipherParams);\r\n },\r\n\r\n /**\r\n * Converts this cipher params object to a string.\r\n *\r\n * @param {Format} formatter (Optional) The formatting strategy to use.\r\n *\r\n * @return {string} The stringified cipher params.\r\n *\r\n * @throws Error If neither the formatter nor the default formatter is set.\r\n *\r\n * @example\r\n *\r\n * var string = cipherParams + '';\r\n * var string = cipherParams.toString();\r\n * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\r\n */\r\n toString: function (formatter) {\r\n return (formatter || this.formatter).stringify(this);\r\n }\r\n });\r\n\r\n /**\r\n * Format namespace.\r\n */\r\n var C_format = C.format = {};\r\n\r\n /**\r\n * OpenSSL formatting strategy.\r\n */\r\n var OpenSSLFormatter = C_format.OpenSSL = {\r\n /**\r\n * Converts a cipher params object to an OpenSSL-compatible string.\r\n *\r\n * @param {CipherParams} cipherParams The cipher params object.\r\n *\r\n * @return {string} The OpenSSL-compatible string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\r\n */\r\n stringify: function (cipherParams) {\r\n // Shortcuts\r\n var ciphertext = cipherParams.ciphertext;\r\n var salt = cipherParams.salt;\r\n\r\n // Format\r\n if (salt) {\r\n var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\r\n } else {\r\n var wordArray = ciphertext;\r\n }\r\n\r\n return wordArray.toString(Base64);\r\n },\r\n\r\n /**\r\n * Converts an OpenSSL-compatible string to a cipher params object.\r\n *\r\n * @param {string} openSSLStr The OpenSSL-compatible string.\r\n *\r\n * @return {CipherParams} The cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\r\n */\r\n parse: function (openSSLStr) {\r\n // Parse base64\r\n var ciphertext = Base64.parse(openSSLStr);\r\n\r\n // Shortcut\r\n var ciphertextWords = ciphertext.words;\r\n\r\n // Test for salt\r\n if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\r\n // Extract salt\r\n var salt = WordArray.create(ciphertextWords.slice(2, 4));\r\n\r\n // Remove salt from ciphertext\r\n ciphertextWords.splice(0, 4);\r\n ciphertext.sigBytes -= 16;\r\n }\r\n\r\n return CipherParams.create({ciphertext: ciphertext, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A cipher wrapper that returns ciphertext as a serializable cipher params object.\r\n */\r\n var SerializableCipher = C_lib.SerializableCipher = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\r\n */\r\n cfg: Base.extend({\r\n format: OpenSSLFormatter\r\n }),\r\n\r\n /**\r\n * Encrypts a message.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Encrypt\r\n var encryptor = cipher.createEncryptor(key, cfg);\r\n var ciphertext = encryptor.finalize(message);\r\n\r\n // Shortcut\r\n var cipherCfg = encryptor.cfg;\r\n\r\n // Create and return serializable cipher params\r\n return CipherParams.create({\r\n ciphertext: ciphertext,\r\n key: key,\r\n iv: cipherCfg.iv,\r\n algorithm: cipher,\r\n mode: cipherCfg.mode,\r\n padding: cipherCfg.padding,\r\n blockSize: cipher.blockSize,\r\n formatter: cfg.format\r\n });\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Decrypt\r\n var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\r\n\r\n return plaintext;\r\n },\r\n\r\n /**\r\n * Converts serialized ciphertext to CipherParams,\r\n * else assumed CipherParams already and returns ciphertext unchanged.\r\n *\r\n * @param {CipherParams|string} ciphertext The ciphertext.\r\n * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\r\n *\r\n * @return {CipherParams} The unserialized ciphertext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\r\n */\r\n _parse: function (ciphertext, format) {\r\n if (typeof ciphertext == 'string') {\r\n return format.parse(ciphertext, this);\r\n } else {\r\n return ciphertext;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Key derivation function namespace.\r\n */\r\n var C_kdf = C.kdf = {};\r\n\r\n /**\r\n * OpenSSL key derivation function.\r\n */\r\n var OpenSSLKdf = C_kdf.OpenSSL = {\r\n /**\r\n * Derives a key and IV from a password.\r\n *\r\n * @param {string} password The password to derive from.\r\n * @param {number} keySize The size in words of the key to generate.\r\n * @param {number} ivSize The size in words of the IV to generate.\r\n * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\r\n *\r\n * @return {CipherParams} A cipher params object with the key, IV, and salt.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\r\n */\r\n execute: function (password, keySize, ivSize, salt) {\r\n // Generate random salt\r\n if (!salt) {\r\n salt = WordArray.random(64 / 8);\r\n }\r\n\r\n // Derive key and IV\r\n var key = EvpKDF.create({keySize: keySize + ivSize}).compute(password, salt);\r\n\r\n // Separate key and IV\r\n var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\r\n key.sigBytes = keySize * 4;\r\n\r\n // Return params\r\n return CipherParams.create({key: key, iv: iv, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A serializable cipher wrapper that derives the key from a password,\r\n * and returns ciphertext as a serializable cipher params object.\r\n */\r\n var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\r\n */\r\n cfg: SerializableCipher.cfg.extend({\r\n kdf: OpenSSLKdf\r\n }),\r\n\r\n /**\r\n * Encrypts a message using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Encrypt\r\n var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\r\n\r\n // Mix in derived params\r\n ciphertext.mixIn(derivedParams);\r\n\r\n return ciphertext;\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Decrypt\r\n var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\r\n\r\n return plaintext;\r\n }\r\n });\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Electronic Codebook block mode.\r\n */\r\n CryptoJS.mode.ECB = (function () {\r\n var ECB = CryptoJS.lib.BlockCipherMode.extend();\r\n\r\n ECB.Encryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.encryptBlock(words, offset);\r\n }\r\n });\r\n\r\n ECB.Decryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.decryptBlock(words, offset);\r\n }\r\n });\r\n\r\n return ECB;\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var BlockCipher = C_lib.BlockCipher;\r\n var C_algo = C.algo;\r\n\r\n // Lookup tables\r\n var SBOX = [];\r\n var INV_SBOX = [];\r\n var SUB_MIX_0 = [];\r\n var SUB_MIX_1 = [];\r\n var SUB_MIX_2 = [];\r\n var SUB_MIX_3 = [];\r\n var INV_SUB_MIX_0 = [];\r\n var INV_SUB_MIX_1 = [];\r\n var INV_SUB_MIX_2 = [];\r\n var INV_SUB_MIX_3 = [];\r\n\r\n // Compute lookup tables\r\n (function () {\r\n // Compute double table\r\n var d = [];\r\n for (var i = 0; i < 256; i++) {\r\n if (i < 128) {\r\n d[i] = i << 1;\r\n } else {\r\n d[i] = (i << 1) ^ 0x11b;\r\n }\r\n }\r\n\r\n // Walk GF(2^8)\r\n var x = 0;\r\n var xi = 0;\r\n for (var i = 0; i < 256; i++) {\r\n // Compute sbox\r\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\r\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\r\n SBOX[x] = sx;\r\n INV_SBOX[sx] = x;\r\n\r\n // Compute multiplication\r\n var x2 = d[x];\r\n var x4 = d[x2];\r\n var x8 = d[x4];\r\n\r\n // Compute sub bytes, mix columns tables\r\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\r\n SUB_MIX_0[x] = (t << 24) | (t >>> 8);\r\n SUB_MIX_1[x] = (t << 16) | (t >>> 16);\r\n SUB_MIX_2[x] = (t << 8) | (t >>> 24);\r\n SUB_MIX_3[x] = t;\r\n\r\n // Compute inv sub bytes, inv mix columns tables\r\n var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\r\n INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\r\n INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\r\n INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\r\n INV_SUB_MIX_3[sx] = t;\r\n\r\n // Compute next counter\r\n if (!x) {\r\n x = xi = 1;\r\n } else {\r\n x = x2 ^ d[d[d[x8 ^ x2]]];\r\n xi ^= d[d[xi]];\r\n }\r\n }\r\n }());\r\n\r\n // Precomputed Rcon lookup\r\n var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\r\n\r\n /**\r\n * AES block cipher algorithm.\r\n */\r\n var AES = C_algo.AES = BlockCipher.extend({\r\n _doReset: function () {\r\n // Shortcuts\r\n var key = this._key;\r\n var keyWords = key.words;\r\n var keySize = key.sigBytes / 4;\r\n\r\n // Compute number of rounds\r\n var nRounds = this._nRounds = keySize + 6;\r\n\r\n // Compute number of key schedule rows\r\n var ksRows = (nRounds + 1) * 4;\r\n\r\n // Compute key schedule\r\n var keySchedule = this._keySchedule = [];\r\n for (var ksRow = 0; ksRow < ksRows; ksRow++) {\r\n if (ksRow < keySize) {\r\n keySchedule[ksRow] = keyWords[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 1];\r\n\r\n if (!(ksRow % keySize)) {\r\n // Rot word\r\n t = (t << 8) | (t >>> 24);\r\n\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n\r\n // Mix Rcon\r\n t ^= RCON[(ksRow / keySize) | 0] << 24;\r\n } else if (keySize > 6 && ksRow % keySize == 4) {\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n }\r\n\r\n keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\r\n }\r\n }\r\n\r\n // Compute inv key schedule\r\n var invKeySchedule = this._invKeySchedule = [];\r\n for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\r\n var ksRow = ksRows - invKsRow;\r\n\r\n if (invKsRow % 4) {\r\n var t = keySchedule[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 4];\r\n }\r\n\r\n if (invKsRow < 4 || ksRow <= 4) {\r\n invKeySchedule[invKsRow] = t;\r\n } else {\r\n invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\r\n INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\r\n }\r\n }\r\n },\r\n\r\n encryptBlock: function (M, offset) {\r\n this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\r\n },\r\n\r\n decryptBlock: function (M, offset) {\r\n // Swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n\r\n this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\r\n\r\n // Inv swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n },\r\n\r\n _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\r\n // Shortcut\r\n var nRounds = this._nRounds;\r\n\r\n // Get input, add round key\r\n var s0 = M[offset] ^ keySchedule[0];\r\n var s1 = M[offset + 1] ^ keySchedule[1];\r\n var s2 = M[offset + 2] ^ keySchedule[2];\r\n var s3 = M[offset + 3] ^ keySchedule[3];\r\n\r\n // Key schedule row counter\r\n var ksRow = 4;\r\n\r\n // Rounds\r\n for (var round = 1; round < nRounds; round++) {\r\n // Shift rows, sub bytes, mix columns, add round key\r\n var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\r\n var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\r\n var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\r\n var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\r\n\r\n // Update state\r\n s0 = t0;\r\n s1 = t1;\r\n s2 = t2;\r\n s3 = t3;\r\n }\r\n\r\n // Shift rows, sub bytes, add round key\r\n var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\r\n var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\r\n var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\r\n var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\r\n\r\n // Set output\r\n M[offset] = t0;\r\n M[offset + 1] = t1;\r\n M[offset + 2] = t2;\r\n M[offset + 3] = t3;\r\n },\r\n\r\n keySize: 256 / 32\r\n });\r\n\r\n /**\r\n * Shortcut functions to the cipher's object interface.\r\n *\r\n * @example\r\n *\r\n * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\r\n * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\r\n */\r\n C.AES = BlockCipher._createHelper(AES);\r\n }());\r\n\r\n\r\n _.extend(BI, {\r\n /**\r\n * aes加密方法\r\n * aes-128-ecb\r\n *\r\n * @example\r\n *\r\n * var ciphertext = BI.aesEncrypt(text, key);\r\n */\r\n aesEncrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var cipher = CryptoJS.AES.encrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n var base64Cipher = cipher.ciphertext.toString(CryptoJS.enc.Base64);\r\n return base64Cipher;\r\n },\r\n\r\n /**\r\n * aes解密方法\r\n * @param {String} text \r\n * @param {String} key \r\n */\r\n aesDecrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var decipher = CryptoJS.AES.decrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n return CryptoJS.enc.Utf8.stringify(decipher);\r\n }\r\n });\r\n}());!(function () {\r\n function aspect (type) {\r\n return function (target, methodName, advice) {\r\n var exist = target[methodName],\r\n dispatcher;\r\n\r\n if (!exist || exist.target != target) {\r\n dispatcher = target[methodName] = function () {\r\n // before methods\r\n var beforeArr = dispatcher.before;\r\n var args = arguments, next;\r\n for (var l = beforeArr.length; l--;) {\r\n next = beforeArr[l].advice.apply(this, args);\r\n if (next === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n // target method\r\n var rs = dispatcher.method.apply(this, args);\r\n // after methods\r\n var afterArr = dispatcher.after;\r\n for (var i = 0, ii = afterArr.length; i < ii; i++) {\r\n next = afterArr[i].advice.call(this, rs, args);\r\n if (rs === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n return rs;\r\n };\r\n\r\n dispatcher.before = [];\r\n dispatcher.after = [];\r\n\r\n if (exist) {\r\n dispatcher.method = exist;\r\n }\r\n dispatcher.target = target;\r\n }\r\n\r\n var aspectArr = (dispatcher || exist)[type];\r\n var obj = {\r\n advice: advice,\r\n _index: aspectArr.length,\r\n remove: function () {\r\n aspectArr.splice(this._index, 1);\r\n }\r\n };\r\n aspectArr.push(obj);\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n BI.aspect = {\r\n before: aspect(\"before\"),\r\n after: aspect(\"after\")\r\n };\r\n\r\n return BI.aspect;\r\n\r\n})();\r\n!(function () {\r\n\r\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n\r\n\r\n // private method for UTF-8 encoding\r\n var _utf8_encode = function (string) {\r\n string = string.replace(/\\r\\n/g, \"\\n\");\r\n var utftext = \"\";\r\n\r\n for (var n = 0; n < string.length; n++) {\r\n\r\n var c = string.charCodeAt(n);\r\n\r\n if (c < 128) {\r\n utftext += String.fromCharCode(c);\r\n } else if ((c > 127) && (c < 2048)) {\r\n utftext += String.fromCharCode((c >> 6) | 192);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n } else {\r\n utftext += String.fromCharCode((c >> 12) | 224);\r\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n }\r\n\r\n }\r\n\r\n return utftext;\r\n };\r\n\r\n // private method for UTF-8 decoding\r\n var _utf8_decode = function (utftext) {\r\n var string = \"\";\r\n var i = 0;\r\n var c = 0, c3 = 0, c2 = 0;\r\n\r\n while (i < utftext.length) {\r\n\r\n c = utftext.charCodeAt(i);\r\n\r\n if (c < 128) {\r\n string += String.fromCharCode(c);\r\n i++;\r\n } else if ((c > 191) && (c < 224)) {\r\n c2 = utftext.charCodeAt(i + 1);\r\n string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\r\n i += 2;\r\n } else {\r\n c2 = utftext.charCodeAt(i + 1);\r\n c3 = utftext.charCodeAt(i + 2);\r\n string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n i += 3;\r\n }\r\n\r\n }\r\n return string;\r\n };\r\n\r\n _.extend(BI, {\r\n\r\n encode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = _utf8_encode(input);\r\n\r\n while (i < input.length) {\r\n\r\n chr1 = input.charCodeAt(i++);\r\n chr2 = input.charCodeAt(i++);\r\n chr3 = input.charCodeAt(i++);\r\n\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n } else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n\r\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\r\n\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // public method for decoding\r\n decode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3;\r\n var enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\r\n\r\n while (i < input.length) {\r\n\r\n enc1 = _keyStr.indexOf(input.charAt(i++));\r\n enc2 = _keyStr.indexOf(input.charAt(i++));\r\n enc3 = _keyStr.indexOf(input.charAt(i++));\r\n enc4 = _keyStr.indexOf(input.charAt(i++));\r\n\r\n chr1 = (enc1 << 2) | (enc2 >> 4);\r\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\r\n chr3 = ((enc3 & 3) << 6) | enc4;\r\n\r\n output = output + String.fromCharCode(chr1);\r\n\r\n if (enc3 != 64) {\r\n output = output + String.fromCharCode(chr2);\r\n }\r\n if (enc4 != 64) {\r\n output = output + String.fromCharCode(chr3);\r\n }\r\n\r\n }\r\n\r\n output = _utf8_decode(output);\r\n\r\n return output;\r\n\r\n }\r\n });\r\n})();\r\nBI.Cache = {\r\n _prefix: \"bi\",\r\n setUsername: function (username) {\r\n localStorage.setItem(BI.Cache._prefix + \".username\", (username + \"\" || \"\").toUpperCase());\r\n },\r\n getUsername: function () {\r\n return localStorage.getItem(BI.Cache._prefix + \".username\") || \"\";\r\n },\r\n _getKeyPrefix: function () {\r\n return BI.Cache.getUsername() + \".\" + BI.Cache._prefix + \".\";\r\n },\r\n _generateKey: function (key) {\r\n return BI.Cache._getKeyPrefix() + (key || \"\");\r\n },\r\n getItem: function (key) {\r\n return localStorage.getItem(BI.Cache._generateKey(key));\r\n },\r\n setItem: function (key, value) {\r\n localStorage.setItem(BI.Cache._generateKey(key), value);\r\n },\r\n removeItem: function (key) {\r\n localStorage.removeItem(BI.Cache._generateKey(key));\r\n },\r\n clear: function () {\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n if (key.indexOf(BI.Cache._getKeyPrefix()) === 0) {\r\n localStorage.removeItem(key);\r\n }\r\n }\r\n }\r\n },\r\n keys: function () {\r\n var result = [];\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n var prefix = BI.Cache._getKeyPrefix();\r\n if (key.indexOf(prefix) === 0) {\r\n result[result.length] = key.substring(prefix.length);\r\n }\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n addCookie: function (name, value, path, expiresHours) {\r\n var cookieString = name + \"=\" + escape(value);\r\n // 判断是否设置过期时间\r\n if (expiresHours && expiresHours > 0) {\r\n var date = new Date();\r\n // expires是标准GMT格式时间,应该使用时间戳作为起始时间\r\n date.setTime(date.getTime() + expiresHours * 3600 * 1000);\r\n cookieString = cookieString + \"; expires=\" + date.toUTCString();\r\n }\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n },\r\n getCookie: function (name) {\r\n var arr, reg = new RegExp(\"(^| )\" + name + \"=([^;]*)(;|$)\");\r\n if (arr = document.cookie.match(reg)) {return unescape(arr[2]);}\r\n return null;\r\n },\r\n deleteCookie: function (name, path) {\r\n var date = new Date();\r\n date.setTime(date.getTime() - 10000);\r\n var cookieString = name + \"=v; expires=\" + date.toUTCString();\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n }\r\n};BI.CellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize) {\r\n this._cellSizeGetter = cellSizeGetter;\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n this._cellSizeAndPositionData = {};\r\n this._lastMeasuredIndex = -1;\r\n};\r\n\r\nBI.CellSizeAndPositionManager.prototype = {\r\n constructor: BI.CellSizeAndPositionManager,\r\n configure: function (cellCount, estimatedCellSize) {\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellCount;\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._estimatedCellSize;\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._lastMeasuredIndex;\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n if (index < 0 || index >= this._cellCount) {\r\n return;\r\n }\r\n if (index > this._lastMeasuredIndex) {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\r\n\r\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\r\n var size = this._cellSizeGetter(i);\r\n\r\n if (size == null || isNaN(size)) {\r\n continue;\r\n }\r\n\r\n this._cellSizeAndPositionData[i] = {\r\n offset: offset,\r\n size: size\r\n };\r\n\r\n offset += size;\r\n }\r\n\r\n this._lastMeasuredIndex = index;\r\n }\r\n return this._cellSizeAndPositionData[index];\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._lastMeasuredIndex >= 0\r\n ? this._cellSizeAndPositionData[this._lastMeasuredIndex]\r\n : {\r\n offset: 0,\r\n size: 0\r\n };\r\n },\r\n\r\n getTotalSize: function () {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n var datum = this.getSizeAndPositionOfCell(targetIndex);\r\n var maxOffset = datum.offset;\r\n var minOffset = maxOffset - containerSize + datum.size;\r\n\r\n var idealOffset;\r\n\r\n switch (align) {\r\n case \"start\":\r\n idealOffset = maxOffset;\r\n break;\r\n case \"end\":\r\n idealOffset = minOffset;\r\n break;\r\n case \"center\":\r\n idealOffset = maxOffset - ((containerSize - datum.size) / 2);\r\n break;\r\n default:\r\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\r\n break;\r\n }\r\n\r\n var totalSize = this.getTotalSize();\r\n\r\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n var totalSize = this.getTotalSize();\r\n\r\n if (totalSize === 0) {\r\n return {};\r\n }\r\n\r\n var maxOffset = offset + containerSize;\r\n var start = this._findNearestCell(offset);\r\n\r\n var datum = this.getSizeAndPositionOfCell(start);\r\n offset = datum.offset + datum.size;\r\n\r\n var stop = start;\r\n\r\n while (offset < maxOffset && stop < this._cellCount - 1) {\r\n stop++;\r\n offset += this.getSizeAndPositionOfCell(stop).size;\r\n }\r\n\r\n return {\r\n start: start,\r\n stop: stop\r\n };\r\n },\r\n\r\n resetCell: function (index) {\r\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\r\n },\r\n\r\n _binarySearch: function (high, low, offset) {\r\n var middle;\r\n var currentOffset;\r\n\r\n while (low <= high) {\r\n middle = low + Math.floor((high - low) / 2);\r\n currentOffset = this.getSizeAndPositionOfCell(middle).offset;\r\n\r\n if (currentOffset === offset) {\r\n return middle;\r\n } else if (currentOffset < offset) {\r\n low = middle + 1;\r\n } else if (currentOffset > offset) {\r\n high = middle - 1;\r\n }\r\n }\r\n\r\n if (low > 0) {\r\n return low - 1;\r\n }\r\n },\r\n\r\n _exponentialSearch: function (index, offset) {\r\n var interval = 1;\r\n\r\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\r\n index += interval;\r\n interval *= 2;\r\n }\r\n\r\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\r\n },\r\n\r\n _findNearestCell: function (offset) {\r\n if (isNaN(offset)) {\r\n return;\r\n }\r\n\r\n offset = Math.max(0, offset);\r\n\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\r\n\r\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\r\n return this._binarySearch(lastMeasuredIndex, 0, offset);\r\n }\r\n return this._exponentialSearch(lastMeasuredIndex, offset);\r\n \r\n }\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize, maxScrollSize) {\r\n this._cellSizeAndPositionManager = new BI.CellSizeAndPositionManager(cellCount, cellSizeGetter, estimatedCellSize);\r\n this._maxScrollSize = maxScrollSize || 10000000;\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager.prototype = {\r\n constructor: BI.ScalingCellSizeAndPositionManager,\r\n\r\n configure: function () {\r\n this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager, arguments);\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellSizeAndPositionManager.getCellCount();\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\r\n },\r\n\r\n getOffsetAdjustment: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\r\n },\r\n\r\n getTotalSize: function () {\r\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n currentOffset = this._safeOffsetToOffset(containerSize, currentOffset);\r\n\r\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align, containerSize, currentOffset, targetIndex);\r\n\r\n return this._offsetToSafeOffset(containerSize, offset);\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n offset = this._safeOffsetToOffset(containerSize, offset);\r\n\r\n return this._cellSizeAndPositionManager.getVisibleCellRange(containerSize, offset);\r\n },\r\n\r\n resetCell: function (index) {\r\n this._cellSizeAndPositionManager.resetCell(index);\r\n },\r\n\r\n _getOffsetPercentage: function (containerSize, offset, totalSize) {\r\n return totalSize <= containerSize\r\n ? 0\r\n : offset / (totalSize - containerSize);\r\n },\r\n\r\n _offsetToSafeOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, totalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\r\n \r\n },\r\n\r\n _safeOffsetToOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (totalSize - containerSize));\r\n \r\n }\r\n};/**\r\n * 汉字拼音索引\r\n */\r\n\r\n!(function () {\r\n var _ChineseFirstPY = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYB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YQLQZFKCGNNDJSSZFDBCTWWSEQFHQJBSAQTGYPQLBXBMMYWXGSLZHGLZGQYFLZBYFZJFRYSFMBYZHQGFWZSYFYJJPHZBYYZFFWODGRLMFTWLBZGYCQXCDJYGZYYYYTYTYDWEGAZYHXJLZYYHLRMGRXXZCLHNELJJTJTPWJYBJJBXJJTJTEEKHWSLJPLPSFYZPQQBDLQJJTYYQLYZKDKSQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\r\n\r\n // 此处收录了375个多音字,数据来自于http://www.51windows.net/pages/pinyin.asp\r\n var oMultiDiff = {\r\n 19969: \"DZ\",\r\n 19975: \"WM\",\r\n 19988: \"QJ\",\r\n 20048: \"YL\",\r\n 20056: \"SC\",\r\n 20060: \"NM\",\r\n 20094: \"QG\",\r\n 20127: \"QJ\",\r\n 20167: \"QC\",\r\n 20193: \"YG\",\r\n 20250: \"KH\",\r\n 20256: \"ZC\",\r\n 20282: \"SC\",\r\n 20285: \"QJG\",\r\n 20291: \"TD\",\r\n 20314: \"YD\",\r\n 20315: \"BF\",\r\n 20340: \"NE\",\r\n 20375: \"TD\",\r\n 20389: \"YJ\",\r\n 20391: \"CZ\",\r\n 20415: \"PB\",\r\n 20446: \"YS\",\r\n 20447: \"SQ\",\r\n 20504: \"TC\",\r\n 20608: \"KG\",\r\n 20854: \"QJ\",\r\n 20857: \"ZC\",\r\n 20911: \"PF\",\r\n 20985: \"AW\",\r\n 21032: \"PB\",\r\n 21048: \"XQ\",\r\n 21049: \"SC\",\r\n 21089: \"YS\",\r\n 21119: \"JC\",\r\n 21242: \"SB\",\r\n 21273: \"SC\",\r\n 21305: \"YP\",\r\n 21306: \"QO\",\r\n 21330: \"ZC\",\r\n 21333: \"SDC\",\r\n 21345: \"QK\",\r\n 21378: \"CA\",\r\n 21397: \"SC\",\r\n 21414: \"XS\",\r\n 21442: \"SC\",\r\n 21477: \"JG\",\r\n 21480: \"TD\",\r\n 21484: \"ZS\",\r\n 21494: \"YX\",\r\n 21505: \"YX\",\r\n 21512: \"HG\",\r\n 21523: \"XH\",\r\n 21537: \"PB\",\r\n 21542: \"PF\",\r\n 21549: \"KH\",\r\n 21571: \"E\",\r\n 21574: \"DA\",\r\n 21588: \"TD\",\r\n 21589: \"O\",\r\n 21618: \"ZC\",\r\n 21621: \"KHA\",\r\n 21632: \"ZJ\",\r\n 21654: \"KG\",\r\n 21679: \"LKG\",\r\n 21683: \"KH\",\r\n 21710: \"A\",\r\n 21719: \"YH\",\r\n 21734: \"WOE\",\r\n 21769: \"A\",\r\n 21780: \"WN\",\r\n 21804: \"XH\",\r\n 21834: \"A\",\r\n 21899: \"ZD\",\r\n 21903: \"RN\",\r\n 21908: \"WO\",\r\n 21939: \"ZC\",\r\n 21956: \"SA\",\r\n 21964: \"YA\",\r\n 21970: \"TD\",\r\n 22003: \"A\",\r\n 22031: \"JG\",\r\n 22040: \"XS\",\r\n 22060: \"ZC\",\r\n 22066: \"ZC\",\r\n 22079: \"MH\",\r\n 22129: \"XJ\",\r\n 22179: \"XA\",\r\n 22237: \"NJ\",\r\n 22244: \"TD\",\r\n 22280: \"JQ\",\r\n 22300: \"YH\",\r\n 22313: \"XW\",\r\n 22331: \"YQ\",\r\n 22343: \"YJ\",\r\n 22351: \"PH\",\r\n 22395: \"DC\",\r\n 22412: \"TD\",\r\n 22484: \"PB\",\r\n 22500: \"PB\",\r\n 22534: \"ZD\",\r\n 22549: \"DH\",\r\n 22561: \"PB\",\r\n 22612: \"TD\",\r\n 22771: \"KQ\",\r\n 22831: \"HB\",\r\n 22841: \"JG\",\r\n 22855: \"QJ\",\r\n 22865: \"XQ\",\r\n 23013: \"ML\",\r\n 23081: \"WM\",\r\n 23487: \"SX\",\r\n 23558: \"QJ\",\r\n 23561: \"YW\",\r\n 23586: \"YW\",\r\n 23614: \"YW\",\r\n 23615: \"SN\",\r\n 23631: \"PB\",\r\n 23646: \"ZS\",\r\n 23663: \"ZT\",\r\n 23673: \"YG\",\r\n 23762: \"TD\",\r\n 23769: \"ZS\",\r\n 23780: \"QJ\",\r\n 23884: \"QK\",\r\n 24055: \"XH\",\r\n 24113: \"DC\",\r\n 24162: \"ZC\",\r\n 24191: \"GA\",\r\n 24273: \"QJ\",\r\n 24324: \"NL\",\r\n 24377: \"TD\",\r\n 24378: \"QJ\",\r\n 24439: \"PF\",\r\n 24554: \"ZS\",\r\n 24683: \"TD\",\r\n 24694: \"WE\",\r\n 24733: \"LK\",\r\n 24925: \"TN\",\r\n 25094: \"ZG\",\r\n 25100: \"XQ\",\r\n 25103: \"XH\",\r\n 25153: \"PB\",\r\n 25170: \"PB\",\r\n 25179: \"KG\",\r\n 25203: \"PB\",\r\n 25240: \"ZS\",\r\n 25282: \"FB\",\r\n 25303: \"NA\",\r\n 25324: \"KG\",\r\n 25341: \"ZY\",\r\n 25373: \"WZ\",\r\n 25375: \"XJ\",\r\n 25384: \"A\",\r\n 25457: \"A\",\r\n 25528: \"SD\",\r\n 25530: \"SC\",\r\n 25552: \"TD\",\r\n 25774: \"ZC\",\r\n 25874: \"ZC\",\r\n 26044: \"YW\",\r\n 26080: \"WM\",\r\n 26292: \"PB\",\r\n 26333: \"PB\",\r\n 26355: \"ZY\",\r\n 26366: \"CZ\",\r\n 26397: \"ZC\",\r\n 26399: \"QJ\",\r\n 26415: \"ZS\",\r\n 26451: \"SB\",\r\n 26526: \"ZC\",\r\n 26552: \"JG\",\r\n 26561: \"TD\",\r\n 26588: \"JG\",\r\n 26597: \"CZ\",\r\n 26629: \"ZS\",\r\n 26638: \"YL\",\r\n 26646: \"XQ\",\r\n 26653: \"KG\",\r\n 26657: \"XJ\",\r\n 26727: \"HG\",\r\n 26894: \"ZC\",\r\n 26937: \"ZS\",\r\n 26946: \"ZC\",\r\n 26999: \"KJ\",\r\n 27099: \"KJ\",\r\n 27449: \"YQ\",\r\n 27481: \"XS\",\r\n 27542: \"ZS\",\r\n 27663: \"ZS\",\r\n 27748: \"TS\",\r\n 27784: \"SC\",\r\n 27788: \"ZD\",\r\n 27795: \"TD\",\r\n 27812: \"O\",\r\n 27850: \"PB\",\r\n 27852: \"MB\",\r\n 27895: \"SL\",\r\n 27898: \"PL\",\r\n 27973: \"QJ\",\r\n 27981: \"KH\",\r\n 27986: \"HX\",\r\n 27994: \"XJ\",\r\n 28044: \"YC\",\r\n 28065: \"WG\",\r\n 28177: \"SM\",\r\n 28267: \"QJ\",\r\n 28291: \"KH\",\r\n 28337: \"ZQ\",\r\n 28463: \"TL\",\r\n 28548: \"DC\",\r\n 28601: \"TD\",\r\n 28689: \"PB\",\r\n 28805: \"JG\",\r\n 28820: \"QG\",\r\n 28846: \"PB\",\r\n 28952: \"TD\",\r\n 28975: \"ZC\",\r\n 29100: \"A\",\r\n 29325: \"QJ\",\r\n 29575: \"SL\",\r\n 29602: \"FB\",\r\n 30010: \"TD\",\r\n 30044: \"CX\",\r\n 30058: \"PF\",\r\n 30091: \"YSP\",\r\n 30111: \"YN\",\r\n 30229: \"XJ\",\r\n 30427: \"SC\",\r\n 30465: \"SX\",\r\n 30631: \"YQ\",\r\n 30655: \"QJ\",\r\n 30684: \"QJG\",\r\n 30707: \"SD\",\r\n 30729: \"XH\",\r\n 30796: \"LG\",\r\n 30917: \"PB\",\r\n 31074: \"NM\",\r\n 31085: \"JZ\",\r\n 31109: \"SC\",\r\n 31181: \"ZC\",\r\n 31192: \"MLB\",\r\n 31293: \"JQ\",\r\n 31400: \"YX\",\r\n 31584: \"YJ\",\r\n 31896: \"ZN\",\r\n 31909: \"ZY\",\r\n 31995: \"XJ\",\r\n 32321: \"PF\",\r\n 32327: \"ZY\",\r\n 32418: \"HG\",\r\n 32420: \"XQ\",\r\n 32421: \"HG\",\r\n 32438: \"LG\",\r\n 32473: \"GJ\",\r\n 32488: \"TD\",\r\n 32521: \"QJ\",\r\n 32527: \"PB\",\r\n 32562: \"ZSQ\",\r\n 32564: \"JZ\",\r\n 32735: \"ZD\",\r\n 32793: \"PB\",\r\n 33071: \"PF\",\r\n 33098: \"XL\",\r\n 33100: \"YA\",\r\n 33152: \"PB\",\r\n 33261: \"CX\",\r\n 33324: \"BP\",\r\n 33333: \"TD\",\r\n 33406: \"YA\",\r\n 33426: \"WM\",\r\n 33432: \"PB\",\r\n 33445: \"JG\",\r\n 33486: \"ZN\",\r\n 33493: \"TS\",\r\n 33507: \"QJ\",\r\n 33540: \"QJ\",\r\n 33544: \"ZC\",\r\n 33564: \"XQ\",\r\n 33617: \"YT\",\r\n 33632: \"QJ\",\r\n 33636: \"XH\",\r\n 33637: \"YX\",\r\n 33694: \"WG\",\r\n 33705: \"PF\",\r\n 33728: \"YW\",\r\n 33882: \"SR\",\r\n 34067: \"WM\",\r\n 34074: \"YW\",\r\n 34121: \"QJ\",\r\n 34255: \"ZC\",\r\n 34259: \"XL\",\r\n 34425: \"JH\",\r\n 34430: \"XH\",\r\n 34485: \"KH\",\r\n 34503: \"YS\",\r\n 34532: \"HG\",\r\n 34552: \"XS\",\r\n 34558: \"YE\",\r\n 34593: \"ZL\",\r\n 34660: \"YQ\",\r\n 34892: \"XH\",\r\n 34928: \"SC\",\r\n 34999: \"QJ\",\r\n 35048: \"PB\",\r\n 35059: \"SC\",\r\n 35098: \"ZC\",\r\n 35203: \"TQ\",\r\n 35265: \"JX\",\r\n 35299: \"JX\",\r\n 35782: \"SZ\",\r\n 35828: \"YS\",\r\n 35830: \"E\",\r\n 35843: \"TD\",\r\n 35895: \"YG\",\r\n 35977: \"MH\",\r\n 36158: \"JG\",\r\n 36228: \"QJ\",\r\n 36426: \"XQ\",\r\n 36466: \"DC\",\r\n 36710: \"CJ\",\r\n 36711: \"ZYG\",\r\n 36767: \"PB\",\r\n 36866: \"SK\",\r\n 36951: \"YW\",\r\n 37034: \"YX\",\r\n 37063: \"XH\",\r\n 37218: \"ZC\",\r\n 37325: \"ZC\",\r\n 38063: \"PB\",\r\n 38079: \"TD\",\r\n 38085: \"QY\",\r\n 38107: \"DC\",\r\n 38116: \"TD\",\r\n 38123: \"YD\",\r\n 38224: \"HG\",\r\n 38241: \"XTC\",\r\n 38271: \"ZC\",\r\n 38415: \"YE\",\r\n 38426: \"KH\",\r\n 38461: \"YD\",\r\n 38463: \"AE\",\r\n 38466: \"PB\",\r\n 38477: \"XJ\",\r\n 38518: \"YT\",\r\n 38551: \"WK\",\r\n 38585: \"ZC\",\r\n 38704: \"XS\",\r\n 38739: \"LJ\",\r\n 38761: \"GJ\",\r\n 38808: \"SQ\",\r\n 39048: \"JG\",\r\n 39049: \"XJ\",\r\n 39052: \"HG\",\r\n 39076: \"CZ\",\r\n 39271: \"XT\",\r\n 39534: \"TD\",\r\n 39552: \"TD\",\r\n 39584: \"PB\",\r\n 39647: \"SB\",\r\n 39730: \"LG\",\r\n 39748: \"TPB\",\r\n 40109: \"ZQ\",\r\n 40479: \"ND\",\r\n 40516: \"HG\",\r\n 40536: \"HG\",\r\n 40583: \"QJ\",\r\n 40765: \"YQ\",\r\n 40784: \"QJ\",\r\n 40840: \"YK\",\r\n 40863: \"QJG\"\r\n };\r\n\r\n var _checkPYCh = function (ch) {\r\n var uni = ch.charCodeAt(0);\r\n // 如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (uni > 40869 || uni < 19968) {return ch;} // dealWithOthers(ch);\r\n return (oMultiDiff[uni] ? oMultiDiff[uni] : (_ChineseFirstPY.charAt(uni - 19968)));\r\n };\r\n\r\n var _mkPYRslt = function (arr, options) {\r\n var ignoreMulti = options.ignoreMulti;\r\n var splitChar = options.splitChar;\r\n var arrRslt = [\"\"], k, multiLen = 0;\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n var str = arr[i];\r\n var strlen = str.length;\r\n // 多音字过多的情况下,指数增长会造成浏览器卡死,超过20完全卡死,18勉强能用,考虑到不同性能最好是16或者14\r\n // 超过14个多音字之后,后面的都用第一个拼音\r\n if (strlen == 1 || multiLen > 14 || ignoreMulti) {\r\n var tmpStr = str.substring(0, 1);\r\n for (k = 0; k < arrRslt.length; k++) {\r\n arrRslt[k] += tmpStr;\r\n }\r\n } else {\r\n var tmpArr = arrRslt.slice(0);\r\n arrRslt = [];\r\n multiLen ++;\r\n for (k = 0; k < strlen; k++) {\r\n // 复制一个相同的arrRslt\r\n var tmp = tmpArr.slice(0);\r\n // 把当前字符str[k]添加到每个元素末尾\r\n for (var j = 0; j < tmp.length; j++) {\r\n tmp[j] += str.charAt(k);\r\n }\r\n // 把复制并修改后的数组连接到arrRslt上\r\n arrRslt = arrRslt.concat(tmp);\r\n }\r\n }\r\n }\r\n // BI-56386 这边直接将所有多音字组合拼接是有风险的,因为丢失了每一组的起始索引信息, 外部使用indexOf等方法会造成错位\r\n // 一旦错位就可能认为不符合条件, 但实际上还是有可能符合条件的,故此处以一个无法搜索的不可见字符作为连接\r\n return arrRslt.join(splitChar || \"\").toLowerCase();\r\n };\r\n\r\n _.extend(BI, {\r\n makeFirstPY: function (str, options) {\r\n options = options || {};\r\n if (typeof (str) !== \"string\") {return \"\" + str;}\r\n var arrResult = []; // 保存中间结果的数组\r\n for (var i = 0, len = str.length; i < len; i++) {\r\n // 获得unicode码\r\n var ch = str.charAt(i);\r\n // 检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理\r\n arrResult.push(_checkPYCh(ch));\r\n }\r\n // 处理arrResult,返回所有可能的拼音首字母串数组\r\n return _mkPYRslt(arrResult, options);\r\n }\r\n });\r\n})();!(function () {\r\n var cancelAnimationFrame =\r\n _global.cancelAnimationFrame ||\r\n _global.webkitCancelAnimationFrame ||\r\n _global.mozCancelAnimationFrame ||\r\n _global.oCancelAnimationFrame ||\r\n _global.msCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n\r\n BI.MouseMoveTracker = function (onMove, onMoveEnd, domNode) {\r\n this._isDragging = false;\r\n this._animationFrameID = null;\r\n this._domNode = domNode;\r\n this._onMove = onMove;\r\n this._onMoveEnd = onMoveEnd;\r\n\r\n this._onMouseMove = BI.bind(this._onMouseMove, this);\r\n this._onMouseUp = BI.bind(this._onMouseUp, this);\r\n this._didMouseMove = BI.bind(this._didMouseMove, this);\r\n };\r\n BI.MouseMoveTracker.prototype = {\r\n constructor: BI.MouseMoveTracker,\r\n captureMouseMoves: function (/* object*/ event) {\r\n if (!this._eventMoveToken && !this._eventUpToken) {\r\n this._eventMoveToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mousemove\",\r\n this._onMouseMove\r\n );\r\n this._eventUpToken = BI.EventListener.listen(\r\n this._domNode,\r\n \"mouseup\",\r\n this._onMouseUp\r\n );\r\n }\r\n\r\n if (!this._isDragging) {\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._isDragging = true;\r\n this._x = event.clientX;\r\n this._y = event.clientY;\r\n }\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n releaseMouseMoves: function () {\r\n if (this._eventMoveToken && this._eventUpToken) {\r\n this._eventMoveToken.remove();\r\n this._eventMoveToken = null;\r\n this._eventUpToken.remove();\r\n this._eventUpToken = null;\r\n }\r\n\r\n if (this._animationFrameID !== null) {\r\n cancelAnimationFrame(this._animationFrameID);\r\n this._animationFrameID = null;\r\n }\r\n\r\n if (this._isDragging) {\r\n this._isDragging = false;\r\n this._x = null;\r\n this._y = null;\r\n }\r\n },\r\n\r\n isDragging: function () /* boolean*/ {\r\n return this._isDragging;\r\n },\r\n\r\n _onMouseMove: function (/* object*/ event) {\r\n var x = event.clientX;\r\n var y = event.clientY;\r\n\r\n this._deltaX += (x - this._x);\r\n this._deltaY += (y - this._y);\r\n\r\n if (this._animationFrameID === null) {\r\n // The mouse may move faster then the animation frame does.\r\n // Use `requestAnimationFrame` to avoid over-updating.\r\n this._animationFrameID =\r\n requestAnimationFrame(this._didMouseMove);\r\n }\r\n\r\n this._x = x;\r\n this._y = y;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n },\r\n\r\n _didMouseMove: function () {\r\n this._animationFrameID = null;\r\n this._onMove(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n },\r\n\r\n _onMouseUp: function () {\r\n if (this._animationFrameID) {\r\n this._didMouseMove();\r\n }\r\n this._onMoveEnd();\r\n }\r\n };\r\n})();!(function () {\r\n var PIXEL_STEP = 10;\r\n var LINE_HEIGHT = 40;\r\n var PAGE_HEIGHT = 800;\r\n var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout;\r\n\r\n function normalizeWheel (/* object*/event) /* object*/ {\r\n var sX = 0,\r\n sY = 0,\r\n // spinX, spinY\r\n pX = 0,\r\n pY = 0; // pixelX, pixelY\r\n\r\n // Legacy\r\n if (\"detail\" in event) {\r\n sY = event.detail;\r\n }\r\n if (\"wheelDelta\" in event) {\r\n sY = -event.wheelDelta / 120;\r\n }\r\n if (\"wheelDeltaY\" in event) {\r\n sY = -event.wheelDeltaY / 120;\r\n }\r\n if (\"wheelDeltaX\" in event) {\r\n sX = -event.wheelDeltaX / 120;\r\n }\r\n\r\n // side scrolling on FF with DOMMouseScroll\r\n if (\"axis\" in event && event.axis === event.HORIZONTAL_AXIS) {\r\n sX = sY;\r\n sY = 0;\r\n }\r\n\r\n pX = sX * PIXEL_STEP;\r\n pY = sY * PIXEL_STEP;\r\n\r\n if (\"deltaY\" in event) {\r\n pY = event.deltaY;\r\n }\r\n if (\"deltaX\" in event) {\r\n pX = event.deltaX;\r\n }\r\n\r\n if ((pX || pY) && event.deltaMode) {\r\n if (event.deltaMode === 1) {\r\n // delta in LINE units\r\n pX *= LINE_HEIGHT;\r\n pY *= LINE_HEIGHT;\r\n } else {\r\n // delta in PAGE units\r\n pX *= PAGE_HEIGHT;\r\n pY *= PAGE_HEIGHT;\r\n }\r\n }\r\n\r\n // Fall-back if spin cannot be determined\r\n if (pX && !sX) {\r\n sX = pX < 1 ? -1 : 1;\r\n }\r\n if (pY && !sY) {\r\n sY = pY < 1 ? -1 : 1;\r\n }\r\n\r\n return {\r\n spinX: sX,\r\n spinY: sY,\r\n pixelX: pX,\r\n pixelY: pY\r\n };\r\n }\r\n\r\n BI.WheelHandler = function (onWheel, handleScrollX, handleScrollY, stopPropagation) {\r\n this._animationFrameID = null;\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n this._didWheel = BI.bind(this._didWheel, this);\r\n if (typeof handleScrollX !== \"function\") {\r\n handleScrollX = handleScrollX ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof handleScrollY !== \"function\") {\r\n handleScrollY = handleScrollY ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n if (typeof stopPropagation !== \"function\") {\r\n stopPropagation = stopPropagation ?\r\n function () {\r\n return true;\r\n } :\r\n function () {\r\n return false;\r\n };\r\n }\r\n\r\n this._handleScrollX = handleScrollX;\r\n this._handleScrollY = handleScrollY;\r\n this._stopPropagation = stopPropagation;\r\n this._onWheelCallback = onWheel;\r\n this.onWheel = BI.bind(this.onWheel, this);\r\n };\r\n BI.WheelHandler.prototype = {\r\n constructor: BI.WheelHandler,\r\n onWheel: function (/* object*/ event) {\r\n var normalizedEvent = normalizeWheel(event);\r\n var deltaX = this._deltaX + normalizedEvent.pixelX;\r\n var deltaY = this._deltaY + normalizedEvent.pixelY;\r\n var handleScrollX = this._handleScrollX(deltaX, deltaY);\r\n var handleScrollY = this._handleScrollY(deltaY, deltaX);\r\n if (!handleScrollX && !handleScrollY) {\r\n return;\r\n }\r\n\r\n this._deltaX += handleScrollX ? normalizedEvent.pixelX : 0;\r\n this._deltaY += handleScrollY ? normalizedEvent.pixelY : 0;\r\n event.preventDefault ? event.preventDefault() : (event.returnValue = false);\r\n\r\n var changed;\r\n if (this._deltaX !== 0 || this._deltaY !== 0) {\r\n if (this._stopPropagation()) {\r\n event.stopPropagation ? event.stopPropagation() : (event.cancelBubble = true);\r\n }\r\n changed = true;\r\n }\r\n\r\n if (changed === true && this._animationFrameID === null) {\r\n this._animationFrameID = requestAnimationFrame(this._didWheel);\r\n }\r\n },\r\n\r\n _didWheel: function () {\r\n this._animationFrameID = null;\r\n this._onWheelCallback(this._deltaX, this._deltaY);\r\n this._deltaX = 0;\r\n this._deltaY = 0;\r\n }\r\n };\r\n})();\r\n(function () {\r\n function defaultComparator (a, b) {\r\n return a < b;\r\n }\r\n\r\n BI.Heap = function (items, comparator) {\r\n this._items = items || [];\r\n this._size = this._items.length;\r\n this._comparator = comparator || defaultComparator;\r\n this._heapify();\r\n };\r\n\r\n BI.Heap.prototype = {\r\n constructor: BI.Heap,\r\n empty: function () {\r\n return this._size === 0;\r\n },\r\n\r\n pop: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n var elt = this._items[0];\r\n\r\n var lastElt = this._items.pop();\r\n this._size--;\r\n\r\n if (this._size > 0) {\r\n this._items[0] = lastElt;\r\n this._sinkDown(0);\r\n }\r\n\r\n return elt;\r\n },\r\n\r\n push: function (item) {\r\n this._items[this._size++] = item;\r\n this._bubbleUp(this._size - 1);\r\n },\r\n\r\n size: function () {\r\n return this._size;\r\n },\r\n\r\n peek: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n return this._items[0];\r\n },\r\n\r\n _heapify: function () {\r\n for (var index = Math.floor((this._size + 1) / 2); index >= 0; index--) {\r\n this._sinkDown(index);\r\n }\r\n },\r\n\r\n _bubbleUp: function (index) {\r\n var elt = this._items[index];\r\n while (index > 0) {\r\n var parentIndex = Math.floor((index + 1) / 2) - 1;\r\n var parentElt = this._items[parentIndex];\r\n\r\n // if parentElt < elt, stop\r\n if (this._comparator(parentElt, elt)) {\r\n return;\r\n }\r\n\r\n // swap\r\n this._items[parentIndex] = elt;\r\n this._items[index] = parentElt;\r\n index = parentIndex;\r\n }\r\n },\r\n\r\n _sinkDown: function (index) {\r\n var elt = this._items[index];\r\n\r\n while (true) {\r\n var leftChildIndex = 2 * (index + 1) - 1;\r\n var rightChildIndex = 2 * (index + 1);\r\n var swapIndex = -1;\r\n\r\n if (leftChildIndex < this._size) {\r\n var leftChild = this._items[leftChildIndex];\r\n if (this._comparator(leftChild, elt)) {\r\n swapIndex = leftChildIndex;\r\n }\r\n }\r\n\r\n if (rightChildIndex < this._size) {\r\n var rightChild = this._items[rightChildIndex];\r\n if (this._comparator(rightChild, elt)) {\r\n if (swapIndex === -1 ||\r\n this._comparator(rightChild, this._items[swapIndex])) {\r\n swapIndex = rightChildIndex;\r\n }\r\n }\r\n }\r\n\r\n // if we don't have a swap, stop\r\n if (swapIndex === -1) {\r\n return;\r\n }\r\n\r\n this._items[index] = this._items[swapIndex];\r\n this._items[swapIndex] = elt;\r\n index = swapIndex;\r\n }\r\n }\r\n };\r\n})();\r\n\r\n!(function () {\r\n BI.LinkHashMap = function () {\r\n this.array = [];\r\n this.map = {};\r\n };\r\n BI.LinkHashMap.prototype = {\r\n constructor: BI.LinkHashMap,\r\n has: function (key) {\r\n if (key in this.map) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n add: function (key, value) {\r\n if (typeof key === \"undefined\") {\r\n return;\r\n }\r\n if (key in this.map) {\r\n this.map[key] = value;\r\n } else {\r\n this.array.push(key);\r\n this.map[key] = value;\r\n }\r\n },\r\n\r\n remove: function (key) {\r\n if (key in this.map) {\r\n delete this.map[key];\r\n for (var i = 0; i < this.array.length; i++) {\r\n if (this.array[i] == key) {\r\n this.array.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var key = this.array[i];\r\n var value = this.map[key];\r\n var re = fn.call(scope, key, value, i, this.array, this.map);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n get: function (key) {\r\n return this.map[key];\r\n },\r\n\r\n toArray: function () {\r\n var array = [];\r\n this.each(function (key, value) {\r\n array.push(value);\r\n });\r\n return array;\r\n }\r\n };\r\n})();\r\n!(function () {\r\n BI.LRU = function (limit) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.head = this.tail = undefined;\r\n this._keymap = {};\r\n };\r\n\r\n var p = BI.LRU.prototype;\r\n\r\n p.put = function (key, value) {\r\n var removed;\r\n if (this.size === this.limit) {\r\n removed = this.shift();\r\n }\r\n\r\n var entry = this.get(key, true);\r\n if (!entry) {\r\n entry = {\r\n key: key\r\n };\r\n this._keymap[key] = entry;\r\n if (this.tail) {\r\n this.tail.newer = entry;\r\n entry.older = this.tail;\r\n } else {\r\n this.head = entry;\r\n }\r\n this.tail = entry;\r\n this.size++;\r\n }\r\n entry.value = value;\r\n\r\n return removed;\r\n };\r\n\r\n p.shift = function () {\r\n var entry = this.head;\r\n if (entry) {\r\n this.head = this.head.newer;\r\n this.head.older = undefined;\r\n entry.newer = entry.older = undefined;\r\n this._keymap[entry.key] = undefined;\r\n this.size--;\r\n }\r\n return entry;\r\n };\r\n\r\n\r\n p.get = function (key, returnEntry) {\r\n var entry = this._keymap[key];\r\n if (entry === undefined) return;\r\n if (entry === this.tail) {\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n }\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.head) {\r\n this.head = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.tail; // D. --> E\r\n if (this.tail) {\r\n this.tail.newer = entry; // E. <-- D\r\n }\r\n this.tail = entry;\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n };\r\n\r\n p.has = function (key) {\r\n return this._keymap[key] != null;\r\n };\r\n})();// 线段树\r\n(function () {\r\n var parent = function (node) {\r\n return Math.floor(node / 2);\r\n };\r\n\r\n var Int32Array = _global.Int32Array || function (size) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = 0;\r\n }\r\n return xs;\r\n };\r\n\r\n var ceilLog2 = function (x) {\r\n var y = 1;\r\n while (y < x) {\r\n y *= 2;\r\n }\r\n return y;\r\n };\r\n\r\n BI.PrefixIntervalTree = function (xs) {\r\n this._size = xs.length;\r\n this._half = ceilLog2(this._size);\r\n // _heap是一个_size两倍以上的堆\r\n this._heap = new Int32Array(2 * this._half);\r\n\r\n var i;\r\n // 初始化 >= _size 的堆空间, 即叶子节点\r\n for (i = 0; i < this._size; ++i) {\r\n this._heap[this._half + i] = xs[i];\r\n }\r\n // 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间\r\n for (i = this._half - 1; i > 0; --i) {\r\n this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.prototype = {\r\n constructor: BI.PrefixIntervalTree,\r\n // 往_half之后的空间set值,需要更新其所有祖先节点的值\r\n set: function (index, value) {\r\n var node = this._half + index;\r\n this._heap[node] = value;\r\n\r\n node = parent(node);\r\n for (; node !== 0; node = parent(node)) {\r\n this._heap[node] =\r\n this._heap[2 * node] + this._heap[2 * node + 1];\r\n }\r\n },\r\n\r\n get: function (index) {\r\n var node = this._half + index;\r\n return this._heap[node];\r\n },\r\n\r\n getSize: function () {\r\n return this._size;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(end - 1).\r\n */\r\n sumUntil: function (end) {\r\n if (end === 0) {\r\n return 0;\r\n }\r\n\r\n var node = this._half + end - 1;\r\n var sum = this._heap[node];\r\n for (; node !== 1; node = parent(node)) {\r\n if (node % 2 === 1) {\r\n sum += this._heap[node - 1];\r\n }\r\n }\r\n\r\n return sum;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(inclusiveEnd).\r\n */\r\n sumTo: function (inclusiveEnd) {\r\n return this.sumUntil(inclusiveEnd + 1);\r\n },\r\n\r\n /**\r\n * sum get(begin) + get(begin + 1) + ... + get(end - 1).\r\n */\r\n sum: function (begin, end) {\r\n return this.sumUntil(end) - this.sumUntil(begin);\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) <= t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestLowerBound: function (t) {\r\n if (t < 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] <= t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t < leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) < t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestStrictLowerBound: function (t) {\r\n if (t <= 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] < t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t <= leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t <= sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastUpperBound: function (t) {\r\n return this.greatestStrictLowerBound(t) + 1;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t < sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastStrictUpperBound: function (t) {\r\n return this.greatestLowerBound(t) + 1;\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.uniform = function (size, initialValue) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = initialValue;\r\n }\r\n\r\n return new BI.PrefixIntervalTree(xs);\r\n };\r\n\r\n BI.PrefixIntervalTree.empty = function (size) {\r\n return BI.PrefixIntervalTree.uniform(size, 0);\r\n };\r\n\r\n})();\r\n\r\n!(function () {\r\n BI.Queue = function (capacity) {\r\n this.capacity = capacity;\r\n this.array = [];\r\n };\r\n BI.Queue.prototype = {\r\n constructor: BI.Queue,\r\n\r\n contains: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n indexOf: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n getElementByIndex: function (index) {\r\n return this.array[index];\r\n },\r\n\r\n push: function (v) {\r\n this.array.push(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.shift();\r\n }\r\n },\r\n\r\n pop: function () {\r\n this.array.pop();\r\n },\r\n\r\n shift: function () {\r\n this.array.shift();\r\n },\r\n\r\n unshift: function (v) {\r\n this.array.unshift(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.pop();\r\n }\r\n },\r\n\r\n remove: function (v) {\r\n BI.remove(this.array, v);\r\n },\r\n\r\n splice: function () {\r\n this.array.splice.apply(this.array, arguments);\r\n },\r\n\r\n slice: function () {\r\n this.array.slice.apply(this.array, arguments);\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var re = fn.call(scope, i, this.array[i], this.array);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n toArray: function () {\r\n return this.array;\r\n },\r\n\r\n fromArray: function (array) {\r\n var self = this;\r\n BI.each(array, function (i, v) {\r\n self.push(v);\r\n });\r\n },\r\n\r\n clear: function () {\r\n this.array.length = 0;\r\n }\r\n };\r\n})();!(function () {\r\n var Section = function (height, width, x, y) {\r\n this.height = height;\r\n this.width = width;\r\n this.x = x;\r\n this.y = y;\r\n\r\n this._indexMap = {};\r\n this._indices = [];\r\n };\r\n\r\n Section.prototype = {\r\n constructor: Section,\r\n addCellIndex: function (index) {\r\n if (!this._indexMap[index]) {\r\n this._indexMap[index] = true;\r\n this._indices.push(index);\r\n }\r\n },\r\n\r\n getCellIndices: function () {\r\n return this._indices;\r\n }\r\n };\r\n\r\n var SECTION_SIZE = 100;\r\n BI.SectionManager = function (sectionSize) {\r\n this._sectionSize = sectionSize || SECTION_SIZE;\r\n this._cellMetadata = [];\r\n this._sections = {};\r\n };\r\n\r\n BI.SectionManager.prototype = {\r\n constructor: BI.SectionManager,\r\n getCellIndices: function (height, width, x, y) {\r\n var indices = {};\r\n\r\n BI.each(this.getSections(height, width, x, y), function (i, section) {\r\n BI.each(section.getCellIndices(), function (j, index) {\r\n indices[index] = index;\r\n });\r\n });\r\n\r\n return BI.map(BI.keys(indices), function (i, index) {\r\n return indices[index];\r\n });\r\n },\r\n\r\n getCellMetadata: function (index) {\r\n return this._cellMetadata[index];\r\n },\r\n\r\n getSections: function (height, width, x, y) {\r\n var sectionXStart = Math.floor(x / this._sectionSize);\r\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\r\n var sectionYStart = Math.floor(y / this._sectionSize);\r\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\r\n\r\n var sections = [];\r\n\r\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\r\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\r\n var key = sectionX + \".\" + sectionY;\r\n\r\n if (!this._sections[key]) {\r\n this._sections[key] = new Section(this._sectionSize, this._sectionSize, sectionX * this._sectionSize, sectionY * this._sectionSize);\r\n }\r\n\r\n sections.push(this._sections[key]);\r\n }\r\n }\r\n\r\n return sections;\r\n },\r\n\r\n getTotalSectionCount: function () {\r\n return BI.size(this._sections);\r\n },\r\n\r\n registerCell: function (cellMetadatum, index) {\r\n this._cellMetadata[index] = cellMetadatum;\r\n\r\n BI.each(this.getSections(cellMetadatum.height, cellMetadatum.width, cellMetadatum.x, cellMetadatum.y), function (i, section) {\r\n section.addCellIndex(index);\r\n });\r\n }\r\n };\r\n})();(function () {\r\n BI.Tree = function () {\r\n this.root = new BI.Node(BI.UUID());\r\n };\r\n\r\n BI.Tree.prototype = {\r\n constructor: BI.Tree,\r\n addNode: function (node, newNode, index) {\r\n if (BI.isNull(newNode)) {\r\n this.root.addChild(node, index);\r\n } else if (BI.isNull(node)) {\r\n this.root.addChild(newNode, index);\r\n } else {\r\n node.addChild(newNode, index);\r\n }\r\n },\r\n\r\n isRoot: function (node) {\r\n return node === this.root;\r\n },\r\n\r\n getRoot: function () {\r\n return this.root;\r\n },\r\n\r\n clear: function () {\r\n this.root.clear();\r\n },\r\n\r\n initTree: function (nodes) {\r\n var self = this;\r\n this.clear();\r\n var queue = [];\r\n BI.each(nodes, function (i, node) {\r\n var n = new BI.Node(node);\r\n n.set(\"data\", node);\r\n self.addNode(n);\r\n queue.push(n);\r\n });\r\n while (!BI.isEmpty(queue)) {\r\n var parent = queue.shift();\r\n var node = parent.get(\"data\");\r\n BI.each(node.children, function (i, child) {\r\n var n = new BI.Node(child);\r\n n.set(\"data\", child);\r\n queue.push(n);\r\n self.addNode(parent, n);\r\n });\r\n }\r\n },\r\n\r\n _toJSON: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSON(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSON: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSON(child));\r\n });\r\n return result;\r\n },\r\n\r\n _toJSONWithNode: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSONWithNode(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), {\r\n node: node\r\n }, (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSONWithNode: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSONWithNode(child));\r\n });\r\n return result;\r\n },\r\n\r\n search: function (root, target, param) {\r\n if (!(root instanceof BI.Node)) {\r\n return arguments.callee.apply(this, [this.root, root, target]);\r\n }\r\n var self = this, next = null;\r\n\r\n if (BI.isNull(target)) {\r\n return null;\r\n }\r\n if (BI.isEqual(root[param || \"id\"], target)) {\r\n return root;\r\n }\r\n BI.any(root.getChildren(), function (i, child) {\r\n next = self.search(child, target, param);\r\n if (null !== next) {\r\n return true;\r\n }\r\n });\r\n return next;\r\n },\r\n\r\n _traverse: function (node, callback) {\r\n var queue = [];\r\n queue.push(node);\r\n while (!BI.isEmpty(queue)) {\r\n var temp = queue.shift();\r\n var b = callback && callback(temp);\r\n if (b === false) {\r\n break;\r\n }\r\n if (b === true) {\r\n continue;\r\n }\r\n if (temp != null) {\r\n queue = queue.concat(temp.getChildren());\r\n }\r\n }\r\n },\r\n\r\n traverse: function (callback) {\r\n this._traverse(this.root, callback);\r\n },\r\n\r\n _recursion: function (node, route, callback) {\r\n var self = this;\r\n return BI.every(node.getChildren(), function (i, child) {\r\n var next = BI.clone(route);\r\n next.push(child.id);\r\n var b = callback && callback(child, next);\r\n if (b === false) {\r\n return false;\r\n }\r\n if (b === true) {\r\n return true;\r\n }\r\n return self._recursion(child, next, callback);\r\n });\r\n },\r\n\r\n recursion: function (callback) {\r\n this._recursion(this.root, [], callback);\r\n },\r\n\r\n inOrderTraverse: function (callback) {\r\n this._inOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 中序遍历(递归)\r\n _inOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._inOrderTraverse(node.getLeft());\r\n callback && callback(node);\r\n this._inOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 中序遍历(非递归)\r\n nrInOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n while (node != null || !BI.isEmpty(stack)) {\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n callback && callback(node);\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n preOrderTraverse: function (callback) {\r\n this._preOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 先序遍历(递归)\r\n _preOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n callback && callback(node);\r\n this._preOrderTraverse(node.getLeft());\r\n this._preOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 先序遍历(非递归)\r\n nrPreOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n callback && callback(node);\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n postOrderTraverse: function (callback) {\r\n this._postOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 后序遍历(递归)\r\n _postOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._postOrderTraverse(node.getLeft());\r\n this._postOrderTraverse(node.getRight());\r\n callback && callback(node);\r\n }\r\n },\r\n\r\n // 后续遍历(非递归)\r\n nrPostOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n var preNode = null;// 表示最近一次访问的节点\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n\r\n node = BI.last(stack);\r\n\r\n if (node.getRight() == null || node.getRight() == preNode) {\r\n callback && callback(node);\r\n node = stack.pop();\r\n preNode = node;\r\n node = null;\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n }\r\n };\r\n\r\n BI.Node = function (id) {\r\n if (BI.isObject(id)) {\r\n BI.extend(this, id);\r\n } else {\r\n this.id = id;\r\n }\r\n this.clear.apply(this, arguments);\r\n };\r\n\r\n BI.Node.prototype = {\r\n constructor: BI.Node,\r\n\r\n set: function (key, value) {\r\n if (BI.isObject(key)) {\r\n BI.extend(this, key);\r\n return;\r\n }\r\n this[key] = value;\r\n },\r\n\r\n get: function (key) {\r\n return this[key];\r\n },\r\n\r\n isLeaf: function () {\r\n return BI.isEmpty(this.children);\r\n },\r\n\r\n getChildren: function () {\r\n return this.children;\r\n },\r\n\r\n getChildrenLength: function () {\r\n return this.children.length;\r\n },\r\n\r\n getFirstChild: function () {\r\n return BI.first(this.children);\r\n },\r\n\r\n getLastChild: function () {\r\n return BI.last(this.children);\r\n },\r\n\r\n setLeft: function (left) {\r\n this.left = left;\r\n },\r\n\r\n getLeft: function () {\r\n return this.left;\r\n },\r\n\r\n setRight: function (right) {\r\n this.right = right;\r\n },\r\n\r\n getRight: function () {\r\n return this.right;\r\n },\r\n\r\n setParent: function (parent) {\r\n this.parent = parent;\r\n },\r\n\r\n getParent: function () {\r\n return this.parent;\r\n },\r\n\r\n getChild: function (index) {\r\n return this.children[index];\r\n },\r\n\r\n getChildIndex: function (id) {\r\n return BI.findIndex(this.children, function (i, ch) {\r\n return ch.get(\"id\") === id;\r\n });\r\n },\r\n\r\n removeChild: function (id) {\r\n this.removeChildByIndex(this.getChildIndex(id));\r\n },\r\n\r\n removeChildByIndex: function (index) {\r\n var before = this.getChild(index - 1);\r\n var behind = this.getChild(index + 1);\r\n if (before != null) {\r\n before.setRight(behind || null);\r\n }\r\n if (behind != null) {\r\n behind.setLeft(before || null);\r\n }\r\n this.children.splice(index, 1);\r\n },\r\n\r\n removeAllChilds: function () {\r\n this.children = [];\r\n },\r\n\r\n addChild: function (child, index) {\r\n var cur = null;\r\n if (BI.isUndefined(index)) {\r\n cur = this.children.length - 1;\r\n } else {\r\n cur = index - 1;\r\n }\r\n child.setParent(this);\r\n if (cur >= 0) {\r\n this.getChild(cur) && this.getChild(cur).setRight(child);\r\n child.setLeft(this.getChild(cur));\r\n }\r\n if (BI.isUndefined(index)) {\r\n this.children.push(child);\r\n } else {\r\n this.children.splice(index, 0, child);\r\n }\r\n },\r\n\r\n equals: function (obj) {\r\n return this === obj || this.id === obj.id;\r\n },\r\n\r\n clear: function () {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n this.children = [];\r\n }\r\n };\r\n\r\n BI.extend(BI.Tree, {\r\n transformToArrayFormat: function (nodes, pId) {\r\n if (!nodes) return [];\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = BI.clone(nodes[i]);\r\n node.pId = node.pId == null ? pId : node.pId;\r\n delete node.children;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = BI.clone(nodes);\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n delete newNodes.children;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n arrayFormat: function (nodes, pId) {\r\n if (!nodes) {\r\n return [];\r\n }\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = nodes[i];\r\n node.pId = node.pId == null ? pId : node.pId;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = nodes;\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n transformToTreeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = BI.clone(sNodes[i]);\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n delete tmpMap[sNodes[i].id].pId;\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n treeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = sNodes[i];\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n traversal: function (array, callback) {\r\n if (BI.isNull(array)) {\r\n return;\r\n }\r\n var self = this;\r\n BI.some(array, function (i, item) {\r\n if (callback(i, item) === false) {\r\n return true;\r\n }\r\n self.traversal(item.children, callback);\r\n });\r\n }\r\n });\r\n})();// 向量操作\r\nBI.Vector = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n};\r\nBI.Vector.prototype = {\r\n constructor: BI.Vector,\r\n cross: function (v) {\r\n return (this.x * v.y - this.y * v.x);\r\n },\r\n length: function (v) {\r\n return (Math.sqrt(this.x * v.x + this.y * v.y));\r\n }\r\n};\r\nBI.Region = function (x, y, w, h) {\r\n this.x = x;\r\n this.y = y;\r\n this.w = w;\r\n this.h = h;\r\n};\r\nBI.Region.prototype = {\r\n constructor: BI.Region,\r\n // 判断两个区域是否相交,若相交,则要么顶点互相包含,要么矩形边界(或对角线)相交\r\n isIntersects: function (obj) {\r\n if (this.isPointInside(obj.x, obj.y) ||\r\n this.isPointInside(obj.x + obj.w, obj.y) ||\r\n this.isPointInside(obj.x, obj.y + obj.h) ||\r\n this.isPointInside(obj.x + obj.w, obj.y + obj.h)) {\r\n return true;\r\n } else if (obj.isPointInside(this.x, this.y) ||\r\n obj.isPointInside(this.x + this.w, this.y) ||\r\n obj.isPointInside(this.x, this.y + this.h) ||\r\n obj.isPointInside(this.x + this.w, this.y + this.h)) {\r\n return true;\r\n } else if (obj.x != null && obj.y != null)// 判断矩形对角线相交 |v1 X v2||v1 X v3| < 0\r\n {\r\n var vector1 = new BI.Vector(this.w, this.h);// 矩形对角线向量\r\n var vector2 = new BI.Vector(obj.x - this.x, obj.y - this.y);\r\n var vector3 = new BI.Vector(vector2.x + obj.w, vector2.y + obj.h);\r\n if ((vector1.cross(vector2) * vector1.cross(vector3)) < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n // 判断一个点是否在这个区域内部\r\n isPointInside: function (x, y) {\r\n if (this.x == null || this.y == null) {\r\n return false;\r\n }\r\n if (x >= this.x && x <= this.x + this.w && y >= this.y && y <= this.y + this.h) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n // 返回区域的重心,因为是矩形所以返回中点\r\n getPosition: function () {\r\n var pos = [];\r\n pos.push(this.x + this.w / 2);\r\n pos.push(this.y + this.h / 2);\r\n return pos;\r\n }\r\n};BI.BehaviorFactory = {\r\n createBehavior: function (key, options) {\r\n var behavior;\r\n switch (key) {\r\n case \"highlight\":\r\n behavior = BI.HighlightBehavior;\r\n break;\r\n case \"redmark\":\r\n behavior = BI.RedMarkBehavior;\r\n break;\r\n }\r\n return new behavior(options);\r\n }\r\n};\r\n\r\n/**\r\n * guy\r\n * 行为控件\r\n * @class BI.Behavior\r\n * @extends BI.OB\r\n */\r\nBI.Behavior = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Behavior.superclass._defaultConfig.apply(this, arguments), {\r\n rule: function () {return true;}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Behavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function () {\r\n\r\n }\r\n});/**\r\n * 布局容器类\r\n * @class BI.Layout\r\n * @extends BI.Widget\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Boolean} [options.scrollable=false] 子组件超出容器边界之后是否会出现滚动条\r\n * @cfg {Boolean} [options.scrollx=false] 子组件超出容器边界之后是否会出现横向滚动条\r\n * @cfg {Boolean} [options.scrolly=false] 子组件超出容器边界之后是否会出现纵向滚动条\r\n */\r\nBI.Layout = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n scrollable: null, // true, false, null\r\n scrollx: false, // true, false\r\n scrolly: false, // true, false\r\n items: []\r\n };\r\n },\r\n\r\n render: function () {\r\n this._init4Margin();\r\n this._init4Scroll();\r\n },\r\n\r\n _init4Margin: function () {\r\n if (this.options.top) {\r\n this.element.css(\"top\", this.options.top);\r\n }\r\n if (this.options.left) {\r\n this.element.css(\"left\", this.options.left);\r\n }\r\n if (this.options.bottom) {\r\n this.element.css(\"bottom\", this.options.bottom);\r\n }\r\n if (this.options.right) {\r\n this.element.css(\"right\", this.options.right);\r\n }\r\n },\r\n\r\n _init4Scroll: function () {\r\n switch (this.options.scrollable) {\r\n case true:\r\n this.element.css(\"overflow\", \"auto\");\r\n break;\r\n case false:\r\n this.element.css(\"overflow\", \"hidden\");\r\n break;\r\n default :\r\n break;\r\n }\r\n if (this.options.scrollx) {\r\n this.element.css({\r\n \"overflow-x\": \"auto\",\r\n \"overflow-y\": \"hidden\"\r\n });\r\n }\r\n if (this.options.scrolly) {\r\n this.element.css({\r\n \"overflow-x\": \"hidden\",\r\n \"overflow-y\": \"auto\"\r\n });\r\n }\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.element.append(frag);\r\n },\r\n\r\n _mountChildren: function () {\r\n var self = this;\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n var hasChild = false;\r\n BI.each(this._children, function (i, widget) {\r\n if (widget.element !== self.element) {\r\n frag.appendChild(widget.element[0]);\r\n hasChild = true;\r\n }\r\n });\r\n if (hasChild === true) {\r\n this.appendFragment(frag);\r\n }\r\n },\r\n\r\n _getChildName: function (index) {\r\n return index + \"\";\r\n },\r\n\r\n _addElement: function (i, item, context) {\r\n var self = this, w;\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n w = BI.createWidget(item, context);\r\n w.on(BI.Events.DESTROY, function () {\r\n BI.each(self._children, function (name, child) {\r\n if (child === w) {\r\n BI.remove(self._children, child);\r\n self.removeItemAt(name | 0);\r\n }\r\n });\r\n });\r\n this.addWidget(this._getChildName(i), w);\r\n } else {\r\n w = this.getWidgetByName(this._getChildName(i));\r\n }\r\n return w;\r\n },\r\n\r\n _getOptions: function (item) {\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n item = BI.stripEL(item);\r\n if (item instanceof BI.Widget) {\r\n item = item.options;\r\n }\r\n return item;\r\n },\r\n\r\n _compare: function (item1, item2) {\r\n var self = this;\r\n return eq(item1, item2);\r\n\r\n // 不比较函数\r\n function eq (a, b, aStack, bStack) {\r\n if (a === b) {\r\n return a !== 0 || 1 / a === 1 / b;\r\n }\r\n if (a == null || b == null) {\r\n return a === b;\r\n }\r\n var className = Object.prototype.toString.call(a);\r\n switch (className) {\r\n case \"[object RegExp]\":\r\n case \"[object String]\":\r\n return \"\" + a === \"\" + b;\r\n case \"[object Number]\":\r\n if (+a !== +a) {\r\n return +b !== +b;\r\n }\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case \"[object Date]\":\r\n case \"[object Boolean]\":\r\n return +a === +b;\r\n }\r\n\r\n var areArrays = className === \"[object Array]\";\r\n if (!areArrays) {\r\n if (BI.isFunction(a) && BI.isFunction(b)) {\r\n return true;\r\n }\r\n a = self._getOptions(a);\r\n b = self._getOptions(b);\r\n }\r\n\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n if (aStack[length] === a) {\r\n return bStack[length] === b;\r\n }\r\n }\r\n\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n if (areArrays) {\r\n length = a.length;\r\n if (length !== b.length) {\r\n return false;\r\n }\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var keys = _.keys(a), key;\r\n length = keys.length;\r\n if (_.keys(b).length !== length) {\r\n return false;\r\n }\r\n while (length--) {\r\n key = keys[length];\r\n if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) {\r\n return false;\r\n }\r\n }\r\n }\r\n aStack.pop();\r\n bStack.pop();\r\n return true;\r\n }\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.element;\r\n },\r\n\r\n _addItemAt: function (index, item) {\r\n for (var i = this.options.items.length; i > index; i--) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i - 1)];\r\n }\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 0, item);\r\n },\r\n\r\n _removeItemAt: function (index) {\r\n for (var i = index; i < this.options.items.length - 1; i++) {\r\n this._children[this._getChildName(i)] = this._children[this._getChildName(i + 1)];\r\n }\r\n delete this._children[this._getChildName(this.options.items.length - 1)];\r\n this.options.items.splice(index, 1);\r\n },\r\n\r\n /**\r\n * 添加一个子组件到容器中\r\n * @param {JSON/BI.Widget} item 子组件\r\n */\r\n addItem: function (item) {\r\n return this.addItemAt(this.options.items.length, item);\r\n },\r\n\r\n prependItem: function (item) {\r\n return this.addItemAt(0, item);\r\n },\r\n\r\n addItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length) {\r\n return;\r\n }\r\n this._addItemAt(index, item);\r\n var w = this._addElement(index, item);\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n w._mount();\r\n return w;\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = BI.isArray(indexes) ? indexes : [indexes];\r\n var deleted = [];\r\n var newItems = [], newChildren = {};\r\n for (var i = 0, len = this.options.items.length; i < len; i++) {\r\n var child = this._children[this._getChildName(i)];\r\n if (BI.contains(indexes, i)) {\r\n child && deleted.push(child);\r\n } else {\r\n newChildren[this._getChildName(newItems.length)] = child;\r\n newItems.push(this.options.items[i]);\r\n }\r\n }\r\n this.options.items = newItems;\r\n this._children = newChildren;\r\n BI.each(deleted, function (i, c) {\r\n c._destroy();\r\n });\r\n },\r\n\r\n shouldUpdateItem: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return false;\r\n }\r\n var child = this._children[this._getChildName(index)];\r\n if (!child.shouldUpdate) {\r\n return null;\r\n }\r\n return child.shouldUpdate(this._getOptions(item)) === true;\r\n },\r\n\r\n updateItemAt: function (index, item) {\r\n if (index < 0 || index > this.options.items.length - 1) {\r\n return;\r\n }\r\n\r\n var child = this._children[this._getChildName(index)];\r\n var updated;\r\n if (updated = child.update(this._getOptions(item))) {\r\n return updated;\r\n }\r\n var del = this._children[this._getChildName(index)];\r\n delete this._children[this._getChildName(index)];\r\n this.options.items.splice(index, 1);\r\n var w = this._addElement(index, item);\r\n this.options.items.splice(index, 0, item);\r\n this._children[this._getChildName(index)] = w;\r\n if (index > 0) {\r\n this._children[this._getChildName(index - 1)].element.after(w.element);\r\n } else {\r\n w.element.prependTo(this._getWrapper());\r\n }\r\n del._destroy();\r\n w._mount();\r\n },\r\n\r\n addItems: function (items, context) {\r\n var self = this, o = this.options;\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n BI.each(items, function (i, item) {\r\n var w = self._addElement(o.items.length, item, context);\r\n self._children[self._getChildName(o.items.length)] = w;\r\n o.items.push(item);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n });\r\n if (this._isMounted) {\r\n this._getWrapper().append(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n prependItems: function (items, context) {\r\n var self = this;\r\n items = items || [];\r\n var fragment = BI.Widget._renderEngine.createFragment();\r\n var added = [];\r\n for (var i = items.length - 1; i >= 0; i--) {\r\n this._addItemAt(0, items[i]);\r\n var w = this._addElement(0, items[i], context);\r\n self._children[self._getChildName(0)] = w;\r\n this.options.items.unshift(items[i]);\r\n added.push(w);\r\n fragment.appendChild(w.element[0]);\r\n }\r\n if (this._isMounted) {\r\n this._getWrapper().prepend(fragment);\r\n BI.each(added, function (i, w) {\r\n w._mount();\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var self = this, value = [], child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n var v = child.getValue();\r\n v = BI.isArray(v) ? v : [v];\r\n value = value.concat(v);\r\n }\r\n });\r\n return value;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setValue(v);\r\n }\r\n });\r\n },\r\n\r\n setText: function (v) {\r\n var self = this, child;\r\n BI.each(this.options.items, function (i) {\r\n if (child = self._children[self._getChildName(i)]) {\r\n child.setText(v);\r\n }\r\n });\r\n },\r\n\r\n patchItem: function (oldVnode, vnode, index) {\r\n var shouldUpdate = this.shouldUpdateItem(index, vnode);\r\n if (shouldUpdate === true || (shouldUpdate === null && !this._compare(oldVnode, vnode))) {\r\n return this.updateItemAt(index, vnode);\r\n }\r\n },\r\n\r\n updateChildren: function (oldCh, newCh) {\r\n var self = this;\r\n var oldStartIdx = 0, newStartIdx = 0;\r\n var oldEndIdx = oldCh.length - 1;\r\n var oldStartVnode = oldCh[0];\r\n var oldEndVnode = oldCh[oldEndIdx];\r\n var newEndIdx = newCh.length - 1;\r\n var newStartVnode = newCh[0];\r\n var newEndVnode = newCh[newEndIdx];\r\n var before;\r\n var updated;\r\n var children = {};\r\n BI.each(oldCh, function (i, child) {\r\n child = self._getOptions(child);\r\n var key = child.key == null ? i : child.key;\r\n if (BI.isKey(key)) {\r\n children[key] = self._children[self._getChildName(i)];\r\n }\r\n });\r\n\r\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\r\n if (BI.isNull(oldStartVnode)) {\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n } else if (BI.isNull(oldEndVnode)) {\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n } else if (sameVnode(oldStartVnode, newStartVnode, oldStartIdx, newStartIdx)) {\r\n updated = this.patchItem(oldStartVnode, newStartVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else if (sameVnode(oldEndVnode, newEndVnode, oldEndIdx, newEndIdx)) {\r\n updated = this.patchItem(oldEndVnode, newEndVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldStartVnode, newEndVnode)) {\r\n updated = this.patchItem(oldStartVnode, newEndVnode, oldStartIdx) || updated;\r\n children[oldStartVnode.key == null ? this._getChildName(oldStartIdx) : oldStartVnode.key] = this._children[this._getChildName(oldStartIdx)];\r\n insertBefore(oldStartVnode, oldEndVnode, true);\r\n oldStartVnode = oldCh[++oldStartIdx];\r\n newEndVnode = newCh[--newEndIdx];\r\n } else if (sameVnode(oldEndVnode, newStartVnode)) {\r\n updated = this.patchItem(oldEndVnode, newStartVnode, oldEndIdx) || updated;\r\n children[oldEndVnode.key == null ? this._getChildName(oldEndIdx) : oldEndVnode.key] = this._children[this._getChildName(oldEndIdx)];\r\n insertBefore(oldEndVnode, oldStartVnode);\r\n oldEndVnode = oldCh[--oldEndIdx];\r\n newStartVnode = newCh[++newStartIdx];\r\n } else {\r\n var sameOldVnode = findOldVnode(oldCh, newStartVnode, oldStartIdx, oldEndIdx);\r\n if (BI.isNull(sameOldVnode)) { // 不存在就把新的放到左边\r\n var node = addNode(newStartVnode);\r\n insertBefore(node, oldStartVnode);\r\n newStartVnode = newCh[++newStartIdx];\r\n } else { // 如果新节点在就旧节点区间中存在就复用一下\r\n BI.each(oldCh, function (index, child) {\r\n if (child && sameVnode(child, newStartVnode)) {\r\n updated = self.patchItem(sameOldVnode, newStartVnode, index) || updated;\r\n children[sameOldVnode.key == null ? self._getChildName(index) : sameOldVnode.key] = self._children[self._getChildName(index)];\r\n oldCh[index] = undefined;\r\n insertBefore(sameOldVnode, oldStartVnode);\r\n }\r\n });\r\n newStartVnode = newCh[++newStartIdx];\r\n }\r\n }\r\n }\r\n if (oldStartIdx > oldEndIdx) {\r\n before = BI.isNull(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1];\r\n addVnodes(before, newCh, newStartIdx, newEndIdx);\r\n } else if (newStartIdx > newEndIdx) {\r\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\r\n }\r\n\r\n this._children = {};\r\n BI.each(newCh, function (i, child) {\r\n var node = self._getOptions(child);\r\n var key = node.key == null ? self._getChildName(i) : node.key;\r\n children[key]._mount();\r\n self._children[self._getChildName(i)] = children[key];\r\n });\r\n\r\n function sameVnode (vnode1, vnode2, oldIndex, newIndex) {\r\n vnode1 = self._getOptions(vnode1);\r\n vnode2 = self._getOptions(vnode2);\r\n if (BI.isKey(vnode1.key)) {\r\n return vnode1.key === vnode2.key;\r\n }\r\n if (oldIndex >= 0) {\r\n return oldIndex === newIndex;\r\n }\r\n }\r\n\r\n function addNode (vnode, index) {\r\n var opt = self._getOptions(vnode);\r\n var key = opt.key == null ? self._getChildName(index) : opt.key;\r\n return children[key] = self._addElement(key, vnode);\r\n }\r\n\r\n function addVnodes (before, vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var node = addNode(vnodes[startIdx], startIdx);\r\n insertBefore(node, before, false, startIdx);\r\n }\r\n }\r\n\r\n function removeVnodes (vnodes, startIdx, endIdx) {\r\n for (; startIdx <= endIdx; ++startIdx) {\r\n var ch = vnodes[startIdx];\r\n if (BI.isNotNull(ch)) {\r\n var node = self._getOptions(ch);\r\n var key = node.key == null ? self._getChildName(startIdx) : node.key;\r\n delete self._children[self._getChildName(key)];\r\n children[key]._destroy();\r\n }\r\n }\r\n }\r\n\r\n function insertBefore (insert, before, isNext, index) {\r\n insert = self._getOptions(insert);\r\n before = before && self._getOptions(before);\r\n var insertKey = BI.isKey(insert.key) ? insert.key : self._getChildName(index);\r\n if (before && children[before.key]) {\r\n var beforeKey = BI.isKey(before.key) ? before.key : self._getChildName(index);\r\n var next;\r\n if (isNext) {\r\n next = children[beforeKey].element.next();\r\n } else {\r\n next = children[beforeKey].element;\r\n }\r\n if (next.length > 0) {\r\n next.before(children[insertKey].element);\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n } else {\r\n self._getWrapper().append(children[insertKey].element);\r\n }\r\n }\r\n\r\n function findOldVnode (vnodes, vNode, beginIdx, endIdx) {\r\n var i, found;\r\n for (i = beginIdx; i <= endIdx; ++i) {\r\n if (vnodes[i] && sameVnode(vnodes[i], vNode)) {\r\n found = vnodes[i];\r\n }\r\n }\r\n return found;\r\n }\r\n\r\n return updated;\r\n },\r\n\r\n update: function (opt) {\r\n var o = this.options;\r\n var items = opt.items || [];\r\n var updated = this.updateChildren(o.items, items);\r\n this.options.items = items;\r\n return updated;\r\n // var updated, i, len;\r\n // for (i = 0, len = Math.min(o.items.length, items.length); i < len; i++) {\r\n // if (!this._compare(o.items[i], items[i])) {\r\n // updated = this.updateItemAt(i, items[i]) || updated;\r\n // }\r\n // }\r\n // if (o.items.length > items.length) {\r\n // var deleted = [];\r\n // for (i = items.length; i < o.items.length; i++) {\r\n // deleted.push(this._children[this._getChildName(i)]);\r\n // delete this._children[this._getChildName(i)];\r\n // }\r\n // o.items.splice(items.length);\r\n // BI.each(deleted, function (i, w) {\r\n // w._destroy();\r\n // })\r\n // } else if (items.length > o.items.length) {\r\n // for (i = o.items.length; i < items.length; i++) {\r\n // this.addItemAt(i, items[i]);\r\n // }\r\n // }\r\n // return updated;\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeIndex;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeIndex = name;\r\n }\r\n });\r\n } else {\r\n removeIndex = nameOrWidget;\r\n }\r\n if (removeIndex) {\r\n this._removeItemAt(removeIndex | 0);\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Layout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.Layout.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n items = items || [];\r\n if (this._isMounted) {\r\n this.update({items: items});\r\n return;\r\n }\r\n this.options.items = items;\r\n this.stroke(items);\r\n },\r\n\r\n resize: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.layout\", BI.Layout);\r\nBI.Plugin = BI.Plugin || {};\r\n!(function () {\r\n var _WidgetsPlugin = {};\r\n var _ObjectPlugin = {};\r\n var _ConfigPlugin = {};\r\n var _GlobalWidgetConfigFn, _GlobalObjectConfigFn;\r\n BI.extend(BI.Plugin, {\r\n\r\n getWidget: function (type, options) {\r\n if (_GlobalWidgetConfigFn) {\r\n _GlobalWidgetConfigFn(type, options);\r\n }\r\n var res;\r\n if (_ConfigPlugin[type]) {\r\n for (var i = _ConfigPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _ConfigPlugin[type][i](options)) {\r\n options = res;\r\n }\r\n }\r\n }\r\n // Deprecated\r\n if (_WidgetsPlugin[type]) {\r\n for (var i = _WidgetsPlugin[type].length - 1; i >= 0; i--) {\r\n if (res = _WidgetsPlugin[type][i](options)) {\r\n return res;\r\n }\r\n }\r\n }\r\n return options;\r\n },\r\n\r\n config: function (widgetConfigFn, objectConfigFn) {\r\n _GlobalWidgetConfigFn = widgetConfigFn;\r\n _GlobalObjectConfigFn = objectConfigFn;\r\n },\r\n\r\n configWidget: function (type, fn) {\r\n if (!_ConfigPlugin[type]) {\r\n _ConfigPlugin[type] = [];\r\n }\r\n _ConfigPlugin[type].push(fn);\r\n },\r\n\r\n registerWidget: function (type, fn) {\r\n if (!_WidgetsPlugin[type]) {\r\n _WidgetsPlugin[type] = [];\r\n }\r\n if (_WidgetsPlugin[type].length > 0) {\r\n console.log(\"组件已经注册过了!\");\r\n }\r\n _WidgetsPlugin[type].push(fn);\r\n },\r\n\r\n relieveWidget: function (type) {\r\n delete _WidgetsPlugin[type];\r\n },\r\n\r\n getObject: function (type, object) {\r\n if (_GlobalObjectConfigFn) {\r\n _GlobalObjectConfigFn(type, object);\r\n }\r\n if (_ObjectPlugin[type]) {\r\n var res;\r\n for (var i = 0, len = _ObjectPlugin[type].length; i < len; i++) {\r\n if (res = _ObjectPlugin[type][i](object)) {\r\n object = res;\r\n };\r\n }\r\n }\r\n return res || object;\r\n },\r\n\r\n registerObject: function (type, fn) {\r\n if (!_ObjectPlugin[type]) {\r\n _ObjectPlugin[type] = [];\r\n }\r\n if (_ObjectPlugin[type].length > 0) {\r\n console.log(\"对象已经注册过了!\");\r\n }\r\n _ObjectPlugin[type].push(fn);\r\n },\r\n\r\n relieveObject: function (type) {\r\n delete _ObjectPlugin[type];\r\n }\r\n });\r\n})();/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.Action\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Action = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Action.superclass._defaultConfig.apply(this, arguments), {\r\n src: null,\r\n tar: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Action.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n\r\n }\r\n});\r\n\r\nBI.ActionFactory = {\r\n createAction: function (key, options) {\r\n var action;\r\n switch (key) {\r\n case \"show\":\r\n action = BI.ShowAction;\r\n break;\r\n }\r\n return new action(options);\r\n }\r\n};/**\r\n * guy\r\n * 由一个元素切换到另一个元素的行为\r\n * @class BI.ShowAction\r\n * @extends BI.Action\r\n */\r\nBI.ShowAction = BI.inherit(BI.Action, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowAction.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ShowAction.superclass._init.apply(this, arguments);\r\n },\r\n\r\n actionPerformed: function (src, tar, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(true);\r\n callback && callback();\r\n },\r\n\r\n actionBack: function (tar, src, callback) {\r\n tar = tar || this.options.tar;\r\n tar.setVisible(false);\r\n callback && callback();\r\n }\r\n});(function () {\r\n var _global;\r\n if (typeof window !== \"undefined\") {\r\n _global = window;\r\n } else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n } else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n } else {\r\n _global = this;\r\n }\r\n if (!_global.BI) {\r\n _global.BI = {};\r\n }\r\n\r\n function isEmpty (value) {\r\n // 判断是否为空值\r\n var result = value === \"\" || value === null || value === undefined;\r\n return result;\r\n }\r\n\r\n // 判断是否是无效的日期\r\n function isInvalidDate (date) {\r\n return date == \"Invalid Date\" || date == \"NaN\";\r\n }\r\n\r\n /**\r\n * CHART-1400\r\n * 使用数值计算的方式来获取任意数值的科学技术表示值。\r\n * 科学计数格式\r\n */\r\n function _eFormat (text, fmt) {\r\n text = +text;\r\n\r\n return eFormat(text, fmt);\r\n\r\n /**\r\n * 科学计数格式具体计算过程\r\n * @param num\r\n * @param format {String}有两种形式,\r\n * 1、\"0.00E00\"这样的字符串表示正常的科学计数表示,只不过规定了数值精确到百分位,\r\n * 而数量级的绝对值如果是10以下的时候在前面补零。\r\n * 2、 \"##0.0E0\"这样的字符串则规定用科学计数法表示之后的数值的整数部分是三位,精确到十分位,\r\n * 数量级没有规定,因为没见过实数里有用科学计数法表示之后E的后面会小于一位的情况(0无所谓)。\r\n * @returns {*}\r\n */\r\n function eFormat (num, format) {\r\n var neg = num < 0 ? (num *= -1, \"-\") : \"\",\r\n magnitudeNeg = \"\";\r\n\r\n var funcName = num > 0 && num < 1 ? \"floor\" : \"ceil\"; // -0.9999->-1\r\n // 数量级\r\n var magnitude = Math[funcName](Math.log(num) / Math.log(10));\r\n\r\n if (!isFinite(magnitude)) {\r\n return format.replace(/#/ig, \"\").replace(/\\.e/ig, \"E\");\r\n }\r\n\r\n num = num / Math.pow(10, magnitude);\r\n\r\n // 让num转化成[1, 10)区间上的数\r\n if (num > 0 && num < 1) {\r\n num *= 10;\r\n magnitude -= 1;\r\n }\r\n\r\n // 计算出format中需要显示的整数部分的位数,然后更新这个数值,也更新数量级\r\n var integerLen = getInteger(magnitude, format);\r\n integerLen > 1 && (magnitude -= integerLen - 1, num *= Math.pow(10, integerLen - 1));\r\n\r\n magnitude < 0 && (magnitudeNeg = \"-\", magnitude *= -1);\r\n\r\n // 获取科学计数法精确到的位数\r\n var precision = getPrecision(format);\r\n // 判断num经过四舍五入之后是否有进位\r\n var isValueCarry = isValueCarried(num);\r\n\r\n num *= Math.pow(10, precision);\r\n num = Math.round(num);\r\n // 如果出现进位的情况,将num除以10\r\n isValueCarry && (num /= 10, magnitude += magnitudeNeg === \"-\" ? -1 : 1);\r\n num /= Math.pow(10, precision);\r\n\r\n // 小数部分保留precision位\r\n num = num.toFixed(precision);\r\n // 格式化指数的部分\r\n magnitude = formatExponential(format, magnitude, magnitudeNeg);\r\n\r\n return neg + num + \"E\" + magnitude;\r\n }\r\n\r\n // 获取format格式规定的数量级的形式\r\n function formatExponential (format, num, magnitudeNeg) {\r\n num += \"\";\r\n if (!/e/ig.test(format)) {\r\n return num;\r\n }\r\n format = format.split(/e/ig)[1];\r\n\r\n while (num.length < format.length) {\r\n num = \"0\" + num;\r\n }\r\n\r\n // 如果magnitudeNeg是一个\"-\",而且num正好全是0,那么就别显示负号了\r\n var isAllZero = true;\r\n for (var i = 0, len = num.length; i < len; i++) {\r\n if (!isAllZero) {\r\n continue;\r\n }\r\n isAllZero = num.charAt(i) === \"0\";\r\n }\r\n magnitudeNeg = isAllZero ? \"\" : magnitudeNeg;\r\n\r\n return magnitudeNeg + num;\r\n }\r\n\r\n // 获取format规定的科学计数法精确到的位数\r\n function getPrecision (format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n var arr = format.split(/e/ig)[0].split(\".\");\r\n\r\n return arr.length > 1 ? arr[1].length : 0;\r\n }\r\n\r\n // 获取数值科学计数法表示之后整数的位数\r\n // 这边我们还需要考虑#和0的问题\r\n function getInteger (magnitude, format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n // return format.split(/e/ig)[0].split(\".\")[0].length;\r\n\r\n var formatLeft = format.split(/e/ig)[0].split(\".\")[0], i, f, len = formatLeft.length;\r\n var valueLeftLen = 0;\r\n\r\n for (i = 0; i < len; i++) {\r\n f = formatLeft.charAt(i);\r\n // \"#\"所在的位置到末尾长度小于等于值的整数部分长度,那么这个#才可以占位\r\n if (f == 0 || (f == \"#\" && (len - i <= magnitude + 1))) {\r\n valueLeftLen++;\r\n }\r\n }\r\n\r\n return valueLeftLen;\r\n }\r\n\r\n // 判断num通过round函数之后是否有进位\r\n function isValueCarried (num) {\r\n var roundNum = Math.round(num);\r\n num = (num + \"\").split(\".\")[0];\r\n roundNum = (roundNum + \"\").split(\".\")[0];\r\n return num.length !== roundNum.length;\r\n }\r\n }\r\n\r\n //'#.##'之类的格式处理 1.324e-18 这种的科学数字\r\n function _dealNumberPrecision (text, fright) {\r\n if (/[eE]/.test(text)) {\r\n var precision = 0, i = 0, ch;\r\n\r\n if (/[%‰]$/.test(fright)) {\r\n precision = /[%]$/.test(fright) ? 2 : 3;\r\n }\r\n\r\n for (var len = fright.length; i < len; i++) {\r\n if ((ch = fright.charAt(i)) == \"0\" || ch == \"#\") {\r\n precision++;\r\n }\r\n }\r\n return Number(text).toFixed(precision);\r\n }\r\n\r\n return text;\r\n }\r\n\r\n /**\r\n * 数字格式\r\n */\r\n function _numberFormat (text, format) {\r\n var text = text + \"\";\r\n\r\n //在调用数字格式的时候如果text里没有任何数字则不处理\r\n if (!(/[0-9]/.test(text)) || !format) {\r\n return text;\r\n }\r\n\r\n // 数字格式,区分正负数\r\n var numMod = format.indexOf(\";\");\r\n if (numMod > -1) {\r\n if (text >= 0) {\r\n return _numberFormat(text + \"\", format.substring(0, numMod));\r\n }\r\n return _numberFormat((-text) + \"\", format.substr(numMod + 1));\r\n\r\n } else {\r\n // 兼容格式处理负数的情况(copy:fr-jquery.format.js)\r\n if (+text < 0 && format.charAt(0) !== \"-\") {\r\n return _numberFormat((-text) + \"\", \"-\" + format);\r\n }\r\n }\r\n\r\n var fp = format.split(\".\"), fleft = fp[0] || \"\", fright = fp[1] || \"\";\r\n text = _dealNumberPrecision(text, fright);\r\n var tp = text.split(\".\"), tleft = tp[0] || \"\", tright = tp[1] || \"\";\r\n\r\n // 百分比,千分比的小数点移位处理\r\n if (/[%‰]$/.test(format)) {\r\n var paddingZero = /[%]$/.test(format) ? \"00\" : \"000\";\r\n tright += paddingZero;\r\n tleft += tright.substr(0, paddingZero.length);\r\n tleft = tleft.replace(/^0+/gi, \"\");\r\n tright = tright.substr(paddingZero.length).replace(/0+$/gi, \"\");\r\n }\r\n var right = _dealWithRight(tright, fright);\r\n if (right.leftPlus) {\r\n // 小数点后有进位\r\n tleft = parseInt(tleft) + 1 + \"\";\r\n\r\n tleft = isNaN(tleft) ? \"1\" : tleft;\r\n }\r\n right = right.num;\r\n var left = _dealWithLeft(tleft, fleft);\r\n if (!(/[0-9]/.test(left))) {\r\n left = left + \"0\";\r\n }\r\n if (!(/[0-9]/.test(right))) {\r\n return left + right;\r\n } else {\r\n return left + \".\" + right;\r\n }\r\n }\r\n\r\n /**\r\n * 处理小数点右边小数部分\r\n * @param tright 右边内容\r\n * @param fright 右边格式\r\n * @returns {JSON} 返回处理结果和整数部分是否需要进位\r\n * @private\r\n */\r\n function _dealWithRight (tright, fright) {\r\n var right = \"\", j = 0, i = 0;\r\n for (var len = fright.length; i < len; i++) {\r\n var ch = fright.charAt(i);\r\n var c = tright.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n right += c;\r\n j++;\r\n break;\r\n case \"#\":\r\n right += c;\r\n j++;\r\n break;\r\n default :\r\n right += ch;\r\n break;\r\n }\r\n }\r\n var rll = tright.substr(j);\r\n var result = {};\r\n if (!isEmpty(rll) && rll.charAt(0) > 4) {\r\n // 有多余字符,需要四舍五入\r\n result.leftPlus = true;\r\n var numReg = right.match(/^[0-9]+/);\r\n if (numReg) {\r\n var num = numReg[0];\r\n var orilen = num.length;\r\n var newnum = parseInt(num) + 1 + \"\";\r\n // 进位到整数部分\r\n if (newnum.length > orilen) {\r\n newnum = newnum.substr(1);\r\n } else {\r\n newnum = BI.leftPad(newnum, orilen, \"0\");\r\n result.leftPlus = false;\r\n }\r\n right = right.replace(/^[0-9]+/, newnum);\r\n }\r\n }\r\n result.num = right;\r\n return result;\r\n }\r\n\r\n /**\r\n * 处理小数点左边整数部分\r\n * @param tleft 左边内容\r\n * @param fleft 左边格式\r\n * @returns {string} 返回处理结果\r\n * @private\r\n */\r\n function _dealWithLeft (tleft, fleft) {\r\n var left = \"\";\r\n var j = tleft.length - 1;\r\n var combo = -1, last = -1;\r\n var i = fleft.length - 1;\r\n for (; i >= 0; i--) {\r\n var ch = fleft.charAt(i);\r\n var c = tleft.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n last = -1;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \"#\":\r\n last = i;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \",\":\r\n if (!isEmpty(c)) {\r\n // 计算一个,分隔区间的长度\r\n var com = fleft.match(/,[#0]+/);\r\n if (com) {\r\n combo = com[0].length - 1;\r\n }\r\n left = \",\" + left;\r\n }\r\n break;\r\n default :\r\n left = ch + left;\r\n break;\r\n }\r\n }\r\n if (last > -1) {\r\n // 处理剩余字符\r\n var tll = tleft.substr(0, j + 1);\r\n left = left.substr(0, last) + tll + left.substr(last);\r\n }\r\n if (combo > 0) {\r\n // 处理,分隔区间\r\n var res = left.match(/[0-9]+,/);\r\n if (res) {\r\n res = res[0];\r\n var newstr = \"\", n = res.length - 1 - combo;\r\n for (; n >= 0; n = n - combo) {\r\n newstr = res.substr(n, combo) + \",\" + newstr;\r\n }\r\n var lres = res.substr(0, n + combo);\r\n if (!isEmpty(lres)) {\r\n newstr = lres + \",\" + newstr;\r\n }\r\n }\r\n left = left.replace(/[0-9]+,/, newstr);\r\n }\r\n return left;\r\n }\r\n\r\n\r\n BI.cjkEncode = function (text) {\r\n // alex:如果非字符串,返回其本身(cjkEncode(234) 返回 \"\"是不对的)\r\n if (typeof text !== \"string\") {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var code = text.charCodeAt(i);\r\n if (code >= 128 || code === 91 || code === 93) {// 91 is \"[\", 93 is \"]\".\r\n newText += \"[\" + code.toString(16) + \"]\";\r\n } else {\r\n newText += text.charAt(i);\r\n }\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n /**\r\n * 将cjkEncode处理过的字符串转化为原始字符串\r\n *\r\n * @static\r\n * @param text 需要做解码的字符串\r\n * @return {String} 解码后的字符串\r\n */\r\n BI.cjkDecode = function (text) {\r\n if (text == null) {\r\n return \"\";\r\n }\r\n // 查找没有 \"[\", 直接返回. kunsnat:数字的时候, 不支持indexOf方法, 也是直接返回.\r\n if (!isNaN(text) || text.indexOf(\"[\") == -1) {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var ch = text.charAt(i);\r\n if (ch == \"[\") {\r\n var rightIdx = text.indexOf(\"]\", i + 1);\r\n if (rightIdx > i + 1) {\r\n var subText = text.substring(i + 1, rightIdx);\r\n // james:主要是考虑[CDATA[]]这样的值的出现\r\n if (subText.length > 0) {\r\n ch = String.fromCharCode(eval(\"0x\" + subText));\r\n }\r\n\r\n i = rightIdx;\r\n }\r\n }\r\n\r\n newText += ch;\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n // replace the html special tags\r\n var SPECIAL_TAGS = {\r\n \"&\": \"&amp;\",\r\n \"\\\"\": \"&quot;\",\r\n \"<\": \"&lt;\",\r\n \">\": \"&gt;\"\r\n };\r\n BI.htmlEncode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|\\\"|<|>\", function (v) {\r\n return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : \"&nbsp;\";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&amp;|&quot;|&lt;|&gt;|&nbsp;\", function (v) {\r\n switch (v) {\r\n case \"&amp;\":\r\n return \"&\";\r\n case \"&quot;\":\r\n return \"\\\"\";\r\n case \"&lt;\":\r\n return \"<\";\r\n case \"&gt;\":\r\n return \">\";\r\n case \"&nbsp;\":\r\n default:\r\n return \" \";\r\n }\r\n });\r\n };\r\n\r\n BI.cjkEncodeDO = function (o) {\r\n if (BI.isPlainObject(o)) {\r\n var result = {};\r\n _.each(o, function (v, k) {\r\n if (!(typeof v === \"string\")) {\r\n v = BI.jsonEncode(v);\r\n }\r\n // wei:bug 43338,如果key是中文,cjkencode后o的长度就加了1,ie9以下版本死循环,所以新建对象result。\r\n k = BI.cjkEncode(k);\r\n result[k] = BI.cjkEncode(v);\r\n });\r\n return result;\r\n }\r\n return o;\r\n };\r\n\r\n BI.jsonEncode = function (o) {\r\n // james:这个Encode是抄的EXT的\r\n var useHasOwn = !!{}.hasOwnProperty;\r\n\r\n // crashes Safari in some instances\r\n // var validRE = /^(\"(\\\\.|[^\"\\\\\\n\\r])*?\"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/;\r\n\r\n var m = {\r\n \"\\b\": \"\\\\b\",\r\n \"\\t\": \"\\\\t\",\r\n \"\\n\": \"\\\\n\",\r\n \"\\f\": \"\\\\f\",\r\n \"\\r\": \"\\\\r\",\r\n \"\\\"\": \"\\\\\\\"\",\r\n \"\\\\\": \"\\\\\\\\\"\r\n };\r\n\r\n var encodeString = function (s) {\r\n if (/[\"\\\\\\x00-\\x1f]/.test(s)) {\r\n return \"\\\"\" + s.replace(/([\\x00-\\x1f\\\\\"])/g, function (a, b) {\r\n var c = m[b];\r\n if (c) {\r\n return c;\r\n }\r\n c = b.charCodeAt();\r\n return \"\\\\u00\" +\r\n Math.floor(c / 16).toString(16) +\r\n (c % 16).toString(16);\r\n }) + \"\\\"\";\r\n }\r\n return \"\\\"\" + s + \"\\\"\";\r\n };\r\n\r\n var encodeArray = function (o) {\r\n var a = [\"[\"], b, i, l = o.length, v;\r\n for (i = 0; i < l; i += 1) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"function\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n a.push(\"]\");\r\n return a.join(\"\");\r\n };\r\n\r\n if (typeof o === \"undefined\" || o === null) {\r\n return \"null\";\r\n } else if (BI.isArray(o)) {\r\n return encodeArray(o);\r\n } else if (o instanceof Date) {\r\n /*\r\n * alex:原来只是把年月日时分秒简单地拼成一个String,无法decode\r\n * 现在这么处理就可以decode了,但是JS.jsonDecode和Java.JSONObject也要跟着改一下\r\n */\r\n return BI.jsonEncode({\r\n __time__: o.getTime()\r\n });\r\n } else if (typeof o === \"string\") {\r\n return encodeString(o);\r\n } else if (typeof o === \"number\") {\r\n return isFinite(o) ? String(o) : \"null\";\r\n } else if (typeof o === \"boolean\") {\r\n return String(o);\r\n } else if (BI.isFunction(o)) {\r\n return String(o);\r\n }\r\n var a = [\"{\"], b, i, v;\r\n for (i in o) {\r\n if (!useHasOwn || o.hasOwnProperty(i)) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(BI.jsonEncode(i), \":\",\r\n v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n }\r\n a.push(\"}\");\r\n return a.join(\"\");\r\n\r\n };\r\n\r\n BI.jsonDecode = function (text) {\r\n\r\n try {\r\n // 注意0啊\r\n // var jo = $.parseJSON(text) || {};\r\n var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);\r\n if (jo == null) {\r\n jo = {};\r\n }\r\n } catch (e) {\r\n /*\r\n * richie:浏览器只支持标准的JSON字符串转换,而jQuery会默认调用浏览器的window.JSON.parse()函数进行解析\r\n * 比如:var str = \"{'a':'b'}\",这种形式的字符串转换为JSON就会抛异常\r\n */\r\n try {\r\n jo = new Function(\"return \" + text)() || {};\r\n } catch (e) {\r\n // do nothing\r\n }\r\n if (jo == null) {\r\n jo = [];\r\n }\r\n }\r\n if (!_hasDateInJson(text)) {\r\n return jo;\r\n }\r\n\r\n function _hasDateInJson (json) {\r\n if (!json || typeof json !== \"string\") {\r\n return false;\r\n }\r\n return json.indexOf(\"__time__\") != -1;\r\n }\r\n\r\n return (function (o) {\r\n if (typeof o === \"string\") {\r\n return o;\r\n }\r\n if (o && o.__time__ != null) {\r\n return new Date(o.__time__);\r\n }\r\n for (var a in o) {\r\n if (o[a] == o || typeof o[a] === \"object\" || _.isFunction(o[a])) {\r\n break;\r\n }\r\n o[a] = arguments.callee(o[a]);\r\n }\r\n\r\n return o;\r\n })(jo);\r\n };\r\n\r\n /**\r\n * 获取编码后的url\r\n * @param urlTemplate url模板\r\n * @param param 参数\r\n * @returns {*|String}\r\n * @example\r\n * BI.getEncodeURL(\"design/{tableName}/{fieldName}\",{tableName: \"A\", fieldName: \"a\"}) // design/A/a\r\n */\r\n BI.getEncodeURL = function (urlTemplate, param) {\r\n return BI.replaceAll(urlTemplate, \"\\\\{(.*?)\\\\}\", function (ori, str) {\r\n return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);\r\n });\r\n };\r\n\r\n BI.encodeURIComponent = function (url) {\r\n BI.specialCharsMap = BI.specialCharsMap || {};\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(BI.specialCharsMap || []).join(\"|\"), function (str) {\r\n switch (str) {\r\n case \"\\\\\":\r\n return BI.specialCharsMap[\"\\\\\\\\\"] || str;\r\n default:\r\n return BI.specialCharsMap[str] || str;\r\n }\r\n });\r\n return _global.encodeURIComponent(url);\r\n };\r\n\r\n BI.decodeURIComponent = function (url) {\r\n var reserveSpecialCharsMap = {};\r\n BI.each(BI.specialCharsMap, function (initialChar, encodeChar) {\r\n reserveSpecialCharsMap[encodeChar] = initialChar === \"\\\\\\\\\" ? \"\\\\\" : initialChar;\r\n });\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(reserveSpecialCharsMap || []).join(\"|\"), function (str) {\r\n return reserveSpecialCharsMap[str] || str;\r\n });\r\n return _global.decodeURIComponent(url);\r\n };\r\n\r\n BI.contentFormat = function (cv, fmt) {\r\n if (isEmpty(cv)) {\r\n // 原值为空,返回空字符\r\n return \"\";\r\n }\r\n var text = cv.toString();\r\n if (isEmpty(fmt)) {\r\n // 格式为空,返回原字符\r\n return text;\r\n }\r\n if (fmt.match(/^T/)) {\r\n // T - 文本格式\r\n return text;\r\n } else if (fmt.match(/^D/)) {\r\n // D - 日期(时间)格式\r\n if (!(cv instanceof Date)) {\r\n if (typeof cv === \"number\") {\r\n // 毫秒数类型\r\n cv = new Date(cv);\r\n } else {\r\n //字符串类型转化为date类型\r\n cv = new Date(Date.parse((\"\" + cv).replace(/-|\\./g, \"/\")));\r\n }\r\n }\r\n if (!isInvalidDate(cv) && !BI.isNull(cv)) {\r\n var needTrim = fmt.match(/^DT/);\r\n text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));\r\n }\r\n } else if (fmt.match(/E/)) {\r\n // 科学计数格式\r\n text = _eFormat(text, fmt);\r\n } else {\r\n // 数字格式\r\n text = _numberFormat(text, fmt);\r\n }\r\n // ¤ - 货币格式\r\n text = text.replace(/¤/g, \"¥\");\r\n return text;\r\n };\r\n\r\n /**\r\n * 将Java提供的日期格式字符串装换为JS识别的日期格式字符串\r\n * @class FR.parseFmt\r\n * @param fmt 日期格式\r\n * @returns {String}\r\n */\r\n BI.parseFmt = function (fmt) {\r\n if (!fmt) {\r\n return \"\";\r\n }\r\n //日期\r\n fmt = String(fmt)\r\n //年\r\n .replace(/y{4,}/g, \"%Y\")//yyyy的时候替换为Y\r\n .replace(/y{2}/g, \"%y\")//yy的时候替换为y\r\n //月\r\n .replace(/M{4,}/g, \"%b\")//MMMM的时候替换为b,八\r\n .replace(/M{3}/g, \"%B\")//MMM的时候替换为M,八月\r\n .replace(/M{2}/g, \"%X\")//MM的时候替换为X,08\r\n .replace(/M{1}/g, \"%x\")//M的时候替换为x,8\r\n .replace(/a{1}/g, \"%p\");\r\n //天\r\n if (new RegExp(\"d{2,}\", \"g\").test(fmt)) {\r\n fmt = fmt.replace(/d{2,}/g, \"%d\");//dd的时候替换为d\r\n } else {\r\n fmt = fmt.replace(/d{1}/g, \"%e\");//d的时候替换为j\r\n }\r\n //时\r\n if (new RegExp(\"h{2,}\", \"g\").test(fmt)) {//12小时制\r\n fmt = fmt.replace(/h{2,}/g, \"%I\");\r\n } else {\r\n fmt = fmt.replace(/h{1}/g, \"%I\");\r\n }\r\n if (new RegExp(\"H{2,}\", \"g\").test(fmt)) {//24小时制\r\n fmt = fmt.replace(/H{2,}/g, \"%H\");\r\n } else {\r\n fmt = fmt.replace(/H{1}/g, \"%H\");\r\n }\r\n fmt = fmt.replace(/m{2,}/g, \"%M\")//分\r\n //秒\r\n .replace(/s{2,}/g, \"%S\");\r\n\r\n return fmt;\r\n };\r\n\r\n /**\r\n * 把字符串按照对应的格式转化成日期对象\r\n *\r\n * @example\r\n * var result = BI.str2Date('2013-12-12', 'yyyy-MM-dd');//Thu Dec 12 2013 00:00:00 GMT+0800\r\n *\r\n * @class BI.str2Date\r\n * @param str 字符串\r\n * @param format 日期格式\r\n * @returns {*}\r\n */\r\n BI.str2Date = function (str, format) {\r\n if (typeof str != \"string\" || typeof format != \"string\") {\r\n return null;\r\n }\r\n var fmt = BI.parseFmt(format);\r\n return BI.parseDateTime(str, fmt);\r\n };\r\n\r\n /**\r\n * 把日期对象按照指定格式转化成字符串\r\n *\r\n * @example\r\n * var date = new Date('Thu Dec 12 2013 00:00:00 GMT+0800');\r\n * var result = BI.date2Str(date, 'yyyy-MM-dd');//2013-12-12\r\n *\r\n * @class BI.date2Str\r\n * @param date 日期\r\n * @param format 日期格式\r\n * @returns {String}\r\n */\r\n BI.date2Str = function (date, format) {\r\n if (!date) {\r\n return \"\";\r\n }\r\n // O(len(format))\r\n var len = format.length, result = \"\";\r\n if (len > 0) {\r\n var flagch = format.charAt(0), start = 0, str = flagch;\r\n for (var i = 1; i < len; i++) {\r\n var ch = format.charAt(i);\r\n if (flagch !== ch) {\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: i - start\r\n }, date);\r\n flagch = ch;\r\n start = i;\r\n str = flagch;\r\n } else {\r\n str += ch;\r\n }\r\n }\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: len - start\r\n }, date);\r\n }\r\n return result;\r\n\r\n function compileJFmt (jfmt, date) {\r\n var str = jfmt.str, len = jfmt.len, ch = jfmt[\"char\"];\r\n switch (ch) {\r\n case \"E\": // 星期\r\n str = BI.Date._DN[date.getDay()];\r\n break;\r\n case \"y\": // 年\r\n if (len <= 3) {\r\n str = (date.getFullYear() + \"\").slice(2, 4);\r\n } else {\r\n str = date.getFullYear();\r\n }\r\n break;\r\n case \"M\": // 月\r\n if (len > 2) {\r\n str = BI.Date._MN[date.getMonth()];\r\n } else if (len < 2) {\r\n str = date.getMonth() + 1;\r\n } else {\r\n str = BI.leftPad(date.getMonth() + 1 + \"\", 2, \"0\");\r\n }\r\n break;\r\n case \"d\": // 日\r\n if (len > 1) {\r\n str = BI.leftPad(date.getDate() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getDate();\r\n }\r\n break;\r\n case \"h\": // 时(12)\r\n var hour = date.getHours() % 12;\r\n if (hour === 0) {\r\n hour = 12;\r\n }\r\n if (len > 1) {\r\n str = BI.leftPad(hour + \"\", 2, \"0\");\r\n } else {\r\n str = hour;\r\n }\r\n break;\r\n case \"H\": // 时(24)\r\n if (len > 1) {\r\n str = BI.leftPad(date.getHours() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getHours();\r\n }\r\n break;\r\n case \"m\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getMinutes() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getMinutes();\r\n }\r\n break;\r\n case \"s\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getSeconds() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getSeconds();\r\n }\r\n break;\r\n case \"a\":\r\n str = date.getHours() < 12 ? \"am\" : \"pm\";\r\n break;\r\n case \"z\":\r\n str = BI.getTimezone(date);\r\n break;\r\n default:\r\n str = jfmt.str;\r\n break;\r\n }\r\n return str;\r\n }\r\n };\r\n\r\n BI.object2Number = function (value) {\r\n if (value == null) {\r\n return 0;\r\n }\r\n if (typeof value === \"number\") {\r\n return value;\r\n }\r\n var str = value + \"\";\r\n if (str.indexOf(\".\") === -1) {\r\n return parseInt(str);\r\n }\r\n return parseFloat(str);\r\n };\r\n\r\n BI.object2Date = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n } else if (typeof obj === \"number\") {\r\n return new Date(obj);\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n\r\n return new Date();\r\n\r\n };\r\n\r\n BI.object2Time = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n if (str.indexOf(\"/\") === -1 && str.indexOf(\":\") !== -1) {\r\n dt = new Date(\"1970/01/01 \" + str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n }\r\n dt = BI.parseDateTime(str, \"HH:mm:ss\");\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n return new Date();\r\n\r\n };\r\n})();\r\n/**\r\n * guy\r\n *\r\n * @class BI.HighlightBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.HighlightBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HighlightBehavior.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.HighlightBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if (item instanceof BI.Single) {\r\n var rule = o.rule(item.getValue(), item);\r\n\r\n function doBe (run) {\r\n if (run === true) {\r\n item.doHighLight && item.doHighLight.apply(item, args);\r\n } else {\r\n item.unHighLight && item.unHighLight.apply(item, args);\r\n }\r\n }\r\n\r\n if (BI.isFunction(rule)) {\r\n rule(doBe);\r\n } else {\r\n doBe(rule);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 标红行为\r\n * @class BI.RedMarkBehavior\r\n * @extends BI.Behavior\r\n */\r\nBI.RedMarkBehavior = BI.inherit(BI.Behavior, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.RedMarkBehavior.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.RedMarkBehavior.superclass._init.apply(this, arguments);\r\n\r\n },\r\n\r\n doBehavior: function (items) {\r\n var args = Array.prototype.slice.call(arguments, 1),\r\n o = this.options;\r\n BI.each(items, function (i, item) {\r\n if(item instanceof BI.Single) {\r\n if (o.rule(item.getValue(), item)) {\r\n item.doRedMark && item.doRedMark.apply(item, args);\r\n } else {\r\n item.doRedMark && item.unRedMark.apply(item, args);\r\n }\r\n } else {\r\n item.doBehavior && item.doBehavior.apply(item, args);\r\n }\r\n });\r\n }\r\n});/**\r\n * guy\r\n * 控制器\r\n * Controller层超类\r\n * @class BI.Controller\r\n * @extends BI.OB\r\n * @abstract\r\n */\r\nBI.Controller = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Controller.superclass._defaultConfig.apply(this, arguments), {\r\n\r\n });\r\n },\r\n _init: function () {\r\n BI.Controller.superclass._init.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n\r\n }\r\n});\r\nBI.Controller.EVENT_CHANGE = \"__EVENT_CHANGE__\";/**\r\n * 广播\r\n *\r\n * Created by GUY on 2015/12/23.\r\n * @class\r\n */\r\nBI.BroadcastController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BroadcastController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.BroadcastController.superclass._init.apply(this, arguments);\r\n this._broadcasts = {};\r\n },\r\n\r\n on: function (name, fn) {\r\n var self = this;\r\n if (!this._broadcasts[name]) {\r\n this._broadcasts[name] = [];\r\n }\r\n this._broadcasts[name].push(fn);\r\n return function () {\r\n self.remove(name, fn);\r\n };\r\n },\r\n\r\n send: function (name) {\r\n var args = [].slice.call(arguments, 1);\r\n BI.each(this._broadcasts[name], function (i, fn) {\r\n fn.apply(null, args);\r\n });\r\n },\r\n\r\n remove: function (name, fn) {\r\n var self = this;\r\n if (fn) {\r\n BI.remove(this._broadcasts[name], function (idx) {\r\n return self._broadcasts[name].indexOf(fn) === idx;\r\n });\r\n this._broadcasts[name].remove(fn);\r\n if (this._broadcasts[name].length === 0) {\r\n delete this._broadcasts[name];\r\n }\r\n } else {\r\n delete this._broadcasts[name];\r\n }\r\n return this;\r\n }\r\n});/**\r\n * 气泡图控制器\r\n * 控制气泡图的显示方向\r\n *\r\n * Created by GUY on 2015/8/21.\r\n * @class\r\n */\r\nBI.BubblesController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblesController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n bubbleHeight: 18\r\n },\r\n\r\n _init: function () {\r\n BI.BubblesController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.bubblesManager = {};\r\n this.storeBubbles = {};\r\n BI.Resizers.add(\"bubbleController\" + BI.uniqueId(), function () {\r\n BI.each(self.bubblesManager, function (name) {\r\n self.remove(name);\r\n });\r\n self.bubblesManager = {};\r\n self.storeBubbles = {};\r\n });\r\n },\r\n\r\n _createBubble: function (direct, text, level, height) {\r\n return BI.createWidget({\r\n type: \"bi.bubble\",\r\n text: text,\r\n level: level,\r\n height: height || 18,\r\n direction: direct\r\n });\r\n },\r\n\r\n _getOffsetLeft: function (name, context, offsetStyle) {\r\n var left = 0;\r\n if (\"center\" === offsetStyle) {\r\n left = context.element.offset().left + (context.element.bounds().width - this.get(name).element.bounds().width) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n if (\"right\" === offsetStyle) {\r\n left = context.element.offset().left + context.element.bounds().width - this.get(name).element.bounds().width;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return left;\r\n }\r\n return context.element.offset().left;\r\n },\r\n\r\n _getOffsetTop: function (name, context, offsetStyle) {\r\n var top = 0;\r\n if (\"center\" === offsetStyle) {\r\n top = context.element.offset().top + (context.element.bounds().height - this.get(name).element.bounds().height) / 2;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n } else if (\"right\" === offsetStyle) {\r\n top = context.element.offset().top + context.element.bounds().height - this.get(name).element.bounds().height;\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return top;\r\n }\r\n return context.element.offset().top;\r\n },\r\n\r\n _getLeftPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getLeftPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getBottomPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getBottomPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getTopPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getTopPosition(context, this.get(name));\r\n position.left = this._getOffsetLeft(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n _getRightPosition: function (name, context, offsetStyle) {\r\n var position = BI.DOM.getRightPosition(context, this.get(name));\r\n position.top = this._getOffsetTop(name, context, offsetStyle);\r\n return position;\r\n },\r\n\r\n /**\r\n *\r\n * @param name\r\n * @param text\r\n * @param context\r\n * @param offsetStyle center, left, right三种类型, 默认left\r\n * @returns {BI.BubblesController}\r\n */\r\n show: function (name, text, context, opt) {\r\n opt || (opt = {});\r\n var container = opt.container || context;\r\n var offsetStyle = opt.offsetStyle || {};\r\n var level = opt.level || \"error\";\r\n var adjustYOffset = opt.adjustYOffset || 0;\r\n var adjustXOffset = opt.adjustXOffset || 0;\r\n if (!this.storeBubbles[name]) {\r\n this.storeBubbles[name] = {};\r\n }\r\n if (!this.storeBubbles[name][\"top\"]) {\r\n this.storeBubbles[name][\"top\"] = this._createBubble(\"top\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"top\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"top\"]);\r\n var position = this._getTopPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isTopSpaceEnough(context, this.get(name), adjustYOffset)) {\r\n if (!this.storeBubbles[name][\"left\"]) {\r\n this.storeBubbles[name][\"left\"] = this._createBubble(\"left\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"left\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"left\"]);\r\n var position = this._getLeftPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left - adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isLeftSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"right\"]) {\r\n this.storeBubbles[name][\"right\"] = this._createBubble(\"right\", text, level, 30);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"right\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"right\"]);\r\n var position = this._getRightPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top - adjustYOffset});\r\n this.get(name).invisible();\r\n if (!BI.DOM.isRightSpaceEnough(context, this.get(name), adjustXOffset)) {\r\n if (!this.storeBubbles[name][\"bottom\"]) {\r\n this.storeBubbles[name][\"bottom\"] = this._createBubble(\"bottom\", text, level);\r\n }\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: container,\r\n items: [{\r\n el: this.storeBubbles[name][\"bottom\"]\r\n }]\r\n });\r\n this.set(name, this.storeBubbles[name][\"bottom\"]);\r\n var position = this._getBottomPosition(name, context, offsetStyle);\r\n this.get(name).element.css({left: position.left + adjustXOffset, top: position.top + adjustYOffset});\r\n this.get(name).invisible();\r\n }\r\n }\r\n }\r\n this.get(name).setText(text);\r\n this.get(name).visible();\r\n return this;\r\n },\r\n\r\n hide: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.bubblesManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.bubblesManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.bubblesManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n BI.each(this.storeBubbles[name], function (dir, bubble) {\r\n bubble.destroy();\r\n });\r\n delete this.storeBubbles[name];\r\n delete this.bubblesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 弹出层面板控制器, z-index在10w层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.LayerController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LayerController.superclass._defaultConfig.apply(this, arguments), {\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LayerController.superclass._init.apply(this, arguments);\r\n this.layerManager = {};\r\n this.layouts = {};\r\n this.zindex = BI.zIndex_layer;\r\n BI.Resizers.add(\"layerController\" + BI.uniqueId(), BI.bind(this._resize, this));\r\n },\r\n\r\n _resize: function () {\r\n BI.each(this.layouts, function (i, layer) {\r\n if (layer.element.is(\":visible\")) {\r\n layer.element.trigger(\"__resize__\");\r\n }\r\n });\r\n },\r\n\r\n make: function (name, container, op, context) {\r\n if (BI.isWidget(container)) {\r\n op = op || {};\r\n op.container = container;\r\n } else {\r\n context = op;\r\n op = container;\r\n }\r\n return this.create(name, null, op, context);\r\n },\r\n\r\n create: function (name, from, op, context) {\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n op || (op = {});\r\n var offset = op.offset || {};\r\n var w = from;\r\n if (BI.isWidget(from)) {\r\n w = from.element;\r\n }\r\n if (BI.isNotEmptyString(w)) {\r\n w = BI.Widget._renderEngine.createElement(w);\r\n }\r\n if (this.has(name)) {\r\n return this.get(name);\r\n }\r\n var widget = BI.createWidget((op.render || {}), BI.extend({\r\n type: \"bi.layout\"\r\n }, op), context);\r\n var layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n invisible: true,\r\n items: [{\r\n el: widget,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, context);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: op.container || this.options.render,\r\n items: [{\r\n el: layout,\r\n left: offset.left || 0,\r\n right: offset.right || 0,\r\n top: offset.top || 0,\r\n bottom: offset.bottom || 0\r\n }]\r\n });\r\n if (w) {\r\n layout.element.addClass(\"bi-popup-view\");\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n layout.element.on(\"__resize__\", function () {\r\n w.is(\":visible\") &&\r\n layout.element.css({\r\n left: w.offset().left + (offset.left || 0),\r\n top: w.offset().top + (offset.top || 0),\r\n width: offset.width || (w.outerWidth() - (offset.left || 0) - (offset.right || 0)) || \"\",\r\n height: offset.height || (w.outerHeight() - (offset.top || 0) - (offset.bottom || 0)) || \"\"\r\n });\r\n });\r\n }\r\n this.add(name, widget, layout);\r\n return widget;\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).invisible();\r\n this._getLayout(name).element.hide(0, callback);\r\n return this;\r\n },\r\n\r\n show: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this._getLayout(name).visible();\r\n this._getLayout(name).element.css(\"z-index\", this.zindex++).show(0, callback).trigger(\"__resize__\");\r\n return this;\r\n },\r\n\r\n isVisible: function (name) {\r\n return this.has(name) && this._getLayout(name).isVisible();\r\n },\r\n\r\n add: function (name, layer, layout) {\r\n if (this.has(name)) {\r\n throw new Error(\"name is already exist\");\r\n }\r\n layout.setVisible(false);\r\n this.layerManager[name] = layer;\r\n this.layouts[name] = layout;\r\n layout.element.css(\"z-index\", this.zindex++);\r\n return this;\r\n },\r\n\r\n _getLayout: function (name) {\r\n return this.layouts[name];\r\n },\r\n\r\n get: function (name) {\r\n return this.layerManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.layerManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.layerManager[name].destroy();\r\n this.layouts[name].destroy();\r\n delete this.layerManager[name];\r\n delete this.layouts[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(BI.keys(this.layerManager), function (index, name) {\r\n self.layerManager[name].destroy();\r\n self.layouts[name].destroy();\r\n });\r\n this.layerManager = {};\r\n this.layouts = {};\r\n return this;\r\n }\r\n});/**\r\n * 遮罩面板, z-index在1亿层级\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.MaskersController = BI.inherit(BI.LayerController, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MaskersController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.MaskersController.superclass._init.apply(this, arguments);\r\n this.zindex = BI.zIndex_masker;\r\n }\r\n});/**\r\n * guy\r\n * popover弹出层控制器, z-index在100w层级\r\n * @class BI.popoverController\r\n * @extends BI.Controller\r\n */\r\nBI.PopoverController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopoverController.superclass._defaultConfig.apply(this, arguments), {\r\n modal: true, // 模态窗口\r\n render: \"body\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopoverController.superclass._init.apply(this, arguments);\r\n this.modal = this.options.modal;\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindex = BI.zIndex_popover;\r\n this.zindexMap = {};\r\n },\r\n\r\n _check: function (name) {\r\n return BI.isNotNull(this.floatManager[name]);\r\n },\r\n\r\n create: function (name, options, context) {\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n var popover = BI.createWidget(options || {}, {\r\n type: \"bi.popover\"\r\n }, context);\r\n this.add(name, popover, options, context);\r\n return this;\r\n },\r\n\r\n add: function (name, popover, options, context) {\r\n var self = this;\r\n options || (options = {});\r\n if (this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n cls: \"bi-popup-view\",\r\n items: [{\r\n el: (this.floatLayer[name] = BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [popover]\r\n }, context)),\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.floatManager[name] = popover;\r\n (function (key) {\r\n popover.on(BI.Popover.EVENT_CLOSE, function () {\r\n self.close(key);\r\n });\r\n })(name);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: options.container || this.options.render,\r\n items: [{\r\n el: this.floatContainer[name],\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n return this;\r\n },\r\n\r\n open: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (!this.floatOpened[name]) {\r\n this.floatOpened[name] = true;\r\n var container = this.floatContainer[name];\r\n container.element.css(\"zIndex\", this.zindex++);\r\n this.modal && container.element.__hasZIndexMask__(this.zindexMap[name]) && container.element.__releaseZIndexMask__(this.zindexMap[name]);\r\n this.zindexMap[name] = this.zindex;\r\n this.modal && container.element.__buildZIndexMask__(this.zindex++);\r\n this.get(name).setZindex(this.zindex++);\r\n this.floatContainer[name].visible();\r\n var popover = this.get(name);\r\n popover.show && popover.show();\r\n var W = BI.Widget._renderEngine.createElement(this.options.render).width(), H = BI.Widget._renderEngine.createElement(this.options.render).height();\r\n var w = popover.element.width(), h = popover.element.height();\r\n var left = (W - w) / 2, top = (H - h) / 2;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n popover.element.css({\r\n left: left + \"px\",\r\n top: top + \"px\"\r\n });\r\n }\r\n return this;\r\n },\r\n\r\n close: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n if (this.floatOpened[name]) {\r\n delete this.floatOpened[name];\r\n this.floatContainer[name].invisible();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n }\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.floatManager[name];\r\n },\r\n\r\n remove: function (name) {\r\n if (!this._check(name)) {\r\n return this;\r\n }\r\n this.floatContainer[name].destroy();\r\n this.modal && this.floatContainer[name].element.__releaseZIndexMask__(this.zindexMap[name]);\r\n delete this.floatManager[name];\r\n delete this.floatLayer[name];\r\n delete this.zindexMap[name];\r\n delete this.floatContainer[name];\r\n delete this.floatOpened[name];\r\n return this;\r\n },\r\n\r\n removeAll: function () {\r\n var self = this;\r\n BI.each(this.floatContainer, function (name, container) {\r\n container.destroy();\r\n self.modal && self.floatContainer[name].element.__releaseZIndexMask__(self.zindexMap[name]);\r\n });\r\n this.floatManager = {};\r\n this.floatLayer = {};\r\n this.floatContainer = {};\r\n this.floatOpened = {};\r\n this.zindexMap = {};\r\n return this;\r\n }\r\n});/**\r\n * window.resize 控制器\r\n *\r\n * Created by GUY on 2015/6/24.\r\n * @class\r\n */\r\nBI.ResizeController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ResizeController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ResizeController.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.resizerManger = {};\r\n var fn = BI.debounce(function (ev) {\r\n // if (BI.isWindow(ev.target)) {\r\n self._resize(ev);\r\n // }\r\n }, 30);\r\n BI.Widget._renderEngine.createElement(_global).resize(fn);\r\n },\r\n\r\n _resize: function (ev) {\r\n BI.each(this.resizerManger, function (key, resizer) {\r\n if (resizer instanceof BI.$) {\r\n if (resizer.is(\":visible\")) {\r\n resizer.trigger(\"__resize__\");\r\n }\r\n return;\r\n }\r\n if (resizer instanceof BI.Layout) {\r\n resizer.resize();\r\n return;\r\n }\r\n if (BI.isFunction(resizer)) {\r\n resizer(ev);\r\n return;\r\n }\r\n });\r\n },\r\n\r\n add: function (name, resizer) {\r\n var self = this;\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.resizerManger[name] = resizer;\r\n return function () {\r\n self.remove(name);\r\n };\r\n },\r\n\r\n get: function (name) {\r\n return this.resizerManger[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.resizerManger[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.resizerManger[name];\r\n return this;\r\n }\r\n});/**\r\n * tooltip控制器\r\n * 控制tooltip的显示, 且页面中只有一个tooltip显示\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.TooltipsController\r\n * @extends BI.Controller\r\n */\r\nBI.TooltipsController = BI.inherit(BI.Controller, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TooltipsController.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _const: {\r\n height: 18\r\n },\r\n\r\n _init: function () {\r\n BI.TooltipsController.superclass._init.apply(this, arguments);\r\n this.tooltipsManager = {};\r\n this.showingTips = {};// 存储正在显示的tooltip\r\n },\r\n\r\n _createTooltip: function (text, level) {\r\n return BI.createWidget({\r\n type: \"bi.tooltip\",\r\n text: text,\r\n level: level,\r\n stopEvent: true\r\n });\r\n },\r\n\r\n hide: function (name, callback) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n delete this.showingTips[name];\r\n this.get(name).element.hide(0, callback);\r\n this.get(name).invisible();\r\n return this;\r\n },\r\n\r\n create: function (name, text, level, context) {\r\n if (!this.has(name)) {\r\n var tooltip = this._createTooltip(text, level);\r\n this.add(name, tooltip);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context || \"body\",\r\n items: [{\r\n el: tooltip\r\n }]\r\n });\r\n tooltip.invisible();\r\n }\r\n return this.get(name);\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n show: function (e, name, text, level, context, opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n BI.each(this.showingTips, function (i, tip) {\r\n self.hide(i);\r\n });\r\n this.showingTips = {};\r\n if (!this.has(name)) {\r\n this.create(name, text, level, opt.container || \"body\");\r\n }\r\n if (!opt.belowMouse) {\r\n var offset = context.element.offset();\r\n var bounds = context.element.bounds();\r\n if (bounds.height === 0 || bounds.width === 0) {\r\n return;\r\n }\r\n var top = offset.top + bounds.height + 5;\r\n }\r\n var tooltip = this.get(name);\r\n tooltip.setText(text);\r\n tooltip.element.css({\r\n left: \"0px\",\r\n top: \"0px\"\r\n });\r\n tooltip.visible();\r\n tooltip.element.height(tooltip.element[0].scrollHeight);\r\n this.showingTips[name] = true;\r\n // scale影响要计算在内\r\n // var scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;\r\n // var x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;\r\n var x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15;\r\n if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement(\"body\").outerWidth()) {\r\n x -= tooltip.element.outerWidth() + 15;\r\n }\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").outerHeight();\r\n if (y + tooltip.element.outerHeight() > bodyHeight || top + tooltip.element.outerHeight() > bodyHeight) {\r\n y -= tooltip.element.outerHeight() + 15;\r\n !opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5));\r\n } else {\r\n !opt.belowMouse && (y = Math.max(y, top));\r\n }\r\n tooltip.element.css({\r\n left: x < 0 ? 0 : x + \"px\",\r\n top: y < 0 ? 0 : y + \"px\"\r\n });\r\n tooltip.element.hover(function () {\r\n self.remove(name);\r\n context.element.trigger(\"mouseleave.title\" + context.getName());\r\n });\r\n return this;\r\n },\r\n\r\n add: function (name, bubble) {\r\n if (this.has(name)) {\r\n return this;\r\n }\r\n this.set(name, bubble);\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.tooltipsManager[name];\r\n },\r\n\r\n set: function (name, bubble) {\r\n this.tooltipsManager[name] = bubble;\r\n },\r\n\r\n has: function (name) {\r\n return this.tooltipsManager[name] != null;\r\n },\r\n\r\n remove: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.tooltipsManager[name].destroy();\r\n delete this.tooltipsManager[name];\r\n return this;\r\n }\r\n});/**\r\n * 事件集合\r\n * @class BI.Events\r\n */\r\n_.extend(BI, {\r\n Events: {\r\n\r\n /**\r\n * @static\r\n * @property keydown事件\r\n */\r\n KEYDOWN: \"_KEYDOWN\",\r\n\r\n /**\r\n * @static\r\n * @property 回撤事件\r\n */\r\n BACKSPACE: \"_BACKSPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 空格事件\r\n */\r\n SPACE: \"_SPACE\",\r\n\r\n /**\r\n * @static\r\n * @property 回车事件\r\n */\r\n ENTER: \"_ENTER\",\r\n\r\n /**\r\n * @static\r\n * @property 确定事件\r\n */\r\n CONFIRM: \"_CONFIRM\",\r\n\r\n /**\r\n * @static\r\n * @property 错误事件\r\n */\r\n ERROR: \"_ERROR\",\r\n\r\n /**\r\n * @static\r\n * @property 暂停事件\r\n */\r\n PAUSE: \"_PAUSE\",\r\n\r\n /**\r\n * @static\r\n * @property destroy事件\r\n */\r\n DESTROY: \"_DESTROY\",\r\n\r\n /**\r\n * @static\r\n * @property 挂载事件\r\n */\r\n MOUNT: \"_MOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 取消挂载事件\r\n */\r\n UNMOUNT: \"_UNMOUNT\",\r\n\r\n /**\r\n * @static\r\n * @property 清除选择\r\n */\r\n CLEAR: \"_CLEAR\",\r\n\r\n /**\r\n * @static\r\n * @property 添加数据\r\n */\r\n ADD: \"_ADD\",\r\n\r\n /**\r\n * @static\r\n * @property 正在编辑状态事件\r\n */\r\n EDITING: \"_EDITING\",\r\n\r\n /**\r\n * @static\r\n * @property 空状态事件\r\n */\r\n EMPTY: \"_EMPTY\",\r\n\r\n /**\r\n * @static\r\n * @property 显示隐藏事件\r\n */\r\n VIEW: \"_VIEW\",\r\n\r\n /**\r\n * @static\r\n * @property 窗体改变大小\r\n */\r\n RESIZE: \"_RESIZE\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑前事件\r\n */\r\n BEFOREEDIT: \"_BEFOREEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 编辑后事件\r\n */\r\n AFTEREDIT: \"_AFTEREDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 开始编辑事件\r\n */\r\n STARTEDIT: \"_STARTEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 停止编辑事件\r\n */\r\n STOPEDIT: \"_STOPEDIT\",\r\n\r\n /**\r\n * @static\r\n * @property 值改变事件\r\n */\r\n CHANGE: \"_CHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 下拉弹出菜单事件\r\n */\r\n EXPAND: \"_EXPAND\",\r\n\r\n /**\r\n * @static\r\n * @property 关闭下拉菜单事件\r\n */\r\n COLLAPSE: \"_COLLAPSE\",\r\n\r\n /**\r\n * @static\r\n * @property 回调事件\r\n */\r\n CALLBACK: \"_CALLBACK\",\r\n\r\n /**\r\n * @static\r\n * @property 点击事件\r\n */\r\n CLICK: \"_CLICK\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变事件,一般是用在复选按钮和单选按钮\r\n */\r\n STATECHANGE: \"_STATECHANGE\",\r\n\r\n /**\r\n * @static\r\n * @property 状态改变前事件\r\n */\r\n BEFORESTATECHANGE: \"_BEFORESTATECHANGE\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 初始化事件\r\n */\r\n INIT: \"_INIT\",\r\n\r\n /**\r\n * @static\r\n * @property 初始化后事件\r\n */\r\n AFTERINIT: \"_AFTERINIT\",\r\n\r\n /**\r\n * @static\r\n * @property 滚动条滚动事件\r\n */\r\n SCROLL: \"_SCROLL\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 开始加载事件\r\n */\r\n STARTLOAD: \"_STARTLOAD\",\r\n\r\n /**\r\n * @static\r\n * @property 加载后事件\r\n */\r\n AFTERLOAD: \"_AFTERLOAD\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property 提交前事件\r\n */\r\n BS: \"beforesubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交后事件\r\n */\r\n AS: \"aftersubmit\",\r\n\r\n /**\r\n * @static\r\n * @property 提交完成事件\r\n */\r\n SC: \"submitcomplete\",\r\n\r\n /**\r\n * @static\r\n * @property 提交失败事件\r\n */\r\n SF: \"submitfailure\",\r\n\r\n /**\r\n * @static\r\n * @property 提交成功事件\r\n */\r\n SS: \"submitsuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交前事件\r\n */\r\n BVW: \"beforeverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验提交后事件\r\n */\r\n AVW: \"afterverifywrite\",\r\n\r\n /**\r\n * @static\r\n * @property 校验后事件\r\n */\r\n AV: \"afterverify\",\r\n\r\n /**\r\n * @static\r\n * @property 填报前事件\r\n */\r\n BW: \"beforewrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报后事件\r\n */\r\n AW: \"afterwrite\",\r\n\r\n /**\r\n * @static\r\n * @property 填报成功事件\r\n */\r\n WS: \"writesuccess\",\r\n\r\n /**\r\n * @static\r\n * @property 填报失败事件\r\n */\r\n WF: \"writefailure\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行前事件\r\n */\r\n BA: \"beforeappend\",\r\n\r\n /**\r\n * @static\r\n * @property 添加行后事件\r\n */\r\n AA: \"afterappend\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行前事件\r\n */\r\n BD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 删除行后事件\r\n */\r\n AD: \"beforedelete\",\r\n\r\n /**\r\n * @static\r\n * @property 未提交离开事件\r\n */\r\n UC: \"unloadcheck\",\r\n\r\n\r\n /**\r\n * @static\r\n * @property PDF导出前事件\r\n */\r\n BTOPDF: \"beforetopdf\",\r\n\r\n /**\r\n * @static\r\n * @property PDF导出后事件\r\n */\r\n ATOPDF: \"aftertopdf\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出前事件\r\n */\r\n BTOEXCEL: \"beforetoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n ATOEXCEL: \"aftertoexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出前事件\r\n */\r\n BTOWORD: \"beforetoword\",\r\n\r\n /**\r\n * @static\r\n * @property Word导出后事件\r\n */\r\n ATOWORD: \"aftertoword\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出前事件\r\n */\r\n BTOIMAGE: \"beforetoimage\",\r\n\r\n /**\r\n * @static\r\n * @property 图片导出后事件\r\n */\r\n ATOIMAGE: \"aftertoimage\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出前事件\r\n */\r\n BTOHTML: \"beforetohtml\",\r\n\r\n /**\r\n * @static\r\n * @property HTML导出后事件\r\n */\r\n ATOHTML: \"aftertohtml\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导入前事件\r\n */\r\n BIMEXCEL: \"beforeimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property Excel导出后事件\r\n */\r\n AIMEXCEL: \"afterimportexcel\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印前事件\r\n */\r\n BPDFPRINT: \"beforepdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property PDF打印后事件\r\n */\r\n APDFPRINT: \"afterpdfprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印前事件\r\n */\r\n BFLASHPRINT: \"beforeflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Flash打印后事件\r\n */\r\n AFLASHPRINT: \"afterflashprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印前事件\r\n */\r\n BAPPLETPRINT: \"beforeappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property Applet打印后事件\r\n */\r\n AAPPLETPRINT: \"afterappletprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印前事件\r\n */\r\n BSEVERPRINT: \"beforeserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 服务器打印后事件\r\n */\r\n ASERVERPRINT: \"afterserverprint\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送前事件\r\n */\r\n BEMAIL: \"beforeemail\",\r\n\r\n /**\r\n * @static\r\n * @property 邮件发送后事件\r\n */\r\n AEMAIL: \"afteremail\"\r\n }\r\n});/**\r\n * 对数组对象的扩展\r\n * @class Array\r\n */\r\n_.extend(BI, {\r\n\r\n pushArray: function (sArray, array) {\r\n for (var i = 0; i < array.length; i++) {\r\n sArray.push(array[i]);\r\n }\r\n },\r\n pushDistinct: function (sArray, obj) {\r\n if (!BI.contains(sArray, obj)) {\r\n sArray.push(obj);\r\n }\r\n },\r\n pushDistinctArray: function (sArray, array) {\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n BI.pushDistinct(sArray, array[i]);\r\n }\r\n }\r\n});\r\nBI.prepares.push(function () {\r\n BI.Date = BI.Date || {};\r\n // 牵扯到国际化这些常量在页面加载后再生效\r\n // full day names\r\n BI.Date._DN = [BI.i18nText(\"BI-Basic_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Monday\"),\r\n BI.i18nText(\"BI-Basic_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Friday\"),\r\n BI.i18nText(\"BI-Basic_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Sunday\")];\r\n\r\n // short day names\r\n BI.Date._SDN = [BI.i18nText(\"BI-Basic_Simple_Sunday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Monday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Tuesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Wednesday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Thursday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Friday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Saturday\"),\r\n BI.i18nText(\"BI-Basic_Simple_Sunday\")];\r\n\r\n // Monday first, etc.\r\n BI.Date._FD = 1;\r\n\r\n // full month namesdat\r\n BI.Date._MN = [\r\n BI.i18nText(\"BI-Basic_January\"),\r\n BI.i18nText(\"BI-Basic_February\"),\r\n BI.i18nText(\"BI-Basic_March\"),\r\n BI.i18nText(\"BI-Basic_April\"),\r\n BI.i18nText(\"BI-Basic_May\"),\r\n BI.i18nText(\"BI-Basic_June\"),\r\n BI.i18nText(\"BI-Basic_July\"),\r\n BI.i18nText(\"BI-Basic_August\"),\r\n BI.i18nText(\"BI-Basic_September\"),\r\n BI.i18nText(\"BI-Basic_October\"),\r\n BI.i18nText(\"BI-Basic_November\"),\r\n BI.i18nText(\"BI-Basic_December\")];\r\n\r\n // short month names\r\n BI.Date._SMN = [0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n 5,\r\n 6,\r\n 7,\r\n 8,\r\n 9,\r\n 10,\r\n 11];\r\n\r\n BI.Date._QN = [\"\", BI.i18nText(\"BI-Quarter_1\"),\r\n BI.i18nText(\"BI-Quarter_2\"),\r\n BI.i18nText(\"BI-Quarter_3\"),\r\n BI.i18nText(\"BI-Quarter_4\")];\r\n\r\n /** Adds the number of days array to the Date object. */\r\n BI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n // 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以\r\n BI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];\r\n});/** Constants used for time computations */\r\nBI.Date = BI.Date || {};\r\nBI.Date.SECOND = 1000;\r\nBI.Date.MINUTE = 60 * BI.Date.SECOND;\r\nBI.Date.HOUR = 60 * BI.Date.MINUTE;\r\nBI.Date.DAY = 24 * BI.Date.HOUR;\r\nBI.Date.WEEK = 7 * BI.Date.DAY;\r\n\r\n_.extend(BI, {\r\n /**\r\n * 获取时区\r\n * @returns {String}\r\n */\r\n getTimezone: function (date) {\r\n return date.toString().replace(/^.* (?:\\((.*)\\)|([A-Z]{1,4})(?:[\\-+][0-9]{4})?(?: -?\\d+)?)$/, \"$1$2\").replace(/[^A-Z]/g, \"\");\r\n },\r\n\r\n /** Returns the number of days in the current month */\r\n getMonthDays: function (date, month) {\r\n var year = date.getFullYear();\r\n if (typeof month === \"undefined\") {\r\n month = date.getMonth();\r\n }\r\n if (((0 == (year % 4)) && ((0 != (year % 100)) || (0 == (year % 400)))) && month == 1) {\r\n return 29;\r\n }\r\n return BI.Date._MD[month];\r\n\r\n },\r\n\r\n /**\r\n * 获取每月的最后一天\r\n * @returns {Date}\r\n */\r\n getLastDateOfMonth: function (date) {\r\n return BI.getDate(date.getFullYear(), date.getMonth(), BI.getMonthDays(date));\r\n },\r\n\r\n /** Returns the number of day in the year. */\r\n getDayOfYear: function (date) {\r\n var now = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var then = BI.getDate(date.getFullYear(), 0, 0, 0, 0, 0);\r\n var time = now - then;\r\n return Math.floor(time / BI.Date.DAY);\r\n },\r\n\r\n /** Returns the number of the week in year, as defined in ISO 8601. */\r\n getWeekNumber: function (date) {\r\n var d = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var week = d.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n var middleDay = (startOfWeek + 3) % 7;\r\n middleDay = middleDay || 7;\r\n // 偏移到周周首之前需要多少天\r\n var offsetWeekStartCount = week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek);\r\n var offsetWeekMiddleCount = middleDay < startOfWeek ? (7 + middleDay - startOfWeek) : (middleDay - startOfWeek);\r\n d.setDate(d.getDate() - offsetWeekStartCount + offsetWeekMiddleCount);\r\n var ms = d.valueOf();\r\n d.setMonth(0);\r\n d.setDate(1);\r\n return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;\r\n },\r\n\r\n getQuarter: function (date) {\r\n return Math.floor(date.getMonth() / 3) + 1;\r\n },\r\n\r\n // 离当前时间多少天的时间\r\n getOffsetDate: function (date, offset) {\r\n return BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()) + offset * 864e5);\r\n },\r\n\r\n getOffsetQuarter: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + BI.parseInt(n) * 3, 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n) * 3);\r\n return dt;\r\n },\r\n\r\n // 得到本季度的起始月份\r\n getQuarterStartMonth: function (date) {\r\n var quarterStartMonth = 0;\r\n var nowMonth = date.getMonth();\r\n if (nowMonth < 3) {\r\n quarterStartMonth = 0;\r\n }\r\n if (2 < nowMonth && nowMonth < 6) {\r\n quarterStartMonth = 3;\r\n }\r\n if (5 < nowMonth && nowMonth < 9) {\r\n quarterStartMonth = 6;\r\n }\r\n if (nowMonth > 8) {\r\n quarterStartMonth = 9;\r\n }\r\n return quarterStartMonth;\r\n },\r\n // 获得本季度的起始日期\r\n getQuarterStartDate: function (date) {\r\n return BI.getDate(date.getFullYear(), BI.getQuarterStartMonth(date), 1);\r\n },\r\n // 得到本季度的结束日期\r\n getQuarterEndDate: function (date) {\r\n var quarterEndMonth = BI.getQuarterStartMonth(date) + 2;\r\n return BI.getDate(date.getFullYear(), quarterEndMonth, BI.getMonthDays(date, quarterEndMonth));\r\n },\r\n\r\n // 指定日期n个月之前或之后的日期\r\n getOffsetMonth: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + parseInt(n), 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n));\r\n return dt;\r\n },\r\n\r\n // 获得本周的起始日期\r\n getWeekStartDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)]);\r\n },\r\n // 得到本周的结束日期\r\n getWeekEndDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6);\r\n },\r\n\r\n // 格式化打印日期\r\n print: function (date, str) {\r\n var m = date.getMonth();\r\n var d = date.getDate();\r\n var y = date.getFullYear();\r\n var yWith4number = y + \"\";\r\n while (yWith4number.length < 4) {\r\n yWith4number = \"0\" + yWith4number;\r\n }\r\n var wn = BI.getWeekNumber(date);\r\n var qr = BI.getQuarter(date);\r\n var w = date.getDay();\r\n var s = {};\r\n var hr = date.getHours();\r\n var pm = (hr >= 12);\r\n var ir = (pm) ? (hr - 12) : hr;\r\n var dy = BI.getDayOfYear(date);\r\n if (ir == 0) {\r\n ir = 12;\r\n }\r\n var min = date.getMinutes();\r\n var sec = date.getSeconds();\r\n s[\"%a\"] = BI.Date._SDN[w]; // abbreviated weekday name [FIXME: I18N]\r\n s[\"%A\"] = BI.Date._DN[w]; // full weekday name\r\n s[\"%b\"] = BI.Date._SMN[m]; // abbreviated month name [FIXME: I18N]\r\n s[\"%B\"] = BI.Date._MN[m]; // full month name\r\n // FIXME: %c : preferred date and time representation for the current locale\r\n s[\"%C\"] = 1 + Math.floor(y / 100); // the century number\r\n s[\"%d\"] = (d < 10) ? (\"0\" + d) : d; // the day of the month (range 01 to 31)\r\n s[\"%e\"] = d; // the day of the month (range 1 to 31)\r\n // FIXME: %D : american date style: %m/%d/%y\r\n // FIXME: %E, %F, %G, %g, %h (man strftime)\r\n s[\"%H\"] = (hr < 10) ? (\"0\" + hr) : hr; // hour, range 00 to 23 (24h format)\r\n s[\"%I\"] = (ir < 10) ? (\"0\" + ir) : ir; // hour, range 01 to 12 (12h format)\r\n s[\"%j\"] = (dy < 100) ? ((dy < 10) ? (\"00\" + dy) : (\"0\" + dy)) : dy; // day of the year (range 001 to 366)\r\n s[\"%k\"] = hr + \"\";\t\t// hour, range 0 to 23 (24h format)\r\n s[\"%l\"] = ir + \"\";\t\t// hour, range 1 to 12 (12h format)\r\n s[\"%X\"] = (m < 9) ? (\"0\" + (1 + m)) : (1 + m); // month, range 01 to 12\r\n s[\"%x\"] = m + 1; // month, range 1 to 12\r\n s[\"%M\"] = (min < 10) ? (\"0\" + min) : min; // minute, range 00 to 59\r\n s[\"%n\"] = \"\\n\";\t\t// a newline character\r\n s[\"%p\"] = pm ? \"PM\" : \"AM\";\r\n s[\"%P\"] = pm ? \"pm\" : \"am\";\r\n // FIXME: %r : the time in am/pm notation %I:%M:%S %p\r\n // FIXME: %R : the time in 24-hour notation %H:%M\r\n s[\"%s\"] = Math.floor(date.getTime() / 1000);\r\n s[\"%S\"] = (sec < 10) ? (\"0\" + sec) : sec; // seconds, range 00 to 59\r\n s[\"%t\"] = \"\\t\";\t\t// a tab character\r\n // FIXME: %T : the time in 24-hour notation (%H:%M:%S)\r\n s[\"%U\"] = s[\"%W\"] = s[\"%V\"] = (wn < 10) ? (\"0\" + wn) : wn;\r\n s[\"%u\"] = w + 1;\t// the day of the week (range 1 to 7, 1 = MON)\r\n s[\"%w\"] = w;\t\t// the day of the week (range 0 to 6, 0 = SUN)\r\n // FIXME: %x : preferred date representation for the current locale without the time\r\n // FIXME: %X : preferred time representation for the current locale without the date\r\n s[\"%y\"] = yWith4number.substr(2, 2); // year without the century (range 00 to 99)\r\n s[\"%Y\"] = yWith4number;\t\t// year with the century\r\n s[\"%%\"] = \"%\";\t\t// a literal '%' character\r\n s[\"%Q\"] = qr;\r\n\r\n var re = /%./g;\r\n BI.isKhtml = BI.isKhtml || function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n };\r\n\r\n // 包含年周的格式化,ISO8601标准周的计数会影响年\r\n if ((str.indexOf(\"%Y\") !== -1 || str.indexOf(\"%y\") !== -1) && (str.indexOf(\"%W\") !== -1 || str.indexOf(\"%U\") !== -1 || str.indexOf(\"%V\") !== -1)) {\r\n switch (wn) {\r\n // 如果周数是1,但是当前却在12月,表示此周数为下一年的\r\n case 1:\r\n if (m === 11) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) + 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) + 1;\r\n }\r\n break;\r\n // 如果周数是53,但是当前却在1月,表示此周数为上一年的\r\n case 53:\r\n if (m === 0) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) - 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) - 1;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (!BI.isKhtml()) {\r\n return str.replace(re, function (par) {\r\n return s[par] || par;\r\n });\r\n }\r\n var a = str.match(re);\r\n for (var i = 0; i < a.length; i++) {\r\n var tmp = s[a[i]];\r\n if (tmp) {\r\n re = new RegExp(a[i], \"g\");\r\n str = str.replace(re, tmp);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n});\r\n/**\r\n * 基本的函数\r\n * Created by GUY on 2015/6/24.\r\n */\r\nBI.Func = {};\r\n_.extend(BI.Func, {\r\n /**\r\n * 创建唯一的名字\r\n * @param array\r\n * @param name\r\n * @returns {*}\r\n */\r\n createDistinctName: function (array, name) {\r\n var src = name, idx = 1;\r\n name = name || \"\";\r\n while (true) {\r\n if (BI.every(array, function (i, item) {\r\n return BI.isKey(item) ? item !== name : item.name !== name;\r\n })) {\r\n break;\r\n }\r\n name = src + (idx++);\r\n }\r\n return name;\r\n },\r\n\r\n /**\r\n * 获取字符宽度\r\n * @param str\r\n * @return {number}\r\n */\r\n getGBWidth: function (str) {\r\n str = str + \"\";\r\n str = str.replace(/[^\\x00-\\xff]/g, \"xx\");\r\n return Math.ceil(str.length / 2);\r\n },\r\n\r\n /**\r\n * 获取搜索结果\r\n * @param items\r\n * @param keyword\r\n * @param param 搜索哪个属性\r\n */\r\n getSearchResult: function (items, keyword, param) {\r\n var isArray = BI.isArray(items);\r\n items = isArray ? BI.flatten(items) : items;\r\n param || (param = \"text\");\r\n if (!BI.isKey(keyword)) {\r\n return {\r\n find: BI.deepClone(items),\r\n match: isArray ? [] : {}\r\n };\r\n }\r\n var t, text, py;\r\n keyword = BI.toUpperCase(keyword);\r\n var matched = isArray ? [] : {}, find = isArray ? [] : {};\r\n BI.each(items, function (i, item) {\r\n // 兼容item为null的处理\r\n if (BI.isNull(item)) {\r\n return;\r\n }\r\n item = BI.deepClone(item);\r\n t = BI.stripEL(item);\r\n text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {\r\n return BI.isNotNull(val);\r\n });\r\n\r\n if (BI.isNull(text) || BI.isObject(text)) return;\r\n\r\n py = BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n });\r\n text = BI.toUpperCase(text);\r\n py = BI.toUpperCase(py);\r\n var pidx;\r\n if (text.indexOf(keyword) > -1) {\r\n if (text === keyword) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n } else if (pidx = py.indexOf(keyword), (pidx > -1)) {\r\n if (text === keyword || keyword.length === text.length) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n }\r\n });\r\n return {\r\n match: matched,\r\n find: find\r\n };\r\n }\r\n});\r\n\r\n_.extend(BI, {\r\n beforeFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n if (func.apply(sFunc, arguments) === false) {\r\n return false;\r\n }\r\n return __self.apply(sFunc, arguments);\r\n };\r\n },\r\n\r\n afterFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n var ret = __self.apply(sFunc, arguments);\r\n if (ret === false) {\r\n return false;\r\n }\r\n func.apply(sFunc, arguments);\r\n return ret;\r\n };\r\n }\r\n});_.extend(BI, {\r\n // 给Number类型增加一个add方法,调用起来更加方便。\r\n add: function (num, arg) {\r\n return accAdd(arg, num);\r\n\r\n /**\r\n ** 加法函数,用来得到精确的加法结果\r\n ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。\r\n ** 调用:accAdd(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accAdd (arg1, arg2) {\r\n var r1, r2, m, c;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n c = Math.abs(r1 - r2);\r\n m = Math.pow(10, Math.max(r1, r2));\r\n if (c > 0) {\r\n var cm = Math.pow(10, c);\r\n if (r1 > r2) {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\")) * cm;\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\")) * cm;\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n return (arg1 + arg2) / m;\r\n }\r\n },\r\n\r\n // 给Number类型增加一个sub方法,调用起来更加方便。\r\n sub: function (num, arg) {\r\n return accSub(num, arg);\r\n\r\n /**\r\n ** 减法函数,用来得到精确的减法结果\r\n ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。\r\n ** 调用:accSub(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accSub (arg1, arg2) {\r\n var r1, r2, m, n;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n m = Math.pow(10, Math.max(r1, r2)); // last modify by deeka //动态控制精度长度\r\n n = (r1 >= r2) ? r1 : r2;\r\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\r\n }\r\n },\r\n\r\n // 给Number类型增加一个mul方法,调用起来更加方便。\r\n mul: function (num, arg) {\r\n return accMul(arg, num);\r\n\r\n /**\r\n ** 乘法函数,用来得到精确的乘法结果\r\n ** 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。\r\n ** 调用:accMul(arg1,arg2)\r\n ** 返回值:arg1乘以 arg2的精确结果\r\n **/\r\n function accMul (arg1, arg2) {\r\n var m = 0, s1 = arg1.toString(), s2 = arg2.toString();\r\n try {\r\n m += s1.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n try {\r\n m += s2.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n return Number(s1.replace(\".\", \"\")) * Number(s2.replace(\".\", \"\")) / Math.pow(10, m);\r\n }\r\n },\r\n \r\n // 给Number类型增加一个div方法,调用起来更加方便。\r\n div: function (num, arg) {\r\n return accDivide(num, arg);\r\n\r\n /**\r\n * Return digits length of a number\r\n * @param {*number} num Input number\r\n */\r\n function digitLength (num) {\r\n // Get digit length of e\r\n var eSplit = num.toString().split(/[eE]/);\r\n var len = (eSplit[0].split(\".\")[1] || \"\").length - (+(eSplit[1] || 0));\r\n return len > 0 ? len : 0;\r\n }\r\n /**\r\n * 把小数转成整数,支持科学计数法。如果是小数则放大成整数\r\n * @param {*number} num 输入数\r\n */\r\n function float2Fixed (num) {\r\n if (num.toString().indexOf(\"e\") === -1) {\r\n return Number(num.toString().replace(\".\", \"\"));\r\n }\r\n var dLen = digitLength(num);\r\n return dLen > 0 ? num * Math.pow(10, dLen) : num;\r\n }\r\n\r\n /**\r\n * 精确乘法\r\n */\r\n function times (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return times.apply(void 0, [times(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n var baseNum = digitLength(num1) + digitLength(num2);\r\n var leftValue = num1Changed * num2Changed;\r\n return leftValue / Math.pow(10, baseNum);\r\n }\r\n\r\n /**\r\n * 精确除法\r\n */\r\n function accDivide (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return accDivide.apply(void 0, [accDivide(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n return times((num1Changed / num2Changed), Math.pow(10, digitLength(num2) - digitLength(num1)));\r\n }\r\n }\r\n\r\n});/**\r\n * 对字符串对象的扩展\r\n * @class String\r\n */\r\n_.extend(BI, {\r\n\r\n /**\r\n * 判断字符串是否已指定的字符串开始\r\n * @param str source字符串\r\n * @param {String} startTag 指定的开始字符串\r\n * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false\r\n */\r\n startWith: function (str, startTag) {\r\n str = str || \"\";\r\n if (startTag == null || startTag == \"\" || str.length === 0 || startTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substr(0, startTag.length) == startTag;\r\n },\r\n /**\r\n * 判断字符串是否以指定的字符串结束\r\n * @param str source字符串\r\n * @param {String} endTag 指定的字符串\r\n * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false\r\n */\r\n endWith: function (str, endTag) {\r\n if (endTag == null || endTag == \"\" || str.length === 0 || endTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substring(str.length - endTag.length) == endTag;\r\n },\r\n\r\n /**\r\n * 获取url中指定名字的参数\r\n * @param str source字符串\r\n * @param {String} name 参数的名字\r\n * @return {String} 参数的值\r\n */\r\n getQuery: function (str, name) {\r\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\r\n var r = str.substr(str.indexOf(\"?\") + 1).match(reg);\r\n if (r) {\r\n return unescape(r[2]);\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * 给url加上给定的参数\r\n * @param str source字符串\r\n * @param {Object} paras 参数对象,是一个键值对对象\r\n * @return {String} 添加了给定参数的url\r\n */\r\n appendQuery: function (str, paras) {\r\n if (!paras) {\r\n return str;\r\n }\r\n var src = str;\r\n // 没有问号说明还没有参数\r\n if (src.indexOf(\"?\") === -1) {\r\n src += \"?\";\r\n }\r\n // 如果以问号结尾,说明没有其他参数\r\n if (BI.endWith(src, \"?\") !== false) {\r\n } else {\r\n src += \"&\";\r\n }\r\n _.each(paras, function (value, name) {\r\n if (typeof(name) === \"string\") {\r\n src += name + \"=\" + value + \"&\";\r\n }\r\n });\r\n src = src.substr(0, src.length - 1);\r\n return src;\r\n },\r\n /**\r\n * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串\r\n * @param str source字符串\r\n * @param {String} s1 要替换的字符串的正则表达式\r\n * @param {String} s2 替换的结果字符串\r\n * @returns {String} 替换后的字符串\r\n */\r\n replaceAll: function (str, s1, s2) {\r\n return BI.isString(str) ? str.replace(new RegExp(s1, \"gm\"), s2) : str;\r\n },\r\n /**\r\n * 总是让字符串以指定的字符开头\r\n * @param str source字符串\r\n * @param {String} start 指定的字符\r\n * @returns {String} 以指定字符开头的字符串\r\n */\r\n perfectStart: function (str, start) {\r\n if (BI.startWith(str, start)) {\r\n return str;\r\n }\r\n return start + str;\r\n\r\n },\r\n\r\n /**\r\n * 获取字符串中某字符串的所有项位置数组\r\n * @param str source字符串\r\n * @param {String} sub 子字符串\r\n * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组\r\n */\r\n allIndexOf: function (str, sub) {\r\n if (typeof sub !== \"string\") {\r\n return [];\r\n }\r\n var location = [];\r\n var offset = 0;\r\n while (str.length > 0) {\r\n var loc = str.indexOf(sub);\r\n if (loc === -1) {\r\n break;\r\n }\r\n location.push(offset + loc);\r\n str = str.substring(loc + sub.length, str.length);\r\n offset += loc + sub.length;\r\n }\r\n return location;\r\n }\r\n});!(function () {\r\n var i18nStore = {};\r\n _.extend(BI, {\r\n addI18n: function (i18n) {\r\n BI.extend(i18nStore, i18n);\r\n },\r\n i18nText: function (key) {\r\n var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || \"\";\r\n if (!localeText) {\r\n localeText = key;\r\n }\r\n var len = arguments.length;\r\n if (len > 1) {\r\n if (localeText.indexOf(\"{R1}\") > -1) {\r\n for (var i = 1; i < len; i++) {\r\n var key = \"{R\" + i + \"}\";\r\n localeText = BI.replaceAll(localeText, key, arguments[i] + \"\");\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments);\r\n var count = 1;\r\n return BI.replaceAll(localeText, \"\\\\{\\\\s*\\\\}\", function () {\r\n return args[count++] + \"\";\r\n });\r\n }\r\n }\r\n return localeText;\r\n }\r\n });\r\n})();(function () {\r\n var moduleInjection = {};\r\n BI.module = function (xtype, cls) {\r\n if (moduleInjection[xtype] != null) {\r\n _global.console && console.error(\"module:[\" + xtype + \"] has been registed\");\r\n }\r\n moduleInjection[xtype] = cls;\r\n };\r\n\r\n var constantInjection = {};\r\n BI.constant = function (xtype, cls) {\r\n if (constantInjection[xtype] != null) {\r\n _global.console && console.error(\"constant:[\" + xtype + \"] has been registed\");\r\n }\r\n constantInjection[xtype] = cls;\r\n };\r\n\r\n var modelInjection = {};\r\n BI.model = function (xtype, cls) {\r\n if (modelInjection[xtype] != null) {\r\n _global.console && console.error(\"model:[\" + xtype + \"] has been registed\");\r\n }\r\n modelInjection[xtype] = cls;\r\n };\r\n\r\n var storeInjection = {};\r\n BI.store = function (xtype, cls) {\r\n if (storeInjection[xtype] != null) {\r\n _global.console && console.error(\"store:[\" + xtype + \"] has been registed\");\r\n }\r\n storeInjection[xtype] = cls;\r\n };\r\n\r\n var serviceInjection = {};\r\n BI.service = function (xtype, cls) {\r\n if (serviceInjection[xtype] != null) {\r\n _global.console && console.error(\"service:[\" + xtype + \"] has been registed\");\r\n }\r\n serviceInjection[xtype] = cls;\r\n };\r\n\r\n var providerInjection = {};\r\n BI.provider = function (xtype, cls) {\r\n if (providerInjection[xtype] != null) {\r\n _global.console && console.error(\"provider:[\" + xtype + \"] has been registed\");\r\n }\r\n providerInjection[xtype] = cls;\r\n };\r\n\r\n var configFunctions = {};\r\n BI.config = function (type, configFn) {\r\n if (BI.initialized) {\r\n if (constantInjection[type]) {\r\n return (constantInjection[type] = configFn(constantInjection[type]));\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n // 如果config被重新配置的话,需要删除掉之前的实例\r\n if (providerInstance[type]) {\r\n delete providerInstance[type];\r\n }\r\n return configFn(providers[type]);\r\n }\r\n return BI.Plugin.configWidget(type, configFn);\r\n }\r\n if (!configFunctions[type]) {\r\n configFunctions[type] = [];\r\n BI.prepares.push(function () {\r\n var queue = configFunctions[type];\r\n for (var i = 0; i < queue.length; i++) {\r\n if (constantInjection[type]) {\r\n constantInjection[type] = queue[i](constantInjection[type]);\r\n continue;\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (providerInstance[type]) {\r\n delete providerInstance[type];\r\n }\r\n queue[i](providers[type]);\r\n continue;\r\n }\r\n BI.Plugin.configWidget(type, queue[i]);\r\n }\r\n configFunctions[type] = null;\r\n });\r\n }\r\n configFunctions[type].push(configFn);\r\n };\r\n\r\n var actions = {};\r\n var globalAction = [];\r\n BI.action = function (type, actionFn) {\r\n if (BI.isFunction(type)) {\r\n globalAction.push(type);\r\n return function () {\r\n BI.remove(globalAction, function (idx) {\r\n return globalAction.indexOf(actionFn) === idx;\r\n });\r\n };\r\n }\r\n if (!actions[type]) {\r\n actions[type] = [];\r\n }\r\n actions[type].push(actionFn);\r\n return function () {\r\n BI.remove(actions[type], function (idx) {\r\n return actions[type].indexOf(actionFn) === idx;\r\n });\r\n if (actions[type].length === 0) {\r\n delete actions[type];\r\n }\r\n };\r\n };\r\n\r\n var points = {};\r\n BI.point = function (type, action, pointFn, after) {\r\n if (!points[type]) {\r\n points[type] = {};\r\n }\r\n if (!points[type][action]) {\r\n points[type][action] = {};\r\n }\r\n if (!points[type][action][after ? \"after\" : \"before\"]) {\r\n points[type][action][after ? \"after\" : \"before\"] = [];\r\n }\r\n points[type][action][after ? \"after\" : \"before\"].push(pointFn);\r\n };\r\n\r\n BI.Modules = {\r\n getModule: function (type) {\r\n if (!moduleInjection[type]) {\r\n _global.console && console.error(\"module:[\" + type + \"] does not exists\");\r\n return false;\r\n }\r\n return moduleInjection[type];\r\n },\r\n getAllModules: function () {\r\n return moduleInjection;\r\n }\r\n };\r\n\r\n BI.Constants = {\r\n getConstant: function (type) {\r\n return constantInjection[type];\r\n }\r\n };\r\n\r\n var callPoint = function (inst, types) {\r\n types = BI.isArray(types) ? types : [types];\r\n BI.each(types, function (idx, type) {\r\n if (points[type]) {\r\n for (var action in points[type]) {\r\n var bfns = points[type][action].before;\r\n if (bfns) {\r\n BI.aspect.before(inst, action, function (bfns) {\r\n return function () {\r\n for (var i = 0, len = bfns.length; i < len; i++) {\r\n try {\r\n bfns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(bfns));\r\n }\r\n var afns = points[type][action].after;\r\n if (afns) {\r\n BI.aspect.after(inst, action, function (afns) {\r\n return function () {\r\n for (var i = 0, len = afns.length; i < len; i++) {\r\n try {\r\n afns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(afns));\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n BI.Models = {\r\n getModel: function (type, config) {\r\n var inst = new modelInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n inst.mixins && callPoint(inst, inst.mixins);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var stores = {};\r\n\r\n BI.Stores = {\r\n getStore: function (type, config) {\r\n if (stores[type]) {\r\n return stores[type];\r\n }\r\n var inst = stores[type] = new storeInjection[type](config);\r\n inst._constructor && inst._constructor(config, function () {\r\n delete stores[type];\r\n });\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var services = {};\r\n\r\n BI.Services = {\r\n getService: function (type, config) {\r\n if (services[type]) {\r\n return services[type];\r\n }\r\n services[type] = new serviceInjection[type](config);\r\n callPoint(services[type], type);\r\n return services[type];\r\n }\r\n };\r\n\r\n var providers = {},\r\n providerInstance = {};\r\n\r\n BI.Providers = {\r\n getProvider: function (type, config) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (!providerInstance[type]) {\r\n providerInstance[type] = new (providers[type].$get())(config);\r\n }\r\n return providerInstance[type];\r\n }\r\n };\r\n\r\n BI.Actions = {\r\n runAction: function (type, event, config) {\r\n BI.each(actions[type], function (i, act) {\r\n try {\r\n act(event, config);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n },\r\n runGlobalAction: function () {\r\n var args = [].slice.call(arguments);\r\n BI.each(globalAction, function (i, act) {\r\n try {\r\n act.apply(null, args);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n BI.getContext = function (type, config) {\r\n if (constantInjection[type]) {\r\n return BI.Constants.getConstant(type);\r\n }\r\n if (modelInjection[type]) {\r\n return BI.Models.getModel(type, config);\r\n }\r\n if (storeInjection[type]) {\r\n return BI.Stores.getStore(type, config);\r\n }\r\n if (serviceInjection[type]) {\r\n return BI.Services.getService(type, config);\r\n }\r\n if (providerInjection[type]) {\r\n return BI.Providers.getProvider(type, config);\r\n }\r\n };\r\n})();/**\r\n * guy\r\n * 检测某个Widget的EventChange事件然后去show某个card\r\n * @type {*|void|Object}\r\n * @class BI.ShowListener\r\n * @extends BI.OB\r\n */\r\nBI.ShowListener = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ShowListener.superclass._defaultConfig.apply(this, arguments), {\r\n eventObj: BI.createWidget(),\r\n cardLayout: null,\r\n cardNameCreator: function (v) {\r\n return v;\r\n },\r\n cardCreator: BI.emptyFn,\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShowListener.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.eventObj) {\r\n o.eventObj.on(BI.Controller.EVENT_CHANGE, function (type, v, ob) {\r\n if (type === BI.Events.CLICK) {\r\n v = v || o.eventObj.getValue();\r\n v = BI.isArray(v) ? (v.length > 1 ? v.toString() : v[0]) : v;\r\n if (BI.isNull(v)) {\r\n throw new Error(\"value cannot be null\");\r\n }\r\n var cardName = o.cardNameCreator(v);\r\n if (!o.cardLayout.isCardExisted(cardName)) {\r\n var card = o.cardCreator(cardName);\r\n o.cardLayout.addCardByName(cardName, card);\r\n o.afterCardCreated(cardName);\r\n }\r\n o.cardLayout.showCardByName(cardName);\r\n BI.nextTick(function () {\r\n o.afterCardShow(cardName);\r\n self.fireEvent(BI.ShowListener.EVENT_CHANGE, cardName);\r\n });\r\n }\r\n });\r\n }\r\n }\r\n});\r\nBI.ShowListener.EVENT_CHANGE = \"EVENT_CHANGE\";/**\r\n * style加载管理器\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class\r\n */\r\nBI.StyleLoaderManager = BI.inherit(BI.OB, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StyleLoaderManager.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.StyleLoaderManager.superclass._init.apply(this, arguments);\r\n this.stylesManager = {};\r\n },\r\n\r\n loadStyle: function (name, styleString) {\r\n if(!_global.document) {\r\n return;\r\n }\r\n var d = document, styles = d.createElement(\"style\");\r\n d.getElementsByTagName(\"head\")[0].appendChild(styles);\r\n styles.setAttribute(\"type\", \"text/css\");\r\n if (styles.styleSheet) {\r\n styles.styleSheet.cssText = styleString;\r\n } else {\r\n styles.appendChild(document.createTextNode(styleString));\r\n }\r\n this.stylesManager[name] = styles;\r\n\r\n return this;\r\n },\r\n\r\n get: function (name) {\r\n return this.stylesManager[name];\r\n },\r\n\r\n has: function (name) {\r\n return this.stylesManager[name] != null;\r\n },\r\n\r\n removeStyle: function (name) {\r\n if (!this.has(name)) {\r\n return this;\r\n }\r\n this.stylesManager[name].parentNode.removeChild(this.stylesManager[name]);\r\n delete this.stylesManager[name];\r\n return this;\r\n }\r\n});/**\r\n * @class BI.Logic\r\n * @extends BI.OB\r\n */\r\nBI.Logic = BI.inherit(BI.OB, {\r\n createLogic: function () {\r\n return this.options || {};\r\n }\r\n});\r\n\r\nBI.LogicFactory = {\r\n Type: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\",\r\n Table: \"table\",\r\n HorizontalFill: \"horizontal_fill\"\r\n },\r\n createLogic: function (key, options) {\r\n var logic;\r\n switch (key) {\r\n case BI.LogicFactory.Type.Vertical:\r\n logic = BI.VerticalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Horizontal:\r\n logic = BI.HorizontalLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.Table:\r\n logic = BI.TableLayoutLogic;\r\n break;\r\n case BI.LogicFactory.Type.HorizontalFill:\r\n logic = BI.HorizontalFillLayoutLogic;\r\n break;\r\n default :\r\n logic = BI.Logic;\r\n break;\r\n }\r\n return new logic(options).createLogic();\r\n },\r\n\r\n createLogicTypeByDirection: function (direction) {\r\n switch (direction) {\r\n case BI.Direction.Top:\r\n case BI.Direction.Bottom:\r\n case BI.Direction.Custom:\r\n return BI.LogicFactory.Type.Vertical;\r\n break;\r\n case BI.Direction.Left:\r\n case BI.Direction.Right:\r\n return BI.LogicFactory.Type.Horizontal;\r\n }\r\n },\r\n\r\n createLogicItemsByDirection: function (direction) {\r\n var layout;\r\n var items = Array.prototype.slice.call(arguments, 1);\r\n items = BI.map(items, function (i, item) {\r\n if (BI.isWidget(item)) {\r\n return {\r\n el: item,\r\n width: item.options.width,\r\n height: item.options.height\r\n };\r\n }\r\n return item;\r\n });\r\n switch (direction) {\r\n case BI.Direction.Bottom:\r\n layout = BI.LogicFactory.Type.Vertical;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Right:\r\n layout = BI.LogicFactory.Type.Horizontal;\r\n items.reverse();\r\n break;\r\n case BI.Direction.Custom:\r\n items = items.slice(1);\r\n break;\r\n }\r\n return items;\r\n }\r\n};/**\r\n * guy\r\n * 上下布局逻辑\r\n * 上下布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.VerticalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.VerticalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VerticalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical\";\r\n } else {\r\n layout = \"bi.vtape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.VerticalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n\r\n/**\r\n * guy\r\n * 左右布局逻辑\r\n * 左右布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.HorizontalLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.vertical_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 表格布局逻辑\r\n * 表格布局的时候要考虑到是动态布局还是静态布局\r\n *\r\n * @class BI.TableLayoutLogic\r\n * @extends BI.OB\r\n */\r\nBI.TableLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TableLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n columns: 0,\r\n rows: 0,\r\n columnSize: [],\r\n rowSize: [],\r\n hgap: 0,\r\n vgap: 0,\r\n items: []\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n if (o.dynamic) {\r\n layout = \"bi.table\";\r\n } else {\r\n layout = \"bi.window\";\r\n }\r\n return {\r\n type: layout,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n columns: o.columns,\r\n rows: o.rows,\r\n columnSize: o.columnSize,\r\n rowSize: o.rowSize,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.TableLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\n/**\r\n * guy\r\n * 左右充满布局逻辑\r\n *\r\n * @class BI.HorizontalFillLayoutLogic\r\n * @extends BI.Logic\r\n */\r\nBI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.HorizontalFillLayoutLogic.superclass._defaultConfig.apply(this, arguments), {\r\n dynamic: false,\r\n scrollable: null,\r\n scrolly: false,\r\n scrollx: false,\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n createLogic: function () {\r\n var layout, o = this.options;\r\n var columnSize = [];\r\n BI.each(o.items, function (i, item) {\r\n columnSize.push(item.width || 0);\r\n });\r\n if (o.dynamic) {\r\n layout = \"bi.horizontal_adapt\";\r\n } else {\r\n layout = \"bi.htape\";\r\n }\r\n return {\r\n type: layout,\r\n columnSize: columnSize,\r\n scrollable: o.scrollable,\r\n scrolly: o.scrolly,\r\n scrollx: o.scrollx,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.HorizontalFillLayoutLogic.superclass._init.apply(this, arguments);\r\n }\r\n});// 工程配置\r\nBI.prepares.push(function () {\r\n // 注册布局\r\n // adapt类布局优先级规则\r\n // 1、在非IE且支持flex的浏览器下使用flex布局\r\n // 2、IE或者不支持flex的浏览器下使用inline布局\r\n // 3、在2的情况下如果布局的items大于1的话使用display:table的布局\r\n // 4、在3的情况下如果IE版本低于8使用table标签布局\r\n var _isSupportFlex;\r\n var isSupportFlex = function () {\r\n if (_isSupportFlex == null) {\r\n _isSupportFlex = !!(BI.isSupportCss3 && BI.isSupportCss3(\"flex\"));\r\n }\r\n return _isSupportFlex;\r\n };\r\n BI.Plugin.registerWidget(\"bi.horizontal\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), isLessIE8 = isIE && BI.getIEVersion() < 8;\r\n // center_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // vertical_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n // horizontal_adapt\r\n if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) {\r\n if (isLessIE8) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n if (!isIE) {\r\n if (supportFlex) {\r\n return BI.extend(ob, {type: \"bi.flex_horizontal\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.table_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.center_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);\r\n if (!isIE && supportFlex && justOneItem) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend(ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n // 一个item的情况下inline布局睥睨天下\r\n if (justOneItem) {\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.vertical_adapt\", function (ob) {\r\n var isIE = BI.isIE(), supportFlex = isSupportFlex();\r\n if (!isIE && supportFlex) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex__scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_vertical_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_vertical_adapt\"});\r\n });\r\n BI.Plugin.registerWidget(\"bi.horizontal_adapt\", function (ob) {\r\n if (ob.items && ob.items.length <= 1) {\r\n return BI.extend(ob, {type: \"bi.horizontal_auto\"});\r\n }\r\n return ob;\r\n });\r\n BI.Plugin.registerWidget(\"bi.float_center_adapt\", function (ob) {\r\n if (!BI.isIE() && isSupportFlex()) {\r\n // 有滚动条的情况下需要用到flex_scrollable_center_adapt布局\r\n if (ob.scrollable === true || ob.scrollx === true || ob.scrolly === true) {\r\n // 不是IE用flex_scrollable_center_adapt布局\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.flex_center_adapt\"});\r\n }\r\n return BI.extend(ob, {type: \"bi.inline_center_adapt\"});\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_horizontal_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_horizontal_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_vertical_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_vertical_adapt\"});\r\n }\r\n });\r\n BI.Plugin.registerWidget(\"bi.flex_center_adapt\", function (ob) {\r\n if (ob.scrollable === true || ob.scrolly === true || ob.scrollx === true) {\r\n return BI.extend({}, ob, {type: \"bi.flex_scrollable_center_adapt\"});\r\n }\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.radio\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_radio\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.checkbox\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return BI.extend(ob, {type: \"bi.image_checkbox\"});\r\n }\r\n return ob;\r\n });\r\n\r\n BI.Plugin.registerWidget(\"bi.half_icon_button\", function (ob) {\r\n if (BI.isIE() && BI.getIEVersion() < 9) {\r\n return ob;\r\n }\r\n return BI.extend(ob, {type: \"bi.half_button\"});\r\n });\r\n});/**\r\n * Detect Element Resize.\r\n * Forked in order to guard against unsafe 'window' and 'document' references.\r\n *\r\n * https://github.com/sdecima/javascript-detect-element-resize\r\n * Sebastian Decima\r\n *\r\n * version: 0.5.3\r\n **/\r\n!(function () {\r\n var attachEvent = _global.document && _global.document.attachEvent,\r\n stylesCreated = false;\r\n\r\n if (_global.document && !attachEvent) {\r\n var requestFrame = (function () {\r\n var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame ||\r\n function (fn) { return _global.setTimeout(fn, 20); };\r\n return function (fn) { return raf(fn); };\r\n })();\r\n\r\n var cancelFrame = (function () {\r\n var cancel = _global.cancelAnimationFrame || _global.mozCancelAnimationFrame || _global.webkitCancelAnimationFrame ||\r\n _global.clearTimeout;\r\n return function (id) { return cancel(id); };\r\n })();\r\n\r\n var resetTriggers = function (element) {\r\n var triggers = element.__resizeTriggers__,\r\n expand = triggers.firstElementChild,\r\n contract = triggers.lastElementChild,\r\n expandChild = expand.firstElementChild;\r\n contract.scrollLeft = contract.scrollWidth;\r\n contract.scrollTop = contract.scrollHeight;\r\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\r\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\r\n expand.scrollLeft = expand.scrollWidth;\r\n expand.scrollTop = expand.scrollHeight;\r\n };\r\n\r\n var checkTriggers = function (element) {\r\n return element.offsetWidth !== element.__resizeLast__.width ||\r\n element.offsetHeight !== element.__resizeLast__.height;\r\n };\r\n\r\n var scrollListener = function (e) {\r\n var element = this;\r\n resetTriggers(this);\r\n if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);\r\n this.__resizeRAF__ = requestFrame(function () {\r\n if (checkTriggers(element)) {\r\n element.__resizeLast__.width = element.offsetWidth;\r\n element.__resizeLast__.height = element.offsetHeight;\r\n element.__resizeListeners__.forEach(function (fn) {\r\n fn.call(element, e);\r\n });\r\n }\r\n });\r\n };\r\n\r\n /* Detect CSS Animations support to detect element display/re-attach */\r\n var animation = false,\r\n animationstring = \"animation\",\r\n keyframeprefix = \"\",\r\n animationstartevent = \"animationstart\",\r\n domPrefixes = \"Webkit Moz O ms\".split(\" \"),\r\n startEvents = \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\" \"),\r\n pfx = \"\";\r\n {\r\n var elm = document.createElement(\"fakeelement\");\r\n if (elm.style.animationName !== undefined) {\r\n animation = true;\r\n }\r\n\r\n if (animation === false) {\r\n for (var i = 0; i < domPrefixes.length; i++) {\r\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\r\n pfx = domPrefixes[i];\r\n animationstring = pfx + \"Animation\";\r\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\r\n animationstartevent = startEvents[i];\r\n animation = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var animationName = \"resizeanim\";\r\n var animationKeyframes = \"@\" + keyframeprefix + \"keyframes \" + animationName + \" { from { opacity: 0; } to { opacity: 0; } } \";\r\n var animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\r\n }\r\n\r\n var createStyles = function () {\r\n if (!stylesCreated) {\r\n // opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\r\n var css = (animationKeyframes ? animationKeyframes : \"\") +\r\n \".resize-triggers { \" + (animationStyle ? animationStyle : \"\") + \"visibility: hidden; opacity: 0; } \" +\r\n \".resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \\\" \\\"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }\",\r\n head = document.head || document.getElementsByTagName(\"head\")[0],\r\n style = document.createElement(\"style\");\r\n\r\n style.type = \"text/css\";\r\n if (style.styleSheet) {\r\n style.styleSheet.cssText = css;\r\n } else {\r\n style.appendChild(document.createTextNode(css));\r\n }\r\n\r\n head.appendChild(style);\r\n stylesCreated = true;\r\n }\r\n };\r\n\r\n var addResizeListener = function (element, fn) {\r\n if (attachEvent) {\r\n element.attachEvent(\"onresize\", fn);\r\n BI.nextTick(fn);\r\n } else {\r\n if (!element.__resizeTriggers__) {\r\n if (getComputedStyle(element).position === \"static\") element.style.position = \"relative\";\r\n createStyles();\r\n element.__resizeLast__ = {};\r\n element.__resizeListeners__ = [];\r\n (element.__resizeTriggers__ = document.createElement(\"div\")).className = \"resize-triggers\";\r\n element.__resizeTriggers__.innerHTML = \"<div class=\\\"expand-trigger\\\"><div></div></div>\" +\r\n \"<div class=\\\"contract-trigger\\\"></div>\";\r\n element.appendChild(element.__resizeTriggers__);\r\n resetTriggers(element);\r\n element.addEventListener(\"scroll\", scrollListener, true);\r\n\r\n /* Listen for a css animation to detect element display/re-attach */\r\n animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function (e) {\r\n if (e.animationName === animationName) {resetTriggers(element);}\r\n });\r\n }\r\n element.__resizeListeners__.push(fn);\r\n }\r\n };\r\n var removeResizeListener = function (element, fn) {\r\n if (attachEvent) element.detachEvent(\"onresize\", fn);\r\n else {\r\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\r\n if (!element.__resizeListeners__.length) {\r\n element.removeEventListener(\"scroll\", scrollListener);\r\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\r\n }\r\n }\r\n };\r\n\r\n BI.ResizeDetector = {\r\n addResizeListener: function (widget, fn) {\r\n addResizeListener(widget.element[0], fn);\r\n return function () {\r\n removeResizeListener(widget.element[0], fn);\r\n };\r\n },\r\n removeResizeListener: function (widget, fn) {\r\n removeResizeListener(widget.element[0], fn);\r\n }\r\n };\r\n})();\r\n/**\r\n * 对DOM操作的通用函数\r\n * @type {{}}\r\n */\r\n!(function () {\r\n BI.DOM = {};\r\n\r\n BI.extend(BI.DOM, {\r\n ready: function (fn) {\r\n BI.Widget._renderEngine.createElement(document).ready(fn);\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n patchProps: function (fromElement, toElement) {\r\n var elemData = BI.jQuery._data(fromElement[0]);\r\n var events = elemData.events;\r\n BI.each(events, function (eventKey, event) {\r\n BI.each(event, function (i, handler) {\r\n toElement.on(eventKey + (handler.namespace ? (\".\" + handler.namespace) : \"\"), handler);\r\n });\r\n });\r\n var fromChildren = fromElement.children(), toChildren = toElement.children();\r\n if (fromChildren.length !== toChildren.length) {\r\n throw new Error(\"不匹配\");\r\n }\r\n BI.each(fromChildren, function (i, child) {\r\n BI.DOM.patchProps(BI.jQuery(child), BI.jQuery(toChildren[i]));\r\n });\r\n BI.each(fromElement.data(\"__widgets\"), function (i, widget) {\r\n widget.element = toElement;\r\n });\r\n },\r\n /**\r\n * 把dom数组或元素悬挂起来,使其不对html产生影响\r\n * @param dom\r\n */\r\n hang: function (doms) {\r\n if (BI.isEmpty(doms)) {\r\n return;\r\n }\r\n var frag = BI.Widget._renderEngine.createFragment();\r\n BI.each(doms, function (i, dom) {\r\n dom instanceof BI.Widget && (dom = dom.element);\r\n dom instanceof BI.$ && dom[0] && frag.appendChild(dom[0]);\r\n });\r\n return frag;\r\n },\r\n\r\n isExist: function (obj) {\r\n return BI.Widget._renderEngine.createElement(\"body\").find(obj.element).length > 0;\r\n },\r\n\r\n // 预加载图片\r\n preloadImages: function (srcArray, onload) {\r\n var count = 0, images = [];\r\n\r\n function complete () {\r\n count++;\r\n if (count >= srcArray.length) {\r\n onload();\r\n }\r\n }\r\n\r\n BI.each(srcArray, function (i, src) {\r\n images[i] = new Image();\r\n images[i].src = src;\r\n images[i].onload = function () {\r\n complete();\r\n };\r\n images[i].onerror = function () {\r\n complete();\r\n };\r\n });\r\n },\r\n\r\n getTextSizeWidth: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var width = span.width();\r\n span.remove();\r\n\r\n return width;\r\n },\r\n\r\n getTextSizeHeight: function (text, fontSize) {\r\n var span = BI.Widget._renderEngine.createElement(\"<span></span>\").addClass(\"text-width-span\").appendTo(\"body\");\r\n\r\n if (fontSize == null) {\r\n fontSize = 12;\r\n }\r\n fontSize = fontSize + \"px\";\r\n\r\n span.css(\"font-size\", fontSize).text(text);\r\n\r\n var height = span.height();\r\n span.remove();\r\n\r\n return height;\r\n },\r\n\r\n // 获取滚动条的宽度,页面display: none时候获取到的为0\r\n getScrollWidth: function () {\r\n if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) {\r\n var ul = BI.Widget._renderEngine.createElement(\"<div>\").width(50).height(50).css({\r\n position: \"absolute\",\r\n top: \"-9999px\",\r\n overflow: \"scroll\"\r\n }).appendTo(\"body\");\r\n this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth;\r\n ul.destroy();\r\n }\r\n return this._scrollWidth;\r\n },\r\n\r\n getImage: function (param, fillStyle, backgroundColor) {\r\n var canvas = document.createElement(\"canvas\");\r\n var ratio = 2;\r\n BI.Widget._renderEngine.createElement(\"body\").append(canvas);\r\n\r\n var ctx = canvas.getContext(\"2d\");\r\n ctx.font = \"12px Georgia\";\r\n var w = ctx.measureText(param).width + 4;\r\n canvas.width = w * ratio;\r\n canvas.height = 16 * ratio;\r\n ctx.font = 12 * ratio + \"px Georgia\";\r\n ctx.fillStyle = fillStyle || \"#3685f2\";\r\n ctx.textBaseline = \"middle\";\r\n // ctx.fillStyle = \"#EAF2FD\";\r\n ctx.fillText(param, 2 * ratio, 9 * ratio);\r\n BI.Widget._renderEngine.createElement(canvas).destroy();\r\n var backColor = backgroundColor || \"rgba(54, 133, 242, 0.1)\";\r\n // IE可以放大缩小所以要固定最大最小宽高\r\n return {\r\n width: w,\r\n height: 16,\r\n src: canvas.toDataURL(\"image/png\"),\r\n style: \"background-color: \" + backColor + \";vertical-align: middle; margin: 0 1px; width:\" + w + \"px;height: 16px; max-width:\" + w + \"px;max-height: 16px; min-width:\" + w + \"px;min-height: 16px\",\r\n param: param\r\n };\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n isColor: function (color) {\r\n return color && (this.isRGBColor(color) || this.isHexColor(color));\r\n },\r\n\r\n isRGBColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color.substr(0, 3) === \"rgb\";\r\n },\r\n\r\n isHexColor: function (color) {\r\n if (!color) {\r\n return false;\r\n }\r\n return color[0] === \"#\" && color.length === 7;\r\n },\r\n\r\n isDarkColor: function (hex) {\r\n if (!hex || !this.isHexColor(hex)) {\r\n return false;\r\n }\r\n var rgb = this.rgb2json(this.hex2rgb(hex));\r\n var grayLevel = Math.round(rgb.r * 0.299 + rgb.g * 0.587 + rgb.b * 0.114);\r\n if (grayLevel < 192/** 网上给的是140**/) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n // 获取对比颜色\r\n getContrastColor: function (color) {\r\n if (!color || !this.isColor(color)) {\r\n return \"\";\r\n }\r\n if (this.isDarkColor(color)) {\r\n return \"#ffffff\";\r\n }\r\n return \"#1a1a1a\";\r\n },\r\n\r\n rgb2hex: function (rgbColour) {\r\n if (!rgbColour || rgbColour.substr(0, 3) != \"rgb\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n var red = BI.parseInt(rgbValues[0]);\r\n var green = BI.parseInt(rgbValues[1]);\r\n var blue = BI.parseInt(rgbValues[2]);\r\n\r\n var hexColour = \"#\" + this.int2hex(red) + this.int2hex(green) + this.int2hex(blue);\r\n\r\n return hexColour;\r\n },\r\n\r\n rgb2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n if (!this.isRGBColor(rgbColour)) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2])\r\n };\r\n },\r\n\r\n rgba2json: function (rgbColour) {\r\n if (!rgbColour) {\r\n return {};\r\n }\r\n var rgbValues = rgbColour.match(/\\d+(\\.\\d+)?/g);\r\n return {\r\n r: BI.parseInt(rgbValues[0]),\r\n g: BI.parseInt(rgbValues[1]),\r\n b: BI.parseInt(rgbValues[2]),\r\n a: BI.parseFloat(rgbValues[3])\r\n };\r\n },\r\n\r\n json2rgb: function (rgb) {\r\n if (!BI.isKey(rgb.r) || !BI.isKey(rgb.g) || !BI.isKey(rgb.b)) {\r\n return \"\";\r\n }\r\n return \"rgb(\" + rgb.r + \",\" + rgb.g + \",\" + rgb.b + \")\";\r\n },\r\n\r\n json2rgba: function (rgba) {\r\n if (!BI.isKey(rgba.r) || !BI.isKey(rgba.g) || !BI.isKey(rgba.b)) {\r\n return \"\";\r\n }\r\n return \"rgba(\" + rgba.r + \",\" + rgba.g + \",\" + rgba.b + \",\" + rgba.a + \")\";\r\n },\r\n\r\n int2hex: function (strNum) {\r\n var hexdig = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n return hexdig[strNum >>> 4] + \"\" + hexdig[strNum & 15];\r\n },\r\n\r\n hex2rgb: function (color) {\r\n if (!color) {\r\n return \"\";\r\n }\r\n if (!this.isHexColor(color)) {\r\n return color;\r\n }\r\n var tempValue = \"rgb(\", colorArray;\r\n\r\n if (color.length === 7) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 5)),\r\n BI.parseInt(\"0x\" + color.substring(5, 7))];\r\n } else if (color.length === 4) {\r\n colorArray = [BI.parseInt(\"0x\" + color.substring(1, 2)),\r\n BI.parseInt(\"0x\" + color.substring(2, 3)),\r\n BI.parseInt(\"0x\" + color.substring(3, 4))];\r\n }\r\n tempValue += colorArray[0] + \",\";\r\n tempValue += colorArray[1] + \",\";\r\n tempValue += colorArray[2] + \")\";\r\n\r\n return tempValue;\r\n },\r\n\r\n rgba2rgb: function (rgbColor, bgColor) {\r\n if (BI.isNull(bgColor)) {\r\n bgColor = 1;\r\n }\r\n if (rgbColor.substr(0, 4) != \"rgba\") {\r\n return \"\";\r\n }\r\n var rgbValues = rgbColor.match(/\\d+(\\.\\d+)?/g);\r\n if (rgbValues.length < 4) {\r\n return \"\";\r\n }\r\n var R = BI.parseFloat(rgbValues[0]);\r\n var G = BI.parseFloat(rgbValues[1]);\r\n var B = BI.parseFloat(rgbValues[2]);\r\n var A = BI.parseFloat(rgbValues[3]);\r\n\r\n return \"rgb(\" + Math.floor(255 * (bgColor * (1 - A)) + R * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + G * A) + \",\" +\r\n Math.floor(255 * (bgColor * (1 - A)) + B * A) + \")\";\r\n }\r\n });\r\n\r\n BI.extend(BI.DOM, {\r\n\r\n getLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left - popup.element.outerWidth() - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerLeftPosition: function (combo, popup, extraWidth) {\r\n return {\r\n left: combo.element.offset().left + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element;\r\n return {\r\n left: el.offset().left + el.outerWidth() + (extraWidth || 0)\r\n };\r\n },\r\n\r\n getInnerRightPosition: function (combo, popup, extraWidth) {\r\n var el = combo.element, viewBounds = popup.element.bounds();\r\n return {\r\n left: el.offset().left + el.outerWidth() - viewBounds.width - (extraWidth || 0)\r\n };\r\n },\r\n\r\n getTopPosition: function (combo, popup, extraHeight) {\r\n return {\r\n top: combo.element.offset().top - popup.element.outerHeight() - (extraHeight || 0)\r\n };\r\n },\r\n\r\n getBottomPosition: function (combo, popup, extraHeight) {\r\n var el = combo.element;\r\n return {\r\n top: el.offset().top + el.outerHeight() + (extraHeight || 0)\r\n };\r\n },\r\n\r\n isLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isInnerLeftSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getInnerLeftPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isRightSpaceEnough: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth).left + viewBounds.width <= windowBounds.width;\r\n },\r\n\r\n isInnerRightSpaceEnough: function (combo, popup, extraWidth) {\r\n return BI.DOM.getInnerRightPosition(combo, popup, extraWidth).left >= 0;\r\n },\r\n\r\n isTopSpaceEnough: function (combo, popup, extraHeight) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight).top >= 0;\r\n },\r\n\r\n isBottomSpaceEnough: function (combo, popup, extraHeight) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight).top + viewBounds.height <= windowBounds.height;\r\n },\r\n\r\n isRightSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.width - combo.element.offset().left - combo.element.bounds().width >= combo.element.offset().left;\r\n },\r\n\r\n isBottomSpaceLarger: function (combo) {\r\n var windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n return windowBounds.height - combo.element.offset().top - combo.element.bounds().height >= combo.element.offset().top;\r\n },\r\n\r\n getLeftAlignPosition: function (combo, popup, extraWidth) {\r\n var viewBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left = combo.element.offset().left + extraWidth;\r\n if (left + viewBounds.width > windowBounds.width) {\r\n left = windowBounds.width - viewBounds.width;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getLeftAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getLeftPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: 0\r\n };\r\n },\r\n\r\n getRightAlignPosition: function (combo, popup, extraWidth) {\r\n var comboBounds = combo.element.bounds(), viewBounds = popup.element.bounds();\r\n var left = combo.element.offset().left + comboBounds.width - viewBounds.width - extraWidth;\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getRightAdaptPosition: function (combo, popup, extraWidth) {\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, extraWidth)) {\r\n return BI.DOM.getRightPosition(combo, popup, extraWidth);\r\n }\r\n return {\r\n left: BI.Widget._renderEngine.createElement(\"body\").bounds().width - popup.element.bounds().width\r\n };\r\n },\r\n\r\n getTopAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = comboOffset.top + extraHeight;\r\n adaptHeight = windowBounds.height - top;\r\n } else {\r\n top = windowBounds.height - popupBounds.height;\r\n if (top < extraHeight) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < extraHeight) {\r\n top = extraHeight;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getTopAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getTopPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: 0,\r\n adaptHeight: combo.element.offset().top - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: 0,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: 0\r\n };\r\n },\r\n\r\n getBottomAlignPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top, adaptHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, -1 * comboBounds.height + extraHeight)) {\r\n top = comboOffset.top + comboBounds.height - popupBounds.height - extraHeight;\r\n } else if (needAdaptHeight) {\r\n top = 0;\r\n adaptHeight = comboOffset.top + comboBounds.height - extraHeight;\r\n } else {\r\n top = 0;\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n adaptHeight = windowBounds.height - extraHeight;\r\n }\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return adaptHeight ? {\r\n top: top,\r\n adaptHeight: adaptHeight\r\n } : {\r\n top: top\r\n };\r\n },\r\n\r\n getBottomAdaptPosition: function (combo, popup, extraHeight, needAdaptHeight) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, extraHeight)) {\r\n return BI.DOM.getBottomPosition(combo, popup, extraHeight);\r\n }\r\n if (needAdaptHeight) {\r\n return {\r\n top: comboOffset.top + comboBounds.height + extraHeight,\r\n adaptHeight: windowBounds.height - comboOffset.top - comboBounds.height - extraHeight\r\n };\r\n }\r\n if (popupBounds.height + extraHeight > windowBounds.height) {\r\n return {\r\n top: extraHeight,\r\n adaptHeight: windowBounds.height - extraHeight\r\n };\r\n }\r\n return {\r\n top: windowBounds.height - popupBounds.height - extraHeight\r\n };\r\n },\r\n\r\n getCenterAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var left;\r\n if (comboOffset.left + comboBounds.width / 2 + popupBounds.width / 2 > windowBounds.width) {\r\n left = windowBounds.width - popupBounds.width;\r\n } else {\r\n left = comboOffset.left + comboBounds.width / 2 - popupBounds.width / 2;\r\n }\r\n if (left < 0) {\r\n left = 0;\r\n }\r\n return {\r\n left: left\r\n };\r\n },\r\n\r\n getMiddleAdaptPosition: function (combo, popup) {\r\n var comboOffset = combo.element.offset();\r\n var comboBounds = combo.element.bounds(), popupBounds = popup.element.bounds(),\r\n windowBounds = BI.Widget._renderEngine.createElement(\"body\").bounds();\r\n var top;\r\n if (comboOffset.top + comboBounds.height / 2 + popupBounds.height / 2 > windowBounds.height) {\r\n top = windowBounds.height - popupBounds.height;\r\n } else {\r\n top = comboOffset.top + comboBounds.height / 2 - popupBounds.height / 2;\r\n }\r\n if (top < 0) {\r\n top = 0;\r\n }\r\n return {\r\n top: top\r\n };\r\n },\r\n\r\n getComboPositionByDirections: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var i, direct;\r\n var leftRight = [], topBottom = [], innerLeftRight = [];\r\n var isNeedAdaptHeight = false, tbFirst = false, lrFirst = false;\r\n var left, top, pos, firstDir = directions[0];\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n leftRight.push(direct);\r\n break;\r\n case \"right\":\r\n leftRight.push(direct);\r\n break;\r\n case \"top\":\r\n topBottom.push(direct);\r\n break;\r\n case \"bottom\":\r\n topBottom.push(direct);\r\n break;\r\n case \"innerLeft\":\r\n innerLeftRight.push(direct);\r\n break;\r\n case \"innerRight\":\r\n innerLeftRight.push(direct);\r\n break;\r\n }\r\n }\r\n for (i = 0; i < directions.length; i++) {\r\n direct = directions[i];\r\n switch (direct) {\r\n case \"left\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"left,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"left\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"right\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"right,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"right\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"top\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isTopSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getTopPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"top,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"top,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"top\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"bottom\":\r\n var tW = lrFirst ? extraHeight : extraWidth, tH = lrFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isBottomSpaceEnough(combo, popup, tH)) {\r\n top = BI.DOM.getBottomPosition(combo, popup, tH).top;\r\n if (leftRight[0] === \"right\") {\r\n pos = BI.DOM.getLeftAlignPosition(combo, popup, tW, needAdaptHeight);\r\n pos.dir = \"bottom,right\";\r\n } else {\r\n pos = BI.DOM.getRightAlignPosition(combo, popup, tW);\r\n pos.dir = \"bottom,left\";\r\n }\r\n if (lrFirst) {\r\n pos.change = \"bottom\";\r\n }\r\n pos.top = top;\r\n return pos;\r\n }\r\n if (needAdaptHeight) {\r\n isNeedAdaptHeight = true;\r\n }\r\n tbFirst = true;\r\n break;\r\n case \"innerLeft\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? 0 : extraHeight;\r\n if (BI.DOM.isInnerLeftSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerLeftPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerLeft,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerLeft\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n lrFirst = true;\r\n break;\r\n case \"innerRight\":\r\n if (!isNeedAdaptHeight) {\r\n var tW = tbFirst ? extraHeight : extraWidth, tH = tbFirst ? extraWidth : extraHeight;\r\n if (BI.DOM.isInnerRightSpaceEnough(combo, popup, tW)) {\r\n left = BI.DOM.getInnerRightPosition(combo, popup, tW).left;\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,bottom\";\r\n } else {\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, tH, needAdaptHeight);\r\n pos.dir = \"innerRight,top\";\r\n }\r\n if (tbFirst) {\r\n pos.change = \"innerRight\";\r\n }\r\n pos.left = left;\r\n return pos;\r\n }\r\n }\r\n break;\r\n\r\n }\r\n }\r\n\r\n // 此处为四个方向放不下时挑空间最大的方向去放置, 也就是说我设置了弹出方向为\"bottom,left\",\r\n // 最后发现实际弹出方向可能是\"top,left\",那么此时外界获取popup的方向应该是\"top,left\"\r\n switch (directions[0]) {\r\n case \"left\":\r\n case \"right\":\r\n if (BI.DOM.isRightSpaceLarger(combo)) {\r\n left = BI.DOM.getRightAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"right\";\r\n } else {\r\n left = BI.DOM.getLeftAdaptPosition(combo, popup, extraWidth).left;\r\n firstDir = \"left\";\r\n }\r\n if (topBottom[0] === \"bottom\") {\r\n pos = BI.DOM.getTopAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",bottom\";\r\n return pos;\r\n }\r\n pos = BI.DOM.getBottomAlignPosition(combo, popup, extraHeight, needAdaptHeight);\r\n pos.left = left;\r\n pos.dir = firstDir + \",top\";\r\n return pos;\r\n default :\r\n if (BI.DOM.isBottomSpaceLarger(combo)) {\r\n pos = BI.DOM.getBottomAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"bottom\";\r\n } else {\r\n pos = BI.DOM.getTopAdaptPosition(combo, popup, extraHeight, needAdaptHeight);\r\n firstDir = \"top\";\r\n }\r\n if (leftRight[0] === \"right\") {\r\n left = BI.DOM.getLeftAlignPosition(combo, popup, extraWidth, needAdaptHeight).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",right\";\r\n return pos;\r\n }\r\n left = BI.DOM.getRightAlignPosition(combo, popup, extraWidth).left;\r\n pos.left = left;\r\n pos.dir = firstDir + \",left\";\r\n return pos;\r\n }\r\n },\r\n\r\n\r\n getComboPosition: function (combo, popup, extraWidth, extraHeight, needAdaptHeight, directions, offsetStyle) {\r\n extraWidth || (extraWidth = 0);\r\n extraHeight || (extraHeight = 0);\r\n var bodyHeight = BI.Widget._renderEngine.createElement(\"body\").bounds().height - extraHeight;\r\n var maxHeight = Math.min(popup.attr(\"maxHeight\") || bodyHeight, bodyHeight);\r\n popup.resetHeight && popup.resetHeight(maxHeight);\r\n var position = BI.DOM.getComboPositionByDirections(combo, popup, extraWidth, extraHeight, needAdaptHeight, directions || [\"bottom\", \"top\", \"right\", \"left\"]);\r\n switch (offsetStyle) {\r\n case \"center\":\r\n if (position.change) {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n } else {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n }\r\n break;\r\n case \"middle\":\r\n if (position.change) {\r\n var p = BI.DOM.getCenterAdaptPosition(combo, popup);\r\n position.left = p.left;\r\n } else {\r\n var p = BI.DOM.getMiddleAdaptPosition(combo, popup);\r\n position.top = p.top;\r\n }\r\n break;\r\n }\r\n if (needAdaptHeight === true) {\r\n popup.resetHeight && popup.resetHeight(Math.min(bodyHeight - position.top, maxHeight));\r\n }\r\n return position;\r\n }\r\n });\r\n})();\r\nBI.EventListener = {\r\n listen: function listen (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, false);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, false);\r\n }\r\n };\r\n } else if (target.attachEvent) {\r\n target.attachEvent(\"on\" + eventType, callback);\r\n return {\r\n remove: function remove () {\r\n target.detachEvent(\"on\" + eventType, callback);\r\n }\r\n };\r\n }\r\n },\r\n\r\n capture: function capture (target, eventType, callback) {\r\n if (target.addEventListener) {\r\n target.addEventListener(eventType, callback, true);\r\n return {\r\n remove: function remove () {\r\n target.removeEventListener(eventType, callback, true);\r\n }\r\n };\r\n }\r\n return {\r\n remove: BI.emptyFn\r\n };\r\n \r\n },\r\n\r\n registerDefault: function registerDefault () {\r\n }\r\n};// 浏览器相关方法\r\n_.extend(BI, {\r\n isIE: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n if (this.__isIE == null) {\r\n this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase());\r\n }\r\n return this.__isIE;\r\n },\r\n\r\n getIEVersion: function () {\r\n if(!_global.navigator) {\r\n return 0;\r\n }\r\n if (this.__IEVersion != null) {\r\n return this.__IEVersion;\r\n }\r\n var version = 0;\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n return this.__IEVersion = version;\r\n },\r\n\r\n isIE9Below: function () {\r\n if (!BI.isIE()) {\r\n return false;\r\n }\r\n return this.getIEVersion() < 9;\r\n },\r\n\r\n isEdge: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /edge/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isChrome: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isFireFox: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /firefox/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isOpera: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /opera/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isSafari: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /safari/i.test(navigator.userAgent.toLowerCase()) && !/chrome/i.test(navigator.userAgent.toLowerCase());\r\n },\r\n\r\n isKhtml: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n },\r\n\r\n isMac: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /macintosh|mac os x/i.test(navigator.userAgent);\r\n },\r\n\r\n isWindows: function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /windows|win32/i.test(navigator.userAgent);\r\n },\r\n\r\n isSupportCss3: function (style) {\r\n if(!_global.document) {\r\n return false;\r\n }\r\n var prefix = [\"webkit\", \"Moz\", \"ms\", \"o\"],\r\n i, len,\r\n humpString = [],\r\n htmlStyle = document.documentElement.style,\r\n _toHumb = function (string) {\r\n if (!BI.isString(string)) {\r\n return \"\";\r\n }\r\n\r\n return string.replace(/-(\\w)/g, function ($0, $1) {\r\n return $1.toUpperCase();\r\n });\r\n };\r\n\r\n for ( i = 0; i < prefix.length; i++) {\r\n humpString.push(_toHumb(prefix[i] + \"-\" + style));\r\n }\r\n humpString.push(_toHumb(style));\r\n\r\n for (i = 0, len = humpString.length; i < len; i++) {\r\n if (humpString[i] in htmlStyle) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n});/*!\r\n * jQuery JavaScript Library v1.9.1\r\n * http://jquery.com/\r\n *\r\n * Includes Sizzle.js\r\n * http://sizzlejs.com/\r\n *\r\n * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n *\r\n * Date: 2013-2-4\r\n */\r\n(function( window, undefined ) {\r\n\r\n// Can't do this because several apps including ASP.NET trace\r\n// the stack via arguments.caller.callee and Firefox dies if\r\n// you try to trace through \"use strict\" call chains. (#13335)\r\n// Support: Firefox 18+\r\n//\"use strict\";\r\nvar\r\n\t// The deferred used on DOM ready\r\n\treadyList,\r\n\r\n\t// A central reference to the root jQuery(document)\r\n\trootjQuery,\r\n\r\n\t// Support: IE<9\r\n\t// For `typeof node.method` instead of `node.method !== undefined`\r\n\tcore_strundefined = typeof undefined,\r\n\r\n\t// Use the correct document accordingly with window argument (sandbox)\r\n\tdocument = window.document,\r\n\tlocation = window.location,\r\n\r\n\t// Map over jQuery in case of overwrite\r\n\t_jQuery = window.jQuery,\r\n\r\n\t// Map over the $ in case of overwrite\r\n\t_$ = window.$,\r\n\r\n\t// [[Class]] -> type pairs\r\n\tclass2type = {},\r\n\r\n\t// List of deleted data cache ids, so we can reuse them\r\n\tcore_deletedIds = [],\r\n\r\n\tcore_version = \"1.12.4\",\r\n\r\n\t// Save a reference to some core methods\r\n\tcore_concat = core_deletedIds.concat,\r\n\tcore_push = core_deletedIds.push,\r\n\tcore_slice = core_deletedIds.slice,\r\n\tcore_indexOf = core_deletedIds.indexOf,\r\n\tcore_toString = class2type.toString,\r\n\tcore_hasOwn = class2type.hasOwnProperty,\r\n\tcore_trim = core_version.trim,\r\n\r\n\t// Define a local copy of jQuery\r\n\tjQuery = function( selector, context ) {\r\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\r\n\t\treturn new jQuery.fn.init( selector, context, rootjQuery );\r\n\t},\r\n\r\n\t// Used for matching numbers\r\n\tcore_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source,\r\n\r\n\t// Used for splitting on whitespace\r\n\tcore_rnotwhite = /\\S+/g,\r\n\r\n\t// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)\r\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\r\n\r\n\t// A simple way to check for HTML strings\r\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\r\n\t// Strict HTML recognition (#11290: must start with <)\r\n\trquickExpr = /^(?:(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\r\n\r\n\t// Match a standalone tag\r\n\trsingleTag = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\r\n\r\n\t// JSON RegExp\r\n\trvalidchars = /^[\\],:{}\\s]*$/,\r\n\trvalidbraces = /(?:^|:|,)(?:\\s*\\[)+/g,\r\n\trvalidescape = /\\\\(?:[\"\\\\\\/bfnrt]|u[\\da-fA-F]{4})/g,\r\n\trvalidtokens = /\"[^\"\\\\\\r\\n]*\"|true|false|null|-?(?:\\d+\\.|)\\d+(?:[eE][+-]?\\d+|)/g,\r\n\r\n\t// Matches dashed string for camelizing\r\n\trmsPrefix = /^-ms-/,\r\n\trdashAlpha = /-([\\da-z])/gi,\r\n\r\n\t// Used by jQuery.camelCase as callback to replace()\r\n\tfcamelCase = function( all, letter ) {\r\n\t\treturn letter.toUpperCase();\r\n\t},\r\n\r\n\t// The ready event handler\r\n\tcompleted = function( event ) {\r\n\r\n\t\t// readyState === \"complete\" is good enough for us to call the dom ready in oldIE\r\n\t\tif ( document.addEventListener || event.type === \"load\" || document.readyState === \"complete\" ) {\r\n\t\t\tdetach();\r\n\t\t\tjQuery.ready();\r\n\t\t}\r\n\t},\r\n\t// Clean-up method for dom ready events\r\n\tdetach = function() {\r\n\t\tif ( document.addEventListener ) {\r\n\t\t\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\r\n\t\t\twindow.removeEventListener( \"load\", completed, false );\r\n\r\n\t\t} else {\r\n\t\t\tdocument.detachEvent( \"onreadystatechange\", completed );\r\n\t\t\twindow.detachEvent( \"onload\", completed );\r\n\t\t}\r\n\t};\r\n\r\njQuery.fn = jQuery.prototype = {\r\n\t// The current version of jQuery being used\r\n\tjquery: core_version,\r\n\r\n\tconstructor: jQuery,\r\n\tinit: function( selector, context, rootjQuery ) {\r\n\t\tvar match, elem;\r\n\r\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\r\n\t\tif ( !selector ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\t// Handle HTML strings\r\n\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\tif ( selector.charAt(0) === \"<\" && selector.charAt( selector.length - 1 ) === \">\" && selector.length >= 3 ) {\r\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\r\n\t\t\t\tmatch = [ null, selector, null ];\r\n\r\n\t\t\t} else {\r\n\t\t\t\tmatch = rquickExpr.exec( selector );\r\n\t\t\t}\r\n\r\n\t\t\t// Match html or make sure no context is specified for #id\r\n\t\t\tif ( match && (match[1] || !context) ) {\r\n\r\n\t\t\t\t// HANDLE: $(html) -> $(array)\r\n\t\t\t\tif ( match[1] ) {\r\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\r\n\r\n\t\t\t\t\t// scripts is true for back-compat\r\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\r\n\t\t\t\t\t\tmatch[1],\r\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\r\n\t\t\t\t\t\ttrue\r\n\t\t\t\t\t) );\r\n\r\n\t\t\t\t\t// HANDLE: $(html, props)\r\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\r\n\t\t\t\t\t\tfor ( match in context ) {\r\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\r\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\r\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\r\n\r\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn this;\r\n\r\n\t\t\t\t// HANDLE: $(#id)\r\n\t\t\t\t} else {\r\n\t\t\t\t\telem = document.getElementById( match[2] );\r\n\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE and Opera return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id !== match[2] ) {\r\n\t\t\t\t\t\t\treturn rootjQuery.find( selector );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\r\n\t\t\t\t\t\tthis.length = 1;\r\n\t\t\t\t\t\tthis[0] = elem;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tthis.context = document;\r\n\t\t\t\t\tthis.selector = selector;\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\r\n\t\t\t// HANDLE: $(expr, $(...))\r\n\t\t\t} else if ( !context || context.jquery ) {\r\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\r\n\r\n\t\t\t// HANDLE: $(expr, context)\r\n\t\t\t// (which is just equivalent to: $(context).find(expr)\r\n\t\t\t} else {\r\n\t\t\t\treturn this.constructor( context ).find( selector );\r\n\t\t\t}\r\n\r\n\t\t// HANDLE: $(DOMElement)\r\n\t\t} else if ( selector.nodeType ) {\r\n\t\t\tthis.context = this[0] = selector;\r\n\t\t\tthis.length = 1;\r\n\t\t\treturn this;\r\n\r\n\t\t// HANDLE: $(function)\r\n\t\t// Shortcut for document ready\r\n\t\t} else if ( jQuery.isFunction( selector ) ) {\r\n\t\t\treturn rootjQuery.ready( selector );\r\n\t\t}\r\n\r\n\t\tif ( selector.selector !== undefined ) {\r\n\t\t\tthis.selector = selector.selector;\r\n\t\t\tthis.context = selector.context;\r\n\t\t}\r\n\r\n\t\treturn jQuery.makeArray( selector, this );\r\n\t},\r\n\r\n\t// Start with an empty selector\r\n\tselector: \"\",\r\n\r\n\t// The default length of a jQuery object is 0\r\n\tlength: 0,\r\n\r\n\t// The number of elements contained in the matched element set\r\n\tsize: function() {\r\n\t\treturn this.length;\r\n\t},\r\n\r\n\ttoArray: function() {\r\n\t\treturn core_slice.call( this );\r\n\t},\r\n\r\n\t// Get the Nth element in the matched element set OR\r\n\t// Get the whole matched element set as a clean array\r\n\tget: function( num ) {\r\n\t\treturn num == null ?\r\n\r\n\t\t\t// Return a 'clean' array\r\n\t\t\tthis.toArray() :\r\n\r\n\t\t\t// Return just the object\r\n\t\t\t( num < 0 ? this[ this.length + num ] : this[ num ] );\r\n\t},\r\n\r\n\t// Take an array of elements and push it onto the stack\r\n\t// (returning the new matched element set)\r\n\tpushStack: function( elems ) {\r\n\r\n\t\t// Build a new jQuery matched element set\r\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\r\n\r\n\t\t// Add the old object onto the stack (as a reference)\r\n\t\tret.prevObject = this;\r\n\t\tret.context = this.context;\r\n\r\n\t\t// Return the newly-formed element set\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// Execute a callback for every element in the matched set.\r\n\t// (You can seed the arguments with an array of args, but this is\r\n\t// only used internally.)\r\n\teach: function( callback, args ) {\r\n\t\treturn jQuery.each( this, callback, args );\r\n\t},\r\n\r\n\tready: function( fn ) {\r\n\t\t// Add the callback\r\n\t\tjQuery.ready.promise().done( fn );\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tslice: function() {\r\n\t\treturn this.pushStack( core_slice.apply( this, arguments ) );\r\n\t},\r\n\r\n\tfirst: function() {\r\n\t\treturn this.eq( 0 );\r\n\t},\r\n\r\n\tlast: function() {\r\n\t\treturn this.eq( -1 );\r\n\t},\r\n\r\n\teq: function( i ) {\r\n\t\tvar len = this.length,\r\n\t\t\tj = +i + ( i < 0 ? len : 0 );\r\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\r\n\t},\r\n\r\n\tmap: function( callback ) {\r\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\r\n\t\t\treturn callback.call( elem, i, elem );\r\n\t\t}));\r\n\t},\r\n\r\n\tend: function() {\r\n\t\treturn this.prevObject || this.constructor(null);\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t// Behaves like an Array's method, not like a jQuery method.\r\n\tpush: core_push,\r\n\tsort: [].sort,\r\n\tsplice: [].splice\r\n};\r\n\r\n// Give the init function the jQuery prototype for later instantiation\r\njQuery.fn.init.prototype = jQuery.fn;\r\n\r\njQuery.extend = jQuery.fn.extend = function() {\r\n\tvar src, copyIsArray, copy, name, options, clone,\r\n\t\ttarget = arguments[0] || {},\r\n\t\ti = 1,\r\n\t\tlength = arguments.length,\r\n\t\tdeep = false;\r\n\r\n\t// Handle a deep copy situation\r\n\tif ( typeof target === \"boolean\" ) {\r\n\t\tdeep = target;\r\n\t\ttarget = arguments[1] || {};\r\n\t\t// skip the boolean and the target\r\n\t\ti = 2;\r\n\t}\r\n\r\n\t// Handle case when target is a string or something (possible in deep copy)\r\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\r\n\t\ttarget = {};\r\n\t}\r\n\r\n\t// extend jQuery itself if only one argument is passed\r\n\tif ( length === i ) {\r\n\t\ttarget = this;\r\n\t\t--i;\r\n\t}\r\n\r\n\tfor ( ; i < length; i++ ) {\r\n\t\t// Only deal with non-null/undefined values\r\n\t\tif ( (options = arguments[ i ]) != null ) {\r\n\t\t\t// Extend the base object\r\n\t\t\tfor ( name in options ) {\r\n\t\t\t\tsrc = target[ name ];\r\n\t\t\t\tcopy = options[ name ];\r\n\r\n\t\t\t\t// Prevent never-ending loop\r\n\t\t\t\tif ( target === copy ) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Recurse if we're merging plain objects or arrays\r\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\r\n\t\t\t\t\tif ( copyIsArray ) {\r\n\t\t\t\t\t\tcopyIsArray = false;\r\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Never move original objects, clone them\r\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\r\n\r\n\t\t\t\t// Don't bring in undefined values\r\n\t\t\t\t} else if ( copy !== undefined ) {\r\n\t\t\t\t\ttarget[ name ] = copy;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the modified object\r\n\treturn target;\r\n};\r\n\r\njQuery.extend({\r\n\tnoConflict: function( deep ) {\r\n\t\tif ( window.$ === jQuery ) {\r\n\t\t\twindow.$ = _$;\r\n\t\t}\r\n\r\n\t\tif ( deep && window.jQuery === jQuery ) {\r\n\t\t\twindow.jQuery = _jQuery;\r\n\t\t}\r\n\r\n\t\treturn jQuery;\r\n\t},\r\n\r\n\t// Is the DOM ready to be used? Set to true once it occurs.\r\n\tisReady: false,\r\n\r\n\t// A counter to track how many items to wait for before\r\n\t// the ready event fires. See #6781\r\n\treadyWait: 1,\r\n\r\n\t// Hold (or release) the ready event\r\n\tholdReady: function( hold ) {\r\n\t\tif ( hold ) {\r\n\t\t\tjQuery.readyWait++;\r\n\t\t} else {\r\n\t\t\tjQuery.ready( true );\r\n\t\t}\r\n\t},\r\n\r\n\t// Handle when the DOM is ready\r\n\tready: function( wait ) {\r\n\r\n\t\t// Abort if there are pending holds or we're already ready\r\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).\r\n\t\tif ( !document.body ) {\r\n\t\t\treturn setTimeout( jQuery.ready );\r\n\t\t}\r\n\r\n\t\t// Remember that the DOM is ready\r\n\t\tjQuery.isReady = true;\r\n\r\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\r\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If there are functions bound, to execute\r\n\t\treadyList.resolveWith( document, [ jQuery ] );\r\n\r\n\t\t// Trigger any bound ready events\r\n\t\tif ( jQuery.fn.trigger ) {\r\n\t\t\tjQuery( document ).trigger(\"ready\").off(\"ready\");\r\n\t\t}\r\n\t},\r\n\r\n\t// See test/unit/core.js for details concerning isFunction.\r\n\t// Since version 1.3, DOM methods and functions like alert\r\n\t// aren't supported. They return false on IE (#2968).\r\n\tisFunction: function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"function\";\r\n\t},\r\n\r\n\tisArray: Array.isArray || function( obj ) {\r\n\t\treturn jQuery.type(obj) === \"array\";\r\n\t},\r\n\r\n\tisWindow: function( obj ) {\r\n\t\treturn obj != null && obj == obj.window;\r\n\t},\r\n\r\n\tisNumeric: function( obj ) {\r\n\t\treturn !isNaN( parseFloat(obj) ) && isFinite( obj );\r\n\t},\r\n\r\n\ttype: function( obj ) {\r\n\t\tif ( obj == null ) {\r\n\t\t\treturn String( obj );\r\n\t\t}\r\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\r\n\t\t\tclass2type[ core_toString.call(obj) ] || \"object\" :\r\n\t\t\ttypeof obj;\r\n\t},\r\n\r\n\tisPlainObject: function( obj ) {\r\n\t\t// Must be an Object.\r\n\t\t// Because of IE, we also have to check the presence of the constructor property.\r\n\t\t// Make sure that DOM nodes and window objects don't pass through, as well\r\n\t\tif ( !obj || jQuery.type(obj) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// Not own constructor property must be Object\r\n\t\t\tif ( obj.constructor &&\r\n\t\t\t\t!core_hasOwn.call(obj, \"constructor\") &&\r\n\t\t\t\t!core_hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\") ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch ( e ) {\r\n\t\t\t// IE8,9 Will throw exceptions on certain host objects #9897\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Own properties are enumerated firstly, so to speed up,\r\n\t\t// if last one is own, then all properties are own.\r\n\r\n\t\tvar key;\r\n\t\tfor ( key in obj ) {}\r\n\r\n\t\treturn key === undefined || core_hasOwn.call( obj, key );\r\n\t},\r\n\r\n\tisEmptyObject: function( obj ) {\r\n\t\tvar name;\r\n\t\tfor ( name in obj ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t},\r\n\r\n\terror: function( msg ) {\r\n\t\tthrow new Error( msg );\r\n\t},\r\n\r\n\t// data: string of html\r\n\t// context (optional): If specified, the fragment will be created in this context, defaults to document\r\n\t// keepScripts (optional): If true, will include scripts passed in the html string\r\n\tparseHTML: function( data, context, keepScripts ) {\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif ( typeof context === \"boolean\" ) {\r\n\t\t\tkeepScripts = context;\r\n\t\t\tcontext = false;\r\n\t\t}\r\n\t\tcontext = context || document;\r\n\r\n\t\tvar parsed = rsingleTag.exec( data ),\r\n\t\t\tscripts = !keepScripts && [];\r\n\r\n\t\t// Single tag\r\n\t\tif ( parsed ) {\r\n\t\t\treturn [ context.createElement( parsed[1] ) ];\r\n\t\t}\r\n\r\n\t\tparsed = jQuery.buildFragment( [ data ], context, scripts );\r\n\t\tif ( scripts ) {\r\n\t\t\tjQuery( scripts ).remove();\r\n\t\t}\r\n\t\treturn jQuery.merge( [], parsed.childNodes );\r\n\t},\r\n\r\n\tparseJSON: function( data ) {\r\n\t\t// Attempt to parse using the native JSON parser first\r\n\t\tif ( window.JSON && window.JSON.parse ) {\r\n\t\t\treturn window.JSON.parse( data );\r\n\t\t}\r\n\r\n\t\tif ( data === null ) {\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\r\n\t\t\t// Make sure leading/trailing whitespace is removed (IE can't handle it)\r\n\t\t\tdata = jQuery.trim( data );\r\n\r\n\t\t\tif ( data ) {\r\n\t\t\t\t// Make sure the incoming data is actual JSON\r\n\t\t\t\t// Logic borrowed from http://json.org/json2.js\r\n\t\t\t\tif ( rvalidchars.test( data.replace( rvalidescape, \"@\" )\r\n\t\t\t\t\t.replace( rvalidtokens, \"]\" )\r\n\t\t\t\t\t.replace( rvalidbraces, \"\")) ) {\r\n\r\n\t\t\t\t\treturn ( new Function( \"return \" + data ) )();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tjQuery.error( \"Invalid JSON: \" + data );\r\n\t},\r\n\r\n\t// Cross-browser xml parsing\r\n\tparseXML: function( data ) {\r\n\t\tvar xml, tmp;\r\n\t\tif ( !data || typeof data !== \"string\" ) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif ( window.DOMParser ) { // Standard\r\n\t\t\t\ttmp = new DOMParser();\r\n\t\t\t\txml = tmp.parseFromString( data , \"text/xml\" );\r\n\t\t\t} else { // IE\r\n\t\t\t\txml = new ActiveXObject( \"Microsoft.XMLDOM\" );\r\n\t\t\t\txml.async = \"false\";\r\n\t\t\t\txml.loadXML( data );\r\n\t\t\t}\r\n\t\t} catch( e ) {\r\n\t\t\txml = undefined;\r\n\t\t}\r\n\t\tif ( !xml || !xml.documentElement || xml.getElementsByTagName( \"parsererror\" ).length ) {\r\n\t\t\tjQuery.error( \"Invalid XML: \" + data );\r\n\t\t}\r\n\t\treturn xml;\r\n\t},\r\n\r\n\tnoop: function() {},\r\n\r\n\t// Evaluates a script in a global context\r\n\t// Workarounds based on findings by Jim Driscoll\r\n\t// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context\r\n\tglobalEval: function( data ) {\r\n\t\tif ( data && jQuery.trim( data ) ) {\r\n\t\t\t// We use execScript on Internet Explorer\r\n\t\t\t// We use an anonymous function so that context is window\r\n\t\t\t// rather than jQuery in Firefox\r\n\t\t\t( window.execScript || function( data ) {\r\n\t\t\t\twindow[ \"eval\" ].call( window, data );\r\n\t\t\t} )( data );\r\n\t\t}\r\n\t},\r\n\r\n\t// Convert dashed to camelCase; used by the css and data modules\r\n\t// Microsoft forgot to hump their vendor prefix (#9572)\r\n\tcamelCase: function( string ) {\r\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\r\n\t},\r\n\r\n\tnodeName: function( elem, name ) {\r\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\r\n\t},\r\n\r\n\t// args is for internal usage only\r\n\teach: function( obj, callback, args ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = obj.length,\r\n\t\t\tisArray = isArraylike( obj );\r\n\r\n\t\tif ( args ) {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// A special, fast, case for the most common use of each\r\n\t\t} else {\r\n\t\t\tif ( isArray ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( i in obj ) {\r\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\r\n\r\n\t\t\t\t\tif ( value === false ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn obj;\r\n\t},\r\n\r\n\t// Use native String.trim function wherever possible\r\n\ttrim: core_trim && !core_trim.call(\"\\uFEFF\\xA0\") ?\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\tcore_trim.call( text );\r\n\t\t} :\r\n\r\n\t\t// Otherwise use our own trimming functionality\r\n\t\tfunction( text ) {\r\n\t\t\treturn text == null ?\r\n\t\t\t\t\"\" :\r\n\t\t\t\t( text + \"\" ).replace( rtrim, \"\" );\r\n\t\t},\r\n\r\n\t// results is for internal usage only\r\n\tmakeArray: function( arr, results ) {\r\n\t\tvar ret = results || [];\r\n\r\n\t\tif ( arr != null ) {\r\n\t\t\tif ( isArraylike( Object(arr) ) ) {\r\n\t\t\t\tjQuery.merge( ret,\r\n\t\t\t\t\ttypeof arr === \"string\" ?\r\n\t\t\t\t\t[ arr ] : arr\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tcore_push.call( ret, arr );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\tinArray: function( elem, arr, i ) {\r\n\t\tvar len;\r\n\r\n\t\tif ( arr ) {\r\n\t\t\tif ( core_indexOf ) {\r\n\t\t\t\treturn core_indexOf.call( arr, elem, i );\r\n\t\t\t}\r\n\r\n\t\t\tlen = arr.length;\r\n\t\t\ti = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t// Skip accessing in sparse arrays\r\n\t\t\t\tif ( i in arr && arr[ i ] === elem ) {\r\n\t\t\t\t\treturn i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn -1;\r\n\t},\r\n\r\n\tmerge: function( first, second ) {\r\n\t\tvar l = second.length,\r\n\t\t\ti = first.length,\r\n\t\t\tj = 0;\r\n\r\n\t\tif ( typeof l === \"number\" ) {\r\n\t\t\tfor ( ; j < l; j++ ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j ];\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\twhile ( second[j] !== undefined ) {\r\n\t\t\t\tfirst[ i++ ] = second[ j++ ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfirst.length = i;\r\n\r\n\t\treturn first;\r\n\t},\r\n\r\n\tgrep: function( elems, callback, inv ) {\r\n\t\tvar retVal,\r\n\t\t\tret = [],\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length;\r\n\t\tinv = !!inv;\r\n\r\n\t\t// Go through the array, only saving the items\r\n\t\t// that pass the validator function\r\n\t\tfor ( ; i < length; i++ ) {\r\n\t\t\tretVal = !!callback( elems[ i ], i );\r\n\t\t\tif ( inv !== retVal ) {\r\n\t\t\t\tret.push( elems[ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t},\r\n\r\n\t// arg is for internal usage only\r\n\tmap: function( elems, callback, arg ) {\r\n\t\tvar value,\r\n\t\t\ti = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tisArray = isArraylike( elems ),\r\n\t\t\tret = [];\r\n\r\n\t\t// Go through the array, translating each of the items to their\r\n\t\tif ( isArray ) {\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Go through every key on the object,\r\n\t\t} else {\r\n\t\t\tfor ( i in elems ) {\r\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\r\n\r\n\t\t\t\tif ( value != null ) {\r\n\t\t\t\t\tret[ ret.length ] = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\treturn core_concat.apply( [], ret );\r\n\t},\r\n\r\n\t// A global GUID counter for objects\r\n\tguid: 1,\r\n\r\n\t// Bind a function to a context, optionally partially applying any\r\n\t// arguments.\r\n\tproxy: function( fn, context ) {\r\n\t\tvar args, proxy, tmp;\r\n\r\n\t\tif ( typeof context === \"string\" ) {\r\n\t\t\ttmp = fn[ context ];\r\n\t\t\tcontext = fn;\r\n\t\t\tfn = tmp;\r\n\t\t}\r\n\r\n\t\t// Quick check to determine if target is callable, in the spec\r\n\t\t// this throws a TypeError, but we will just return undefined.\r\n\t\tif ( !jQuery.isFunction( fn ) ) {\r\n\t\t\treturn undefined;\r\n\t\t}\r\n\r\n\t\t// Simulated bind\r\n\t\targs = core_slice.call( arguments, 2 );\r\n\t\tproxy = function() {\r\n\t\t\treturn fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );\r\n\t\t};\r\n\r\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\r\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\r\n\r\n\t\treturn proxy;\r\n\t},\r\n\r\n\t// Multifunctional method to get and set values of a collection\r\n\t// The value/s can optionally be executed if it's a function\r\n\taccess: function( elems, fn, key, value, chainable, emptyGet, raw ) {\r\n\t\tvar i = 0,\r\n\t\t\tlength = elems.length,\r\n\t\t\tbulk = key == null;\r\n\r\n\t\t// Sets many values\r\n\t\tif ( jQuery.type( key ) === \"object\" ) {\r\n\t\t\tchainable = true;\r\n\t\t\tfor ( i in key ) {\r\n\t\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\r\n\t\t\t}\r\n\r\n\t\t// Sets one value\r\n\t\t} else if ( value !== undefined ) {\r\n\t\t\tchainable = true;\r\n\r\n\t\t\tif ( !jQuery.isFunction( value ) ) {\r\n\t\t\t\traw = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ( bulk ) {\r\n\t\t\t\t// Bulk operations run against the entire set\r\n\t\t\t\tif ( raw ) {\r\n\t\t\t\t\tfn.call( elems, value );\r\n\t\t\t\t\tfn = null;\r\n\r\n\t\t\t\t// ...except when executing function values\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbulk = fn;\r\n\t\t\t\t\tfn = function( elem, key, value ) {\r\n\t\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( fn ) {\r\n\t\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn chainable ?\r\n\t\t\telems :\r\n\r\n\t\t\t// Gets\r\n\t\t\tbulk ?\r\n\t\t\t\tfn.call( elems ) :\r\n\t\t\t\tlength ? fn( elems[0], key ) : emptyGet;\r\n\t},\r\n\r\n\tnow: function() {\r\n\t\treturn ( new Date() ).getTime();\r\n\t}\r\n});\r\n\r\njQuery.ready.promise = function( obj ) {\r\n\tif ( !readyList ) {\r\n\r\n\t\treadyList = jQuery.Deferred();\r\n\r\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\r\n\t\t// we once tried to use readyState \"interactive\" here, but it caused issues like the one\r\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\r\n\t\tif ( document.readyState === \"complete\" ) {\r\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\r\n\t\t\tsetTimeout( jQuery.ready );\r\n\r\n\t\t// Standards-based browsers support DOMContentLoaded\r\n\t\t} else if ( document.addEventListener ) {\r\n\t\t\t// Use the handy event callback\r\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.addEventListener( \"load\", completed, false );\r\n\r\n\t\t// If IE event model is used\r\n\t\t} else {\r\n\t\t\t// Ensure firing before onload, maybe late but safe also for iframes\r\n\t\t\tdocument.attachEvent( \"onreadystatechange\", completed );\r\n\r\n\t\t\t// A fallback to window.onload, that will always work\r\n\t\t\twindow.attachEvent( \"onload\", completed );\r\n\r\n\t\t\t// If IE and not a frame\r\n\t\t\t// continually check to see if the document is ready\r\n\t\t\tvar top = false;\r\n\r\n\t\t\ttry {\r\n\t\t\t\ttop = window.frameElement == null && document.documentElement;\r\n\t\t\t} catch(e) {}\r\n\r\n\t\t\tif ( top && top.doScroll ) {\r\n\t\t\t\t(function doScrollCheck() {\r\n\t\t\t\t\tif ( !jQuery.isReady ) {\r\n\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// Use the trick by Diego Perini\r\n\t\t\t\t\t\t\t// http://javascript.nwbox.com/IEContentLoaded/\r\n\t\t\t\t\t\t\ttop.doScroll(\"left\");\r\n\t\t\t\t\t\t} catch(e) {\r\n\t\t\t\t\t\t\treturn setTimeout( doScrollCheck, 50 );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// detach all dom ready events\r\n\t\t\t\t\t\tdetach();\r\n\r\n\t\t\t\t\t\t// and execute any waiting functions\r\n\t\t\t\t\t\tjQuery.ready();\r\n\t\t\t\t\t}\r\n\t\t\t\t})();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn readyList.promise( obj );\r\n};\r\n\r\n// Populate the class2type map\r\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\r\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\r\n});\r\n\r\nfunction isArraylike( obj ) {\r\n\tvar length = obj.length,\r\n\t\ttype = jQuery.type( obj );\r\n\r\n\tif ( jQuery.isWindow( obj ) ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif ( obj.nodeType === 1 && length ) {\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn type === \"array\" || type !== \"function\" &&\r\n\t\t( length === 0 ||\r\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj );\r\n}\r\n\r\n// All jQuery objects should point back to these\r\nrootjQuery = jQuery(document);\r\n// String to Object options format cache\r\nvar optionsCache = {};\r\n\r\n// Convert String-formatted options into Object-formatted ones and store in cache\r\nfunction createOptions( options ) {\r\n\tvar object = optionsCache[ options ] = {};\r\n\tjQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {\r\n\t\tobject[ flag ] = true;\r\n\t});\r\n\treturn object;\r\n}\r\n\r\n/*\r\n * Create a callback list using the following parameters:\r\n *\r\n *\toptions: an optional list of space-separated options that will change how\r\n *\t\t\tthe callback list behaves or a more traditional option object\r\n *\r\n * By default a callback list will act like an event callback list and can be\r\n * \"fired\" multiple times.\r\n *\r\n * Possible options:\r\n *\r\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\r\n *\r\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\r\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\r\n *\t\t\t\t\tvalues (like a Deferred)\r\n *\r\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\r\n *\r\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\r\n *\r\n */\r\njQuery.Callbacks = function( options ) {\r\n\r\n\t// Convert options from String-formatted to Object-formatted if needed\r\n\t// (we check in cache first)\r\n\toptions = typeof options === \"string\" ?\r\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\r\n\t\tjQuery.extend( {}, options );\r\n\r\n\tvar // Flag to know if list is currently firing\r\n\t\tfiring,\r\n\t\t// Last fire value (for non-forgettable lists)\r\n\t\tmemory,\r\n\t\t// Flag to know if list was already fired\r\n\t\tfired,\r\n\t\t// End of the loop when firing\r\n\t\tfiringLength,\r\n\t\t// Index of currently firing callback (modified by remove if needed)\r\n\t\tfiringIndex,\r\n\t\t// First callback to fire (used internally by add and fireWith)\r\n\t\tfiringStart,\r\n\t\t// Actual callback list\r\n\t\tlist = [],\r\n\t\t// Stack of fire calls for repeatable lists\r\n\t\tstack = !options.once && [],\r\n\t\t// Fire callbacks\r\n\t\tfire = function( data ) {\r\n\t\t\tmemory = options.memory && data;\r\n\t\t\tfired = true;\r\n\t\t\tfiringIndex = firingStart || 0;\r\n\t\t\tfiringStart = 0;\r\n\t\t\tfiringLength = list.length;\r\n\t\t\tfiring = true;\r\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\r\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\r\n\t\t\t\t\tmemory = false; // To prevent further calls using add\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfiring = false;\r\n\t\t\tif ( list ) {\r\n\t\t\t\tif ( stack ) {\r\n\t\t\t\t\tif ( stack.length ) {\r\n\t\t\t\t\t\tfire( stack.shift() );\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\tlist = [];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\t// Actual Callbacks object\r\n\t\tself = {\r\n\t\t\t// Add a callback or a collection of callbacks to the list\r\n\t\t\tadd: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\t// First, we save the current length\r\n\t\t\t\t\tvar start = list.length;\r\n\t\t\t\t\t(function add( args ) {\r\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\r\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\r\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\r\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\r\n\t\t\t\t\t\t\t\t\tlist.push( arg );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\r\n\t\t\t\t\t\t\t\t// Inspect recursively\r\n\t\t\t\t\t\t\t\tadd( arg );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t})( arguments );\r\n\t\t\t\t\t// Do we need to add the callbacks to the\r\n\t\t\t\t\t// current firing batch?\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tfiringLength = list.length;\r\n\t\t\t\t\t// With memory, if we're not firing then\r\n\t\t\t\t\t// we should call right away\r\n\t\t\t\t\t} else if ( memory ) {\r\n\t\t\t\t\t\tfiringStart = start;\r\n\t\t\t\t\t\tfire( memory );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Remove a callback from the list\r\n\t\t\tremove: function() {\r\n\t\t\t\tif ( list ) {\r\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\r\n\t\t\t\t\t\tvar index;\r\n\t\t\t\t\t\twhile( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\r\n\t\t\t\t\t\t\tlist.splice( index, 1 );\r\n\t\t\t\t\t\t\t// Handle firing indexes\r\n\t\t\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\r\n\t\t\t\t\t\t\t\t\tfiringLength--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\r\n\t\t\t\t\t\t\t\t\tfiringIndex--;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Check if a given callback is in the list.\r\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\r\n\t\t\thas: function( fn ) {\r\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\r\n\t\t\t},\r\n\t\t\t// Remove all callbacks from the list\r\n\t\t\tempty: function() {\r\n\t\t\t\tlist = [];\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Have the list do nothing anymore\r\n\t\t\tdisable: function() {\r\n\t\t\t\tlist = stack = memory = undefined;\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it disabled?\r\n\t\t\tdisabled: function() {\r\n\t\t\t\treturn !list;\r\n\t\t\t},\r\n\t\t\t// Lock the list in its current state\r\n\t\t\tlock: function() {\r\n\t\t\t\tstack = undefined;\r\n\t\t\t\tif ( !memory ) {\r\n\t\t\t\t\tself.disable();\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Is it locked?\r\n\t\t\tlocked: function() {\r\n\t\t\t\treturn !stack;\r\n\t\t\t},\r\n\t\t\t// Call all callbacks with the given context and arguments\r\n\t\t\tfireWith: function( context, args ) {\r\n\t\t\t\targs = args || [];\r\n\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\r\n\t\t\t\tif ( list && ( !fired || stack ) ) {\r\n\t\t\t\t\tif ( firing ) {\r\n\t\t\t\t\t\tstack.push( args );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfire( args );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// Call all the callbacks with the given arguments\r\n\t\t\tfire: function() {\r\n\t\t\t\tself.fireWith( this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t},\r\n\t\t\t// To know if the callbacks have already been called at least once\r\n\t\t\tfired: function() {\r\n\t\t\t\treturn !!fired;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\treturn self;\r\n};\r\njQuery.extend({\r\n\r\n\tDeferred: function( func ) {\r\n\t\tvar tuples = [\r\n\t\t\t\t// action, add listener, listener list, final state\r\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\r\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\r\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\r\n\t\t\t],\r\n\t\t\tstate = \"pending\",\r\n\t\t\tpromise = {\r\n\t\t\t\tstate: function() {\r\n\t\t\t\t\treturn state;\r\n\t\t\t\t},\r\n\t\t\t\talways: function() {\r\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\r\n\t\t\t\t\tvar fns = arguments;\r\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\r\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\t\t\t\t\tvar action = tuple[ 0 ],\r\n\t\t\t\t\t\t\t\tfn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\r\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\r\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\r\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\r\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\r\n\t\t\t\t\t\t\t\t\treturned.promise()\r\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\r\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\r\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnewDefer[ action + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfns = null;\r\n\t\t\t\t\t}).promise();\r\n\t\t\t\t},\r\n\t\t\t\t// Get a promise for this deferred\r\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\r\n\t\t\t\tpromise: function( obj ) {\r\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdeferred = {};\r\n\r\n\t\t// Keep pipe for back-compat\r\n\t\tpromise.pipe = promise.then;\r\n\r\n\t\t// Add list-specific methods\r\n\t\tjQuery.each( tuples, function( i, tuple ) {\r\n\t\t\tvar list = tuple[ 2 ],\r\n\t\t\t\tstateString = tuple[ 3 ];\r\n\r\n\t\t\t// promise[ done | fail | progress ] = list.add\r\n\t\t\tpromise[ tuple[1] ] = list.add;\r\n\r\n\t\t\t// Handle state\r\n\t\t\tif ( stateString ) {\r\n\t\t\t\tlist.add(function() {\r\n\t\t\t\t\t// state = [ resolved | rejected ]\r\n\t\t\t\t\tstate = stateString;\r\n\r\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\r\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\r\n\t\t\t}\r\n\r\n\t\t\t// deferred[ resolve | reject | notify ]\r\n\t\t\tdeferred[ tuple[0] ] = function() {\r\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\r\n\t\t\t\treturn this;\r\n\t\t\t};\r\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\r\n\t\t});\r\n\r\n\t\t// Make the deferred a promise\r\n\t\tpromise.promise( deferred );\r\n\r\n\t\t// Call given func if any\r\n\t\tif ( func ) {\r\n\t\t\tfunc.call( deferred, deferred );\r\n\t\t}\r\n\r\n\t\t// All done!\r\n\t\treturn deferred;\r\n\t},\r\n\r\n\t// Deferred helper\r\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\r\n\t\tvar i = 0,\r\n\t\t\tresolveValues = core_slice.call( arguments ),\r\n\t\t\tlength = resolveValues.length,\r\n\r\n\t\t\t// the count of uncompleted subordinates\r\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\r\n\r\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\r\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\r\n\r\n\t\t\t// Update function for both resolve and progress values\r\n\t\t\tupdateFunc = function( i, contexts, values ) {\r\n\t\t\t\treturn function( value ) {\r\n\t\t\t\t\tcontexts[ i ] = this;\r\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;\r\n\t\t\t\t\tif( values === progressValues ) {\r\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\r\n\t\t\t\t\t} else if ( !( --remaining ) ) {\r\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t},\r\n\r\n\t\t\tprogressValues, progressContexts, resolveContexts;\r\n\r\n\t\t// add listeners to Deferred subordinates; treat others as resolved\r\n\t\tif ( length > 1 ) {\r\n\t\t\tprogressValues = new Array( length );\r\n\t\t\tprogressContexts = new Array( length );\r\n\t\t\tresolveContexts = new Array( length );\r\n\t\t\tfor ( ; i < length; i++ ) {\r\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\r\n\t\t\t\t\tresolveValues[ i ].promise()\r\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\r\n\t\t\t\t\t\t.fail( deferred.reject )\r\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t--remaining;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// if we're not waiting on anything, resolve the master\r\n\t\tif ( !remaining ) {\r\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\r\n\t\t}\r\n\r\n\t\treturn deferred.promise();\r\n\t}\r\n});\r\njQuery.support = (function() {\r\n\r\n\tvar support, all, a,\r\n\t\tinput, select, fragment,\r\n\t\topt, eventName, isSupported, i,\r\n\t\tdiv = document.createElement(\"div\");\r\n\r\n\t// Setup\r\n\tdiv.setAttribute( \"className\", \"t\" );\r\n\tdiv.innerHTML = \" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>\";\r\n\r\n\t// Support tests won't run in some limited or non-browser environments\r\n\tall = div.getElementsByTagName(\"*\");\r\n\ta = div.getElementsByTagName(\"a\")[ 0 ];\r\n\tif ( !all || !a || !all.length ) {\r\n\t\treturn {};\r\n\t}\r\n\r\n\t// First batch of tests\r\n\tselect = document.createElement(\"select\");\r\n\topt = select.appendChild( document.createElement(\"option\") );\r\n\tinput = div.getElementsByTagName(\"input\")[ 0 ];\r\n\r\n\ta.style.cssText = \"top:1px;float:left;opacity:.5\";\r\n\tsupport = {\r\n\t\t// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)\r\n\t\tgetSetAttribute: div.className !== \"t\",\r\n\r\n\t\t// IE strips leading whitespace when .innerHTML is used\r\n\t\tleadingWhitespace: div.firstChild.nodeType === 3,\r\n\r\n\t\t// Make sure that tbody elements aren't automatically inserted\r\n\t\t// IE will insert them into empty tables\r\n\t\ttbody: !div.getElementsByTagName(\"tbody\").length,\r\n\r\n\t\t// Make sure that link elements get serialized correctly by innerHTML\r\n\t\t// This requires a wrapper element in IE\r\n\t\thtmlSerialize: !!div.getElementsByTagName(\"link\").length,\r\n\r\n\t\t// Get the style information from getAttribute\r\n\t\t// (IE uses .cssText instead)\r\n\t\tstyle: /top/.test( a.getAttribute(\"style\") ),\r\n\r\n\t\t// Make sure that URLs aren't manipulated\r\n\t\t// (IE normalizes it by default)\r\n\t\threfNormalized: a.getAttribute(\"href\") === \"/a\",\r\n\r\n\t\t// Make sure that element opacity exists\r\n\t\t// (IE uses filter instead)\r\n\t\t// Use a regex to work around a WebKit issue. See #5145\r\n\t\topacity: /^0.5/.test( a.style.opacity ),\r\n\r\n\t\t// Verify style float existence\r\n\t\t// (IE uses styleFloat instead of cssFloat)\r\n\t\tcssFloat: !!a.style.cssFloat,\r\n\r\n\t\t// Check the default checkbox/radio value (\"\" on WebKit; \"on\" elsewhere)\r\n\t\tcheckOn: !!input.value,\r\n\r\n\t\t// Make sure that a selected-by-default option has a working selected property.\r\n\t\t// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)\r\n\t\toptSelected: opt.selected,\r\n\r\n\t\t// Tests for enctype support on a form (#6743)\r\n\t\tenctype: !!document.createElement(\"form\").enctype,\r\n\r\n\t\t// Makes sure cloning an html5 element does not cause problems\r\n\t\t// Where outerHTML is undefined, this still works\r\n\t\thtml5Clone: document.createElement(\"nav\").cloneNode( true ).outerHTML !== \"<:nav></:nav>\",\r\n\r\n\t\t// jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode\r\n\t\tboxModel: document.compatMode === \"CSS1Compat\",\r\n\r\n\t\t// Will be defined later\r\n\t\tdeleteExpando: true,\r\n\t\tnoCloneEvent: true,\r\n\t\tinlineBlockNeedsLayout: false,\r\n\t\tshrinkWrapBlocks: false,\r\n\t\treliableMarginRight: true,\r\n\t\tboxSizingReliable: true,\r\n\t\tpixelPosition: false\r\n\t};\r\n\r\n\t// Make sure checked status is properly cloned\r\n\tinput.checked = true;\r\n\tsupport.noCloneChecked = input.cloneNode( true ).checked;\r\n\r\n\t// Make sure that the options inside disabled selects aren't marked as disabled\r\n\t// (WebKit marks them as disabled)\r\n\tselect.disabled = true;\r\n\tsupport.optDisabled = !opt.disabled;\r\n\r\n\t// Support: IE<9\r\n\ttry {\r\n\t\tdelete div.test;\r\n\t} catch( e ) {\r\n\t\tsupport.deleteExpando = false;\r\n\t}\r\n\r\n\t// Check if we can trust getAttribute(\"value\")\r\n\tinput = document.createElement(\"input\");\r\n\tinput.setAttribute( \"value\", \"\" );\r\n\tsupport.input = input.getAttribute( \"value\" ) === \"\";\r\n\r\n\t// Check if an input maintains its value after becoming a radio\r\n\tinput.value = \"t\";\r\n\tinput.setAttribute( \"type\", \"radio\" );\r\n\tsupport.radioValue = input.value === \"t\";\r\n\r\n\t// #11217 - WebKit loses check when the name is after the checked attribute\r\n\tinput.setAttribute( \"checked\", \"t\" );\r\n\tinput.setAttribute( \"name\", \"t\" );\r\n\r\n\tfragment = document.createDocumentFragment();\r\n\tfragment.appendChild( input );\r\n\r\n\t// Check if a disconnected checkbox will retain its checked\r\n\t// value of true after appended to the DOM (IE6/7)\r\n\tsupport.appendChecked = input.checked;\r\n\r\n\t// WebKit doesn't clone checked state correctly in fragments\r\n\tsupport.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;\r\n\r\n\t// Support: IE<9\r\n\t// Opera does not clone events (and typeof div.attachEvent === undefined).\r\n\t// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()\r\n\tif ( div.attachEvent ) {\r\n\t\tdiv.attachEvent( \"onclick\", function() {\r\n\t\t\tsupport.noCloneEvent = false;\r\n\t\t});\r\n\r\n\t\tdiv.cloneNode( true ).click();\r\n\t}\r\n\r\n\t// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)\r\n\t// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php\r\n\tfor ( i in { submit: true, change: true, focusin: true }) {\r\n\t\tdiv.setAttribute( eventName = \"on\" + i, \"t\" );\r\n\r\n\t\tsupport[ i + \"Bubbles\" ] = eventName in window || div.attributes[ eventName ].expando === false;\r\n\t}\r\n\r\n\tdiv.style.backgroundClip = \"content-box\";\r\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\r\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\r\n\r\n\t// Run tests that need a body at doc ready\r\n\tjQuery(function() {\r\n\t\tvar container, marginDiv, tds,\r\n\t\t\tdivReset = \"padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;\",\r\n\t\t\tbody = document.getElementsByTagName(\"body\")[0];\r\n\r\n\t\tif ( !body ) {\r\n\t\t\t// Return for frameset docs that don't have a body\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tcontainer = document.createElement(\"div\");\r\n\t\tcontainer.style.cssText = \"border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px\";\r\n\r\n\t\tbody.appendChild( container ).appendChild( div );\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if table cells still have offsetWidth/Height when they are set\r\n\t\t// to display:none and there are still other visible table cells in a\r\n\t\t// table row; if so, offsetWidth/Height are not reliable for use when\r\n\t\t// determining if an element has been hidden directly using\r\n\t\t// display:none (it is still safe to use offsets if a parent element is\r\n\t\t// hidden; don safety goggles and see bug #4512 for more information).\r\n\t\tdiv.innerHTML = \"<table><tr><td></td><td>t</td></tr></table>\";\r\n\t\ttds = div.getElementsByTagName(\"td\");\r\n\t\ttds[ 0 ].style.cssText = \"padding:0;margin:0;border:0;display:none\";\r\n\t\tisSupported = ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\ttds[ 0 ].style.display = \"\";\r\n\t\ttds[ 1 ].style.display = \"none\";\r\n\r\n\t\t// Support: IE8\r\n\t\t// Check if empty table cells still have offsetWidth/Height\r\n\t\tsupport.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );\r\n\r\n\t\t// Check box-sizing and margin behavior\r\n\t\tdiv.innerHTML = \"\";\r\n\t\tdiv.style.cssText = \"box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;\";\r\n\t\tsupport.boxSizing = ( div.offsetWidth === 4 );\r\n\t\tsupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );\r\n\r\n\t\t// Use window.getComputedStyle because jsdom on node.js will break without it.\r\n\t\tif ( window.getComputedStyle ) {\r\n\t\t\tsupport.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== \"1%\";\r\n\t\t\tsupport.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: \"4px\" } ).width === \"4px\";\r\n\r\n\t\t\t// Check if div with explicit width and no margin-right incorrectly\r\n\t\t\t// gets computed margin-right based on width of container. (#3333)\r\n\t\t\t// Fails in WebKit before Feb 2011 nightlies\r\n\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\tmarginDiv = div.appendChild( document.createElement(\"div\") );\r\n\t\t\tmarginDiv.style.cssText = div.style.cssText = divReset;\r\n\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\r\n\t\t\tdiv.style.width = \"1px\";\r\n\r\n\t\t\tsupport.reliableMarginRight =\r\n\t\t\t\t!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );\r\n\t\t}\r\n\r\n\t\tif ( typeof div.style.zoom !== core_strundefined ) {\r\n\t\t\t// Support: IE<8\r\n\t\t\t// Check if natively block-level elements act like inline-block\r\n\t\t\t// elements when setting their display to 'inline' and giving\r\n\t\t\t// them layout\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tdiv.style.cssText = divReset + \"width:1px;padding:1px;display:inline;zoom:1\";\r\n\t\t\tsupport.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );\r\n\r\n\t\t\t// Support: IE6\r\n\t\t\t// Check if elements with layout shrink-wrap their children\r\n\t\t\tdiv.style.display = \"block\";\r\n\t\t\tdiv.innerHTML = \"<div></div>\";\r\n\t\t\tdiv.firstChild.style.width = \"5px\";\r\n\t\t\tsupport.shrinkWrapBlocks = ( div.offsetWidth !== 3 );\r\n\r\n\t\t\tif ( support.inlineBlockNeedsLayout ) {\r\n\t\t\t\t// Prevent IE 6 from affecting layout for positioned elements #11048\r\n\t\t\t\t// Prevent IE from shrinking the body in IE 7 mode #12869\r\n\t\t\t\t// Support: IE<8\r\n\t\t\t\tbody.style.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbody.removeChild( container );\r\n\r\n\t\t// Null elements to avoid leaks in IE\r\n\t\tcontainer = div = tds = marginDiv = null;\r\n\t});\r\n\r\n\t// Null elements to avoid leaks in IE\r\n\tall = select = fragment = opt = a = input = null;\r\n\r\n\treturn support;\r\n})();\r\n\r\nvar rbrace = /(?:\\{[\\s\\S]*\\}|\\[[\\s\\S]*\\])$/,\r\n\trmultiDash = /([A-Z])/g;\r\n\r\nfunction internalData( elem, name, data, pvt /* Internal Use Only */ ){\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar thisCache, ret,\r\n\t\tinternalKey = jQuery.expando,\r\n\t\tgetByName = typeof name === \"string\",\r\n\r\n\t\t// We have to handle DOM nodes and JS objects differently because IE6-7\r\n\t\t// can't GC object references properly across the DOM-JS boundary\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// Only DOM nodes need the global jQuery cache; JS object data is\r\n\t\t// attached directly to the object so GC can occur automatically\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\r\n\t\t// Only defining an ID for JS objects if its cache already exists allows\r\n\t\t// the code to shortcut on the same path as a DOM node with no cache\r\n\t\tid = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;\r\n\r\n\t// Avoid doing any more work than we need to when trying to get data on an\r\n\t// object that has no data at all\r\n\tif ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( !id ) {\r\n\t\t// Only DOM nodes need a new unique ID for each element since their data\r\n\t\t// ends up in the global cache\r\n\t\tif ( isNode ) {\r\n\t\t\telem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;\r\n\t\t} else {\r\n\t\t\tid = internalKey;\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !cache[ id ] ) {\r\n\t\tcache[ id ] = {};\r\n\r\n\t\t// Avoids exposing jQuery metadata on plain JS objects when the object\r\n\t\t// is serialized using JSON.stringify\r\n\t\tif ( !isNode ) {\r\n\t\t\tcache[ id ].toJSON = jQuery.noop;\r\n\t\t}\r\n\t}\r\n\r\n\t// An object can be passed to jQuery.data instead of a key/value pair; this gets\r\n\t// shallow copied over onto the existing cache\r\n\tif ( typeof name === \"object\" || typeof name === \"function\" ) {\r\n\t\tif ( pvt ) {\r\n\t\t\tcache[ id ] = jQuery.extend( cache[ id ], name );\r\n\t\t} else {\r\n\t\t\tcache[ id ].data = jQuery.extend( cache[ id ].data, name );\r\n\t\t}\r\n\t}\r\n\r\n\tthisCache = cache[ id ];\r\n\r\n\t// jQuery data() is stored in a separate object inside the object's internal data\r\n\t// cache in order to avoid key collisions between internal data and user-defined\r\n\t// data.\r\n\tif ( !pvt ) {\r\n\t\tif ( !thisCache.data ) {\r\n\t\t\tthisCache.data = {};\r\n\t\t}\r\n\r\n\t\tthisCache = thisCache.data;\r\n\t}\r\n\r\n\tif ( data !== undefined ) {\r\n\t\tthisCache[ jQuery.camelCase( name ) ] = data;\r\n\t}\r\n\r\n\t// Check for both converted-to-camel and non-converted data property names\r\n\t// If a data property was specified\r\n\tif ( getByName ) {\r\n\r\n\t\t// First Try to find as-is property data\r\n\t\tret = thisCache[ name ];\r\n\r\n\t\t// Test for null|undefined property data\r\n\t\tif ( ret == null ) {\r\n\r\n\t\t\t// Try to find the camelCased property\r\n\t\t\tret = thisCache[ jQuery.camelCase( name ) ];\r\n\t\t}\r\n\t} else {\r\n\t\tret = thisCache;\r\n\t}\r\n\r\n\treturn ret;\r\n}\r\n\r\nfunction internalRemoveData( elem, name, pvt ) {\r\n\tif ( !jQuery.acceptData( elem ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar i, l, thisCache,\r\n\t\tisNode = elem.nodeType,\r\n\r\n\t\t// See jQuery.data for more information\r\n\t\tcache = isNode ? jQuery.cache : elem,\r\n\t\tid = isNode ? elem[ jQuery.expando ] : jQuery.expando;\r\n\r\n\t// If there is already no cache entry for this object, there is no\r\n\t// purpose in continuing\r\n\tif ( !cache[ id ] ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif ( name ) {\r\n\r\n\t\tthisCache = pvt ? cache[ id ] : cache[ id ].data;\r\n\r\n\t\tif ( thisCache ) {\r\n\r\n\t\t\t// Support array or space separated string names for data keys\r\n\t\t\tif ( !jQuery.isArray( name ) ) {\r\n\r\n\t\t\t\t// try the string as a key before any manipulation\r\n\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\tname = [ name ];\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// split the camel cased version by spaces unless a key with the spaces exists\r\n\t\t\t\t\tname = jQuery.camelCase( name );\r\n\t\t\t\t\tif ( name in thisCache ) {\r\n\t\t\t\t\t\tname = [ name ];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tname = name.split(\" \");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// If \"name\" is an array of keys...\r\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\r\n\t\t\t\t// keys will be converted to camelCase.\r\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\r\n\t\t\t\t// both plain key and camelCase key. #12786\r\n\t\t\t\t// This will only penalize the array argument path.\r\n\t\t\t\tname = name.concat( jQuery.map( name, jQuery.camelCase ) );\r\n\t\t\t}\r\n\r\n\t\t\tfor ( i = 0, l = name.length; i < l; i++ ) {\r\n\t\t\t\tdelete thisCache[ name[i] ];\r\n\t\t\t}\r\n\r\n\t\t\t// If there is no data left in the cache, we want to continue\r\n\t\t\t// and let the cache object itself get destroyed\r\n\t\t\tif ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// See jQuery.data for more information\r\n\tif ( !pvt ) {\r\n\t\tdelete cache[ id ].data;\r\n\r\n\t\t// Don't destroy the parent cache unless the internal data object\r\n\t\t// had been the only thing left in it\r\n\t\tif ( !isEmptyDataObject( cache[ id ] ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// Destroy the cache\r\n\tif ( isNode ) {\r\n\t\tjQuery.cleanData( [ elem ], true );\r\n\r\n\t// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)\r\n\t} else if ( jQuery.support.deleteExpando || cache != cache.window ) {\r\n\t\tdelete cache[ id ];\r\n\r\n\t// When all else fails, null\r\n\t} else {\r\n\t\tcache[ id ] = null;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tcache: {},\r\n\r\n\t// Unique for each copy of jQuery on the page\r\n\t// Non-digits removed to match rinlinejQuery\r\n\texpando: \"jQuery\" + ( core_version + Math.random() ).replace( /\\D/g, \"\" ),\r\n\r\n\t// The following elements throw uncatchable exceptions if you\r\n\t// attempt to add expando properties to them.\r\n\tnoData: {\r\n\t\t\"embed\": true,\r\n\t\t// Ban all objects except for Flash (which handle expandos)\r\n\t\t\"object\": \"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\",\r\n\t\t\"applet\": true\r\n\t},\r\n\r\n\thasData: function( elem ) {\r\n\t\telem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];\r\n\t\treturn !!elem && !isEmptyDataObject( elem );\r\n\t},\r\n\r\n\tdata: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data );\r\n\t},\r\n\r\n\tremoveData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name );\r\n\t},\r\n\r\n\t// For internal use only.\r\n\t_data: function( elem, name, data ) {\r\n\t\treturn internalData( elem, name, data, true );\r\n\t},\r\n\r\n\t_removeData: function( elem, name ) {\r\n\t\treturn internalRemoveData( elem, name, true );\r\n\t},\r\n\r\n\t// A method for determining if a DOM node can handle the data expando\r\n\tacceptData: function( elem ) {\r\n\t\t// Do not set data on non-element because it will not be cleared (#8335).\r\n\t\tif ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t// nodes accept data unless otherwise specified; rejection can be conditional\r\n\t\treturn !noData || noData !== true && elem.getAttribute(\"classid\") === noData;\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tdata: function( key, value ) {\r\n\t\tvar attrs, name,\r\n\t\t\telem = this[0],\r\n\t\t\ti = 0,\r\n\t\t\tdata = null;\r\n\r\n\t\t// Gets all values\r\n\t\tif ( key === undefined ) {\r\n\t\t\tif ( this.length ) {\r\n\t\t\t\tdata = jQuery.data( elem );\r\n\r\n\t\t\t\tif ( elem.nodeType === 1 && !jQuery._data( elem, \"parsedAttrs\" ) ) {\r\n\t\t\t\t\tattrs = elem.attributes;\r\n\t\t\t\t\tfor ( ; i < attrs.length; i++ ) {\r\n\t\t\t\t\t\tname = attrs[i].name;\r\n\r\n\t\t\t\t\t\tif ( !name.indexOf( \"data-\" ) ) {\r\n\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\r\n\r\n\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery._data( elem, \"parsedAttrs\", true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn data;\r\n\t\t}\r\n\r\n\t\t// Sets multiple values\r\n\t\tif ( typeof key === \"object\" ) {\r\n\t\t\treturn this.each(function() {\r\n\t\t\t\tjQuery.data( this, key );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\t// Try to fetch any internally stored data first\r\n\t\t\t\treturn elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;\r\n\t\t\t}\r\n\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tjQuery.data( this, key, value );\r\n\t\t\t});\r\n\t\t}, null, value, arguments.length > 1, null, true );\r\n\t},\r\n\r\n\tremoveData: function( key ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeData( this, key );\r\n\t\t});\r\n\t}\r\n});\r\n\r\nfunction dataAttr( elem, key, data ) {\r\n\t// If nothing was found internally, try to fetch any\r\n\t// data from the HTML5 data-* attribute\r\n\tif ( data === undefined && elem.nodeType === 1 ) {\r\n\r\n\t\tvar name = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\r\n\r\n\t\tdata = elem.getAttribute( name );\r\n\r\n\t\tif ( typeof data === \"string\" ) {\r\n\t\t\ttry {\r\n\t\t\t\tdata = data === \"true\" ? true :\r\n\t\t\t\t\tdata === \"false\" ? false :\r\n\t\t\t\t\tdata === \"null\" ? null :\r\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\r\n\t\t\t\t\t+data + \"\" === data ? +data :\r\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\r\n\t\t\t\t\t\tdata;\r\n\t\t\t} catch( e ) {}\r\n\r\n\t\t\t// Make sure we set the data so it isn't changed later\r\n\t\t\tjQuery.data( elem, key, data );\r\n\r\n\t\t} else {\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\t}\r\n\r\n\treturn data;\r\n}\r\n\r\n// checks a cache object for emptiness\r\nfunction isEmptyDataObject( obj ) {\r\n\tvar name;\r\n\tfor ( name in obj ) {\r\n\r\n\t\t// if the public data object is empty, the private is still empty\r\n\t\tif ( name === \"data\" && jQuery.isEmptyObject( obj[name] ) ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( name !== \"toJSON\" ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\njQuery.extend({\r\n\tqueue: function( elem, type, data ) {\r\n\t\tvar queue;\r\n\r\n\t\tif ( elem ) {\r\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\r\n\t\t\tqueue = jQuery._data( elem, type );\r\n\r\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\r\n\t\t\tif ( data ) {\r\n\t\t\t\tif ( !queue || jQuery.isArray(data) ) {\r\n\t\t\t\t\tqueue = jQuery._data( elem, type, jQuery.makeArray(data) );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tqueue.push( data );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn queue || [];\r\n\t\t}\r\n\t},\r\n\r\n\tdequeue: function( elem, type ) {\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\tvar queue = jQuery.queue( elem, type ),\r\n\t\t\tstartLength = queue.length,\r\n\t\t\tfn = queue.shift(),\r\n\t\t\thooks = jQuery._queueHooks( elem, type ),\r\n\t\t\tnext = function() {\r\n\t\t\t\tjQuery.dequeue( elem, type );\r\n\t\t\t};\r\n\r\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\r\n\t\tif ( fn === \"inprogress\" ) {\r\n\t\t\tfn = queue.shift();\r\n\t\t\tstartLength--;\r\n\t\t}\r\n\r\n\t\thooks.cur = fn;\r\n\t\tif ( fn ) {\r\n\r\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\r\n\t\t\t// automatically dequeued\r\n\t\t\tif ( type === \"fx\" ) {\r\n\t\t\t\tqueue.unshift( \"inprogress\" );\r\n\t\t\t}\r\n\r\n\t\t\t// clear up the last queue stop function\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tfn.call( elem, next, hooks );\r\n\t\t}\r\n\r\n\t\tif ( !startLength && hooks ) {\r\n\t\t\thooks.empty.fire();\r\n\t\t}\r\n\t},\r\n\r\n\t// not intended for public consumption - generates a queueHooks object, or returns the current one\r\n\t_queueHooks: function( elem, type ) {\r\n\t\tvar key = type + \"queueHooks\";\r\n\t\treturn jQuery._data( elem, key ) || jQuery._data( elem, key, {\r\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\r\n\t\t\t\tjQuery._removeData( elem, type + \"queue\" );\r\n\t\t\t\tjQuery._removeData( elem, key );\r\n\t\t\t})\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.fn.extend({\r\n\tqueue: function( type, data ) {\r\n\t\tvar setter = 2;\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tdata = type;\r\n\t\t\ttype = \"fx\";\r\n\t\t\tsetter--;\r\n\t\t}\r\n\r\n\t\tif ( arguments.length < setter ) {\r\n\t\t\treturn jQuery.queue( this[0], type );\r\n\t\t}\r\n\r\n\t\treturn data === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function() {\r\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\r\n\r\n\t\t\t\t// ensure a hooks for this queue\r\n\t\t\t\tjQuery._queueHooks( this, type );\r\n\r\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\r\n\t\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\tdequeue: function( type ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.dequeue( this, type );\r\n\t\t});\r\n\t},\r\n\t// Based off of the plugin by Clint Helfers, with permission.\r\n\t// http://blindsignals.com/index.php/2009/07/jquery-delay/\r\n\tdelay: function( time, type ) {\r\n\t\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\treturn this.queue( type, function( next, hooks ) {\r\n\t\t\tvar timeout = setTimeout( next, time );\r\n\t\t\thooks.stop = function() {\r\n\t\t\t\tclearTimeout( timeout );\r\n\t\t\t};\r\n\t\t});\r\n\t},\r\n\tclearQueue: function( type ) {\r\n\t\treturn this.queue( type || \"fx\", [] );\r\n\t},\r\n\t// Get a promise resolved when queues of a certain type\r\n\t// are emptied (fx is the type by default)\r\n\tpromise: function( type, obj ) {\r\n\t\tvar tmp,\r\n\t\t\tcount = 1,\r\n\t\t\tdefer = jQuery.Deferred(),\r\n\t\t\telements = this,\r\n\t\t\ti = this.length,\r\n\t\t\tresolve = function() {\r\n\t\t\t\tif ( !( --count ) ) {\r\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tobj = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\ttype = type || \"fx\";\r\n\r\n\t\twhile( i-- ) {\r\n\t\t\ttmp = jQuery._data( elements[ i ], type + \"queueHooks\" );\r\n\t\t\tif ( tmp && tmp.empty ) {\r\n\t\t\t\tcount++;\r\n\t\t\t\ttmp.empty.add( resolve );\r\n\t\t\t}\r\n\t\t}\r\n\t\tresolve();\r\n\t\treturn defer.promise( obj );\r\n\t}\r\n});\r\nvar nodeHook, boolHook,\r\n\trclass = /[\\t\\r\\n]/g,\r\n\trreturn = /\\r/g,\r\n\trfocusable = /^(?:input|select|textarea|button|object)$/i,\r\n\trclickable = /^(?:a|area)$/i,\r\n\trboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,\r\n\truseDefault = /^(?:checked|selected)$/i,\r\n\tgetSetAttribute = jQuery.support.getSetAttribute,\r\n\tgetSetInput = jQuery.support.input;\r\n\r\njQuery.fn.extend({\r\n\tattr: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveAttr: function( name ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.removeAttr( this, name );\r\n\t\t});\r\n\t},\r\n\r\n\tprop: function( name, value ) {\r\n\t\treturn jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );\r\n\t},\r\n\r\n\tremoveProp: function( name ) {\r\n\t\tname = jQuery.propFix[ name ] || name;\r\n\t\treturn this.each(function() {\r\n\t\t\t// try/catch handles cases where IE balks (such as removing a property on window)\r\n\t\t\ttry {\r\n\t\t\t\tthis[ name ] = undefined;\r\n\t\t\t\tdelete this[ name ];\r\n\t\t\t} catch( e ) {}\r\n\t\t});\r\n\t},\r\n\r\n\taddClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( proceed ) {\r\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\" \"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\r\n\t\t\t\t\t\t\tcur += clazz + \" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = jQuery.trim( cur );\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveClass: function( value ) {\r\n\t\tvar classes, elem, cur, clazz, j,\r\n\t\t\ti = 0,\r\n\t\t\tlen = this.length,\r\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value;\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( j ) {\r\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\r\n\t\t\t});\r\n\t\t}\r\n\t\tif ( proceed ) {\r\n\t\t\tclasses = ( value || \"\" ).match( core_rnotwhite ) || [];\r\n\r\n\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\telem = this[ i ];\r\n\t\t\t\t// This expression is here for better compressibility (see addClass)\r\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\r\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\r\n\t\t\t\t\t\"\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif ( cur ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\r\n\t\t\t\t\t\t// Remove *all* instances\r\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\r\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.className = value ? jQuery.trim( cur ) : \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\ttoggleClass: function( value, stateVal ) {\r\n\t\tvar type = typeof value,\r\n\t\t\tisBool = typeof stateVal === \"boolean\";\r\n\r\n\t\tif ( jQuery.isFunction( value ) ) {\r\n\t\t\treturn this.each(function( i ) {\r\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( type === \"string\" ) {\r\n\t\t\t\t// toggle individual class names\r\n\t\t\t\tvar className,\r\n\t\t\t\t\ti = 0,\r\n\t\t\t\t\tself = jQuery( this ),\r\n\t\t\t\t\tstate = stateVal,\r\n\t\t\t\t\tclassNames = value.match( core_rnotwhite ) || [];\r\n\r\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\r\n\t\t\t\t\t// check each className given, space separated list\r\n\t\t\t\t\tstate = isBool ? state : !self.hasClass( className );\r\n\t\t\t\t\tself[ state ? \"addClass\" : \"removeClass\" ]( className );\r\n\t\t\t\t}\r\n\r\n\t\t\t// Toggle whole class name\r\n\t\t\t} else if ( type === core_strundefined || type === \"boolean\" ) {\r\n\t\t\t\tif ( this.className ) {\r\n\t\t\t\t\t// store className if set\r\n\t\t\t\t\tjQuery._data( this, \"__className__\", this.className );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the element has a class name or if we're passed \"false\",\r\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\r\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\r\n\t\t\t\t// falling back to the empty string if nothing was stored.\r\n\t\t\t\tthis.className = this.className || value === false ? \"\" : jQuery._data( this, \"__className__\" ) || \"\";\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\thasClass: function( selector ) {\r\n\t\tvar className = \" \" + selector + \" \",\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length;\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t},\r\n\r\n\tval: function( value ) {\r\n\t\tvar ret, hooks, isFunction,\r\n\t\t\telem = this[0];\r\n\r\n\t\tif ( !arguments.length ) {\r\n\t\t\tif ( elem ) {\r\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\r\n\r\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\r\n\t\t\t\t\treturn ret;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tret = elem.value;\r\n\r\n\t\t\t\treturn typeof ret === \"string\" ?\r\n\t\t\t\t\t// handle most common string cases\r\n\t\t\t\t\tret.replace(rreturn, \"\") :\r\n\t\t\t\t\t// handle cases where value is null/undef or number\r\n\t\t\t\t\tret == null ? \"\" : ret;\r\n\t\t\t}\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\treturn this.each(function( i ) {\r\n\t\t\tvar val,\r\n\t\t\t\tself = jQuery(this);\r\n\r\n\t\t\tif ( this.nodeType !== 1 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tif ( isFunction ) {\r\n\t\t\t\tval = value.call( this, i, self.val() );\r\n\t\t\t} else {\r\n\t\t\t\tval = value;\r\n\t\t\t}\r\n\r\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\r\n\t\t\tif ( val == null ) {\r\n\t\t\t\tval = \"\";\r\n\t\t\t} else if ( typeof val === \"number\" ) {\r\n\t\t\t\tval += \"\";\r\n\t\t\t} else if ( jQuery.isArray( val ) ) {\r\n\t\t\t\tval = jQuery.map(val, function ( value ) {\r\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\r\n\r\n\t\t\t// If set returns undefined, fall back to normal setting\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\r\n\t\t\t\tthis.value = val;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\tvalHooks: {\r\n\t\toption: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// attributes.value is undefined in Blackberry 4.7 but\r\n\t\t\t\t// uses .value. See #6932\r\n\t\t\t\tvar val = elem.attributes.value;\r\n\t\t\t\treturn !val || val.specified ? elem.value : elem.text;\r\n\t\t\t}\r\n\t\t},\r\n\t\tselect: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar value, option,\r\n\t\t\t\t\toptions = elem.options,\r\n\t\t\t\t\tindex = elem.selectedIndex,\r\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\r\n\t\t\t\t\tvalues = one ? null : [],\r\n\t\t\t\t\tmax = one ? index + 1 : options.length,\r\n\t\t\t\t\ti = index < 0 ?\r\n\t\t\t\t\t\tmax :\r\n\t\t\t\t\t\tone ? index : 0;\r\n\r\n\t\t\t\t// Loop through all the selected options\r\n\t\t\t\tfor ( ; i < max; i++ ) {\r\n\t\t\t\t\toption = options[ i ];\r\n\r\n\t\t\t\t\t// oldIE doesn't update selected after form reset (#2551)\r\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\r\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\r\n\t\t\t\t\t\t\t( jQuery.support.optDisabled ? !option.disabled : option.getAttribute(\"disabled\") === null ) &&\r\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\r\n\r\n\t\t\t\t\t\t// Get the specific value for the option\r\n\t\t\t\t\t\tvalue = jQuery( option ).val();\r\n\r\n\t\t\t\t\t\t// We don't need an array for one selects\r\n\t\t\t\t\t\tif ( one ) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Multi-Selects return an array\r\n\t\t\t\t\t\tvalues.push( value );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn values;\r\n\t\t\t},\r\n\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tvar values = jQuery.makeArray( value );\r\n\r\n\t\t\t\tjQuery(elem).find(\"option\").each(function() {\r\n\t\t\t\t\tthis.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif ( !values.length ) {\r\n\t\t\t\t\telem.selectedIndex = -1;\r\n\t\t\t\t}\r\n\t\t\t\treturn values;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattr: function( elem, name, value ) {\r\n\t\tvar hooks, notxml, ret,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set attributes on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Fallback to prop when attributes are not supported\r\n\t\tif ( typeof elem.getAttribute === core_strundefined ) {\r\n\t\t\treturn jQuery.prop( elem, name, value );\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\t// All attributes are lowercase\r\n\t\t// Grab necessary hook if one is defined\r\n\t\tif ( notxml ) {\r\n\t\t\tname = name.toLowerCase();\r\n\t\t\thooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\r\n\t\t\tif ( value === null ) {\r\n\t\t\t\tjQuery.removeAttr( elem, name );\r\n\r\n\t\t\t} else if ( hooks && notxml && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem.setAttribute( name, value + \"\" );\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\r\n\t\t} else if ( hooks && notxml && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\treturn ret;\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// In IE9+, Flash objects don't have .getAttribute (#12945)\r\n\t\t\t// Support: IE9+\r\n\t\t\tif ( typeof elem.getAttribute !== core_strundefined ) {\r\n\t\t\t\tret = elem.getAttribute( name );\r\n\t\t\t}\r\n\r\n\t\t\t// Non-existent attributes return null, we normalize to undefined\r\n\t\t\treturn ret == null ?\r\n\t\t\t\tundefined :\r\n\t\t\t\tret;\r\n\t\t}\r\n\t},\r\n\r\n\tremoveAttr: function( elem, value ) {\r\n\t\tvar name, propName,\r\n\t\t\ti = 0,\r\n\t\t\tattrNames = value && value.match( core_rnotwhite );\r\n\r\n\t\tif ( attrNames && elem.nodeType === 1 ) {\r\n\t\t\twhile ( (name = attrNames[i++]) ) {\r\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\r\n\r\n\t\t\t\t// Boolean attributes get special treatment (#10870)\r\n\t\t\t\tif ( rboolean.test( name ) ) {\r\n\t\t\t\t\t// Set corresponding property to false for boolean attributes\r\n\t\t\t\t\t// Also clear defaultChecked/defaultSelected (if appropriate) for IE<8\r\n\t\t\t\t\tif ( !getSetAttribute && ruseDefault.test( name ) ) {\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] =\r\n\t\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\telem[ propName ] = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t// See #9699 for explanation of this approach (setting first, then removal)\r\n\t\t\t\t} else {\r\n\t\t\t\t\tjQuery.attr( elem, name, \"\" );\r\n\t\t\t\t}\r\n\r\n\t\t\t\telem.removeAttribute( getSetAttribute ? name : propName );\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tattrHooks: {\r\n\t\ttype: {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( !jQuery.support.radioValue && value === \"radio\" && jQuery.nodeName(elem, \"input\") ) {\r\n\t\t\t\t\t// Setting the type on a radio button after the value resets the value in IE6-9\r\n\t\t\t\t\t// Reset value to default in case type is set after value during creation\r\n\t\t\t\t\tvar val = elem.value;\r\n\t\t\t\t\telem.setAttribute( \"type\", value );\r\n\t\t\t\t\tif ( val ) {\r\n\t\t\t\t\t\telem.value = val;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropFix: {\r\n\t\ttabindex: \"tabIndex\",\r\n\t\treadonly: \"readOnly\",\r\n\t\t\"for\": \"htmlFor\",\r\n\t\t\"class\": \"className\",\r\n\t\tmaxlength: \"maxLength\",\r\n\t\tcellspacing: \"cellSpacing\",\r\n\t\tcellpadding: \"cellPadding\",\r\n\t\trowspan: \"rowSpan\",\r\n\t\tcolspan: \"colSpan\",\r\n\t\tusemap: \"useMap\",\r\n\t\tframeborder: \"frameBorder\",\r\n\t\tcontenteditable: \"contentEditable\"\r\n\t},\r\n\r\n\tprop: function( elem, name, value ) {\r\n\t\tvar ret, hooks, notxml,\r\n\t\t\tnType = elem.nodeType;\r\n\r\n\t\t// don't get/set properties on text, comment and attribute nodes\r\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\r\n\r\n\t\tif ( notxml ) {\r\n\t\t\t// Fix name and attach hooks\r\n\t\t\tname = jQuery.propFix[ name ] || name;\r\n\t\t\thooks = jQuery.propHooks[ name ];\r\n\t\t}\r\n\r\n\t\tif ( value !== undefined ) {\r\n\t\t\tif ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn ( elem[ name ] = value );\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\r\n\t\t\t\treturn ret;\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturn elem[ name ];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tpropHooks: {\r\n\t\ttabIndex: {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set\r\n\t\t\t\t// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/\r\n\t\t\t\tvar attributeNode = elem.getAttributeNode(\"tabindex\");\r\n\r\n\t\t\t\treturn attributeNode && attributeNode.specified ?\r\n\t\t\t\t\tparseInt( attributeNode.value, 10 ) :\r\n\t\t\t\t\trfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?\r\n\t\t\t\t\t\t0 :\r\n\t\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Hook for boolean attributes\r\nboolHook = {\r\n\tget: function( elem, name ) {\r\n\t\tvar\r\n\t\t\t// Use .prop to determine if this attribute is understood as boolean\r\n\t\t\tprop = jQuery.prop( elem, name ),\r\n\r\n\t\t\t// Fetch it accordingly\r\n\t\t\tattr = typeof prop === \"boolean\" && elem.getAttribute( name ),\r\n\t\t\tdetail = typeof prop === \"boolean\" ?\r\n\r\n\t\t\t\tgetSetInput && getSetAttribute ?\r\n\t\t\t\t\tattr != null :\r\n\t\t\t\t\t// oldIE fabricates an empty string for missing boolean attributes\r\n\t\t\t\t\t// and conflates checked/selected into attroperties\r\n\t\t\t\t\truseDefault.test( name ) ?\r\n\t\t\t\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] :\r\n\t\t\t\t\t\t!!attr :\r\n\r\n\t\t\t\t// fetch an attribute node for properties not recognized as boolean\r\n\t\t\t\telem.getAttributeNode( name );\r\n\r\n\t\treturn detail && detail.value !== false ?\r\n\t\t\tname.toLowerCase() :\r\n\t\t\tundefined;\r\n\t},\r\n\tset: function( elem, value, name ) {\r\n\t\tif ( value === false ) {\r\n\t\t\t// Remove boolean attributes when set to false\r\n\t\t\tjQuery.removeAttr( elem, name );\r\n\t\t} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {\r\n\t\t\t// IE<8 needs the *property* name\r\n\t\t\telem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );\r\n\r\n\t\t// Use defaultChecked and defaultSelected for oldIE\r\n\t\t} else {\r\n\t\t\telem[ jQuery.camelCase( \"default-\" + name ) ] = elem[ name ] = true;\r\n\t\t}\r\n\r\n\t\treturn name;\r\n\t}\r\n};\r\n\r\n// fix oldIE value attroperty\r\nif ( !getSetInput || !getSetAttribute ) {\r\n\tjQuery.attrHooks.value = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn jQuery.nodeName( elem, \"input\" ) ?\r\n\r\n\t\t\t\t// Ignore the value *property* by using defaultValue\r\n\t\t\t\telem.defaultValue :\r\n\r\n\t\t\t\tret && ret.specified ? ret.value : undefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tif ( jQuery.nodeName( elem, \"input\" ) ) {\r\n\t\t\t\t// Does not return so that setAttribute is also used\r\n\t\t\t\telem.defaultValue = value;\r\n\t\t\t} else {\r\n\t\t\t\t// Use nodeHook if defined (#1954); otherwise setAttribute is fine\r\n\t\t\t\treturn nodeHook && nodeHook.set( elem, value, name );\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE6/7 do not support getting/setting some attributes with get/setAttribute\r\nif ( !getSetAttribute ) {\r\n\r\n\t// Use this for any attribute in IE6/7\r\n\t// This fixes almost every IE6/7 issue\r\n\tnodeHook = jQuery.valHooks.button = {\r\n\t\tget: function( elem, name ) {\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\treturn ret && ( name === \"id\" || name === \"name\" || name === \"coords\" ? ret.value !== \"\" : ret.specified ) ?\r\n\t\t\t\tret.value :\r\n\t\t\t\tundefined;\r\n\t\t},\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\t// Set the existing or create a new attribute node\r\n\t\t\tvar ret = elem.getAttributeNode( name );\r\n\t\t\tif ( !ret ) {\r\n\t\t\t\telem.setAttributeNode(\r\n\t\t\t\t\t(ret = elem.ownerDocument.createAttribute( name ))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tret.value = value += \"\";\r\n\r\n\t\t\t// Break association with cloned elements by also using setAttribute (#9646)\r\n\t\t\treturn name === \"value\" || value === elem.getAttribute( name ) ?\r\n\t\t\t\tvalue :\r\n\t\t\t\tundefined;\r\n\t\t}\r\n\t};\r\n\r\n\t// Set contenteditable to false on removals(#10429)\r\n\t// Setting to empty string throws an error as an invalid value\r\n\tjQuery.attrHooks.contenteditable = {\r\n\t\tget: nodeHook.get,\r\n\t\tset: function( elem, value, name ) {\r\n\t\t\tnodeHook.set( elem, value === \"\" ? false : value, name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Set width and height to auto instead of 0 on empty string( Bug #8150 )\r\n\t// This is for removals\r\n\tjQuery.each([ \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tset: function( elem, value ) {\r\n\t\t\t\tif ( value === \"\" ) {\r\n\t\t\t\t\telem.setAttribute( name, \"auto\" );\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n\r\n// Some attributes require a special call on IE\r\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\r\nif ( !jQuery.support.hrefNormalized ) {\r\n\tjQuery.each([ \"href\", \"src\", \"width\", \"height\" ], function( i, name ) {\r\n\t\tjQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\tvar ret = elem.getAttribute( name, 2 );\r\n\t\t\t\treturn ret == null ? undefined : ret;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n\r\n\t// href/src property should get the full normalized URL (#10299/#12915)\r\n\tjQuery.each([ \"href\", \"src\" ], function( i, name ) {\r\n\t\tjQuery.propHooks[ name ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( name, 4 );\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\nif ( !jQuery.support.style ) {\r\n\tjQuery.attrHooks.style = {\r\n\t\tget: function( elem ) {\r\n\t\t\t// Return undefined in the case of empty string\r\n\t\t\t// Note: IE uppercases css property names, but if we were to .toLowerCase()\r\n\t\t\t// .cssText, that would destroy case senstitivity in URL's, like in \"background\"\r\n\t\t\treturn elem.style.cssText || undefined;\r\n\t\t},\r\n\t\tset: function( elem, value ) {\r\n\t\t\treturn ( elem.style.cssText = value + \"\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Safari mis-reports the default selected property of an option\r\n// Accessing the parent's selectedIndex property fixes it\r\nif ( !jQuery.support.optSelected ) {\r\n\tjQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {\r\n\t\tget: function( elem ) {\r\n\t\t\tvar parent = elem.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tparent.selectedIndex;\r\n\r\n\t\t\t\t// Make sure that it also works with optgroups, see #5701\r\n\t\t\t\tif ( parent.parentNode ) {\r\n\t\t\t\t\tparent.parentNode.selectedIndex;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t});\r\n}\r\n\r\n// IE6/7 call enctype encoding\r\nif ( !jQuery.support.enctype ) {\r\n\tjQuery.propFix.enctype = \"encoding\";\r\n}\r\n\r\n// Radios and checkboxes getter/setter\r\nif ( !jQuery.support.checkOn ) {\r\n\tjQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\t\tjQuery.valHooks[ this ] = {\r\n\t\t\tget: function( elem ) {\r\n\t\t\t\t// Handle the case where in Webkit \"\" is returned instead of \"on\" if a value isn't specified\r\n\t\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\njQuery.each([ \"radio\", \"checkbox\" ], function() {\r\n\tjQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {\r\n\t\tset: function( elem, value ) {\r\n\t\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n});\r\nvar rformElems = /^(?:input|select|textarea)$/i,\r\n\trkeyEvent = /^key/,\r\n\trmouseEvent = /^(?:mouse|contextmenu)|click/,\r\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\r\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\r\n\r\nfunction returnTrue() {\r\n\treturn true;\r\n}\r\n\r\nfunction returnFalse() {\r\n\treturn false;\r\n}\r\n\r\n/*\r\n * Helper functions for managing events -- not part of the public interface.\r\n * Props to Dean Edwards' addEvent library for many of the ideas.\r\n */\r\njQuery.event = {\r\n\r\n\tglobal: {},\r\n\r\n\tadd: function( elem, types, handler, data, selector ) {\r\n\t\tvar tmp, events, t, handleObjIn,\r\n\t\t\tspecial, eventHandle, handleObj,\r\n\t\t\thandlers, type, namespaces, origType,\r\n\t\t\telemData = jQuery._data( elem );\r\n\r\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\r\n\t\tif ( !elemData ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Caller can pass in an object of custom data in lieu of the handler\r\n\t\tif ( handler.handler ) {\r\n\t\t\thandleObjIn = handler;\r\n\t\t\thandler = handleObjIn.handler;\r\n\t\t\tselector = handleObjIn.selector;\r\n\t\t}\r\n\r\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\r\n\t\tif ( !handler.guid ) {\r\n\t\t\thandler.guid = jQuery.guid++;\r\n\t\t}\r\n\r\n\t\t// Init the element's event structure and main handler, if this is the first\r\n\t\tif ( !(events = elemData.events) ) {\r\n\t\t\tevents = elemData.events = {};\r\n\t\t}\r\n\t\tif ( !(eventHandle = elemData.handle) ) {\r\n\t\t\teventHandle = elemData.handle = function( e ) {\r\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\r\n\t\t\t\t// when an event is called after a page has unloaded\r\n\t\t\t\treturn typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?\r\n\t\t\t\t\tjQuery.event.dispatch.apply( eventHandle.elem, arguments ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t};\r\n\t\t\t// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events\r\n\t\t\teventHandle.elem = elem;\r\n\t\t}\r\n\r\n\t\t// Handle multiple events separated by a space\r\n\t\t// jQuery(...).bind(\"mouseover mouseout\", fn);\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// If event changes its type, use the special event handlers for the changed type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// If selector defined, determine special event api type, otherwise given type\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\r\n\t\t\t// Update special based on newly reset type\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\r\n\t\t\t// handleObj is passed to all event handlers\r\n\t\t\thandleObj = jQuery.extend({\r\n\t\t\t\ttype: type,\r\n\t\t\t\torigType: origType,\r\n\t\t\t\tdata: data,\r\n\t\t\t\thandler: handler,\r\n\t\t\t\tguid: handler.guid,\r\n\t\t\t\tselector: selector,\r\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\r\n\t\t\t\tnamespace: namespaces.join(\".\")\r\n\t\t\t}, handleObjIn );\r\n\r\n\t\t\t// Init the event handler queue if we're the first\r\n\t\t\tif ( !(handlers = events[ type ]) ) {\r\n\t\t\t\thandlers = events[ type ] = [];\r\n\t\t\t\thandlers.delegateCount = 0;\r\n\r\n\t\t\t\t// Only use addEventListener/attachEvent if the special events handler returns false\r\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\r\n\t\t\t\t\t// Bind the global event handler to the element\r\n\t\t\t\t\tif ( elem.addEventListener ) {\r\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\r\n\r\n\t\t\t\t\t} else if ( elem.attachEvent ) {\r\n\t\t\t\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ( special.add ) {\r\n\t\t\t\tspecial.add.call( elem, handleObj );\r\n\r\n\t\t\t\tif ( !handleObj.handler.guid ) {\r\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add to the element's handler list, delegates in front\r\n\t\t\tif ( selector ) {\r\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\r\n\t\t\t} else {\r\n\t\t\t\thandlers.push( handleObj );\r\n\t\t\t}\r\n\r\n\t\t\t// Keep track of which events have ever been used, for event optimization\r\n\t\t\tjQuery.event.global[ type ] = true;\r\n\t\t}\r\n\r\n\t\t// Nullify elem to prevent memory leaks in IE\r\n\t\telem = null;\r\n\t},\r\n\r\n\t// Detach an event or set of events from an element\r\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\r\n\t\tvar j, handleObj, tmp,\r\n\t\t\torigCount, t, events,\r\n\t\t\tspecial, handlers, type,\r\n\t\t\tnamespaces, origType,\r\n\t\t\telemData = jQuery.hasData( elem ) && jQuery._data( elem );\r\n\r\n\t\tif ( !elemData || !(events = elemData.events) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Once for each type.namespace in types; type may be omitted\r\n\t\ttypes = ( types || \"\" ).match( core_rnotwhite ) || [\"\"];\r\n\t\tt = types.length;\r\n\t\twhile ( t-- ) {\r\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\r\n\t\t\ttype = origType = tmp[1];\r\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\r\n\r\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\r\n\t\t\tif ( !type ) {\r\n\t\t\t\tfor ( type in events ) {\r\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\r\n\t\t\thandlers = events[ type ] || [];\r\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\r\n\r\n\t\t\t// Remove matching events\r\n\t\t\torigCount = j = handlers.length;\r\n\t\t\twhile ( j-- ) {\r\n\t\t\t\thandleObj = handlers[ j ];\r\n\r\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\r\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\r\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\r\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\r\n\t\t\t\t\thandlers.splice( j, 1 );\r\n\r\n\t\t\t\t\tif ( handleObj.selector ) {\r\n\t\t\t\t\t\thandlers.delegateCount--;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( special.remove ) {\r\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\r\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\r\n\t\t\tif ( origCount && !handlers.length ) {\r\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\r\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdelete events[ type ];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Remove the expando if it's no longer used\r\n\t\tif ( jQuery.isEmptyObject( events ) ) {\r\n\t\t\tdelete elemData.handle;\r\n\r\n\t\t\t// removeData also checks for emptiness and clears the expando if empty\r\n\t\t\t// so use it instead of delete\r\n\t\t\tjQuery._removeData( elem, \"events\" );\r\n\t\t}\r\n\t},\r\n\r\n\ttrigger: function( event, data, elem, onlyHandlers ) {\r\n\t\tvar handle, ontype, cur,\r\n\t\t\tbubbleType, special, tmp, i,\r\n\t\t\teventPath = [ elem || document ],\r\n\t\t\ttype = core_hasOwn.call( event, \"type\" ) ? event.type : event,\r\n\t\t\tnamespaces = core_hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\r\n\r\n\t\tcur = tmp = elem = elem || document;\r\n\r\n\t\t// Don't do events on text and comment nodes\r\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\r\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ( type.indexOf(\".\") >= 0 ) {\r\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\r\n\t\t\tnamespaces = type.split(\".\");\r\n\t\t\ttype = namespaces.shift();\r\n\t\t\tnamespaces.sort();\r\n\t\t}\r\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\r\n\r\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\r\n\t\tevent = event[ jQuery.expando ] ?\r\n\t\t\tevent :\r\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\r\n\r\n\t\tevent.isTrigger = true;\r\n\t\tevent.namespace = namespaces.join(\".\");\r\n\t\tevent.namespace_re = event.namespace ?\r\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\r\n\t\t\tnull;\r\n\r\n\t\t// Clean up the event in case it is being reused\r\n\t\tevent.result = undefined;\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = elem;\r\n\t\t}\r\n\r\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\r\n\t\tdata = data == null ?\r\n\t\t\t[ event ] :\r\n\t\t\tjQuery.makeArray( data, [ event ] );\r\n\r\n\t\t// Allow special events to draw outside the lines\r\n\t\tspecial = jQuery.event.special[ type ] || {};\r\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\r\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\r\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\tbubbleType = special.delegateType || type;\r\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\r\n\t\t\t\teventPath.push( cur );\r\n\t\t\t\ttmp = cur;\r\n\t\t\t}\r\n\r\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\r\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\r\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fire handlers on the event path\r\n\t\ti = 0;\r\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\r\n\r\n\t\t\tevent.type = i > 1 ?\r\n\t\t\t\tbubbleType :\r\n\t\t\t\tspecial.bindType || type;\r\n\r\n\t\t\t// jQuery handler\r\n\t\t\thandle = ( jQuery._data( cur, \"events\" ) || {} )[ event.type ] && jQuery._data( cur, \"handle\" );\r\n\t\t\tif ( handle ) {\r\n\t\t\t\thandle.apply( cur, data );\r\n\t\t\t}\r\n\r\n\t\t\t// Native handler\r\n\t\t\thandle = ontype && cur[ ontype ];\r\n\t\t\tif ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t}\r\n\t\t}\r\n\t\tevent.type = type;\r\n\r\n\t\t// If nobody prevented the default action, do it now\r\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\r\n\r\n\t\t\tif ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&\r\n\t\t\t\t!(type === \"click\" && jQuery.nodeName( elem, \"a\" )) && jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\r\n\t\t\t\t// Can't use an .isFunction() check here because IE6/7 fails that test.\r\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\r\n\t\t\t\tif ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {\r\n\r\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\r\n\t\t\t\t\ttmp = elem[ ontype ];\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\r\n\t\t\t\t\tjQuery.event.triggered = type;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\telem[ type ]();\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// IE<9 dies on focus/blur to hidden element (#1486,#12518)\r\n\t\t\t\t\t\t// only reproducible on winXP IE8 native, not IE9 in IE8 mode\r\n\t\t\t\t\t}\r\n\t\t\t\t\tjQuery.event.triggered = undefined;\r\n\r\n\t\t\t\t\tif ( tmp ) {\r\n\t\t\t\t\t\telem[ ontype ] = tmp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\tdispatch: function( event ) {\r\n\r\n\t\t// Make a writable jQuery.Event from the native event object\r\n\t\tevent = jQuery.event.fix( event );\r\n\r\n\t\tvar i, ret, handleObj, matched, j,\r\n\t\t\thandlerQueue = [],\r\n\t\t\targs = core_slice.call( arguments ),\r\n\t\t\thandlers = ( jQuery._data( this, \"events\" ) || {} )[ event.type ] || [],\r\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\r\n\r\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\r\n\t\targs[0] = event;\r\n\t\tevent.delegateTarget = this;\r\n\r\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\r\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine handlers\r\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\r\n\r\n\t\t// Run delegates first; they may want to stop propagation beneath us\r\n\t\ti = 0;\r\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\r\n\t\t\tevent.currentTarget = matched.elem;\r\n\r\n\t\t\tj = 0;\r\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\r\n\r\n\t\t\t\t// Triggered event must either 1) have no namespace, or\r\n\t\t\t\t// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).\r\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\r\n\r\n\t\t\t\t\tevent.handleObj = handleObj;\r\n\t\t\t\t\tevent.data = handleObj.data;\r\n\r\n\t\t\t\t\tvar obj = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler );\r\n\t\t\t\t\tif(obj.apply){\r\n\t\t\t\t\t\tret = obj.apply( matched.elem, args );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ( ret !== undefined ) {\r\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\r\n\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Call the postDispatch hook for the mapped type\r\n\t\tif ( special.postDispatch ) {\r\n\t\t\tspecial.postDispatch.call( this, event );\r\n\t\t}\r\n\r\n\t\treturn event.result;\r\n\t},\r\n\r\n\thandlers: function( event, handlers ) {\r\n\t\tvar sel, handleObj, matches, i,\r\n\t\t\thandlerQueue = [],\r\n\t\t\tdelegateCount = handlers.delegateCount,\r\n\t\t\tcur = event.target;\r\n\r\n\t\t// Find delegate handlers\r\n\t\t// Black-hole SVG <use> instance trees (#13180)\r\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\r\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\r\n\r\n\t\t\tfor ( ; cur != this; cur = cur.parentNode || this ) {\r\n\r\n\t\t\t\t// Don't check non-elements (#13208)\r\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\r\n\t\t\t\tif ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== \"click\") ) {\r\n\t\t\t\t\tmatches = [];\r\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\r\n\t\t\t\t\t\thandleObj = handlers[ i ];\r\n\r\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\r\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\r\n\r\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\r\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\r\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\r\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif ( matches[ sel ] ) {\r\n\t\t\t\t\t\t\tmatches.push( handleObj );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( matches.length ) {\r\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Add the remaining (directly-bound) handlers\r\n\t\tif ( delegateCount < handlers.length ) {\r\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\r\n\t\t}\r\n\r\n\t\treturn handlerQueue;\r\n\t},\r\n\r\n\tfix: function( event ) {\r\n\t\tif ( event[ jQuery.expando ] ) {\r\n\t\t\treturn event;\r\n\t\t}\r\n\r\n\t\t// Create a writable copy of the event object and normalize some properties\r\n\t\tvar i, prop, copy,\r\n\t\t\ttype = event.type,\r\n\t\t\toriginalEvent = event,\r\n\t\t\tfixHook = this.fixHooks[ type ];\r\n\r\n\t\tif ( !fixHook ) {\r\n\t\t\tthis.fixHooks[ type ] = fixHook =\r\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\r\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\r\n\t\t\t\t{};\r\n\t\t}\r\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\r\n\r\n\t\tevent = new jQuery.Event( originalEvent );\r\n\r\n\t\ti = copy.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tprop = copy[ i ];\r\n\t\t\tevent[ prop ] = originalEvent[ prop ];\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// Fix target property (#1925)\r\n\t\tif ( !event.target ) {\r\n\t\t\tevent.target = originalEvent.srcElement || document;\r\n\t\t}\r\n\r\n\t\t// Support: Chrome 23+, Safari?\r\n\t\t// Target should not be a text node (#504, #13143)\r\n\t\tif ( event.target.nodeType === 3 ) {\r\n\t\t\tevent.target = event.target.parentNode;\r\n\t\t}\r\n\r\n\t\t// Support: IE<9\r\n\t\t// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)\r\n\t\tevent.metaKey = !!event.metaKey;\r\n\r\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\r\n\t},\r\n\r\n\t// Includes some event props shared by KeyEvent and MouseEvent\r\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\r\n\r\n\tfixHooks: {},\r\n\r\n\tkeyHooks: {\r\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\r\n\t\t\t// Add which for key events\r\n\t\t\tif ( event.which == null ) {\r\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tmouseHooks: {\r\n\t\tprops: \"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\r\n\t\tfilter: function( event, original ) {\r\n\t\t\tvar body, eventDoc, doc,\r\n\t\t\t\tbutton = original.button,\r\n\t\t\t\tfromElement = original.fromElement;\r\n\r\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\r\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\r\n\t\t\t\teventDoc = event.target.ownerDocument || document;\r\n\t\t\t\tdoc = eventDoc.documentElement;\r\n\t\t\t\tbody = eventDoc.body;\r\n\r\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\r\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );\r\n\t\t\t}\r\n\r\n\t\t\t// Add relatedTarget, if necessary\r\n\t\t\tif ( !event.relatedTarget && fromElement ) {\r\n\t\t\t\tevent.relatedTarget = fromElement === event.target ? original.toElement : fromElement;\r\n\t\t\t}\r\n\r\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\r\n\t\t\t// Note: button is not normalized, so don't use it\r\n\t\t\tif ( !event.which && button !== undefined ) {\r\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn event;\r\n\t\t}\r\n\t},\r\n\r\n\tspecial: {\r\n\t\tload: {\r\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\r\n\t\t\tnoBubble: true\r\n\t\t},\r\n\t\tclick: {\r\n\t\t\t// For checkbox, fire native event so checked state will be right\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( jQuery.nodeName( this, \"input\" ) && this.type === \"checkbox\" && this.click ) {\r\n\t\t\t\t\tthis.click();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfocus: {\r\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this !== document.activeElement && this.focus ) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tthis.focus();\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t// Support: IE<9\r\n\t\t\t\t\t\t// If we error on focus to hidden element (#1486, #12518),\r\n\t\t\t\t\t\t// let .trigger() run the handlers\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusin\"\r\n\t\t},\r\n\t\tblur: {\r\n\t\t\ttrigger: function() {\r\n\t\t\t\tif ( this === document.activeElement && this.blur ) {\r\n\t\t\t\t\tthis.blur();\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tdelegateType: \"focusout\"\r\n\t\t},\r\n\r\n\t\tbeforeunload: {\r\n\t\t\tpostDispatch: function( event ) {\r\n\r\n\t\t\t\t// Even when returnValue equals to undefined Firefox will still show alert\r\n\t\t\t\tif ( event.result !== undefined ) {\r\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tsimulate: function( type, elem, event, bubble ) {\r\n\t\t// Piggyback on a donor event to simulate a different one.\r\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\r\n\t\t// simulated event prevents default then we do the same on the donor.\r\n\t\tvar e = jQuery.extend(\r\n\t\t\tnew jQuery.Event(),\r\n\t\t\tevent,\r\n\t\t\t{ type: type,\r\n\t\t\t\tisSimulated: true,\r\n\t\t\t\toriginalEvent: {}\r\n\t\t\t}\r\n\t\t);\r\n\t\tif ( bubble ) {\r\n\t\t\tjQuery.event.trigger( e, null, elem );\r\n\t\t} else {\r\n\t\t\tjQuery.event.dispatch.call( elem, e );\r\n\t\t}\r\n\t\tif ( e.isDefaultPrevented() ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.removeEvent = document.removeEventListener ?\r\n\tfunction( elem, type, handle ) {\r\n\t\tif ( elem.removeEventListener ) {\r\n\t\t\telem.removeEventListener( type, handle, false );\r\n\t\t}\r\n\t} :\r\n\tfunction( elem, type, handle ) {\r\n\t\tvar name = \"on\" + type;\r\n\r\n\t\tif ( elem.detachEvent ) {\r\n\r\n\t\t\t// #8545, #7054, preventing memory leaks for custom events in IE6-8\r\n\t\t\t// detachEvent needed property on element, by name of that event, to properly expose it to GC\r\n\t\t\tif ( typeof elem[ name ] === core_strundefined ) {\r\n\t\t\t\telem[ name ] = null;\r\n\t\t\t}\r\n\r\n\t\t\telem.detachEvent( name, handle );\r\n\t\t}\r\n\t};\r\n\r\njQuery.Event = function( src, props ) {\r\n\t// Allow instantiation without the 'new' keyword\r\n\tif ( !(this instanceof jQuery.Event) ) {\r\n\t\treturn new jQuery.Event( src, props );\r\n\t}\r\n\r\n\t// Event object\r\n\tif ( src && src.type ) {\r\n\t\tthis.originalEvent = src;\r\n\t\tthis.type = src.type;\r\n\r\n\t\t// Events bubbling up the document may have been marked as prevented\r\n\t\t// by a handler lower down the tree; reflect the correct value.\r\n\t\tthis.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||\r\n\t\t\tsrc.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;\r\n\r\n\t// Event type\r\n\t} else {\r\n\t\tthis.type = src;\r\n\t}\r\n\r\n\t// Put explicitly provided properties onto the event object\r\n\tif ( props ) {\r\n\t\tjQuery.extend( this, props );\r\n\t}\r\n\r\n\t// Create a timestamp if incoming event doesn't have one\r\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\r\n\r\n\t// Mark it as fixed\r\n\tthis[ jQuery.expando ] = true;\r\n};\r\n\r\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\r\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\r\njQuery.Event.prototype = {\r\n\tisDefaultPrevented: returnFalse,\r\n\tisPropagationStopped: returnFalse,\r\n\tisImmediatePropagationStopped: returnFalse,\r\n\r\n\tpreventDefault: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isDefaultPrevented = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// If preventDefault exists, run it on the original event\r\n\t\tif ( e.preventDefault ) {\r\n\t\t\te.preventDefault();\r\n\r\n\t\t// Support: IE\r\n\t\t// Otherwise set the returnValue property of the original event to false\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t},\r\n\tstopPropagation: function() {\r\n\t\tvar e = this.originalEvent;\r\n\r\n\t\tthis.isPropagationStopped = returnTrue;\r\n\t\tif ( !e ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// If stopPropagation exists, run it on the original event\r\n\t\tif ( e.stopPropagation ) {\r\n\t\t\te.stopPropagation();\r\n\t\t}\r\n\r\n\t\t// Support: IE\r\n\t\t// Set the cancelBubble property of the original event to true\r\n\t\te.cancelBubble = true;\r\n\t},\r\n\tstopImmediatePropagation: function() {\r\n\t\tthis.isImmediatePropagationStopped = returnTrue;\r\n\t\tthis.stopPropagation();\r\n\t}\r\n};\r\n\r\n// Create mouseenter/leave events using mouseover/out and event-time checks\r\njQuery.each({\r\n\tmouseenter: \"mouseover\",\r\n\tmouseleave: \"mouseout\"\r\n}, function( orig, fix ) {\r\n\tjQuery.event.special[ orig ] = {\r\n\t\tdelegateType: fix,\r\n\t\tbindType: fix,\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar ret,\r\n\t\t\t\ttarget = this,\r\n\t\t\t\trelated = event.relatedTarget,\r\n\t\t\t\thandleObj = event.handleObj;\r\n\r\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\r\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\r\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\r\n\t\t\t\tevent.type = handleObj.origType;\r\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\r\n\t\t\t\tevent.type = fix;\r\n\t\t\t}\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t};\r\n});\r\n\r\n// IE submit delegation\r\nif ( !jQuery.support.submitBubbles ) {\r\n\r\n\tjQuery.event.special.submit = {\r\n\t\tsetup: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Lazy-add a submit handler when a descendant form may potentially be submitted\r\n\t\t\tjQuery.event.add( this, \"click._submit keypress._submit\", function( e ) {\r\n\t\t\t\t// Node name check avoids a VML-related crash in IE (#9807)\r\n\t\t\t\tvar elem = e.target,\r\n\t\t\t\t\tform = jQuery.nodeName( elem, \"input\" ) || jQuery.nodeName( elem, \"button\" ) ? elem.form : undefined;\r\n\t\t\t\tif ( form && !jQuery._data( form, \"submitBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( form, \"submit._submit\", function( event ) {\r\n\t\t\t\t\t\tevent._submit_bubble = true;\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( form, \"submitBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t// return undefined since we don't need an event listener\r\n\t\t},\r\n\r\n\t\tpostDispatch: function( event ) {\r\n\t\t\t// If form was submitted by the user, bubble the event up the tree\r\n\t\t\tif ( event._submit_bubble ) {\r\n\t\t\t\tdelete event._submit_bubble;\r\n\t\t\t\tif ( this.parentNode && !event.isTrigger ) {\r\n\t\t\t\t\tjQuery.event.simulate( \"submit\", this.parentNode, event, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\t// Only need this for delegated form submit events\r\n\t\t\tif ( jQuery.nodeName( this, \"form\" ) ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// Remove delegated handlers; cleanData eventually reaps submit handlers attached above\r\n\t\t\tjQuery.event.remove( this, \"._submit\" );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// IE change delegation and checkbox/radio fix\r\nif ( !jQuery.support.changeBubbles ) {\r\n\r\n\tjQuery.event.special.change = {\r\n\r\n\t\tsetup: function() {\r\n\r\n\t\t\tif ( rformElems.test( this.nodeName ) ) {\r\n\t\t\t\t// IE doesn't fire change on a check/radio until blur; trigger it on click\r\n\t\t\t\t// after a propertychange. Eat the blur-change in special.change.handle.\r\n\t\t\t\t// This still fires onchange a second time for check/radio after blur.\r\n\t\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\r\n\t\t\t\t\tjQuery.event.add( this, \"propertychange._change\", function( event ) {\r\n\t\t\t\t\t\tif ( event.originalEvent.propertyName === \"checked\" ) {\r\n\t\t\t\t\t\t\tthis._just_changed = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery.event.add( this, \"click._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this._just_changed && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tthis._just_changed = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// Allow triggered, simulated change events (#11500)\r\n\t\t\t\t\t\tjQuery.event.simulate( \"change\", this, event, true );\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t// Delegated event; lazy-add a change handler on descendant inputs\r\n\t\t\tjQuery.event.add( this, \"beforeactivate._change\", function( e ) {\r\n\t\t\t\tvar elem = e.target;\r\n\r\n\t\t\t\tif ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, \"changeBubbles\" ) ) {\r\n\t\t\t\t\tjQuery.event.add( elem, \"change._change\", function( event ) {\r\n\t\t\t\t\t\tif ( this.parentNode && !event.isSimulated && !event.isTrigger ) {\r\n\t\t\t\t\t\t\tjQuery.event.simulate( \"change\", this.parentNode, event, true );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t\tjQuery._data( elem, \"changeBubbles\", true );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t},\r\n\r\n\t\thandle: function( event ) {\r\n\t\t\tvar elem = event.target;\r\n\r\n\t\t\t// Swallow native change events from checkbox/radio, we already triggered them above\r\n\t\t\tif ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== \"radio\" && elem.type !== \"checkbox\") ) {\r\n\t\t\t\treturn event.handleObj.handler.apply( this, arguments );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tteardown: function() {\r\n\t\t\tjQuery.event.remove( this, \"._change\" );\r\n\r\n\t\t\treturn !rformElems.test( this.nodeName );\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Create \"bubbling\" focus and blur events\r\nif ( !jQuery.support.focusinBubbles ) {\r\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\r\n\r\n\t\t// Attach a single capturing handler while someone wants focusin/focusout\r\n\t\tvar attaches = 0,\r\n\t\t\thandler = function( event ) {\r\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\r\n\t\t\t};\r\n\r\n\t\tjQuery.event.special[ fix ] = {\r\n\t\t\tsetup: function() {\r\n\t\t\t\tif ( attaches++ === 0 ) {\r\n\t\t\t\t\tdocument.addEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tteardown: function() {\r\n\t\t\t\tif ( --attaches === 0 ) {\r\n\t\t\t\t\tdocument.removeEventListener( orig, handler, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t});\r\n}\r\n\r\njQuery.fn.extend({\r\n\r\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\r\n\t\tvar type, origFn;\r\n\r\n\t\t// Types can be a map of types/handlers\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-Object, selector, data )\r\n\t\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\t\t// ( types-Object, data )\r\n\t\t\t\tdata = data || selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( data == null && fn == null ) {\r\n\t\t\t// ( types, fn )\r\n\t\t\tfn = selector;\r\n\t\t\tdata = selector = undefined;\r\n\t\t} else if ( fn == null ) {\r\n\t\t\tif ( typeof selector === \"string\" ) {\r\n\t\t\t\t// ( types, selector, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = undefined;\r\n\t\t\t} else {\r\n\t\t\t\t// ( types, data, fn )\r\n\t\t\t\tfn = data;\r\n\t\t\t\tdata = selector;\r\n\t\t\t\tselector = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t} else if ( !fn ) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif ( one === 1 ) {\r\n\t\t\torigFn = fn;\r\n\t\t\tfn = function( event ) {\r\n\t\t\t\t// Can use an empty set, since event contains the info\r\n\t\t\t\tjQuery().off( event );\r\n\t\t\t\treturn origFn.apply( this, arguments );\r\n\t\t\t};\r\n\t\t\t// Use same guid so caller can remove using origFn\r\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\r\n\t\t}\r\n\t\treturn this.each( function() {\r\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\r\n\t\t});\r\n\t},\r\n\tone: function( types, selector, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn, 1 );\r\n\t},\r\n\toff: function( types, selector, fn ) {\r\n\t\tvar handleObj, type;\r\n\t\tif ( types && types.preventDefault && types.handleObj ) {\r\n\t\t\t// ( event ) dispatched jQuery.Event\r\n\t\t\thandleObj = types.handleObj;\r\n\t\t\tjQuery( types.delegateTarget ).off(\r\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\r\n\t\t\t\thandleObj.selector,\r\n\t\t\t\thandleObj.handler\r\n\t\t\t);\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( typeof types === \"object\" ) {\r\n\t\t\t// ( types-object [, selector] )\r\n\t\t\tfor ( type in types ) {\r\n\t\t\t\tthis.off( type, selector, types[ type ] );\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif ( selector === false || typeof selector === \"function\" ) {\r\n\t\t\t// ( types [, fn] )\r\n\t\t\tfn = selector;\r\n\t\t\tselector = undefined;\r\n\t\t}\r\n\t\tif ( fn === false ) {\r\n\t\t\tfn = returnFalse;\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.remove( this, types, fn, selector );\r\n\t\t});\r\n\t},\r\n\r\n\tbind: function( types, data, fn ) {\r\n\t\treturn this.on( types, null, data, fn );\r\n\t},\r\n\tunbind: function( types, fn ) {\r\n\t\treturn this.off( types, null, fn );\r\n\t},\r\n\r\n\tdelegate: function( selector, types, data, fn ) {\r\n\t\treturn this.on( types, selector, data, fn );\r\n\t},\r\n\tundelegate: function( selector, types, fn ) {\r\n\t\t// ( namespace ) or ( selector, types [, fn] )\r\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\r\n\t},\r\n\r\n\ttrigger: function( type, data ) {\r\n\t\treturn this.each(function() {\r\n\t\t\tjQuery.event.trigger( type, data, this );\r\n\t\t});\r\n\t},\r\n\ttriggerHandler: function( type, data ) {\r\n\t\tvar elem = this[0];\r\n\t\tif ( elem ) {\r\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\r\n\t\t}\r\n\t}\r\n});\r\n/*!\r\n * Sizzle CSS Selector Engine\r\n * Copyright 2012 jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://sizzlejs.com/\r\n */\r\n(function( window, undefined ) {\r\n\r\nvar i,\r\n\tcachedruns,\r\n\tExpr,\r\n\tgetText,\r\n\tisXML,\r\n\tcompile,\r\n\thasDuplicate,\r\n\toutermostContext,\r\n\r\n\t// Local document vars\r\n\tsetDocument,\r\n\tdocument,\r\n\tdocElem,\r\n\tdocumentIsXML,\r\n\trbuggyQSA,\r\n\trbuggyMatches,\r\n\tmatches,\r\n\tcontains,\r\n\tsortOrder,\r\n\r\n\t// Instance-specific data\r\n\texpando = \"sizzle\" + -(new Date()),\r\n\tpreferredDoc = window.document,\r\n\tsupport = {},\r\n\tdirruns = 0,\r\n\tdone = 0,\r\n\tclassCache = createCache(),\r\n\ttokenCache = createCache(),\r\n\tcompilerCache = createCache(),\r\n\r\n\t// General-purpose constants\r\n\tstrundefined = typeof undefined,\r\n\tMAX_NEGATIVE = 1 << 31,\r\n\r\n\t// Array methods\r\n\tarr = [],\r\n\tpop = arr.pop,\r\n\tpush = arr.push,\r\n\tslice = arr.slice,\r\n\t// Use a stripped-down indexOf if we can't use a native one\r\n\tindexOf = arr.indexOf || function( elem ) {\r\n\t\tvar i = 0,\r\n\t\t\tlen = this.length;\r\n\t\tfor ( ; i < len; i++ ) {\r\n\t\t\tif ( this[i] === elem ) {\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\r\n\t// Regular expressions\r\n\r\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\r\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\r\n\t// http://www.w3.org/TR/css3-syntax/#characters\r\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\r\n\r\n\t// Loosely modeled on CSS identifier characters\r\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\r\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\r\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\r\n\r\n\t// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors\r\n\toperators = \"([*^$|!~]?=)\",\r\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")\" + whitespace +\r\n\t\t\"*(?:\" + operators + whitespace + \"*(?:(['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|(\" + identifier + \")|)|)\" + whitespace + \"*\\\\]\",\r\n\r\n\t// Prefer arguments quoted,\r\n\t// then not containing pseudos/brackets,\r\n\t// then attribute selectors/non-parenthetical expressions,\r\n\t// then anything else\r\n\t// These preferences are here to reduce the number of selectors\r\n\t// needing tokenize in the PSEUDO preFilter\r\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\(((['\\\"])((?:\\\\\\\\.|[^\\\\\\\\])*?)\\\\3|((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes.replace( 3, 8 ) + \")*)|.*)\\\\)|)\",\r\n\r\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\r\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\r\n\r\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\r\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([\\\\x20\\\\t\\\\r\\\\n\\\\f>+~])\" + whitespace + \"*\" ),\r\n\trpseudo = new RegExp( pseudos ),\r\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\r\n\r\n\tmatchExpr = {\r\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\r\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\r\n\t\t\"NAME\": new RegExp( \"^\\\\[name=['\\\"]?(\" + characterEncoding + \")['\\\"]?\\\\]\" ),\r\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\r\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\r\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\r\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\r\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\r\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\r\n\t\t// For use in libraries implementing .is()\r\n\t\t// We use this for POS matching in `select`\r\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\r\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\r\n\t},\r\n\r\n\trsibling = /[\\x20\\t\\r\\n\\f]*[+~]/,\r\n\r\n\trnative = /^[^{]+\\{\\s*\\[native code/,\r\n\r\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\r\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\r\n\r\n\trinputs = /^(?:input|select|textarea|button)$/i,\r\n\trheader = /^h\\d$/i,\r\n\r\n\trescape = /'|\\\\/g,\r\n\trattributeQuotes = /\\=[\\x20\\t\\r\\n\\f]*([^'\"\\]]*)[\\x20\\t\\r\\n\\f]*\\]/g,\r\n\r\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\r\n\trunescape = /\\\\([\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|.)/g,\r\n\tfunescape = function( _, escaped ) {\r\n\t\tvar high = \"0x\" + escaped - 0x10000;\r\n\t\t// NaN means non-codepoint\r\n\t\treturn high !== high ?\r\n\t\t\tescaped :\r\n\t\t\t// BMP codepoint\r\n\t\t\thigh < 0 ?\r\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\r\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\r\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\r\n\t};\r\n\r\n// Use a stripped-down slice if we can't use a native one\r\ntry {\r\n\tslice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType;\r\n} catch ( e ) {\r\n\tslice = function( i ) {\r\n\t\tvar elem,\r\n\t\t\tresults = [];\r\n\t\twhile ( (elem = this[i++]) ) {\r\n\t\t\tresults.push( elem );\r\n\t\t}\r\n\t\treturn results;\r\n\t};\r\n}\r\n\r\n/**\r\n * For feature detection\r\n * @param {Function} fn The function to test for native support\r\n */\r\nfunction isNative( fn ) {\r\n\treturn rnative.test( fn + \"\" );\r\n}\r\n\r\n/**\r\n * Create key-value caches of limited size\r\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\r\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\r\n *\tdeleting the oldest entry\r\n */\r\nfunction createCache() {\r\n\tvar cache,\r\n\t\tkeys = [];\r\n\r\n\treturn (cache = function( key, value ) {\r\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\r\n\t\tif ( keys.push( key += \" \" ) > Expr.cacheLength ) {\r\n\t\t\t// Only keep the most recent entries\r\n\t\t\tdelete cache[ keys.shift() ];\r\n\t\t}\r\n\t\treturn (cache[ key ] = value);\r\n\t});\r\n}\r\n\r\n/**\r\n * Mark a function for special use by Sizzle\r\n * @param {Function} fn The function to mark\r\n */\r\nfunction markFunction( fn ) {\r\n\tfn[ expando ] = true;\r\n\treturn fn;\r\n}\r\n\r\n/**\r\n * Support testing using an element\r\n * @param {Function} fn Passed the created div and expects a boolean result\r\n */\r\nfunction assert( fn ) {\r\n\tvar div = document.createElement(\"div\");\r\n\r\n\ttry {\r\n\t\treturn fn( div );\r\n\t} catch (e) {\r\n\t\treturn false;\r\n\t} finally {\r\n\t\t// release memory in IE\r\n\t\tdiv = null;\r\n\t}\r\n}\r\n\r\nfunction Sizzle( selector, context, results, seed ) {\r\n\tvar match, elem, m, nodeType,\r\n\t\t// QSA vars\r\n\t\ti, groups, old, nid, newContext, newSelector;\r\n\r\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\r\n\tcontext = context || document;\r\n\tresults = results || [];\r\n\r\n\tif ( !selector || typeof selector !== \"string\" ) {\r\n\t\treturn results;\r\n\t}\r\n\r\n\tif ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tif ( !documentIsXML && !seed ) {\r\n\r\n\t\t// Shortcuts\r\n\t\tif ( (match = rquickExpr.exec( selector )) ) {\r\n\t\t\t// Speed-up: Sizzle(\"#ID\")\r\n\t\t\tif ( (m = match[1]) ) {\r\n\t\t\t\tif ( nodeType === 9 ) {\r\n\t\t\t\t\telem = context.getElementById( m );\r\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\t\tif ( elem && elem.parentNode ) {\r\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\r\n\t\t\t\t\t\t// by name instead of ID\r\n\t\t\t\t\t\tif ( elem.id === m ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Context is not a document\r\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\r\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\r\n\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t// Speed-up: Sizzle(\"TAG\")\r\n\t\t\t} else if ( match[2] ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );\r\n\t\t\t\treturn results;\r\n\r\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\r\n\t\t\t} else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {\r\n\t\t\t\tpush.apply( results, slice.call(context.getElementsByClassName( m ), 0) );\r\n\t\t\t\treturn results;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// QSA path\r\n\t\tif ( support.qsa && !rbuggyQSA.test(selector) ) {\r\n\t\t\told = true;\r\n\t\t\tnid = expando;\r\n\t\t\tnewContext = context;\r\n\t\t\tnewSelector = nodeType === 9 && selector;\r\n\r\n\t\t\t// qSA works strangely on Element-rooted queries\r\n\t\t\t// We can work around this by specifying an extra ID on the root\r\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\r\n\t\t\t// IE 8 doesn't work on object elements\r\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\r\n\t\t\t\tgroups = tokenize( selector );\r\n\r\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\r\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\r\n\t\t\t\t}\r\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\r\n\r\n\t\t\t\ti = groups.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\r\n\t\t\t\t}\r\n\t\t\t\tnewContext = rsibling.test( selector ) && context.parentNode || context;\r\n\t\t\t\tnewSelector = groups.join(\",\");\r\n\t\t\t}\r\n\r\n\t\t\tif ( newSelector ) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpush.apply( results, slice.call( newContext.querySelectorAll(\r\n\t\t\t\t\t\tnewSelector\r\n\t\t\t\t\t), 0 ) );\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t} catch(qsaError) {\r\n\t\t\t\t} finally {\r\n\t\t\t\t\tif ( !old ) {\r\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// All others\r\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\r\n}\r\n\r\n/**\r\n * Detect xml\r\n * @param {Element|Object} elem An element or a document\r\n */\r\nisXML = Sizzle.isXML = function( elem ) {\r\n\t// documentElement is verified for cases where it doesn't yet exist\r\n\t// (such as loading iframes in IE - #4833)\r\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\r\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\r\n};\r\n\r\n/**\r\n * Sets document-related variables once based on the current document\r\n * @param {Element|Object} [doc] An element or document object to use to set the document\r\n * @returns {Object} Returns the current document\r\n */\r\nsetDocument = Sizzle.setDocument = function( node ) {\r\n\tvar doc = node ? node.ownerDocument || node : preferredDoc;\r\n\r\n\t// If no document and documentElement is available, return\r\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\r\n\t\treturn document;\r\n\t}\r\n\r\n\t// Set our document\r\n\tdocument = doc;\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Support tests\r\n\tdocumentIsXML = isXML( doc );\r\n\r\n\t// Check if getElementsByTagName(\"*\") returns only elements\r\n\tsupport.tagNameNoComments = assert(function( div ) {\r\n\t\tdiv.appendChild( doc.createComment(\"\") );\r\n\t\treturn !div.getElementsByTagName(\"*\").length;\r\n\t});\r\n\r\n\t// Check if attributes should be retrieved by attribute nodes\r\n\tsupport.attributes = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<select></select>\";\r\n\t\tvar type = typeof div.lastChild.getAttribute(\"multiple\");\r\n\t\t// IE8 returns a string for some attributes even when not present\r\n\t\treturn type !== \"boolean\" && type !== \"string\";\r\n\t});\r\n\r\n\t// Check if getElementsByClassName can be trusted\r\n\tsupport.getByClassName = assert(function( div ) {\r\n\t\t// Opera can't find a second classname (in 9.6)\r\n\t\tdiv.innerHTML = \"<div class='hidden e'></div><div class='hidden'></div>\";\r\n\t\tif ( !div.getElementsByClassName || !div.getElementsByClassName(\"e\").length ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Safari 3.2 caches class attributes and doesn't catch changes\r\n\t\tdiv.lastChild.className = \"e\";\r\n\t\treturn div.getElementsByClassName(\"e\").length === 2;\r\n\t});\r\n\r\n\t// Check if getElementById returns elements by name\r\n\t// Check if getElementsByName privileges form controls or returns elements by ID\r\n\tsupport.getByName = assert(function( div ) {\r\n\t\t// Inject content\r\n\t\tdiv.id = expando + 0;\r\n\t\tdiv.innerHTML = \"<a name='\" + expando + \"'></a><div name='\" + expando + \"'></div>\";\r\n\t\tdocElem.insertBefore( div, docElem.firstChild );\r\n\r\n\t\t// Test\r\n\t\tvar pass = doc.getElementsByName &&\r\n\t\t\t// buggy browsers will return fewer than the correct 2\r\n\t\t\tdoc.getElementsByName( expando ).length === 2 +\r\n\t\t\t// buggy browsers will return more than the correct 0\r\n\t\t\tdoc.getElementsByName( expando + 0 ).length;\r\n\t\tsupport.getIdNotName = !doc.getElementById( expando );\r\n\r\n\t\t// Cleanup\r\n\t\tdocElem.removeChild( div );\r\n\r\n\t\treturn pass;\r\n\t});\r\n\r\n\t// IE6/7 return modified attributes\r\n\tExpr.attrHandle = assert(function( div ) {\r\n\t\tdiv.innerHTML = \"<a href='#'></a>\";\r\n\t\treturn div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&\r\n\t\t\tdiv.firstChild.getAttribute(\"href\") === \"#\";\r\n\t}) ?\r\n\t\t{} :\r\n\t\t{\r\n\t\t\t\"href\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute( \"href\", 2 );\r\n\t\t\t},\r\n\t\t\t\"type\": function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"type\");\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t// ID find and filter\r\n\tif ( support.getIdNotName ) {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\r\n\t\t\t\t// nodes that are no longer in the document #6963\r\n\t\t\t\treturn m && m.parentNode ? [m] : [];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t} else {\r\n\t\tExpr.find[\"ID\"] = function( id, context ) {\r\n\t\t\tif ( typeof context.getElementById !== strundefined && !documentIsXML ) {\r\n\t\t\t\tvar m = context.getElementById( id );\r\n\r\n\t\t\t\treturn m ?\r\n\t\t\t\t\tm.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode(\"id\").value === id ?\r\n\t\t\t\t\t\t[m] :\r\n\t\t\t\t\t\tundefined :\r\n\t\t\t\t\t[];\r\n\t\t\t}\r\n\t\t};\r\n\t\tExpr.filter[\"ID\"] = function( id ) {\r\n\t\t\tvar attrId = id.replace( runescape, funescape );\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode(\"id\");\r\n\t\t\t\treturn node && node.value === attrId;\r\n\t\t\t};\r\n\t\t};\r\n\t}\r\n\r\n\t// Tag\r\n\tExpr.find[\"TAG\"] = support.tagNameNoComments ?\r\n\t\tfunction( tag, context ) {\r\n\t\t\tif ( typeof context.getElementsByTagName !== strundefined ) {\r\n\t\t\t\treturn context.getElementsByTagName( tag );\r\n\t\t\t}\r\n\t\t} :\r\n\t\tfunction( tag, context ) {\r\n\t\t\tvar elem,\r\n\t\t\t\ttmp = [],\r\n\t\t\t\ti = 0,\r\n\t\t\t\tresults = context.getElementsByTagName( tag );\r\n\r\n\t\t\t// Filter out possible comments\r\n\t\t\tif ( tag === \"*\" ) {\r\n\t\t\t\twhile ( (elem = results[i++]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\ttmp.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn tmp;\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t};\r\n\r\n\t// Name\r\n\tExpr.find[\"NAME\"] = support.getByName && function( tag, context ) {\r\n\t\tif ( typeof context.getElementsByName !== strundefined ) {\r\n\t\t\treturn context.getElementsByName( name );\r\n\t\t}\r\n\t};\r\n\r\n\t// Class\r\n\tExpr.find[\"CLASS\"] = support.getByClassName && function( className, context ) {\r\n\t\tif ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {\r\n\t\t\treturn context.getElementsByClassName( className );\r\n\t\t}\r\n\t};\r\n\r\n\t// QSA and matchesSelector support\r\n\r\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\r\n\trbuggyMatches = [];\r\n\r\n\t// qSa(:focus) reports false when true (Chrome 21),\r\n\t// no need to also add to buggyMatches since matches checks buggyQSA\r\n\t// A support test would require too much code (would include document ready)\r\n\trbuggyQSA = [ \":focus\" ];\r\n\r\n\tif ( (support.qsa = isNative(doc.querySelectorAll)) ) {\r\n\t\t// Build QSA regex\r\n\t\t// Regex strategy adopted from Diego Perini\r\n\t\tassert(function( div ) {\r\n\t\t\t// Select is set to empty string on purpose\r\n\t\t\t// This is to test IE's treatment of not explictly\r\n\t\t\t// setting a boolean content attribute,\r\n\t\t\t// since its presence should be enough\r\n\t\t\t// http://bugs.jquery.com/ticket/12359\r\n\t\t\tdiv.innerHTML = \"<select><option selected=''></option></select>\";\r\n\r\n\t\t\t// IE8 - Some boolean attributes are not treated correctly\r\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:checked|disabled|ismap|multiple|readonly|selected|value)\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Webkit/Opera - :checked should return selected option elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\r\n\t\t\t\trbuggyQSA.push(\":checked\");\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tassert(function( div ) {\r\n\r\n\t\t\t// Opera 10-12/IE8 - ^= $= *= and empty values\r\n\t\t\t// Should not select anything\r\n\t\t\tdiv.innerHTML = \"<input type='hidden' i=''/>\";\r\n\t\t\tif ( div.querySelectorAll(\"[i^='']\").length ) {\r\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:\\\"\\\"|'')\" );\r\n\t\t\t}\r\n\r\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\r\n\t\t\t// IE8 throws error here and will not see later tests\r\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\r\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\r\n\t\t\t}\r\n\r\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\r\n\t\t\tdiv.querySelectorAll(\"*,:x\");\r\n\t\t\trbuggyQSA.push(\",.*:\");\r\n\t\t});\r\n\t}\r\n\r\n\tif ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||\r\n\t\tdocElem.mozMatchesSelector ||\r\n\t\tdocElem.webkitMatchesSelector ||\r\n\t\tdocElem.oMatchesSelector ||\r\n\t\tdocElem.msMatchesSelector) )) ) {\r\n\r\n\t\tassert(function( div ) {\r\n\t\t\t// Check to see if it's possible to do matchesSelector\r\n\t\t\t// on a disconnected node (IE 9)\r\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\r\n\r\n\t\t\t// This should fail with an exception\r\n\t\t\t// Gecko does not error, returns false instead\r\n\t\t\tmatches.call( div, \"[s!='']:x\" );\r\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\r\n\t\t});\r\n\t}\r\n\r\n\trbuggyQSA = new RegExp( rbuggyQSA.join(\"|\") );\r\n\trbuggyMatches = new RegExp( rbuggyMatches.join(\"|\") );\r\n\r\n\t// Element contains another\r\n\t// Purposefully does not implement inclusive descendent\r\n\t// As in, an element does not contain itself\r\n\tcontains = isNative(docElem.contains) || docElem.compareDocumentPosition ?\r\n\t\tfunction( a, b ) {\r\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\r\n\t\t\t\tbup = b && b.parentNode;\r\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\r\n\t\t\t\tadown.contains ?\r\n\t\t\t\t\tadown.contains( bup ) :\r\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\r\n\t\t\t));\r\n\t\t} :\r\n\t\tfunction( a, b ) {\r\n\t\t\tif ( b ) {\r\n\t\t\t\twhile ( (b = b.parentNode) ) {\r\n\t\t\t\t\tif ( b === a ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t};\r\n\r\n\t// Document order sorting\r\n\tsortOrder = docElem.compareDocumentPosition ?\r\n\tfunction( a, b ) {\r\n\t\tvar compare;\r\n\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {\r\n\t\t\tif ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {\r\n\t\t\t\tif ( a === doc || contains( preferredDoc, a ) ) {\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t\tif ( b === doc || contains( preferredDoc, b ) ) {\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t\treturn compare & 4 ? -1 : 1;\r\n\t\t}\r\n\r\n\t\treturn a.compareDocumentPosition ? -1 : 1;\r\n\t} :\r\n\tfunction( a, b ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\taup = a.parentNode,\r\n\t\t\tbup = b.parentNode,\r\n\t\t\tap = [ a ],\r\n\t\t\tbp = [ b ];\r\n\r\n\t\t// Exit early if the nodes are identical\r\n\t\tif ( a === b ) {\r\n\t\t\thasDuplicate = true;\r\n\t\t\treturn 0;\r\n\r\n\t\t// Parentless nodes are either documents or disconnected\r\n\t\t} else if ( !aup || !bup ) {\r\n\t\t\treturn a === doc ? -1 :\r\n\t\t\t\tb === doc ? 1 :\r\n\t\t\t\taup ? -1 :\r\n\t\t\t\tbup ? 1 :\r\n\t\t\t\t0;\r\n\r\n\t\t// If the nodes are siblings, we can do a quick check\r\n\t\t} else if ( aup === bup ) {\r\n\t\t\treturn siblingCheck( a, b );\r\n\t\t}\r\n\r\n\t\t// Otherwise we need full lists of their ancestors for comparison\r\n\t\tcur = a;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tap.unshift( cur );\r\n\t\t}\r\n\t\tcur = b;\r\n\t\twhile ( (cur = cur.parentNode) ) {\r\n\t\t\tbp.unshift( cur );\r\n\t\t}\r\n\r\n\t\t// Walk down the tree looking for a discrepancy\r\n\t\twhile ( ap[i] === bp[i] ) {\r\n\t\t\ti++;\r\n\t\t}\r\n\r\n\t\treturn i ?\r\n\t\t\t// Do a sibling check if the nodes have a common ancestor\r\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\r\n\r\n\t\t\t// Otherwise nodes in our document sort first\r\n\t\t\tap[i] === preferredDoc ? -1 :\r\n\t\t\tbp[i] === preferredDoc ? 1 :\r\n\t\t\t0;\r\n\t};\r\n\r\n\t// Always assume the presence of duplicates if sort doesn't\r\n\t// pass them to our comparison function (as in Google Chrome).\r\n\thasDuplicate = false;\r\n\t[0, 0].sort( sortOrder );\r\n\tsupport.detectDuplicates = hasDuplicate;\r\n\r\n\treturn document;\r\n};\r\n\r\nSizzle.matches = function( expr, elements ) {\r\n\treturn Sizzle( expr, null, null, elements );\r\n};\r\n\r\nSizzle.matchesSelector = function( elem, expr ) {\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\t// Make sure that attribute selectors are quoted\r\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\r\n\r\n\t// rbuggyQSA always contains :focus, so no need for an existence check\r\n\tif ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {\r\n\t\ttry {\r\n\t\t\tvar ret = matches.call( elem, expr );\r\n\r\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\r\n\t\t\tif ( ret || support.disconnectedMatch ||\r\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\r\n\t\t\t\t\t// fragment in IE 9\r\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\t\t} catch(e) {}\r\n\t}\r\n\r\n\treturn Sizzle( expr, document, null, [elem] ).length > 0;\r\n};\r\n\r\nSizzle.contains = function( context, elem ) {\r\n\t// Set document vars if needed\r\n\tif ( ( context.ownerDocument || context ) !== document ) {\r\n\t\tsetDocument( context );\r\n\t}\r\n\treturn contains( context, elem );\r\n};\r\n\r\nSizzle.attr = function( elem, name ) {\r\n\tvar val;\r\n\r\n\t// Set document vars if needed\r\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\r\n\t\tsetDocument( elem );\r\n\t}\r\n\r\n\tif ( !documentIsXML ) {\r\n\t\tname = name.toLowerCase();\r\n\t}\r\n\tif ( (val = Expr.attrHandle[ name ]) ) {\r\n\t\treturn val( elem );\r\n\t}\r\n\tif ( documentIsXML || support.attributes ) {\r\n\t\treturn elem.getAttribute( name );\r\n\t}\r\n\treturn ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?\r\n\t\tname :\r\n\t\tval && val.specified ? val.value : null;\r\n};\r\n\r\nSizzle.error = function( msg ) {\r\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\r\n};\r\n\r\n// Document sorting and removing duplicates\r\nSizzle.uniqueSort = function( results ) {\r\n\tvar elem,\r\n\t\tduplicates = [],\r\n\t\ti = 1,\r\n\t\tj = 0;\r\n\r\n\t// Unless we *know* we can detect duplicates, assume their presence\r\n\thasDuplicate = !support.detectDuplicates;\r\n\tresults.sort( sortOrder );\r\n\r\n\tif ( hasDuplicate ) {\r\n\t\tfor ( ; (elem = results[i]); i++ ) {\r\n\t\t\tif ( elem === results[ i - 1 ] ) {\r\n\t\t\t\tj = duplicates.push( i );\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile ( j-- ) {\r\n\t\t\tresults.splice( duplicates[ j ], 1 );\r\n\t\t}\r\n\t}\r\n\r\n\treturn results;\r\n};\r\n\r\nfunction siblingCheck( a, b ) {\r\n\tvar cur = b && a,\r\n\t\tdiff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE );\r\n\r\n\t// Use IE sourceIndex if available on both nodes\r\n\tif ( diff ) {\r\n\t\treturn diff;\r\n\t}\r\n\r\n\t// Check if b follows a\r\n\tif ( cur ) {\r\n\t\twhile ( (cur = cur.nextSibling) ) {\r\n\t\t\tif ( cur === b ) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn a ? 1 : -1;\r\n}\r\n\r\n// Returns a function to use in pseudos for input types\r\nfunction createInputPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn name === \"input\" && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for buttons\r\nfunction createButtonPseudo( type ) {\r\n\treturn function( elem ) {\r\n\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\r\n\t};\r\n}\r\n\r\n// Returns a function to use in pseudos for positionals\r\nfunction createPositionalPseudo( fn ) {\r\n\treturn markFunction(function( argument ) {\r\n\t\targument = +argument;\r\n\t\treturn markFunction(function( seed, matches ) {\r\n\t\t\tvar j,\r\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\r\n\t\t\t\ti = matchIndexes.length;\r\n\r\n\t\t\t// Match elements found at the specified indexes\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\r\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Utility function for retrieving the text value of an array of DOM nodes\r\n * @param {Array|Element} elem\r\n */\r\ngetText = Sizzle.getText = function( elem ) {\r\n\tvar node,\r\n\t\tret = \"\",\r\n\t\ti = 0,\r\n\t\tnodeType = elem.nodeType;\r\n\r\n\tif ( !nodeType ) {\r\n\t\t// If no nodeType, this is expected to be an array\r\n\t\tfor ( ; (node = elem[i]); i++ ) {\r\n\t\t\t// Do not traverse comment nodes\r\n\t\t\tret += getText( node );\r\n\t\t}\r\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\r\n\t\t// Use textContent for elements\r\n\t\t// innerText usage removed for consistency of new lines (see #11153)\r\n\t\tif ( typeof elem.textContent === \"string\" ) {\r\n\t\t\treturn elem.textContent;\r\n\t\t} else {\r\n\t\t\t// Traverse its children\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tret += getText( elem );\r\n\t\t\t}\r\n\t\t}\r\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\r\n\t\treturn elem.nodeValue;\r\n\t}\r\n\t// Do not include comment or processing instruction nodes\r\n\r\n\treturn ret;\r\n};\r\n\r\nExpr = Sizzle.selectors = {\r\n\r\n\t// Can be adjusted by the user\r\n\tcacheLength: 50,\r\n\r\n\tcreatePseudo: markFunction,\r\n\r\n\tmatch: matchExpr,\r\n\r\n\tfind: {},\r\n\r\n\trelative: {\r\n\t\t\">\": { dir: \"parentNode\", first: true },\r\n\t\t\" \": { dir: \"parentNode\" },\r\n\t\t\"+\": { dir: \"previousSibling\", first: true },\r\n\t\t\"~\": { dir: \"previousSibling\" }\r\n\t},\r\n\r\n\tpreFilter: {\r\n\t\t\"ATTR\": function( match ) {\r\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\r\n\r\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\r\n\t\t\tmatch[3] = ( match[4] || match[5] || \"\" ).replace( runescape, funescape );\r\n\r\n\t\t\tif ( match[2] === \"~=\" ) {\r\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\r\n\t\t\t}\r\n\r\n\t\t\treturn match.slice( 0, 4 );\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( match ) {\r\n\t\t\t/* matches from matchExpr[\"CHILD\"]\r\n\t\t\t\t1 type (only|nth|...)\r\n\t\t\t\t2 what (child|of-type)\r\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\r\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\r\n\t\t\t\t5 sign of xn-component\r\n\t\t\t\t6 x of xn-component\r\n\t\t\t\t7 sign of y-component\r\n\t\t\t\t8 y of y-component\r\n\t\t\t*/\r\n\t\t\tmatch[1] = match[1].toLowerCase();\r\n\r\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\r\n\t\t\t\t// nth-* requires argument\r\n\t\t\t\tif ( !match[3] ) {\r\n\t\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\r\n\t\t\t\t// remember that false/true cast respectively to 0/1\r\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\r\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\r\n\r\n\t\t\t// other types prohibit arguments\r\n\t\t\t} else if ( match[3] ) {\r\n\t\t\t\tSizzle.error( match[0] );\r\n\t\t\t}\r\n\r\n\t\t\treturn match;\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( match ) {\r\n\t\t\tvar excess,\r\n\t\t\t\tunquoted = !match[5] && match[2];\r\n\r\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t// Accept quoted arguments as-is\r\n\t\t\tif ( match[4] ) {\r\n\t\t\t\tmatch[2] = match[4];\r\n\r\n\t\t\t// Strip excess characters from unquoted arguments\r\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\r\n\t\t\t\t// Get excess from tokenize (recursively)\r\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\r\n\t\t\t\t// advance to the next closing parenthesis\r\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\r\n\r\n\t\t\t\t// excess is a negative index\r\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\r\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\r\n\t\t\t}\r\n\r\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\r\n\t\t\treturn match.slice( 0, 3 );\r\n\t\t}\r\n\t},\r\n\r\n\tfilter: {\r\n\r\n\t\t\"TAG\": function( nodeName ) {\r\n\t\t\tif ( nodeName === \"*\" ) {\r\n\t\t\t\treturn function() { return true; };\r\n\t\t\t}\r\n\r\n\t\t\tnodeName = nodeName.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CLASS\": function( className ) {\r\n\t\t\tvar pattern = classCache[ className + \" \" ];\r\n\r\n\t\t\treturn pattern ||\r\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\r\n\t\t\t\tclassCache( className, function( elem ) {\r\n\t\t\t\t\treturn pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute(\"class\")) || \"\" );\r\n\t\t\t\t});\r\n\t\t},\r\n\r\n\t\t\"ATTR\": function( name, operator, check ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar result = Sizzle.attr( elem, name );\r\n\r\n\t\t\t\tif ( result == null ) {\r\n\t\t\t\t\treturn operator === \"!=\";\r\n\t\t\t\t}\r\n\t\t\t\tif ( !operator ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tresult += \"\";\r\n\r\n\t\t\t\treturn operator === \"=\" ? result === check :\r\n\t\t\t\t\toperator === \"!=\" ? result !== check :\r\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\r\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\r\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result + \" \" ).indexOf( check ) > -1 :\r\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\r\n\t\t\t\t\tfalse;\r\n\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\r\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\r\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\r\n\t\t\t\tofType = what === \"of-type\";\r\n\r\n\t\t\treturn first === 1 && last === 0 ?\r\n\r\n\t\t\t\t// Shortcut for :nth-*(n)\r\n\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\treturn !!elem.parentNode;\r\n\t\t\t\t} :\r\n\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\r\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\r\n\t\t\t\t\t\tparent = elem.parentNode,\r\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\r\n\t\t\t\t\t\tuseCache = !xml && !ofType;\r\n\r\n\t\t\t\t\tif ( parent ) {\r\n\r\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\r\n\t\t\t\t\t\tif ( simple ) {\r\n\t\t\t\t\t\t\twhile ( dir ) {\r\n\t\t\t\t\t\t\t\tnode = elem;\r\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\r\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\r\n\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\r\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\r\n\r\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\r\n\t\t\t\t\t\tif ( forward && useCache ) {\r\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\r\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\r\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\r\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\r\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\r\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\r\n\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\r\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\r\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\r\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Use previously-cached element index if available\r\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\r\n\t\t\t\t\t\t\tdiff = cache[1];\r\n\r\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\r\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\r\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\r\n\r\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\r\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\r\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\r\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\r\n\t\t\t\t\t\tdiff -= last;\r\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t},\r\n\r\n\t\t\"PSEUDO\": function( pseudo, argument ) {\r\n\t\t\t// pseudo-class names are case-insensitive\r\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\r\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\r\n\t\t\t// Remember that setFilters inherits from pseudos\r\n\t\t\tvar args,\r\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\r\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\r\n\r\n\t\t\t// The user may use createPseudo to indicate that\r\n\t\t\t// arguments are needed to create the filter function\r\n\t\t\t// just as Sizzle does\r\n\t\t\tif ( fn[ expando ] ) {\r\n\t\t\t\treturn fn( argument );\r\n\t\t\t}\r\n\r\n\t\t\t// But maintain support for old signatures\r\n\t\t\tif ( fn.length > 1 ) {\r\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\r\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\r\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\r\n\t\t\t\t\t\tvar idx,\r\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\r\n\t\t\t\t\t\t\ti = matched.length;\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tidx = indexOf.call( seed, matched[i] );\r\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tfunction( elem ) {\r\n\t\t\t\t\t\treturn fn( elem, 0, args );\r\n\t\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t},\r\n\r\n\tpseudos: {\r\n\t\t// Potentially complex pseudos\r\n\t\t\"not\": markFunction(function( selector ) {\r\n\t\t\t// Trim the selector passed to compile\r\n\t\t\t// to avoid treating leading and trailing\r\n\t\t\t// spaces as combinators\r\n\t\t\tvar input = [],\r\n\t\t\t\tresults = [],\r\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\r\n\r\n\t\t\treturn matcher[ expando ] ?\r\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\r\n\t\t\t\t\tvar elem,\r\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\r\n\t\t\t\t\t\ti = seed.length;\r\n\r\n\t\t\t\t\t// Match elements unmatched by `matcher`\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}) :\r\n\t\t\t\tfunction( elem, context, xml ) {\r\n\t\t\t\t\tinput[0] = elem;\r\n\t\t\t\t\tmatcher( input, null, xml, results );\r\n\t\t\t\t\treturn !results.pop();\r\n\t\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"has\": markFunction(function( selector ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t\"contains\": markFunction(function( text ) {\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// \"Whether an element is represented by a :lang() selector\r\n\t\t// is based solely on the element's language value\r\n\t\t// being equal to the identifier C,\r\n\t\t// or beginning with the identifier C immediately followed by \"-\".\r\n\t\t// The matching of C against the element's language value is performed case-insensitively.\r\n\t\t// The identifier C does not have to be a valid language name.\"\r\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\r\n\t\t\"lang\": markFunction( function( lang ) {\r\n\t\t\t// lang value must be a valid identifider\r\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\r\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\r\n\t\t\t}\r\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\r\n\t\t\treturn function( elem ) {\r\n\t\t\t\tvar elemLang;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif ( (elemLang = documentIsXML ?\r\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\") :\r\n\t\t\t\t\t\telem.lang) ) {\r\n\r\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\r\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\r\n\t\t\t\treturn false;\r\n\t\t\t};\r\n\t\t}),\r\n\r\n\t\t// Miscellaneous\r\n\t\t\"target\": function( elem ) {\r\n\t\t\tvar hash = window.location && window.location.hash;\r\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\r\n\t\t},\r\n\r\n\t\t\"root\": function( elem ) {\r\n\t\t\treturn elem === docElem;\r\n\t\t},\r\n\r\n\t\t\"focus\": function( elem ) {\r\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\r\n\t\t},\r\n\r\n\t\t// Boolean properties\r\n\t\t\"enabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === false;\r\n\t\t},\r\n\r\n\t\t\"disabled\": function( elem ) {\r\n\t\t\treturn elem.disabled === true;\r\n\t\t},\r\n\r\n\t\t\"checked\": function( elem ) {\r\n\t\t\t// In CSS3, :checked should return both checked and selected elements\r\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\r\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\r\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\r\n\t\t},\r\n\r\n\t\t\"selected\": function( elem ) {\r\n\t\t\t// Accessing this property makes selected-by-default\r\n\t\t\t// options in Safari work properly\r\n\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\telem.parentNode.selectedIndex;\r\n\t\t\t}\r\n\r\n\t\t\treturn elem.selected === true;\r\n\t\t},\r\n\r\n\t\t// Contents\r\n\t\t\"empty\": function( elem ) {\r\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\r\n\t\t\t// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),\r\n\t\t\t// not comment, processing instructions, or others\r\n\t\t\t// Thanks to Diego Perini for the nodeName shortcut\r\n\t\t\t// Greater than \"@\" means alpha characters (specifically not starting with \"#\" or \"?\")\r\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\r\n\t\t\t\tif ( elem.nodeName > \"@\" || elem.nodeType === 3 || elem.nodeType === 4 ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\r\n\t\t\"parent\": function( elem ) {\r\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\r\n\t\t},\r\n\r\n\t\t// Element/input types\r\n\t\t\"header\": function( elem ) {\r\n\t\t\treturn rheader.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"input\": function( elem ) {\r\n\t\t\treturn rinputs.test( elem.nodeName );\r\n\t\t},\r\n\r\n\t\t\"button\": function( elem ) {\r\n\t\t\tvar name = elem.nodeName.toLowerCase();\r\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\r\n\t\t},\r\n\r\n\t\t\"text\": function( elem ) {\r\n\t\t\tvar attr;\r\n\t\t\t// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)\r\n\t\t\t// use getAttribute instead to test this case\r\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\r\n\t\t\t\telem.type === \"text\" &&\r\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === elem.type );\r\n\t\t},\r\n\r\n\t\t// Position-in-collection\r\n\t\t\"first\": createPositionalPseudo(function() {\r\n\t\t\treturn [ 0 ];\r\n\t\t}),\r\n\r\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\treturn [ length - 1 ];\r\n\t\t}),\r\n\r\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\r\n\t\t}),\r\n\r\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 0;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\r\n\t\t\tvar i = 1;\r\n\t\t\tfor ( ; i < length; i += 2 ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; --i >= 0; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t}),\r\n\r\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\r\n\t\t\tvar i = argument < 0 ? argument + length : argument;\r\n\t\t\tfor ( ; ++i < length; ) {\r\n\t\t\t\tmatchIndexes.push( i );\r\n\t\t\t}\r\n\t\t\treturn matchIndexes;\r\n\t\t})\r\n\t}\r\n};\r\n\r\n// Add button/input type pseudos\r\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\r\n\tExpr.pseudos[ i ] = createInputPseudo( i );\r\n}\r\nfor ( i in { submit: true, reset: true } ) {\r\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\r\n}\r\n\r\nfunction tokenize( selector, parseOnly ) {\r\n\tvar matched, match, tokens, type,\r\n\t\tsoFar, groups, preFilters,\r\n\t\tcached = tokenCache[ selector + \" \" ];\r\n\r\n\tif ( cached ) {\r\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\r\n\t}\r\n\r\n\tsoFar = selector;\r\n\tgroups = [];\r\n\tpreFilters = Expr.preFilter;\r\n\r\n\twhile ( soFar ) {\r\n\r\n\t\t// Comma and first run\r\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\r\n\t\t\tif ( match ) {\r\n\t\t\t\t// Don't consume trailing commas as valid\r\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\r\n\t\t\t}\r\n\t\t\tgroups.push( tokens = [] );\r\n\t\t}\r\n\r\n\t\tmatched = false;\r\n\r\n\t\t// Combinators\r\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\r\n\t\t\tmatched = match.shift();\r\n\t\t\ttokens.push( {\r\n\t\t\t\tvalue: matched,\r\n\t\t\t\t// Cast descendant combinators to space\r\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\r\n\t\t\t} );\r\n\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t}\r\n\r\n\t\t// Filters\r\n\t\tfor ( type in Expr.filter ) {\r\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\r\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\r\n\t\t\t\tmatched = match.shift();\r\n\t\t\t\ttokens.push( {\r\n\t\t\t\t\tvalue: matched,\r\n\t\t\t\t\ttype: type,\r\n\t\t\t\t\tmatches: match\r\n\t\t\t\t} );\r\n\t\t\t\tsoFar = soFar.slice( matched.length );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( !matched ) {\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the length of the invalid excess\r\n\t// if we're just parsing\r\n\t// Otherwise, throw an error or return tokens\r\n\treturn parseOnly ?\r\n\t\tsoFar.length :\r\n\t\tsoFar ?\r\n\t\t\tSizzle.error( selector ) :\r\n\t\t\t// Cache the tokens\r\n\t\t\ttokenCache( selector, groups ).slice( 0 );\r\n}\r\n\r\nfunction toSelector( tokens ) {\r\n\tvar i = 0,\r\n\t\tlen = tokens.length,\r\n\t\tselector = \"\";\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tselector += tokens[i].value;\r\n\t}\r\n\treturn selector;\r\n}\r\n\r\nfunction addCombinator( matcher, combinator, base ) {\r\n\tvar dir = combinator.dir,\r\n\t\tcheckNonElements = base && dir === \"parentNode\",\r\n\t\tdoneName = done++;\r\n\r\n\treturn combinator.first ?\r\n\t\t// Check against closest ancestor/preceding element\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\treturn matcher( elem, context, xml );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} :\r\n\r\n\t\t// Check against all ancestor/preceding elements\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar data, cache, outerCache,\r\n\t\t\t\tdirkey = dirruns + \" \" + doneName;\r\n\r\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\r\n\t\t\tif ( xml ) {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\r\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\r\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\r\n\t\t\t\t\t\tif ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {\r\n\t\t\t\t\t\t\tif ( (data = cache[1]) === true || data === cachedruns ) {\r\n\t\t\t\t\t\t\t\treturn data === true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcache = outerCache[ dir ] = [ dirkey ];\r\n\t\t\t\t\t\t\tcache[1] = matcher( elem, context, xml ) || cachedruns;\r\n\t\t\t\t\t\t\tif ( cache[1] === true ) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n}\r\n\r\nfunction elementMatcher( matchers ) {\r\n\treturn matchers.length > 1 ?\r\n\t\tfunction( elem, context, xml ) {\r\n\t\t\tvar i = matchers.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t} :\r\n\t\tmatchers[0];\r\n}\r\n\r\nfunction condense( unmatched, map, filter, context, xml ) {\r\n\tvar elem,\r\n\t\tnewUnmatched = [],\r\n\t\ti = 0,\r\n\t\tlen = unmatched.length,\r\n\t\tmapped = map != null;\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (elem = unmatched[i]) ) {\r\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\r\n\t\t\t\tnewUnmatched.push( elem );\r\n\t\t\t\tif ( mapped ) {\r\n\t\t\t\t\tmap.push( i );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn newUnmatched;\r\n}\r\n\r\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\r\n\tif ( postFilter && !postFilter[ expando ] ) {\r\n\t\tpostFilter = setMatcher( postFilter );\r\n\t}\r\n\tif ( postFinder && !postFinder[ expando ] ) {\r\n\t\tpostFinder = setMatcher( postFinder, postSelector );\r\n\t}\r\n\treturn markFunction(function( seed, results, context, xml ) {\r\n\t\tvar temp, i, elem,\r\n\t\t\tpreMap = [],\r\n\t\t\tpostMap = [],\r\n\t\t\tpreexisting = results.length,\r\n\r\n\t\t\t// Get initial elements from seed or context\r\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\r\n\r\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\r\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\r\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\r\n\t\t\t\telems,\r\n\r\n\t\t\tmatcherOut = matcher ?\r\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\r\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\r\n\r\n\t\t\t\t\t// ...intermediate processing is necessary\r\n\t\t\t\t\t[] :\r\n\r\n\t\t\t\t\t// ...otherwise use results directly\r\n\t\t\t\t\tresults :\r\n\t\t\t\tmatcherIn;\r\n\r\n\t\t// Find primary matches\r\n\t\tif ( matcher ) {\r\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\r\n\t\t}\r\n\r\n\t\t// Apply postFilter\r\n\t\tif ( postFilter ) {\r\n\t\t\ttemp = condense( matcherOut, postMap );\r\n\t\t\tpostFilter( temp, [], context, xml );\r\n\r\n\t\t\t// Un-match failing elements by moving them back to matcherIn\r\n\t\t\ti = temp.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\tif ( (elem = temp[i]) ) {\r\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( seed ) {\r\n\t\t\tif ( postFinder || preFilter ) {\r\n\t\t\t\tif ( postFinder ) {\r\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\r\n\t\t\t\t\ttemp = [];\r\n\t\t\t\t\ti = matcherOut.length;\r\n\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\r\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\r\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\r\n\t\t\t\ti = matcherOut.length;\r\n\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\r\n\t\t\t\t\t\t(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {\r\n\r\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t// Add elements to results, through postFinder if defined\r\n\t\t} else {\r\n\t\t\tmatcherOut = condense(\r\n\t\t\t\tmatcherOut === results ?\r\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\r\n\t\t\t\t\tmatcherOut\r\n\t\t\t);\r\n\t\t\tif ( postFinder ) {\r\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\r\n\t\t\t} else {\r\n\t\t\t\tpush.apply( results, matcherOut );\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction matcherFromTokens( tokens ) {\r\n\tvar checkContext, matcher, j,\r\n\t\tlen = tokens.length,\r\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\r\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\r\n\t\ti = leadingRelative ? 1 : 0,\r\n\r\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\r\n\t\tmatchContext = addCombinator( function( elem ) {\r\n\t\t\treturn elem === checkContext;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchAnyContext = addCombinator( function( elem ) {\r\n\t\t\treturn indexOf.call( checkContext, elem ) > -1;\r\n\t\t}, implicitRelative, true ),\r\n\t\tmatchers = [ function( elem, context, xml ) {\r\n\t\t\treturn ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\r\n\t\t\t\t(checkContext = context).nodeType ?\r\n\t\t\t\t\tmatchContext( elem, context, xml ) :\r\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\r\n\t\t} ];\r\n\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\r\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\r\n\t\t} else {\r\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\r\n\r\n\t\t\t// Return special upon seeing a positional matcher\r\n\t\t\tif ( matcher[ expando ] ) {\r\n\t\t\t\t// Find the next relative operator (if any) for proper handling\r\n\t\t\t\tj = ++i;\r\n\t\t\t\tfor ( ; j < len; j++ ) {\r\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn setMatcher(\r\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\r\n\t\t\t\t\ti > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, \"$1\" ),\r\n\t\t\t\t\tmatcher,\r\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\r\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\r\n\t\t\t\t\tj < len && toSelector( tokens )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\tmatchers.push( matcher );\r\n\t\t}\r\n\t}\r\n\r\n\treturn elementMatcher( matchers );\r\n}\r\n\r\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\r\n\t// A counter to specify which element is currently being matched\r\n\tvar matcherCachedRuns = 0,\r\n\t\tbySet = setMatchers.length > 0,\r\n\t\tbyElement = elementMatchers.length > 0,\r\n\t\tsuperMatcher = function( seed, context, xml, results, expandContext ) {\r\n\t\t\tvar elem, j, matcher,\r\n\t\t\t\tsetMatched = [],\r\n\t\t\t\tmatchedCount = 0,\r\n\t\t\t\ti = \"0\",\r\n\t\t\t\tunmatched = seed && [],\r\n\t\t\t\toutermost = expandContext != null,\r\n\t\t\t\tcontextBackup = outermostContext,\r\n\t\t\t\t// We must always have either seed elements or context\r\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", expandContext && context.parentNode || context ),\r\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\r\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);\r\n\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\toutermostContext = context !== document && context;\r\n\t\t\t\tcachedruns = matcherCachedRuns;\r\n\t\t\t}\r\n\r\n\t\t\t// Add elements passing elementMatchers directly to results\r\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\r\n\t\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\t\t\tif ( byElement && elem ) {\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\r\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\r\n\t\t\t\t\t\t\tresults.push( elem );\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( outermost ) {\r\n\t\t\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\t\t\tcachedruns = ++matcherCachedRuns;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Track unmatched elements for set filters\r\n\t\t\t\tif ( bySet ) {\r\n\t\t\t\t\t// They will have gone through all possible matchers\r\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\r\n\t\t\t\t\t\tmatchedCount--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Lengthen the array for every element, matched or not\r\n\t\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t\tunmatched.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Apply set filters to unmatched elements\r\n\t\t\tmatchedCount += i;\r\n\t\t\tif ( bySet && i !== matchedCount ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\r\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( seed ) {\r\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\r\n\t\t\t\t\tif ( matchedCount > 0 ) {\r\n\t\t\t\t\t\twhile ( i-- ) {\r\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\r\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\r\n\t\t\t\t\tsetMatched = condense( setMatched );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Add matches to results\r\n\t\t\t\tpush.apply( results, setMatched );\r\n\r\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\r\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\r\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\r\n\r\n\t\t\t\t\tSizzle.uniqueSort( results );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Override manipulation of globals by nested matchers\r\n\t\t\tif ( outermost ) {\r\n\t\t\t\tdirruns = dirrunsUnique;\r\n\t\t\t\toutermostContext = contextBackup;\r\n\t\t\t}\r\n\r\n\t\t\treturn unmatched;\r\n\t\t};\r\n\r\n\treturn bySet ?\r\n\t\tmarkFunction( superMatcher ) :\r\n\t\tsuperMatcher;\r\n}\r\n\r\ncompile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {\r\n\tvar i,\r\n\t\tsetMatchers = [],\r\n\t\telementMatchers = [],\r\n\t\tcached = compilerCache[ selector + \" \" ];\r\n\r\n\tif ( !cached ) {\r\n\t\t// Generate a function of recursive functions that can be used to check each element\r\n\t\tif ( !group ) {\r\n\t\t\tgroup = tokenize( selector );\r\n\t\t}\r\n\t\ti = group.length;\r\n\t\twhile ( i-- ) {\r\n\t\t\tcached = matcherFromTokens( group[i] );\r\n\t\t\tif ( cached[ expando ] ) {\r\n\t\t\t\tsetMatchers.push( cached );\r\n\t\t\t} else {\r\n\t\t\t\telementMatchers.push( cached );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Cache the compiled function\r\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\r\n\t}\r\n\treturn cached;\r\n};\r\n\r\nfunction multipleContexts( selector, contexts, results ) {\r\n\tvar i = 0,\r\n\t\tlen = contexts.length;\r\n\tfor ( ; i < len; i++ ) {\r\n\t\tSizzle( selector, contexts[i], results );\r\n\t}\r\n\treturn results;\r\n}\r\n\r\nfunction select( selector, context, results, seed ) {\r\n\tvar i, tokens, token, type, find,\r\n\t\tmatch = tokenize( selector );\r\n\r\n\tif ( !seed ) {\r\n\t\t// Try to minimize operations if there is only one group\r\n\t\tif ( match.length === 1 ) {\r\n\r\n\t\t\t// Take a shortcut and set the context if the root selector is an ID\r\n\t\t\ttokens = match[0] = match[0].slice( 0 );\r\n\t\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\r\n\t\t\t\t\tcontext.nodeType === 9 && !documentIsXML &&\r\n\t\t\t\t\tExpr.relative[ tokens[1].type ] ) {\r\n\r\n\t\t\t\tcontext = Expr.find[\"ID\"]( token.matches[0].replace( runescape, funescape ), context )[0];\r\n\t\t\t\tif ( !context ) {\r\n\t\t\t\t\treturn results;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tselector = selector.slice( tokens.shift().value.length );\r\n\t\t\t}\r\n\r\n\t\t\t// Fetch a seed set for right-to-left matching\r\n\t\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\r\n\t\t\twhile ( i-- ) {\r\n\t\t\t\ttoken = tokens[i];\r\n\r\n\t\t\t\t// Abort if we hit a combinator\r\n\t\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ( (find = Expr.find[ type ]) ) {\r\n\t\t\t\t\t// Search, expanding context for leading sibling combinators\r\n\t\t\t\t\tif ( (seed = find(\r\n\t\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\r\n\t\t\t\t\t\trsibling.test( tokens[0].type ) && context.parentNode || context\r\n\t\t\t\t\t)) ) {\r\n\r\n\t\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\r\n\t\t\t\t\t\ttokens.splice( i, 1 );\r\n\t\t\t\t\t\tselector = seed.length && toSelector( tokens );\r\n\t\t\t\t\t\tif ( !selector ) {\r\n\t\t\t\t\t\t\tpush.apply( results, slice.call( seed, 0 ) );\r\n\t\t\t\t\t\t\treturn results;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Compile and execute a filtering function\r\n\t// Provide `match` to avoid retokenization if we modified the selector above\r\n\tcompile( selector, match )(\r\n\t\tseed,\r\n\t\tcontext,\r\n\t\tdocumentIsXML,\r\n\t\tresults,\r\n\t\trsibling.test( selector )\r\n\t);\r\n\treturn results;\r\n}\r\n\r\n// Deprecated\r\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\r\n\r\n// Easy API for creating new setFilters\r\nfunction setFilters() {}\r\nExpr.filters = setFilters.prototype = Expr.pseudos;\r\nExpr.setFilters = new setFilters();\r\n\r\n// Initialize with the default document\r\nsetDocument();\r\n\r\n// Override sizzle attribute retrieval\r\nSizzle.attr = jQuery.attr;\r\njQuery.find = Sizzle;\r\njQuery.expr = Sizzle.selectors;\r\njQuery.expr[\":\"] = jQuery.expr.pseudos;\r\njQuery.unique = Sizzle.uniqueSort;\r\njQuery.text = Sizzle.getText;\r\njQuery.isXMLDoc = Sizzle.isXML;\r\njQuery.contains = Sizzle.contains;\r\n\r\n\r\n})( window );\r\nvar runtil = /Until$/,\r\n\trparentsprev = /^(?:parents|prev(?:Until|All))/,\r\n\tisSimple = /^.[^:#\\[\\.,]*$/,\r\n\trneedsContext = jQuery.expr.match.needsContext,\r\n\t// methods guaranteed to produce a unique set when starting from a unique set\r\n\tguaranteedUnique = {\r\n\t\tchildren: true,\r\n\t\tcontents: true,\r\n\t\tnext: true,\r\n\t\tprev: true\r\n\t};\r\n\r\njQuery.fn.extend({\r\n\tfind: function( selector ) {\r\n\t\tvar i, ret, self,\r\n\t\t\tlen = this.length;\r\n\r\n\t\tif ( typeof selector !== \"string\" ) {\r\n\t\t\tself = this;\r\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\r\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}) );\r\n\t\t}\r\n\r\n\t\tret = [];\r\n\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\tjQuery.find( selector, this[ i ], ret );\r\n\t\t}\r\n\r\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\r\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\r\n\t\tret.selector = ( this.selector ? this.selector + \" \" : \"\" ) + selector;\r\n\t\treturn ret;\r\n\t},\r\n\r\n\thas: function( target ) {\r\n\t\tvar i,\r\n\t\t\ttargets = jQuery( target, this ),\r\n\t\t\tlen = targets.length;\r\n\r\n\t\treturn this.filter(function() {\r\n\t\t\tfor ( i = 0; i < len; i++ ) {\r\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tnot: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, false) );\r\n\t},\r\n\r\n\tfilter: function( selector ) {\r\n\t\treturn this.pushStack( winnow(this, selector, true) );\r\n\t},\r\n\r\n\tis: function( selector ) {\r\n\t\treturn !!selector && (\r\n\t\t\ttypeof selector === \"string\" ?\r\n\t\t\t\t// If this is a positional/relative selector, check membership in the returned set\r\n\t\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\r\n\t\t\t\trneedsContext.test( selector ) ?\r\n\t\t\t\t\tjQuery( selector, this.context ).index( this[0] ) >= 0 :\r\n\t\t\t\t\tjQuery.filter( selector, this ).length > 0 :\r\n\t\t\t\tthis.filter( selector ).length > 0 );\r\n\t},\r\n\r\n\tclosest: function( selectors, context ) {\r\n\t\tvar cur,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tret = [],\r\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\r\n\t\t\t\tjQuery( selectors, context || this.context ) :\r\n\t\t\t\t0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\tcur = this[i];\r\n\r\n\t\t\twhile ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {\r\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {\r\n\t\t\t\t\tret.push( cur );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tcur = cur.parentNode;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );\r\n\t},\r\n\r\n\t// Determine the position of an element within\r\n\t// the matched set of elements\r\n\tindex: function( elem ) {\r\n\r\n\t\t// No argument, return index in parent\r\n\t\tif ( !elem ) {\r\n\t\t\treturn ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;\r\n\t\t}\r\n\r\n\t\t// index in selector\r\n\t\tif ( typeof elem === \"string\" ) {\r\n\t\t\treturn jQuery.inArray( this[0], jQuery( elem ) );\r\n\t\t}\r\n\r\n\t\t// Locate the position of the desired element\r\n\t\treturn jQuery.inArray(\r\n\t\t\t// If it receives a jQuery object, the first element is used\r\n\t\t\telem.jquery ? elem[0] : elem, this );\r\n\t},\r\n\r\n\tadd: function( selector, context ) {\r\n\t\tvar set = typeof selector === \"string\" ?\r\n\t\t\t\tjQuery( selector, context ) :\r\n\t\t\t\tjQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),\r\n\t\t\tall = jQuery.merge( this.get(), set );\r\n\r\n\t\treturn this.pushStack( jQuery.unique(all) );\r\n\t},\r\n\r\n\taddBack: function( selector ) {\r\n\t\treturn this.add( selector == null ?\r\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\r\n\t\t);\r\n\t}\r\n});\r\n\r\njQuery.fn.andSelf = jQuery.fn.addBack;\r\n\r\nfunction sibling( cur, dir ) {\r\n\tdo {\r\n\t\tcur = cur[ dir ];\r\n\t} while ( cur && cur.nodeType !== 1 );\r\n\r\n\treturn cur;\r\n}\r\n\r\njQuery.each({\r\n\tparent: function( elem ) {\r\n\t\tvar parent = elem.parentNode;\r\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\r\n\t},\r\n\tparents: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\" );\r\n\t},\r\n\tparentsUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\r\n\t},\r\n\tnext: function( elem ) {\r\n\t\treturn sibling( elem, \"nextSibling\" );\r\n\t},\r\n\tprev: function( elem ) {\r\n\t\treturn sibling( elem, \"previousSibling\" );\r\n\t},\r\n\tnextAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\r\n\t},\r\n\tprevAll: function( elem ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\r\n\t},\r\n\tnextUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\r\n\t},\r\n\tprevUntil: function( elem, i, until ) {\r\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\r\n\t},\r\n\tsiblings: function( elem ) {\r\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\r\n\t},\r\n\tchildren: function( elem ) {\r\n\t\treturn jQuery.sibling( elem.firstChild );\r\n\t},\r\n\tcontents: function( elem ) {\r\n\t\treturn jQuery.nodeName( elem, \"iframe\" ) ?\r\n\t\t\telem.contentDocument || elem.contentWindow.document :\r\n\t\t\tjQuery.merge( [], elem.childNodes );\r\n\t}\r\n}, function( name, fn ) {\r\n\tjQuery.fn[ name ] = function( until, selector ) {\r\n\t\tvar ret = jQuery.map( this, fn, until );\r\n\r\n\t\tif ( !runtil.test( name ) ) {\r\n\t\t\tselector = until;\r\n\t\t}\r\n\r\n\t\tif ( selector && typeof selector === \"string\" ) {\r\n\t\t\tret = jQuery.filter( selector, ret );\r\n\t\t}\r\n\r\n\t\tret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;\r\n\r\n\t\tif ( this.length > 1 && rparentsprev.test( name ) ) {\r\n\t\t\tret = ret.reverse();\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\tfilter: function( expr, elems, not ) {\r\n\t\tif ( not ) {\r\n\t\t\texpr = \":not(\" + expr + \")\";\r\n\t\t}\r\n\r\n\t\treturn elems.length === 1 ?\r\n\t\t\tjQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :\r\n\t\t\tjQuery.find.matches(expr, elems);\r\n\t},\r\n\r\n\tdir: function( elem, dir, until ) {\r\n\t\tvar matched = [],\r\n\t\t\tcur = elem[ dir ];\r\n\r\n\t\twhile ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {\r\n\t\t\tif ( cur.nodeType === 1 ) {\r\n\t\t\t\tmatched.push( cur );\r\n\t\t\t}\r\n\t\t\tcur = cur[dir];\r\n\t\t}\r\n\t\treturn matched;\r\n\t},\r\n\r\n\tsibling: function( n, elem ) {\r\n\t\tvar r = [];\r\n\r\n\t\tfor ( ; n; n = n.nextSibling ) {\r\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\r\n\t\t\t\tr.push( n );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn r;\r\n\t}\r\n});\r\n\r\n// Implement the identical functionality for filter and not\r\nfunction winnow( elements, qualifier, keep ) {\r\n\r\n\t// Can't pass null or undefined to indexOf in Firefox 4\r\n\t// Set to 0 to skip string check\r\n\tqualifier = qualifier || 0;\r\n\r\n\tif ( jQuery.isFunction( qualifier ) ) {\r\n\t\treturn jQuery.grep(elements, function( elem, i ) {\r\n\t\t\tvar retVal = !!qualifier.call( elem, i, elem );\r\n\t\t\treturn retVal === keep;\r\n\t\t});\r\n\r\n\t} else if ( qualifier.nodeType ) {\r\n\t\treturn jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn ( elem === qualifier ) === keep;\r\n\t\t});\r\n\r\n\t} else if ( typeof qualifier === \"string\" ) {\r\n\t\tvar filtered = jQuery.grep(elements, function( elem ) {\r\n\t\t\treturn elem.nodeType === 1;\r\n\t\t});\r\n\r\n\t\tif ( isSimple.test( qualifier ) ) {\r\n\t\t\treturn jQuery.filter(qualifier, filtered, !keep);\r\n\t\t} else {\r\n\t\t\tqualifier = jQuery.filter( qualifier, filtered );\r\n\t\t}\r\n\t}\r\n\r\n\treturn jQuery.grep(elements, function( elem ) {\r\n\t\treturn ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;\r\n\t});\r\n}\r\nfunction createSafeFragment( document ) {\r\n\tvar list = nodeNames.split( \"|\" ),\r\n\t\tsafeFrag = document.createDocumentFragment();\r\n\r\n\tif ( safeFrag.createElement ) {\r\n\t\twhile ( list.length ) {\r\n\t\t\tsafeFrag.createElement(\r\n\t\t\t\tlist.pop()\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\treturn safeFrag;\r\n}\r\n\r\nvar nodeNames = \"abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|\" +\r\n\t\t\"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video\",\r\n\trinlinejQuery = / jQuery\\d+=\"(?:null|\\d+)\"/g,\r\n\trnoshimcache = new RegExp(\"<(?:\" + nodeNames + \")[\\\\s/>]\", \"i\"),\r\n\trleadingWhitespace = /^\\s+/,\r\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\r\n\trtagName = /<([\\w:]+)/,\r\n\trtbody = /<tbody/i,\r\n\trhtml = /<|&#?\\w+;/,\r\n\trnoInnerhtml = /<(?:script|style|link)/i,\r\n\tmanipulation_rcheckableType = /^(?:checkbox|radio)$/i,\r\n\t// checked=\"checked\" or checked\r\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\r\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\r\n\trscriptTypeMasked = /^true\\/(.*)/,\r\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\r\n\r\n\t// We have to close these tags to support XHTML (#13200)\r\n\twrapMap = {\r\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\r\n\t\tlegend: [ 1, \"<fieldset>\", \"</fieldset>\" ],\r\n\t\tarea: [ 1, \"<map>\", \"</map>\" ],\r\n\t\tparam: [ 1, \"<object>\", \"</object>\" ],\r\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\r\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\r\n\t\tcol: [ 2, \"<table><tbody></tbody><colgroup>\", \"</colgroup></table>\" ],\r\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\r\n\r\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\r\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\r\n\t\t_default: jQuery.support.htmlSerialize ? [ 0, \"\", \"\" ] : [ 1, \"X<div>\", \"</div>\" ]\r\n\t},\r\n\tsafeFragment = createSafeFragment( document ),\r\n\tfragmentDiv = safeFragment.appendChild( document.createElement(\"div\") );\r\n\r\nwrapMap.optgroup = wrapMap.option;\r\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\r\nwrapMap.th = wrapMap.td;\r\n\r\njQuery.fn.extend({\r\n\ttext: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\treturn value === undefined ?\r\n\t\t\t\tjQuery.text( this ) :\r\n\t\t\t\tthis.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\twrapAll: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapAll( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( this[0] ) {\r\n\t\t\t// The elements to wrap the target around\r\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);\r\n\r\n\t\t\tif ( this[0].parentNode ) {\r\n\t\t\t\twrap.insertBefore( this[0] );\r\n\t\t\t}\r\n\r\n\t\t\twrap.map(function() {\r\n\t\t\t\tvar elem = this;\r\n\r\n\t\t\t\twhile ( elem.firstChild && elem.firstChild.nodeType === 1 ) {\r\n\t\t\t\t\telem = elem.firstChild;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn elem;\r\n\t\t\t}).append( this );\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\twrapInner: function( html ) {\r\n\t\tif ( jQuery.isFunction( html ) ) {\r\n\t\t\treturn this.each(function(i) {\r\n\t\t\t\tjQuery(this).wrapInner( html.call(this, i) );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar self = jQuery( this ),\r\n\t\t\t\tcontents = self.contents();\r\n\r\n\t\t\tif ( contents.length ) {\r\n\t\t\t\tcontents.wrapAll( html );\r\n\r\n\t\t\t} else {\r\n\t\t\t\tself.append( html );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\twrap: function( html ) {\r\n\t\tvar isFunction = jQuery.isFunction( html );\r\n\r\n\t\treturn this.each(function(i) {\r\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\r\n\t\t});\r\n\t},\r\n\r\n\tunwrap: function() {\r\n\t\treturn this.parent().each(function() {\r\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\r\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\r\n\t\t\t}\r\n\t\t}).end();\r\n\t},\r\n\r\n\tappend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.appendChild( elem );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tprepend: function() {\r\n\t\treturn this.domManip(arguments, true, function( elem ) {\r\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\r\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tbefore: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tafter: function() {\r\n\t\treturn this.domManip( arguments, false, function( elem ) {\r\n\t\t\tif ( this.parentNode ) {\r\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t// keepData is for internal use only--do not document\r\n\tremove: function( selector, keepData ) {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\tif ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {\r\n\t\t\t\tif ( !keepData && elem.nodeType === 1 ) {\r\n\t\t\t\t\tjQuery.cleanData( getAll( elem ) );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( elem.parentNode ) {\r\n\t\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telem.parentNode.removeChild( elem );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tempty: function() {\r\n\t\tvar elem,\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\r\n\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Remove any remaining nodes\r\n\t\t\twhile ( elem.firstChild ) {\r\n\t\t\t\telem.removeChild( elem.firstChild );\r\n\t\t\t}\r\n\r\n\t\t\t// If this is a select, ensure that it displays empty (#12336)\r\n\t\t\t// Support: IE<9\r\n\t\t\tif ( elem.options && jQuery.nodeName( elem, \"select\" ) ) {\r\n\t\t\t\telem.options.length = 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\r\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\r\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\r\n\r\n\t\treturn this.map( function () {\r\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\r\n\t\t});\r\n\t},\r\n\r\n\thtml: function( value ) {\r\n\t\treturn jQuery.access( this, function( value ) {\r\n\t\t\tvar elem = this[0] || {},\r\n\t\t\t\ti = 0,\r\n\t\t\t\tl = this.length;\r\n\r\n\t\t\tif ( value === undefined ) {\r\n\t\t\t\treturn elem.nodeType === 1 ?\r\n\t\t\t\t\telem.innerHTML.replace( rinlinejQuery, \"\" ) :\r\n\t\t\t\t\tundefined;\r\n\t\t\t}\r\n\r\n\t\t\t// See if we can take a shortcut and just use innerHTML\r\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\r\n\t\t\t\t( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&\r\n\t\t\t\t( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&\r\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [\"\", \"\"] )[1].toLowerCase() ] ) {\r\n\r\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (; i < l; i++ ) {\r\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\r\n\t\t\t\t\t\telem = this[i] || {};\r\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\r\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\r\n\t\t\t\t\t\t\telem.innerHTML = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\telem = 0;\r\n\r\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t\tif ( elem ) {\r\n\t\t\t\tthis.empty().append( value );\r\n\t\t\t}\r\n\t\t}, null, value, arguments.length );\r\n\t},\r\n\r\n\treplaceWith: function( value ) {\r\n\t\tvar isFunc = jQuery.isFunction( value );\r\n\r\n\t\t// Make sure that the elements are removed from the DOM before they are inserted\r\n\t\t// this can help fix replacing a parent with child elements\r\n\t\tif ( !isFunc && typeof value !== \"string\" ) {\r\n\t\t\tvalue = jQuery( value ).not( this ).detach();\r\n\t\t}\r\n\r\n\t\treturn this.domManip( [ value ], true, function( elem ) {\r\n\t\t\tvar next = this.nextSibling,\r\n\t\t\t\tparent = this.parentNode;\r\n\r\n\t\t\tif ( parent ) {\r\n\t\t\t\tjQuery( this ).remove();\r\n\t\t\t\tparent.insertBefore( elem, next );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tdetach: function( selector ) {\r\n\t\treturn this.remove( selector, true );\r\n\t},\r\n\r\n\tdomManip: function( args, table, callback ) {\r\n\r\n\t\t// Flatten any nested arrays\r\n\t\targs = core_concat.apply( [], args );\r\n\r\n\t\tvar first, node, hasScripts,\r\n\t\t\tscripts, doc, fragment,\r\n\t\t\ti = 0,\r\n\t\t\tl = this.length,\r\n\t\t\tset = this,\r\n\t\t\tiNoClone = l - 1,\r\n\t\t\tvalue = args[0],\r\n\t\t\tisFunction = jQuery.isFunction( value );\r\n\r\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\r\n\t\tif ( isFunction || !( l <= 1 || typeof value !== \"string\" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {\r\n\t\t\treturn this.each(function( index ) {\r\n\t\t\t\tvar self = set.eq( index );\r\n\t\t\t\tif ( isFunction ) {\r\n\t\t\t\t\targs[0] = value.call( this, index, table ? self.html() : undefined );\r\n\t\t\t\t}\r\n\t\t\t\tself.domManip( args, table, callback );\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ( l ) {\r\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );\r\n\t\t\tfirst = fragment.firstChild;\r\n\r\n\t\t\tif ( fragment.childNodes.length === 1 ) {\r\n\t\t\t\tfragment = first;\r\n\t\t\t}\r\n\r\n\t\t\tif ( first ) {\r\n\t\t\t\ttable = table && jQuery.nodeName( first, \"tr\" );\r\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\r\n\t\t\t\thasScripts = scripts.length;\r\n\r\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\r\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\r\n\t\t\t\tfor ( ; i < l; i++ ) {\r\n\t\t\t\t\tnode = fragment;\r\n\r\n\t\t\t\t\tif ( i !== iNoClone ) {\r\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\r\n\r\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\r\n\t\t\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcallback.call(\r\n\t\t\t\t\t\ttable && jQuery.nodeName( this[i], \"table\" ) ?\r\n\t\t\t\t\t\t\tfindOrAppend( this[i], \"tbody\" ) :\r\n\t\t\t\t\t\t\tthis[i],\r\n\t\t\t\t\t\tnode,\r\n\t\t\t\t\t\ti\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( hasScripts ) {\r\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\r\n\r\n\t\t\t\t\t// Reenable scripts\r\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\r\n\r\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\r\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\r\n\t\t\t\t\t\tnode = scripts[ i ];\r\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\r\n\t\t\t\t\t\t\t!jQuery._data( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\r\n\r\n\t\t\t\t\t\t\tif ( node.src ) {\r\n\t\t\t\t\t\t\t\t// Hope ajax is available...\r\n\t\t\t\t\t\t\t\tjQuery.ajax({\r\n\t\t\t\t\t\t\t\t\turl: node.src,\r\n\t\t\t\t\t\t\t\t\ttype: \"GET\",\r\n\t\t\t\t\t\t\t\t\tdataType: \"script\",\r\n\t\t\t\t\t\t\t\t\tasync: false,\r\n\t\t\t\t\t\t\t\t\tglobal: false,\r\n\t\t\t\t\t\t\t\t\t\"throws\": true\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.globalEval( ( node.text || node.textContent || node.innerHTML || \"\" ).replace( rcleanScript, \"\" ) );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix #11809: Avoid leaking memory\r\n\t\t\t\tfragment = first = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\nfunction findOrAppend( elem, tag ) {\r\n\treturn elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );\r\n}\r\n\r\n// Replace/restore the type attribute of script elements for safe DOM manipulation\r\nfunction disableScript( elem ) {\r\n\tvar attr = elem.getAttributeNode(\"type\");\r\n\telem.type = ( attr && attr.specified ) + \"/\" + elem.type;\r\n\treturn elem;\r\n}\r\nfunction restoreScript( elem ) {\r\n\tvar match = rscriptTypeMasked.exec( elem.type );\r\n\tif ( match ) {\r\n\t\telem.type = match[1];\r\n\t} else {\r\n\t\telem.removeAttribute(\"type\");\r\n\t}\r\n\treturn elem;\r\n}\r\n\r\n// Mark scripts as having already been evaluated\r\nfunction setGlobalEval( elems, refElements ) {\r\n\tvar elem,\r\n\t\ti = 0;\r\n\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\t\tjQuery._data( elem, \"globalEval\", !refElements || jQuery._data( refElements[i], \"globalEval\" ) );\r\n\t}\r\n}\r\n\r\nfunction cloneCopyEvent( src, dest ) {\r\n\r\n\tif ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar type, i, l,\r\n\t\toldData = jQuery._data( src ),\r\n\t\tcurData = jQuery._data( dest, oldData ),\r\n\t\tevents = oldData.events;\r\n\r\n\tif ( events ) {\r\n\t\tdelete curData.handle;\r\n\t\tcurData.events = {};\r\n\r\n\t\tfor ( type in events ) {\r\n\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\r\n\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// make the cloned public data object a copy from the original\r\n\tif ( curData.data ) {\r\n\t\tcurData.data = jQuery.extend( {}, curData.data );\r\n\t}\r\n}\r\n\r\nfunction fixCloneNodeIssues( src, dest ) {\r\n\tvar nodeName, e, data;\r\n\r\n\t// We do not need to do anything for non-Elements\r\n\tif ( dest.nodeType !== 1 ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tnodeName = dest.nodeName.toLowerCase();\r\n\r\n\t// IE6-8 copies events bound via attachEvent when using cloneNode.\r\n\tif ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {\r\n\t\tdata = jQuery._data( dest );\r\n\r\n\t\tfor ( e in data.events ) {\r\n\t\t\tjQuery.removeEvent( dest, e, data.handle );\r\n\t\t}\r\n\r\n\t\t// Event data gets referenced instead of copied if the expando gets copied too\r\n\t\tdest.removeAttribute( jQuery.expando );\r\n\t}\r\n\r\n\t// IE blanks contents when cloning scripts, and tries to evaluate newly-set text\r\n\tif ( nodeName === \"script\" && dest.text !== src.text ) {\r\n\t\tdisableScript( dest ).text = src.text;\r\n\t\trestoreScript( dest );\r\n\r\n\t// IE6-10 improperly clones children of object elements using classid.\r\n\t// IE10 throws NoModificationAllowedError if parent is null, #12132.\r\n\t} else if ( nodeName === \"object\" ) {\r\n\t\tif ( dest.parentNode ) {\r\n\t\t\tdest.outerHTML = src.outerHTML;\r\n\t\t}\r\n\r\n\t\t// This path appears unavoidable for IE9. When cloning an object\r\n\t\t// element in IE9, the outerHTML strategy above is not sufficient.\r\n\t\t// If the src has innerHTML and the destination does not,\r\n\t\t// copy the src.innerHTML into the dest.innerHTML. #10324\r\n\t\tif ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {\r\n\t\t\tdest.innerHTML = src.innerHTML;\r\n\t\t}\r\n\r\n\t} else if ( nodeName === \"input\" && manipulation_rcheckableType.test( src.type ) ) {\r\n\t\t// IE6-8 fails to persist the checked state of a cloned checkbox\r\n\t\t// or radio button. Worse, IE6-7 fail to give the cloned element\r\n\t\t// a checked appearance if the defaultChecked value isn't also set\r\n\r\n\t\tdest.defaultChecked = dest.checked = src.checked;\r\n\r\n\t\t// IE6-7 get confused and end up setting the value of a cloned\r\n\t\t// checkbox/radio button to an empty string instead of \"on\"\r\n\t\tif ( dest.value !== src.value ) {\r\n\t\t\tdest.value = src.value;\r\n\t\t}\r\n\r\n\t// IE6-8 fails to return the selected option to the default selected\r\n\t// state when cloning options\r\n\t} else if ( nodeName === \"option\" ) {\r\n\t\tdest.defaultSelected = dest.selected = src.defaultSelected;\r\n\r\n\t// IE6-8 fails to set the defaultValue to the correct value when\r\n\t// cloning other types of input fields\r\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\r\n\t\tdest.defaultValue = src.defaultValue;\r\n\t}\r\n}\r\n\r\njQuery.each({\r\n\tappendTo: \"append\",\r\n\tprependTo: \"prepend\",\r\n\tinsertBefore: \"before\",\r\n\tinsertAfter: \"after\",\r\n\treplaceAll: \"replaceWith\"\r\n}, function( name, original ) {\r\n\tjQuery.fn[ name ] = function( selector ) {\r\n\t\tvar elems,\r\n\t\t\ti = 0,\r\n\t\t\tret = [],\r\n\t\t\tinsert = jQuery( selector ),\r\n\t\t\tlast = insert.length - 1;\r\n\r\n\t\tfor ( ; i <= last; i++ ) {\r\n\t\t\telems = i === last ? this : this.clone(true);\r\n\t\t\tjQuery( insert[i] )[ original ]( elems );\r\n\r\n\t\t\t// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()\r\n\t\t\tcore_push.apply( ret, elems.get() );\r\n\t\t}\r\n\r\n\t\treturn this.pushStack( ret );\r\n\t};\r\n});\r\n\r\nfunction getAll( context, tag ) {\r\n\tvar elems, elem,\r\n\t\ti = 0,\r\n\t\tfound = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || \"*\" ) :\r\n\t\t\ttypeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || \"*\" ) :\r\n\t\t\tundefined;\r\n\r\n\tif ( !found ) {\r\n\t\tfor ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {\r\n\t\t\tif ( !tag || jQuery.nodeName( elem, tag ) ) {\r\n\t\t\t\tfound.push( elem );\r\n\t\t\t} else {\r\n\t\t\t\tjQuery.merge( found, getAll( elem, tag ) );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\r\n\t\tjQuery.merge( [ context ], found ) :\r\n\t\tfound;\r\n}\r\n\r\n// Used in buildFragment, fixes the defaultChecked property\r\nfunction fixDefaultChecked( elem ) {\r\n\tif ( manipulation_rcheckableType.test( elem.type ) ) {\r\n\t\telem.defaultChecked = elem.checked;\r\n\t}\r\n}\r\n\r\njQuery.extend({\r\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\r\n\t\tvar destElements, node, clone, i, srcElements,\r\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\tif ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( \"<\" + elem.nodeName + \">\" ) ) {\r\n\t\t\tclone = elem.cloneNode( true );\r\n\r\n\t\t// IE<=8 does not properly clone detached, unknown element nodes\r\n\t\t} else {\r\n\t\t\tfragmentDiv.innerHTML = elem.outerHTML;\r\n\t\t\tfragmentDiv.removeChild( clone = fragmentDiv.firstChild );\r\n\t\t}\r\n\r\n\t\tif ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&\r\n\t\t\t\t(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {\r\n\r\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\r\n\t\t\tdestElements = getAll( clone );\r\n\t\t\tsrcElements = getAll( elem );\r\n\r\n\t\t\t// Fix all IE cloning issues\r\n\t\t\tfor ( i = 0; (node = srcElements[i]) != null; ++i ) {\r\n\t\t\t\t// Ensure that the destination node is not null; Fixes #9587\r\n\t\t\t\tif ( destElements[i] ) {\r\n\t\t\t\t\tfixCloneNodeIssues( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Copy the events from the original to the clone\r\n\t\tif ( dataAndEvents ) {\r\n\t\t\tif ( deepDataAndEvents ) {\r\n\t\t\t\tsrcElements = srcElements || getAll( elem );\r\n\t\t\t\tdestElements = destElements || getAll( clone );\r\n\r\n\t\t\t\tfor ( i = 0; (node = srcElements[i]) != null; i++ ) {\r\n\t\t\t\t\tcloneCopyEvent( node, destElements[i] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tcloneCopyEvent( elem, clone );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Preserve script evaluation history\r\n\t\tdestElements = getAll( clone, \"script\" );\r\n\t\tif ( destElements.length > 0 ) {\r\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\r\n\t\t}\r\n\r\n\t\tdestElements = srcElements = node = null;\r\n\r\n\t\t// Return the cloned set\r\n\t\treturn clone;\r\n\t},\r\n\r\n\tbuildFragment: function( elems, context, scripts, selection ) {\r\n\t\tvar j, elem, contains,\r\n\t\t\ttmp, tag, tbody, wrap,\r\n\t\t\tl = elems.length,\r\n\r\n\t\t\t// Ensure a safe fragment\r\n\t\t\tsafe = createSafeFragment( context ),\r\n\r\n\t\t\tnodes = [],\r\n\t\t\ti = 0;\r\n\r\n\t\tfor ( ; i < l; i++ ) {\r\n\t\t\telem = elems[ i ];\r\n\r\n\t\t\tif ( elem || elem === 0 ) {\r\n\r\n\t\t\t\t// Add nodes directly\r\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\r\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\r\n\r\n\t\t\t\t// Convert non-html into a text node\r\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\r\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\r\n\r\n\t\t\t\t// Convert html into DOM nodes\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = tmp || safe.appendChild( context.createElement(\"div\") );\r\n\r\n\t\t\t\t\t// Deserialize a standard representation\r\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [\"\", \"\"] )[1].toLowerCase();\r\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\r\n\r\n\t\t\t\t\ttmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[2];\r\n\r\n\t\t\t\t\t// Descend through wrappers to the right content\r\n\t\t\t\t\tj = wrap[0];\r\n\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\ttmp = tmp.lastChild;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Manually add leading whitespace removed by IE\r\n\t\t\t\t\tif ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {\r\n\t\t\t\t\t\tnodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove IE's autoinserted <tbody> from table fragments\r\n\t\t\t\t\tif ( !jQuery.support.tbody ) {\r\n\r\n\t\t\t\t\t\t// String was a <table>, *may* have spurious <tbody>\r\n\t\t\t\t\t\telem = tag === \"table\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\ttmp.firstChild :\r\n\r\n\t\t\t\t\t\t\t// String was a bare <thead> or <tfoot>\r\n\t\t\t\t\t\t\twrap[1] === \"<table>\" && !rtbody.test( elem ) ?\r\n\t\t\t\t\t\t\t\ttmp :\r\n\t\t\t\t\t\t\t\t0;\r\n\r\n\t\t\t\t\t\tj = elem && elem.childNodes.length;\r\n\t\t\t\t\t\twhile ( j-- ) {\r\n\t\t\t\t\t\t\tif ( jQuery.nodeName( (tbody = elem.childNodes[j]), \"tbody\" ) && !tbody.childNodes.length ) {\r\n\t\t\t\t\t\t\t\telem.removeChild( tbody );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\r\n\r\n\t\t\t\t\t// Fix #12392 for WebKit and IE > 9\r\n\t\t\t\t\ttmp.textContent = \"\";\r\n\r\n\t\t\t\t\t// Fix #12392 for oldIE\r\n\t\t\t\t\twhile ( tmp.firstChild ) {\r\n\t\t\t\t\t\ttmp.removeChild( tmp.firstChild );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remember the top-level container for proper cleanup\r\n\t\t\t\t\ttmp = safe.lastChild;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Fix #11356: Clear elements from fragment\r\n\t\tif ( tmp ) {\r\n\t\t\tsafe.removeChild( tmp );\r\n\t\t}\r\n\r\n\t\t// Reset defaultChecked for any radios and checkboxes\r\n\t\t// about to be appended to the DOM in IE 6/7 (#8060)\r\n\t\tif ( !jQuery.support.appendChecked ) {\r\n\t\t\tjQuery.grep( getAll( nodes, \"input\" ), fixDefaultChecked );\r\n\t\t}\r\n\r\n\t\ti = 0;\r\n\t\twhile ( (elem = nodes[ i++ ]) ) {\r\n\r\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\r\n\t\t\t// that element, do not do anything\r\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\r\n\r\n\t\t\t// Append to fragment\r\n\t\t\ttmp = getAll( safe.appendChild( elem ), \"script\" );\r\n\r\n\t\t\t// Preserve script evaluation history\r\n\t\t\tif ( contains ) {\r\n\t\t\t\tsetGlobalEval( tmp );\r\n\t\t\t}\r\n\r\n\t\t\t// Capture executables\r\n\t\t\tif ( scripts ) {\r\n\t\t\t\tj = 0;\r\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\r\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\r\n\t\t\t\t\t\tscripts.push( elem );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttmp = null;\r\n\r\n\t\treturn safe;\r\n\t},\r\n\r\n\tcleanData: function( elems, /* internal */ acceptData ) {\r\n\t\tvar elem, type, id, data,\r\n\t\t\ti = 0,\r\n\t\t\tinternalKey = jQuery.expando,\r\n\t\t\tcache = jQuery.cache,\r\n\t\t\tdeleteExpando = jQuery.support.deleteExpando,\r\n\t\t\tspecial = jQuery.event.special;\r\n\r\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\r\n\r\n\t\t\tif ( acceptData || jQuery.acceptData( elem ) ) {\r\n\r\n\t\t\t\tid = elem[ internalKey ];\r\n\t\t\t\tdata = id && cache[ id ];\r\n\r\n\t\t\t\tif ( data ) {\r\n\t\t\t\t\tif ( data.events ) {\r\n\t\t\t\t\t\tfor ( type in data.events ) {\r\n\t\t\t\t\t\t\tif ( special[ type ] ) {\r\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\r\n\r\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Remove cache only if it was not already removed by jQuery.event.remove\r\n\t\t\t\t\tif ( cache[ id ] ) {\r\n\r\n\t\t\t\t\t\tdelete cache[ id ];\r\n\r\n\t\t\t\t\t\t// IE does not allow us to delete expando properties from nodes,\r\n\t\t\t\t\t\t// nor does it have a removeAttribute function on Document nodes;\r\n\t\t\t\t\t\t// we must handle all of these cases\r\n\t\t\t\t\t\tif ( deleteExpando ) {\r\n\t\t\t\t\t\t\tdelete elem[ internalKey ];\r\n\r\n\t\t\t\t\t\t} else if ( typeof elem.removeAttribute !== core_strundefined ) {\r\n\t\t\t\t\t\t\telem.removeAttribute( internalKey );\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\telem[ internalKey ] = null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tcore_deletedIds.push( id );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\nvar iframe, getStyles, curCSS,\r\n\tralpha = /alpha\\([^)]*\\)/i,\r\n\tropacity = /opacity\\s*=\\s*([^)]*)/,\r\n\trposition = /^(top|right|bottom|left)$/,\r\n\t// swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\r\n\t// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\r\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\r\n\trmargin = /^margin/,\r\n\trnumsplit = new RegExp( \"^(\" + core_pnum + \")(.*)$\", \"i\" ),\r\n\trnumnonpx = new RegExp( \"^(\" + core_pnum + \")(?!px)[a-z%]+$\", \"i\" ),\r\n\trrelNum = new RegExp( \"^([+-])=(\" + core_pnum + \")\", \"i\" ),\r\n\telemdisplay = { BODY: \"block\" },\r\n\r\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\r\n\tcssNormalTransform = {\r\n\t\tletterSpacing: 0,\r\n\t\tfontWeight: 400\r\n\t},\r\n\r\n\tcssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ],\r\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\r\n\r\n// return a css property mapped to a potentially vendor prefixed property\r\nfunction vendorPropName( style, name ) {\r\n\r\n\t// shortcut for names that are not vendor prefixed\r\n\tif ( name in style ) {\r\n\t\treturn name;\r\n\t}\r\n\r\n\t// check for vendor prefixed names\r\n\tvar capName = name.charAt(0).toUpperCase() + name.slice(1),\r\n\t\torigName = name,\r\n\t\ti = cssPrefixes.length;\r\n\r\n\twhile ( i-- ) {\r\n\t\tname = cssPrefixes[ i ] + capName;\r\n\t\tif ( name in style ) {\r\n\t\t\treturn name;\r\n\t\t}\r\n\t}\r\n\r\n\treturn origName;\r\n}\r\n\r\nfunction isHidden( elem, el ) {\r\n\t// isHidden might be called from jQuery#filter function;\r\n\t// in that case, element will be second argument\r\n\telem = el || elem;\r\n\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\r\n}\r\n\r\nfunction showHide( elements, show ) {\r\n\tvar display, elem, hidden,\r\n\t\tvalues = [],\r\n\t\tindex = 0,\r\n\t\tlength = elements.length;\r\n\r\n\tfor ( ; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\" );\r\n\t\tdisplay = elem.style.display;\r\n\t\tif ( show ) {\r\n\t\t\t// Reset the inline display of this element to learn if it is\r\n\t\t\t// being hidden by cascaded rules or not\r\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\r\n\t\t\t\telem.style.display = \"\";\r\n\t\t\t}\r\n\r\n\t\t\t// Set elements which have been overridden with display: none\r\n\t\t\t// in a stylesheet to whatever the default browser style is\r\n\t\t\t// for such an element\r\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\r\n\t\t\t\tvalues[ index ] = jQuery._data( elem, \"olddisplay\", css_defaultDisplay(elem.nodeName) );\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif ( !values[ index ] ) {\r\n\t\t\t\thidden = isHidden( elem );\r\n\r\n\t\t\t\tif ( display && display !== \"none\" || !hidden ) {\r\n\t\t\t\t\tjQuery._data( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Set the display of most of the elements in a second loop\r\n\t// to avoid the constant reflow\r\n\tfor ( index = 0; index < length; index++ ) {\r\n\t\telem = elements[ index ];\r\n\t\tif ( !elem.style ) {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\r\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\r\n\t\t}\r\n\t}\r\n\r\n\treturn elements;\r\n}\r\n\r\njQuery.fn.extend({\r\n\tcss: function( name, value ) {\r\n\t\treturn jQuery.access( this, function( elem, name, value ) {\r\n\t\t\tvar len, styles,\r\n\t\t\t\tmap = {},\r\n\t\t\t\ti = 0;\r\n\r\n\t\t\tif ( jQuery.isArray( name ) ) {\r\n\t\t\t\tstyles = getStyles( elem );\r\n\t\t\t\tlen = name.length;\r\n\r\n\t\t\t\tfor ( ; i < len; i++ ) {\r\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn map;\r\n\t\t\t}\r\n\r\n\t\t\treturn value !== undefined ?\r\n\t\t\t\tjQuery.style( elem, name, value ) :\r\n\t\t\t\tjQuery.css( elem, name );\r\n\t\t}, name, value, arguments.length > 1 );\r\n\t},\r\n\tshow: function() {\r\n\t\treturn showHide( this, true );\r\n\t},\r\n\thide: function() {\r\n\t\treturn showHide( this );\r\n\t},\r\n\ttoggle: function( state ) {\r\n\t\tvar bool = typeof state === \"boolean\";\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tif ( bool ? state : isHidden( this ) ) {\r\n\t\t\t\tjQuery( this ).show();\r\n\t\t\t} else {\r\n\t\t\t\tjQuery( this ).hide();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\njQuery.extend({\r\n\t// Add in style property hooks for overriding the default\r\n\t// behavior of getting and setting a style property\r\n\tcssHooks: {\r\n\t\topacity: {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// We should always get a number back from opacity\r\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\r\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// Exclude the following css properties to add px\r\n\tcssNumber: {\r\n\t\t\"columnCount\": true,\r\n\t\t\"fillOpacity\": true,\r\n\t\t\"fontWeight\": true,\r\n\t\t\"lineHeight\": true,\r\n\t\t\"opacity\": true,\r\n\t\t\"orphans\": true,\r\n\t\t\"widows\": true,\r\n\t\t\"zIndex\": true,\r\n\t\t\"zoom\": true\r\n\t},\r\n\r\n\t// Add in properties whose names you wish to fix before\r\n\t// setting or getting the value\r\n\tcssProps: {\r\n\t\t// normalize float css property\r\n\t\t\"float\": jQuery.support.cssFloat ? \"cssFloat\" : \"styleFloat\"\r\n\t},\r\n\r\n\t// Get and set the style property on a DOM Node\r\n\tstyle: function( elem, name, value, extra ) {\r\n\t\t// Don't set styles on text and comment nodes\r\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tvar ret, type, hooks,\r\n\t\t\torigName = jQuery.camelCase( name ),\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// Check if we're setting a value\r\n\t\tif ( value !== undefined ) {\r\n\t\t\ttype = typeof value;\r\n\r\n\t\t\t// convert relative number strings (+= or -=) to relative numbers. #7345\r\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\r\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\r\n\t\t\t\t// Fixes bug #9237\r\n\t\t\t\ttype = \"number\";\r\n\t\t\t}\r\n\r\n\t\t\t// Make sure that NaN and null values aren't set. See: #7116\r\n\t\t\tif ( value == null || type === \"number\" && isNaN( value ) ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// If a number was passed in, add 'px' to the (except for certain CSS properties)\r\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\r\n\t\t\t\tvalue += \"px\";\r\n\t\t\t}\r\n\r\n\t\t\t// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,\r\n\t\t\t// but it would mean to define eight (for every problematic property) identical functions\r\n\t\t\tif ( !jQuery.support.clearCloneStyle && value === \"\" && name.indexOf(\"background\") === 0 ) {\r\n\t\t\t\tstyle[ name ] = \"inherit\";\r\n\t\t\t}\r\n\r\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\r\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\r\n\r\n\t\t\t\t// Wrapped to prevent IE from throwing errors when 'invalid' values are provided\r\n\t\t\t\t// Fixes bug #5509\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstyle[ name ] = value;\r\n\t\t\t\t} catch(e) {}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// If a hook was provided get the non-computed value from there\r\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\r\n\t\t\t\treturn ret;\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise just get the value from the style object\r\n\t\t\treturn style[ name ];\r\n\t\t}\r\n\t},\r\n\r\n\tcss: function( elem, name, extra, styles ) {\r\n\t\tvar num, val, hooks,\r\n\t\t\torigName = jQuery.camelCase( name );\r\n\r\n\t\t// Make sure that we're working with the right name\r\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\r\n\r\n\t\t// gets hook for the prefixed version\r\n\t\t// followed by the unprefixed version\r\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\r\n\r\n\t\t// If a hook was provided get the computed value from there\r\n\t\tif ( hooks && \"get\" in hooks ) {\r\n\t\t\tval = hooks.get( elem, true, extra );\r\n\t\t}\r\n\r\n\t\t// Otherwise, if a way to get the computed value exists, use that\r\n\t\tif ( val === undefined ) {\r\n\t\t\tval = curCSS( elem, name, styles );\r\n\t\t}\r\n\r\n\t\t//convert \"normal\" to computed value\r\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\r\n\t\t\tval = cssNormalTransform[ name ];\r\n\t\t}\r\n\r\n\t\t// Return, converting to number if forced or a qualifier was provided and val looks numeric\r\n\t\tif ( extra === \"\" || extra ) {\r\n\t\t\tnum = parseFloat( val );\r\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\r\n\t\t}\r\n\t\treturn val;\r\n\t},\r\n\r\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\r\n\tswap: function( elem, options, callback, args ) {\r\n\t\tvar ret, name,\r\n\t\t\told = {};\r\n\r\n\t\t// Remember the old values, and insert the new ones\r\n\t\tfor ( name in options ) {\r\n\t\t\told[ name ] = elem.style[ name ];\r\n\t\t\telem.style[ name ] = options[ name ];\r\n\t\t}\r\n\r\n\t\tret = callback.apply( elem, args || [] );\r\n\r\n\t\t// Revert the old values\r\n\t\tfor ( name in options ) {\r\n\t\t\telem.style[ name ] = old[ name ];\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}\r\n});\r\n\r\n// NOTE: we've included the \"window\" in window.getComputedStyle\r\n// because jsdom on node.js will break without it.\r\nif ( window.getComputedStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn window.getComputedStyle( elem, null );\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar width, minWidth, maxWidth,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\r\n\t\t\t// getPropertyValue is only needed for .css('filter') in IE9, see #12537\r\n\t\t\tret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\tif ( computed ) {\r\n\r\n\t\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\r\n\t\t\t\tret = jQuery.style( elem, name );\r\n\t\t\t}\r\n\r\n\t\t\t// A tribute to the \"awesome hack by Dean Edwards\"\r\n\t\t\t// Chrome < 17 and Safari 5.0 uses \"computed value\" instead of \"used value\" for margin-right\r\n\t\t\t// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\r\n\t\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\r\n\t\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\r\n\r\n\t\t\t\t// Remember the original values\r\n\t\t\t\twidth = style.width;\r\n\t\t\t\tminWidth = style.minWidth;\r\n\t\t\t\tmaxWidth = style.maxWidth;\r\n\r\n\t\t\t\t// Put in the new values to get a computed value out\r\n\t\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\r\n\t\t\t\tret = computed.width;\r\n\r\n\t\t\t\t// Revert the changed values\r\n\t\t\t\tstyle.width = width;\r\n\t\t\t\tstyle.minWidth = minWidth;\r\n\t\t\t\tstyle.maxWidth = maxWidth;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t};\r\n} else if ( document.documentElement.currentStyle ) {\r\n\tgetStyles = function( elem ) {\r\n\t\treturn elem.currentStyle;\r\n\t};\r\n\r\n\tcurCSS = function( elem, name, _computed ) {\r\n\t\tvar left, rs, rsLeft,\r\n\t\t\tcomputed = _computed || getStyles( elem ),\r\n\t\t\tret = computed ? computed[ name ] : undefined,\r\n\t\t\tstyle = elem.style;\r\n\r\n\t\t// Avoid setting ret to empty string here\r\n\t\t// so we don't default to auto\r\n\t\tif ( ret == null && style && style[ name ] ) {\r\n\t\t\tret = style[ name ];\r\n\t\t}\r\n\r\n\t\t// From the awesome hack by Dean Edwards\r\n\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\r\n\r\n\t\t// If we're not dealing with a regular pixel number\r\n\t\t// but a number that has a weird ending, we need to convert it to pixels\r\n\t\t// but not position css attributes, as those are proportional to the parent element instead\r\n\t\t// and we can't measure the parent instead because it might trigger a \"stacking dolls\" problem\r\n\t\tif ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {\r\n\r\n\t\t\t// Remember the original values\r\n\t\t\tleft = style.left;\r\n\t\t\trs = elem.runtimeStyle;\r\n\t\t\trsLeft = rs && rs.left;\r\n\r\n\t\t\t// Put in the new values to get a computed value out\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = elem.currentStyle.left;\r\n\t\t\t}\r\n\t\t\tstyle.left = name === \"fontSize\" ? \"1em\" : ret;\r\n\t\t\tret = style.pixelLeft + \"px\";\r\n\r\n\t\t\t// Revert the changed values\r\n\t\t\tstyle.left = left;\r\n\t\t\tif ( rsLeft ) {\r\n\t\t\t\trs.left = rsLeft;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ret === \"\" ? \"auto\" : ret;\r\n\t};\r\n}\r\n\r\nfunction setPositiveNumber( elem, value, subtract ) {\r\n\tvar matches = rnumsplit.exec( value );\r\n\treturn matches ?\r\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\r\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\r\n\t\tvalue;\r\n}\r\n\r\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\r\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\r\n\t\t// If we already have the right measurement, avoid augmentation\r\n\t\t4 :\r\n\t\t// Otherwise initialize for horizontal or vertical properties\r\n\t\tname === \"width\" ? 1 : 0,\r\n\r\n\t\tval = 0;\r\n\r\n\tfor ( ; i < 4; i += 2 ) {\r\n\t\t// both box models exclude margin, so add it if we want it\r\n\t\tif ( extra === \"margin\" ) {\r\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\r\n\t\t}\r\n\r\n\t\tif ( isBorderBox ) {\r\n\t\t\t// border-box includes padding, so remove it if we want content\r\n\t\t\tif ( extra === \"content\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\t\t\t}\r\n\r\n\t\t\t// at this point, extra isn't border nor margin, so remove border\r\n\t\t\tif ( extra !== \"margin\" ) {\r\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// at this point, extra isn't content, so add padding\r\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\r\n\r\n\t\t\t// at this point, extra isn't content nor padding, so add border\r\n\t\t\tif ( extra !== \"padding\" ) {\r\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn val;\r\n}\r\n\r\nfunction getWidthOrHeight( elem, name, extra ) {\r\n\r\n\t// Start with offset property, which is equivalent to the border-box value\r\n\tvar valueIsBorderBox = true,\r\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\r\n\t\tstyles = getStyles( elem ),\r\n\t\tisBorderBox = jQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\r\n\r\n\t// some non-html elements return undefined for offsetWidth, so check for null/undefined\r\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\r\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\r\n\tif ( val <= 0 || val == null ) {\r\n\t\t// Fall back to computed then uncomputed css if necessary\r\n\t\tval = curCSS( elem, name, styles );\r\n\t\tif ( val < 0 || val == null ) {\r\n\t\t\tval = elem.style[ name ];\r\n\t\t}\r\n\r\n\t\t// Computed unit is not pixels. Stop here and return.\r\n\t\tif ( rnumnonpx.test(val) ) {\r\n\t\t\treturn val;\r\n\t\t}\r\n\r\n\t\t// we need the check for style in case a browser which returns unreliable values\r\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\r\n\t\tvalueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );\r\n\r\n\t\t// Normalize \"\", auto, and prepare for extra\r\n\t\tval = parseFloat( val ) || 0;\r\n\t}\r\n\r\n\t// use the active box-sizing model to add/subtract irrelevant styles\r\n\treturn ( val +\r\n\t\taugmentWidthOrHeight(\r\n\t\t\telem,\r\n\t\t\tname,\r\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\r\n\t\t\tvalueIsBorderBox,\r\n\t\t\tstyles\r\n\t\t)\r\n\t) + \"px\";\r\n}\r\n\r\n// Try to determine the default display value of an element\r\nfunction css_defaultDisplay( nodeName ) {\r\n\tvar doc = document,\r\n\t\tdisplay = elemdisplay[ nodeName ];\r\n\r\n\tif ( !display ) {\r\n\t\tdisplay = actualDisplay( nodeName, doc );\r\n\r\n\t\t// If the simple way fails, read from inside an iframe\r\n\t\tif ( display === \"none\" || !display ) {\r\n\t\t\t// Use the already-created iframe if possible\r\n\t\t\tiframe = ( iframe ||\r\n\t\t\t\tjQuery(\"<iframe frameborder='0' width='0' height='0'/>\")\r\n\t\t\t\t.css( \"cssText\", \"display:block !important\" )\r\n\t\t\t).appendTo( doc.documentElement );\r\n\r\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\r\n\t\t\tdoc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;\r\n\t\t\tdoc.write(\"<!doctype html><html><body>\");\r\n\t\t\tdoc.close();\r\n\r\n\t\t\tdisplay = actualDisplay( nodeName, doc );\r\n\t\t\tiframe.detach();\r\n\t\t}\r\n\r\n\t\t// Store the correct default display\r\n\t\telemdisplay[ nodeName ] = display;\r\n\t}\r\n\r\n\treturn display;\r\n}\r\n\r\n// Called ONLY from within css_defaultDisplay\r\nfunction actualDisplay( name, doc ) {\r\n\tvar elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\r\n\t\tdisplay = jQuery.css( elem[0], \"display\" );\r\n\telem.remove();\r\n\treturn display;\r\n}\r\n\r\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\r\n\tjQuery.cssHooks[ name ] = {\r\n\t\tget: function( elem, computed, extra ) {\r\n\t\t\tif ( computed ) {\r\n\t\t\t\t// certain elements can have dimension info if we invisibly show them\r\n\t\t\t\t// however, it must have a current display style that would benefit from this\r\n\t\t\t\treturn elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, \"display\" ) ) ?\r\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\r\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tset: function( elem, value, extra ) {\r\n\t\t\tvar styles = extra && getStyles( elem );\r\n\t\t\treturn setPositiveNumber( elem, value, extra ?\r\n\t\t\t\taugmentWidthOrHeight(\r\n\t\t\t\t\telem,\r\n\t\t\t\t\tname,\r\n\t\t\t\t\textra,\r\n\t\t\t\t\tjQuery.support.boxSizing && jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\r\n\t\t\t\t\tstyles\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\t};\r\n});\r\n\r\nif ( !jQuery.support.opacity ) {\r\n\tjQuery.cssHooks.opacity = {\r\n\t\tget: function( elem, computed ) {\r\n\t\t\t// IE uses filters for opacity\r\n\t\t\treturn ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || \"\" ) ?\r\n\t\t\t\t( 0.01 * parseFloat( RegExp.$1 ) ) + \"\" :\r\n\t\t\t\tcomputed ? \"1\" : \"\";\r\n\t\t},\r\n\r\n\t\tset: function( elem, value ) {\r\n\t\t\tvar style = elem.style,\r\n\t\t\t\tcurrentStyle = elem.currentStyle,\r\n\t\t\t\topacity = jQuery.isNumeric( value ) ? \"alpha(opacity=\" + value * 100 + \")\" : \"\",\r\n\t\t\t\tfilter = currentStyle && currentStyle.filter || style.filter || \"\";\r\n\r\n\t\t\t// IE has trouble with opacity if it does not have layout\r\n\t\t\t// Force it by setting the zoom level\r\n\t\t\tstyle.zoom = 1;\r\n\r\n\t\t\t// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652\r\n\t\t\t// if value === \"\", then remove inline opacity #12685\r\n\t\t\tif ( ( value >= 1 || value === \"\" ) &&\r\n\t\t\t\t\tjQuery.trim( filter.replace( ralpha, \"\" ) ) === \"\" &&\r\n\t\t\t\t\tstyle.removeAttribute ) {\r\n\r\n\t\t\t\t// Setting style.filter to null, \"\" & \" \" still leave \"filter:\" in the cssText\r\n\t\t\t\t// if \"filter:\" is present at all, clearType is disabled, we want to avoid this\r\n\t\t\t\t// style.removeAttribute is IE Only, but so apparently is this code path...\r\n\t\t\t\tstyle.removeAttribute( \"filter\" );\r\n\r\n\t\t\t\t// if there is no filter style applied in a css rule or unset inline opacity, we are done\r\n\t\t\t\tif ( value === \"\" || currentStyle && !currentStyle.filter ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// otherwise, set new filter values\r\n\t\t\tstyle.filter = ralpha.test( filter ) ?\r\n\t\t\t\tfilter.replace( ralpha, opacity ) :\r\n\t\t\t\tfilter + \" \" + opacity;\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// These hooks cannot be added until DOM ready because the support test\r\n// for it is not run until after DOM ready\r\njQuery(function() {\r\n\tif ( !jQuery.support.reliableMarginRight ) {\r\n\t\tjQuery.cssHooks.marginRight = {\r\n\t\t\tget: function( elem, computed ) {\r\n\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\r\n\t\t\t\t\t// Work around by temporarily setting element display to inline-block\r\n\t\t\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\r\n\t\t\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\r\n\t// getComputedStyle returns percent when specified for top/left/bottom/right\r\n\t// rather than make the css module depend on the offset module, we just check for it here\r\n\tif ( !jQuery.support.pixelPosition && jQuery.fn.position ) {\r\n\t\tjQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\r\n\t\t\tjQuery.cssHooks[ prop ] = {\r\n\t\t\t\tget: function( elem, computed ) {\r\n\t\t\t\t\tif ( computed ) {\r\n\t\t\t\t\t\tcomputed = curCSS( elem, prop );\r\n\t\t\t\t\t\t// if curCSS returns percentage, fallback to offset\r\n\t\t\t\t\t\treturn rnumnonpx.test( computed ) ?\r\n\t\t\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\r\n\t\t\t\t\t\t\tcomputed;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t}\r\n\r\n});\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.hidden = function( elem ) {\r\n\t\t// Support: Opera <= 12.12\r\n\t\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\r\n\t\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||\r\n\t\t\t(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, \"display\" )) === \"none\");\r\n\t};\r\n\r\n\tjQuery.expr.filters.visible = function( elem ) {\r\n\t\treturn !jQuery.expr.filters.hidden( elem );\r\n\t};\r\n}\r\n\r\n// These hooks are used by animate to expand properties\r\njQuery.each({\r\n\tmargin: \"\",\r\n\tpadding: \"\",\r\n\tborder: \"Width\"\r\n}, function( prefix, suffix ) {\r\n\tjQuery.cssHooks[ prefix + suffix ] = {\r\n\t\texpand: function( value ) {\r\n\t\t\tvar i = 0,\r\n\t\t\t\texpanded = {},\r\n\r\n\t\t\t\t// assumes a single number if not a string\r\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\r\n\r\n\t\t\tfor ( ; i < 4; i++ ) {\r\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\r\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\r\n\t\t\t}\r\n\r\n\t\t\treturn expanded;\r\n\t\t}\r\n\t};\r\n\r\n\tif ( !rmargin.test( prefix ) ) {\r\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\r\n\t}\r\n});\r\nvar r20 = /%20/g,\r\n\trbracket = /\\[\\]$/,\r\n\trCRLF = /\\r?\\n/g,\r\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\r\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\r\n\r\njQuery.fn.extend({\r\n\tserialize: function() {\r\n\t\treturn jQuery.param( this.serializeArray() );\r\n\t},\r\n\tserializeArray: function() {\r\n\t\treturn this.map(function(){\r\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\r\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\r\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\r\n\t\t})\r\n\t\t.filter(function(){\r\n\t\t\tvar type = this.type;\r\n\t\t\t// Use .is(\":disabled\") so that fieldset[disabled] works\r\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\r\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\r\n\t\t\t\t( this.checked || !manipulation_rcheckableType.test( type ) );\r\n\t\t})\r\n\t\t.map(function( i, elem ){\r\n\t\t\tvar val = jQuery( this ).val();\r\n\r\n\t\t\treturn val == null ?\r\n\t\t\t\tnull :\r\n\t\t\t\tjQuery.isArray( val ) ?\r\n\t\t\t\t\tjQuery.map( val, function( val ){\r\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t\t\t\t}) :\r\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\r\n\t\t}).get();\r\n\t}\r\n});\r\n\r\n//Serialize an array of form elements or a set of\r\n//key/values into a query string\r\njQuery.param = function( a, traditional ) {\r\n\tvar prefix,\r\n\t\ts = [],\r\n\t\tadd = function( key, value ) {\r\n\t\t\t// If value is a function, invoke it and return its value\r\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\r\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\r\n\t\t};\r\n\r\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\r\n\tif ( traditional === undefined ) {\r\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\r\n\t}\r\n\r\n\t// If an array was passed in, assume that it is an array of form elements.\r\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\r\n\t\t// Serialize the form elements\r\n\t\tjQuery.each( a, function() {\r\n\t\t\tadd( this.name, this.value );\r\n\t\t});\r\n\r\n\t} else {\r\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\r\n\t\t// did it), otherwise encode params recursively.\r\n\t\tfor ( prefix in a ) {\r\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\r\n\t\t}\r\n\t}\r\n\r\n\t// Return the resulting serialization\r\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\r\n};\r\n\r\nfunction buildParams( prefix, obj, traditional, add ) {\r\n\tvar name;\r\n\r\n\tif ( jQuery.isArray( obj ) ) {\r\n\t\t// Serialize array item.\r\n\t\tjQuery.each( obj, function( i, v ) {\r\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\r\n\t\t\t\t// Treat each array item as a scalar.\r\n\t\t\t\tadd( prefix, v );\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\r\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\r\n\t\t// Serialize object item.\r\n\t\tfor ( name in obj ) {\r\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t// Serialize scalar item.\r\n\t\tadd( prefix, obj );\r\n\t}\r\n}\r\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\r\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\r\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\r\n\r\n\t// Handle event binding\r\n\tjQuery.fn[ name ] = function( data, fn ) {\r\n\t\treturn arguments.length > 0 ?\r\n\t\t\tthis.on( name, null, data, fn ) :\r\n\t\t\tthis.trigger( name );\r\n\t};\r\n});\r\n\r\njQuery.fn.hover = function( fnOver, fnOut ) {\r\n\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\r\n};\r\nvar\r\n\t// Document location\r\n\tajaxLocParts,\r\n\tajaxLocation,\r\n\tajax_nonce = jQuery.now(),\r\n\r\n\tajax_rquery = /\\?/,\r\n\trhash = /#.*$/,\r\n\trts = /([?&])_=[^&]*/,\r\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)\\r?$/mg, // IE leaves an \\r character at EOL\r\n\t// #7653, #8125, #8152: local protocol detection\r\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\r\n\trnoContent = /^(?:GET|HEAD)$/,\r\n\trprotocol = /^\\/\\//,\r\n\trurl = /^([\\w.+-]+:)(?:\\/\\/([^\\/?#:]*)(?::(\\d+)|)|)/,\r\n\r\n\t// Keep a copy of the old load method\r\n\t_load = jQuery.fn.load,\r\n\r\n\t/* Prefilters\r\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\r\n\t * 2) These are called:\r\n\t * - BEFORE asking for a transport\r\n\t * - AFTER param serialization (s.data is a string if s.processData is true)\r\n\t * 3) key is the dataType\r\n\t * 4) the catchall symbol \"*\" can be used\r\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\r\n\t */\r\n\tprefilters = {},\r\n\r\n\t/* Transports bindings\r\n\t * 1) key is the dataType\r\n\t * 2) the catchall symbol \"*\" can be used\r\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\r\n\t */\r\n\ttransports = {},\r\n\r\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\r\n\tallTypes = \"*/\".concat(\"*\");\r\n\r\n// #8138, IE may throw an exception when accessing\r\n// a field from window.location if document.domain has been set\r\ntry {\r\n\tajaxLocation = location.href;\r\n} catch( e ) {\r\n\t// Use the href attribute of an A element\r\n\t// since IE will modify it given document.location\r\n\tajaxLocation = document.createElement( \"a\" );\r\n\tajaxLocation.href = \"\";\r\n\tajaxLocation = ajaxLocation.href;\r\n}\r\n\r\n// Segment location into parts\r\najaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\r\n\r\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\r\nfunction addToPrefiltersOrTransports( structure ) {\r\n\r\n\t// dataTypeExpression is optional and defaults to \"*\"\r\n\treturn function( dataTypeExpression, func ) {\r\n\r\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\r\n\t\t\tfunc = dataTypeExpression;\r\n\t\t\tdataTypeExpression = \"*\";\r\n\t\t}\r\n\r\n\t\tvar dataType,\r\n\t\t\ti = 0,\r\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];\r\n\r\n\t\tif ( jQuery.isFunction( func ) ) {\r\n\t\t\t// For each dataType in the dataTypeExpression\r\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\r\n\t\t\t\t// Prepend if requested\r\n\t\t\t\tif ( dataType[0] === \"+\" ) {\r\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\r\n\r\n\t\t\t\t// Otherwise append\r\n\t\t\t\t} else {\r\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\n// Base inspection function for prefilters and transports\r\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\r\n\r\n\tvar inspected = {},\r\n\t\tseekingTransport = ( structure === transports );\r\n\r\n\tfunction inspect( dataType ) {\r\n\t\tvar selected;\r\n\t\tinspected[ dataType ] = true;\r\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\r\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\r\n\t\t\tif( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\r\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\r\n\t\t\t\tinspect( dataTypeOrTransport );\r\n\t\t\t\treturn false;\r\n\t\t\t} else if ( seekingTransport ) {\r\n\t\t\t\treturn !( selected = dataTypeOrTransport );\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn selected;\r\n\t}\r\n\r\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\r\n}\r\n\r\n// A special extend for ajax options\r\n// that takes \"flat\" options (not to be deep extended)\r\n// Fixes #9887\r\nfunction ajaxExtend( target, src ) {\r\n\tvar deep, key,\r\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\r\n\r\n\tfor ( key in src ) {\r\n\t\tif ( src[ key ] !== undefined ) {\r\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\r\n\t\t}\r\n\t}\r\n\tif ( deep ) {\r\n\t\tjQuery.extend( true, target, deep );\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\njQuery.fn.load = function( url, params, callback ) {\r\n\tif ( typeof url !== \"string\" && _load ) {\r\n\t\treturn _load.apply( this, arguments );\r\n\t}\r\n\r\n\tvar selector, response, type,\r\n\t\tself = this,\r\n\t\toff = url.indexOf(\" \");\r\n\r\n\tif ( off >= 0 ) {\r\n\t\tselector = url.slice( off, url.length );\r\n\t\turl = url.slice( 0, off );\r\n\t}\r\n\r\n\t// If it's a function\r\n\tif ( jQuery.isFunction( params ) ) {\r\n\r\n\t\t// We assume that it's the callback\r\n\t\tcallback = params;\r\n\t\tparams = undefined;\r\n\r\n\t// Otherwise, build a param string\r\n\t} else if ( params && typeof params === \"object\" ) {\r\n\t\ttype = \"POST\";\r\n\t}\r\n\r\n\t// If we have elements to modify, make the request\r\n\tif ( self.length > 0 ) {\r\n\t\tjQuery.ajax({\r\n\t\t\turl: url,\r\n\r\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\r\n\t\t\ttype: type,\r\n\t\t\tdataType: \"html\",\r\n\t\t\tdata: params\r\n\t\t}).done(function( responseText ) {\r\n\r\n\t\t\t// Save response for use in complete callback\r\n\t\t\tresponse = arguments;\r\n\r\n\t\t\tself.html( selector ?\r\n\r\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\r\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\r\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\r\n\r\n\t\t\t\t// Otherwise use the full result\r\n\t\t\t\tresponseText );\r\n\r\n\t\t}).complete( callback && function( jqXHR, status ) {\r\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\r\n\t\t});\r\n\t}\r\n\r\n\treturn this;\r\n};\r\n\r\n// Attach a bunch of functions for handling common AJAX events\r\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ){\r\n\tjQuery.fn[ type ] = function( fn ){\r\n\t\treturn this.on( type, fn );\r\n\t};\r\n});\r\n\r\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\r\n\tjQuery[ method ] = function( url, data, callback, type ) {\r\n\t\t// shift arguments if data argument was omitted\r\n\t\tif ( jQuery.isFunction( data ) ) {\r\n\t\t\ttype = type || callback;\r\n\t\t\tcallback = data;\r\n\t\t\tdata = undefined;\r\n\t\t}\r\n\r\n\t\treturn jQuery.ajax({\r\n\t\t\turl: url,\r\n\t\t\ttype: method,\r\n\t\t\tdataType: type,\r\n\t\t\tdata: data,\r\n\t\t\tsuccess: callback\r\n\t\t});\r\n\t};\r\n});\r\n\r\njQuery.extend({\r\n\r\n\t// Counter for holding the number of active queries\r\n\tactive: 0,\r\n\r\n\t// Last-Modified header cache for next request\r\n\tlastModified: {},\r\n\tetag: {},\r\n\r\n\tajaxSettings: {\r\n\t\turl: ajaxLocation,\r\n\t\ttype: \"GET\",\r\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\r\n\t\tglobal: true,\r\n\t\tprocessData: true,\r\n\t\tasync: true,\r\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\r\n\t\t/*\r\n\t\ttimeout: 0,\r\n\t\tdata: null,\r\n\t\tdataType: null,\r\n\t\tusername: null,\r\n\t\tpassword: null,\r\n\t\tcache: null,\r\n\t\tthrows: false,\r\n\t\ttraditional: false,\r\n\t\theaders: {},\r\n\t\t*/\r\n\r\n\t\taccepts: {\r\n\t\t\t\"*\": allTypes,\r\n\t\t\ttext: \"text/plain\",\r\n\t\t\thtml: \"text/html\",\r\n\t\t\txml: \"application/xml, text/xml\",\r\n\t\t\tjson: \"application/json, text/javascript\"\r\n\t\t},\r\n\r\n\t\tcontents: {\r\n\t\t\txml: /xml/,\r\n\t\t\thtml: /html/,\r\n\t\t\tjson: /json/\r\n\t\t},\r\n\r\n\t\tresponseFields: {\r\n\t\t\txml: \"responseXML\",\r\n\t\t\ttext: \"responseText\"\r\n\t\t},\r\n\r\n\t\t// Data converters\r\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\r\n\t\tconverters: {\r\n\r\n\t\t\t// Convert anything to text\r\n\t\t\t\"* text\": window.String,\r\n\r\n\t\t\t// Text to html (true = no transformation)\r\n\t\t\t\"text html\": true,\r\n\r\n\t\t\t// Evaluate text as a json expression\r\n\t\t\t\"text json\": jQuery.parseJSON,\r\n\r\n\t\t\t// Parse text as xml\r\n\t\t\t\"text xml\": jQuery.parseXML\r\n\t\t},\r\n\r\n\t\t// For options that shouldn't be deep extended:\r\n\t\t// you can add your own custom options here if\r\n\t\t// and when you create one that shouldn't be\r\n\t\t// deep extended (see ajaxExtend)\r\n\t\tflatOptions: {\r\n\t\t\turl: true,\r\n\t\t\tcontext: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Creates a full fledged settings object into target\r\n\t// with both ajaxSettings and settings fields.\r\n\t// If target is omitted, writes into ajaxSettings.\r\n\tajaxSetup: function( target, settings ) {\r\n\t\treturn settings ?\r\n\r\n\t\t\t// Building a settings object\r\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\r\n\r\n\t\t\t// Extending ajaxSettings\r\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\r\n\t},\r\n\r\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\r\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\r\n\r\n\t// Main method\r\n\tajax: function( url, options ) {\r\n\r\n\t\t// If url is an object, simulate pre-1.5 signature\r\n\t\tif ( typeof url === \"object\" ) {\r\n\t\t\toptions = url;\r\n\t\t\turl = undefined;\r\n\t\t}\r\n\r\n\t\t// Force options to be an object\r\n\t\toptions = options || {};\r\n\r\n\t\tvar // Cross-domain detection vars\r\n\t\t\tparts,\r\n\t\t\t// Loop variable\r\n\t\t\ti,\r\n\t\t\t// URL without anti-cache param\r\n\t\t\tcacheURL,\r\n\t\t\t// Response headers as string\r\n\t\t\tresponseHeadersString,\r\n\t\t\t// timeout handle\r\n\t\t\ttimeoutTimer,\r\n\r\n\t\t\t// To know if global events are to be dispatched\r\n\t\t\tfireGlobals,\r\n\r\n\t\t\ttransport,\r\n\t\t\t// Response headers\r\n\t\t\tresponseHeaders,\r\n\t\t\t// Create the final options object\r\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\r\n\t\t\t// Callbacks context\r\n\t\t\tcallbackContext = s.context || s,\r\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\r\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\r\n\t\t\t\tjQuery( callbackContext ) :\r\n\t\t\t\tjQuery.event,\r\n\t\t\t// Deferreds\r\n\t\t\tdeferred = jQuery.Deferred(),\r\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tstatusCode = s.statusCode || {},\r\n\t\t\t// Headers (they are sent all at once)\r\n\t\t\trequestHeaders = {},\r\n\t\t\trequestHeadersNames = {},\r\n\t\t\t// The jqXHR state\r\n\t\t\tstate = 0,\r\n\t\t\t// Default abort message\r\n\t\t\tstrAbort = \"canceled\",\r\n\t\t\t// Fake xhr\r\n\t\t\tjqXHR = {\r\n\t\t\t\treadyState: 0,\r\n\r\n\t\t\t\t// Builds headers hashtable if needed\r\n\t\t\t\tgetResponseHeader: function( key ) {\r\n\t\t\t\t\tvar match;\r\n\t\t\t\t\tif ( state === 2 ) {\r\n\t\t\t\t\t\tif ( !responseHeaders ) {\r\n\t\t\t\t\t\t\tresponseHeaders = {};\r\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\r\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn match == null ? null : match;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Raw string\r\n\t\t\t\tgetAllResponseHeaders: function() {\r\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Caches the header\r\n\t\t\t\tsetRequestHeader: function( name, value ) {\r\n\t\t\t\t\tvar lname = name.toLowerCase();\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\r\n\t\t\t\t\t\trequestHeaders[ name ] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Overrides response content-type header\r\n\t\t\t\toverrideMimeType: function( type ) {\r\n\t\t\t\t\tif ( !state ) {\r\n\t\t\t\t\t\ts.mimeType = type;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Status-dependent callbacks\r\n\t\t\t\tstatusCode: function( map ) {\r\n\t\t\t\t\tvar code;\r\n\t\t\t\t\tif ( map ) {\r\n\t\t\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\t\t\tfor ( code in map ) {\r\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\r\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\r\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t},\r\n\r\n\t\t\t\t// Cancel the request\r\n\t\t\t\tabort: function( statusText ) {\r\n\t\t\t\t\tvar finalText = statusText || strAbort;\r\n\t\t\t\t\tif ( transport ) {\r\n\t\t\t\t\t\ttransport.abort( finalText );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdone( 0, finalText );\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t// Attach deferreds\r\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\r\n\t\tjqXHR.success = jqXHR.done;\r\n\t\tjqXHR.error = jqXHR.fail;\r\n\r\n\t\t// Remove hash character (#7531: and string promotion)\r\n\t\t// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)\r\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\r\n\t\t// We also use the url parameter if available\r\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" ).replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\r\n\r\n\t\t// Alias method option to type as per ticket #12004\r\n\t\ts.type = options.method || options.type || s.method || s.type;\r\n\r\n\t\t// Extract dataTypes list\r\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( core_rnotwhite ) || [\"\"];\r\n\r\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\r\n\t\tif ( s.crossDomain == null ) {\r\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\r\n\t\t\ts.crossDomain = !!( parts &&\r\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\r\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? 80 : 443 ) ) !=\r\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? 80 : 443 ) ) )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Convert data if not already a string\r\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\r\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\r\n\t\t}\r\n\r\n\t\t// Apply prefilters\r\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\r\n\r\n\t\t// If request was aborted inside a prefilter, stop there\r\n\t\tif ( state === 2 ) {\r\n\t\t\treturn jqXHR;\r\n\t\t}\r\n\r\n\t\t// We can fire global events as of now if asked to\r\n\t\tfireGlobals = s.global;\r\n\r\n\t\t// Watch for a new set of requests\r\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\r\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\r\n\t\t}\r\n\r\n\t\t// Uppercase the type\r\n\t\ts.type = s.type.toUpperCase();\r\n\r\n\t\t// Determine if request has content\r\n\t\ts.hasContent = !rnoContent.test( s.type );\r\n\r\n\t\t// Save the URL in case we're toying with the If-Modified-Since\r\n\t\t// and/or If-None-Match header later on\r\n\t\tcacheURL = s.url;\r\n\r\n\t\t// More options handling for requests with no content\r\n\t\tif ( !s.hasContent ) {\r\n\r\n\t\t\t// If data is available, append data to url\r\n\t\t\tif ( s.data ) {\r\n\t\t\t\tcacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\r\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\r\n\t\t\t\tdelete s.data;\r\n\t\t\t}\r\n\r\n\t\t\t// Add anti-cache in url if needed\r\n\t\t\tif ( s.cache === false ) {\r\n\t\t\t\ts.url = rts.test( cacheURL ) ?\r\n\r\n\t\t\t\t\t// If there is already a '_' parameter, set its value\r\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + ajax_nonce++ ) :\r\n\r\n\t\t\t\t\t// Otherwise add one to the end\r\n\t\t\t\t\tcacheURL + ( ajax_rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + ajax_nonce++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\tif ( s.ifModified ) {\r\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\r\n\t\t\t}\r\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\r\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set the correct header, if data is being sent\r\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\r\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\r\n\t\t}\r\n\r\n\t\t// Set the Accepts header for the server, depending on the dataType\r\n\t\tjqXHR.setRequestHeader(\r\n\t\t\t\"Accept\",\r\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\r\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\r\n\t\t\t\ts.accepts[ \"*\" ]\r\n\t\t);\r\n\r\n\t\t// Check for headers option\r\n\t\tfor ( i in s.headers ) {\r\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\r\n\t\t}\r\n\r\n\t\t// Allow custom headers/mimetypes and early abort\r\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\r\n\t\t\t// Abort if not done already and return\r\n\t\t\treturn jqXHR.abort();\r\n\t\t}\r\n\r\n\t\t// aborting is no longer a cancellation\r\n\t\tstrAbort = \"abort\";\r\n\r\n\t\t// Install callbacks on deferreds\r\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\r\n\t\t\tjqXHR[ i ]( s[ i ] );\r\n\t\t}\r\n\r\n\t\t// Get transport\r\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\r\n\r\n\t\t// If no transport, we auto-abort\r\n\t\tif ( !transport ) {\r\n\t\t\tdone( -1, \"No Transport\" );\r\n\t\t} else {\r\n\t\t\tjqXHR.readyState = 1;\r\n\r\n\t\t\t// Send global event\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\r\n\t\t\t}\r\n\t\t\t// Timeout\r\n\t\t\tif ( s.async && s.timeout > 0 ) {\r\n\t\t\t\ttimeoutTimer = setTimeout(function() {\r\n\t\t\t\t\tjqXHR.abort(\"timeout\");\r\n\t\t\t\t}, s.timeout );\r\n\t\t\t}\r\n\r\n\t\t\ttry {\r\n\t\t\t\tstate = 1;\r\n\t\t\t\ttransport.send( requestHeaders, done );\r\n\t\t\t} catch ( e ) {\r\n\t\t\t\t// Propagate exception as error if not done\r\n\t\t\t\tif ( state < 2 ) {\r\n\t\t\t\t\tdone( -1, e );\r\n\t\t\t\t// Simply rethrow otherwise\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Callback for when everything is done\r\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\r\n\t\t\tvar isSuccess, success, error, response, modified,\r\n\t\t\t\tstatusText = nativeStatusText;\r\n\r\n\t\t\t// Called once\r\n\t\t\tif ( state === 2 ) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// State is \"done\" now\r\n\t\t\tstate = 2;\r\n\r\n\t\t\t// Clear timeout if it exists\r\n\t\t\tif ( timeoutTimer ) {\r\n\t\t\t\tclearTimeout( timeoutTimer );\r\n\t\t\t}\r\n\r\n\t\t\t// Dereference transport for early garbage collection\r\n\t\t\t// (no matter how long the jqXHR object will be used)\r\n\t\t\ttransport = undefined;\r\n\r\n\t\t\t// Cache response headers\r\n\t\t\tresponseHeadersString = headers || \"\";\r\n\r\n\t\t\t// Set readyState\r\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\r\n\r\n\t\t\t// Get response data\r\n\t\t\tif ( responses ) {\r\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\r\n\t\t\t}\r\n\r\n\t\t\t// If successful, handle type chaining\r\n\t\t\tif ( status >= 200 && status < 300 || status === 304 ) {\r\n\r\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\r\n\t\t\t\tif ( s.ifModified ) {\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\r\n\t\t\t\t\tif ( modified ) {\r\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// if no content\r\n\t\t\t\tif ( status === 204 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"nocontent\";\r\n\r\n\t\t\t\t// if not modified\r\n\t\t\t\t} else if ( status === 304 ) {\r\n\t\t\t\t\tisSuccess = true;\r\n\t\t\t\t\tstatusText = \"notmodified\";\r\n\r\n\t\t\t\t// If we have data, let's convert it\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisSuccess = ajaxConvert( s, response );\r\n\t\t\t\t\tstatusText = isSuccess.state;\r\n\t\t\t\t\tsuccess = isSuccess.data;\r\n\t\t\t\t\terror = isSuccess.error;\r\n\t\t\t\t\tisSuccess = !error;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// We extract error from statusText\r\n\t\t\t\t// then normalize statusText and status for non-aborts\r\n\t\t\t\terror = statusText;\r\n\t\t\t\tif ( status || !statusText ) {\r\n\t\t\t\t\tstatusText = \"error\";\r\n\t\t\t\t\tif ( status < 0 ) {\r\n\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set data for the fake xhr object\r\n\t\t\tjqXHR.status = status;\r\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\r\n\r\n\t\t\t// Success/Error\r\n\t\t\tif ( isSuccess ) {\r\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Status-dependent callbacks\r\n\t\t\tjqXHR.statusCode( statusCode );\r\n\t\t\tstatusCode = undefined;\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\r\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\r\n\t\t\t}\r\n\r\n\t\t\t// Complete\r\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\r\n\r\n\t\t\tif ( fireGlobals ) {\r\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\r\n\t\t\t\t// Handle the global AJAX counter\r\n\t\t\t\tif ( !( --jQuery.active ) ) {\r\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn jqXHR;\r\n\t},\r\n\r\n\tgetScript: function( url, callback ) {\r\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\r\n\t},\r\n\r\n\tgetJSON: function( url, data, callback ) {\r\n\t\treturn jQuery.get( url, data, callback, \"json\" );\r\n\t}\r\n});\r\n\r\n/* Handles responses to an ajax request:\r\n * - sets all responseXXX fields accordingly\r\n * - finds the right dataType (mediates between content-type and expected dataType)\r\n * - returns the corresponding response\r\n */\r\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\r\n\tvar firstDataType, ct, finalDataType, type,\r\n\t\tcontents = s.contents,\r\n\t\tdataTypes = s.dataTypes,\r\n\t\tresponseFields = s.responseFields;\r\n\r\n\t// Fill responseXXX fields\r\n\tfor ( type in responseFields ) {\r\n\t\tif ( type in responses ) {\r\n\t\t\tjqXHR[ responseFields[type] ] = responses[ type ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Remove auto dataType and get content-type in the process\r\n\twhile( dataTypes[ 0 ] === \"*\" ) {\r\n\t\tdataTypes.shift();\r\n\t\tif ( ct === undefined ) {\r\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\r\n\t\t}\r\n\t}\r\n\r\n\t// Check if we're dealing with a known content-type\r\n\tif ( ct ) {\r\n\t\tfor ( type in contents ) {\r\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\r\n\t\t\t\tdataTypes.unshift( type );\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Check to see if we have a response for the expected dataType\r\n\tif ( dataTypes[ 0 ] in responses ) {\r\n\t\tfinalDataType = dataTypes[ 0 ];\r\n\t} else {\r\n\t\t// Try convertible dataTypes\r\n\t\tfor ( type in responses ) {\r\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\r\n\t\t\t\tfinalDataType = type;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif ( !firstDataType ) {\r\n\t\t\t\tfirstDataType = type;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Or just use first one\r\n\t\tfinalDataType = finalDataType || firstDataType;\r\n\t}\r\n\r\n\t// If we found a dataType\r\n\t// We add the dataType to the list if needed\r\n\t// and return the corresponding response\r\n\tif ( finalDataType ) {\r\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\r\n\t\t\tdataTypes.unshift( finalDataType );\r\n\t\t}\r\n\t\treturn responses[ finalDataType ];\r\n\t}\r\n}\r\n\r\n// Chain conversions given the request and the original response\r\nfunction ajaxConvert( s, response ) {\r\n\tvar conv2, current, conv, tmp,\r\n\t\tconverters = {},\r\n\t\ti = 0,\r\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\r\n\t\tdataTypes = s.dataTypes.slice(),\r\n\t\tprev = dataTypes[ 0 ];\r\n\r\n\t// Apply the dataFilter if provided\r\n\tif ( s.dataFilter ) {\r\n\t\tresponse = s.dataFilter( response, s.dataType );\r\n\t}\r\n\r\n\t// Create converters map with lowercased keys\r\n\tif ( dataTypes[ 1 ] ) {\r\n\t\tfor ( conv in s.converters ) {\r\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\r\n\t\t}\r\n\t}\r\n\r\n\t// Convert to each sequential dataType, tolerating list modification\r\n\tfor ( ; (current = dataTypes[++i]); ) {\r\n\r\n\t\t// There's only work to do if current dataType is non-auto\r\n\t\tif ( current !== \"*\" ) {\r\n\r\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\r\n\t\t\tif ( prev !== \"*\" && prev !== current ) {\r\n\r\n\t\t\t\t// Seek a direct converter\r\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\r\n\r\n\t\t\t\t// If none found, seek a pair\r\n\t\t\t\tif ( !conv ) {\r\n\t\t\t\t\tfor ( conv2 in converters ) {\r\n\r\n\t\t\t\t\t\t// If conv2 outputs current\r\n\t\t\t\t\t\ttmp = conv2.split(\" \");\r\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\r\n\r\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\r\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\r\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\r\n\t\t\t\t\t\t\tif ( conv ) {\r\n\t\t\t\t\t\t\t\t// Condense equivalence converters\r\n\t\t\t\t\t\t\t\tif ( conv === true ) {\r\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\r\n\r\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\r\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\r\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\r\n\t\t\t\t\t\t\t\t\tdataTypes.splice( i--, 0, current );\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply converter (if not an equivalence)\r\n\t\t\t\tif ( conv !== true ) {\r\n\r\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\r\n\t\t\t\t\tif ( conv && s[\"throws\"] ) {\r\n\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tresponse = conv( response );\r\n\t\t\t\t\t\t} catch ( e ) {\r\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Update prev for next iteration\r\n\t\t\tprev = current;\r\n\t\t}\r\n\t}\r\n\r\n\treturn { state: \"success\", data: response };\r\n}\r\n// Install script dataType\r\njQuery.ajaxSetup({\r\n\taccepts: {\r\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\r\n\t},\r\n\tcontents: {\r\n\t\tscript: /(?:java|ecma)script/\r\n\t},\r\n\tconverters: {\r\n\t\t\"text script\": function( text ) {\r\n\t\t\tjQuery.globalEval( text );\r\n\t\t\treturn text;\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Handle cache's special case and global\r\njQuery.ajaxPrefilter( \"script\", function( s ) {\r\n\tif ( s.cache === undefined ) {\r\n\t\ts.cache = false;\r\n\t}\r\n\tif ( s.crossDomain ) {\r\n\t\ts.type = \"GET\";\r\n\t\ts.global = false;\r\n\t}\r\n});\r\n\r\n// Bind script tag hack transport\r\njQuery.ajaxTransport( \"script\", function(s) {\r\n\r\n\t// This transport only deals with cross domain requests\r\n\tif ( s.crossDomain ) {\r\n\r\n\t\tvar script,\r\n\t\t\thead = document.head || jQuery(\"head\")[0] || document.documentElement;\r\n\r\n\t\treturn {\r\n\r\n\t\t\tsend: function( _, callback ) {\r\n\r\n\t\t\t\tscript = document.createElement(\"script\");\r\n\r\n\t\t\t\tscript.async = true;\r\n\r\n\t\t\t\tif ( s.scriptCharset ) {\r\n\t\t\t\t\tscript.charset = s.scriptCharset;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tscript.src = s.url;\r\n\r\n\t\t\t\t// Attach handlers for all browsers\r\n\t\t\t\tscript.onload = script.onreadystatechange = function( _, isAbort ) {\r\n\r\n\t\t\t\t\tif ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t\t\t// Handle memory leak in IE\r\n\t\t\t\t\t\tscript.onload = script.onreadystatechange = null;\r\n\r\n\t\t\t\t\t\t// Remove the script\r\n\t\t\t\t\t\tif ( script.parentNode ) {\r\n\t\t\t\t\t\t\tscript.parentNode.removeChild( script );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Dereference the script\r\n\t\t\t\t\t\tscript = null;\r\n\r\n\t\t\t\t\t\t// Callback if not abort\r\n\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\tcallback( 200, \"success\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending\r\n\t\t\t\t// Use native DOM manipulation to avoid our domManip AJAX trickery\r\n\t\t\t\thead.insertBefore( script, head.firstChild );\r\n\t\t\t},\r\n\r\n\t\t\tabort: function() {\r\n\t\t\t\tif ( script ) {\r\n\t\t\t\t\tscript.onload( undefined, true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n});\r\nvar oldCallbacks = [],\r\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\r\n\r\n// Default jsonp settings\r\njQuery.ajaxSetup({\r\n\tjsonp: \"callback\",\r\n\tjsonpCallback: function() {\r\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( ajax_nonce++ ) );\r\n\t\tthis[ callback ] = true;\r\n\t\treturn callback;\r\n\t}\r\n});\r\n\r\n// Detect, normalize options and install callbacks for jsonp requests\r\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\r\n\r\n\tvar callbackName, overwritten, responseContainer,\r\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\r\n\t\t\t\"url\" :\r\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\r\n\t\t);\r\n\r\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\r\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\r\n\r\n\t\t// Get callback name, remembering preexisting value associated with it\r\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\r\n\t\t\ts.jsonpCallback() :\r\n\t\t\ts.jsonpCallback;\r\n\r\n\t\t// Insert callback into url or form data\r\n\t\tif ( jsonProp ) {\r\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\r\n\t\t} else if ( s.jsonp !== false ) {\r\n\t\t\ts.url += ( ajax_rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\r\n\t\t}\r\n\r\n\t\t// Use data converter to retrieve json after script execution\r\n\t\ts.converters[\"script json\"] = function() {\r\n\t\t\tif ( !responseContainer ) {\r\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\r\n\t\t\t}\r\n\t\t\treturn responseContainer[ 0 ];\r\n\t\t};\r\n\r\n\t\t// force json dataType\r\n\t\ts.dataTypes[ 0 ] = \"json\";\r\n\r\n\t\t// Install callback\r\n\t\toverwritten = window[ callbackName ];\r\n\t\twindow[ callbackName ] = function() {\r\n\t\t\tresponseContainer = arguments;\r\n\t\t};\r\n\r\n\t\t// Clean-up function (fires after converters)\r\n\t\tjqXHR.always(function() {\r\n\t\t\t// Restore preexisting value\r\n\t\t\twindow[ callbackName ] = overwritten;\r\n\r\n\t\t\t// Save back as free\r\n\t\t\tif ( s[ callbackName ] ) {\r\n\t\t\t\t// make sure that re-using the options doesn't screw things around\r\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\r\n\r\n\t\t\t\t// save the callback name for future use\r\n\t\t\t\toldCallbacks.push( callbackName );\r\n\t\t\t}\r\n\r\n\t\t\t// Call if it was a function and we have a response\r\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\r\n\t\t\t\toverwritten( responseContainer[ 0 ] );\r\n\t\t\t}\r\n\r\n\t\t\tresponseContainer = overwritten = undefined;\r\n\t\t});\r\n\r\n\t\t// Delegate to script\r\n\t\treturn \"script\";\r\n\t}\r\n});\r\nvar xhrCallbacks, xhrSupported,\r\n\txhrId = 0,\r\n\t// #5280: Internet Explorer will keep connections alive if we don't abort on unload\r\n\txhrOnUnloadAbort = window.ActiveXObject && function() {\r\n\t\t// Abort all pending requests\r\n\t\tvar key;\r\n\t\tfor ( key in xhrCallbacks ) {\r\n\t\t\txhrCallbacks[ key ]( undefined, true );\r\n\t\t}\r\n\t};\r\n\r\n// Functions to create xhrs\r\nfunction createStandardXHR() {\r\n\ttry {\r\n\t\treturn new window.XMLHttpRequest();\r\n\t} catch( e ) {}\r\n}\r\n\r\nfunction createActiveXHR() {\r\n\ttry {\r\n\t\treturn new window.ActiveXObject(\"Microsoft.XMLHTTP\");\r\n\t} catch( e ) {}\r\n}\r\n\r\n// Create the request object\r\n// (This is still attached to ajaxSettings for backward compatibility)\r\njQuery.ajaxSettings.xhr = window.ActiveXObject ?\r\n\t/* Microsoft failed to properly\r\n\t * implement the XMLHttpRequest in IE7 (can't request local files),\r\n\t * so we use the ActiveXObject when it is available\r\n\t * Additionally XMLHttpRequest can be disabled in IE7/IE8 so\r\n\t * we need a fallback.\r\n\t */\r\n\tfunction() {\r\n\t\treturn !this.isLocal && createStandardXHR() || createActiveXHR();\r\n\t} :\r\n\t// For all other browsers, use the standard XMLHttpRequest object\r\n\tcreateStandardXHR;\r\n\r\n// Determine support properties\r\nxhrSupported = jQuery.ajaxSettings.xhr();\r\njQuery.support.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\r\nxhrSupported = jQuery.support.ajax = !!xhrSupported;\r\n\r\n// Create transport if the browser can provide an xhr\r\nif ( xhrSupported ) {\r\n\r\n\tjQuery.ajaxTransport(function( s ) {\r\n\t\t// Cross domain only allowed if supported through XMLHttpRequest\r\n\t\tif ( !s.crossDomain || jQuery.support.cors ) {\r\n\r\n\t\t\tvar callback;\r\n\r\n\t\t\treturn {\r\n\t\t\t\tsend: function( headers, complete ) {\r\n\r\n\t\t\t\t\t// Get a new xhr\r\n\t\t\t\t\tvar handle, i,\r\n\t\t\t\t\t\txhr = s.xhr();\r\n\r\n\t\t\t\t\t// Open the socket\r\n\t\t\t\t\t// Passing null username, generates a login popup on Opera (#2865)\r\n\t\t\t\t\tif ( s.username ) {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async, s.username, s.password );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\txhr.open( s.type, s.url, s.async );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Apply custom fields if provided\r\n\t\t\t\t\tif ( s.xhrFields ) {\r\n\t\t\t\t\t\tfor ( i in s.xhrFields ) {\r\n\t\t\t\t\t\t\txhr[ i ] = s.xhrFields[ i ];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Override mime type if needed\r\n\t\t\t\t\tif ( s.mimeType && xhr.overrideMimeType ) {\r\n\t\t\t\t\t\txhr.overrideMimeType( s.mimeType );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// X-Requested-With header\r\n\t\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\r\n\t\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\r\n\t\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\r\n\t\t\t\t\t// For same-domain requests, won't change header if already provided.\r\n\t\t\t\t\tif ( !s.crossDomain && !headers[\"X-Requested-With\"] ) {\r\n\t\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Need an extra try/catch for cross domain requests in Firefox 3\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tfor ( i in headers ) {\r\n\t\t\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch( err ) {}\r\n\r\n\t\t\t\t\t// Do send the request\r\n\t\t\t\t\t// This may raise an exception which is actually\r\n\t\t\t\t\t// handled in jQuery.ajax (so no try/catch here)\r\n\t\t\t\t\txhr.send( ( s.hasContent && s.data ) || null );\r\n\r\n\t\t\t\t\t// Listener\r\n\t\t\t\t\tcallback = function( _, isAbort ) {\r\n\t\t\t\t\t\tvar status, responseHeaders, statusText, responses;\r\n\r\n\t\t\t\t\t\t// Firefox throws exceptions when accessing properties\r\n\t\t\t\t\t\t// of an xhr when a network error occurred\r\n\t\t\t\t\t\t// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)\r\n\t\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\t\t// Was never called and is aborted or complete\r\n\t\t\t\t\t\t\tif ( callback && ( isAbort || xhr.readyState === 4 ) ) {\r\n\r\n\t\t\t\t\t\t\t\t// Only called once\r\n\t\t\t\t\t\t\t\tcallback = undefined;\r\n\r\n\t\t\t\t\t\t\t\t// Do not keep as active anymore\r\n\t\t\t\t\t\t\t\tif ( handle ) {\r\n\t\t\t\t\t\t\t\t\txhr.onreadystatechange = jQuery.noop;\r\n\t\t\t\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t\t\t\tdelete xhrCallbacks[ handle ];\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t// If it's an abort\r\n\t\t\t\t\t\t\t\tif ( isAbort ) {\r\n\t\t\t\t\t\t\t\t\t// Abort it manually if needed\r\n\t\t\t\t\t\t\t\t\tif ( xhr.readyState !== 4 ) {\r\n\t\t\t\t\t\t\t\t\t\txhr.abort();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tresponses = {};\r\n\t\t\t\t\t\t\t\t\tstatus = xhr.status;\r\n\t\t\t\t\t\t\t\t\tresponseHeaders = xhr.getAllResponseHeaders();\r\n\r\n\t\t\t\t\t\t\t\t\t// When requesting binary data, IE6-9 will throw an exception\r\n\t\t\t\t\t\t\t\t\t// on any attempt to access responseText (#11426)\r\n\t\t\t\t\t\t\t\t\tif ( typeof xhr.responseText === \"string\" ) {\r\n\t\t\t\t\t\t\t\t\t\tresponses.text = xhr.responseText;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Firefox throws an exception when accessing\r\n\t\t\t\t\t\t\t\t\t// statusText for faulty cross-domain requests\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tstatusText = xhr.statusText;\r\n\t\t\t\t\t\t\t\t\t} catch( e ) {\r\n\t\t\t\t\t\t\t\t\t\t// We normalize with Webkit giving an empty statusText\r\n\t\t\t\t\t\t\t\t\t\tstatusText = \"\";\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t// Filter status for non standard behaviors\r\n\r\n\t\t\t\t\t\t\t\t\t// If the request is local and we have data: assume a success\r\n\t\t\t\t\t\t\t\t\t// (success with no data won't get notified, that's the best we\r\n\t\t\t\t\t\t\t\t\t// can do given current implementations)\r\n\t\t\t\t\t\t\t\t\tif ( !status && s.isLocal && !s.crossDomain ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = responses.text ? 200 : 404;\r\n\t\t\t\t\t\t\t\t\t// IE - #1450: sometimes returns 1223 when it should be 204\r\n\t\t\t\t\t\t\t\t\t} else if ( status === 1223 ) {\r\n\t\t\t\t\t\t\t\t\t\tstatus = 204;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch( firefoxAccessException ) {\r\n\t\t\t\t\t\t\tif ( !isAbort ) {\r\n\t\t\t\t\t\t\t\tcomplete( -1, firefoxAccessException );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call complete if needed\r\n\t\t\t\t\t\tif ( responses ) {\r\n\t\t\t\t\t\t\tcomplete( status, statusText, responses, responseHeaders );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif ( !s.async ) {\r\n\t\t\t\t\t\t// if we're in sync mode we fire the callback\r\n\t\t\t\t\t\tcallback();\r\n\t\t\t\t\t} else if ( xhr.readyState === 4 ) {\r\n\t\t\t\t\t\t// (IE6 & IE7) if it's in cache and has been\r\n\t\t\t\t\t\t// retrieved directly we need to fire the callback\r\n\t\t\t\t\t\tsetTimeout( callback );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\thandle = ++xhrId;\r\n\t\t\t\t\t\tif ( xhrOnUnloadAbort ) {\r\n\t\t\t\t\t\t\t// Create the active xhrs callbacks list if needed\r\n\t\t\t\t\t\t\t// and attach the unload handler\r\n\t\t\t\t\t\t\tif ( !xhrCallbacks ) {\r\n\t\t\t\t\t\t\t\txhrCallbacks = {};\r\n\t\t\t\t\t\t\t\tjQuery( window ).unload( xhrOnUnloadAbort );\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// Add to list of active xhrs callbacks\r\n\t\t\t\t\t\t\txhrCallbacks[ handle ] = callback;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\txhr.onreadystatechange = callback;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tabort: function() {\r\n\t\t\t\t\tif ( callback ) {\r\n\t\t\t\t\t\tcallback( undefined, true );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t});\r\n}\r\nvar fxNow, timerId,\r\n\trfxtypes = /^(?:toggle|show|hide)$/,\r\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + core_pnum + \")([a-z%]*)$\", \"i\" ),\r\n\trrun = /queueHooks$/,\r\n\tanimationPrefilters = [ defaultPrefilter ],\r\n\ttweeners = {\r\n\t\t\"*\": [function( prop, value ) {\r\n\t\t\tvar end, unit,\r\n\t\t\t\ttween = this.createTween( prop, value ),\r\n\t\t\t\tparts = rfxnum.exec( value ),\r\n\t\t\t\ttarget = tween.cur(),\r\n\t\t\t\tstart = +target || 0,\r\n\t\t\t\tscale = 1,\r\n\t\t\t\tmaxIterations = 20;\r\n\r\n\t\t\tif ( parts ) {\r\n\t\t\t\tend = +parts[2];\r\n\t\t\t\tunit = parts[3] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\r\n\t\t\t\t// We need to compute starting value\r\n\t\t\t\tif ( unit !== \"px\" && start ) {\r\n\t\t\t\t\t// Iteratively approximate from a nonzero starting point\r\n\t\t\t\t\t// Prefer the current property, because this process will be trivial if it uses the same units\r\n\t\t\t\t\t// Fallback to end or a simple constant\r\n\t\t\t\t\tstart = jQuery.css( tween.elem, prop, true ) || end || 1;\r\n\r\n\t\t\t\t\tdo {\r\n\t\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*\r\n\t\t\t\t\t\t// Use a string for doubling factor so we don't accidentally see scale as unchanged below\r\n\t\t\t\t\t\tscale = scale || \".5\";\r\n\r\n\t\t\t\t\t\t// Adjust and apply\r\n\t\t\t\t\t\tstart = start / scale;\r\n\t\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\r\n\r\n\t\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur()\r\n\t\t\t\t\t// And breaking the loop if scale is unchanged or perfect, or if we've just had enough\r\n\t\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttween.unit = unit;\r\n\t\t\t\ttween.start = start;\r\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\r\n\t\t\t\ttween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;\r\n\t\t\t}\r\n\t\t\treturn tween;\r\n\t\t}]\r\n\t};\r\n\r\n// Animations created synchronously will run synchronously\r\nfunction createFxNow() {\r\n\tsetTimeout(function() {\r\n\t\tfxNow = undefined;\r\n\t});\r\n\treturn ( fxNow = jQuery.now() );\r\n}\r\n\r\nfunction createTweens( animation, props ) {\r\n\tjQuery.each( props, function( prop, value ) {\r\n\t\tvar collection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\r\n\t\t\tindex = 0,\r\n\t\t\tlength = collection.length;\r\n\t\tfor ( ; index < length; index++ ) {\r\n\t\t\tif ( collection[ index ].call( animation, prop, value ) ) {\r\n\r\n\t\t\t\t// we're done with this property\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction Animation( elem, properties, options ) {\r\n\tvar result,\r\n\t\tstopped,\r\n\t\tindex = 0,\r\n\t\tlength = animationPrefilters.length,\r\n\t\tdeferred = jQuery.Deferred().always( function() {\r\n\t\t\t// don't match elem in the :animated selector\r\n\t\t\tdelete tick.elem;\r\n\t\t}),\r\n\t\ttick = function() {\r\n\t\t\tif ( stopped ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar currentTime = fxNow || createFxNow(),\r\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\r\n\t\t\t\t// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)\r\n\t\t\t\ttemp = remaining / animation.duration || 0,\r\n\t\t\t\tpercent = 1 - temp,\r\n\t\t\t\tindex = 0,\r\n\t\t\t\tlength = animation.tweens.length;\r\n\r\n\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\tanimation.tweens[ index ].run( percent );\r\n\t\t\t}\r\n\r\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\r\n\r\n\t\t\tif ( percent < 1 && length ) {\r\n\t\t\t\treturn remaining;\r\n\t\t\t} else {\r\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t},\r\n\t\tanimation = deferred.promise({\r\n\t\t\telem: elem,\r\n\t\t\tprops: jQuery.extend( {}, properties ),\r\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\r\n\t\t\toriginalProperties: properties,\r\n\t\t\toriginalOptions: options,\r\n\t\t\tstartTime: fxNow || createFxNow(),\r\n\t\t\tduration: options.duration,\r\n\t\t\ttweens: [],\r\n\t\t\tcreateTween: function( prop, end ) {\r\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\r\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\r\n\t\t\t\tanimation.tweens.push( tween );\r\n\t\t\t\treturn tween;\r\n\t\t\t},\r\n\t\t\tstop: function( gotoEnd ) {\r\n\t\t\t\tvar index = 0,\r\n\t\t\t\t\t// if we are going to the end, we want to run all the tweens\r\n\t\t\t\t\t// otherwise we skip this part\r\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\r\n\t\t\t\tif ( stopped ) {\r\n\t\t\t\t\treturn this;\r\n\t\t\t\t}\r\n\t\t\t\tstopped = true;\r\n\t\t\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// resolve when we played the last frame\r\n\t\t\t\t// otherwise, reject\r\n\t\t\t\tif ( gotoEnd ) {\r\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\r\n\t\t\t\t}\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}),\r\n\t\tprops = animation.props;\r\n\r\n\tpropFilter( props, animation.opts.specialEasing );\r\n\r\n\tfor ( ; index < length ; index++ ) {\r\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\r\n\t\tif ( result ) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t}\r\n\r\n\tcreateTweens( animation, props );\r\n\r\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\r\n\t\tanimation.opts.start.call( elem, animation );\r\n\t}\r\n\r\n\tjQuery.fx.timer(\r\n\t\tjQuery.extend( tick, {\r\n\t\t\telem: elem,\r\n\t\t\tanim: animation,\r\n\t\t\tqueue: animation.opts.queue\r\n\t\t})\r\n\t);\r\n\r\n\t// attach callbacks from options\r\n\treturn animation.progress( animation.opts.progress )\r\n\t\t.done( animation.opts.done, animation.opts.complete )\r\n\t\t.fail( animation.opts.fail )\r\n\t\t.always( animation.opts.always );\r\n}\r\n\r\nfunction propFilter( props, specialEasing ) {\r\n\tvar value, name, index, easing, hooks;\r\n\r\n\t// camelCase, specialEasing and expand cssHook pass\r\n\tfor ( index in props ) {\r\n\t\tname = jQuery.camelCase( index );\r\n\t\teasing = specialEasing[ name ];\r\n\t\tvalue = props[ index ];\r\n\t\tif ( jQuery.isArray( value ) ) {\r\n\t\t\teasing = value[ 1 ];\r\n\t\t\tvalue = props[ index ] = value[ 0 ];\r\n\t\t}\r\n\r\n\t\tif ( index !== name ) {\r\n\t\t\tprops[ name ] = value;\r\n\t\t\tdelete props[ index ];\r\n\t\t}\r\n\r\n\t\thooks = jQuery.cssHooks[ name ];\r\n\t\tif ( hooks && \"expand\" in hooks ) {\r\n\t\t\tvalue = hooks.expand( value );\r\n\t\t\tdelete props[ name ];\r\n\r\n\t\t\t// not quite $.extend, this wont overwrite keys already present.\r\n\t\t\t// also - reusing 'index' from above because we have the correct \"name\"\r\n\t\t\tfor ( index in value ) {\r\n\t\t\t\tif ( !( index in props ) ) {\r\n\t\t\t\t\tprops[ index ] = value[ index ];\r\n\t\t\t\t\tspecialEasing[ index ] = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tspecialEasing[ name ] = easing;\r\n\t\t}\r\n\t}\r\n}\r\n\r\njQuery.Animation = jQuery.extend( Animation, {\r\n\r\n\ttweener: function( props, callback ) {\r\n\t\tif ( jQuery.isFunction( props ) ) {\r\n\t\t\tcallback = props;\r\n\t\t\tprops = [ \"*\" ];\r\n\t\t} else {\r\n\t\t\tprops = props.split(\" \");\r\n\t\t}\r\n\r\n\t\tvar prop,\r\n\t\t\tindex = 0,\r\n\t\t\tlength = props.length;\r\n\r\n\t\tfor ( ; index < length ; index++ ) {\r\n\t\t\tprop = props[ index ];\r\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\r\n\t\t\ttweeners[ prop ].unshift( callback );\r\n\t\t}\r\n\t},\r\n\r\n\tprefilter: function( callback, prepend ) {\r\n\t\tif ( prepend ) {\r\n\t\t\tanimationPrefilters.unshift( callback );\r\n\t\t} else {\r\n\t\t\tanimationPrefilters.push( callback );\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction defaultPrefilter( elem, props, opts ) {\r\n\t/*jshint validthis:true */\r\n\tvar prop, index, length,\r\n\t\tvalue, dataShow, toggle,\r\n\t\ttween, hooks, oldfire,\r\n\t\tanim = this,\r\n\t\tstyle = elem.style,\r\n\t\torig = {},\r\n\t\thandled = [],\r\n\t\thidden = elem.nodeType && isHidden( elem );\r\n\r\n\t// handle queue: false promises\r\n\tif ( !opts.queue ) {\r\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\r\n\t\tif ( hooks.unqueued == null ) {\r\n\t\t\thooks.unqueued = 0;\r\n\t\t\toldfire = hooks.empty.fire;\r\n\t\t\thooks.empty.fire = function() {\r\n\t\t\t\tif ( !hooks.unqueued ) {\r\n\t\t\t\t\toldfire();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t}\r\n\t\thooks.unqueued++;\r\n\r\n\t\tanim.always(function() {\r\n\t\t\t// doing this makes sure that the complete handler will be called\r\n\t\t\t// before this completes\r\n\t\t\tanim.always(function() {\r\n\t\t\t\thooks.unqueued--;\r\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\r\n\t\t\t\t\thooks.empty.fire();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\t// height/width overflow pass\r\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\r\n\t\t// Make sure that nothing sneaks out\r\n\t\t// Record all 3 overflow attributes because IE does not\r\n\t\t// change the overflow attribute when overflowX and\r\n\t\t// overflowY are set to the same value\r\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\r\n\r\n\t\t// Set display property to inline-block for height/width\r\n\t\t// animations on inline elements that are having width/height animated\r\n\t\tif ( jQuery.css( elem, \"display\" ) === \"inline\" &&\r\n\t\t\t\tjQuery.css( elem, \"float\" ) === \"none\" ) {\r\n\r\n\t\t\t// inline-level elements accept inline-block;\r\n\t\t\t// block-level elements need to be inline with layout\r\n\t\t\tif ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === \"inline\" ) {\r\n\t\t\t\tstyle.display = \"inline-block\";\r\n\r\n\t\t\t} else {\r\n\t\t\t\tstyle.zoom = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif ( opts.overflow ) {\r\n\t\tstyle.overflow = \"hidden\";\r\n\t\tif ( !jQuery.support.shrinkWrapBlocks ) {\r\n\t\t\tanim.always(function() {\r\n\t\t\t\tstyle.overflow = opts.overflow[ 0 ];\r\n\t\t\t\tstyle.overflowX = opts.overflow[ 1 ];\r\n\t\t\t\tstyle.overflowY = opts.overflow[ 2 ];\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t// show/hide pass\r\n\tfor ( index in props ) {\r\n\t\tvalue = props[ index ];\r\n\t\tif ( rfxtypes.exec( value ) ) {\r\n\t\t\tdelete props[ index ];\r\n\t\t\ttoggle = toggle || value === \"toggle\";\r\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\thandled.push( index );\r\n\t\t}\r\n\t}\r\n\r\n\tlength = handled.length;\r\n\tif ( length ) {\r\n\t\tdataShow = jQuery._data( elem, \"fxshow\" ) || jQuery._data( elem, \"fxshow\", {} );\r\n\t\tif ( \"hidden\" in dataShow ) {\r\n\t\t\thidden = dataShow.hidden;\r\n\t\t}\r\n\r\n\t\t// store state if its toggle - enables .stop().toggle() to \"reverse\"\r\n\t\tif ( toggle ) {\r\n\t\t\tdataShow.hidden = !hidden;\r\n\t\t}\r\n\t\tif ( hidden ) {\r\n\t\t\tjQuery( elem ).show();\r\n\t\t} else {\r\n\t\t\tanim.done(function() {\r\n\t\t\t\tjQuery( elem ).hide();\r\n\t\t\t});\r\n\t\t}\r\n\t\tanim.done(function() {\r\n\t\t\tvar prop;\r\n\t\t\tjQuery._removeData( elem, \"fxshow\" );\r\n\t\t\tfor ( prop in orig ) {\r\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\r\n\t\t\t}\r\n\t\t});\r\n\t\tfor ( index = 0 ; index < length ; index++ ) {\r\n\t\t\tprop = handled[ index ];\r\n\t\t\ttween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );\r\n\t\t\torig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );\r\n\r\n\t\t\tif ( !( prop in dataShow ) ) {\r\n\t\t\t\tdataShow[ prop ] = tween.start;\r\n\t\t\t\tif ( hidden ) {\r\n\t\t\t\t\ttween.end = tween.start;\r\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction Tween( elem, options, prop, end, easing ) {\r\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\r\n}\r\njQuery.Tween = Tween;\r\n\r\nTween.prototype = {\r\n\tconstructor: Tween,\r\n\tinit: function( elem, options, prop, end, easing, unit ) {\r\n\t\tthis.elem = elem;\r\n\t\tthis.prop = prop;\r\n\t\tthis.easing = easing || \"swing\";\r\n\t\tthis.options = options;\r\n\t\tthis.start = this.now = this.cur();\r\n\t\tthis.end = end;\r\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\r\n\t},\r\n\tcur: function() {\r\n\t\tvar hooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\treturn hooks && hooks.get ?\r\n\t\t\thooks.get( this ) :\r\n\t\t\tTween.propHooks._default.get( this );\r\n\t},\r\n\trun: function( percent ) {\r\n\t\tvar eased,\r\n\t\t\thooks = Tween.propHooks[ this.prop ];\r\n\r\n\t\tif ( this.options.duration ) {\r\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\r\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tthis.pos = eased = percent;\r\n\t\t}\r\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\r\n\r\n\t\tif ( this.options.step ) {\r\n\t\t\tthis.options.step.call( this.elem, this.now, this );\r\n\t\t}\r\n\r\n\t\tif ( hooks && hooks.set ) {\r\n\t\t\thooks.set( this );\r\n\t\t} else {\r\n\t\t\tTween.propHooks._default.set( this );\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n};\r\n\r\nTween.prototype.init.prototype = Tween.prototype;\r\n\r\nTween.propHooks = {\r\n\t_default: {\r\n\t\tget: function( tween ) {\r\n\t\t\tvar result;\r\n\r\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\r\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\r\n\t\t\t\treturn tween.elem[ tween.prop ];\r\n\t\t\t}\r\n\r\n\t\t\t// passing an empty string as a 3rd parameter to .css will automatically\r\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails\r\n\t\t\t// so, simple values such as \"10px\" are parsed to Float.\r\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as is.\r\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\r\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\r\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\r\n\t\t},\r\n\t\tset: function( tween ) {\r\n\t\t\t// use step hook for back compat - use cssHook if its there - use .style if its\r\n\t\t\t// available and use plain properties where available\r\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\r\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\r\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\r\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\r\n\t\t\t} else {\r\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\n// Remove in 2.0 - this supports IE8's panic based approach\r\n// to setting things on disconnected nodes\r\n\r\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\r\n\tset: function( tween ) {\r\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\r\n\t\t\ttween.elem[ tween.prop ] = tween.now;\r\n\t\t}\r\n\t}\r\n};\r\n\r\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\r\n\tvar cssFn = jQuery.fn[ name ];\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn speed == null || typeof speed === \"boolean\" ?\r\n\t\t\tcssFn.apply( this, arguments ) :\r\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.fn.extend({\r\n\tfadeTo: function( speed, to, easing, callback ) {\r\n\r\n\t\t// show any hidden elements after setting opacity to 0\r\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\r\n\r\n\t\t\t// animate to the value specified\r\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\r\n\t},\r\n\tanimate: function( prop, speed, easing, callback ) {\r\n\t\tvar empty = jQuery.isEmptyObject( prop ),\r\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\r\n\t\t\tdoAnimation = function() {\r\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\r\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\r\n\t\t\t\tdoAnimation.finish = function() {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t};\r\n\t\t\t\t// Empty animations, or finishing resolves immediately\r\n\t\t\t\tif ( empty || jQuery._data( this, \"finish\" ) ) {\r\n\t\t\t\t\tanim.stop( true );\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tdoAnimation.finish = doAnimation;\r\n\r\n\t\treturn empty || optall.queue === false ?\r\n\t\t\tthis.each( doAnimation ) :\r\n\t\t\tthis.queue( optall.queue, doAnimation );\r\n\t},\r\n\tstop: function( type, clearQueue, gotoEnd ) {\r\n\t\tvar stopQueue = function( hooks ) {\r\n\t\t\tvar stop = hooks.stop;\r\n\t\t\tdelete hooks.stop;\r\n\t\t\tstop( gotoEnd );\r\n\t\t};\r\n\r\n\t\tif ( typeof type !== \"string\" ) {\r\n\t\t\tgotoEnd = clearQueue;\r\n\t\t\tclearQueue = type;\r\n\t\t\ttype = undefined;\r\n\t\t}\r\n\t\tif ( clearQueue && type !== false ) {\r\n\t\t\tthis.queue( type || \"fx\", [] );\r\n\t\t}\r\n\r\n\t\treturn this.each(function() {\r\n\t\t\tvar dequeue = true,\r\n\t\t\t\tindex = type != null && type + \"queueHooks\",\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tdata = jQuery._data( this );\r\n\r\n\t\t\tif ( index ) {\r\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\r\n\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor ( index in data ) {\r\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\r\n\t\t\t\t\t\tstopQueue( data[ index ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\r\n\t\t\t\t\tdequeue = false;\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// start the next in the queue if the last step wasn't forced\r\n\t\t\t// timers currently will call their complete callbacks, which will dequeue\r\n\t\t\t// but only if they were gotoEnd\r\n\t\t\tif ( dequeue || !gotoEnd ) {\r\n\t\t\t\tjQuery.dequeue( this, type );\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\tfinish: function( type ) {\r\n\t\tif ( type !== false ) {\r\n\t\t\ttype = type || \"fx\";\r\n\t\t}\r\n\t\treturn this.each(function() {\r\n\t\t\tvar index,\r\n\t\t\t\tdata = jQuery._data( this ),\r\n\t\t\t\tqueue = data[ type + \"queue\" ],\r\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\r\n\t\t\t\ttimers = jQuery.timers,\r\n\t\t\t\tlength = queue ? queue.length : 0;\r\n\r\n\t\t\t// enable finishing flag on private data\r\n\t\t\tdata.finish = true;\r\n\r\n\t\t\t// empty the queue first\r\n\t\t\tjQuery.queue( this, type, [] );\r\n\r\n\t\t\tif ( hooks && hooks.cur && hooks.cur.finish ) {\r\n\t\t\t\thooks.cur.finish.call( this );\r\n\t\t\t}\r\n\r\n\t\t\t// look for any active animations, and finish them\r\n\t\t\tfor ( index = timers.length; index--; ) {\r\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\r\n\t\t\t\t\ttimers[ index ].anim.stop( true );\r\n\t\t\t\t\ttimers.splice( index, 1 );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// look for any animations in the old queue and finish them\r\n\t\t\tfor ( index = 0; index < length; index++ ) {\r\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\r\n\t\t\t\t\tqueue[ index ].finish.call( this );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// turn off finishing flag\r\n\t\t\tdelete data.finish;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n// Generate parameters to create a standard animation\r\nfunction genFx( type, includeWidth ) {\r\n\tvar which,\r\n\t\tattrs = { height: type },\r\n\t\ti = 0;\r\n\r\n\t// if we include width, step value is 1 to do all cssExpand values,\r\n\t// if we don't include width, step value is 2 to skip over Left and Right\r\n\tincludeWidth = includeWidth? 1 : 0;\r\n\tfor( ; i < 4 ; i += 2 - includeWidth ) {\r\n\t\twhich = cssExpand[ i ];\r\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\r\n\t}\r\n\r\n\tif ( includeWidth ) {\r\n\t\tattrs.opacity = attrs.width = type;\r\n\t}\r\n\r\n\treturn attrs;\r\n}\r\n\r\n// Generate shortcuts for custom animations\r\njQuery.each({\r\n\tslideDown: genFx(\"show\"),\r\n\tslideUp: genFx(\"hide\"),\r\n\tslideToggle: genFx(\"toggle\"),\r\n\tfadeIn: { opacity: \"show\" },\r\n\tfadeOut: { opacity: \"hide\" },\r\n\tfadeToggle: { opacity: \"toggle\" }\r\n}, function( name, props ) {\r\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\r\n\t\treturn this.animate( props, speed, easing, callback );\r\n\t};\r\n});\r\n\r\njQuery.speed = function( speed, easing, fn ) {\r\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\r\n\t\tcomplete: fn || !fn && easing ||\r\n\t\t\tjQuery.isFunction( speed ) && speed,\r\n\t\tduration: speed,\r\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\r\n\t};\r\n\r\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\r\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\r\n\r\n\t// normalize opt.queue - true/undefined/null -> \"fx\"\r\n\tif ( opt.queue == null || opt.queue === true ) {\r\n\t\topt.queue = \"fx\";\r\n\t}\r\n\r\n\t// Queueing\r\n\topt.old = opt.complete;\r\n\r\n\topt.complete = function() {\r\n\t\tif ( jQuery.isFunction( opt.old ) ) {\r\n\t\t\topt.old.call( this );\r\n\t\t}\r\n\r\n\t\tif ( opt.queue ) {\r\n\t\t\tjQuery.dequeue( this, opt.queue );\r\n\t\t}\r\n\t};\r\n\r\n\treturn opt;\r\n};\r\n\r\njQuery.easing = {\r\n\tlinear: function( p ) {\r\n\t\treturn p;\r\n\t},\r\n\tswing: function( p ) {\r\n\t\treturn 0.5 - Math.cos( p*Math.PI ) / 2;\r\n\t}\r\n};\r\n\r\njQuery.timers = [];\r\njQuery.fx = Tween.prototype.init;\r\njQuery.fx.tick = function() {\r\n\tvar timer,\r\n\t\ttimers = jQuery.timers,\r\n\t\ti = 0;\r\n\r\n\tfxNow = jQuery.now();\r\n\r\n\tfor ( ; i < timers.length; i++ ) {\r\n\t\ttimer = timers[ i ];\r\n\t\t// Checks the timer has not already been removed\r\n\t\tif ( !timer() && timers[ i ] === timer ) {\r\n\t\t\ttimers.splice( i--, 1 );\r\n\t\t}\r\n\t}\r\n\r\n\tif ( !timers.length ) {\r\n\t\tjQuery.fx.stop();\r\n\t}\r\n\tfxNow = undefined;\r\n};\r\n\r\njQuery.fx.timer = function( timer ) {\r\n\tif ( timer() && jQuery.timers.push( timer ) ) {\r\n\t\tjQuery.fx.start();\r\n\t}\r\n};\r\n\r\njQuery.fx.interval = 13;\r\n\r\njQuery.fx.start = function() {\r\n\tif ( !timerId ) {\r\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\r\n\t}\r\n};\r\n\r\njQuery.fx.stop = function() {\r\n\tclearInterval( timerId );\r\n\ttimerId = null;\r\n};\r\n\r\njQuery.fx.speeds = {\r\n\tslow: 600,\r\n\tfast: 200,\r\n\t// Default speed\r\n\t_default: 400\r\n};\r\n\r\n// Back Compat <1.8 extension point\r\njQuery.fx.step = {};\r\n\r\nif ( jQuery.expr && jQuery.expr.filters ) {\r\n\tjQuery.expr.filters.animated = function( elem ) {\r\n\t\treturn jQuery.grep(jQuery.timers, function( fn ) {\r\n\t\t\treturn elem === fn.elem;\r\n\t\t}).length;\r\n\t};\r\n}\r\njQuery.fn.offset = function( options ) {\r\n\tif ( arguments.length ) {\r\n\t\treturn options === undefined ?\r\n\t\t\tthis :\r\n\t\t\tthis.each(function( i ) {\r\n\t\t\t\tjQuery.offset.setOffset( this, options, i );\r\n\t\t\t});\r\n\t}\r\n\r\n\tvar docElem, win,\r\n\t\tbox = { top: 0, left: 0 },\r\n\t\telem = this[ 0 ],\r\n\t\tdoc = elem && elem.ownerDocument;\r\n\r\n\tif ( !doc ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tdocElem = doc.documentElement;\r\n\r\n\t// Make sure it's not a disconnected DOM node\r\n\tif ( !jQuery.contains( docElem, elem ) ) {\r\n\t\treturn box;\r\n\t}\r\n\r\n\t// If we don't have gBCR, just use 0,0 rather than error\r\n\t// BlackBerry 5, iOS 3 (original iPhone)\r\n\tif ( typeof elem.getBoundingClientRect !== core_strundefined ) {\r\n\t\tbox = elem.getBoundingClientRect();\r\n\t}\r\n\t// 解决transform下的offset问题(先恢复)\r\n\t// var el = elem,\r\n\t// offsetLeft = 0,\r\n\t// offsetTop = 0;\r\n\r\n\t// do{\r\n\t// \toffsetLeft += el.offsetLeft;\r\n\t// \toffsetTop += el.offsetTop;\r\n\t// \tel = el.offsetParent;\r\n\t// } while( el );\r\n\r\n\t// var elm = elem;\r\n\t// do{\r\n\t// \toffsetLeft -= elm.scrollLeft || 0;\r\n\t// \toffsetTop -= elm.scrollTop || 0;\r\n\t// \telm = elm.parentNode;\r\n\t// } while( elm );\r\n\twin = getWindow( doc );\r\n\treturn {\r\n\t\ttop: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),\r\n\t\tleft: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )\r\n\t};\r\n};\r\n\r\njQuery.offset = {\r\n\r\n\tsetOffset: function( elem, options, i ) {\r\n\t\tvar position = jQuery.css( elem, \"position\" );\r\n\r\n\t\t// set position first, in-case top/left are set even on static elem\r\n\t\tif ( position === \"static\" ) {\r\n\t\t\telem.style.position = \"relative\";\r\n\t\t}\r\n\r\n\t\tvar curElem = jQuery( elem ),\r\n\t\t\tcurOffset = curElem.offset(),\r\n\t\t\tcurCSSTop = jQuery.css( elem, \"top\" ),\r\n\t\t\tcurCSSLeft = jQuery.css( elem, \"left\" ),\r\n\t\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) && jQuery.inArray(\"auto\", [curCSSTop, curCSSLeft]) > -1,\r\n\t\t\tprops = {}, curPosition = {}, curTop, curLeft;\r\n\r\n\t\t// need to be able to calculate position if either top or left is auto and position is either absolute or fixed\r\n\t\tif ( calculatePosition ) {\r\n\t\t\tcurPosition = curElem.position();\r\n\t\t\tcurTop = curPosition.top;\r\n\t\t\tcurLeft = curPosition.left;\r\n\t\t} else {\r\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\r\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\r\n\t\t}\r\n\r\n\t\tif ( jQuery.isFunction( options ) ) {\r\n\t\t\toptions = options.call( elem, i, curOffset );\r\n\t\t}\r\n\r\n\t\tif ( options.top != null ) {\r\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\r\n\t\t}\r\n\t\tif ( options.left != null ) {\r\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\r\n\t\t}\r\n\r\n\t\tif ( \"using\" in options ) {\r\n\t\t\toptions.using.call( elem, props );\r\n\t\t} else {\r\n\t\t\tcurElem.css( props );\r\n\t\t}\r\n\t}\r\n};\r\n\r\n\r\njQuery.fn.extend({\r\n\r\n\tposition: function() {\r\n\t\tif ( !this[ 0 ] ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar offsetParent, offset,\r\n\t\t\tparentOffset = { top: 0, left: 0 },\r\n\t\t\telem = this[ 0 ];\r\n\r\n\t\t// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent\r\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\r\n\t\t\t// we assume that getBoundingClientRect is available when computed position is fixed\r\n\t\t\toffset = elem.getBoundingClientRect();\r\n\t\t} else {\r\n\t\t\t// Get *real* offsetParent\r\n\t\t\toffsetParent = this.offsetParent();\r\n\r\n\t\t\t// Get correct offsets\r\n\t\t\toffset = this.offset();\r\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\r\n\t\t\t\tparentOffset = offsetParent.offset();\r\n\t\t\t}\r\n\r\n\t\t\t// Add offsetParent borders\r\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\r\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\r\n\t\t}\r\n\r\n\t\t// Subtract parent offsets and element margins\r\n\t\t// note: when an element has margin: auto the offsetLeft and marginLeft\r\n\t\t// are the same in Safari causing offset.left to incorrectly be 0\r\n\t\treturn {\r\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\r\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true)\r\n\t\t};\r\n\t},\r\n\r\n\toffsetParent: function() {\r\n\t\treturn this.map(function() {\r\n\t\t\tvar offsetParent = this.offsetParent || document.documentElement;\r\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\") === \"static\" ) ) {\r\n\t\t\t\toffsetParent = offsetParent.offsetParent;\r\n\t\t\t}\r\n\t\t\treturn offsetParent || document.documentElement;\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\r\n// Create scrollLeft and scrollTop methods\r\njQuery.each( {scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\"}, function( method, prop ) {\r\n\tvar top = /Y/.test( prop );\r\n\r\n\tjQuery.fn[ method ] = function( val ) {\r\n\t\treturn jQuery.access( this, function( elem, method, val ) {\r\n\t\t\tvar win = getWindow( elem );\r\n\r\n\t\t\tif ( val === undefined ) {\r\n\t\t\t\treturn win ? (prop in win) ? win[ prop ] :\r\n\t\t\t\t\twin.document.documentElement[ method ] :\r\n\t\t\t\t\telem[ method ];\r\n\t\t\t}\r\n\r\n\t\t\tif ( win ) {\r\n\t\t\t\twin.scrollTo(\r\n\t\t\t\t\t!top ? val : jQuery( win ).scrollLeft(),\r\n\t\t\t\t\ttop ? val : jQuery( win ).scrollTop()\r\n\t\t\t\t);\r\n\r\n\t\t\t} else {\r\n\t\t\t\telem[ method ] = val;\r\n\t\t\t}\r\n\t\t}, method, val, arguments.length, null );\r\n\t};\r\n});\r\n\r\nfunction getWindow( elem ) {\r\n\treturn jQuery.isWindow( elem ) ?\r\n\t\telem :\r\n\t\telem.nodeType === 9 ?\r\n\t\t\telem.defaultView || elem.parentWindow :\r\n\t\t\tfalse;\r\n}\r\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\r\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\r\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\r\n\t\t// margin is only for outerHeight, outerWidth\r\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\r\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\r\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\r\n\r\n\t\t\treturn jQuery.access( this, function( elem, type, value ) {\r\n\t\t\t\tvar doc;\r\n\r\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\r\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\r\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\r\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\r\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Get document width or height\r\n\t\t\t\tif ( elem.nodeType === 9 ) {\r\n\t\t\t\t\tdoc = elem.documentElement;\r\n\r\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest\r\n\t\t\t\t\t// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.\r\n\t\t\t\t\treturn Math.max(\r\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\r\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\r\n\t\t\t\t\t\tdoc[ \"client\" + name ]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn value === undefined ?\r\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\r\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\r\n\r\n\t\t\t\t\t// Set width or height on the element\r\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\r\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\r\n\t\t};\r\n\t});\r\n});\r\n// Limit scope pollution from any deprecated API\r\n// (function() {\r\n\r\n// })();\r\n// Expose jQuery to the global object\r\nBI.jQuery = BI.$ = jQuery;\r\nwindow.$ = window.$ || jQuery;\r\nwindow.jQuery = window.jQuery || jQuery;\r\n\r\n// Expose jQuery as an AMD module, but only for AMD loaders that\r\n// understand the issues with loading multiple versions of jQuery\r\n// in a page that all might call define(). The loader will indicate\r\n// they have special allowances for multiple jQuery versions by\r\n// specifying define.amd.jQuery = true. Register as a named module,\r\n// since jQuery can be concatenated with other files that may use define,\r\n// but not use a proper concatenation script that understands anonymous\r\n// AMD modules. A named AMD is safest and most robust way to register.\r\n// Lowercase jquery is used because AMD module names are derived from\r\n// file names, and jQuery is normally delivered in a lowercase file name.\r\n// Do this after creating the global so that if an AMD module wants to call\r\n// noConflict to hide this version of jQuery, it will work.\r\nif ( typeof define === \"function\" && define.amd && define.amd.jQuery ) {\r\n\tdefine( \"jquery\", [], function () { return jQuery; } );\r\n}\r\n\r\n})( window );/*\r\n * 给jQuery.Event对象添加的工具方法\r\n */\r\nBI.$.extend(BI.$.Event.prototype, {\r\n // event.stopEvent\r\n stopEvent: function () {\r\n this.stopPropagation();\r\n this.preventDefault();\r\n }\r\n});if (BI.jQuery) {\r\n (function ($) {\r\n // richer:容器在其各个边缘留出的空间\r\n if (!$.fn.insets) {\r\n $.fn.insets = function () {\r\n var p = this.padding(),\r\n b = this.border();\r\n return {\r\n top: p.top,\r\n bottom: p.bottom + b.bottom + b.top,\r\n left: p.left,\r\n right: p.right + b.right + b.left\r\n };\r\n };\r\n }\r\n\r\n // richer:获取 && 设置jQuery元素的边界\r\n if (!$.fn.bounds) {\r\n $.fn.bounds = function (value) {\r\n var tmp = {hasIgnoredBounds: true};\r\n\r\n if (value) {\r\n if (!isNaN(value.x)) {\r\n tmp.left = value.x;\r\n }\r\n if (!isNaN(value.y)) {\r\n tmp.top = value.y;\r\n }\r\n if (value.width != null) {\r\n tmp.width = (value.width - (this.outerWidth(true) - this.width()));\r\n tmp.width = (tmp.width >= 0) ? tmp.width : value.width;\r\n // fix chrome\r\n // tmp.width = (tmp.width >= 0) ? tmp.width : 0;\r\n }\r\n if (value.height != null) {\r\n tmp.height = value.height - (this.outerHeight(true) - this.height());\r\n tmp.height = (tmp.height >= 0) ? tmp.height : value.height;\r\n // fix chrome\r\n // tmp.height = (tmp.height >= 0) ? tmp.height : value.0;\r\n }\r\n this.css(tmp);\r\n return this;\r\n }\r\n\r\n // richer:注意此方法只对可见元素有效\r\n tmp = this.position();\r\n return {\r\n x: tmp.left,\r\n y: tmp.top,\r\n // richer:这里计算外部宽度和高度的时候,都不包括边框\r\n width: this.outerWidth(),\r\n height: this.outerHeight()\r\n };\r\n\r\n };\r\n }\r\n })(BI.jQuery);\r\n\r\n BI.extend(BI.jQuery.fn, {\r\n\r\n destroy: function () {\r\n this.remove();\r\n if (BI.isIE() === true) {\r\n this[0].outerHTML = \"\";\r\n }\r\n },\r\n /**\r\n * 高亮显示\r\n * @param text 必需\r\n * @param keyword\r\n * @param py\r\n * @returns {*}\r\n * @private\r\n * 原理:\r\n * 1、得到text的拼音py, 分别看是否匹配关键字keyword, 得到匹配索引tidx和pidx\r\n * 2、比较tidx和pidx, 取大于-1且较小的索引,标红[索引,索引 + keyword.length - 1]的文本\r\n * 3、text和py各自取tidx/pidx + keyword.length索引开始的子串作为新的text和py, 重复1, 直到text和py有一个为\"\"\r\n */\r\n __textKeywordMarked__: function (text, keyword, py) {\r\n if (!BI.isKey(keyword) || (text + \"\").length > 100) {\r\n return this.html(BI.htmlEncode(text));\r\n }\r\n keyword = keyword + \"\";\r\n keyword = BI.toUpperCase(keyword);\r\n var textLeft = (text || \"\") + \"\";\r\n py = (py || BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n })) + \"\";\r\n py = BI.toUpperCase(py);\r\n this.empty();\r\n // BI-48487 性能: makeFirstPY出来的py中包含多音字是必要的,但虽然此方法中做了限制。但是对于一个长度为60,包含14个多音字的字符串\r\n // 获取的的py长度将达到1966080, 远超过text的长度,到后面都是在做\"\".substring的无用功,所以此循环应保证py和textLeft长度不为0\r\n while (py.length > 0 && textLeft.length > 0) {\r\n var tidx = BI.toUpperCase(textLeft).indexOf(keyword);\r\n var pidx = py.indexOf(keyword);\r\n if (pidx >= 0) {\r\n pidx = (pidx - Math.floor(pidx / (textLeft.length + 1))) % textLeft.length;\r\n }\r\n\r\n // BI-56945 场景: 对'啊a'标红, a为keyword, 此时tidx为1, pidx为0, 此时使用tidx显然'啊'就无法标红了\r\n if (tidx >= 0 && (pidx > tidx || pidx === -1)) {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, tidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(tidx, keyword.length))));\r\n\r\n textLeft = textLeft.substr(tidx + keyword.length);\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(tidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n } else if (pidx >= 0) {\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft.substr(0, pidx)));\r\n this.append(BI.$(\"<span>\").addClass(\"bi-keyword-red-mark\")\r\n .html(BI.htmlEncode(textLeft.substr(pidx, keyword.length))));\r\n if (BI.isNotEmptyString(py)) {\r\n // 每一组拼音都应该前进,而不是只是当前的\r\n py = BI.map(py.split(\"\\u200b\"), function (idx, ps) {\r\n return ps.slice(pidx + keyword.length);\r\n }).join(\"\\u200b\");\r\n }\r\n textLeft = textLeft.substr(pidx + keyword.length);\r\n } else {\r\n // 标红的text未encode\r\n this.append(BI.htmlEncode(textLeft));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n getDomHeight: function (parent) {\r\n var clone = BI.$(this).clone();\r\n clone.appendTo(BI.$(parent || \"body\"));\r\n var height = clone.height();\r\n clone.remove();\r\n return height;\r\n },\r\n\r\n // 是否有竖直滚动条\r\n hasVerticalScroll: function () {\r\n return this.height() > 0 && this[0].clientWidth < this[0].offsetWidth;\r\n },\r\n\r\n // 是否有水平滚动条\r\n hasHorizonScroll: function () {\r\n return this.width() > 0 && this[0].clientHeight < this[0].offsetHeight;\r\n },\r\n\r\n // 获取计算后的样式\r\n getStyle: function (name) {\r\n var node = this[0];\r\n var computedStyle = void 0;\r\n\r\n // W3C Standard\r\n if (_global.getComputedStyle) {\r\n // In certain cases such as within an iframe in FF3, this returns null.\r\n computedStyle = _global.getComputedStyle(node, null);\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n }\r\n // Safari\r\n if (document.defaultView && document.defaultView.getComputedStyle) {\r\n computedStyle = document.defaultView.getComputedStyle(node, null);\r\n // A Safari bug causes this to return null for `display: none` elements.\r\n if (computedStyle) {\r\n return computedStyle.getPropertyValue(BI.hyphenate(name));\r\n }\r\n if (name === \"display\") {\r\n return \"none\";\r\n }\r\n }\r\n // Internet Explorer\r\n if (node.currentStyle) {\r\n if (name === \"float\") {\r\n return node.currentStyle.cssFloat || node.currentStyle.styleFloat;\r\n }\r\n return node.currentStyle[BI.camelize(name)];\r\n }\r\n return node.style && node.style[BI.camelize(name)];\r\n },\r\n\r\n __isMouseInBounds__: function (e) {\r\n var offset2Body = this.get(0).getBoundingClientRect ? this.get(0).getBoundingClientRect() : this.offset();\r\n var width = offset2Body.width || this.outerWidth();\r\n var height = offset2Body.height || this.outerHeight();\r\n // offset2Body.left的值可能会有小数,导致某点出现false\r\n return !(e.pageX < Math.floor(offset2Body.left) || e.pageX > offset2Body.left + width\r\n || e.pageY < Math.floor(offset2Body.top) || e.pageY > offset2Body.top + height);\r\n },\r\n\r\n __hasZIndexMask__: function (zindex) {\r\n return zindex && this.zIndexMask[zindex] != null;\r\n },\r\n\r\n __buildZIndexMask__: function (zindex, domArray) {\r\n this.zIndexMask = this.zIndexMask || {};// 存储z-index的mask\r\n this.indexMask = this.indexMask || [];// 存储mask\r\n var mask = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-z-index-mask\",\r\n items: domArray\r\n });\r\n\r\n mask.element.css({\"z-index\": zindex});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.indexMask.push(mask);\r\n zindex && (this.zIndexMask[zindex] = mask);\r\n return mask.element;\r\n },\r\n\r\n __releaseZIndexMask__: function (zindex) {\r\n if (zindex && this.zIndexMask[zindex]) {\r\n BI.remove(this.indexMask, this.zIndexMask[zindex]);\r\n this.zIndexMask[zindex].destroy();\r\n return;\r\n }\r\n this.indexMask = this.indexMask || [];\r\n var indexMask = this.indexMask.pop();\r\n indexMask && indexMask.destroy();\r\n }\r\n });\r\n}\r\n_.extend(BI, {\r\n $import: function () {\r\n var _LOADED = {}; // alex:保存加载过的\r\n function loadReady (src, must) {\r\n var $scripts = BI.$(\"head script, body script\");\r\n BI.$.each($scripts, function (i, item) {\r\n if (item.src.indexOf(src) != -1) {\r\n _LOADED[src] = true;\r\n }\r\n });\r\n var $links = BI.$(\"head link\");\r\n BI.$.each($links, function (i, item) {\r\n if (item.href.indexOf(src) != -1 && must) {\r\n _LOADED[src] = false;\r\n BI.$(item).remove();\r\n }\r\n });\r\n }\r\n\r\n // must=true 强行加载\r\n return function (src, ext, must) {\r\n loadReady(src, must);\r\n // alex:如果已经加载过了的,直接return\r\n if (_LOADED[src] === true) {\r\n return;\r\n }\r\n if (ext === \"css\") {\r\n var link = document.createElement(\"link\");\r\n link.rel = \"stylesheet\";\r\n link.type = \"text/css\";\r\n link.href = src;\r\n var head = document.getElementsByTagName(\"head\")[0];\r\n head.appendChild(link);\r\n _LOADED[src] = true;\r\n } else {\r\n // alex:这里用同步调用的方式,必须等待ajax完成\r\n BI.$.ajax({\r\n url: src,\r\n dataType: \"script\", // alex:指定dataType为script,jquery会帮忙做globalEval的事情\r\n async: false,\r\n cache: true,\r\n complete: function (res, status) {\r\n /*\r\n * alex:发现jquery会很智能地判断一下返回的数据类型是不是script,然后做一个globalEval\r\n * 所以当status为success时就不需要再把其中的内容加到script里面去了\r\n */\r\n if (status == \"success\") {\r\n _LOADED[src] = true;\r\n }\r\n }\r\n });\r\n }\r\n };\r\n }()\r\n});if (!Number.prototype.toFixed || (0.00008).toFixed(3) !== \"0.000\" ||\r\n (0.9).toFixed(0) === \"0\" || (1.255).toFixed(2) !== \"1.25\" ||\r\n (1000000000000000128).toFixed(0) !== \"1000000000000000128\") {\r\n (function () {\r\n var base, size, data, i;\r\n base = 1e7;\r\n size = 6;\r\n data = [0, 0, 0, 0, 0, 0];\r\n function multiply (n, c) {\r\n var i = -1;\r\n while (++i < size) {\r\n c += n * data[i];\r\n data[i] = c % base;\r\n c = Math.floor(c / base);\r\n }\r\n }\r\n\r\n function divide (n) {\r\n var i = size, c = 0;\r\n while (--i >= 0) {\r\n c += data[i];\r\n data[i] = Math.floor(c / n);\r\n c = (c % n) * base;\r\n }\r\n }\r\n\r\n function toString () {\r\n var i = size;\r\n var s = \"\";\r\n while (--i >= 0) {\r\n if (s !== \"\" || i === 0 || data[i] !== 0) {\r\n var t = String(data[i]);\r\n if (s === \"\") {\r\n s = t;\r\n } else {\r\n s += \"0000000\".slice(0, 7 - t.length) + t;\r\n }\r\n }\r\n }\r\n return s;\r\n }\r\n\r\n function pow (x, n, acc) {\r\n return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x)\r\n : pow(x * x, n / 2, acc)));\r\n }\r\n\r\n function log (x) {\r\n var n = 0;\r\n while (x >= 4096) {\r\n n += 12;\r\n x /= 4096;\r\n }\r\n while (x >= 2) {\r\n n += 1;\r\n x /= 2;\r\n }\r\n return n;\r\n }\r\n\r\n Number.prototype.toFixed = function (fractionDigits) {\r\n var f, x, s, m, e, z, j, k;\r\n f = Number(fractionDigits);\r\n f = f !== f ? 0 : Math.floor(f);\r\n\r\n if (f < 0 || f > 20) {\r\n throw new RangeError(\"Number.toFixed called with invalid number of decimals\");\r\n }\r\n\r\n x = Number(this);\r\n\r\n if (x !== x) {\r\n return \"NaN\";\r\n }\r\n\r\n if (x <= -1e21 || x > 1e21) {\r\n return String(x);\r\n }\r\n\r\n s = \"\";\r\n\r\n if (x < 0) {\r\n s = \"-\";\r\n x = -x;\r\n }\r\n\r\n m = \"0\";\r\n\r\n if (x > 1e-21) {\r\n // 1e-21<x<1e21\r\n // -70<log2(x)<70\r\n e = log(x * pow(2, 69, 1)) - 69;\r\n z = (e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1));\r\n z *= 0x10000000000000;// Math.pow(2,52);\r\n e = 52 - e;\r\n\r\n // -18<e<122\r\n // x=z/2^e\r\n if (e > 0) {\r\n multiply(0, z);\r\n j = f;\r\n\r\n while (j >= 7) {\r\n multiply(1e7, 0);\r\n j -= 7;\r\n }\r\n\r\n multiply(pow(10, j, 1), 0);\r\n j = e - 1;\r\n\r\n while (j >= 23) {\r\n divide(1 << 23);\r\n j -= 23;\r\n }\r\n divide(1 << j);\r\n multiply(1, 1);\r\n divide(2);\r\n m = toString();\r\n } else {\r\n multiply(0, z);\r\n multiply(1 << (-e), 0);\r\n m = toString() + \"0.00000000000000000000\".slice(2, 2 + f);\r\n }\r\n }\r\n\r\n if (f > 0) {\r\n k = m.length;\r\n\r\n if (k <= f) {\r\n m = s + \"0.0000000000000000000\".slice(0, f - k + 2) + m;\r\n } else {\r\n m = s + m.slice(0, k - f) + \".\" + m.slice(k - f);\r\n }\r\n } else {\r\n m = s + m;\r\n }\r\n\r\n return m;\r\n };\r\n\r\n })();\r\n}/**\r\n * 常量\r\n */\r\n\r\n_.extend(BI, {\r\n MAX: 0xfffffffffffffff,\r\n MIN: -0xfffffffffffffff,\r\n EVENT_RESPONSE_TIME: 200,\r\n zIndex_layer: 1e5,\r\n zIndex_popover: 1e6,\r\n zIndex_popup: 1e7,\r\n zIndex_masker: 1e8,\r\n zIndex_tip: 1e9,\r\n emptyStr: \"\",\r\n emptyFn: function () {\r\n },\r\n empty: null,\r\n Key: {\r\n 48: \"0\",\r\n 49: \"1\",\r\n 50: \"2\",\r\n 51: \"3\",\r\n 52: \"4\",\r\n 53: \"5\",\r\n 54: \"6\",\r\n 55: \"7\",\r\n 56: \"8\",\r\n 57: \"9\",\r\n 65: \"a\",\r\n 66: \"b\",\r\n 67: \"c\",\r\n 68: \"d\",\r\n 69: \"e\",\r\n 70: \"f\",\r\n 71: \"g\",\r\n 72: \"h\",\r\n 73: \"i\",\r\n 74: \"j\",\r\n 75: \"k\",\r\n 76: \"l\",\r\n 77: \"m\",\r\n 78: \"n\",\r\n 79: \"o\",\r\n 80: \"p\",\r\n 81: \"q\",\r\n 82: \"r\",\r\n 83: \"s\",\r\n 84: \"t\",\r\n 85: \"u\",\r\n 86: \"v\",\r\n 87: \"w\",\r\n 88: \"x\",\r\n 89: \"y\",\r\n 90: \"z\",\r\n 96: \"0\",\r\n 97: \"1\",\r\n 98: \"2\",\r\n 99: \"3\",\r\n 100: \"4\",\r\n 101: \"5\",\r\n 102: \"6\",\r\n 103: \"7\",\r\n 104: \"8\",\r\n 105: \"9\",\r\n 106: \"*\",\r\n 107: \"+\",\r\n 109: \"-\",\r\n 110: \".\",\r\n 111: \"/\"\r\n },\r\n KeyCode: {\r\n BACKSPACE: 8,\r\n COMMA: 188,\r\n DELETE: 46,\r\n DOWN: 40,\r\n END: 35,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n HOME: 36,\r\n LEFT: 37,\r\n NUMPAD_ADD: 107,\r\n NUMPAD_DECIMAL: 110,\r\n NUMPAD_DIVIDE: 111,\r\n NUMPAD_ENTER: 108,\r\n NUMPAD_MULTIPLY: 106,\r\n NUMPAD_SUBTRACT: 109,\r\n PAGE_DOWN: 34,\r\n PAGE_UP: 33,\r\n PERIOD: 190,\r\n RIGHT: 39,\r\n SPACE: 32,\r\n TAB: 9,\r\n UP: 38\r\n },\r\n Status: {\r\n SUCCESS: 1,\r\n WRONG: 2,\r\n START: 3,\r\n END: 4,\r\n WAITING: 5,\r\n READY: 6,\r\n RUNNING: 7,\r\n OUTOFBOUNDS: 8,\r\n NULL: -1\r\n },\r\n Direction: {\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Left: \"left\",\r\n Right: \"right\",\r\n Custom: \"custom\"\r\n },\r\n Axis: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\"\r\n },\r\n Selection: {\r\n Default: -2,\r\n None: -1,\r\n Single: 0,\r\n Multi: 1,\r\n All: 2\r\n },\r\n HorizontalAlign: {\r\n Left: \"left\",\r\n Right: \"right\",\r\n Center: \"center\",\r\n Stretch: \"stretch\"\r\n },\r\n VerticalAlign: {\r\n Middle: \"middle\",\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Stretch: \"stretch\"\r\n },\r\n StartOfWeek: 1\r\n});BI.version = \"2.0\";/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-center-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_center_adapt\", BI.AbsoluteCenterLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-horizontal-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0),\r\n right: o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.vgap || 0) + (item.tgap || 0) !== 0) {\r\n w.element.css(\"top\", o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0));\r\n }\r\n if (o.vgap + o.bgap + (item.vgap || 0) + (item.bgap || 0) !== 0) {\r\n w.element.css(\"bottom\", o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_horizontal_adapt\", BI.AbsoluteHorizontalLayout);/**\r\n * absolute实现的居中布局\r\n * @class BI.AbsoluteVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-vertical-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.AbsoluteVerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: item.lgap,\r\n right: item.rgap,\r\n top: o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),\r\n bottom: o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0),\r\n margin: \"auto\"\r\n });\r\n if (o.hgap + o.lgap + (item.hgap || 0) + (item.lgap || 0) !== 0) {\r\n w.element.css(\"left\", o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0));\r\n }\r\n if (o.hgap + o.rgap + (item.hgap || 0) + (item.rgap || 0) !== 0) {\r\n w.element.css(\"right\", o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0));\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"absolute_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute_vertical_adapt\", BI.AbsoluteVerticalLayout);/**\r\n * 自适应水平和垂直方向都居中容器\r\n * @class BI.CenterAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.CenterAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center_adapt\", BI.CenterAdaptLayout);/**\r\n * 水平方向居中容器\r\n * @class BI.HorizontalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_adapt\", BI.HorizontalAdaptLayout);/**\r\n * 左右分离,垂直方向居中容器\r\n * items:{\r\n left: [{el:{type:\"bi.button\"}}],\r\n right:[{el:{type:\"bi.button\"}}]\r\n }\r\n * @class BI.LeftRightVerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.LeftRightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-right-vertical-adapt-layout\",\r\n items: {},\r\n llgap: 0,\r\n lrgap: 0,\r\n lhgap: 0,\r\n rlgap: 0,\r\n rrgap: 0,\r\n rhgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftRightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var layoutArray = [];\r\n if (\"left\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.left,\r\n hgap: o.lhgap,\r\n lgap: o.llgap,\r\n rgap: o.lrgap\r\n }\r\n }]\r\n });\r\n }\r\n if (\"right\" in o.items) {\r\n layoutArray.push({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items.right,\r\n textAlign: \"right\",\r\n hgap: o.rhgap,\r\n lgap: o.rlgap,\r\n rgap: o.rrgap\r\n }\r\n }]\r\n });\r\n }\r\n return layoutArray;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_right_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.LeftRightVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left_right_vertical_adapt\", BI.LeftRightVerticalAdaptLayout);\r\n\r\n\r\nBI.LeftVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LeftRightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-left-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.LeftVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"left_vertical_adapt布局不需要resize\");\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.left_vertical_adapt\", BI.LeftVerticalAdaptLayout);\r\n\r\nBI.RightVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.RightVerticalAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-right-vertical-adapt-layout\",\r\n items: [],\r\n lgap: 0,\r\n rgap: 0,\r\n hgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options, self = this;\r\n BI.RightVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.right\",\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n height: \"100%\",\r\n textAlign: \"right\",\r\n items: o.items,\r\n lgap: o.lgap,\r\n hgap: o.hgap,\r\n rgap: o.rgap\r\n }\r\n }]\r\n };\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.right_vertical_adapt\", BI.RightVerticalAdaptLayout);/**\r\n * 使用display:table和display:table-cell实现的horizontal布局\r\n * @class BI.TableAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableAdaptLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableAdaptLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-center-adapt-layout\",\r\n columnSize: [],\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.TableAdaptLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<div>\").css({\r\n position: \"relative\",\r\n display: \"table\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: o.horizontalAlign === BI.HorizontalAlign.Center ? \"100%\" : \"auto\",\r\n \"white-space\": \"nowrap\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n width: width,\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.width(width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n display: \"table-cell\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n height: \"100%\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table_adapt\", BI.TableAdaptLayout);/**\r\n * 垂直方向居中容器\r\n * @class BI.VerticalAdaptLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n props: {\r\n baseCls: \"bi-vertical-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n BI.VerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n return {\r\n type: \"bi.horizontal\",\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n items: o.items,\r\n scrollx: o.scrollx,\r\n ref: function (_ref) {\r\n self.layout = _ref;\r\n },\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n this.layout.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_adapt\", BI.VerticalAdaptLayout);/**\r\n * 水平方向居中自适应容器\r\n * @class BI.HorizontalAutoLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalAutoLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalAutoLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizon-auto-layout\",\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.HorizontalAutoLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalAutoLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n margin: \"0px auto\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_auto\", BI.HorizontalAutoLayout);/**\r\n * 浮动的水平居中布局\r\n */\r\nBI.FloatHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-horizontal-adapt-layout\",\r\n items: [],\r\n hgap: 0,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatHorizontalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"float_horizontal_adapt布局不需要resize\");\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var width = this.left.element.width(),\r\n height = this.left.element.height();\r\n this.left.element.width(width).height(height).css(\"float\", \"none\");\r\n BI.remove(this._children, function (i, wi) {\r\n if (wi === self.container) {\r\n delete self._children[i];\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var self = this, o = this.options;\r\n this.left = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [item],\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap\r\n });\r\n\r\n this.container = BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this.left]\r\n });\r\n\r\n return this.left;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalAutoLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_float\", BI.FloatHorizontalLayout);/**\r\n * 内联布局\r\n * @class BI.InlineCenterAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineCenterAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineCenterAdaptLayout.superclass.render.apply(this, arguments);\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"center\"\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item, length) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-center-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n throw new Error(\"不能添加元素\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n self._addElement(i, item, items.length);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineCenterAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_center_adapt\", BI.InlineCenterAdaptLayout);/**\r\n * 内联布局\r\n * @class BI.InlineVerticalAdaptLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineVerticalAdaptLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-vertical-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineVerticalAdaptLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n whiteSpace: \"nowrap\",\r\n textAlign: o.textAlign\r\n });\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineVerticalAdaptLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\"\r\n });\r\n w.element.addClass(\"inline-vertical-adapt-item\");\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineVerticalAdaptLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline_vertical_adapt\", BI.InlineVerticalAdaptLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-center-adapt-layout\",\r\n hgap: 0,\r\n vgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexCenterLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_center_adapt\", BI.FlexCenterLayout);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-center-adapt-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal_adapt\", BI.FlexHorizontalCenter);\r\nBI.shortcut(\"bi.flex_horizontal_center_adapt\", BI.FlexHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_horizontal\", BI.FlexHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-center-adapt-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n hgap: o.hgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical_center_adapt布局不需要resize\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical_adapt\", BI.FlexVerticalCenter);\r\nBI.shortcut(\"bi.flex_vertical_center_adapt\", BI.FlexVerticalCenter);/**\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-vertical-layout\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.element.addClass(\"h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments);\r\n var o = this.options;\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_vertical\", BI.FlexVerticalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-center-adapt-layout clearfix\",\r\n scrollable: true\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperCenterLayout.superclass.render.apply(this, arguments);\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-center-adapt-layout-wrapper\");\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperCenterLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + \"px\",\r\n \"margin-right\": o.hgap + \"px\",\r\n \"margin-top\": o.vgap + \"px\",\r\n \"margin-bottom\": o.vgap + \"px\"\r\n });\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_center_adapt布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperCenterLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_center_adapt\", BI.FlexWrapperCenterLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: true,\r\n scrolly: false,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_vertical\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n horizontalAlign: BI.HorizontalAlign.Center,\r\n verticalAlign: o.verticalAlign,\r\n rowSize: o.rowSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_adapt\", BI.FlexWrapperHorizontalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_horizontal_center_adapt\", BI.FlexWrapperHorizontalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexHorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperHorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-horizontal-layout clearfix\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollable: null,\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperHorizontalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-horizontal-layout-wrapper v-\" + o.verticalAlign).addClass(\"h-\" + o.horizontalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.columnSize[i] > 0) {\r\n w.element.width(o.columnSize[i]);\r\n }\r\n if (o.columnSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_horizontal布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperHorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_horizontal\", BI.FlexWrapperHorizontalLayout);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexVerticalCenter\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-center-adapt-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: false,\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.flex_scrollable_horizontal\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n verticalAlign: BI.VerticalAlign.Middle,\r\n horizontalAlign: o.horizontalAlign,\r\n columnSize: o.columnSize,\r\n scrollx: o.scrollx,\r\n scrolly: o.scrolly,\r\n scrollable: o.scrollable,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n items: o.items\r\n };\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate(items);\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical_adapt\", BI.FlexWrapperVerticalCenter);\r\nBI.shortcut(\"bi.flex_scrollable_vertical_center_adapt\", BI.FlexWrapperVerticalCenter);/**\r\n *自适应水平和垂直方向都居中容器\r\n * Created by GUY on 2016/12/2.\r\n *\r\n * @class BI.FlexWrapperVerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FlexWrapperVerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-flex-scrollable-vertical-layout clearfix\",\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n verticalAlign: BI.VerticalAlign.Top,\r\n rowSize: [],\r\n scrollable: null,\r\n scrolly: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FlexWrapperVerticalLayout.superclass.render.apply(this, arguments);\r\n var o = this.options;\r\n this.$wrapper = BI.Widget._renderEngine.createElement(\"<div>\").addClass(\"flex-scrollable-vertical-layout-wrapper h-\" + o.horizontalAlign).addClass(\"v-\" + o.verticalAlign);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\",\r\n \"flex-shrink\": \"0\"\r\n });\r\n if (o.rowSize[i] > 0) {\r\n w.element.height(o.rowSize[i]);\r\n }\r\n if (o.rowSize[i] === \"fill\") {\r\n w.element.css(\"flex\", \"1\");\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$wrapper.append(frag);\r\n this.element.append(this.$wrapper);\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$wrapper;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"flex_wrapper_vertical布局不需要resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.FlexWrapperVerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.flex_scrollable_vertical\", BI.FlexWrapperVerticalLayout);/**\r\n * 固定子组件上下左右的布局容器\r\n * @class BI.AbsoluteLayout\r\n * @extends BI.Layout\r\n */\r\nBI.AbsoluteLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AbsoluteLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-absolute-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AbsoluteLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AbsoluteLayout.superclass._addElement.apply(this, arguments);\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n left += item.left;\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n right += item.right;\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n top += item.top;\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n bottom += item.bottom;\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({left: left});\r\n right += o.hgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({top: top});\r\n bottom += o.vgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({left: left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({right: right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({top: top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({bottom: bottom});\r\n }\r\n\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n w.element.css({position: \"absolute\"});\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n stroke: function (items) {\r\n this.options.items = items || [];\r\n var self = this;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!BI.isWidget(item) && !item.el) {\r\n throw new Error(\"el must be exist\");\r\n }\r\n self._addElement(i, item);\r\n }\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.absolute\", BI.AbsoluteLayout);BI.AdaptiveLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.AdaptiveLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-adaptive-layout\",\r\n hgap: null,\r\n vgap: null,\r\n lgap: null,\r\n rgap: null,\r\n tgap: null,\r\n bgap: null\r\n });\r\n },\r\n render: function () {\r\n BI.AdaptiveLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.AdaptiveLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\"});\r\n var left = 0, right = 0, top = 0, bottom = 0;\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({\r\n left: item.left\r\n });\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({\r\n right: item.right\r\n });\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({\r\n top: item.top\r\n });\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({\r\n bottom: item.bottom\r\n });\r\n }\r\n\r\n if (BI.isNotNull(o.hgap)) {\r\n left += o.hgap;\r\n w.element.css({\"margin-left\": left});\r\n right += o.hgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.vgap)) {\r\n top += o.vgap;\r\n w.element.css({\"margin-top\": top});\r\n bottom += o.vgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(o.lgap)) {\r\n left += o.lgap;\r\n w.element.css({\"margin-left\": left});\r\n }\r\n if (BI.isNotNull(o.rgap)) {\r\n right += o.rgap;\r\n w.element.css({\"margin-right\": right});\r\n }\r\n if (BI.isNotNull(o.tgap)) {\r\n top += o.tgap;\r\n w.element.css({\"margin-top\": top});\r\n }\r\n if (BI.isNotNull(o.bgap)) {\r\n bottom += o.bgap;\r\n w.element.css({\"margin-bottom\": bottom});\r\n }\r\n\r\n if (BI.isNotNull(item.width)) {\r\n w.element.css({width: item.width});\r\n }\r\n if (BI.isNotNull(item.height)) {\r\n w.element.css({height: item.height});\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.AbsoluteLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.adaptive\", BI.AdaptiveLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.BorderLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.BorderLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-border-layout\",\r\n items: {}\r\n });\r\n },\r\n render: function () {\r\n BI.BorderLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (regions) {\r\n var item;\r\n var top = 0;\r\n var bottom = 0;\r\n var left = 0;\r\n var right = 0;\r\n if (\"north\" in regions) {\r\n item = regions[\"north\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"north\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"north\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"north\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n top: (item.top || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n bottom: \"initial\"\r\n });\r\n }\r\n top = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"south\" in regions) {\r\n item = regions[\"south\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"south\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"south\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"south\").element.height(item.height)\r\n .css({\r\n position: \"absolute\",\r\n bottom: (item.bottom || 0),\r\n left: (item.left || 0),\r\n right: (item.right || 0),\r\n top: \"initial\"\r\n });\r\n }\r\n bottom = (item.height || 0) + (item.top || 0) + (item.bottom || 0);\r\n }\r\n }\r\n if (\"west\" in regions) {\r\n item = regions[\"west\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"west\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"west\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"west\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n left: (item.left || 0),\r\n top: top,\r\n bottom: bottom,\r\n right: \"initial\"\r\n });\r\n }\r\n left = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"east\" in regions) {\r\n item = regions[\"east\"];\r\n if (item != null) {\r\n if (item.el) {\r\n if (!this.hasWidget(this.getName() + \"east\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"east\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"east\").element.width(item.width)\r\n .css({\r\n position: \"absolute\",\r\n right: (item.right || 0),\r\n top: top,\r\n bottom: bottom,\r\n left: \"initial\"\r\n });\r\n }\r\n right = (item.width || 0) + (item.left || 0) + (item.right || 0);\r\n }\r\n }\r\n if (\"center\" in regions) {\r\n item = regions[\"center\"];\r\n if (item != null) {\r\n if (!this.hasWidget(this.getName() + \"center\")) {\r\n var w = BI.createWidget(item);\r\n this.addWidget(this.getName() + \"center\", w);\r\n }\r\n this.getWidgetByName(this.getName() + \"center\").element\r\n .css({position: \"absolute\", top: top, bottom: bottom, left: left, right: right});\r\n }\r\n }\r\n },\r\n\r\n update: function (opt) {\r\n },\r\n\r\n populate: function (items) {\r\n BI.BorderLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.border\", BI.BorderLayout);/**\r\n * 卡片布局,可以做到当前只显示一个组件,其他的都隐藏\r\n * @class BI.CardLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {String} options.defaultShowName 默认展示的子组件名\r\n */\r\nBI.CardLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CardLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-card-layout\",\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.CardLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n this.showIndex = void 0;\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n if (!self.hasWidget(item.cardName)) {\r\n var w = BI.createWidget(item);\r\n w.on(BI.Events.DESTROY, function () {\r\n var index = BI.findIndex(o.items, function (i, tItem) {\r\n return tItem.cardName == item.cardName;\r\n });\r\n if (index > -1) {\r\n o.items.splice(index, 1);\r\n }\r\n });\r\n self.addWidget(item.cardName, w);\r\n } else {\r\n var w = self.getWidgetByName(item.cardName);\r\n }\r\n w.element.css({position: \"absolute\", top: \"0\", right: \"0\", bottom: \"0\", left: \"0\"});\r\n w.setVisible(false);\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n empty: function () {\r\n BI.CardLayout.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.CardLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n this.options.defaultShowName && this.showCardByName(this.options.defaultShowName);\r\n },\r\n\r\n isCardExisted: function (cardName) {\r\n return BI.some(this.options.items, function (i, item) {\r\n return item.cardName == cardName && item.el;\r\n });\r\n },\r\n\r\n getCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n return this._children[cardName];\r\n },\r\n\r\n _deleteCardByName: function (cardName) {\r\n delete this._children[cardName];\r\n var index = BI.findIndex(this.options.items, function (i, item) {\r\n return item.cardName == cardName;\r\n });\r\n if (index > -1) {\r\n this.options.items.splice(index, 1);\r\n }\r\n },\r\n\r\n deleteCardByName: function (cardName) {\r\n if (!this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is not exist\");\r\n }\r\n\r\n var child = this._children[cardName];\r\n this._deleteCardByName(cardName);\r\n child && child._destroy();\r\n },\r\n\r\n addCardByName: function (cardName, cardItem) {\r\n if (this.isCardExisted(cardName)) {\r\n throw new Error(\"cardName is already exist\");\r\n }\r\n var widget = BI.createWidget(cardItem, this);\r\n widget.element.css({\r\n position: \"relative\",\r\n top: \"0\",\r\n left: \"0\",\r\n width: \"100%\",\r\n height: \"100%\"\r\n }).appendTo(this.element);\r\n widget.invisible();\r\n this.addWidget(cardName, widget);\r\n this.options.items.push({el: cardItem, cardName: cardName});\r\n return widget;\r\n },\r\n\r\n showCardByName: function (name, action, callback) {\r\n var self = this;\r\n // name不存在的时候全部隐藏\r\n var exist = this.isCardExisted(name);\r\n if (this.showIndex != null) {\r\n this.lastShowIndex = this.showIndex;\r\n }\r\n this.showIndex = name;\r\n var flag = false;\r\n BI.each(this.options.items, function (i, item) {\r\n var el = self._children[item.cardName];\r\n if (el) {\r\n if (name != item.cardName) {\r\n // 动画效果只有在全部都隐藏的时候才有意义,且只要执行一次动画操作就够了\r\n !flag && !exist && (BI.Action && action instanceof BI.Action) ? (action.actionBack(el), flag = true) : el.invisible();\r\n } else {\r\n (BI.Action && action instanceof BI.Action) ? action.actionPerformed(void 0, el, callback) : (el.visible(), callback && callback());\r\n }\r\n }\r\n });\r\n },\r\n\r\n showLastCard: function () {\r\n var self = this;\r\n this.showIndex = this.lastShowIndex;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].setVisible(self.showIndex == i);\r\n });\r\n },\r\n\r\n setDefaultShowName: function (name) {\r\n this.options.defaultShowName = name;\r\n return this;\r\n },\r\n\r\n getDefaultShowName: function () {\r\n return this.options.defaultShowName;\r\n },\r\n\r\n getAllCardNames: function () {\r\n return BI.map(this.options.items, function (i, item) {\r\n return item.cardName;\r\n });\r\n },\r\n\r\n getShowingCard: function () {\r\n if (!BI.isKey(this.showIndex)) {\r\n return void 0;\r\n }\r\n return this.getWidgetByName(this.showIndex);\r\n },\r\n\r\n deleteAllCard: function () {\r\n var self = this;\r\n BI.each(this.getAllCardNames(), function (i, name) {\r\n self.deleteCardByName(name);\r\n });\r\n },\r\n\r\n hideAllCard: function () {\r\n var self = this;\r\n BI.each(this.options.items, function (i, item) {\r\n self._children[item.cardName].invisible();\r\n });\r\n },\r\n\r\n isAllCardHide: function () {\r\n var self = this;\r\n var flag = true;\r\n BI.some(this.options.items, function (i, item) {\r\n if (self._children[item.cardName].isVisible()) {\r\n flag = false;\r\n return false;\r\n }\r\n });\r\n return flag;\r\n },\r\n\r\n removeWidget: function (nameOrWidget) {\r\n var removeName;\r\n if (BI.isWidget(nameOrWidget)) {\r\n BI.each(this._children, function (name, child) {\r\n if (child === nameOrWidget) {\r\n removeName = name;\r\n }\r\n });\r\n } else {\r\n removeName = nameOrWidget;\r\n }\r\n if (removeName) {\r\n this._deleteCardByName(removeName);\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.card\", BI.CardLayout);/**\r\n * 默认的布局方式\r\n *\r\n * @class BI.DefaultLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DefaultLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DefaultLayout.superclass.props.apply(this, arguments), {\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: []\r\n });\r\n },\r\n render: function () {\r\n BI.DefaultLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.DefaultLayout.superclass._addElement.apply(this, arguments);\r\n if (o.vgap + o.tgap + (item.tgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"default布局不需要resize\")\r\n },\r\n\r\n populate: function (items) {\r\n BI.DefaultLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.default\", BI.DefaultLayout);/**\r\n * 分隔容器的控件,按照宽度和高度所占比平分整个容器\r\n *\r\n * @class BI.DivisionLayout\r\n * @extends BI.Layout\r\n */\r\nBI.DivisionLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.DivisionLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-division-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n // [\r\n // {\r\n // column: 0,\r\n // row: 0,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button1'}\r\n // },\r\n // {\r\n // column: 1,\r\n // row: 1,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button2'}\r\n // },\r\n // {\r\n // column: 3,\r\n // row: 2,\r\n // width: 0.25,\r\n // height: 0.33,\r\n // el: {type: 'bi.button', text: 'button3'}\r\n // }\r\n // ]\r\n });\r\n },\r\n render: function () {\r\n BI.DivisionLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.opitons.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var map = BI.makeArray(rows), widths = {}, heights = {};\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(map, function (i) {\r\n map[i] = BI.makeArray(columns);\r\n });\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n widths[i] = (widths[i] || 0) + item.width;\r\n heights[j] = (heights[j] || 0) + item.height;\r\n map[i][j] = el;\r\n });\r\n return;\r\n }\r\n widths[item.row] = (widths[item.row] || 0) + item.width;\r\n heights[item.column] = (heights[item.column] || 0) + item.height;\r\n map[item.row][item.column] = item;\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n var totalW = 0;\r\n for (var j = 0; j < columns; j++) {\r\n if (!map[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(map[i][j]);\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n } else {\r\n w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n }\r\n var left = totalW * 100 / widths[i];\r\n w.element.css({position: \"absolute\", left: left + \"%\"});\r\n if (j > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + i + \"_\" + (j - 1));\r\n lastW.element.css({right: (100 - left) + \"%\"});\r\n }\r\n if (j == o.columns - 1) {\r\n w.element.css({right: \"0%\"});\r\n }\r\n first(w, i, j);\r\n totalW += map[i][j].width;\r\n }\r\n }\r\n for (var j = 0; j < o.columns; j++) {\r\n var totalH = 0;\r\n for (var i = 0; i < o.rows; i++) {\r\n var w = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n var top = totalH * 100 / heights[j];\r\n w.element.css({top: top + \"%\"});\r\n if (i > 0) {\r\n var lastW = this.getWidgetByName(this.getName() + (i - 1) + \"_\" + j);\r\n lastW.element.css({bottom: (100 - top) + \"%\"});\r\n }\r\n if (i == o.rows - 1) {\r\n w.element.css({bottom: \"0%\"});\r\n }\r\n totalH += map[i][j].height;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.DivisionLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.division\", BI.DivisionLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.FloatLeftLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatLeftLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatLeftLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-left-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatLeftLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatLeftLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"left\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatLeftLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.left\", BI.FloatLeftLayout);\r\n\r\n/**\r\n * 靠右对齐的自由浮动布局\r\n * @class BI.FloatRightLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.FloatRightLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatRightLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-right-layout clearfix\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatRightLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.FloatRightLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", float: \"right\"});\r\n if (BI.isNotNull(item.left)) {\r\n w.element.css({left: item.left});\r\n }\r\n if (BI.isNotNull(item.right)) {\r\n w.element.css({right: item.right});\r\n }\r\n if (BI.isNotNull(item.top)) {\r\n w.element.css({top: item.top});\r\n }\r\n if (BI.isNotNull(item.bottom)) {\r\n w.element.css({bottom: item.bottom});\r\n }\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": (i === 0 ? o.hgap : 0) + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.FloatRightLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.right\", BI.FloatRightLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.BorderLayout\r\n * @extends BI.Layout\r\n */\r\nBI.GridLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.GridLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-grid-layout\",\r\n columns: null,\r\n rows: null,\r\n items: []\r\n /* [\r\n {\r\n column: 0,\r\n row: 0,\r\n el: {type: 'bi.button', text: 'button1'}\r\n },\r\n {\r\n column: 1,\r\n row: 1,\r\n el: {type: 'bi.button', text: 'button2'}\r\n },\r\n {\r\n column: 3,\r\n row: 2,\r\n el: {type: 'bi.button', text: 'button3'}\r\n }\r\n ]*/\r\n });\r\n },\r\n render: function () {\r\n BI.GridLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"grid布局不需要resize\")\r\n },\r\n\r\n addItem: function () {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n var rows = o.rows || o.items.length, columns = o.columns || ((o.items[0] && o.items[0].length) | 0);\r\n var width = 100 / columns, height = 100 / rows;\r\n var els = [];\r\n for (var i = 0; i < rows; i++) {\r\n els[i] = [];\r\n }\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n BI.each(items, function (i, item) {\r\n if (BI.isArray(item)) {\r\n BI.each(item, function (j, el) {\r\n els[i][j] = BI.createWidget(el);\r\n });\r\n return;\r\n }\r\n els[item.row][item.column] = BI.createWidget(item);\r\n });\r\n for (var i = 0; i < rows; i++) {\r\n for (var j = 0; j < columns; j++) {\r\n if (!els[i][j]) {\r\n els[i][j] = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n }\r\n first(els[i][j], i, j);\r\n els[i][j].element.css({\r\n position: \"absolute\",\r\n top: height * i + \"%\",\r\n left: width * j + \"%\",\r\n right: (100 - (width * (j + 1))) + \"%\",\r\n bottom: (100 - (height * (i + 1))) + \"%\"\r\n });\r\n this.addWidget(els[i][j]);\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.GridLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.grid\", BI.GridLayout);/**\r\n * 水平布局\r\n * @class BI.HorizontalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-layout\",\r\n verticalAlign: BI.VerticalAlign.Top,\r\n horizontalAlign: BI.HorizontalAlign.Left,\r\n columnSize: [],\r\n scrollx: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n var o = this.options;\r\n BI.HorizontalLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n \"white-space\": \"nowrap\",\r\n height: o.verticalAlign === BI.VerticalAlign.Middle ? \"100%\" : \"auto\",\r\n width: (o.horizontalAlign === BI.HorizontalAlign.Center || o.horizontalAlign === BI.HorizontalAlign.Stretch) ? \"100%\" : \"auto\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.$tr = BI.Widget._renderEngine.createElement(\"<tr>\");\r\n this.$tr.appendTo(this.$table);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var td;\r\n var width = o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i];\r\n if (!this.hasWidget(this._getChildName(i))) {\r\n var w = BI.createWidget(item);\r\n w.element.css({position: \"relative\", margin: \"0px auto\"});\r\n td = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"td\",\r\n attributes: {\r\n width: width\r\n },\r\n items: [w]\r\n });\r\n this.addWidget(this._getChildName(i), td);\r\n } else {\r\n td = this.getWidgetByName(this._getChildName(i));\r\n td.element.attr(\"width\", width);\r\n }\r\n // 对于表现为td的元素设置最大宽度,有几点需要注意\r\n // 1、由于直接对td设置最大宽度是在规范中未定义的, 所以要使用类似td:firstChild来迂回实现\r\n // 2、不能给多个td设置最大宽度,这样只会平分宽度\r\n // 3、多百分比宽度就算了\r\n td.element.css({\"max-width\": o.columnSize[i] <= 1 ? width : width + \"px\"});\r\n if (i === 0) {\r\n td.element.addClass(\"first-element\");\r\n }\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": o.verticalAlign,\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return td;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$tr.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal layout do not need to resize\");\r\n },\r\n\r\n _getWrapper: function () {\r\n return this.$tr;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal\", BI.HorizontalLayout);\r\n\r\n/**\r\n * 水平布局\r\n * @class BI.HorizontalCellLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCellLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCellLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-cell-layout\",\r\n scrollable: true,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCellLayout.superclass.render.apply(this, arguments);\r\n this.element.css({display: \"table\", \"vertical-align\": \"top\"});\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.HorizontalCellLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({position: \"relative\", display: \"table-cell\", \"vertical-align\": \"middle\"});\r\n if (o.hgap + o.lgap > 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal do not need to resize\");\r\n },\r\n\r\n populate: function (items) {\r\n BI.HorizontalCellLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_cell\", BI.HorizontalCellLayout);/**\r\n * 内联布局\r\n * @class BI.InlineLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.InlineLayout = BI.inherit(BI.Layout, {\r\n\r\n props: function () {\r\n return BI.extend(BI.InlineLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-inline-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.InlineLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.InlineLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\"position\": \"relative\", display: \"inline-block\", \"*display\": \"inline\", \"*zoom\": 1});\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": (i === 0 ? o.hgap : 0) + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.InlineLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.inline\", BI.InlineLayout);/**\r\n * 靠左对齐的自由浮动布局\r\n * @class BI.LatticeLayout\r\n * @extends BI.Layout\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {Number} [hgap=0] 水平间隙\r\n * @cfg {Number} [vgap=0] 垂直间隙\r\n */\r\nBI.LatticeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.LatticeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-lattice-layout clearfix\"\r\n // columnSize: [0.2, 0.2, 0.6],\r\n });\r\n },\r\n render: function () {\r\n BI.LatticeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.LatticeLayout.superclass._addElement.apply(this, arguments);\r\n if (o.columnSize && o.columnSize[i]) {\r\n var width = o.columnSize[i] / BI.sum(o.columnSize) * 100 + \"%\";\r\n } else {\r\n var width = 1 / this.options.items.length * 100 + \"%\";\r\n }\r\n w.element.css({position: \"relative\", float: \"left\", width: width});\r\n return w;\r\n },\r\n\r\n addItem: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItem.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n addItemAt: function (item) {\r\n var w = BI.LatticeLayout.superclass.addItemAt.apply(this, arguments);\r\n this.resize();\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.LatticeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.lattice\", BI.LatticeLayout);/**\r\n * 上下的高度固定/左右的宽度固定,中间的高度/宽度自适应\r\n *\r\n * @class BI.TableLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TableLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TableLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-table-layout\",\r\n scrolly: true,\r\n columnSize: [200, 200, \"fill\"],\r\n rowSize: 30, // or [30,30,30]\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TableLayout.superclass.render.apply(this, arguments);\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n var abs = [], left = 0, right = 0, i, j;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (i = 0; i < arr.length; i++) {\r\n if (BI.isNumber(o.columnSize[i])) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: o.columnSize[i] <= 1 ? left * 100 + \"%\" : left,\r\n width: o.columnSize[i] <= 1 ? o.columnSize[i] * 100 + \"%\" : o.columnSize[i]\r\n }, arr[i]));\r\n left += o.columnSize[i] + (o.columnSize[i] < 1 ? 0 : o.hgap);\r\n } else {\r\n break;\r\n }\r\n }\r\n for (j = arr.length - 1; j > i; j--) {\r\n if (BI.isNumber(o.columnSize[j])) {\r\n first(arr[j], this.rows, j);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n right: o.columnSize[j] <= 1 ? right * 100 + \"%\" : right,\r\n width: o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j]\r\n }, arr[j]));\r\n right += o.columnSize[j] + (o.columnSize[j] < 1 ? 0 : o.hgap);\r\n } else {\r\n throw new Error(\"item with fill can only be one\");\r\n }\r\n }\r\n if (i >= 0 && i < arr.length) {\r\n first(arr[i], this.rows, i);\r\n abs.push(BI.extend({\r\n top: 0,\r\n bottom: 0,\r\n left: left <= 1 ? left * 100 + \"%\" : left,\r\n right: right <= 1 ? right * 100 + \"%\" : right\r\n }, arr[i]));\r\n }\r\n var w = BI.createWidget({\r\n type: \"bi.absolute\",\r\n height: BI.isArray(o.rowSize) ? o.rowSize[this.rows] : o.rowSize,\r\n items: abs\r\n });\r\n if (this.rows > 0) {\r\n this.getWidgetByName(this.getName() + (this.rows - 1)).element.css({\r\n \"margin-bottom\": o.vgap\r\n });\r\n }\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n this.addWidget(this.getName() + (this.rows++), w);\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"table布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TableLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TableLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.table\", BI.TableLayout);/**\r\n * 水平tape布局\r\n * @class BI.HTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-h-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n width: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n width: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n width: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.HTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n w.element.css({position: \"absolute\", top: (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + \"px\", bottom: (item.bgap || 0) + (item.vgap || 0) + o.vgap + o.bgap + \"px\"});\r\n });\r\n\r\n var left = {}, right = {};\r\n left[0] = 0;\r\n right[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(left[i])) {\r\n left[i] = left[i - 1] + items[i - 1].width + (items[i - 1].lgap || 0) + 2 * (items[i - 1].hgap || 0) + o.hgap + o.lgap + o.rgap;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({left: left[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n left: left[i] + (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(right[i])) {\r\n right[i] = right[i + 1] + items[i + 1].width + (items[i + 1].rgap || 0) + 2 * (items[i + 1].hgap || 0) + o.hgap + o.lgap + o.rgap;\r\n }\r\n if (item.width < 1 && item.width >= 0) {\r\n w.element.css({right: right[i] * 100 + \"%\", width: item.width * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n right: right[i] + (item.rgap || 0) + (item.hgap || 0) + o.hgap + o.rgap + \"px\",\r\n width: BI.isNumber(item.width) ? item.width : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.width)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n var updated;\r\n BI.each(this._children, function (i, child) {\r\n updated = child.update() || updated;\r\n });\r\n return updated;\r\n },\r\n\r\n populate: function (items) {\r\n BI.HTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.htape\", BI.HTapeLayout);\r\n\r\n/**\r\n * 垂直tape布局\r\n * @class BI.VTapeLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VTapeLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VTapeLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-v-tape-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n items: [\r\n {\r\n height: 100,\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n height: \"fill\",\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n height: 200,\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]\r\n });\r\n },\r\n render: function () {\r\n BI.VTapeLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var self = this, o = this.options;\r\n items = BI.compact(items);\r\n BI.each(items, function (i, item) {\r\n if (!self.hasWidget(self.getName() + i + \"\")) {\r\n var w = BI.createWidget(item);\r\n self.addWidget(self.getName() + i + \"\", w);\r\n } else {\r\n w = self.getWidgetByName(self.getName() + i + \"\");\r\n }\r\n w.element.css({position: \"absolute\", left: (item.lgap || 0) + (item.hgap || 0) + o.hgap + o.lgap + \"px\", right: + (item.hgap || 0) + (item.rgap || 0) + o.hgap + o.rgap + \"px\"});\r\n });\r\n\r\n var top = {}, bottom = {};\r\n top[0] = 0;\r\n bottom[items.length - 1] = 0;\r\n\r\n BI.any(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + items[i - 1].height + (items[i - 1].tgap || 0) + 2 * (items[i - 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({top: top[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n top: top[i] + (item.vgap || 0) + (item.tgap || 0) + o.vgap + o.tgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n BI.backAny(items, function (i, item) {\r\n var w = self.getWidgetByName(self.getName() + i + \"\");\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + items[i + 1].height + (items[i + 1].bgap || 0) + 2 * (items[i + 1].vgap || 0) + o.vgap + o.tgap + o.bgap;\r\n }\r\n if (item.height < 1 && item.height >= 0) {\r\n w.element.css({bottom: bottom[i] * 100 + \"%\", height: item.height * 100 + \"%\"});\r\n } else {\r\n w.element.css({\r\n bottom: bottom[i] + (item.vgap || 0) + (item.bgap || 0) + o.vgap + o.bgap + \"px\",\r\n height: BI.isNumber(item.height) ? item.height : \"\"\r\n });\r\n }\r\n if (!BI.isNumber(item.height)) {\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.VTapeLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vtape\", BI.VTapeLayout);/**\r\n * td布局\r\n * @class BI.TdLayout\r\n * @extends BI.Layout\r\n */\r\nBI.TdLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.TdLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-td-layout\",\r\n columnSize: [200, 200, 200],\r\n hgap: 0,\r\n vgap: 0,\r\n items: [[\r\n {\r\n el: {text: \"label1\"}\r\n },\r\n {\r\n el: {text: \"label2\"}\r\n },\r\n {\r\n el: {text: \"label3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.TdLayout.superclass.render.apply(this, arguments);\r\n this.$table = BI.Widget._renderEngine.createElement(\"<table>\").attr({cellspacing: 0, cellpadding: 0}).css({\r\n position: \"relative\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n \"border-spacing\": \"0px\",\r\n border: \"none\",\r\n \"border-collapse\": \"separate\"\r\n });\r\n this.rows = 0;\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (idx, arr) {\r\n var o = this.options;\r\n\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n var tr = BI.createWidget({\r\n type: \"bi.default\",\r\n tagName: \"tr\"\r\n });\r\n\r\n for (var i = 0; i < arr.length; i++) {\r\n var w = BI.createWidget(arr[i]);\r\n w.element.css({position: \"relative\", top: \"0\", left: \"0\", margin: \"0px auto\"});\r\n if (arr[i].lgap) {\r\n w.element.css({\"margin-left\": arr[i].lgap + \"px\"});\r\n }\r\n if (arr[i].rgap) {\r\n w.element.css({\"margin-right\": arr[i].rgap + \"px\"});\r\n }\r\n if (arr[i].tgap) {\r\n w.element.css({\"margin-top\": arr[i].tgap + \"px\"});\r\n }\r\n if (arr[i].bgap) {\r\n w.element.css({\"margin-bottom\": arr[i].bgap + \"px\"});\r\n }\r\n first(w, this.rows++, i);\r\n var td = BI.createWidget({\r\n type: \"bi.default\",\r\n attributes: {\r\n width: o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + \"%\") : o.columnSize[i]\r\n },\r\n tagName: \"td\",\r\n items: [w]\r\n });\r\n td.element.css({\r\n position: \"relative\",\r\n \"vertical-align\": \"middle\",\r\n margin: \"0\",\r\n padding: \"0\",\r\n border: \"none\"\r\n });\r\n tr.addItem(td);\r\n }\r\n this.addWidget(this.getName() + idx, tr);\r\n return tr;\r\n },\r\n\r\n appendFragment: function (frag) {\r\n this.$table.append(frag);\r\n this.element.append(this.$table);\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"td布局不需要resize\");\r\n },\r\n\r\n addItem: function (arr) {\r\n if (!BI.isArray(arr)) {\r\n throw new Error(\"item must be array\");\r\n }\r\n return BI.TdLayout.superclass.addItem.apply(this, arguments);\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.TdLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.td\", BI.TdLayout);/**\r\n * 垂直布局\r\n * @class BI.VerticalLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n scrolly: true\r\n });\r\n },\r\n render: function () {\r\n BI.VerticalLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n _addElement: function (i, item) {\r\n var o = this.options;\r\n var w = BI.VerticalLayout.superclass._addElement.apply(this, arguments);\r\n w.element.css({\r\n position: \"relative\"\r\n });\r\n if (o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-top\": (i === 0 ? o.vgap : 0) + o.tgap + (item.tgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-left\": o.hgap + o.lgap + (item.lgap || 0) + (item.hgap || 0) +\"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-right\": o.hgap + o.rgap + (item.rgap || 0) + (item.hgap || 0) + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) !== 0) {\r\n w.element.css({\r\n \"margin-bottom\": o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0) + \"px\"\r\n });\r\n }\r\n return w;\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n populate: function (items) {\r\n BI.VerticalLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical\", BI.VerticalLayout);/**\r\n *\r\n * @class BI.WindowLayout\r\n * @extends BI.Layout\r\n */\r\nBI.WindowLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.WindowLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-window-layout\",\r\n columns: 3,\r\n rows: 2,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n columnSize: [100, \"fill\", 200],\r\n rowSize: [100, \"fill\"],\r\n items: [[\r\n {\r\n el: {type: \"bi.button\", text: \"button1\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button2\"}\r\n },\r\n {\r\n el: {type: \"bi.button\", text: \"button3\"}\r\n }\r\n ]]\r\n });\r\n },\r\n render: function () {\r\n BI.WindowLayout.superclass.render.apply(this, arguments);\r\n this.populate(this.options.items);\r\n },\r\n\r\n resize: function () {\r\n this.stroke(this.options.items);\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n stroke: function (items) {\r\n var o = this.options;\r\n if (BI.isNumber(o.rowSize)) {\r\n o.rowSize = BI.makeArray(o.items.length, 1 / o.items.length);\r\n }\r\n if (BI.isNumber(o.columnSize)) {\r\n o.columnSize = BI.makeArray(o.items[0].length, 1 / o.items[0].length);\r\n }\r\n function firstElement (item, row, col) {\r\n if (row === 0) {\r\n item.addClass(\"first-row\");\r\n }\r\n if (col === 0) {\r\n item.addClass(\"first-col\");\r\n }\r\n item.addClass(BI.isOdd(row + 1) ? \"odd-row\" : \"even-row\");\r\n item.addClass(BI.isOdd(col + 1) ? \"odd-col\" : \"even-col\");\r\n item.addClass(\"center-element\");\r\n }\r\n\r\n function firstObject (item, row, col) {\r\n var cls = \"\";\r\n if (row === 0) {\r\n cls += \" first-row\";\r\n }\r\n if (col === 0) {\r\n cls += \" first-col\";\r\n }\r\n BI.isOdd(row + 1) ? (cls += \" odd-row\") : (cls += \" even-row\");\r\n BI.isOdd(col + 1) ? (cls += \" odd-col\") : (cls += \" even-col\");\r\n item.cls = (item.cls || \"\") + cls + \" center-element\";\r\n }\r\n\r\n function first (item, row, col) {\r\n if (item instanceof BI.Widget) {\r\n firstElement(item.element, row, col);\r\n } else if (item.el instanceof BI.Widget) {\r\n firstElement(item.el.element, row, col);\r\n } else if (item.el) {\r\n firstObject(item.el, row, col);\r\n } else {\r\n firstObject(item, row, col);\r\n }\r\n }\r\n\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n if (!o.items[i][j]) {\r\n throw new Error(\"item be required\");\r\n }\r\n if (!this.hasWidget(this.getName() + i + \"_\" + j)) {\r\n var w = BI.createWidget(o.items[i][j]);\r\n w.element.css({position: \"absolute\"});\r\n this.addWidget(this.getName() + i + \"_\" + j, w);\r\n }\r\n }\r\n }\r\n var left = {}, right = {}, top = {}, bottom = {};\r\n left[0] = 0;\r\n top[0] = 0;\r\n right[o.columns - 1] = 0;\r\n bottom[o.rows - 1] = 0;\r\n // 从上到下\r\n for (var i = 0; i < o.rows; i++) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(top[i])) {\r\n top[i] = top[i - 1] + (o.rowSize[i - 1] < 1 ? o.rowSize[i - 1] : o.rowSize[i - 1] + o.vgap + o.bgap);\r\n }\r\n var t = top[i] <= 1 ? top[i] * 100 + \"%\" : top[i] + o.vgap + o.tgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({top: t, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从下到上\r\n for (var i = o.rows - 1; i >= 0; i--) {\r\n for (var j = 0; j < o.columns; j++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(bottom[i])) {\r\n bottom[i] = bottom[i + 1] + (o.rowSize[i + 1] < 1 ? o.rowSize[i + 1] : o.rowSize[i + 1] + o.vgap + o.tgap);\r\n }\r\n var b = bottom[i] <= 1 ? bottom[i] * 100 + \"%\" : bottom[i] + o.vgap + o.bgap + \"px\", h = \"\";\r\n if (BI.isNumber(o.rowSize[i])) {\r\n h = o.rowSize[i] <= 1 ? o.rowSize[i] * 100 + \"%\" : o.rowSize[i] + \"px\";\r\n }\r\n wi.element.css({bottom: b, height: h});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.rowSize[i])) {\r\n break;\r\n }\r\n }\r\n // 从左到右\r\n for (var j = 0; j < o.columns; j++) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(left[j])) {\r\n left[j] = left[j - 1] + (o.columnSize[j - 1] < 1 ? o.columnSize[j - 1] : o.columnSize[j - 1] + o.hgap + o.rgap);\r\n }\r\n var l = left[j] <= 1 ? left[j] * 100 + \"%\" : left[j] + o.hgap + o.lgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({left: l, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n // 从右到左\r\n for (var j = o.columns - 1; j >= 0; j--) {\r\n for (var i = 0; i < o.rows; i++) {\r\n var wi = this.getWidgetByName(this.getName() + i + \"_\" + j);\r\n if (BI.isNull(right[j])) {\r\n right[j] = right[j + 1] + (o.columnSize[j + 1] < 1 ? o.columnSize[j + 1] : o.columnSize[j + 1] + o.hgap + o.lgap);\r\n }\r\n var r = right[j] <= 1 ? right[j] * 100 + \"%\" : right[j] + o.hgap + o.rgap + \"px\", w = \"\";\r\n if (BI.isNumber(o.columnSize[j])) {\r\n w = o.columnSize[j] <= 1 ? o.columnSize[j] * 100 + \"%\" : o.columnSize[j] + \"px\";\r\n }\r\n wi.element.css({right: r, width: w});\r\n first(wi, i, j);\r\n }\r\n if (!BI.isNumber(o.columnSize[j])) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n update: function () {\r\n },\r\n\r\n populate: function (items) {\r\n BI.WindowLayout.superclass.populate.apply(this, arguments);\r\n this._mount();\r\n }\r\n});\r\nBI.shortcut(\"bi.window\", BI.WindowLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.CenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.CenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.CenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.CenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var list = [], items = o.items;\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.center\", BI.CenterLayout);/**\r\n * 浮动布局实现的居中容器\r\n * @class BI.FloatCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.FloatCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.FloatCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-float-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.FloatCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [], width = 100 / items.length;\r\n BI.each(items, function (i) {\r\n var widget = BI.createWidget({\r\n type: \"bi.default\"\r\n });\r\n widget.element.addClass(\"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")).css({\r\n width: width + \"%\",\r\n height: \"100%\"\r\n });\r\n list.push({\r\n el: widget\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\",\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.left\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"floatcenter布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.float_center\", BI.FloatCenterLayout);/**\r\n * 水平和垂直方向都居中容器, 非自适应,用于宽度高度固定的面板\r\n * @class BI.HorizontalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.HorizontalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.HorizontalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-horizontal-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n render: function () {\r\n BI.HorizontalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: i,\r\n row: 0,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n width: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: list.length,\r\n rows: 1,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"horizontal_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.horizontal_center\", BI.HorizontalCenterLayout);/**\r\n * 垂直方向都居中容器, 非自适应,用于高度不固定的面板\r\n * @class BI.VerticalCenterLayout\r\n * @extends BI.Layout\r\n */\r\nBI.VerticalCenterLayout = BI.inherit(BI.Layout, {\r\n props: function () {\r\n return BI.extend(BI.VerticalCenterLayout.superclass.props.apply(this, arguments), {\r\n baseCls: \"bi-vertical-center-layout\",\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0\r\n });\r\n },\r\n\r\n render: function () {\r\n BI.VerticalCenterLayout.superclass.render.apply(this, arguments);\r\n var self = this, o = this.options, items = o.items;\r\n var list = [];\r\n BI.each(items, function (i) {\r\n list.push({\r\n column: 0,\r\n row: i,\r\n el: BI.createWidget({\r\n type: \"bi.default\",\r\n cls: \"center-element \" + (i === 0 ? \"first-element \" : \"\") + (i === items.length - 1 ? \"last-element\" : \"\")\r\n })\r\n });\r\n });\r\n BI.each(items, function (i, item) {\r\n if (item) {\r\n var w = BI.createWidget(item);\r\n w.element.css({\r\n position: \"absolute\",\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap,\r\n height: \"auto\"\r\n });\r\n list[i].el.addItem(w);\r\n }\r\n });\r\n return {\r\n type: \"bi.grid\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n columns: 1,\r\n rows: list.length,\r\n items: list\r\n };\r\n },\r\n\r\n resize: function () {\r\n // console.log(\"vertical_center布局不需要resize\");\r\n },\r\n\r\n addItem: function (item) {\r\n // do nothing\r\n throw new Error(\"cannot be added\");\r\n },\r\n\r\n update: function (opt) {\r\n return this.wrapper.update(opt);\r\n },\r\n\r\n populate: function (items) {\r\n this.wrapper.populate.apply(this.wrapper, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.vertical_center\", BI.VerticalCenterLayout);/**\r\n * 缓冲池\r\n * @type {{Buffer: {}}}\r\n */\r\n\r\n(function () {\r\n var Buffer = {};\r\n var MODE = false;// 设置缓存模式为关闭\r\n\r\n BI.BufferPool = {\r\n put: function (name, cache) {\r\n if (BI.isNotNull(Buffer[name])) {\r\n throw new Error(\"Buffer Pool has the key already!\");\r\n }\r\n Buffer[name] = cache;\r\n },\r\n\r\n get: function (name) {\r\n return Buffer[name];\r\n }\r\n };\r\n})();/**\r\n * 共享池\r\n * @type {{Shared: {}}}\r\n */\r\n\r\n(function () {\r\n var _Shared = {};\r\n BI.SharingPool = {\r\n _Shared: _Shared,\r\n put: function (name, shared) {\r\n _Shared[name] = shared;\r\n },\r\n\r\n cat: function () {\r\n var args = Array.prototype.slice.call(arguments, 0),\r\n copy = _Shared;\r\n for (var i = 0; i < args.length; i++) {\r\n copy = copy && copy[args[i]];\r\n }\r\n return copy;\r\n },\r\n\r\n get: function () {\r\n return BI.deepClone(this.cat.apply(this, arguments));\r\n },\r\n\r\n remove: function (key) {\r\n delete _Shared[key];\r\n }\r\n };\r\n})();BI.Req = {\r\n\r\n};\r\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n\r\n(function (global, factory) {\r\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('lodash'), require('underscore')) : typeof define === 'function' && define.amd ? define(['exports', 'lodash', 'underscore'], factory) : factory(global.Fix = global.Fix || {}, global._, global._);\r\n})(this, function (exports, lodash, _$1) {\r\n 'use strict';\r\n\r\n _$1 = 'default' in _$1 ? _$1['default'] : _$1;\r\n\r\n var falsy = void 0;\r\n var $$skipArray = {\r\n $accessors: falsy,\r\n $vbthis: falsy,\r\n $vbsetter: falsy,\r\n $vm: falsy\r\n };\r\n\r\n var $$skips = ['$accessors', '$vbthis', '$vbsetter', '$vm'];\r\n\r\n var originalMethods = [];\r\n _$1.each(['slice', 'splice'], function (method) {\r\n originalMethods[method] = Array.prototype[method];\r\n });\r\n\r\n // Array.prototype.slice = function (...args) {\r\n // let array = originalMethods[\"slice\"].apply(this, args);\r\n // // let result = [];\r\n // // for (let i = 0; i < array.length; i++) {\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Array]\") result[i] = [...array[i]];\r\n // // if (Object.prototype.toString.call(array[i]) === \"[object Object]\") result[i] = _.extend({}, array[i]);\r\n // // result[i] = array[i];\r\n // // }\r\n // this.__ref__ = makeHashCode();\r\n // return array;\r\n // }\r\n\r\n Array.prototype.splice = function () {\r\n // for (let i = 0; i < this.length; i++) {\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Array]\") this[i] = [...this[i]];\r\n // if (Object.prototype.toString.call(this[i]) === \"[object Object]\") this[i] = _.extend({}, this[i]);\r\n // }\r\n this.__ref__ = makeHashCode();\r\n\r\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\r\n args[_key] = arguments[_key];\r\n }\r\n\r\n return originalMethods[\"splice\"].apply(this, args);\r\n };\r\n\r\n function noop(a, b, c) {}\r\n\r\n function isNative(Ctor) {\r\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString());\r\n }\r\n\r\n var rhashcode = /\\d\\.\\d{4}/;\r\n\r\n // 生成UUID http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript\r\n function makeHashCode() {\r\n var prefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bi';\r\n\r\n /* istanbul ignore next*/\r\n return String(Math.random() + Math.random()).replace(rhashcode, prefix);\r\n }\r\n\r\n function isIE() {\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n\r\n return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase())\r\n );\r\n }\r\n\r\n function getIEVersion() {\r\n var version = 0;\r\n if (typeof navigator === 'undefined') {\r\n return false;\r\n }\r\n var agent = navigator.userAgent.toLowerCase();\r\n var v1 = agent.match(/(?:msie\\s([\\w.]+))/);\r\n var v2 = agent.match(/(?:trident.*rv:([\\w.]+))/);\r\n if (v1 && v2 && v1[1] && v2[1]) {\r\n version = Math.max(v1[1] * 1, v2[1] * 1);\r\n } else if (v1 && v1[1]) {\r\n version = v1[1] * 1;\r\n } else if (v2 && v2[1]) {\r\n version = v2[1] * 1;\r\n } else {\r\n version = 0;\r\n }\r\n\r\n return version;\r\n }\r\n var isIE9Below = isIE() && getIEVersion() < 9;\r\n\r\n var _toString = Object.prototype.toString;\r\n\r\n function isPlainObject(obj) {\r\n return _toString.call(obj) === '[object Object]';\r\n }\r\n\r\n var bailRE = /[^\\w.$]/;\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function parsePath(path) {\r\n if (bailRE.test(path)) {\r\n return;\r\n }\r\n var segments = path.split('.');\r\n\r\n return function (obj) {\r\n for (var i = 0; i < segments.length; i++) {\r\n if (!obj) return;\r\n obj = obj[segments[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n function toJSON(model) {\r\n var result = void 0;\r\n if (_$1.isArray(model)) {\r\n result = [];\r\n for (var i = 0, len = model.length; i < len; i++) {\r\n result[i] = toJSON(model[i]);\r\n }\r\n } else if (model && isPlainObject(model)) {\r\n result = {};\r\n for (var key in model) {\r\n if ($$skips.indexOf(key) === -1) {\r\n result[key] = toJSON(model[key]);\r\n }\r\n }\r\n } else {\r\n result = model;\r\n }\r\n return result;\r\n }\r\n\r\n function cloneShadow(obj) {\r\n if (obj === null) return null;\r\n\r\n if (Array.isArray(obj)) {\r\n var result = [].concat(obj);\r\n if (obj.__ref__ !== undefined) result.__ref__ = obj.__ref__;\r\n return result;\r\n }\r\n\r\n return toJSON(obj);\r\n }\r\n\r\n var nextTick = function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n // An asynchronous deferring mechanism.\r\n // In pre 2.4, we used to use microtasks (Promise/MutationObserver)\r\n // but microtasks actually has too high a priority and fires in between\r\n // supposedly sequential events (e.g. #4521, #6690) or even between\r\n // bubbling of the same event (#6566). Technically setImmediate should be\r\n // the ideal choice, but it's not available everywhere; and the only polyfill\r\n // that consistently queues the callback after all DOM events triggered in the\r\n // same loop is by using MessageChannel.\r\n /* istanbul ignore if */\r\n if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else if (typeof MessageChannel !== 'undefined' && (isNative(MessageChannel) ||\r\n // PhantomJS\r\n MessageChannel.toString() === '[object MessageChannelConstructor]')) {\r\n var channel = new MessageChannel();\r\n var port = channel.port2;\r\n channel.port1.onmessage = nextTickHandler;\r\n timerFunc = function timerFunc() {\r\n port.postMessage(1);\r\n };\r\n /* istanbul ignore next */\r\n } else if (typeof Promise !== 'undefined' && isNative(Promise)) {\r\n // use microtask in non-DOM environments, e.g. Weex\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else {\r\n // fallback to setTimeout\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb, ctx) {\r\n var _resolve = void 0;\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.call(ctx);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve(ctx);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n }();\r\n\r\n function inherit(sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function temp() {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function F() {},\r\n spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _$1.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n }\r\n\r\n var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\r\n var ObjProto = Object.prototype;\r\n var toString = ObjProto.toString;\r\n\r\n // Internal recursive comparison function for `isEqual`.\r\n /* eslint no-param-reassign: ['off'] */\r\n /* eslint no-use-before-define: [\"off\"] */\r\n var deepEq = function deepEq(a, b, aStack, bStack) {\r\n // Unwrap any wrapped objects.\r\n if (a instanceof _$1) a = a._wrapped;\r\n if (b instanceof _$1) b = b._wrapped;\r\n // Compare `[[Class]]` names.\r\n var className = toString.call(a);\r\n if (className !== toString.call(b)) return false;\r\n switch (className) {\r\n // Strings, numbers, regular expressions, dates, and booleans are compared by value.\r\n case '[object RegExp]':\r\n case '[object String]':\r\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\r\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\r\n // equivalent to `new String(\"5\")`.\r\n return '' + a === '' + b;\r\n case '[object Number]':\r\n // `NaN`s are equivalent, but non-reflexive.\r\n // Object(NaN) is equivalent to NaN.\r\n if (+a !== +a) return +b !== +b;\r\n // An `egal` comparison is performed for other numeric values.\r\n\r\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\r\n case '[object Date]':\r\n case '[object Boolean]':\r\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\r\n // millisecond representations. Note that invalid dates with millisecond representations\r\n // of `NaN` are not equivalent.\r\n return +a === +b;\r\n case '[object Symbol]':\r\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\r\n default:\r\n }\r\n\r\n var areArrays = className === '[object Array]';\r\n\r\n if (!areArrays) {\r\n if (typeof a != 'object' || typeof b != 'object') return false;\r\n\r\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\r\n // from different frames are.\r\n var aCtor = a.constructor,\r\n bCtor = b.constructor;\r\n if (aCtor !== bCtor && !(_$1.isFunction(aCtor) && aCtor instanceof aCtor && _$1.isFunction(bCtor) && bCtor instanceof bCtor) && 'constructor' in a && 'constructor' in b) {\r\n return false;\r\n }\r\n }\r\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\r\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\r\n\r\n // Initializing stack of traversed objects.\r\n // It's done here since we only need them for objects and arrays comparison.\r\n aStack = aStack || [];\r\n bStack = bStack || [];\r\n var length = aStack.length;\r\n while (length--) {\r\n // Linear search. Performance is inversely proportional to the number of\r\n // unique nested structures.\r\n if (aStack[length] === a) return bStack[length] === b;\r\n }\r\n\r\n // Add the first object to the stack of traversed objects.\r\n aStack.push(a);\r\n bStack.push(b);\r\n\r\n // Recursively compare objects and arrays.\r\n if (areArrays) {\r\n // Compare array lengths to determine if a deep comparison is necessary.\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n // Deep compare the contents, ignoring non-numeric properties.\r\n while (length--) {\r\n if (!eq(a[length], b[length], aStack, bStack)) return false;\r\n }\r\n } else {\r\n // Deep compare objects.\r\n var keys = _$1.keys(a);var key = void 0;\r\n length = keys.length;\r\n // Ensure that both objects contain the same number of properties before comparing deep equality.\r\n if (_$1.keys(b).length !== length) return false;\r\n while (length--) {\r\n // Deep compare each member\r\n key = keys[length];\r\n if ($$skips.indexOf(key) !== -1) {\r\n return true;\r\n }\r\n\r\n if (!(Object.keys(b).indexOf(key) !== -1 && eq(a[key], b[key], aStack, bStack))) return false;\r\n }\r\n }\r\n // Remove the first object from the stack of traversed objects.\r\n aStack.pop();\r\n bStack.pop();\r\n\r\n return true;\r\n };\r\n\r\n var eq = function eq(a, b, aStack, bStack) {\r\n // Identical objects are equal. `0 === -0`, but they aren't identical.\r\n // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\r\n if (a === b) return a !== 0 || 1 / a === 1 / b;\r\n // `null` or `undefined` only equal to itself (strict comparison).\r\n if (a == null || b == null) return false;\r\n // `NaN`s are equivalent, but non-reflexive.\r\n if (a !== a) return b !== b;\r\n // Exhaust primitive checks\r\n var type = typeof a;\r\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\r\n\r\n // skip function\r\n if (type === 'function') return true;\r\n\r\n return deepEq(a, b, aStack, bStack);\r\n };\r\n\r\n // export function isShadowEqual(a, b) {\r\n // return shadowEq(a, b);\r\n // }\r\n\r\n function isShadowEqual(a, b) {\r\n if (a === b) return true;\r\n\r\n if (a && b && typeof a == 'object' && typeof b == 'object') {\r\n if (a.constructor !== b.constructor) return false;\r\n\r\n var length = void 0,\r\n i = void 0,\r\n key = void 0,\r\n keys = void 0;\r\n if (Array.isArray(a)) {\r\n length = a.length;\r\n if (length !== b.length) return false;\r\n for (i = length; i-- !== 0;) {\r\n if (!isShadowEqual(a[i], b[i])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n if (a.constructor === RegExp) return true;\r\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\r\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\r\n\r\n keys = Object.keys(a);\r\n length = keys.length;\r\n if (length !== Object.keys(b).length) return false;\r\n\r\n for (i = length; i-- !== 0;) {\r\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\r\n }\r\n\r\n for (i = length; i-- !== 0;) {\r\n key = keys[i];\r\n if ($$skips.indexOf(key) !== -1) continue;\r\n if (!isShadowEqual(a[key], b[key])) return false;\r\n }\r\n\r\n return true;\r\n }\r\n\r\n // skip function\r\n if (typeof a === 'function') return true;\r\n\r\n // true if both NaN, false otherwise\r\n return a !== a && b !== b;\r\n }\r\n\r\n var mixinInjection = {};\r\n\r\n function getMixins(type) {\r\n return mixinInjection[type];\r\n }\r\n\r\n function mixin(xtype, cls) {\r\n mixinInjection[xtype] = _.cloneDeep(cls);\r\n }\r\n\r\n var falsy$1 = void 0;\r\n var operators = {\r\n '||': falsy$1,\r\n '&&': falsy$1,\r\n '(': falsy$1,\r\n ')': falsy$1\r\n };\r\n\r\n function runBinaryFunction(binarys) {\r\n var expr = '';\r\n for (var i = 0, len = binarys.length; i < len; i++) {\r\n if (_$1.isBoolean(binarys[i]) || _$1.has(operators, binarys[i])) {\r\n expr += binarys[i];\r\n } else {\r\n expr += 'false';\r\n }\r\n }\r\n\r\n return new Function('return ' + expr)();\r\n }\r\n\r\n function watch(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n var model = vm;\r\n if (!model.$watch && model.$vm) {\r\n model = model.$vm;\r\n }\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = model[cb];\r\n }\r\n options = options || {};\r\n options.user = true;\r\n var exps = void 0;\r\n if (_$1.isFunction(expOrFn) || !(exps = expOrFn.match(/[a-zA-Z0-9_.*]+|[|][|]|[&][&]|[(]|[)]/g)) || exps.length === 1 && !/\\*/.test(expOrFn)) {\r\n model.$watch(expOrFn, cb, options);\r\n\r\n return [];\r\n }\r\n var watchers = [];\r\n var fns = exps.slice();\r\n var complete = false,\r\n running = false;\r\n var callback = function callback(index, newValue, oldValue, attrs) {\r\n if (complete === true) {\r\n return;\r\n }\r\n fns[index] = true;\r\n if (runBinaryFunction(fns)) {\r\n complete = true;\r\n cb.call(vm, newValue, oldValue, attrs);\r\n }\r\n if (options && options.sync) {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n } else {\r\n if (!running) {\r\n running = true;\r\n nextTick(function () {\r\n complete = false;\r\n running = false;\r\n fns = exps.slice();\r\n });\r\n }\r\n }\r\n };\r\n _$1.each(exps, function (exp, i) {\r\n if (_$1.has(operators, exp)) {\r\n return;\r\n }\r\n // a.**或a.*形式\r\n if (/^[1-9a-zA-Z.]+(\\*\\*$|\\*$)/.test(exp) || exp === '**') {\r\n var isGlobal = /\\*\\*$/.test(exp);\r\n if (isGlobal) {\r\n // a.**的形式\r\n exp = exp.replace('.**', '');\r\n } else {\r\n // a.*的形式\r\n exp = exp.replace('.*', '');\r\n }\r\n var getter = isGlobal ? exp : function () {\r\n var result = {};\r\n _$1.each(model.model, function (v, key) {\r\n if (key in $$skipArray) return;\r\n result[key] = v;\r\n });\r\n\r\n return result;\r\n };\r\n model.$watch(getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, _$1.extend(options, {\r\n deep: isGlobal\r\n }));\r\n\r\n return;\r\n }\r\n if (/\\*\\*$|\\*$/.test(exp)) {\r\n throw new Error('not support');\r\n }\r\n // 其他含有*的情况,如*.a,*.*.a,a.*.a\r\n if (/\\*/.test(exp)) {\r\n // 先获取到能获取到的对象\r\n var paths = exp.split('.');\r\n var _getter = function _getter() {\r\n var currentModels = {\r\n root: model.model\r\n };\r\n\r\n var _loop = function _loop(len, _i) {\r\n var models = {};\r\n if (paths[_i] === '*') {\r\n _$1.each(currentModels, function (model, key) {\r\n _$1.each(model, function (v, k) {\r\n if (key + k in $$skipArray) return;\r\n models[key + k] = v;\r\n });\r\n });\r\n } else {\r\n _$1.each(currentModels, function (model, key) {\r\n if (key + paths[_i] in $$skipArray) return;\r\n models[key + paths[_i]] = model[paths[_i]];\r\n });\r\n }\r\n currentModels = models;\r\n };\r\n\r\n for (var _i = 0, len = paths.length; _i < len; _i++) {\r\n _loop(len, _i);\r\n }\r\n\r\n return currentModels;\r\n };\r\n model.$watch(_getter, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n\r\n return;\r\n }\r\n model.$watch(exp, function (newValue, oldValue, attrs) {\r\n callback(i, newValue, oldValue, _$1.extend({ index: i }, attrs));\r\n }, options);\r\n });\r\n\r\n return watchers;\r\n }\r\n\r\n var allModelInstances = {};\r\n var allDefineModelInstances = {};\r\n var emptyFn = function emptyFn() {};\r\n var TTL = 10;\r\n\r\n var Watcher = function () {\r\n function Watcher(_ref) {\r\n var get = _ref.get,\r\n last = _ref.last,\r\n listener = _ref.listener,\r\n sync = _ref.sync,\r\n deep = _ref.deep,\r\n id = _ref.id;\r\n\r\n _classCallCheck(this, Watcher);\r\n\r\n this.id = id;\r\n this.get = get;\r\n this.last = cloneShadow(last);\r\n this.listener = listener || emptyFn;\r\n this.sync = sync || false;\r\n\r\n return {\r\n id: this.id,\r\n get: this.get,\r\n last: this.last,\r\n listener: this.listener\r\n };\r\n }\r\n\r\n // 不要去掉,为了兼容IE8,IE8下instance of Constructor如果不绑定函数会出错\r\n\r\n\r\n Watcher.prototype.getInstance = function getInstance() {\r\n return this;\r\n };\r\n\r\n return Watcher;\r\n }();\r\n\r\n function initState(vm, state) {\r\n var watchers = vm._stateWatchers = {};\r\n for (var key in state) {\r\n vm.model[key] = state[key];\r\n }\r\n // state暂不支持func和context\r\n\r\n var _loop2 = function _loop2(_key2) {\r\n var userDef = state[_key2];\r\n\r\n watchers[_key2] = new Watcher({\r\n id: vm._modelHashId + '-' + _key2,\r\n get: function get() {\r\n return vm.model[_key2];\r\n },\r\n last: userDef,\r\n listener: vm.options.defaultCallback || emptyFn\r\n });\r\n };\r\n\r\n for (var _key2 in state) {\r\n _loop2(_key2);\r\n }\r\n }\r\n\r\n function initComputed(vm, computed) {\r\n var watchers = vm._computedWatchers = {};\r\n var order = vm._computedOrder = [];\r\n\r\n for (var key in computed) {\r\n var userDef = computed[key],\r\n context = vm;\r\n\r\n order.push(key);\r\n\r\n watchers[key] = new Watcher({\r\n id: vm._modelHashId + '-' + key,\r\n get: _$1.bind(userDef, context),\r\n last: undefined,\r\n listener: emptyFn\r\n });\r\n }\r\n }\r\n\r\n function initWatch(vm, watchObj) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var expOrFn in watchObj) {\r\n var handler = watchObj[expOrFn];\r\n if (_$1.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n watch(vm, expOrFn, handler[i]);\r\n }\r\n } else {\r\n watch(vm, expOrFn, handler);\r\n }\r\n }\r\n }\r\n\r\n /* eslint no-param-reassign: ['off'] */\r\n function createWatcher(vm, expOrFn, cb) {\r\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\r\n\r\n if (isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === 'string') {\r\n cb = vm[cb];\r\n }\r\n var getter = _$1.isFunction(expOrFn) ? _$1.bind(expOrFn, vm) : _$1.bind(function () {\r\n return parsePath('model.' + expOrFn)(vm);\r\n }, vm);\r\n\r\n return new Watcher({\r\n get: getter,\r\n listener: _$1.bind(cb, vm),\r\n last: getter(),\r\n sync: options.sync,\r\n deep: options.deep,\r\n id: options.id\r\n });\r\n }\r\n\r\n function injectMethod(method, vm) {\r\n return function () {\r\n var result = method.apply(vm, [].concat(Array.prototype.slice.call(arguments)));\r\n // 有回调的函数不作处理,拦截ajax请求\r\n vm.$digest();\r\n\r\n return result;\r\n };\r\n }\r\n\r\n function initMethods(vm, methods) {\r\n for (var key in methods) {\r\n vm[key] = methods[key] == null ? noop : injectMethod(methods[key], vm);\r\n }\r\n }\r\n\r\n function initMixins(vm) {\r\n var mixins = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\r\n\r\n _$1.each(mixins.reverse(), function (mixinType) {\r\n var mixin$$1 = getMixins(mixinType);\r\n\r\n for (var key in mixin$$1) {\r\n if (typeof mixin$$1[key] !== 'function') continue;\r\n\r\n if (_$1.has(vm, key)) continue;\r\n\r\n vm[key] = injectMethod(mixin$$1[key], vm);\r\n }\r\n });\r\n }\r\n\r\n function defineContext(vm, keys) {\r\n var watchers = vm._contextWatchers = {};\r\n\r\n // 相关context挂上别的model中的修改监听\r\n function getSingleContext(key) {\r\n var p = vm._parent;\r\n while (p) {\r\n if (p.childContext && p.childContext.indexOf(key) > -1) {\r\n p.$watch(key, function (cur, last, p) {\r\n if (!vm._contextWatchers[key]) return;\r\n vm.model[key] = cur;\r\n vm._contextWatchers[key].last = cloneShadow(cur); // 避免重复调用(可以改成给watch添加一个参数保证下次比较一定相同)\r\n vm.$digest();\r\n }, {\r\n id: vm._modelHashId + '-' + key\r\n });\r\n\r\n return {\r\n p: p,\r\n value: p.model[key]\r\n };\r\n }\r\n p = p._parent;\r\n }\r\n }\r\n\r\n _$1.each(keys, function (key) {\r\n var context = getSingleContext(key);\r\n if (!context) return;\r\n vm.model[key] = context.p ? context.p.model[key] : undefined;\r\n watchers[key] = new Watcher({\r\n id: context.p._modelHashId + '-' + key,\r\n get: function get() {\r\n return vm.model[key];\r\n },\r\n last: vm.model[key],\r\n listener: _$1.bind(function (c) {\r\n context.p.model[key] = c;\r\n // context.p.model[key] = vm.model[key];\r\n context.p.$digest();\r\n }, context.p)\r\n });\r\n });\r\n }\r\n\r\n function digestState(vm) {\r\n var dirty = false;\r\n _$1.each(vm._stateWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digestComputed(vm) {\r\n var dirty = false;\r\n var dirtyQueue = [],\r\n cleanQueue = [];\r\n\r\n _$1.each(vm._computedOrder, function (key) {\r\n var watcher = vm._computedWatchers[key];\r\n\r\n try {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n // addToListenerQueue(vm, watcher, cur, last);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n watcher.last = cloneShadow(cur);\r\n } else {\r\n cleanQueue.push(key);\r\n }\r\n } catch (err) {\r\n dirty = true;\r\n dirtyQueue.push(key);\r\n }\r\n });\r\n\r\n vm._computedOrder = [].concat(cleanQueue, dirtyQueue);\r\n\r\n return dirty;\r\n }\r\n\r\n function digestContext(vm) {\r\n var dirty = false;\r\n _$1.each(vm._contextWatchers, function (watcher, key) {\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n if (!isShadowEqual(cur, last)) {\r\n var listener = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n vm.contextListeners.push(listener);\r\n vm.model[key] = cur;\r\n dirty = true;\r\n watcher.last = cloneShadow(cur);\r\n }\r\n });\r\n\r\n return dirty;\r\n }\r\n\r\n function digest(vm) {\r\n var stateDirty = true,\r\n contextDirty = true,\r\n computedDirty = true;\r\n for (var ttl = TTL; stateDirty && ttl > 0; ttl--) {\r\n stateDirty = digestState(vm);\r\n }\r\n for (var _ttl = TTL; contextDirty && _ttl > 0; _ttl--) {\r\n contextDirty = digestContext(vm);\r\n }\r\n for (var _ttl2 = TTL; computedDirty && _ttl2 > 0; _ttl2--) {\r\n computedDirty = digestComputed(vm);\r\n }\r\n }\r\n\r\n var nextListener = function () {\r\n var callbackMap = {};\r\n\r\n return function queueNextListener(listener, ctx) {\r\n var id = listener.id;\r\n var cb = listener.cb;\r\n if (id && callbackMap[id]) {\r\n return;\r\n }\r\n nextTick(function () {\r\n cb();\r\n callbackMap[id] = false;\r\n }, ctx);\r\n callbackMap[id] = true;\r\n };\r\n }();\r\n\r\n function executeWatchListeners(vm) {\r\n var syncListeners = [].concat(vm.syncListeners || []);\r\n var asyncListeners = [].concat(vm.asyncListeners || []);\r\n var contextListeners = [].concat(vm.contextListeners || []);\r\n\r\n vm.asyncListeners = [];\r\n vm.syncListeners = [];\r\n\r\n var watchers = [].concat(vm._watchers);\r\n\r\n _$1.each(watchers, function (watcher) {\r\n if (!watcher) return;\r\n var cur = watcher.get();\r\n var last = watcher.last;\r\n\r\n if (isShadowEqual(cur, last)) return;\r\n\r\n var listner = {\r\n id: watcher.id,\r\n cb: _$1.bind(watcher.listener, vm, cur, last, vm)\r\n };\r\n\r\n watcher.sync === true ? syncListeners.push(listner) : asyncListeners.push(listner);\r\n\r\n watcher.last = cloneShadow(cur);\r\n });\r\n\r\n _$1.each(syncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n if (contextListeners.length !== 0 || asyncListeners.length !== 0) {\r\n nextTick(function () {\r\n _$1.each(BI.uniqBy(contextListeners.reverse(), \"id\").reverse(), function (listener) {\r\n listener.cb();\r\n });\r\n _$1.each(asyncListeners, function (listener) {\r\n listener.cb();\r\n });\r\n });\r\n }\r\n }\r\n\r\n function refreshAllDefineModel() {\r\n _$1.each(allDefineModelInstances, function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n var Model = function () {\r\n function Model() {\r\n _classCallCheck(this, Model);\r\n }\r\n\r\n Model.prototype._constructor = function _constructor(model) {\r\n this.alive = true;\r\n this.options = model || {};\r\n this.model = {\r\n $vm: this\r\n };\r\n this._modelHashId = makeHashCode('model');\r\n this.syncListeners = [];\r\n this.asyncListeners = [];\r\n this.contextListeners = [];\r\n\r\n this._parent = Model.target;\r\n var state = _$1.isFunction(this.state) ? this.state() : this.state;\r\n var computed = this.computed;\r\n // Todo\r\n var context = this.context;\r\n var childContext = this.childContext;\r\n var watch$$1 = this.watch;\r\n var actions = this.actions;\r\n var mixins = this.mixins;\r\n\r\n context && defineContext(this, context);\r\n\r\n initMixins(this, mixins);\r\n this.init();\r\n initState(this, state);\r\n initComputed(this, computed);\r\n digest(this);\r\n initWatch(this, watch$$1);\r\n initMethods(this, actions);\r\n this.created && this.created();\r\n allModelInstances[this._modelHashId] = this;\r\n };\r\n\r\n Model.prototype._init = function _init() {};\r\n\r\n Model.prototype.init = function init() {\r\n this._init();\r\n };\r\n\r\n Model.prototype.destroy = function destroy() {\r\n this.alive = false;\r\n allModelInstances[this._modelHashId] = null;\r\n this._watchers && (this._watchers = []);\r\n this._computedWatchers && (this._computedWatchers = []);\r\n this._stateWatchers && (this._stateWatchers = []);\r\n this._contextWatchers && (this._contextWatchers = []);\r\n this.destroyed && this.destroyed();\r\n };\r\n\r\n Model.prototype.$watch = function $watch(expOrFn, cb, options) {\r\n var watcher = createWatcher(this, expOrFn, cb, options);\r\n this._watchers.push(watcher);\r\n };\r\n\r\n Model.prototype.$digest = function $digest() {\r\n digest(this);\r\n\r\n executeWatchListeners(this);\r\n\r\n // 非define创建的model$digest触发所有define定义的model的$digest(未来需要平台去除这些写法))\r\n if (!this.options.define) {\r\n refreshAllDefineModel();\r\n }\r\n };\r\n\r\n Model.prototype.getModelID = function getModelID() {\r\n return this._modelHashId;\r\n };\r\n\r\n return Model;\r\n }();\r\n\r\n function getAllModelInstances() {\r\n return allModelInstances;\r\n }\r\n\r\n function refreshAll() {\r\n _$1.each(getAllModelInstances(), function (insta) {\r\n insta && insta.$digest && insta.$digest();\r\n });\r\n }\r\n\r\n function define(model) {\r\n var OB = inherit(Model, {\r\n state: function state() {\r\n return model;\r\n }\r\n });\r\n var ob = new OB();\r\n ob._constructor({\r\n define: true\r\n });\r\n allDefineModelInstances[ob.getModelID()] = ob;\r\n\r\n return ob.model;\r\n }\r\n\r\n var version = '2.0';\r\n\r\n exports.version = version;\r\n exports.$$skipArray = $$skipArray;\r\n exports.mixin = mixin;\r\n exports.toJSON = toJSON;\r\n exports.nextListener = nextListener;\r\n exports.Model = Model;\r\n exports.getAllModelInstances = getAllModelInstances;\r\n exports.refreshAll = refreshAll;\r\n exports.define = define;\r\n exports.inherit = inherit;\r\n exports.watch = watch;\r\n\r\n exports.__esModule = true;\r\n});/* !\r\n * jQuery Mousewheel 3.1.13\r\n *\r\n * Copyright jQuery Foundation and other contributors\r\n * Released under the MIT license\r\n * http://jquery.org/license\r\n */\r\n\r\n(function (factory) {\r\n if ( typeof define === \"function\" && define.amd ) {\r\n // AMD. Register as an anonymous module.\r\n define([\"../core/jquery\"], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS style for Browserify\r\n module.exports = factory;\r\n } else {\r\n // Browser globals\r\n factory(BI.jQuery);\r\n }\r\n}(function ($) {\r\n\r\n var toFix = [\"wheel\", \"mousewheel\", \"DOMMouseScroll\", \"MozMousePixelScroll\"],\r\n toBind = ( \"onwheel\" in document || document.documentMode >= 9 ) ?\r\n [\"wheel\"] : [\"mousewheel\", \"DomMouseScroll\", \"MozMousePixelScroll\"],\r\n slice = Array.prototype.slice,\r\n nullLowestDeltaTimeout, lowestDelta;\r\n\r\n if ( $.event.fixHooks ) {\r\n for ( var i = toFix.length; i; ) {\r\n $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;\r\n }\r\n }\r\n\r\n var special = $.event.special.mousewheel = {\r\n version: \"3.1.12\",\r\n\r\n setup: function () {\r\n if ( this.addEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.addEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = handler;\r\n }\r\n },\r\n\r\n teardown: function () {\r\n if ( this.removeEventListener ) {\r\n for ( var i = toBind.length; i; ) {\r\n this.removeEventListener( toBind[--i], handler, false );\r\n }\r\n } else {\r\n this.onmousewheel = null;\r\n }\r\n },\r\n\r\n settings: {\r\n adjustOldDeltas: true, // see shouldAdjustOldDeltas() below\r\n normalizeOffset: true // calls getBoundingClientRect for each event\r\n }\r\n };\r\n\r\n $.fn.extend({\r\n mousewheel: function (fn) {\r\n return fn ? this.bind(\"mousewheel\", fn) : this.trigger(\"mousewheel\");\r\n },\r\n\r\n unmousewheel: function (fn) {\r\n return this.unbind(\"mousewheel\", fn);\r\n }\r\n });\r\n\r\n\r\n function handler (event) {\r\n var orgEvent = event || _global.event,\r\n args = slice.call(arguments, 1),\r\n delta = 0,\r\n deltaX = 0,\r\n deltaY = 0,\r\n absDelta = 0,\r\n offsetX = 0,\r\n offsetY = 0;\r\n event = $.event.fix(orgEvent);\r\n event.type = \"mousewheel\";\r\n\r\n // Old school scrollwheel delta\r\n if ( \"detail\" in orgEvent ) { deltaY = orgEvent.detail * -1; }\r\n if ( \"wheelDelta\" in orgEvent ) { deltaY = orgEvent.wheelDelta; }\r\n if ( \"wheelDeltaY\" in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }\r\n if ( \"wheelDeltaX\" in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }\r\n\r\n // Firefox < 17 horizontal scrolling related to DOMMouseScroll event\r\n if ( \"axis\" in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {\r\n deltaX = deltaY * -1;\r\n deltaY = 0;\r\n }\r\n\r\n // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy\r\n delta = deltaY === 0 ? deltaX : deltaY;\r\n\r\n // New school wheel delta (wheel event)\r\n if ( \"deltaY\" in orgEvent ) {\r\n deltaY = orgEvent.deltaY * -1;\r\n delta = deltaY;\r\n }\r\n if ( \"deltaX\" in orgEvent ) {\r\n deltaX = orgEvent.deltaX;\r\n if ( deltaY === 0 ) { delta = deltaX * -1; }\r\n }\r\n\r\n // No change actually happened, no reason to go any further\r\n if ( deltaY === 0 && deltaX === 0 ) { return; }\r\n\r\n // Need to convert lines and pages to pixels if we aren't already in pixels\r\n // There are three delta modes:\r\n // * deltaMode 0 is by pixels, nothing to do\r\n // * deltaMode 1 is by lines\r\n // * deltaMode 2 is by pages\r\n if ( orgEvent.deltaMode === 1 ) {\r\n var lineHeight = 40;\r\n delta *= lineHeight;\r\n deltaY *= lineHeight;\r\n deltaX *= lineHeight;\r\n } else if ( orgEvent.deltaMode === 2 ) {\r\n var pageHeight = 800;\r\n delta *= pageHeight;\r\n deltaY *= pageHeight;\r\n deltaX *= pageHeight;\r\n }\r\n\r\n // Store lowest absolute delta to normalize the delta values\r\n absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );\r\n\r\n if ( !lowestDelta || absDelta < lowestDelta ) {\r\n lowestDelta = absDelta;\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n lowestDelta /= 40;\r\n }\r\n }\r\n\r\n // Adjust older deltas if necessary\r\n if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {\r\n // Divide all the things by 40!\r\n delta /= 40;\r\n deltaX /= 40;\r\n deltaY /= 40;\r\n }\r\n\r\n // Get a whole, normalized value for the deltas\r\n delta = Math[ delta >= 1 ? \"floor\" : \"ceil\" ](delta / lowestDelta);\r\n deltaX = Math[ deltaX >= 1 ? \"floor\" : \"ceil\" ](deltaX / lowestDelta);\r\n deltaY = Math[ deltaY >= 1 ? \"floor\" : \"ceil\" ](deltaY / lowestDelta);\r\n\r\n // Normalise offsetX and offsetY properties\r\n if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {\r\n var boundingRect = this.getBoundingClientRect();\r\n offsetX = event.clientX - boundingRect.left;\r\n offsetY = event.clientY - boundingRect.top;\r\n }\r\n\r\n // Add information to the event object\r\n event.deltaX = deltaX;\r\n event.deltaY = deltaY;\r\n event.deltaFactor = lowestDelta;\r\n event.offsetX = offsetX;\r\n event.offsetY = offsetY;\r\n // Go ahead and set deltaMode to 0 since we converted to pixels\r\n // Although this is a little odd since we overwrite the deltaX/Y\r\n // properties with normalized deltas.\r\n event.deltaMode = 0;\r\n\r\n // Add event and delta to the front of the arguments\r\n args.unshift(event, delta, deltaX, deltaY);\r\n\r\n // Clearout lowestDelta after sometime to better\r\n // handle multiple device types that give different\r\n // a different lowestDelta\r\n // Ex: trackpad = 3 and mouse wheel = 120\r\n if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }\r\n nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);\r\n\r\n return ($.event.dispatch || $.event.handle).apply(this, args);\r\n }\r\n\r\n function nullLowestDelta () {\r\n lowestDelta = null;\r\n }\r\n\r\n function shouldAdjustOldDeltas (orgEvent, absDelta) {\r\n // If this is an older event and the delta is divisable by 120,\r\n // then we are assuming that the browser is treating this as an\r\n // older mouse wheel event and that we should divide the deltas\r\n // by 40 to try and get a more usable deltaFactor.\r\n // Side note, this actually impacts the reported scroll distance\r\n // in older browsers and can cause scrolling to be slower than native.\r\n // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.\r\n return special.settings.adjustOldDeltas && orgEvent.type === \"mousewheel\" && absDelta % 120 === 0;\r\n }\r\n\r\n}));/**\r\n * 当没有元素时有提示信息的view\r\n *\r\n * Created by GUY on 2015/9/8.\r\n * @class BI.Pane\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Pane = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pane.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-pane\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n overlap: true,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _assertTip: function () {\r\n var o = this.options;\r\n if (!this._tipText) {\r\n this._tipText = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-tips\",\r\n text: o.tipText,\r\n height: 25\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n items: [this._tipText]\r\n });\r\n }\r\n },\r\n\r\n loading: function () {\r\n var self = this, o = this.options;\r\n var isIE = BI.isIE();\r\n var loadingAnimation = BI.createWidget({\r\n type: \"bi.horizontal\",\r\n cls: \"bi-loading-widget\" + (isIE ? \" wave-loading hack\" : \"\"),\r\n height: 30,\r\n width: 30,\r\n hgap: 5,\r\n vgap: 2.5,\r\n items: isIE ? [] : [{\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect1\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect2\",\r\n height: 25,\r\n width: 3\r\n }, {\r\n type: \"bi.layout\",\r\n cls: \"animate-rect rect3\",\r\n height: 25,\r\n width: 3\r\n }]\r\n });\r\n // pane在同步方式下由items决定tipText的显示与否\r\n // loading的异步情况下由loaded后对面板的populate的时机决定\r\n this.setTipVisible(false);\r\n if (o.overlap === true) {\r\n if (!BI.Layers.has(this.getName())) {\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n cls: \"loading-container\",\r\n items: [{\r\n el: loadingAnimation\r\n }],\r\n element: BI.Layers.make(this.getName(), this)\r\n });\r\n }\r\n BI.Layers.show(self.getName());\r\n } else if (BI.isNull(this._loading)) {\r\n this._loading = loadingAnimation;\r\n this._loading.element.css(\"zIndex\", 1);\r\n BI.createWidget({\r\n type: \"bi.absolute_center_adapt\",\r\n element: this,\r\n cls: \"loading-container\",\r\n items: [{\r\n el: this._loading,\r\n left: 0,\r\n right: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n this.element.addClass(\"loading-status\");\r\n },\r\n\r\n loaded: function () {\r\n var self = this, o = this.options;\r\n BI.Layers.remove(self.getName());\r\n this._loading && this._loading.destroy();\r\n this._loading && (this._loading = null);\r\n o.onLoaded();\r\n self.fireEvent(BI.Pane.EVENT_LOADED);\r\n this.element.removeClass(\"loading-status\");\r\n },\r\n\r\n check: function () {\r\n this.setTipVisible(BI.isEmpty(this.options.items));\r\n },\r\n\r\n setTipVisible: function (b) {\r\n if (b === true) {\r\n this._assertTip();\r\n this._tipText.setVisible(true);\r\n } else {\r\n this._tipText && this._tipText.setVisible(false);\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items || [];\r\n this.check();\r\n },\r\n\r\n empty: function () {\r\n\r\n }\r\n});\r\nBI.Pane.EVENT_LOADED = \"EVENT_LOADED\";/**\r\n * guy\r\n * 这仅仅只是一个超类, 所有简单控件的基类\r\n * 1、类的控制,\r\n * 2、title的控制\r\n * 3、文字超过边界显示3个点\r\n * 4、cursor默认pointor\r\n * @class BI.Single\r\n * @extends BI.Widget\r\n * @abstract\r\n */\r\nBI.Single = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Single.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-single\",\r\n readonly: false,\r\n title: null,\r\n warningTitle: null,\r\n tipType: null, // success或warning\r\n value: null,\r\n belowMouse: false // title是否跟随鼠标\r\n });\r\n },\r\n\r\n _showToolTip: function (e, opt) {\r\n opt || (opt = {});\r\n var self = this, o = this.options;\r\n var type = this.getTipType() || (this.isEnabled() ? \"success\" : \"warning\");\r\n var title = type === \"success\" ? this.getTitle() : (this.getWarningTitle() || this.getTitle());\r\n if (BI.isKey(title)) {\r\n BI.Tooltips.show(e, this.getName(), title, type, this, opt);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"hover\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"hover\", o, this);\r\n }\r\n },\r\n\r\n _hideTooltip: function () {\r\n var self = this;\r\n var tooltip = BI.Tooltips.get(this.getName());\r\n if (BI.isNotNull(tooltip)) {\r\n tooltip.element.fadeOut(200, function () {\r\n BI.Tooltips.remove(self.getName());\r\n });\r\n }\r\n },\r\n\r\n _init: function () {\r\n BI.Single.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isKey(o.title) || BI.isKey(o.warningTitle)\r\n || BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {\r\n this.enableHover({\r\n belowMouse: o.belowMouse,\r\n container: o.container\r\n });\r\n }\r\n },\r\n\r\n _clearTimeOut: function () {\r\n if (BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n if (BI.isNotNull(this.hideTimeout)) {\r\n clearTimeout(this.hideTimeout);\r\n this.hideTimeout = null;\r\n }\r\n },\r\n\r\n enableHover: function (opt) {\r\n opt || (opt = {});\r\n var self = this;\r\n if (!this._hoverBinded) {\r\n this.element.on(\"mouseenter.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (self.getTipType() === \"warning\" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 200);\r\n } else if (self.getTipType() === \"success\" || self.isEnabled()) {\r\n self.showTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.showTimeout)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }, 500);\r\n }\r\n });\r\n this.element.on(\"mousemove.title\" + this.getName(), function (e) {\r\n self._e = e;\r\n if (BI.isNotNull(self.showTimeout)) {\r\n clearTimeout(self.showTimeout);\r\n self.showTimeout = null;\r\n }\r\n if(BI.isNull(self.hideTimeout)) {\r\n self.hideTimeout = BI.delay(function () {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n self._hideTooltip();\r\n }\r\n }, 500);\r\n }\r\n\r\n self.showTimeout = BI.delay(function () {\r\n // DEC-5321 IE下如果回调已经进入事件队列,clearTimeout将不会起作用\r\n if (BI.isNotNull(self.showTimeout)) {\r\n if (BI.isNotNull(self.hideTimeout)) {\r\n clearTimeout(self.hideTimeout);\r\n self.hideTimeout = null;\r\n }\r\n // CHART-10611 在拖拽的情况下, 鼠标拖拽着元素离开了拖拽元素的容器,但是子元素在dom结构上仍然属于容器\r\n // 这样会认为鼠标仍然在容器中, 500ms内放开的话,会在容器之外显示鼠标停留处显示容器的title\r\n if (self.element.__isMouseInBounds__(self._e || e)) {\r\n self._showToolTip(self._e || e, opt);\r\n }\r\n }\r\n }, 500);\r\n\r\n });\r\n this.element.on(\"mouseleave.title\" + this.getName(), function (e) {\r\n self._e = null;\r\n self._clearTimeOut();\r\n self._hideTooltip();\r\n });\r\n this._hoverBinded = true;\r\n }\r\n },\r\n\r\n disabledHover: function () {\r\n // 取消hover事件\r\n this._clearTimeOut();\r\n this._hideTooltip();\r\n this.element.unbind(\"mouseenter.title\" + this.getName())\r\n .unbind(\"mousemove.title\" + this.getName())\r\n .unbind(\"mouseleave.title\" + this.getName());\r\n this._hoverBinded = false;\r\n },\r\n\r\n populate: function (items) {\r\n this.items = items || [];\r\n },\r\n\r\n // opt: {container: '', belowMouse: false}\r\n setTitle: function (title, opt) {\r\n this.options.title = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n setWarningTitle: function (title, opt) {\r\n this.options.warningTitle = title;\r\n if (BI.isKey(title) || BI.isFunction(title)) {\r\n this.enableHover(opt);\r\n } else {\r\n this.disabledHover();\r\n }\r\n },\r\n\r\n getTipType: function () {\r\n return this.options.tipType;\r\n },\r\n\r\n isReadOnly: function () {\r\n return !!this.options.readonly;\r\n },\r\n\r\n getTitle: function () {\r\n var title = this.options.title;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n getWarningTitle: function () {\r\n var title = this.options.warningTitle;\r\n if(BI.isFunction(title)) {\r\n return title();\r\n }\r\n return title;\r\n },\r\n\r\n setValue: function (val) {\r\n if (!this.options.readonly) {\r\n this.options.value = val;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n _unMount: function () {\r\n BI.Single.superclass._unMount.apply(this, arguments);\r\n if(BI.isNotNull(this.showTimeout)) {\r\n clearTimeout(this.showTimeout);\r\n this.showTimeout = null;\r\n }\r\n BI.Tooltips.remove(this.getName());\r\n }\r\n});/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Text\r\n * @extends BI.Single\r\n */\r\nBI.Text = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n py: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: this._getTextWrap(),\r\n textOverflow: o.whiteSpace === \"nowrap\" ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : (BI.isWidthOrHeight(o.height) ? \"auto\" : \"\")\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n var text = this._getShowText();\r\n if (BI.isKey(text)) {\r\n this.setText(text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (BI.isKey(o.keyword)) {\r\n this.doRedMark(o.keyword);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n _getTextWrap: function () {\r\n var o = this.options;\r\n switch (o.whiteSpace) {\r\n case \"nowrap\":\r\n return \"pre\";\r\n case \"normal\":\r\n default:\r\n return \"pre-wrap\";\r\n }\r\n },\r\n\r\n _getShowText: function () {\r\n var o = this.options;\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n },\r\n\r\n\r\n doRedMark: function (keyword) {\r\n var o = this.options;\r\n // render之后做的doredmark,这个时候虽然标红了,但是之后text mounted执行的时候并没有keyword\r\n o.keyword = keyword;\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, keyword, o.py);\r\n },\r\n\r\n unRedMark: function () {\r\n var o = this.options;\r\n o.keyword = \"\";\r\n this.text.element.__textKeywordMarked__(this._getShowText() || o.value, \"\", o.py);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Text.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Text.superclass.setText.apply(this, arguments);\r\n // 为textContext赋值为undefined时在ie和edge下会真的显示undefined\r\n this.options.text = BI.isNotNull(text) ? text : \"\";\r\n if (BI.isIE9Below()) {\r\n this.text.element.html(BI.htmlEncode(this._getShowText()));\r\n return;\r\n }\r\n // textContent性能更好,并且原生防xss\r\n this.text.element[0].textContent = this._getShowText();\r\n BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.text\", BI.Text);\r\n/**\r\n * guy\r\n * @class BI.BasicButton\r\n * @extends BI.Single\r\n *\r\n * 一般的button父级\r\n */\r\nBI.BasicButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.BasicButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-basic-button\" + (conf.invalid ? \"\" : \" cursor-pointer\") + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n value: \"\",\r\n text: \"\",\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消,与once的区别是forceSelected不影响事件的触发\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn,\r\n bubble: null\r\n });\r\n },\r\n _init: function () {\r\n BI.BasicButton.superclass._init.apply(this, arguments);\r\n var opts = this.options;\r\n if (opts.selected === true) {\r\n BI.nextTick(BI.bind(function () {\r\n this.setSelected(opts.selected);\r\n }, this));\r\n }\r\n BI.nextTick(BI.bind(this.bindEvent, this));\r\n\r\n if (opts.shadow) {\r\n this._createShadow();\r\n }\r\n if (opts.level) {\r\n this.element.addClass(\"button-\" + opts.level);\r\n }\r\n },\r\n\r\n _createShadow: function () {\r\n var self = this, o = this.options;\r\n\r\n var assertMask = function () {\r\n if (!self.$mask) {\r\n self.$mask = BI.createWidget(BI.isObject(o.shadow) ? o.shadow : {}, {\r\n type: \"bi.layout\",\r\n cls: \"bi-button-mask\"\r\n });\r\n self.$mask.invisible();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: self.$mask,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n }\r\n };\r\n\r\n this.element.mouseup(function () {\r\n if (!self._hover && !o.isShadowShowingOnSelected) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n this.element.on(\"mouseenter.\" + this.getName(), function (e) {\r\n if (self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover && (o.isShadowShowingOnSelected || !self.isSelected())) {\r\n assertMask();\r\n self.$mask.visible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mousemove.\" + this.getName(), function (e) {\r\n if (!self.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n }\r\n });\r\n this.element.on(\"mouseleave.\" + this.getName(), function () {\r\n if (self.isEnabled() && !self._hover) {\r\n assertMask();\r\n self.$mask.invisible();\r\n }\r\n });\r\n },\r\n\r\n bindEvent: function () {\r\n var self = this;\r\n var o = this.options, hand = this.handle();\r\n if (!hand) {\r\n return;\r\n }\r\n hand = hand.element;\r\n var triggerArr = (o.trigger || \"\").split(\",\");\r\n BI.each(triggerArr, function (idx, trigger) {\r\n switch (trigger) {\r\n case \"mouseup\":\r\n var mouseDown = false;\r\n hand.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n hand.mouseup(function (e) {\r\n if (mouseDown === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n ev(e);\r\n });\r\n break;\r\n case \"mousedown\":\r\n var mouseDown = false;\r\n var selected = false;\r\n hand.mousedown(function (e) {\r\n // if (e.button === 0) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) {\r\n // self.setSelected(!self.isSelected());\r\n self._trigger();\r\n }\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (self.isSelected()) {\r\n selected = true;\r\n } else {\r\n clk(e);\r\n }\r\n mouseDown = true;\r\n ev(e);\r\n // }\r\n });\r\n hand.mouseup(function (e) {\r\n // if (e.button === 0) {\r\n if (BI.DOM.isExist(self) && mouseDown === true && selected === true) {\r\n clk(e);\r\n }\r\n mouseDown = false;\r\n selected = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n // }\r\n });\r\n break;\r\n case \"dblclick\":\r\n hand.dblclick(clk);\r\n break;\r\n case \"lclick\":\r\n var mouseDown = false;\r\n var interval;\r\n hand.mousedown(function (e) {\r\n BI.Widget._renderEngine.createElement(document).bind(\"mouseup.\" + self.getName(), function (e) {\r\n interval && clearInterval(interval);\r\n interval = null;\r\n mouseDown = false;\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + self.getName());\r\n });\r\n if (mouseDown === true) {\r\n return;\r\n }\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n interval = setInterval(function () {\r\n if (self.isEnabled()) {\r\n self.doClick();\r\n }\r\n }, 180);\r\n mouseDown = true;\r\n ev(e);\r\n });\r\n break;\r\n default:\r\n if (o.stopEvent || o.stopPropagation) {\r\n hand.mousedown(function (e) {\r\n ev(e);\r\n });\r\n }\r\n hand.click(clk);\r\n break;\r\n }\r\n });\r\n\r\n // 之后的300ms点击无效\r\n var onClick = BI.debounce(this._doClick, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n\r\n function ev (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n }\r\n\r\n function clk (e) {\r\n ev(e);\r\n if (!self.isEnabled() || (self.isOnce() && self.isSelected())) {\r\n return;\r\n }\r\n if (BI.isKey(o.bubble) || BI.isFunction(o.bubble)) {\r\n if (BI.isNull(self.combo)) {\r\n var popup;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: self,\r\n items: [{\r\n el: {\r\n type: \"bi.bubble_combo\",\r\n trigger: \"\",\r\n // bubble的提示不需要一直存在在界面上\r\n destroyWhenHide: true,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.layout\",\r\n height: \"100%\"\r\n },\r\n popup: {\r\n type: \"bi.text_bubble_bar_popup_view\",\r\n text: getBubble(),\r\n ref: function () {\r\n popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON,\r\n action: function (v) {\r\n self.combo.hideView();\r\n if (v) {\r\n onClick.apply(self, arguments);\r\n }\r\n }\r\n }]\r\n },\r\n listeners: [{\r\n eventName: BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n popup.populate(getBubble());\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n });\r\n }\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n return;\r\n }\r\n onClick.apply(self, arguments);\r\n }\r\n\r\n function getBubble () {\r\n var bubble = self.options.bubble;\r\n if (BI.isFunction(bubble)) {\r\n return bubble();\r\n }\r\n return bubble;\r\n }\r\n },\r\n\r\n _trigger: function (e) {\r\n var o = this.options;\r\n if (!this.isEnabled()) {\r\n return;\r\n }\r\n if (!this.isDisableSelected()) {\r\n this.isForceSelected() ? this.setSelected(true) :\r\n (this.isForceNotSelected() ? this.setSelected(false) :\r\n this.setSelected(!this.isSelected()));\r\n }\r\n if (this.isValid()) {\r\n o.handler.call(this, this.getValue(), this, e);\r\n var v = this.getValue();\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, v, this, e);\r\n this.fireEvent(BI.BasicButton.EVENT_CHANGE, v, this);\r\n if (o.action) {\r\n BI.Actions.runAction(o.action, \"click\", o, this);\r\n }\r\n BI.Actions.runGlobalAction(\"click\", o, this);\r\n }\r\n },\r\n\r\n _doClick: function (e) {\r\n if (this.isValid()) {\r\n this.beforeClick(e);\r\n }\r\n this._trigger(e);\r\n if (this.isValid()) {\r\n this.doClick(e);\r\n }\r\n },\r\n\r\n beforeClick: function () {\r\n\r\n },\r\n\r\n doClick: function () {\r\n\r\n },\r\n\r\n handle: function () {\r\n return this;\r\n },\r\n\r\n hover: function () {\r\n this._hover = true;\r\n this.handle().element.addClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(true);\r\n }\r\n },\r\n\r\n dishover: function () {\r\n this._hover = false;\r\n this.handle().element.removeClass(\"hover\");\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n var o = this.options;\r\n o.selected = b;\r\n if (b) {\r\n this.handle().element.addClass(\"active\");\r\n } else {\r\n this.handle().element.removeClass(\"active\");\r\n }\r\n if (o.shadow && !o.isShadowShowingOnSelected) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n },\r\n\r\n isSelected: function () {\r\n return this.options.selected;\r\n },\r\n\r\n isOnce: function () {\r\n return this.options.once;\r\n },\r\n\r\n isForceSelected: function () {\r\n return this.options.forceSelected;\r\n },\r\n\r\n isForceNotSelected: function () {\r\n return this.options.forceNotSelected;\r\n },\r\n\r\n isDisableSelected: function () {\r\n return this.options.disableSelected;\r\n },\r\n\r\n setText: function (text) {\r\n this.options.text = text;\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.BasicButton.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n if (!enable) {\r\n if (this.options.shadow) {\r\n this.$mask && this.$mask.setVisible(false);\r\n }\r\n }\r\n },\r\n\r\n empty: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mouseup.\" + this.getName());\r\n BI.BasicButton.superclass.empty.apply(this, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.BasicButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.BasicButton.EVENT_CHANGE = \"BasicButton.EVENT_CHANGE\";/**\r\n * 表示一个可以展开的节点, 不仅有选中状态而且有展开状态\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.NodeButton\r\n * @extends BI.BasicButton\r\n * @abstract\r\n */\r\nBI.NodeButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.NodeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-node\",\r\n open: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NodeButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n BI.nextTick(function () {\r\n self.setOpened(self.isOpened());\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.setOpened(!this.isOpened());\r\n },\r\n\r\n isOnce: function () {\r\n return false;\r\n },\r\n\r\n isOpened: function () {\r\n return !!this.options.open;\r\n },\r\n\r\n setOpened: function (b) {\r\n this.options.open = !!b;\r\n },\r\n\r\n triggerCollapse: function () {\r\n if(this.isOpened()) {\r\n this.setOpened(false);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, this.getValue(), this);\r\n }\r\n },\r\n\r\n triggerExpand: function () {\r\n if(!this.isOpened()) {\r\n this.setOpened(true);\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, this.getValue(), this);\r\n }\r\n }\r\n});/**\r\n * guy\r\n * tip提示\r\n * zIndex在10亿级别\r\n * @class BI.Tip\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Tip = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Tip.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-tip\",\r\n zIndex: BI.zIndex_tip\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Tip.superclass._init.apply(this, arguments);\r\n this.element.css({zIndex: this.options.zIndex});\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n * @class BI.ButtonGroup\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.ButtonGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-group\",\r\n behaviors: {},\r\n items: [],\r\n value: \"\",\r\n chooseType: BI.Selection.Single,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonGroup.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var behaviors = {};\r\n BI.each(o.behaviors, function (key, rule) {\r\n behaviors[key] = BI.BehaviorFactory.createBehavior(key, {\r\n rule: rule\r\n });\r\n });\r\n this.behaviors = behaviors;\r\n this.populate(o.items);\r\n if(BI.isKey(o.value) || BI.isNotEmptyArray(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _createBtns: function (items) {\r\n var o = this.options;\r\n return BI.createWidgets(BI.createItems(items, {\r\n type: \"bi.text_button\"\r\n }));\r\n },\r\n\r\n _btnsCreator: function (items) {\r\n var self = this, args = Array.prototype.slice.call(arguments), o = this.options;\r\n var buttons = this._createBtns(items);\r\n args[0] = buttons;\r\n\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n BI.each(buttons, function (i, btn) {\r\n btn.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n self.setValue(btn.getValue());\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_NONE:\r\n self.setValue([]);\r\n break;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.ButtonGroup.EVENT_CHANGE, value, obj);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n btn.on(BI.Events.DESTROY, function () {\r\n BI.remove(self.buttons, btn);\r\n });\r\n });\r\n\r\n return buttons;\r\n },\r\n\r\n _packageBtns: function (btns) {\r\n var o = this.options;\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n btns = BI.map(btns, function (k, it) {\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return btns;\r\n },\r\n\r\n _packageSimpleItems: function (btns) {\r\n var o = this.options;\r\n return BI.map(o.items, function (i, item) {\r\n if (BI.stripEL(item) === item) {\r\n return btns[i];\r\n }\r\n return BI.extend({}, item, {\r\n el: btns[i]\r\n });\r\n });\r\n },\r\n\r\n _packageItems: function (items, packBtns) {\r\n return BI.createItems(BI.makeArrayByArray(items, {}), BI.clone(packBtns));\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n // 如果是一个简单的layout\r\n _isSimpleLayout: function () {\r\n var o = this.options;\r\n return o.layouts.length === 1 && !BI.isArray(o.items[0]);\r\n },\r\n\r\n doBehavior: function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n args.unshift(this.buttons);\r\n BI.each(this.behaviors, function (i, behavior) {\r\n behavior.doBehavior.apply(behavior, args);\r\n });\r\n },\r\n\r\n prependItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(btns, this.buttons);\r\n\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.prependItems) {\r\n this.layouts.prependItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.prependItems(this._packageLayout(items).items);\r\n },\r\n\r\n addItems: function (items) {\r\n var o = this.options;\r\n var btns = this._btnsCreator.apply(this, arguments);\r\n this.buttons = BI.concat(this.buttons, btns);\r\n\r\n // 如果是一个简单的layout\r\n if (this._isSimpleLayout() && this.layouts && this.layouts.addItems) {\r\n this.layouts.addItems(btns);\r\n return;\r\n }\r\n\r\n items = this._packageItems(items, this._packageBtns(btns));\r\n this.layouts.addItems(this._packageLayout(items).items);\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n BI.removeAt(this.buttons, indexes);\r\n this.layouts.removeItemAt(indexes);\r\n },\r\n\r\n removeItems: function (values) {\r\n values = BI.isArray(values) ? values : [values];\r\n var deleted = [];\r\n BI.each(this.buttons, function (i, button) {\r\n if (BI.deepContains(values, button.getValue())) {\r\n deleted.push(i);\r\n }\r\n });\r\n BI.removeAt(this.buttons, deleted);\r\n this.layouts.removeItemAt(deleted);\r\n },\r\n\r\n populate: function (items) {\r\n items = items || [];\r\n this.empty();\r\n this.options.items = items;\r\n\r\n this.buttons = this._btnsCreator.apply(this, arguments);\r\n if (this._isSimpleLayout()) {\r\n items = this._packageSimpleItems(this.buttons);\r\n } else {\r\n items = this._packageItems(items, this._packageBtns(this.buttons));\r\n }\r\n\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(false);\r\n } else {\r\n item.setSelected && item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.buttons;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.buttons;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.options.id === id) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled() && item.getValue() === value) {\r\n node = item;\r\n return true;\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n empty: function () {\r\n BI.ButtonGroup.superclass.empty.apply(this, arguments);\r\n this.options.items = [];\r\n },\r\n\r\n destroy: function () {\r\n BI.ButtonGroup.superclass.destroy.apply(this, arguments);\r\n this.options.items = [];\r\n }\r\n});\r\nBI.extend(BI.ButtonGroup, {\r\n CHOOSE_TYPE_SINGLE: BI.Selection.Single,\r\n CHOOSE_TYPE_MULTI: BI.Selection.Multi,\r\n CHOOSE_TYPE_ALL: BI.Selection.All,\r\n CHOOSE_TYPE_NONE: BI.Selection.None,\r\n CHOOSE_TYPE_DEFAULT: BI.Selection.Default\r\n});\r\nBI.ButtonGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_group\", BI.ButtonGroup);/**\r\n * Created by GUY on 2015/8/10.\r\n * @class BI.ButtonTree\r\n * @extends BI.ButtonGroup\r\n */\r\n\r\nBI.ButtonTree = BI.inherit(BI.ButtonGroup, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ButtonTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-button-tree\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ButtonTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setNotSelectedValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setNotSelectedValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(false);\r\n } else {\r\n item.setSelected(true);\r\n }\r\n });\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (BI.isFunction(item.setEnabledValue)) {\r\n item.setEnabledValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setEnable(true);\r\n } else {\r\n item.setEnable(false);\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttons, function (i, item) {\r\n if (!BI.isFunction(item.setSelected)) {\r\n item.setValue(v);\r\n return;\r\n }\r\n if (BI.deepContains(v, item.getValue())) {\r\n item.setSelected(true);\r\n } else {\r\n item.setSelected(false);\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getNotSelectedValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && !item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n v = BI.concat(v, item.getValue());\r\n return;\r\n }\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n var btns = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n btns = btns.concat(item.getNotSelectedButtons());\r\n return;\r\n }\r\n if (item.isSelected && !item.isSelected()) {\r\n btns.push(item);\r\n }\r\n });\r\n return btns;\r\n },\r\n\r\n // 获取所有的叶子节点\r\n getAllLeaves: function () {\r\n var leaves = [];\r\n BI.each(this.buttons, function (i, item) {\r\n if (item.isEnabled() && !BI.isFunction(item.setSelected)) {\r\n leaves = leaves.concat(item.getAllLeaves());\r\n return;\r\n }\r\n if (item.isEnabled()) {\r\n leaves.push(item);\r\n }\r\n });\r\n return leaves;\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n var index = -1;\r\n BI.any(this.buttons, function (i, item) {\r\n var vs = item.getValue();\r\n if (item.isEnabled() && (vs === value || BI.contains(vs, value))) {\r\n index = i;\r\n return true;\r\n }\r\n });\r\n return index;\r\n },\r\n\r\n getNodeById: function (id) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (item.attr(\"id\") === id) {\r\n node = item;\r\n return true;\r\n } else if (BI.isFunction(item.getNodeById)) {\r\n if (node = item.getNodeById(id)) {\r\n return true;\r\n }\r\n }\r\n }\r\n });\r\n return node;\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n var node;\r\n BI.any(this.buttons, function (i, item) {\r\n if (item.isEnabled()) {\r\n if (BI.isFunction(item.getNodeByValue)) {\r\n if (node = item.getNodeByValue(value)) {\r\n return true;\r\n }\r\n } else if (item.attr(\"value\") === value) {\r\n node = item;\r\n return true;\r\n }\r\n }\r\n });\r\n return node;\r\n }\r\n});\r\nBI.ButtonTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.button_tree\", BI.ButtonTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.TreeView\r\n * @extends BI.Pane\r\n */\r\nBI.TreeView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-tree\",\r\n paras: {\r\n selectedValues: {}\r\n },\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this._stop = false;\r\n\r\n this._createTree();\r\n this.tip = BI.createWidget({\r\n type: \"bi.loading_bar\",\r\n invisible: true,\r\n handler: BI.bind(this._loadMore, this)\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrollable: true,\r\n scrolly: false,\r\n element: this,\r\n items: [this.tip]\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setSelectedValue(o.value);\r\n }\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n },\r\n\r\n _createTree: function () {\r\n this.id = \"bi-tree\" + BI.UUID();\r\n if (this.nodes) {\r\n this.nodes.destroy();\r\n }\r\n if (this.tree) {\r\n this.tree.destroy();\r\n }\r\n this.tree = BI.createWidget({\r\n type: \"bi.layout\",\r\n element: \"<ul id='\" + this.id + \"' class='ztree'></ul>\"\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this.element,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n // 选择节点触发方法\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, treeNode, this);\r\n this.fireEvent(BI.TreeView.EVENT_CHANGE, treeNode, this);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: true,\r\n url: getUrl,\r\n autoParam: [\"id\", \"name\"], // 节点展开异步请求自动提交id和name\r\n otherParam: BI.cjkEncodeDO(paras) // 静态参数\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\" // 节点的name属性替换成text\r\n },\r\n simpleData: {\r\n enable: true // 可以穿id,pid属性的对象数组\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true, // 节点可以用html标签代替\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeExpand: beforeExpand,\r\n onAsyncSuccess: onAsyncSuccess,\r\n onAsyncError: onAsyncError,\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n var className = \"dark\", perTime = 100;\r\n\r\n function onClick (event, treeId, treeNode) {\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if(status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n // 更新此node的check状态, 影响父子关联,并调用beforeCheck和onCheck回调\r\n self.nodes.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function getUrl (treeId, treeNode) {\r\n var parentNode = self._getParentValues(treeNode);\r\n treeNode.times = treeNode.times || 1;\r\n var param = \"id=\" + treeNode.id\r\n + \"&times=\" + (treeNode.times++)\r\n + \"&parentValues= \" + _global.encodeURIComponent(BI.jsonEncode(parentNode))\r\n + \"&checkState=\" + _global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus()));\r\n\r\n return \"&\" + param;\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n if (!treeNode.isAjaxing) {\r\n if (!treeNode.children) {\r\n treeNode.times = 1;\r\n ajaxGetNodes(treeNode, \"refresh\");\r\n }\r\n return true;\r\n }\r\n BI.Msg.toast(\"Please Wait。\", \"warning\"); // 不展开节点,也不触发onExpand事件\r\n return false;\r\n\r\n }\r\n\r\n function onAsyncSuccess (event, treeId, treeNode, msg) {\r\n treeNode.halfCheck = false;\r\n if (!msg || msg.length === 0 || /^<html>[\\s,\\S]*<\\/html>$/gi.test(msg) || self._stop) {\r\n return;\r\n }\r\n var zTree = self.nodes;\r\n var totalCount = treeNode.count || 0;\r\n\r\n // 尝试去获取下一组节点,若获取值为空数组,表示获取完成\r\n // TODO by GUY\r\n if (treeNode.children.length > totalCount) {\r\n treeNode.count = treeNode.children.length;\r\n BI.delay(function () {\r\n ajaxGetNodes(treeNode);\r\n }, perTime);\r\n } else {\r\n // treeNode.icon = \"\";\r\n zTree.updateNode(treeNode);\r\n zTree.selectNode(treeNode.children[0]);\r\n // className = (className === \"dark\" ? \"\":\"dark\");\r\n }\r\n }\r\n\r\n function onAsyncError (event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {\r\n var zTree = self.nodes;\r\n BI.Msg.toast(\"Error!\", \"warning\");\r\n // treeNode.icon = \"\";\r\n // zTree.updateNode(treeNode);\r\n }\r\n\r\n function ajaxGetNodes (treeNode, reloadType) {\r\n var zTree = self.nodes;\r\n if (reloadType == \"refresh\") {\r\n zTree.updateNode(treeNode); // 刷新一下当前节点,如果treeNode.xxx被改了的话\r\n }\r\n zTree.reAsyncChildNodes(treeNode, reloadType, true); // 强制加载子节点,reloadType === refresh为先清空再加载,否则为追加到现有子节点之后\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n if (ch.halfCheck === true) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n }\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n var treeObj = self.nodes;\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.$.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if(status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _getParentValues: function (treeNode) {\r\n if (!treeNode.getParentNode()) {\r\n return [];\r\n }\r\n var parentNode = treeNode.getParentNode();\r\n var result = this._getParentValues(parentNode);\r\n result = result.concat([this._getNodeValue(parentNode)]);\r\n return result;\r\n },\r\n\r\n _getNodeValue: function (node) {\r\n // 去除标红\r\n return node.value == null ? BI.replaceAll(node.text.replace(/<[^>]+>/g, \"\"), \"&nbsp;\", \" \") : node.value;\r\n },\r\n\r\n // 获取半选框值\r\n _getHalfSelectedValues: function (map, node) {\r\n var self = this;\r\n var checkState = node.getCheckStatus();\r\n // 将未选的去掉\r\n if (checkState.checked === false && checkState.half === false) {\r\n return;\r\n }\r\n // 如果节点已展开,并且是半选\r\n if (BI.isNotEmptyArray(node.children) && checkState.half === true) {\r\n var children = node.children;\r\n BI.each(children, function (i, ch) {\r\n self._getHalfSelectedValues(map, ch);\r\n });\r\n return;\r\n }\r\n var parent = node.parentValues || self._getParentValues(node);\r\n var path = parent.concat(this._getNodeValue(node));\r\n // 当前节点是全选的,因为上面的判断已经排除了不选和半选\r\n if (BI.isNotEmptyArray(node.children) || checkState.half === false) {\r\n this._buildTree(map, path);\r\n return;\r\n }\r\n // 剩下的就是半选不展开的节点,因为不知道里面是什么情况,所以借助selectedValues(这个是完整的选中情况)\r\n var storeValues = BI.deepClone(this.options.paras.selectedValues);\r\n var treeNode = this._getTree(storeValues, path);\r\n this._addTreeNode(map, parent, this._getNodeValue(node), treeNode);\r\n },\r\n\r\n // 获取的是以values最后一个节点为根的子树\r\n _getTree: function (map, values) {\r\n var cur = map;\r\n BI.any(values, function (i, value) {\r\n if (cur[value] == null) {\r\n return true;\r\n }\r\n cur = cur[value];\r\n });\r\n return cur;\r\n },\r\n\r\n // 以values为path一路向里补充map, 并在末尾节点添加key: value节点\r\n _addTreeNode: function (map, values, key, value) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n cur[key] = value;\r\n },\r\n\r\n // 构造树节点\r\n _buildTree: function (map, values) {\r\n var cur = map;\r\n BI.each(values, function (i, value) {\r\n if (cur[value] == null) {\r\n cur[value] = {};\r\n }\r\n cur = cur[value];\r\n });\r\n },\r\n\r\n // 获取选中的值\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots); // 可以看到这个方法没有递归调用,所以在_getHalfSelectedValues中需要关心全选的节点\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === true || checkState.half === true) {\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n } else {\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n }\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n // 处理节点\r\n _dealWidthNodes: function (nodes) {\r\n var self = this, o = this.options;\r\n var ns = BI.Tree.arrayFormat(nodes);\r\n BI.each(ns, function (i, n) {\r\n n.title = n.title || n.text || n.value;\r\n n.isParent = n.isParent || n.parent;\r\n // 处理标红\r\n if (BI.isKey(o.paras.keyword)) {\r\n n.text = BI.$(\"<div>\").__textKeywordMarked__(n.text, o.paras.keyword, n.py).html();\r\n } else {\r\n n.text = BI.htmlEncode(n.text + \"\");\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n this.tip.setLoading();\r\n var op = BI.extend({}, o.paras, {\r\n times: ++this.times\r\n });\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n // 生成树内部方法\r\n _initTree: function (setting) {\r\n var self = this, o = this.options;\r\n self.fireEvent(BI.Events.INIT);\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n this.loading();\r\n this.tip.setVisible(false);\r\n var callback = function (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n };\r\n var op = BI.extend({}, o.paras, {\r\n times: 1\r\n });\r\n\r\n o.itemsCreator(op, function (res) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n var hasNext = !!res.hasNext, nodes = res.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes));\r\n }\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n op.times === 1 && self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes, setting) {\r\n var setting = setting || {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true\r\n },\r\n callback: {}\r\n };\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n start: function () {\r\n this._stop = false;\r\n },\r\n\r\n stop: function () {\r\n this._stop = true;\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._createTree();\r\n this.start();\r\n this._initTree(setting);\r\n },\r\n\r\n populate: function () {\r\n this.stroke.apply(this, arguments);\r\n },\r\n\r\n hasChecked: function () {\r\n var treeObj = this.nodes;\r\n return treeObj.getCheckedNodes(true).length > 0;\r\n },\r\n\r\n checkAll: function (checked) {\r\n function setNode (children) {\r\n BI.each(children, function (i, child) {\r\n child.halfCheck = false;\r\n setNode(child.children);\r\n });\r\n }\r\n\r\n if (!this.nodes) {\r\n return;\r\n }\r\n\r\n BI.each(this.nodes.getNodes(), function (i, node) {\r\n node.halfCheck = false;\r\n setNode(node.children);\r\n });\r\n this.nodes.checkAllNodes(checked);\r\n },\r\n\r\n expandAll: function (flag) {\r\n this.nodes && this.nodes.expandAll(flag);\r\n },\r\n\r\n // 设置树节点的状态\r\n setValue: function (value, param) {\r\n this.checkAll(false);\r\n this.updateValue(value, param);\r\n this.refresh();\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = BI.deepClone(value || {});\r\n },\r\n\r\n updateValue: function (values, param) {\r\n if (!this.nodes) {\r\n return;\r\n }\r\n param || (param = \"value\");\r\n var treeObj = this.nodes;\r\n BI.each(values, function (v, op) {\r\n var nodes = treeObj.getNodesByParam(param, v, null);\r\n BI.each(nodes, function (j, node) {\r\n BI.extend(node, {checked: true}, op);\r\n treeObj.updateNode(node);\r\n });\r\n });\r\n },\r\n\r\n refresh: function () {\r\n this.nodes && this.nodes.refresh();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.nodes) {\r\n return null;\r\n }\r\n return this._getSelectedValues();\r\n },\r\n\r\n destroyed: function () {\r\n this.stop();\r\n this.nodes && this.nodes.destroy();\r\n }\r\n});\r\nBI.extend(BI.TreeView, {\r\n REQ_TYPE_INIT_DATA: 1,\r\n REQ_TYPE_ADJUST_DATA: 2,\r\n REQ_TYPE_SELECT_DATA: 3,\r\n REQ_TYPE_GET_SELECTED_DATA: 4\r\n});\r\n\r\nBI.TreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TreeView.EVENT_INIT = BI.Events.INIT;\r\nBI.TreeView.EVENT_AFTERINIT = BI.Events.AFTERINIT;\r\n\r\nBI.shortcut(\"bi.tree_view\", BI.TreeView);/**\r\n * guy\r\n * 同步树\r\n * @class BI.AsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.AsyncTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.AsyncTree.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.service = new BI.TreeRenderPageService({\r\n subNodeListGetter: function (tId) {\r\n // 获取待检测的子节点列表, ztree并没有获取节点列表dom的API, 此处使用BI.$获取\r\n return BI.$(\"#\" + self.id + \" #\" + tId + \"_ul\");\r\n }\r\n });\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n beforeCheck: beforeCheck,\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n onExpand: onExpand,\r\n onCollapse: onCollapse,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n var checked = treeNode.checked;\r\n var status = treeNode.getCheckStatus();\r\n if (status.half === true && status.checked === true) {\r\n checked = false;\r\n }\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n if (treeNode.checked === true) {\r\n // 将展开的节点halfCheck设为false,解决展开节点存在halfCheck=true的情况 guy\r\n // 所有的半选状态都需要取消halfCheck=true的情况\r\n function track (children) {\r\n BI.each(children, function (i, ch) {\r\n ch.halfCheck = false;\r\n track(ch.children);\r\n });\r\n }\r\n\r\n track(treeNode.children);\r\n\r\n var treeObj = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var nodes = treeObj.getSelectedNodes();\r\n BI.each(nodes, function (index, node) {\r\n node.halfCheck = false;\r\n });\r\n }\r\n var status = treeNode.getCheckStatus();\r\n // 当前点击节点的状态是半选,且为true_part, 则将其改为false_part,使得点击半选后切换到的是全选\r\n if (status.half === true && status.checked === true) {\r\n treeNode.checked = false;\r\n }\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n function onExpand (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n function onCollapse (event, treeId, treeNode) {\r\n treeNode.halfCheck = false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 用来更新this.options.paras.selectedValues, 和ztree内部无关\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n // var values = parentValues.concat([name]);\r\n if (treeNode.checked === true) {\r\n this._addTreeNode(this.options.paras.selectedValues, parentValues, name, {});\r\n } else {\r\n var tNode = treeNode;\r\n var pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n if (BI.isNotNull(pNode[name])) {\r\n delete pNode[name];\r\n }\r\n while (tNode != null && BI.isEmpty(pNode)) {\r\n parentValues = parentValues.slice(0, parentValues.length - 1);\r\n tNode = tNode.getParentNode();\r\n if (tNode != null) {\r\n pNode = this._getTree(this.options.paras.selectedValues, parentValues);\r\n name = this._getNodeValue(tNode);\r\n delete pNode[name];\r\n }\r\n }\r\n this.options.paras.selectedValues = this._getJoinValue();\r\n }\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n\r\n function callback(nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n if (hasNext) {\r\n self.service.pushNodeList(treeNode.tId, getNodes);\r\n } else {\r\n self.service.removeNodeList(treeNode.tId);\r\n }\r\n\r\n }\r\n\r\n function getNodes(options) {\r\n // console.log(times);\r\n options = options || {};\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: options.times,\r\n parentValues: parentValues.concat(self._getNodeValue(treeNode)),\r\n checkState: treeNode.getCheckStatus()\r\n }, options);\r\n o.itemsCreator(op, complete);\r\n }\r\n\r\n // 展开节点会将halfCheck置为false以开启自动计算半选, 所以第一次展开节点的时候需要在置为false之前获取配置\r\n var checkState = treeNode.getCheckStatus();\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n getNodes({\r\n times: 1,\r\n checkState: checkState\r\n });\r\n }, 17);\r\n }\r\n },\r\n\r\n // a,b 两棵树\r\n // a->b b->a 做两次校验, 构造一个校验后的map\r\n // e.g. 以a为基准,如果b没有此节点,则在map中添加。 如b有,且是全选的, 则在map中构造全选(为什么不添加a的值呢? 因为这次是取并集), 如果b中也有和a一样的存值,就递归\r\n _join: function (valueA, valueB) {\r\n var self = this;\r\n var map = {};\r\n track([], valueA, valueB);\r\n track([], valueB, valueA);\r\n\r\n function track (parent, node, compare) {\r\n BI.each(node, function (n, item) {\r\n if (BI.isNull(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else if (BI.isEmpty(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else {\r\n track(parent.concat([n]), node[n], compare[n]);\r\n }\r\n });\r\n }\r\n\r\n return map;\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.AsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n _getJoinValue: function () {\r\n if (!this.nodes) {\r\n return {};\r\n }\r\n var checkedValues = this._getSelectedValues();\r\n if (BI.isEmpty(checkedValues)) {\r\n return BI.deepClone(this.options.paras.selectedValues);\r\n }\r\n if (BI.isEmpty(this.options.paras.selectedValues)) {\r\n return checkedValues;\r\n }\r\n return this._join(checkedValues, this.options.paras.selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this._getJoinValue();\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n this.service.clear();\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.async_tree\", BI.AsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.PartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.PartTree = BI.inherit(BI.AsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.PartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = BI.deepClone(treeNode.parentValues || self._getParentValues(treeNode));\r\n var name = this._getNodeValue(treeNode);\r\n if (treeNode.checked === true) {\r\n this.options.paras.selectedValues = this._getUnionValue();\r\n // this._buildTree(self.options.paras.selectedValues, BI.concat(parentValues, name));\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_ADJUST_DATA,\r\n curSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (res) {\r\n self.options.paras.selectedValues = res;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n } else {\r\n // 如果选中的值中不存在该值不处理\r\n // 因为反正是不选中,没必要管\r\n var t = this.options.paras.selectedValues;\r\n var p = parentValues.concat(name);\r\n for (var i = 0, len = p.length; i < len; i++) {\r\n t = t[p[i]];\r\n if (t == null) {\r\n return;\r\n }\r\n // 选中中国-江苏, 搜索南京,取消勾选\r\n if (BI.isEmpty(t)) {\r\n break;\r\n }\r\n }\r\n o.itemsCreator(BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_SELECT_DATA,\r\n notSelectedValue: name,\r\n parentValues: parentValues\r\n }), function (new_values) {\r\n self.options.paras.selectedValues = new_values;\r\n BI.AsyncTree.superclass._selectTreeNode.apply(self, arguments);\r\n });\r\n }\r\n },\r\n\r\n _getSelectedValues: function () {\r\n var self = this;\r\n var hashMap = {};\r\n var rootNoots = this.nodes.getNodes();\r\n track(rootNoots);\r\n\r\n function track (nodes) {\r\n BI.each(nodes, function (i, node) {\r\n var checkState = node.getCheckStatus();\r\n if (checkState.checked === false) {\r\n return true;\r\n }\r\n var parentValues = node.parentValues || self._getParentValues(node);\r\n // 把文字中的html去掉,其实就是把文字颜色去掉\r\n var values = parentValues.concat([self._getNodeValue(node)]);\r\n self._buildTree(hashMap, values);\r\n // if(checkState.checked === true && checkState.half === false && nodes[i].flag === true){\r\n // continue;\r\n // }\r\n if (BI.isNotEmptyArray(node.children)) {\r\n track(node.children);\r\n return true;\r\n }\r\n if (checkState.half === true) {\r\n self._getHalfSelectedValues(hashMap, node);\r\n }\r\n });\r\n }\r\n\r\n return hashMap;\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.options.paras.selectedValues || {});\r\n },\r\n\r\n _getUnionValue: function () {\r\n if (!this.nodes) {\r\n return {};\r\n }\r\n var checkedValues = this._getSelectedValues();\r\n if (BI.isEmpty(checkedValues)) {\r\n return BI.deepClone(this.options.paras.selectedValues);\r\n }\r\n if (BI.isEmpty(this.options.paras.selectedValues)) {\r\n return checkedValues;\r\n }\r\n return this._union(checkedValues, this.options.paras.selectedValues);\r\n },\r\n\r\n _union: function (valueA, valueB) {\r\n var self = this;\r\n var map = {};\r\n track([], valueA, valueB);\r\n track([], valueB, valueA);\r\n\r\n function track (parent, node, compare) {\r\n BI.each(node, function (n, item) {\r\n if (BI.isNull(compare[n])) {\r\n self._addTreeNode(map, parent, n, item);\r\n } else if (BI.isEmpty(compare[n])) {\r\n self._addTreeNode(map, parent, n, {});\r\n } else {\r\n track(parent.concat([n]), node[n], compare[n]);\r\n }\r\n });\r\n }\r\n\r\n return map;\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.part_tree\", BI.PartTree);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[[\"A\"], [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListTreeView\r\n * @extends BI.TreeView\r\n */\r\nBI.ListTreeView = BI.inherit(BI.TreeView, {\r\n\r\n _constants: {\r\n SPLIT: \"<|>\"\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeView.superclass._defaultConfig.apply(this, arguments), {\r\n value: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.ListTreeView.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n if(BI.isNotNull(o.value)) {\r\n this.setSelectedValue(o.value);\r\n }\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _selectTreeNode: function (treeId, treeNode) {\r\n this._checkValue(treeNode, treeNode.checked);\r\n BI.ListTreeView.superclass._selectTreeNode.apply(this, arguments);\r\n },\r\n\r\n _transArrayToMap: function (treeArrays) {\r\n var self = this;\r\n var map = {};\r\n BI.each(treeArrays, function (idx, array) {\r\n var key = array.join(self._constants.SPLIT);\r\n map[key] = true;\r\n });\r\n return map;\r\n },\r\n\r\n _transMapToArray: function (treeMap) {\r\n var self = this;\r\n var array = [];\r\n BI.each(treeMap, function (key) {\r\n var item = key.split(self._constants.SPLIT);\r\n array.push(item);\r\n });\r\n return array;\r\n },\r\n\r\n _checkValue: function (treeNode, checked) {\r\n var key = BI.concat(this._getParentValues(treeNode), this._getNodeValue(treeNode)).join(this._constants.SPLIT);\r\n if(checked) {\r\n this.storeValue[key] = true;\r\n } else {\r\n delete this.storeValue[key];\r\n }\r\n },\r\n\r\n setSelectedValue: function (value) {\r\n this.options.paras.selectedValues = value || [];\r\n this.storeValue = this._transArrayToMap(value);\r\n },\r\n\r\n getValue: function () {\r\n return this._transMapToArray(this.storeValue);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_tree_view\", BI.ListTreeView);/**\r\n * author: windy\r\n * 继承自treeView, 此树的父子节点的勾选状态互不影响, 此树不会有半选节点\r\n * 返回value格式为[\"A\", [\"A\", \"a\"]]表示勾选了A且勾选了a\r\n * @class BI.ListListAsyncTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListAsyncTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListAsyncTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n _init: function () {\r\n BI.ListAsyncTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var paras = this.options.paras;\r\n var self = this;\r\n var setting = {\r\n async: {\r\n enable: false, // 很明显这棵树把异步请求关掉了,所有的异步请求都是手动控制的\r\n otherParam: BI.cjkEncodeDO(paras)\r\n },\r\n check: {\r\n enable: true,\r\n chkboxType: {Y: \"\", N: \"\"}\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n view: {\r\n showIcon: false,\r\n expandSpeed: \"\",\r\n nameIsHTML: true,\r\n dblClickExpand: false\r\n },\r\n callback: {\r\n onCheck: onCheck,\r\n beforeExpand: beforeExpand,\r\n beforeCheck: beforeCheck,\r\n onClick: onClick\r\n }\r\n };\r\n\r\n function beforeCheck (treeId, treeNode) {\r\n treeNode.half = false;\r\n }\r\n\r\n function onClick (event, treeId, treeNode) {\r\n var zTree = BI.$.fn.zTree.getZTreeObj(treeId);\r\n var checked = treeNode.checked;\r\n self._checkValue(treeNode, !checked);\r\n zTree.checkNode(treeNode, !checked, true, true);\r\n }\r\n\r\n function beforeExpand (treeId, treeNode) {\r\n self._beforeExpandNode(treeId, treeNode);\r\n }\r\n\r\n function onCheck (event, treeId, treeNode) {\r\n self._selectTreeNode(treeId, treeNode);\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n // 展开节点\r\n _beforeExpandNode: function (treeId, treeNode) {\r\n var self = this, o = this.options;\r\n var parentValues = treeNode.parentValues || self._getParentValues(treeNode);\r\n var op = BI.extend({}, o.paras, {\r\n id: treeNode.id,\r\n times: 1,\r\n parentValues: parentValues.concat(this._getNodeValue(treeNode))\r\n });\r\n var complete = function (d) {\r\n var nodes = d.items || [];\r\n if (nodes.length > 0) {\r\n callback(self._dealWidthNodes(nodes), !!d.hasNext);\r\n }\r\n };\r\n var times = 1;\r\n\r\n function callback (nodes, hasNext) {\r\n self.nodes.addNodes(treeNode, nodes);\r\n // 展开节点是没有分页的\r\n if (hasNext === true) {\r\n BI.delay(function () {\r\n times++;\r\n op.times = times;\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n }\r\n }\r\n\r\n if (!treeNode.children) {\r\n setTimeout(function () {\r\n o.itemsCreator(op, complete);\r\n }, 17);\r\n }\r\n },\r\n\r\n hasChecked: function () {\r\n return !BI.isEmpty(this.options.paras.selectedValues) || BI.ListAsyncTree.superclass.hasChecked.apply(this, arguments);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n delete this.options.keyword;\r\n BI.extend(this.options.paras, config);\r\n var setting = this._configSetting();\r\n this._initTree(setting);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_async_tree\", BI.ListAsyncTree);/**\r\n * guy\r\n * 局部树,两个请求树, 第一个请求构造树,第二个请求获取节点\r\n * @class BI.ListPartTree\r\n * @extends BI.AsyncTree\r\n */\r\nBI.ListPartTree = BI.inherit(BI.ListAsyncTree, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListPartTree.superclass._defaultConfig.apply(this, arguments), {});\r\n },\r\n\r\n _init: function () {\r\n BI.ListPartTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _loadMore: function () {\r\n var self = this, o = this.options;\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: ++this.times\r\n });\r\n this.tip.setLoading();\r\n o.itemsCreator(op, function (d) {\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n if (self._stop === true) {\r\n return;\r\n }\r\n if (!hasNext) {\r\n self.tip.setEnd();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n if (nodes.length > 0) {\r\n self.nodes.addNodes(null, self._dealWidthNodes(nodes));\r\n }\r\n });\r\n },\r\n\r\n _initTree: function (setting, keyword) {\r\n var self = this, o = this.options;\r\n this.times = 1;\r\n var tree = this.tree;\r\n tree.empty();\r\n self.tip.setVisible(false);\r\n this.loading();\r\n var op = BI.extend({}, o.paras, {\r\n type: BI.TreeView.REQ_TYPE_INIT_DATA,\r\n times: this.times\r\n });\r\n var complete = function (d) {\r\n if (self._stop === true || keyword != o.paras.keyword) {\r\n return;\r\n }\r\n var hasNext = !!d.hasNext, nodes = d.items || [];\r\n o.paras.lastSearchValue = d.lastSearchValue;\r\n // 没有请求到数据也要初始化空树, 如果不初始化, 树就是上一次构造的树, 节点信息都是过期的\r\n callback(nodes.length > 0 ? self._dealWidthNodes(nodes) : []);\r\n self.setTipVisible(nodes.length <= 0);\r\n self.loaded();\r\n if (!hasNext) {\r\n self.tip.invisible();\r\n } else {\r\n self.tip.setLoaded();\r\n }\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n };\r\n\r\n function callback (nodes) {\r\n if (self._stop === true) {\r\n return;\r\n }\r\n self.nodes = BI.$.fn.zTree.init(tree.element, setting, nodes);\r\n }\r\n\r\n BI.delay(function () {\r\n o.itemsCreator(op, complete);\r\n }, 100);\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (config) {\r\n var o = this.options;\r\n delete o.paras.keyword;\r\n BI.extend(o.paras, config);\r\n delete o.paras.lastSearchValue;\r\n var setting = this._configSetting();\r\n this._initTree(setting, o.paras.keyword);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.list_part_tree\", BI.ListPartTree);BI.prepares.push(function () {\r\n BI.Resizers = new BI.ResizeController();\r\n BI.Layers = new BI.LayerController();\r\n BI.Maskers = new BI.MaskersController();\r\n BI.Bubbles = new BI.BubblesController();\r\n BI.Tooltips = new BI.TooltipsController();\r\n BI.Popovers = new BI.PopoverController();\r\n BI.Broadcasts = new BI.BroadcastController();\r\n BI.StyleLoaders = new BI.StyleLoaderManager();\r\n});\r\n/**\r\n * CollectionView\r\n *\r\n * Created by GUY on 2016/1/15.\r\n * @class BI.CollectionView\r\n * @extends BI.Widget\r\n */\r\nBI.CollectionView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CollectionView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-collection\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n cellSizeAndPositionGetter: BI.emptyFn,\r\n horizontalOverscanSize: 0,\r\n verticalOverscanSize: 0,\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CollectionView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.CollectionView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._calculateSizeAndPositionData();\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _calculateSizeAndPositionData: function () {\r\n var o = this.options;\r\n var cellMetadata = [];\r\n var sectionManager = new BI.SectionManager();\r\n var height = 0;\r\n var width = 0;\r\n\r\n for (var index = 0, len = o.items.length; index < len; index++) {\r\n var cellMetadatum = o.cellSizeAndPositionGetter(index);\r\n\r\n if (cellMetadatum.height == null || isNaN(cellMetadatum.height) ||\r\n cellMetadatum.width == null || isNaN(cellMetadatum.width) ||\r\n cellMetadatum.x == null || isNaN(cellMetadatum.x) ||\r\n cellMetadatum.y == null || isNaN(cellMetadatum.y)) {\r\n throw Error();\r\n }\r\n\r\n height = Math.max(height, cellMetadatum.y + cellMetadatum.height);\r\n width = Math.max(width, cellMetadatum.x + cellMetadatum.width);\r\n\r\n cellMetadatum.index = index;\r\n cellMetadata[index] = cellMetadatum;\r\n sectionManager.registerCell(cellMetadatum, index);\r\n }\r\n\r\n this._cellMetadata = cellMetadata;\r\n this._sectionManager = sectionManager;\r\n this._height = height;\r\n this._width = width;\r\n },\r\n\r\n _cellRenderers: function (height, width, x, y) {\r\n this._lastRenderedCellIndices = this._sectionManager.getCellIndices(height, width, x, y);\r\n return this._cellGroupRenderer();\r\n },\r\n\r\n _cellGroupRenderer: function () {\r\n var self = this, o = this.options;\r\n var rendered = [];\r\n BI.each(this._lastRenderedCellIndices, function (i, index) {\r\n var cellMetadata = self._sectionManager.getCellMetadata(index);\r\n rendered.push(cellMetadata);\r\n });\r\n return rendered;\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n var scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft());\r\n var scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop());\r\n var left = Math.max(0, scrollLeft - o.horizontalOverscanSize);\r\n var top = Math.max(0, scrollTop - o.verticalOverscanSize);\r\n var right = Math.min(this._width, scrollLeft + o.width + o.horizontalOverscanSize);\r\n var bottom = Math.min(this._height, scrollTop + o.height + o.verticalOverscanSize);\r\n if (right > 0 && bottom > 0) {\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n var childrenToDisplay = this._cellRenderers(bottom - top, right - left, left, top);\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n // 存储所有的left和top\r\n var lefts = {}, tops = {};\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n lefts[datum.x] = datum.x;\r\n lefts[datum.x + datum.width] = datum.x + datum.width;\r\n tops[datum.y] = datum.y;\r\n tops[datum.y + datum.height] = datum.y + datum.height;\r\n }\r\n lefts = BI.toArray(lefts);\r\n tops = BI.toArray(tops);\r\n var leftMap = BI.invert(lefts);\r\n var topMap = BI.invert(tops);\r\n // 存储上下左右四个边界\r\n var leftBorder = {}, rightBorder = {}, topBorder = {}, bottomBorder = {};\r\n var assertMinBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = Number.MAX_VALUE;\r\n }\r\n };\r\n var assertMaxBorder = function (border, offset) {\r\n if (border[offset] == null) {\r\n border[offset] = 0;\r\n }\r\n };\r\n for (var i = 0, len = childrenToDisplay.length; i < len; i++) {\r\n var datum = childrenToDisplay[i];\r\n var index = this.renderedKeys[datum.index] && this.renderedKeys[datum.index][1];\r\n var child;\r\n if (index >= 0) {\r\n if (datum.width !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = datum.width;\r\n this.renderedCells[index].el.setWidth(datum.width);\r\n }\r\n if (datum.height !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = datum.height;\r\n this.renderedCells[index].el.setHeight(datum.height);\r\n }\r\n if (this.renderedCells[index]._left !== datum.x) {\r\n this.renderedCells[index].el.element.css(\"left\", datum.x + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== datum.y) {\r\n this.renderedCells[index].el.element.css(\"top\", datum.y + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: datum.width,\r\n height: datum.height\r\n }, o.items[datum.index], {\r\n cls: (o.items[datum.index].cls || \"\") + \" container-cell\" + (datum.y === 0 ? \" first-row\" : \"\") + (datum.x === 0 ? \" first-col\" : \"\"),\r\n _left: datum.x,\r\n _top: datum.y\r\n }));\r\n renderedCells.push({\r\n el: child,\r\n left: datum.x,\r\n top: datum.y,\r\n _left: datum.x,\r\n _top: datum.y,\r\n _width: datum.width,\r\n _height: datum.height\r\n });\r\n }\r\n var startTopIndex = topMap[datum.y] | 0;\r\n var endTopIndex = topMap[datum.y + datum.height] | 0;\r\n for (var k = startTopIndex; k <= endTopIndex; k++) {\r\n var t = tops[k];\r\n assertMinBorder(leftBorder, t);\r\n assertMaxBorder(rightBorder, t);\r\n leftBorder[t] = Math.min(leftBorder[t], datum.x);\r\n rightBorder[t] = Math.max(rightBorder[t], datum.x + datum.width);\r\n }\r\n var startLeftIndex = leftMap[datum.x] | 0;\r\n var endLeftIndex = leftMap[datum.x + datum.width] | 0;\r\n for (var k = startLeftIndex; k <= endLeftIndex; k++) {\r\n var l = lefts[k];\r\n assertMinBorder(topBorder, l);\r\n assertMaxBorder(bottomBorder, l);\r\n topBorder[l] = Math.min(topBorder[l], datum.y);\r\n bottomBorder[l] = Math.max(bottomBorder[l], datum.y + datum.height);\r\n }\r\n\r\n renderedKeys[datum.index] = [datum.index, i];\r\n renderedWidgets[i] = child;\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[1]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[1]]);\r\n });\r\n this.container.addItems(addedItems);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n\r\n // Todo 左右比较特殊\r\n var minX = BI.min(leftBorder);\r\n var maxX = BI.max(rightBorder);\r\n\r\n var minY = BI.max(topBorder);\r\n var maxY = BI.min(bottomBorder);\r\n\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._width - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._height - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n this._reRange();\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n this._calculateSizeAndPositionData();\r\n }\r\n if (o.items.length > 0) {\r\n this.container.setWidth(this._width);\r\n this.container.setHeight(this._height);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.CollectionView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.collection_view\", BI.CollectionView);/**\r\n * @class BI.Combo\r\n * @extends BI.Widget\r\n */\r\nBI.Combo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right||right,innerRight||right,innerLeft||innerRight||innerLeft\r\n logic: {\r\n dynamic: true\r\n },\r\n container: null, // popupview放置的容器,默认为this.element\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopEvent: false,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {},\r\n comboClass: \"bi-combo-popup\",\r\n hoverClass: \"bi-combo-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Combo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initCombo();\r\n this._initPullDownAction();\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Combo.EVENT_TRIGGER_CHANGE, obj);\r\n }\r\n }\r\n });\r\n\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: [\r\n { el: this.combo }\r\n ]\r\n }))));\r\n o.isDefaultInit && (this._assertPopupView());\r\n BI.Resizers.add(this.getName(), BI.bind(function () {\r\n if (this.isViewVisible()) {\r\n this._hideView();\r\n }\r\n }, this));\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = (this.options.trigger || \"\").split(\",\");\r\n var st = function (e) {\r\n if (o.stopEvent) {\r\n e.stopEvent();\r\n }\r\n if (o.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n };\r\n\r\n var enterPopup = false;\r\n\r\n function hide () {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid() && o.toggle === true) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n self.popupView && self.popupView.element.off(\"mouseenter.\" + self.getName()).off(\"mouseleave.\" + self.getName());\r\n enterPopup = false;\r\n }\r\n\r\n BI.each(evs, function (i, ev) {\r\n switch (ev) {\r\n case \"hover\":\r\n self.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (!o.toggle && self.isViewVisible()) {\r\n // return;\r\n // }\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(ev + \".\" + self.getName()).on(ev + \".\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n break;\r\n case \"click-hover\":\r\n var debounce = BI.debounce(function (e) {\r\n if (self.combo.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.combo.isEnabled() && self.combo.isValid()) {\r\n // if (self.isViewVisible()) {\r\n // return;\r\n // }\r\n self._popupView();\r\n if (self.isViewVisible()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.combo);\r\n self.fireEvent(BI.Combo.EVENT_EXPAND);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n self.element.off(\"click.\" + self.getName()).on(\"click.\" + self.getName(), function (e) {\r\n debounce(e);\r\n st(e);\r\n });\r\n self.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n if (self.popupView) {\r\n self.popupView.element.on(\"mouseenter.\" + self.getName(), function (e) {\r\n enterPopup = true;\r\n self.popupView.element.on(\"mouseleave.\" + self.getName(), function (e) {\r\n hide();\r\n });\r\n self.popupView.element.off(\"mouseenter.\" + self.getName());\r\n });\r\n BI.defer(function () {\r\n if (!enterPopup) {\r\n hide();\r\n }\r\n }, 50);\r\n }\r\n });\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initCombo: function () {\r\n this.combo = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.popup_view\",\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.combo.setValue(self.getValue());\r\n self.fireEvent(BI.Combo.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.popupView.setVisible(false);\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Combo.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this.options.container || this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideIf: function (e) {\r\n // if (this.element.__isMouseInBounds__(e) || (this.popupView && this.popupView.element.__isMouseInBounds__(e))) {\r\n // return;\r\n // }\r\n // BI-10290 公式combo双击公式内容会收起\r\n if ((this.element.find(e.target).length > 0)\r\n || (this.popupView && this.popupView.element.find(e.target).length > 0)\r\n || e.target.className === \"CodeMirror-cursor\" || BI.Widget._renderEngine.createElement(e.target).closest(\".CodeMirror-hints\").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下\r\n var directions = this.options.direction.split(\",\");\r\n if (BI.contains(directions, \"innerLeft\") || BI.contains(directions, \"innerRight\")) {\r\n // popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置\r\n this.adjustWidth();\r\n this.adjustHeight();\r\n }\r\n return;\r\n }\r\n var isHide = this.options.hideChecker.apply(this, [e]);\r\n if (isHide === false) {\r\n return;\r\n }\r\n this._hideView();\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_HIDEVIEW);\r\n if (this.options.destroyWhenHide === true) {\r\n this.popupView && this.popupView.destroy();\r\n this.popupView = null;\r\n this._rendered = false;\r\n } else {\r\n this.popupView && this.popupView.invisible();\r\n }\r\n this.element.removeClass(this.options.comboClass);\r\n\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function (e) {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Combo.EVENT_BEFORE_POPUPVIEW);\r\n\r\n this.popupView.visible();\r\n this.adjustWidth(e);\r\n this.adjustHeight(e);\r\n\r\n this.element.addClass(this.options.comboClass);\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName()).unbind(\"mousewheel.\" + this.getName());\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + this.getName(), BI.bind(this._hideIf, this)).bind(\"mousewheel.\" + this.getName(), BI.bind(this._hideIf, this));\r\n this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n adjustWidth: function (e) {\r\n var o = this.options;\r\n if (!this.popupView) {\r\n return;\r\n }\r\n if (o.isNeedAdjustWidth === true) {\r\n this.resetListWidth(\"\");\r\n var width = this.popupView.element.outerWidth();\r\n var maxW = this.element.outerWidth() || o.width;\r\n if (width > maxW + 80) {\r\n maxW = maxW + 80;\r\n } else if (width > maxW) {\r\n maxW = width;\r\n }\r\n this.resetListWidth(maxW < 100 ? 100 : maxW);\r\n }\r\n },\r\n\r\n adjustHeight: function (e) {\r\n var o = this.options, p = {};\r\n if (!this.popupView) {\r\n return;\r\n }\r\n var isVisible = this.popupView.isVisible();\r\n this.popupView.visible();\r\n var combo = BI.isNotNull(e) ? {\r\n element: {\r\n offset: function () {\r\n return {\r\n left: e.pageX,\r\n top: e.pageY\r\n };\r\n },\r\n bounds: function () {\r\n // offset为其相对于父定位元素的偏移\r\n return {\r\n x: e.offsetX,\r\n y: e.offsetY,\r\n width: 0,\r\n height: 24\r\n };\r\n },\r\n outerWidth: function () {\r\n return 0;\r\n },\r\n outerHeight: function () {\r\n return 24;\r\n }\r\n }\r\n } : this.combo;\r\n switch (o.direction) {\r\n case \"bottom\":\r\n case \"bottom,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"top\":\r\n case \"top,right\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"right\", \"left\"], o.offsetStyle);\r\n break;\r\n case \"left\":\r\n case \"left,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right\":\r\n case \"right,bottom\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"top\", \"bottom\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"bottom,left\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight, [\"bottom\", \"top\", \"left\", \"right\"], o.offsetStyle);\r\n break;\r\n case \"left,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"left\", \"right\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,top\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"top\", \"bottom\"], o.offsetStyle);\r\n break;\r\n case \"right,innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerRight\", \"innerLeft\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"right,innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"right\", \"left\", \"innerLeft\", \"innerRight\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerRight\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerRight\", \"innerLeft\", \"right\", \"left\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"innerLeft\":\r\n p = BI.DOM.getComboPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength, o.adjustYOffset, o.isNeedAdjustHeight, [\"innerLeft\", \"innerRight\", \"left\", \"right\", \"bottom\", \"top\"], o.offsetStyle);\r\n break;\r\n case \"top,custom\":\r\n case \"custom,top\":\r\n p = BI.DOM.getTopAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"custom,bottom\":\r\n case \"bottom,custom\":\r\n p = BI.DOM.getBottomAdaptPosition(combo, this.popupView, o.adjustYOffset || o.adjustLength, o.isNeedAdjustHeight);\r\n break;\r\n case \"left,custom\":\r\n case \"custom,left\":\r\n p = BI.DOM.getLeftAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n case \"custom,right\":\r\n case \"right,custom\":\r\n p = BI.DOM.getRightAdaptPosition(combo, this.popupView, o.adjustXOffset || o.adjustLength);\r\n delete p.top;\r\n delete p.adaptHeight;\r\n break;\r\n }\r\n\r\n if (\"adaptHeight\" in p) {\r\n this.resetListHeight(p[\"adaptHeight\"]);\r\n }\r\n if (\"left\" in p) {\r\n this.popupView.element.css({\r\n left: p.left\r\n });\r\n }\r\n if (\"top\" in p) {\r\n this.popupView.element.css({\r\n top: p.top\r\n });\r\n }\r\n this.position = p;\r\n this.popupView.setVisible(isVisible);\r\n },\r\n\r\n resetListHeight: function (h) {\r\n this._assertPopupView();\r\n this.popupView.resetHeight && this.popupView.resetHeight(h);\r\n },\r\n\r\n resetListWidth: function (w) {\r\n this._assertPopupView();\r\n this.popupView.resetWidth && this.popupView.resetWidth(w);\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Combo.superclass._setEnable.apply(this, arguments);\r\n if (arg === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (arg === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.combo.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n showView: function (e) {\r\n // 减少popup 调整宽高的次数\r\n if (this.isEnabled() && this.combo.isEnabled() && !this.isViewVisible()) {\r\n this._popupView(e);\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getPopupPosition: function () {\r\n return this.position;\r\n },\r\n\r\n toggle: function () {\r\n this._toggle();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + this.getName())\r\n .unbind(\"mousewheel.\" + this.getName())\r\n .unbind(\"mouseenter.\" + this.getName())\r\n .unbind(\"mousemove.\" + this.getName())\r\n .unbind(\"mouseleave.\" + this.getName());\r\n BI.Resizers.remove(this.getName());\r\n this.popupView && this.popupView._destroy();\r\n }\r\n});\r\nBI.Combo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Combo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Combo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Combo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Combo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Combo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Combo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Combo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Combo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.combo\", BI.Combo);/**\r\n *\r\n * 某个可以展开的节点\r\n *\r\n * Created by GUY on 2015/9/10.\r\n * @class BI.Expander\r\n * @extends BI.Widget\r\n */\r\nBI.Expander = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Expander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-expander\",\r\n trigger: \"click\",\r\n toggle: true,\r\n // direction: \"bottom\", //top,bottom四个方向\r\n isDefaultInit: false, // 是否默认初始化子节点\r\n el: {},\r\n popup: {},\r\n expanderClass: \"bi-expander-popup\",\r\n hoverClass: \"bi-expander-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Expander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._expanded = !!o.el.open;\r\n this._initExpander();\r\n this._initPullDownAction();\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Expander.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.expander}\r\n ]\r\n });\r\n o.isDefaultInit && this._assertPopupView();\r\n if (this.expander.isOpened() === true) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupViewRender();\r\n if (this.popupView.isVisible()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n case \"click\":\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.expander.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.isValid() && self.expander.isEnabled() && self.expander.isValid()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.expander);\r\n self.fireEvent(BI.Expander.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initExpander: function () {\r\n this.expander = BI.createWidget(this.options.el);\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (this.popupView == null) {\r\n this.popupView = BI.createWidget(this.options.popup, {\r\n type: \"bi.button_group\",\r\n cls: \"expander-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n // self.setValue(self.getValue());\r\n self.fireEvent(BI.Expander.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.popupView.setVisible(this.isExpanded());\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Expander.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _assertPopupViewRender: function () {\r\n this._assertPopupView();\r\n if (!this._rendered) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n this._rendered = true;\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_HIDEVIEW);\r\n this._expanded = false;\r\n this.expander.setOpened(false);\r\n this.popupView && this.popupView.invisible();\r\n this.element.removeClass(this.options.expanderClass);\r\n\r\n this.fireEvent(BI.Expander.EVENT_AFTER_HIDEVIEW);\r\n },\r\n\r\n _popupView: function () {\r\n this._assertPopupViewRender();\r\n this.fireEvent(BI.Expander.EVENT_BEFORE_POPUPVIEW);\r\n this._expanded = true;\r\n this.expander.setOpened(true);\r\n this.popupView.visible();\r\n this.element.addClass(this.options.expanderClass);\r\n this.fireEvent(BI.Expander.EVENT_AFTER_POPUPVIEW);\r\n },\r\n\r\n populate: function (items) {\r\n // this._assertPopupView();\r\n this.popupView && this.popupView.populate.apply(this.popupView, arguments);\r\n this.expander.populate.apply(this.expander, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Expander.superclass._setEnable.apply(this, arguments);\r\n !arg && this.element.removeClass(this.options.hoverClass);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.expander.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.expander.isEnabled() && !!this.popupView && this.popupView.isVisible();\r\n },\r\n\r\n isExpanded: function () {\r\n return this._expanded;\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.expander.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.expander.options.id === id) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.expander.getValue() === value) {\r\n return this.expander;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n destroy: function () {\r\n BI.Expander.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Expander.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Expander.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Expander.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Expander.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Expander.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Expander.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Expander.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Expander.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Expander.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.expander\", BI.Expander);/**\r\n * Created by GUY on 2015/8/10.\r\n */\r\n\r\nBI.ComboGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ComboGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-combo-group bi-list-item\",\r\n\r\n // 以下这些属性对每一个combo都是公用的\r\n trigger: \"click,hover\",\r\n direction: \"right\",\r\n adjustLength: 0,\r\n isDefaultInit: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n\r\n el: {type: \"bi.text_button\", text: \"\", value: \"\"},\r\n children: [],\r\n\r\n popup: {\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ComboGroup.superclass._init.apply(this, arguments);\r\n this._populate(this.options.el);\r\n },\r\n\r\n _populate: function (item) {\r\n var self = this, o = this.options;\r\n var children = o.children;\r\n if (BI.isEmpty(children)) {\r\n throw new Error(\"ComboGroup构造错误\");\r\n }\r\n BI.each(children, function (i, ch) {\r\n var son = BI.formatEL(ch).el.children;\r\n ch = BI.formatEL(ch).el;\r\n if (!BI.isEmpty(son)) {\r\n ch.el = BI.clone(ch);\r\n ch.children = son;\r\n ch.type = \"bi.combo_group\";\r\n ch.action = o.action;\r\n ch.height = o.height;\r\n ch.direction = o.direction;\r\n ch.isDefaultInit = o.isDefaultInit;\r\n ch.isNeedAdjustHeight = o.isNeedAdjustHeight;\r\n ch.isNeedAdjustWidth = o.isNeedAdjustWidth;\r\n ch.adjustLength = o.adjustLength;\r\n ch.popup = o.popup;\r\n }\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n height: o.height,\r\n trigger: o.trigger,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n adjustLength: o.adjustLength,\r\n el: item,\r\n popup: BI.extend({}, o.popup, {\r\n el: BI.extend({\r\n items: children\r\n }, o.popup.el)\r\n })\r\n });\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ComboGroup.EVENT_CHANGE, obj);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n }\r\n});\r\nBI.ComboGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.combo_group\", BI.ComboGroup);BI.VirtualGroup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.VirtualGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-virtual-group\",\r\n items: [],\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n },\r\n\r\n render: function () {\r\n var o = this.options;\r\n this.populate(o.items);\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _packageBtns: function (items) {\r\n var o = this.options;\r\n var map = this.buttonMap = {};\r\n for (var i = o.layouts.length - 1; i > 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n var el = BI.stripEL(it);\r\n return BI.extend({}, o.layouts[i], {\r\n items: [\r\n BI.extend({}, o.layouts[i].el, {\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n if (BI.isKey(map[el.value])) {\r\n map[el.value] = _ref;\r\n }\r\n }\r\n }, el)\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n _packageLayout: function (items) {\r\n var o = this.options, layout = BI.deepClone(o.layouts[0]);\r\n\r\n var lay = BI.formatEL(layout).el;\r\n while (lay && lay.items && !BI.isEmpty(lay.items)) {\r\n lay = BI.formatEL(lay.items[0]).el;\r\n }\r\n lay.items = items;\r\n return layout;\r\n },\r\n\r\n addItems: function (items) {\r\n this.layouts.addItems(items);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.layouts.prependItems(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n BI.each(this.buttonMap, function (key, item) {\r\n if (item) {\r\n if (v.deepContains(key)) {\r\n item.setSelected && item.setSelected(true);\r\n } else {\r\n item.setSelected && item.setSelected(false);\r\n }\r\n }\r\n });\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && !(item.isSelected && item.isSelected())) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var v = [];\r\n BI.each(this.buttonMap, function (i, item) {\r\n if (item) {\r\n if (item.isEnabled() && item.isSelected && item.isSelected()) {\r\n v.push(item.getValue());\r\n }\r\n }\r\n });\r\n return v;\r\n },\r\n\r\n populate: function (items) {\r\n var self = this;\r\n items = items || [];\r\n this.options.items = items;\r\n items = this._packageBtns(items);\r\n if (!this.layouts) {\r\n this.layouts = BI.createWidget(BI.extend({element: this}, this._packageLayout(items)));\r\n } else {\r\n this.layouts.populate(items);\r\n }\r\n }\r\n});\r\nBI.VirtualGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.virtual_group\", BI.VirtualGroup);/**\r\n * 加载控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Loader\r\n * @extends BI.Widget\r\n */\r\nBI.Loader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Loader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-loader\",\r\n\r\n direction: \"top\",\r\n isDefaultInit: true, // 是否默认初始化数据\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n prev: false,\r\n next: {},\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _prevLoad: function () {\r\n var self = this, o = this.options;\r\n this.prev.setLoading();\r\n o.itemsCreator.apply(this, [{times: --this.times}, function () {\r\n self.prev.setLoaded();\r\n self.prependItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.Loader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.prev = false;\r\n o.next = false;\r\n }\r\n if (o.prev !== false) {\r\n this.prev = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.prev));\r\n this.prev.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._prevLoad();\r\n }\r\n });\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Loader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.prev, this.button_group, this.next)\r\n }))));\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n o.isDefaultInit && BI.isEmpty(o.items) && this._populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this._populate(o.items);\r\n }\r\n },\r\n\r\n hasPrev: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasPrev.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n prependItems: function (items) {\r\n this.count += items.length;\r\n if (this.next !== false) {\r\n if (this.hasPrev()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.setEnd();\r\n }\r\n }\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.options.items = this.options.items.concat(items);\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n },\r\n\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"arguments can not be null!!!\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return false;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n if (BI.isObject(this.prev)) {\r\n if (this.hasPrev()) {\r\n this.prev.setLoaded();\r\n } else {\r\n this.prev.invisible();\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments) && this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n BI.each([this.prev, this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n destroy: function () {\r\n BI.Loader.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Loader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.loader\", BI.Loader);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Navigation = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Navigation.superclass._defaultConfig.apply(this, arguments), {\r\n direction: \"bottom\", // top, bottom, left, right, custom\r\n logic: {\r\n dynamic: false\r\n },\r\n single: false,\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n },\r\n\r\n afterCardCreated: BI.emptyFn,\r\n afterCardShow: BI.emptyFn\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.cardMap = {};\r\n this.showIndex = 0;\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n\r\n new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardNameCreator: function (v) {\r\n return self.showIndex + v;\r\n },\r\n cardCreator: function (v) {\r\n var card = o.cardCreator(v);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardCreated: BI.bind(this.afterCardCreated, this),\r\n afterCardShow: BI.bind(this.afterCardShow, this)\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n afterCardCreated: function (v) {\r\n var self = this;\r\n this.cardMap[v].on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Navigation.EVENT_CHANGE, obj);\r\n }\r\n });\r\n this.options.afterCardCreated.apply(this, arguments);\r\n },\r\n\r\n afterCardShow: function (v) {\r\n this.showIndex = v;\r\n this._deleteOtherCards(v);\r\n this.options.afterCardShow.apply(this, arguments);\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n this.afterCardCreated(v);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.showIndex !== v) {\r\n this.showIndex = v;\r\n BI.nextTick(BI.bind(this.afterCardShow, this, v));\r\n }\r\n },\r\n\r\n getSelect: function () {\r\n return this.showIndex;\r\n },\r\n\r\n getSelectedCard: function () {\r\n if (BI.isKey(this.showIndex)) {\r\n return this.cardMap[this.showIndex];\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n /**\r\n * @override\r\n */\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n BI.Navigation.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Navigation.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.navigation\", BI.Navigation);/**\r\n * 搜索逻辑控件\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.Searcher\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.Searcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Searcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-searcher\",\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n\r\n isDefaultInit: false,\r\n isAutoSearch: true, // 是否自动搜索\r\n isAutoSync: true, // 是否自动同步数据, 即是否保持搜索面板和adapter面板状态值的统一\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n allowSearchBlank: true, // 是否能够搜索包含空格的字符串\r\n\r\n // isAutoSearch为false时启用\r\n onSearch: function (op, callback) {\r\n callback([]);\r\n },\r\n\r\n el: {\r\n type: \"bi.search_editor\"\r\n },\r\n\r\n popup: {\r\n type: \"bi.searcher_view\"\r\n },\r\n\r\n adapter: null,\r\n masker: { // masker层\r\n offset: {}\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Searcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.search_editor\"\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: [this.editor]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n\r\n var search = BI.debounce(BI.bind(this._search, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n switch (type) {\r\n case BI.Events.STARTEDIT:\r\n self._startSearch();\r\n break;\r\n case BI.Events.EMPTY:\r\n self._stopSearch();\r\n break;\r\n case BI.Events.CHANGE:\r\n search();\r\n break;\r\n case BI.Events.PAUSE:\r\n self._pauseSearch();\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if ((o.masker && !BI.Maskers.has(this.getName())) || (o.masker === false && !this.popupView)) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.searcher_view\",\r\n chooseType: o.chooseType\r\n });\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n if (o.isAutoSync) {\r\n var values = o.adapter && o.adapter.getValue();\r\n if (!obj.isSelected()) {\r\n o.adapter && o.adapter.setValue(BI.deepWithout(values, obj.getValue()));\r\n } else {\r\n switch (o.chooseType) {\r\n case BI.ButtonGroup.CHOOSE_TYPE_SINGLE:\r\n o.adapter && o.adapter.setValue([obj.getValue()]);\r\n break;\r\n case BI.ButtonGroup.CHOOSE_TYPE_MULTI:\r\n values.push(obj.getValue());\r\n o.adapter && o.adapter.setValue(values);\r\n break;\r\n }\r\n }\r\n }\r\n self.fireEvent(BI.Searcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Searcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n if (o.masker && !BI.Maskers.has(this.getName())) {\r\n BI.Maskers.create(this.getName(), o.adapter, BI.extend({\r\n container: this,\r\n render: this.popupView\r\n }, o.masker), this);\r\n }\r\n },\r\n\r\n _startSearch: function () {\r\n this._assertPopupView();\r\n this._stop = false;\r\n this._isSearching = true;\r\n this.fireEvent(BI.Searcher.EVENT_START);\r\n this.popupView.startSearch && this.popupView.startSearch();\r\n // 搜索前先清空dom\r\n // BI.Maskers.get(this.getName()).empty();\r\n BI.nextTick(function (name) {\r\n BI.Maskers.show(name);\r\n }, this.getName());\r\n },\r\n\r\n _pauseSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.nextTick(function (name) {\r\n BI.Maskers.hide(name);\r\n }, this.getName());\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.pauseSearch && this.popupView.pauseSearch();\r\n this.fireEvent(BI.Searcher.EVENT_PAUSE);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _stopSearch: function () {\r\n var o = this.options, name = this.getName();\r\n this._stop = true;\r\n BI.Maskers.hide(name);\r\n if (this._isSearching === true) {\r\n this.popupView && this.popupView.stopSearch && this.popupView.stopSearch();\r\n this.fireEvent(BI.Searcher.EVENT_STOP);\r\n }\r\n this._isSearching = false;\r\n },\r\n\r\n _search: function () {\r\n var self = this, o = this.options, keyword = o.allowSearchBlank ? this.editor.getValue() : this._getLastSearchKeyword();\r\n if (keyword === \"\" || this._stop) {\r\n return;\r\n }\r\n if (o.isAutoSearch) {\r\n var items = (o.adapter && ((o.adapter.getItems && o.adapter.getItems()) || o.adapter.attr(\"items\"))) || [];\r\n var finding = BI.Func.getSearchResult(items, keyword);\r\n var match = finding.match, find = finding.find;\r\n this.popupView.populate(find, match, keyword);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && this.popupView.setValue(o.adapter.getValue());\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n return;\r\n }\r\n this.popupView.loading && this.popupView.loading();\r\n o.onSearch({\r\n times: 1,\r\n keyword: keyword,\r\n selectedValues: o.adapter && o.adapter.getValue()\r\n }, function (searchResult, matchResult) {\r\n if (!self._stop) {\r\n var args = [].slice.call(arguments);\r\n if (args.length > 0) {\r\n args.push(keyword);\r\n }\r\n BI.Maskers.show(self.getName());\r\n self.popupView.populate.apply(self.popupView, args);\r\n o.isAutoSync && o.adapter && o.adapter.getValue && self.popupView.setValue(o.adapter.getValue());\r\n self.popupView.loaded && self.popupView.loaded();\r\n self.fireEvent(BI.Searcher.EVENT_SEARCHING);\r\n }\r\n });\r\n },\r\n\r\n _getLastSearchKeyword: function () {\r\n if (this.isValid()) {\r\n var res = this.editor.getValue().match(/[\\S]+/g);\r\n return BI.isNull(res) ? \"\" : res[res.length - 1];\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n doSearch: function () {\r\n if (this.isSearching()) {\r\n this._search();\r\n }\r\n },\r\n\r\n stopSearch: function () {\r\n this._stopSearch();// 先停止搜索,然后再去设置editor为空\r\n // important:停止搜索必须退出编辑状态,这里必须加上try(input框不显示时blur会抛异常)\r\n try {\r\n this.editor.blur();\r\n } catch (e) {\r\n if (!this.editor.blur) {\r\n throw new Error(\"editor没有实现blur方法\");\r\n }\r\n } finally {\r\n this.editor.setValue(\"\");\r\n }\r\n },\r\n\r\n isSearching: function () {\r\n return this._isSearching;\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.editor.isEnabled() && BI.Maskers.isVisible(this.getName());\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n hasMatched: function () {\r\n this._assertPopupView();\r\n return this.popupView.hasMatched();\r\n },\r\n\r\n adjustHeight: function () {\r\n if (BI.Maskers.has(this.getName()) && BI.Maskers.get(this.getName()).isVisible()) {\r\n BI.Maskers.show(this.getName());\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getKeyword: function () {\r\n return this._getLastSearchKeyword();\r\n },\r\n\r\n getKeywords: function () {\r\n return this.editor.getKeywords();\r\n },\r\n\r\n getValue: function () {\r\n var o = this.options;\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (this.isSearching()) {\r\n return this.popupView.getValue();\r\n } else if (o.adapter && o.adapter.getValue) {\r\n return o.adapter.getValue();\r\n }\r\n if (BI.isNull(this.popupView)) {\r\n return o.popup.value;\r\n }\r\n return this.popupView.getValue();\r\n\r\n },\r\n\r\n populate: function (result, searchResult, keyword) {\r\n var o = this.options;\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n if (o.isAutoSync && o.adapter && o.adapter.getValue) {\r\n this.popupView.setValue(o.adapter.getValue());\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Maskers.remove(this.getName());\r\n }\r\n});\r\nBI.Searcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Searcher.EVENT_START = \"EVENT_START\";\r\nBI.Searcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Searcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Searcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.Searcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\nBI.shortcut(\"bi.searcher\", BI.Searcher);/**\r\n *\r\n * 切换显示或隐藏面板\r\n *\r\n * Created by GUY on 2015/11/2.\r\n * @class BI.Switcher\r\n * @extends BI.Widget\r\n */\r\nBI.Switcher = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Switcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-switcher\",\r\n direction: BI.Direction.Top,\r\n trigger: \"click\",\r\n toggle: true,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {},\r\n switcherClass: \"bi-switcher-popup\",\r\n hoverClass: \"bi-switcher-hover\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Switcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._initSwitcher();\r\n this._initPullDownAction();\r\n this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self.isEnabled() && self.isValid()) {\r\n if (type === BI.Events.EXPAND) {\r\n self._popupView();\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self._hideView();\r\n }\r\n if (type === BI.Events.EXPAND) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n if (type === BI.Events.COLLAPSE) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.isViewVisible() && self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_TRIGGER_CHANGE, value, obj);\r\n }\r\n }\r\n });\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.addClass(o.hoverClass);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self.element.removeClass(o.hoverClass);\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.switcher}\r\n ]\r\n });\r\n o.isDefaultInit && (this._assertPopupView());\r\n },\r\n\r\n _toggle: function () {\r\n this._assertPopupView();\r\n if (this.isExpanded()) {\r\n this._hideView();\r\n } else {\r\n if (this.isEnabled()) {\r\n this._popupView();\r\n }\r\n }\r\n },\r\n\r\n _initPullDownAction: function () {\r\n var self = this, o = this.options;\r\n var evs = this.options.trigger.split(\",\");\r\n BI.each(evs, function (i, e) {\r\n switch (e) {\r\n case \"hover\":\r\n self.element[e](function (e) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n self._popupView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n }\r\n }, function () {\r\n if (self.isEnabled() && self.switcher.isEnabled() && o.toggle) {\r\n self._hideView();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n });\r\n break;\r\n default :\r\n if (e) {\r\n self.element.off(e + \".\" + self.getName()).on(e + \".\" + self.getName(), BI.debounce(function (e) {\r\n if (self.switcher.element.__isMouseInBounds__(e)) {\r\n if (self.isEnabled() && self.switcher.isEnabled()) {\r\n o.toggle ? self._toggle() : self._popupView();\r\n if (self.isExpanded()) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EXPAND, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_EXPAND);\r\n } else {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.COLLAPSE, \"\", self.switcher);\r\n self.fireEvent(BI.Switcher.EVENT_COLLAPSE);\r\n }\r\n }\r\n }\r\n }, BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n }));\r\n }\r\n break;\r\n }\r\n });\r\n },\r\n\r\n _initSwitcher: function () {\r\n this.switcher = BI.createWidget(this.options.el, {\r\n value: this.options.value\r\n });\r\n },\r\n\r\n _assertPopupView: function () {\r\n var self = this, o = this.options;\r\n if (!this._created) {\r\n this.popupView = BI.createWidget(o.popup, {\r\n type: \"bi.button_group\",\r\n element: o.adapter && BI.Maskers.create(this.getName(), o.adapter, BI.extend({container: this}, o.masker)),\r\n cls: \"switcher-popup\",\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n }, this);\r\n this.popupView.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.Switcher.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n if (o.direction !== BI.Direction.Custom && !o.adapter) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [\r\n {el: this.popupView}\r\n ]\r\n });\r\n }\r\n this._created = true;\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_INIT);\r\n });\r\n }\r\n },\r\n\r\n _hideView: function () {\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_HIDEVIEW);\r\n var self = this, o = this.options;\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n BI.nextTick(function () {\r\n o.adapter ? BI.Maskers.hide(self.getName()) : (self.popupView && self.popupView.setVisible(false));\r\n self.element.removeClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_HIDEVIEW);\r\n });\r\n },\r\n\r\n _popupView: function () {\r\n var self = this, o = this.options;\r\n this._assertPopupView();\r\n this.fireEvent(BI.Switcher.EVENT_BEFORE_POPUPVIEW);\r\n o.adapter ? BI.Maskers.show(this.getName()) : self.popupView.setVisible(true);\r\n BI.nextTick(function (name) {\r\n o.adapter ? BI.Maskers.show(name) : self.popupView.setVisible(true);\r\n self.element.addClass(o.switcherClass);\r\n self.fireEvent(BI.Switcher.EVENT_AFTER_POPUPVIEW);\r\n }, this.getName());\r\n },\r\n\r\n populate: function (items) {\r\n this._assertPopupView();\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n _setEnable: function (arg) {\r\n BI.Switcher.superclass._setEnable.apply(this, arguments);\r\n !arg && this.isViewVisible() && this._hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n if (BI.isNull(this.popupView)) {\r\n this.options.popup.value = v;\r\n } else {\r\n this.popupView.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (BI.isNull(this.popupView)) {\r\n return this.options.popup.value;\r\n } else {\r\n return this.popupView.getValue();\r\n }\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.options.adapter = adapter;\r\n BI.Maskers.remove(this.getName());\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.isEnabled() && this.switcher.isEnabled() &&\r\n (this.options.adapter ? BI.Maskers.isVisible(this.getName()) : (this.popupView && this.popupView.isVisible()));\r\n },\r\n\r\n isExpanded: function () {\r\n return this.isViewVisible();\r\n },\r\n\r\n showView: function () {\r\n if (this.isEnabled() && this.switcher.isEnabled()) {\r\n this._popupView();\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this._hideView();\r\n },\r\n\r\n getView: function () {\r\n return this.popupView;\r\n },\r\n\r\n adjustView: function () {\r\n this.isViewVisible() && BI.Maskers.show(this.getName());\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.popupView && this.popupView.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n if (this.switcher.attr(\"id\") === id) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n if (this.switcher.getValue() === value) {\r\n return this.switcher;\r\n }\r\n return this.popupView && this.popupView.getNodeByValue(value);\r\n },\r\n\r\n empty: function () {\r\n this.popupView && this.popupView.empty();\r\n }\r\n});\r\nBI.Switcher.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.Switcher.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.Switcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.Switcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Switcher.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.Switcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.Switcher.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.Switcher.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.Switcher.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\n\r\nBI.shortcut(\"bi.switcher\", BI.Switcher);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Tab = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tab.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tab\",\r\n direction: \"top\", // top, bottom, left, right, custom\r\n single: false, // 是不是单页面\r\n logic: {\r\n dynamic: false\r\n },\r\n showIndex: false,\r\n tab: false,\r\n cardCreator: function (v) {\r\n return BI.createWidget();\r\n }\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (BI.isObject(o.tab)) {\r\n this.tab = BI.createWidget(this.options.tab, {type: \"bi.button_group\"});\r\n this.tab.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n }\r\n this.cardMap = {};\r\n this.layout = BI.createWidget({\r\n type: \"bi.card\"\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tab, this.layout)\r\n }))));\r\n\r\n var listener = new BI.ShowListener({\r\n eventObj: this.tab,\r\n cardLayout: this.layout,\r\n cardCreator: function (v) {\r\n var card = o.cardCreator.apply(self, arguments);\r\n self.cardMap[v] = card;\r\n return card;\r\n },\r\n afterCardShow: function (v) {\r\n self._deleteOtherCards(v);\r\n self.curr = v;\r\n }\r\n });\r\n listener.on(BI.ShowListener.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.Tab.EVENT_CHANGE, value, self);\r\n });\r\n },\r\n\r\n _deleteOtherCards: function (currCardName) {\r\n var self = this, o = this.options;\r\n if (o.single === true) {\r\n BI.each(this.cardMap, function (name, card) {\r\n if (name !== (currCardName + \"\")) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n }\r\n });\r\n }\r\n },\r\n\r\n _assertCard: function (v) {\r\n if (!this.layout.isCardExisted(v)) {\r\n var card = this.options.cardCreator(v);\r\n this.cardMap[v] = card;\r\n this.layout.addCardByName(v, card);\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.showIndex !== false) {\r\n this.setSelect(o.showIndex);\r\n }\r\n },\r\n\r\n setSelect: function (v) {\r\n this.tab && this.tab.setValue(v);\r\n this._assertCard(v);\r\n this.layout.showCardByName(v);\r\n this._deleteOtherCards(v);\r\n if (this.curr !== v) {\r\n this.curr = v;\r\n }\r\n },\r\n\r\n removeTab: function (cardname) {\r\n var self = this, o = this.options;\r\n BI.any(this.cardMap, function (name, card) {\r\n if (BI.isEqual(name, (cardname + \"\"))) {\r\n self.layout.deleteCardByName(name);\r\n delete self.cardMap[name];\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n getSelect: function () {\r\n return this.curr;\r\n },\r\n\r\n getSelectedTab: function () {\r\n return this.layout.getShowingCard();\r\n },\r\n\r\n getTab: function (v) {\r\n this._assertCard(v);\r\n return this.layout.getCardByName(v);\r\n },\r\n\r\n setValue: function (v) {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n card.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.getValue();\r\n }\r\n },\r\n\r\n populate: function () {\r\n var card = this.layout.getShowingCard();\r\n if (card) {\r\n return card.populate && card.populate.apply(card, arguments);\r\n }\r\n },\r\n\r\n empty: function () {\r\n this.layout.deleteAllCard();\r\n this.cardMap = {};\r\n },\r\n\r\n destroy: function () {\r\n this.cardMap = {};\r\n BI.Tab.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.Tab.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.tab\", BI.Tab);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.EL\r\n * @extends BI.Widget\r\n */\r\nBI.EL = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-el\",\r\n el: {},\r\n layout: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.EL.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.ele = BI.createWidget(o.el);\r\n BI.createWidget(o.layout, {\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.ele]\r\n });\r\n this.ele.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.ele.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.ele.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.ele.populate.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.el\", BI.EL);/**\r\n * z-index在1亿层级\r\n * 弹出提示消息框,用于模拟阻塞操作(通过回调函数实现)\r\n * @class BI.Msg\r\n */\r\nBI.Msg = function () {\r\n\r\n var $mask, $pop;\r\n\r\n var messageShows = [];\r\n\r\n var toastStack = [];\r\n\r\n return {\r\n alert: function (title, message, callback) {\r\n this._show(false, title, message, callback);\r\n },\r\n confirm: function (title, message, callback) {\r\n this._show(true, title, message, callback);\r\n },\r\n prompt: function (title, message, value, callback, min_width) {\r\n // BI.Msg.prompt(title, message, value, callback, min_width);\r\n },\r\n toast: function (message, options, context) {\r\n options = options || {};\r\n context = context || BI.Widget._renderEngine.createElement(\"body\");\r\n var level = options.level || \"normal\";\r\n var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose;\r\n var callback = BI.isFunction(options.callback) ? options.callback : BI.emptyFn;\r\n var toast = BI.createWidget({\r\n type: \"bi.toast\",\r\n cls: \"bi-message-animate bi-message-leave\",\r\n level: level,\r\n autoClose: autoClose,\r\n text: message,\r\n listeners: [{\r\n eventName: BI.Toast.EVENT_DESTORY,\r\n action: function () {\r\n BI.remove(toastStack, toast.element);\r\n var _height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n element.css({\"top\": _height});\r\n _height += element.outerHeight() + 10;\r\n });\r\n callback();\r\n }\r\n }]\r\n });\r\n var height = 10;\r\n BI.each(toastStack, function (i, element) {\r\n height += element.outerHeight() + 10;\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: context,\r\n items: [{\r\n el: toast,\r\n left: \"50%\",\r\n top: height\r\n }]\r\n });\r\n toastStack.push(toast.element);\r\n toast.element.css({\"margin-left\": -1 * toast.element.outerWidth() / 2});\r\n toast.element.removeClass(\"bi-message-leave\").addClass(\"bi-message-enter\");\r\n\r\n autoClose && BI.delay(function () {\r\n toast.element.removeClass(\"bi-message-enter\").addClass(\"bi-message-leave\");\r\n toast.destroy();\r\n }, 5000);\r\n },\r\n _show: function (hasCancel, title, message, callback) {\r\n BI.isNull($mask) && ($mask = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-z-index-mask\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 2,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n opacity: 0.5\r\n }).appendTo(\"body\"));\r\n $pop = BI.Widget._renderEngine.createElement(\"<div class=\\\"bi-message-depend\\\">\").css({\r\n position: \"absolute\",\r\n zIndex: BI.zIndex_tip - 1,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }).appendTo(\"body\");\r\n var close = function () {\r\n messageShows[messageShows.length - 1].destroy();\r\n messageShows.pop();\r\n if (messageShows.length === 0) {\r\n $mask.remove();\r\n $mask = null;\r\n }\r\n };\r\n var controlItems = [];\r\n if (hasCancel === true) {\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n level: \"ignore\",\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n controlItems.push({\r\n el: {\r\n type: \"bi.button\",\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [true]);\r\n }\r\n }\r\n }\r\n });\r\n var conf = {\r\n element: $pop,\r\n type: \"bi.center_adapt\",\r\n items: [\r\n {\r\n type: \"bi.border\",\r\n cls: \"bi-card\",\r\n items: {\r\n north: {\r\n el: {\r\n type: \"bi.border\",\r\n cls: \"bi-message-title bi-background\",\r\n items: {\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n text: title || BI.i18nText(\"BI-Basic_Prompt\"),\r\n textAlign: \"left\",\r\n hgap: 20,\r\n height: 40\r\n }\r\n },\r\n east: {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n // height: 50,\r\n handler: function () {\r\n close();\r\n if (BI.isFunction(callback)) {\r\n callback.apply(null, [false]);\r\n }\r\n }\r\n },\r\n width: 60\r\n }\r\n }\r\n },\r\n height: 40\r\n },\r\n center: {\r\n el: {\r\n type: \"bi.label\",\r\n vgap: 10,\r\n hgap: 20,\r\n whiteSpace: \"normal\",\r\n text: message\r\n }\r\n },\r\n south: {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: controlItems\r\n },\r\n top: 0,\r\n left: 20,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n\r\n },\r\n height: 44\r\n }\r\n },\r\n width: 450,\r\n height: 200\r\n }\r\n ]\r\n };\r\n\r\n messageShows[messageShows.length] = BI.createWidget(conf);\r\n }\r\n };\r\n}();/**\r\n * GridView\r\n *\r\n * Created by GUY on 2016/1/11.\r\n * @class BI.GridView\r\n * @extends BI.Widget\r\n */\r\nBI.GridView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.GridView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-grid-view\",\r\n // width: 400, //必设\r\n // height: 300, //必设\r\n overflowX: true,\r\n overflowY: true,\r\n overscanColumnCount: 0,\r\n overscanRowCount: 0,\r\n rowHeightGetter: BI.emptyFn, // number类型或function类型\r\n columnWidthGetter: BI.emptyFn, // number类型或function类型\r\n // estimatedColumnSize: 100, //columnWidthGetter为function时必设\r\n // estimatedRowSize: 30, //rowHeightGetter为function时必设\r\n scrollLeft: 0,\r\n scrollTop: 0,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.GridView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n this._debounceRelease = BI.debounce(function () {\r\n self._scrollLock = false;\r\n }, 1000 / 60);\r\n this.container = BI.createWidget({\r\n type: \"bi.absolute\"\r\n });\r\n this.element.scroll(function () {\r\n if (self._scrollLock === true) {\r\n return;\r\n }\r\n o.scrollLeft = self.element.scrollLeft();\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateChildrenToRender();\r\n self.fireEvent(BI.GridView.EVENT_SCROLL, {\r\n scrollLeft: o.scrollLeft,\r\n scrollTop: o.scrollTop\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n scrollable: o.overflowX === true && o.overflowY === true,\r\n scrolly: o.overflowX === false && o.overflowY === true,\r\n scrollx: o.overflowX === true && o.overflowY === false,\r\n items: [this.container]\r\n });\r\n if (o.items.length > 0) {\r\n this._populate();\r\n }\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (o.scrollLeft !== 0 || o.scrollTop !== 0) {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n }\r\n },\r\n\r\n _getOverscanIndices: function (cellCount, overscanCellsCount, startIndex, stopIndex) {\r\n return {\r\n overscanStartIndex: Math.max(0, startIndex - overscanCellsCount),\r\n overscanStopIndex: Math.min(cellCount - 1, stopIndex + overscanCellsCount)\r\n };\r\n },\r\n\r\n _calculateChildrenToRender: function () {\r\n var self = this, o = this.options;\r\n\r\n var width = o.width, height = o.height, scrollLeft = BI.clamp(o.scrollLeft, 0, this._getMaxScrollLeft()),\r\n scrollTop = BI.clamp(o.scrollTop, 0, this._getMaxScrollTop()),\r\n overscanColumnCount = o.overscanColumnCount, overscanRowCount = o.overscanRowCount;\r\n\r\n if (height > 0 && width > 0) {\r\n var visibleColumnIndices = this._columnSizeAndPositionManager.getVisibleCellRange(width, scrollLeft);\r\n var visibleRowIndices = this._rowSizeAndPositionManager.getVisibleCellRange(height, scrollTop);\r\n\r\n if (BI.isEmpty(visibleColumnIndices) || BI.isEmpty(visibleRowIndices)) {\r\n return;\r\n }\r\n var horizontalOffsetAdjustment = this._columnSizeAndPositionManager.getOffsetAdjustment(width, scrollLeft);\r\n var verticalOffsetAdjustment = this._rowSizeAndPositionManager.getOffsetAdjustment(height, scrollTop);\r\n\r\n this._renderedColumnStartIndex = visibleColumnIndices.start;\r\n this._renderedColumnStopIndex = visibleColumnIndices.stop;\r\n this._renderedRowStartIndex = visibleRowIndices.start;\r\n this._renderedRowStopIndex = visibleRowIndices.stop;\r\n\r\n var overscanColumnIndices = this._getOverscanIndices(this.columnCount, overscanColumnCount, this._renderedColumnStartIndex, this._renderedColumnStopIndex);\r\n\r\n var overscanRowIndices = this._getOverscanIndices(this.rowCount, overscanRowCount, this._renderedRowStartIndex, this._renderedRowStopIndex);\r\n\r\n var columnStartIndex = overscanColumnIndices.overscanStartIndex;\r\n var columnStopIndex = overscanColumnIndices.overscanStopIndex;\r\n var rowStartIndex = overscanRowIndices.overscanStartIndex;\r\n var rowStopIndex = overscanRowIndices.overscanStopIndex;\r\n\r\n // 算区间size\r\n var minRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStartIndex);\r\n var minColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStartIndex);\r\n var maxRowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowStopIndex);\r\n var maxColumnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnStopIndex);\r\n var top = minRowDatum.offset + verticalOffsetAdjustment;\r\n var left = minColumnDatum.offset + horizontalOffsetAdjustment;\r\n var bottom = maxRowDatum.offset + verticalOffsetAdjustment + maxRowDatum.size;\r\n var right = maxColumnDatum.offset + horizontalOffsetAdjustment + maxColumnDatum.size;\r\n // 如果滚动的区间并没有超出渲染的范围\r\n if (top >= this.renderRange.minY && bottom <= this.renderRange.maxY && left >= this.renderRange.minX && right <= this.renderRange.maxX) {\r\n return;\r\n }\r\n\r\n var renderedCells = [], renderedKeys = {}, renderedWidgets = {};\r\n var minX = this._getMaxScrollLeft(), minY = this._getMaxScrollTop(), maxX = 0, maxY = 0;\r\n var count = 0;\r\n for (var rowIndex = rowStartIndex; rowIndex <= rowStopIndex; rowIndex++) {\r\n var rowDatum = this._rowSizeAndPositionManager.getSizeAndPositionOfCell(rowIndex);\r\n\r\n for (var columnIndex = columnStartIndex; columnIndex <= columnStopIndex; columnIndex++) {\r\n var key = rowIndex + \"-\" + columnIndex;\r\n var columnDatum = this._columnSizeAndPositionManager.getSizeAndPositionOfCell(columnIndex);\r\n\r\n var index = this.renderedKeys[key] && this.renderedKeys[key][2];\r\n var child;\r\n if (index >= 0) {\r\n if (columnDatum.size !== this.renderedCells[index]._width) {\r\n this.renderedCells[index]._width = columnDatum.size;\r\n this.renderedCells[index].el.setWidth(columnDatum.size);\r\n }\r\n if (rowDatum.size !== this.renderedCells[index]._height) {\r\n this.renderedCells[index]._height = rowDatum.size;\r\n this.renderedCells[index].el.setHeight(rowDatum.size);\r\n }\r\n if (this.renderedCells[index]._left !== columnDatum.offset + horizontalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"left\", (columnDatum.offset + horizontalOffsetAdjustment) + \"px\");\r\n }\r\n if (this.renderedCells[index]._top !== rowDatum.offset + verticalOffsetAdjustment) {\r\n this.renderedCells[index].el.element.css(\"top\", (rowDatum.offset + verticalOffsetAdjustment) + \"px\");\r\n }\r\n renderedCells.push(child = this.renderedCells[index]);\r\n } else {\r\n child = BI.createWidget(BI.extend({\r\n type: \"bi.label\",\r\n width: columnDatum.size,\r\n height: rowDatum.size\r\n }, o.items[rowIndex][columnIndex], {\r\n cls: (o.items[rowIndex][columnIndex].cls || \"\") + \" grid-cell\" + (rowIndex === 0 ? \" first-row\" : \"\") + (columnIndex === 0 ? \" first-col\" : \"\"),\r\n _rowIndex: rowIndex,\r\n _columnIndex: columnIndex,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment\r\n }), this);\r\n renderedCells.push({\r\n el: child,\r\n left: columnDatum.offset + horizontalOffsetAdjustment,\r\n top: rowDatum.offset + verticalOffsetAdjustment,\r\n _left: columnDatum.offset + horizontalOffsetAdjustment,\r\n _top: rowDatum.offset + verticalOffsetAdjustment,\r\n _width: columnDatum.size,\r\n _height: rowDatum.size\r\n });\r\n }\r\n minX = Math.min(minX, columnDatum.offset + horizontalOffsetAdjustment);\r\n maxX = Math.max(maxX, columnDatum.offset + horizontalOffsetAdjustment + columnDatum.size);\r\n minY = Math.min(minY, rowDatum.offset + verticalOffsetAdjustment);\r\n maxY = Math.max(maxY, rowDatum.offset + verticalOffsetAdjustment + rowDatum.size);\r\n renderedKeys[key] = [rowIndex, columnIndex, count];\r\n renderedWidgets[count] = child;\r\n count++;\r\n }\r\n }\r\n // 已存在的, 需要添加的和需要删除的\r\n var existSet = {}, addSet = {}, deleteArray = [];\r\n BI.each(renderedKeys, function (i, key) {\r\n if (self.renderedKeys[i]) {\r\n existSet[i] = key;\r\n } else {\r\n addSet[i] = key;\r\n }\r\n });\r\n BI.each(this.renderedKeys, function (i, key) {\r\n if (existSet[i]) {\r\n return;\r\n }\r\n if (addSet[i]) {\r\n return;\r\n }\r\n deleteArray.push(key[2]);\r\n });\r\n BI.each(deleteArray, function (i, index) {\r\n // 性能优化,不调用destroy方法防止触发destroy事件\r\n self.renderedCells[index].el._destroy();\r\n });\r\n var addedItems = [];\r\n BI.each(addSet, function (index, key) {\r\n addedItems.push(renderedCells[key[2]]);\r\n });\r\n // 与listview一样, 给上下文\r\n this.container.addItems(addedItems, this);\r\n // 拦截父子级关系\r\n this.container._children = renderedWidgets;\r\n this.container.attr(\"items\", renderedCells);\r\n this.renderedCells = renderedCells;\r\n this.renderedKeys = renderedKeys;\r\n this.renderRange = {minX: minX, minY: minY, maxX: maxX, maxY: maxY};\r\n }\r\n },\r\n\r\n /**\r\n * 获取真实的可滚动的最大宽度\r\n * 对于grid_view如果没有全部渲染过,this._columnSizeAndPositionManager.getTotalSize获取的宽度是不准确的\r\n * 因此在调用setScrollLeft等函数时会造成没法移动到最右端(预估可移动具体太短)\r\n */\r\n _getRealMaxScrollLeft: function () {\r\n var o = this.options;\r\n var totalWidth = 0;\r\n BI.count(0, this.columnCount, function (index) {\r\n totalWidth += o.columnWidthGetter(index);\r\n });\r\n return Math.max(0, totalWidth - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollLeft: function () {\r\n return Math.max(0, this._columnSizeAndPositionManager.getTotalSize() - this.options.width + (this.options.overflowX ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _getMaxScrollTop: function () {\r\n return Math.max(0, this._rowSizeAndPositionManager.getTotalSize() - this.options.height + (this.options.overflowY ? BI.DOM.getScrollWidth() : 0));\r\n },\r\n\r\n _populate: function (items) {\r\n var self = this, o = this.options;\r\n this._reRange();\r\n this.columnCount = 0;\r\n this.rowCount = 0;\r\n if (items && items !== this.options.items) {\r\n this.options.items = items;\r\n }\r\n if (BI.isNumber(o.columnCount)) {\r\n this.columnCount = o.columnCount;\r\n } else if (o.items.length > 0) {\r\n this.columnCount = o.items[0].length;\r\n }\r\n if (BI.isNumber(o.rowCount)) {\r\n this.rowCount = o.rowCount;\r\n } else {\r\n this.rowCount = o.items.length;\r\n }\r\n this.container.setWidth(this.columnCount * o.estimatedColumnSize);\r\n this.container.setHeight(this.rowCount * o.estimatedRowSize);\r\n\r\n this._columnSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.columnCount, o.columnWidthGetter, o.estimatedColumnSize);\r\n this._rowSizeAndPositionManager = new BI.ScalingCellSizeAndPositionManager(this.rowCount, o.rowHeightGetter, o.estimatedRowSize);\r\n\r\n this._calculateChildrenToRender();\r\n // 元素未挂载时不能设置scrollTop\r\n try {\r\n this.element.scrollTop(o.scrollTop);\r\n this.element.scrollLeft(o.scrollLeft);\r\n } catch (e) {\r\n }\r\n },\r\n\r\n setScrollLeft: function (scrollLeft) {\r\n if (this.options.scrollLeft === scrollLeft) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollLeft = BI.clamp(scrollLeft || 0, 0, this._getRealMaxScrollLeft());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollLeft(this.options.scrollLeft);\r\n },\r\n\r\n setScrollTop: function (scrollTop) {\r\n if (this.options.scrollTop === scrollTop) {\r\n return;\r\n }\r\n this._scrollLock = true;\r\n this.options.scrollTop = BI.clamp(scrollTop || 0, 0, this._getMaxScrollTop());\r\n this._debounceRelease();\r\n this._calculateChildrenToRender();\r\n this.element.scrollTop(this.options.scrollTop);\r\n },\r\n\r\n setColumnCount: function (columnCount) {\r\n this.options.columnCount = columnCount;\r\n },\r\n\r\n setRowCount: function (rowCount) {\r\n this.options.rowCount = rowCount;\r\n },\r\n\r\n setOverflowX: function (b) {\r\n var self = this;\r\n if (this.options.overflowX !== !!b) {\r\n this.options.overflowX = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowX: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n setOverflowY: function (b) {\r\n var self = this;\r\n if (this.options.overflowY !== !!b) {\r\n this.options.overflowY = !!b;\r\n BI.nextTick(function () {\r\n self.element.css({overflowY: b ? \"auto\" : \"hidden\"});\r\n });\r\n }\r\n },\r\n\r\n getScrollLeft: function () {\r\n return this.options.scrollLeft;\r\n },\r\n\r\n getScrollTop: function () {\r\n return this.options.scrollTop;\r\n },\r\n\r\n getMaxScrollLeft: function () {\r\n return this._getMaxScrollLeft();\r\n },\r\n\r\n getMaxScrollTop: function () {\r\n return this._getMaxScrollTop();\r\n },\r\n\r\n setEstimatedColumnSize: function (width) {\r\n this.options.estimatedColumnSize = width;\r\n },\r\n\r\n setEstimatedRowSize: function (height) {\r\n this.options.estimatedRowSize = height;\r\n },\r\n\r\n // 重新计算children\r\n _reRange: function () {\r\n this.renderRange = {};\r\n },\r\n\r\n _clearChildren: function () {\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n BI.each(this.renderedCells, function (i, cell) {\r\n cell.el._destroy();\r\n });\r\n this._clearChildren();\r\n this.renderedCells = [];\r\n this.renderedKeys = [];\r\n this.renderRange = {};\r\n this._scrollLock = false;\r\n },\r\n\r\n populate: function (items) {\r\n if (items && items !== this.options.items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n }\r\n});\r\nBI.GridView.EVENT_SCROLL = \"EVENT_SCROLL\";\r\nBI.shortcut(\"bi.grid_view\", BI.GridView);\r\n/**\r\n * Popover弹出层,\r\n * @class BI.Popover\r\n * @extends BI.Widget\r\n */\r\nBI.Popover = BI.inherit(BI.Widget, {\r\n _constant: {\r\n SIZE: {\r\n SMALL: \"small\",\r\n NORMAL: \"normal\",\r\n BIG: \"big\"\r\n },\r\n HEADER_HEIGHT: 40\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Popover.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-popover bi-card bi-border-radius\",\r\n // width: 600,\r\n // height: 500,\r\n size: \"normal\", // small, normal, big\r\n logic: {\r\n dynamic: false\r\n },\r\n header: null,\r\n body: null,\r\n footer: null,\r\n closable: true // BI-40839 是否显示右上角的关闭按钮\r\n });\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.startX = 0;\r\n this.startY = 0;\r\n this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) {\r\n var size = self._calculateSize();\r\n var W = BI.Widget._renderEngine.createElement(\"body\").width(), H = BI.Widget._renderEngine.createElement(\"body\").height();\r\n self.startX += deltaX;\r\n self.startY += deltaY;\r\n self.element.css({\r\n left: BI.clamp(self.startX, 0, W - self.element.width()) + \"px\",\r\n top: BI.clamp(self.startY, 0, H - self.element.height()) + \"px\"\r\n });\r\n // BI-12134 没有什么特别好的方法\r\n BI.Resizers._resize();\r\n }, function () {\r\n self.tracker.releaseMouseMoves();\r\n }, _global);\r\n var items = [{\r\n el: {\r\n type: \"bi.htape\",\r\n cls: \"bi-message-title bi-header-background\",\r\n ref: function (_ref) {\r\n self.dragger = _ref;\r\n },\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.isPlainObject(o.header) ? BI.createWidget(o.header, {\r\n extraCls: \"bi-font-bold\"\r\n }) : {\r\n type: \"bi.label\",\r\n cls: \"bi-font-bold\",\r\n height: this._constant.HEADER_HEIGHT,\r\n text: o.header,\r\n title: o.header,\r\n textAlign: \"left\"\r\n },\r\n left: 20,\r\n top: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n el: o.closable ? {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-message-close close-font\",\r\n height: this._constant.HEADER_HEIGHT,\r\n handler: function () {\r\n self.close();\r\n }\r\n } : {\r\n type: \"bi.layout\"\r\n },\r\n width: 56\r\n }],\r\n height: this._constant.HEADER_HEIGHT\r\n },\r\n height: this._constant.HEADER_HEIGHT\r\n }, {\r\n el: o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n cls: \"popover-body\",\r\n ref: function () {\r\n self.body = this;\r\n },\r\n hgap: 20,\r\n tgap: 10,\r\n items: [{\r\n el: BI.createWidget(o.body)\r\n }]\r\n } : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.body),\r\n left: 20,\r\n top: 10,\r\n right: 20,\r\n bottom: 0\r\n }]\r\n }\r\n }];\r\n if (o.footer) {\r\n items.push({\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.createWidget(o.footer),\r\n left: 20,\r\n top: 0,\r\n right: 20,\r\n bottom: 0\r\n }],\r\n height: 44\r\n },\r\n height: 44\r\n });\r\n }\r\n\r\n var size = this._calculateSize();\r\n\r\n return BI.extend({\r\n type: o.logic.dynamic ? \"bi.vertical\" : \"bi.vtape\",\r\n items: items,\r\n width: size.width\r\n }, o.logic.dynamic ? {\r\n type: \"bi.vertical\",\r\n scrolly: false\r\n } : {\r\n type: \"bi.vtape\",\r\n height: size.height\r\n });\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this.dragger.element.mousedown(function (e) {\r\n var pos = self.element.offset();\r\n self.startX = pos.left;\r\n self.startY = pos.top;\r\n self.tracker.captureMouseMoves(e);\r\n });\r\n if (o.logic.dynamic) {\r\n var size = this._calculateSize();\r\n var height = this.element.height();\r\n var compareHeight = BI.clamp(height, size.height, 600) - (o.footer ? 84 : 44);\r\n this.body.element.height(compareHeight);\r\n }\r\n },\r\n\r\n _calculateSize: function () {\r\n var o = this.options;\r\n var size = {};\r\n if (BI.isNotNull(o.size)) {\r\n switch (o.size) {\r\n case this._constant.SIZE.SMALL:\r\n size.width = 450;\r\n size.height = 200;\r\n break;\r\n case this._constant.SIZE.BIG:\r\n size.width = 900;\r\n size.height = 500;\r\n break;\r\n default:\r\n size.width = 550;\r\n size.height = 500;\r\n }\r\n }\r\n return {\r\n width: o.width || size.width,\r\n height: o.height || size.height\r\n };\r\n },\r\n\r\n hide: function () {\r\n\r\n },\r\n\r\n open: function () {\r\n this.show();\r\n this.fireEvent(BI.Popover.EVENT_OPEN, arguments);\r\n },\r\n\r\n close: function () {\r\n this.hide();\r\n this.fireEvent(BI.Popover.EVENT_CLOSE, arguments);\r\n },\r\n\r\n setZindex: function (zindex) {\r\n this.element.css({\"z-index\": zindex});\r\n },\r\n\r\n destroyed: function () {\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.popover\", BI.Popover);\r\n\r\nBI.BarPopover = BI.inherit(BI.Popover, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BarPopover.superclass._defaultConfig.apply(this, arguments), {\r\n btns: [BI.i18nText(\"BI-Basic_Sure\"), BI.i18nText(\"BI-Basic_Cancel\")]\r\n });\r\n },\r\n\r\n beforeCreate: function () {\r\n var self = this, o = this.options;\r\n o.footer || (o.footer = {\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: [{\r\n type: \"bi.button\",\r\n text: this.options.btns[1],\r\n value: 1,\r\n level: \"ignore\",\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CANCEL, v);\r\n self.close(v);\r\n }\r\n }, {\r\n type: \"bi.button\",\r\n text: this.options.btns[0],\r\n warningTitle: o.warningTitle,\r\n value: 0,\r\n handler: function (v) {\r\n self.fireEvent(BI.Popover.EVENT_CONFIRM, v);\r\n self.close(v);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bar_popover\", BI.BarPopover);\r\n\r\nBI.Popover.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.Popover.EVENT_OPEN = \"EVENT_OPEN\";\r\nBI.Popover.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.Popover.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n/**\r\n * 下拉框弹出层, zIndex在1000w\r\n * @class BI.PopupView\r\n * @extends BI.Widget\r\n */\r\nBI.PopupView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {\r\n _baseCls: \"bi-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 100,\r\n // maxHeight: 200,\r\n minHeight: 24,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n innerVGap: 0,\r\n direction: BI.Direction.Top, // 工具栏的方向\r\n stopEvent: false, // 是否停止mousedown、mouseup事件\r\n stopPropagation: false, // 是否停止mousedown、mouseup向上冒泡\r\n logic: {\r\n dynamic: true\r\n },\r\n\r\n tool: false, // 自定义工具栏\r\n tabs: [], // 导航栏\r\n buttons: [], // toolbar栏\r\n\r\n el: {\r\n type: \"bi.button_group\",\r\n items: [],\r\n chooseType: 0,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n }, stop = function (e) {\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.css({\r\n \"z-index\": BI.zIndex_popup,\r\n \"min-width\": o.minWidth + \"px\",\r\n \"max-width\": o.maxWidth + \"px\"\r\n }).bind({click: fn});\r\n\r\n this.element.bind(\"mousewheel\", fn);\r\n\r\n o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn});\r\n o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});\r\n this.tool = this._createTool();\r\n this.tab = this._createTab();\r\n this.view = this._createView();\r\n this.toolbar = this._createToolBar();\r\n\r\n this.view.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.PopupView.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n scrolly: false,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap,\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction,\r\n BI.extend({\r\n cls: \"list-view-outer bi-card list-view-shadow\"\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.tool, this.tab, this.view, this.toolbar)\r\n })))\r\n )\r\n }))));\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n this.button_group = BI.createWidget(o.el, {type: \"bi.button_group\", value: o.value});\r\n this.button_group.element.css({\"min-height\": o.minHeight + \"px\", \"padding-top\": o.innerVGap + \"px\", \"padding-bottom\": o.innerVGap + \"px\"});\r\n return this.button_group;\r\n },\r\n\r\n _createTool: function () {\r\n var o = this.options;\r\n if (false === o.tool) {\r\n return;\r\n }\r\n return BI.createWidget(o.tool);\r\n },\r\n\r\n _createTab: function () {\r\n var o = this.options;\r\n if (o.tabs.length === 0) {\r\n return;\r\n }\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-tab\",\r\n height: 25,\r\n items: o.tabs,\r\n value: o.value\r\n });\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(o.buttons, {\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n })\r\n });\r\n },\r\n\r\n getView: function () {\r\n return this.view;\r\n },\r\n\r\n populate: function (items) {\r\n this.view.populate.apply(this.view, arguments);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.options.width = w;\r\n this.element.width(w);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var tbHeight = this.toolbar ? (this.toolbar.attr(\"height\") || 24) : 0,\r\n tabHeight = this.tab ? (this.tab.attr(\"height\") || 24) : 0,\r\n toolHeight = ((this.tool && this.tool.attr(\"height\")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0);\r\n var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap;\r\n this.view.resetHeight ? this.view.resetHeight(resetHeight) :\r\n this.view.element.css({\"max-height\": resetHeight + \"px\"});\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n this.tab && this.tab.setValue(selectedValues);\r\n this.view.setValue(selectedValues);\r\n },\r\n\r\n getValue: function () {\r\n return this.view.getValue();\r\n }\r\n});\r\nBI.PopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.popup_view\", BI.PopupView);/**\r\n * 搜索面板\r\n *\r\n * Created by GUY on 2015/9/28.\r\n * @class BI.SearcherView\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SearcherView = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearcherView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-searcher-view bi-card\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n chooseType: BI.Selection.Single,\r\n\r\n matcher: {// 完全匹配的构造器\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n searcher: {\r\n type: \"bi.button_group\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n items: [],\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearcherView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.matcher = BI.createWidget(o.matcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.matcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n this.spliter = BI.createWidget({\r\n type: \"bi.vertical\",\r\n height: 1,\r\n hgap: 10,\r\n items: [{\r\n type: \"bi.layout\",\r\n height: 1,\r\n cls: \"searcher-view-spliter bi-background\"\r\n }]\r\n });\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.button_group\",\r\n chooseType: o.chooseType,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n this.searcher.on(BI.Controller.EVENT_CHANGE, function (type, val, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearcherView.EVENT_CHANGE, val, ob);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.matcher, this.spliter, this.searcher]\r\n });\r\n },\r\n\r\n startSearch: function () {\r\n\r\n },\r\n\r\n stopSearch: function () {\r\n\r\n },\r\n\r\n setValue: function (v) {\r\n this.matcher.setValue(v);\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.matcher.getValue().concat(this.searcher.getValue());\r\n },\r\n\r\n populate: function (searchResult, matchResult, keyword) {\r\n searchResult || (searchResult = []);\r\n matchResult || (matchResult = []);\r\n this.setTipVisible(searchResult.length + matchResult.length === 0);\r\n this.spliter.setVisible(BI.isNotEmptyArray(matchResult) && BI.isNotEmptyArray(searchResult));\r\n this.matcher.populate(matchResult, keyword);\r\n this.searcher.populate(searchResult, keyword);\r\n },\r\n\r\n empty: function () {\r\n this.searcher.empty();\r\n this.matcher.empty();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.matcher.getAllButtons().length > 0;\r\n }\r\n});\r\nBI.SearcherView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.searcher_view\", BI.SearcherView);/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/23.\r\n * @class BI.ListView\r\n * @extends BI.Widget\r\n */\r\nBI.ListView = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-list-view\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n el: {},\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [BI.extend({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, o.el)],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n var lastWidth = this.element.width(),\r\n lastHeight = this.element.height();\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n var width = self.element.width(),\r\n height = self.element.height();\r\n if (width !== lastWidth || height !== lastHeight) {\r\n lastWidth = width;\r\n lastHeight = height;\r\n self._calculateBlocksToRender();\r\n }\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this.container.empty();\r\n this.cache = {};\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.list_view\", BI.ListView);\r\n\r\n/**\r\n * 表示当前对象\r\n *\r\n * Created by GUY on 2017/5/22.\r\n * @class BI.VirtualList\r\n * @extends BI.Widget\r\n */\r\nBI.VirtualList = BI.inherit(BI.Widget, {\r\n props: function () {\r\n return {\r\n baseCls: \"bi-virtual-list\",\r\n overscanHeight: 100,\r\n blockSize: 10,\r\n scrollTop: 0,\r\n items: []\r\n };\r\n },\r\n\r\n init: function () {\r\n var self = this;\r\n this.renderedIndex = -1;\r\n this.cache = {};\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.topBlank = this;\r\n }\r\n }, {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n ref: function () {\r\n self.container = this;\r\n }\r\n }, {\r\n type: \"bi.layout\",\r\n ref: function () {\r\n self.bottomBlank = this;\r\n }\r\n }],\r\n element: this\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this, o = this.options;\r\n this._populate();\r\n this.element.scroll(function (e) {\r\n o.scrollTop = self.element.scrollTop();\r\n self._calculateBlocksToRender();\r\n });\r\n BI.ResizeDetector.addResizeListener(this, function () {\r\n self._calculateBlocksToRender();\r\n });\r\n },\r\n\r\n _renderMoreIf: function () {\r\n var self = this, o = this.options;\r\n var height = this.element.height();\r\n var minContentHeight = o.scrollTop + height + o.overscanHeight;\r\n var index = (this.cache[this.renderedIndex] && (this.cache[this.renderedIndex].index + o.blockSize)) || 0,\r\n cnt = this.renderedIndex + 1;\r\n var lastHeight;\r\n var getElementHeight = function () {\r\n return self.container.element.height() + self.topBlank.element.height() + self.bottomBlank.element.height();\r\n };\r\n while ((lastHeight = getElementHeight()) < minContentHeight && index < o.items.length) {\r\n var items = o.items.slice(index, index + o.blockSize);\r\n this.container.addItems(items, this);\r\n var addedHeight = getElementHeight() - lastHeight;\r\n this.cache[cnt] = {\r\n index: index,\r\n scrollTop: lastHeight,\r\n height: addedHeight\r\n };\r\n this.tree.set(cnt, addedHeight);\r\n this.renderedIndex = cnt;\r\n cnt++;\r\n index += o.blockSize;\r\n }\r\n },\r\n\r\n _calculateBlocksToRender: function () {\r\n var o = this.options;\r\n this._renderMoreIf();\r\n var height = this.element.height();\r\n var minContentHeightFrom = o.scrollTop - o.overscanHeight;\r\n var minContentHeightTo = o.scrollTop + height + o.overscanHeight;\r\n var start = this.tree.greatestLowerBound(minContentHeightFrom);\r\n var end = this.tree.leastUpperBound(minContentHeightTo);\r\n var needDestroyed = [];\r\n for (var i = 0; i < start; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n for (var i = end + 1; i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n needDestroyed.push(this.container._children[j]);\r\n this.container._children[j] = null;\r\n }\r\n this.cache[i].destroyed = true;\r\n }\r\n }\r\n var firstFragment = BI.Widget._renderEngine.createFragment(), lastFragment = BI.Widget._renderEngine.createFragment();\r\n var currentFragment = firstFragment;\r\n for (var i = (start < 0 ? 0 : start); i <= end && i <= this.renderedIndex; i++) {\r\n var index = this.cache[i].index;\r\n if (!this.cache[i].destroyed) {\r\n currentFragment = lastFragment;\r\n }\r\n if (this.cache[i].destroyed === true) {\r\n for (var j = index; j < index + o.blockSize && j < o.items.length; j++) {\r\n var w = this.container._addElement(j, BI.extend({root: true}, BI.stripEL(o.items[j])), this);\r\n currentFragment.appendChild(w.element[0]);\r\n }\r\n this.cache[i].destroyed = false;\r\n }\r\n }\r\n this.container.element.prepend(firstFragment);\r\n this.container.element.append(lastFragment);\r\n this.topBlank.setHeight(this.cache[start < 0 ? 0 : start].scrollTop);\r\n var lastCache = this.cache[Math.min(end, this.renderedIndex)];\r\n this.bottomBlank.setHeight(this.tree.sumTo(this.renderedIndex) - lastCache.scrollTop - lastCache.height);\r\n BI.each(needDestroyed, function (i, child) {\r\n child && child._destroy();\r\n });\r\n },\r\n\r\n _populate: function (items) {\r\n var o = this.options;\r\n if (items && this.options.items !== items) {\r\n this.options.items = items;\r\n }\r\n this.tree = BI.PrefixIntervalTree.empty(Math.ceil(o.items.length / o.blockSize));\r\n this._calculateBlocksToRender();\r\n this.element.scrollTop(o.scrollTop);\r\n },\r\n\r\n _clearChildren: function () {\r\n BI.each(this.container._children, function (i, cell) {\r\n cell && cell._destroy();\r\n });\r\n this.container._children = {};\r\n this.container.attr(\"items\", []);\r\n },\r\n\r\n restore: function () {\r\n this.renderedIndex = -1;\r\n this._clearChildren();\r\n this.cache = {};\r\n this.options.scrollTop = 0;\r\n // 依赖于cache的占位元素也要初始化\r\n this.topBlank.setHeight(0);\r\n this.bottomBlank.setHeight(0);\r\n },\r\n\r\n populate: function (items) {\r\n if (items && this.options.items !== items) {\r\n this.restore();\r\n }\r\n this._populate(items);\r\n },\r\n\r\n destroyed: function () {\r\n this.restore();\r\n }\r\n});\r\nBI.shortcut(\"bi.virtual_list\", BI.VirtualList);\r\n\r\n/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.Pager\r\n * @extends BI.Widget\r\n */\r\nBI.Pager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Pager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.Pager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n // this._lock = false;\r\n // this._debouce = BI.debounce(function () {\r\n // self._lock = false;\r\n // }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n\r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"bi-list-item-select bi-border-radius\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n // if (self._lock === true) {\r\n // return;\r\n // }\r\n // self._lock = true;\r\n // self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.Pager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.Pager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v || 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.Pager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.Pager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Pager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.pager\", BI.Pager);/**\r\n * 超链接\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.A\r\n * @extends BI.Text\r\n * @abstract\r\n */\r\nBI.A = BI.inherit(BI.Text, {\r\n _defaultConfig: function () {\r\n var conf = BI.A.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-a display-block\",\r\n href: \"\",\r\n target: \"_blank\",\r\n el: null,\r\n tagName: \"a\"\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.A.superclass._init.apply(this, arguments);\r\n this.element.attr({href: o.href, target: o.target});\r\n if (o.el) {\r\n BI.createWidget(o.el, {\r\n element: this\r\n });\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.a\", BI.A);/**\r\n * guy\r\n * 加载条\r\n * @type {*|void|Object}\r\n */\r\nBI.LoadingBar = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.LoadingBar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend( conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-loading-bar bi-tips\",\r\n height: 30,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.LoadingBar.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.loaded = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"loading-text bi-list-item-simple\",\r\n text: BI.i18nText(\"BI-Load_More\"),\r\n width: 120,\r\n handler: this.options.handler\r\n });\r\n this.loaded.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.loading = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: this.options.height,\r\n height: this.options.height,\r\n cls: \"loading-background cursor-default\"\r\n });\r\n var loaded = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loaded]\r\n });\r\n var loading = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n items: [this.loading]\r\n });\r\n this.cardLayout = BI.createWidget({\r\n type: \"bi.card\",\r\n element: this,\r\n items: [{\r\n el: loaded,\r\n cardName: \"loaded\"\r\n }, {\r\n el: loading,\r\n cardName: \"loading\"\r\n }]\r\n });\r\n this.invisible();\r\n },\r\n\r\n _reset: function () {\r\n this.visible();\r\n this.loaded.setText(BI.i18nText(\"BI-Load_More\"));\r\n this.loaded.enable();\r\n },\r\n\r\n setLoaded: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loaded\");\r\n },\r\n\r\n setEnd: function () {\r\n this.setLoaded();\r\n this.loaded.setText(BI.i18nText(\"BI-No_More_Data\"));\r\n this.loaded.disable();\r\n },\r\n\r\n setLoading: function () {\r\n this._reset();\r\n this.cardLayout.showCardByName(\"loading\");\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.loading_bar\", BI.LoadingBar);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标的button\r\n */\r\nBI.IconButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-icon-button horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.IconButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.IconButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_button\", BI.IconButton);/**\r\n * 图片的button\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.ImageButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ImageButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-button\",\r\n src: \"\",\r\n iconWidth: \"100%\",\r\n iconHeight: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.image = BI.createWidget({\r\n type: \"bi.img\",\r\n width: o.iconWidth,\r\n height: o.iconHeight,\r\n src: o.src\r\n });\r\n if (BI.isNumber(o.iconWidth) || BI.isNumber(o.iconHeight)) {\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.image]\r\n });\r\n } else {\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n items: [this.image],\r\n scrollable: false\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (w) {\r\n BI.ImageButton.superclass.setWidth.apply(this, arguments);\r\n this.options.width = w;\r\n },\r\n\r\n setHeight: function (h) {\r\n BI.ImageButton.superclass.setHeight.apply(this, arguments);\r\n this.options.height = h;\r\n },\r\n\r\n setImageWidth: function (w) {\r\n this.image.setWidth(w);\r\n },\r\n\r\n setImageHeight: function (h) {\r\n this.image.setHeight(h);\r\n },\r\n\r\n getImageWidth: function () {\r\n return this.image.element.width();\r\n },\r\n\r\n getImageHeight: function () {\r\n return this.image.element.height();\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.image.setSrc(src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.image.getSrc();\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.ImageButton.EVENT_CHANGE, this);\r\n }\r\n }\r\n});\r\nBI.ImageButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.image_button\", BI.ImageButton);\r\n/**\r\n * 文字类型的按钮\r\n * @class BI.Button\r\n * @extends BI.BasicButton\r\n *\r\n * @cfg {JSON} options 配置属性\r\n * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景\r\n */\r\nBI.Button = BI.inherit(BI.BasicButton, {\r\n\r\n _const: {\r\n iconWidth: 18\r\n },\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.Button.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-button\" + ((BI.isIE() && BI.isIE9Below()) ? \" hack\" : \"\"),\r\n minWidth: (props.block === true || props.clear === true) ? 0 : 80,\r\n height: 24,\r\n shadow: props.clear !== true,\r\n isShadowShowingOnSelected: true,\r\n readonly: true,\r\n iconCls: \"\",\r\n level: \"common\",\r\n block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制\r\n clear: false, // 是否去掉边框和背景\r\n ghost: false, // 是否幽灵显示, 即正常状态无背景\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: props.clear ? 0 : 10,\r\n vgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Button.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n if (BI.isNumber(o.height) && !o.clear && !o.block) {\r\n this.element.css({height: o.height + \"px\", lineHeight: (o.height - 2) + \"px\"});\r\n } else if (o.clear || o.block) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n } else {\r\n this.element.css({lineHeight: (o.height - 2) + \"px\"});\r\n }\r\n if (BI.isKey(o.iconCls)) {\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls,\r\n width: this._const.iconWidth,\r\n height: o.height - 2,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.text,\r\n textWidth: BI.isNotNull(o.textWidth) ? o.textWidth - this._const.iconWidth : null,\r\n textHeight: o.textHeight,\r\n value: o.value,\r\n height: o.height - 2\r\n });\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n items: [{\r\n type: \"bi.horizontal\",\r\n items: [this.icon, this.text]\r\n }]\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n element: this,\r\n text: o.text,\r\n value: o.value\r\n });\r\n }\r\n if (o.block === true) {\r\n this.element.addClass(\"block\");\r\n }\r\n if (o.clear === true) {\r\n this.element.addClass(\"clear\");\r\n }\r\n if (o.ghost === true) {\r\n this.element.addClass(\"ghost\");\r\n }\r\n if (o.minWidth > 0) {\r\n this.element.css({\"min-width\": o.minWidth + \"px\"});\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Button.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.Button.EVENT_CHANGE, this);\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n BI.Button.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Button.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(text);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n destroy: function () {\r\n BI.Button.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.button\", BI.Button);\r\nBI.Button.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n/**\r\n * guy\r\n * 可以点击的一行文字\r\n * @class BI.TextButton\r\n * @extends BI.BasicButton\r\n * 文字button\r\n */\r\nBI.TextButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-button\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n vgap: 0,\r\n text: \"\",\r\n py: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextButton.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textWidth: o.textWidth,\r\n textHeight: o.textHeight,\r\n width: o.width,\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextButton.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextButton.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.TextButton.superclass.setText.apply(this, arguments);\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setText(text);\r\n },\r\n\r\n setStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (text) {\r\n BI.TextButton.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n text = BI.isArray(text) ? text.join(\",\") : text;\r\n this.text.setValue(text);\r\n }\r\n }\r\n});\r\nBI.TextButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_button\", BI.TextButton);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth,\r\n height: o.height\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n forceNotSelected: true,\r\n width: o.height,\r\n height: o.height\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon1, this.icon2, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.BlankIconIconTextItem.superclass.setSelected.apply(this, arguments);\r\n this.icon1.setSelected(b);\r\n this.icon2.setSelected(b);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_icon_text_item\", BI.BlankIconIconTextItem);/**\r\n * guy\r\n * 一个占位符和两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.BlankIconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n }, icon1, this.text, {\r\n type: \"bi.layout\",\r\n width: o.height\r\n })\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.BlankIconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_icon_item\", BI.BlankIconTextIconItem);/**\r\n * 带有一个占位\r\n *\r\n * Created by GUY on 2015/9/11.\r\n * @class BI.BlankIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.BlankIconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.BlankIconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-blank-icon-text-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n blankWidth: 0,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.BlankIconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.blankWidth\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", blank, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.BlankIconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.BlankIconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.BlankIconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.blank_icon_text_item\", BI.BlankIconTextItem);/**\r\n * guy\r\n * 两个icon和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.leftIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.rightIconWrapperWidth,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_item\", BI.IconTextIconItem);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.IconTextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-item\",\r\n direction: BI.Direction.Left,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: null,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.iconWrapperWidth || o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_item\", BI.IconTextItem);/**\r\n *\r\n * 图标的button\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextIconItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconItem.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_item\", BI.TextIconItem);/**\r\n * guy\r\n * 一个button和一行数 组成的一行listitem\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TextItem = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-item\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_item\", BI.TextItem);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n iconCls1: \"close-ha-font\",\r\n iconCls2: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n\r\n var icon1 = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls1,\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: o.height,\r\n height: o.height\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: o.iconCls2,\r\n width: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n },\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", icon1, this.text, blank)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.IconTextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_icon_node\", BI.IconTextIconNode);/**\r\n * guy\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.IconTextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconTextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-text-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.IconTextNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.IconTextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.IconTextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.IconTextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_node\", BI.IconTextNode);/**\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextIconNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextIconNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextIconNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-icon-node\",\r\n logic: {\r\n dynamic: false\r\n },\r\n cls: \"close-ha-font\",\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextIconNode.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: o.height,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.text, this.icon)\r\n }))));\r\n },\r\n\r\n doClick: function () {\r\n BI.TextIconNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextIconNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\nBI.TextIconNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_icon_node\", BI.TextIconNode);/**\r\n * guy\r\n *\r\n * Created by GUY on 2015/9/9.\r\n * @class BI.TextNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.TextNode = BI.inherit(BI.NodeButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-node\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TextNode.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textHeight: o.whiteSpace == \"nowrap\" ? o.height : o.textHeight,\r\n height: o.height,\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.TextNode.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.TextNode.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.TextNode.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_node\", BI.TextNode);/**\r\n * Created by GUY on 2015/4/15.\r\n * @class BI.Editor\r\n * @extends BI.Single\r\n */\r\nBI.Editor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Editor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-editor bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n // title,warningTitle这两个属性没用\r\n tipType: \"warning\",\r\n inputType: \"text\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Editor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = this.addWidget(BI.createWidget({\r\n type: \"bi.input\",\r\n element: \"<input type='\" + o.inputType + \"'/>\",\r\n root: true,\r\n value: o.value,\r\n watermark: o.watermark,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank\r\n }));\r\n this.editor.element.css({\r\n width: \"100%\",\r\n height: \"100%\",\r\n border: \"none\",\r\n outline: \"none\",\r\n padding: \"0\",\r\n margin: \"0\"\r\n });\r\n if (BI.isKey(this.options.watermark)) {\r\n this._assertWaterMark();\r\n }\r\n\r\n var _items = [];\r\n if (this.watermark) {\r\n _items.push({\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n });\r\n }\r\n _items.push({\r\n el: this.editor,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n });\r\n\r\n var items = [{\r\n el: {\r\n type: \"bi.absolute\",\r\n ref: function(_ref) {\r\n self.contentWrapper = _ref;\r\n },\r\n items: _items\r\n },\r\n left: o.hgap + o.lgap,\r\n right: o.hgap + o.rgap,\r\n top: o.vgap + o.tgap,\r\n bottom: o.vgap + o.bgap\r\n }];\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: items\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_FOCUS, function () {\r\n self._checkError();\r\n self.element.addClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BLUR, function () {\r\n self._setErrorVisible(false);\r\n self.element.removeClass(\"bi-editor-focus\");\r\n self.fireEvent(BI.Editor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CLICK, function () {\r\n self.fireEvent(BI.Editor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.Editor.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_QUICK_DOWN, function (e) {\r\n // tab键就不要隐藏了\r\n if (e.keyCode !== BI.KeyCode.TAB && self.watermark) {\r\n self.watermark.invisible();\r\n }\r\n });\r\n\r\n this.editor.on(BI.Input.EVENT_VALID, function () {\r\n self._checkWaterMark();\r\n self._setErrorVisible(false);\r\n self.fireEvent(BI.Editor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ERROR, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_ERROR, arguments);\r\n self._setErrorVisible(self.isEditing());\r\n });\r\n this.editor.on(BI.Input.EVENT_RESTRICT, function () {\r\n self._checkWaterMark();\r\n var tip = self._setErrorVisible(true);\r\n tip && tip.element.fadeOut(100, function () {\r\n tip.element.fadeIn(100);\r\n });\r\n self.fireEvent(BI.Editor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_EMPTY, function () {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.Editor.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_ENTER, function () {\r\n self.fireEvent(BI.Editor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_SPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.Editor.EVENT_BACKSPACE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.Editor.EVENT_REMOVE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_START, function () {\r\n self.fireEvent(BI.Editor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.Editor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_STOP, function () {\r\n self.fireEvent(BI.Editor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Input.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.Editor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.element.click(function (e) {\r\n e.stopPropagation();\r\n return false;\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this._checkError();\r\n this._checkWaterMark();\r\n } else {\r\n this._checkWaterMark();\r\n }\r\n },\r\n\r\n _checkToolTip: function () {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(this.editor.getValue());\r\n }\r\n if (BI.isKey(errorText)) {\r\n if (!this.isEnabled() || this.isValid() || (BI.Bubbles.has(this.getName()) && BI.Bubbles.get(this.getName()).isVisible())) {\r\n this.setTitle(\"\");\r\n } else {\r\n this.setTitle(errorText);\r\n }\r\n }\r\n },\r\n\r\n _assertWaterMark: function() {\r\n var self = this, o = this.options;\r\n if(BI.isNull(this.watermark)) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bi-water-mark\",\r\n text: this.options.watermark,\r\n height: o.height - 2 * (o.vgap + o.tgap),\r\n whiteSpace: \"nowrap\",\r\n textAlign: \"left\"\r\n });\r\n this.watermark.element.bind({\r\n mousedown: function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n }\r\n });\r\n this.watermark.element.bind(\"click\", function (e) {\r\n if (self.isEnabled()) {\r\n self.editor.isEditing() || self.editor.focus();\r\n } else {\r\n self.editor.isEditing() && self.editor.blur();\r\n }\r\n e.stopEvent();\r\n });\r\n }\r\n },\r\n\r\n _checkError: function () {\r\n this._setErrorVisible(this.isEnabled() && !this.isValid());\r\n this._checkToolTip();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var o = this.options;\r\n if (!this.disabledWaterMark && this.editor.getValue() === \"\" && BI.isKey(o.watermark)) {\r\n this.watermark && this.watermark.visible();\r\n } else {\r\n this.watermark && this.watermark.invisible();\r\n }\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.options.errorText = text;\r\n },\r\n\r\n getErrorText: function () {\r\n return this.options.errorText;\r\n },\r\n\r\n setWaterMark: function(v) {\r\n this.options.watermark = v;\r\n if(BI.isNull(this.watermark)) {\r\n this._assertWaterMark();\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.contentWrapper,\r\n items: [{\r\n el: this.watermark,\r\n left: 3,\r\n right: 3,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n })\r\n }\r\n BI.isKey(v) && this.watermark.setText(v);\r\n },\r\n\r\n _setErrorVisible: function (b) {\r\n var o = this.options;\r\n var errorText = o.errorText;\r\n if (BI.isFunction(errorText)) {\r\n errorText = errorText(BI.trim(this.editor.getValue()));\r\n }\r\n if (!this.disabledError && BI.isKey(errorText)) {\r\n BI.Bubbles[b ? \"show\" : \"hide\"](this.getName(), errorText, this, {\r\n adjustYOffset: 2\r\n });\r\n this._checkToolTip();\r\n return BI.Bubbles.get(this.getName());\r\n }\r\n },\r\n\r\n disableError: function () {\r\n this.disabledError = true;\r\n this._checkError();\r\n },\r\n\r\n enableError: function () {\r\n this.disabledError = false;\r\n this._checkError();\r\n },\r\n\r\n disableWaterMark: function () {\r\n this.disabledWaterMark = true;\r\n this._checkWaterMark();\r\n },\r\n\r\n enableWaterMark: function () {\r\n this.disabledWaterMark = false;\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this.element.addClass(\"text-editor-focus\");\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.element.removeClass(\"text-editor-focus\");\r\n this.editor.blur();\r\n },\r\n\r\n selectAll: function () {\r\n this.editor.selectAll();\r\n },\r\n\r\n onKeyDown: function (k) {\r\n this.editor.onKeyDown(k);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.Editor.superclass.setValue.apply(this, arguments);\r\n this.editor.setValue(v);\r\n this._checkError();\r\n this._checkWaterMark();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n if (!this.isValid()) {\r\n return BI.trim(this.editor.getLastValidValue());\r\n }\r\n return BI.trim(this.editor.getValue());\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n destroyed: function () {\r\n BI.Bubbles.remove(this.getName());\r\n }\r\n});\r\nBI.Editor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.Editor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Editor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Editor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Editor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Editor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Editor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Editor.EVENT_START = \"EVENT_START\";\r\nBI.Editor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Editor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Editor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Editor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Editor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Editor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Editor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Editor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.Editor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Editor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.editor\", BI.Editor);/**\r\n * 多文件\r\n *\r\n * Created by GUY on 2016/4/13.\r\n * @class BI.MultifileEditor\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.MultifileEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultifileEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-multifile-editor\",\r\n multiple: false,\r\n maxSize: -1, // 1024 * 1024\r\n accept: \"\",\r\n url: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.MultifileEditor.superclass._init.apply(this, arguments);\r\n this.file = BI.createWidget({\r\n type: \"bi.file\",\r\n cls: \"multifile-editor\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n name: o.name,\r\n url: o.url,\r\n multiple: o.multiple,\r\n accept: o.accept,\r\n maxSize: o.maxSize,\r\n title: o.title\r\n });\r\n this.file.on(BI.File.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADSTART, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADSTART, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_ERROR, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_ERROR, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_PROGRESS, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_PROGRESS, arguments);\r\n });\r\n this.file.on(BI.File.EVENT_UPLOADED, function () {\r\n self.fireEvent(BI.MultifileEditor.EVENT_UPLOADED, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n scrollable: false,\r\n items: [this.file]\r\n },\r\n top: 0,\r\n right: 0,\r\n left: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n select: function () {\r\n this.file.select();\r\n },\r\n\r\n getValue: function () {\r\n return this.file.getValue();\r\n },\r\n\r\n upload: function () {\r\n this.file.upload();\r\n },\r\n\r\n reset: function () {\r\n this.file.reset();\r\n }\r\n});\r\nBI.MultifileEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultifileEditor.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\nBI.MultifileEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.MultifileEditor.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\nBI.MultifileEditor.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\nBI.shortcut(\"bi.multifile_editor\", BI.MultifileEditor);/**\r\n *\r\n * Created by GUY on 2016/1/18.\r\n * @class BI.TextAreaEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextAreaEditor = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextAreaEditor.superclass._defaultConfig.apply(), {\r\n baseCls: \"bi-textarea-editor\",\r\n value: \"\"\r\n });\r\n },\r\n\r\n render: function() {\r\n var o = this.options, self = this;\r\n this.content = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"textarea\",\r\n width: \"100%\",\r\n height: \"100%\",\r\n cls: \"bi-textarea textarea-editor-content display-block\"\r\n });\r\n this.content.element.css({resize: \"none\"});\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.adaptive\",\r\n items: [this.content]\r\n },\r\n left: 4,\r\n right: 4,\r\n top: 4,\r\n bottom: 4\r\n }]\r\n });\r\n\r\n this.content.element.on(\"input propertychange\", function (e) {\r\n self._checkWaterMark();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_CHANGE);\r\n });\r\n\r\n this.content.element.focus(function () {\r\n if (self.isValid()) {\r\n self._focus();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS);\r\n }\r\n BI.Widget._renderEngine.createElement(document).bind(\"mousedown.\" + self.getName(), function (e) {\r\n if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) {\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n self.content.element.blur();\r\n }\r\n });\r\n });\r\n this.content.element.blur(function () {\r\n if (self.isValid()) {\r\n self._blur();\r\n self.fireEvent(BI.TextAreaEditor.EVENT_BLUR);\r\n }\r\n BI.Widget._renderEngine.createElement(document).unbind(\"mousedown.\" + self.getName());\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n if (BI.isNotNull(o.style)) {\r\n this.setStyle(o.style);\r\n }\r\n this._checkWaterMark();\r\n },\r\n\r\n _checkWaterMark: function () {\r\n var self = this, o = this.options;\r\n var val = this.getValue();\r\n if (BI.isNotEmptyString(val)) {\r\n this.watermark && this.watermark.destroy();\r\n this.watermark = null;\r\n } else {\r\n if (BI.isNotEmptyString(o.watermark)) {\r\n if (!this.watermark) {\r\n this.watermark = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark cursor-default textarea-watermark\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.watermark,\r\n invalid: o.invalid,\r\n disabled: o.disabled,\r\n hgap: 4,\r\n vgap: 4\r\n });\r\n this.watermark.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.focus();\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.watermark,\r\n left: 0,\r\n top: 0,\r\n right: 0\r\n }]\r\n });\r\n } else {\r\n this.watermark.setText(o.watermark);\r\n this.watermark.setValid(!o.invalid);\r\n this.watermark.setEnable(!o.disabled);\r\n }\r\n }\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.content.element.addClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n _blur: function () {\r\n this.content.element.removeClass(\"textarea-editor-focus\");\r\n this._checkWaterMark();\r\n },\r\n\r\n focus: function () {\r\n this._focus();\r\n this.content.element.focus();\r\n },\r\n\r\n blur: function () {\r\n this._blur();\r\n this.content.element.blur();\r\n },\r\n\r\n getValue: function () {\r\n return this.content.element.val();\r\n },\r\n\r\n setValue: function (value) {\r\n this.content.element.val(value);\r\n this._checkWaterMark();\r\n },\r\n\r\n setStyle: function (style) {\r\n this.style = style;\r\n this.element.css(style);\r\n this.content.element.css(BI.extend({}, style, {\r\n color: style.color || BI.DOM.getContrastColor(BI.DOM.isRGBColor(style.backgroundColor) ? BI.DOM.rgb2hex(style.backgroundColor) : style.backgroundColor)\r\n }));\r\n },\r\n\r\n getStyle: function () {\r\n return this.style;\r\n },\r\n\r\n _setValid: function (b) {\r\n BI.TextAreaEditor.superclass._setValid.apply(this, arguments);\r\n // this.content.setValid(b);\r\n // this.watermark && this.watermark.setValid(b);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.TextAreaEditor.superclass._setEnable.apply(this, [b]);\r\n this.content && (this.content.element[0].disabled = !b);\r\n }\r\n});\r\nBI.TextAreaEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextAreaEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextAreaEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.shortcut(\"bi.textarea_editor\", BI.TextAreaEditor);/**\r\n * guy 表示一行数据,通过position来定位位置的数据\r\n * @class BI.Html\r\n * @extends BI.Single\r\n */\r\nBI.Html = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-html\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n lineHeight: null,\r\n handler: null, // 如果传入handler,表示处理文字的点击事件,不是区域的\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if (o.hgap + o.lgap > 0) {\r\n this.element.css({\r\n \"padding-left\": o.hgap + o.lgap + \"px\"\r\n });\r\n }\r\n if (o.hgap + o.rgap > 0) {\r\n this.element.css({\r\n \"padding-right\": o.hgap + o.rgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.tgap > 0) {\r\n this.element.css({\r\n \"padding-top\": o.vgap + o.tgap + \"px\"\r\n });\r\n }\r\n if (o.vgap + o.bgap > 0) {\r\n this.element.css({\r\n \"padding-bottom\": o.vgap + o.bgap + \"px\"\r\n });\r\n }\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({lineHeight: o.height + \"px\"});\r\n }\r\n if (BI.isNumber(o.lineHeight)) {\r\n this.element.css({lineHeight: o.lineHeight + \"px\"});\r\n }\r\n if (BI.isWidthOrHeight(o.maxWidth)) {\r\n this.element.css({maxWidth: o.maxWidth});\r\n }\r\n this.element.css({\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n textOverflow: o.whiteSpace === 'nowrap' ? \"ellipsis\" : \"\",\r\n overflow: o.whiteSpace === \"nowrap\" ? \"\" : \"auto\"\r\n });\r\n if (o.handler) {\r\n this.text = BI.createWidget({\r\n type: \"bi.layout\",\r\n tagName: \"span\"\r\n });\r\n this.text.element.click(function () {\r\n o.handler(self.getValue());\r\n });\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n } else {\r\n this.text = this;\r\n }\r\n\r\n if (BI.isKey(o.text)) {\r\n this.setText(o.text);\r\n } else if (BI.isKey(o.value)) {\r\n this.setText(o.value);\r\n }\r\n if (o.highLight) {\r\n this.doHighLight();\r\n }\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.element.addClass(\"bi-high-light\");\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.element.removeClass(\"bi-high-light\");\r\n },\r\n\r\n setValue: function (text) {\r\n BI.Html.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.setText(text);\r\n }\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.element.css(css);\r\n },\r\n\r\n setText: function (text) {\r\n BI.Html.superclass.setText.apply(this, arguments);\r\n this.options.text = text;\r\n this.text.element.html(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html\", BI.Html);/**\r\n * guy 图标\r\n * @class BI.Icon\r\n * @extends BI.Single\r\n */\r\nBI.Icon = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Icon.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"i\",\r\n baseCls: (conf.baseCls || \"\") + \" x-icon b-font horizon-center display-block\"\r\n });\r\n },\r\n _init: function () {\r\n BI.Icon.superclass._init.apply(this, arguments);\r\n if (BI.isIE9Below && BI.isIE9Below()) {\r\n this.element.addClass(\"hack\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon\", BI.Icon);/**\r\n * @class BI.Iframe\r\n * @extends BI.Single\r\n * @abstract\r\n * Created by GameJian on 2016/3/2.\r\n */\r\nBI.Iframe = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Iframe.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"iframe\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-iframe\",\r\n src: \"\",\r\n name: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.frameborder = \"0\";\r\n o.attributes.src = o.src;\r\n o.attributes.name = o.name;\r\n BI.Iframe.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n },\r\n\r\n setName: function (name) {\r\n this.options.name = name;\r\n this.element.attr(\"name\", name);\r\n },\r\n\r\n getName: function () {\r\n return this.options.name;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.iframe\", BI.Iframe);/**\r\n * ͼƬ\r\n *\r\n * Created by GUY on 2016/1/26.\r\n * @class BI.Img\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Img = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Img.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n tagName: \"img\",\r\n baseCls: (conf.baseCls || \"\") + \" bi-img display-block\",\r\n src: \"\",\r\n attributes: {},\r\n width: \"100%\",\r\n height: \"100%\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n o.attributes.src = o.src;\r\n BI.Img.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setSrc: function (src) {\r\n this.options.src = src;\r\n this.element.attr(\"src\", src);\r\n },\r\n\r\n getSrc: function () {\r\n return this.options.src;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.img\", BI.Img);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageCheckbox.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-image-checkbox check-box-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n }\r\n});\r\nBI.ImageCheckbox.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_checkbox\", BI.ImageCheckbox);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Checkbox = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-checkbox\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.default\",\r\n ref: function (_ref) {\r\n self.checkbox = _ref;\r\n },\r\n cls: \"checkbox-content\",\r\n width: o.iconWidth - 2,\r\n height: o.iconHeight - 2\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Checkbox.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.checkbox.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.checkbox.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Checkbox.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Checkbox.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Checkbox.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.checkbox.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.checkbox.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Checkbox.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.checkbox\", BI.Checkbox);/**\r\n * 文件\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.File\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\n(function (document) {\r\n\r\n /**\r\n * @description normalize input.files. create if not present, add item method if not present\r\n * @param Object generated wrap object\r\n * @return Object the wrap object itself\r\n */\r\n var F = (function (item) {\r\n return function (input) {\r\n var files = input.files || [input];\r\n if (!files.item) {\r\n files.item = item;\r\n }\r\n return files;\r\n };\r\n })(function (i) {\r\n return this[i];\r\n });\r\n\r\n var event = {\r\n\r\n /**\r\n * @description add an event via addEventListener or attachEvent\r\n * @param DOMElement the element to add event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback to associate as event\r\n * @return Object noswfupload.event\r\n */\r\n add: document.addEventListener ?\r\n function (node, name, callback) {\r\n node.addEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.attachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description remove an event via removeEventListener or detachEvent\r\n * @param DOMElement the element to remove event\r\n * @param String event name without \"on\" (e.g. \"mouseover\")\r\n * @param Function the callback associated as event\r\n * @return Object noswfupload.event\r\n */\r\n del: document.removeEventListener ?\r\n function (node, name, callback) {\r\n node.removeEventListener(name, callback, false);\r\n return this;\r\n } :\r\n function (node, name, callback) {\r\n node.detachEvent(\"on\" + name, callback);\r\n return this;\r\n },\r\n\r\n /**\r\n * @description to block event propagation and prevent event default\r\n * @param void generated event or undefined\r\n * @return Boolean false\r\n */\r\n stop: function (e) {\r\n if (!e) {\r\n if (self.event) {\r\n event.returnValue = !(event.cancelBubble = true);\r\n }\r\n } else {\r\n e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;\r\n e.preventDefault ? e.preventDefault() : e.returnValue = false;\r\n }\r\n\r\n return false;\r\n }\r\n };\r\n\r\n var sendFile = (function (toString) {\r\n var multipart = function (boundary, name, file) {\r\n return \"--\".concat(\r\n boundary, CRLF,\r\n \"Content-Disposition: form-data; name=\\\"\", name, \"\\\"; filename=\\\"\", _global.encodeURIComponent(file.fileName), \"\\\"\", CRLF,\r\n \"Content-Type: application/octet-stream\", CRLF,\r\n CRLF,\r\n file.getAsBinary(), CRLF,\r\n \"--\", boundary, \"--\", CRLF\r\n );\r\n },\r\n isFunction = function (Function) {\r\n return toString.call(Function) === \"[object Function]\";\r\n },\r\n split = \"onabort.onerror.onloadstart.onprogress\".split(\".\"),\r\n length = split.length,\r\n CRLF = \"\\r\\n\",\r\n xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject(\"Microsoft.XMLHTTP\"),\r\n sendFile;\r\n\r\n // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work)\r\n if (xhr.upload || xhr.sendAsBinary) {\r\n sendFile = function (handler, maxSize, width, height) {\r\n if (-1 < maxSize && maxSize < handler.file.fileSize) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror();\r\n }\r\n return;\r\n }\r\n for (var\r\n xhr = new XMLHttpRequest,\r\n upload = xhr.upload || {\r\n addEventListener: function (event, callback) {\r\n this[\"on\" + event] = callback;\r\n }\r\n },\r\n i = 0;\r\n i < length;\r\n i++\r\n ) {\r\n upload.addEventListener(\r\n split[i].substring(2),\r\n (function (event) {\r\n return function (rpe) {\r\n if (isFunction(handler[event])) {\r\n handler[event](rpe, xhr);\r\n }\r\n };\r\n })(split[i]),\r\n false\r\n );\r\n }\r\n upload.addEventListener(\r\n \"load\",\r\n function (rpe) {\r\n if (handler.onreadystatechange === false) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(function () {\r\n if (xhr.readyState === 4) {\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, xhr);\r\n }\r\n } else {\r\n setTimeout(arguments.callee, 15);\r\n }\r\n }, 15);\r\n }\r\n },\r\n false\r\n );\r\n xhr.open(\"post\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName), true);\r\n if (!xhr.upload) {\r\n var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true};\r\n rpe.interval = setInterval(function () {\r\n rpe.loaded += 1024 / 4;\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n }, 100);\r\n xhr.onabort = function () {\r\n upload.onabort({});\r\n };\r\n xhr.onerror = function () {\r\n upload.onerror({});\r\n };\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 2:\r\n case 3:\r\n if (rpe.total <= rpe.loaded) {\r\n rpe.loaded = rpe.total;\r\n }\r\n upload.onprogress(rpe);\r\n break;\r\n case 4:\r\n clearInterval(rpe.interval);\r\n rpe.interval = 0;\r\n rpe.loaded = rpe.total;\r\n upload.onprogress(rpe);\r\n if (199 < xhr.status && xhr.status < 400) {\r\n upload[\"onload\"]({});\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n attachO.filename = handler.file.fileName;\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n handler.attach_array.push(attachO);\r\n } else {\r\n upload[\"onerror\"]({});\r\n }\r\n break;\r\n }\r\n };\r\n upload.onloadstart(rpe);\r\n } else {\r\n xhr.onreadystatechange = function () {\r\n switch (xhr.readyState) {\r\n case 4:\r\n var attachO = BI.jsonDecode(xhr.responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n attachO.filename = handler.file.fileName;\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n // handler.attach_array.push(attachO);\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n break;\r\n }\r\n };\r\n if (isFunction(upload.onloadstart)) {\r\n upload.onloadstart();\r\n }\r\n }\r\n var boundary = \"AjaxUploadBoundary\" + (new Date).getTime();\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data; boundary=\" + boundary);\r\n if (handler.file.getAsBinary) {\r\n xhr[xhr.sendAsBinary ? \"sendAsBinary\" : \"send\"](multipart(boundary, handler.name, handler.file));\r\n } else {\r\n xhr.setRequestHeader(\"Content-Type\", \"multipart/form-data\");\r\n // xhr.setRequestHeader(\"X-Name\", handler.name);\r\n // xhr.setRequestHeader(\"X-File-Name\", handler.file.fileName);\r\n var form = new FormData();\r\n form.append(\"FileData\", handler.file);\r\n xhr.send(form);\r\n }\r\n return handler;\r\n };\r\n }\r\n // Internet Explorer, Opera, others\r\n else {\r\n sendFile = function (handler, maxSize, width, height) {\r\n var url = handler.url.concat(-1 === handler.url.indexOf(\"?\") ? \"?\" : \"&\", \"AjaxUploadFrame=true\"),\r\n rpe = {\r\n loaded: 1, total: 100, simulation: true, interval: setInterval(function () {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n if (isFunction(handler.onprogress)) {\r\n handler.onprogress(rpe, {});\r\n }\r\n }, 100)\r\n },\r\n onload = function () {\r\n iframe.onreadystatechange = iframe.onload = iframe.onerror = null;\r\n form.parentNode.removeChild(form);\r\n form = null;\r\n clearInterval(rpe.interval);\r\n // rpe.loaded = rpe.total;\r\n try {\r\n var responseText = (iframe.contentWindow.document || iframe.contentWindow.contentDocument).body.innerHTML;\r\n var attachO = BI.jsonDecode(responseText);\r\n if (handler.file.type.indexOf(\"image\") != -1) {\r\n attachO.attach_type = \"image\";\r\n }\r\n\r\n // attachO.fileSize = responseText.length;\r\n try {\r\n // decodeURIComponent特殊字符可能有问题, catch一下,保证能正常上传\r\n attachO.filename = _global.decodeURIComponent(handler.file.fileName);\r\n } catch (e) {\r\n attachO.filename = handler.file.fileName;\r\n }\r\n if (handler.maxlength == 1) {\r\n handler.attach_array[0] = attachO;\r\n } else {\r\n handler.attach_array.push(attachO);\r\n }\r\n } catch (e) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n }\r\n if (isFunction(handler.onload)) {\r\n handler.onload(rpe, {responseText: responseText});\r\n }\r\n },\r\n target = [\"AjaxUpload\", (new Date).getTime(), String(Math.random()).substring(2)].join(\"_\");\r\n try { // IE < 8 does not accept enctype attribute ...\r\n var form = document.createElement(\"<form enctype=\\\"multipart/form-data\\\"></form>\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"<iframe id=\\\"\" + target + \"\\\" name=\\\"\" + target + \"\\\" src=\\\"\" + url + \"\\\"></iframe>\"));\r\n } catch (e) {\r\n var form = document.createElement(\"form\"),\r\n iframe = handler.iframe || (handler.iframe = document.createElement(\"iframe\"));\r\n form.setAttribute(\"enctype\", \"multipart/form-data\");\r\n iframe.setAttribute(\"name\", iframe.id = target);\r\n iframe.setAttribute(\"src\", url);\r\n }\r\n iframe.style.position = \"absolute\";\r\n iframe.style.left = iframe.style.top = \"-10000px\";\r\n iframe.onload = onload;\r\n iframe.onerror = function (event) {\r\n if (isFunction(handler.onerror)) {\r\n handler.onerror(rpe, event || _global.event);\r\n }\r\n };\r\n iframe.onreadystatechange = function () {\r\n if (/loaded|complete/i.test(iframe.readyState)) {\r\n onload();\r\n\r\n // wei : todo,将附件信息放到handler.attach\r\n } else if (isFunction(handler.onloadprogress)) {\r\n if (rpe.loaded < rpe.total) {\r\n ++rpe.loaded;\r\n }\r\n handler.onloadprogress(rpe, {\r\n readyState: {\r\n loading: 2,\r\n interactive: 3,\r\n loaded: 4,\r\n complete: 4\r\n }[iframe.readyState] || 1\r\n });\r\n }\r\n };\r\n form.setAttribute(\"action\", handler.url + \"&filename=\" + _global.encodeURIComponent(handler.file.fileName));\r\n form.setAttribute(\"target\", iframe.id);\r\n form.setAttribute(\"method\", \"post\");\r\n form.appendChild(handler.file);\r\n form.style.display = \"none\";\r\n if (isFunction(handler.onloadstart)) {\r\n handler.onloadstart(rpe, {});\r\n }\r\n with (document.body || document.documentElement) {\r\n appendChild(iframe);\r\n appendChild(form);\r\n form.submit();\r\n }\r\n\r\n return handler;\r\n };\r\n }\r\n xhr = null;\r\n return sendFile;\r\n })(Object.prototype.toString);\r\n\r\n var sendFiles = function (handler, maxSize, width, height) {\r\n\r\n var length = handler.files.length,\r\n i = 0,\r\n onload = handler.onload,\r\n onloadstart = handler.onloadstart;\r\n handler.current = 0;\r\n handler.total = 0;\r\n handler.sent = 0;\r\n while (handler.current < length) {\r\n handler.total += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n handler.current++;\r\n }\r\n handler.current = 0;\r\n if (length && handler.files[0].fileSize !== -1) {\r\n handler.file = handler.files[handler.current];\r\n\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n handler.onloadstart = null;\r\n handler.sent += (handler.files[handler.current].fileSize || handler.files[handler.current].size);\r\n if (++handler.current < length) {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = arguments.callee;\r\n } else if (onload) {\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }\r\n };\r\n } else if (length) {\r\n handler.total = length * 100;\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = function (rpe, xhr) {\r\n var callee = arguments.callee;\r\n handler.onloadstart = null;\r\n handler.sent += 100;\r\n if (++handler.current < length) {\r\n if (/\\b(chrome|safari)\\b/i.test(navigator.userAgent)) {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n }\r\n setTimeout(function () {\r\n handler.file = handler.files[handler.current];\r\n sendFile(handler, maxSize, width, height).onload = callee;\r\n }, 15);\r\n } else if (onload) {\r\n setTimeout(function () {\r\n handler.iframe.parentNode.removeChild(handler.iframe);\r\n handler.iframe = null;\r\n handler.onloadstart = onloadstart;\r\n handler.onload = onload;\r\n handler.onload(rpe, xhr);\r\n }, 15);\r\n }\r\n };\r\n }\r\n return handler;\r\n };\r\n\r\n BI.File = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.File.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-file display-block\",\r\n tagName: \"input\",\r\n attributes: {\r\n type: \"file\"\r\n },\r\n name: \"\",\r\n url: \"\",\r\n multiple: true,\r\n accept: \"\", /** '*.jpg; *.zip'**/\r\n maxSize: -1 // 1024 * 1024\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.File.superclass._init.apply(this, arguments);\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n this.element.attr(\"name\", o.name || this.getName());\r\n this.element.attr(\"title\", o.title || \"\");\r\n },\r\n\r\n created: function () {\r\n var self = this, o = this.options;\r\n // create the noswfupload.wrap Object\r\n // wrap.maxSize 文件大小限制\r\n // wrap.maxlength 文件个数限制\r\n var _wrap = this.wrap = this._wrap(this.element[0], o.maxSize);\r\n // fileType could contain whatever text but filter checks *.{extension}\r\n // if present\r\n\r\n // handlers\r\n\r\n _wrap.onloadstart = function (rpe, xhr) {\r\n // BI.Msg.toast(\"loadstart\");\r\n self.fireEvent(BI.File.EVENT_UPLOADSTART, arguments);\r\n };\r\n\r\n _wrap.onprogress = function (rpe, xhr) {\r\n // BI.Msg.toast(\"onprogress\");\r\n // percent for each bar\r\n\r\n // fileSize is -1 only if browser does not support file info access\r\n // this if splits recent browsers from others\r\n if (this.file.fileSize !== -1) {\r\n // simulation property indicates when the progress event is fake\r\n if (rpe.simulation) {\r\n\r\n } else {\r\n\r\n }\r\n } else {\r\n // if fileSIze is -1 browser is using an iframe because it does\r\n // not support\r\n // files sent via Ajax (XMLHttpRequest)\r\n // We can still show some information\r\n }\r\n self.fireEvent(BI.File.EVENT_PROGRESS, {\r\n file: this.file,\r\n total: rpe.total,\r\n loaded: rpe.loaded,\r\n simulation: rpe.simulation\r\n });\r\n };\r\n\r\n // generated if there is something wrong during upload\r\n _wrap.onerror = function () {\r\n // just inform the user something was wrong\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n };\r\n\r\n // generated when every file has been sent (one or more, it does not\r\n // matter)\r\n _wrap.onload = function (rpe, xhr) {\r\n var self_ = this;\r\n // just show everything is fine ...\r\n // ... and after a second reset the component\r\n setTimeout(function () {\r\n self_.clean(); // remove files from list\r\n self_.hide(); // hide progress bars and enable input file\r\n\r\n if (200 > xhr.status || xhr.status > 399) {\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR);\r\n return;\r\n }\r\n var error = BI.some(_wrap.attach_array, function (index, attach) {\r\n if (attach.errorCode) {\r\n BI.Msg.toast(attach.errorMsg, {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, attach);\r\n return true;\r\n }\r\n });\r\n !error && self.fireEvent(BI.File.EVENT_UPLOADED);\r\n // enable again the submit button/element\r\n }, 1000);\r\n };\r\n _wrap.url = o.url;\r\n _wrap.fileType = o.accept; // 文件类型限制\r\n _wrap.attach_array = [];\r\n _wrap.attach_names = [];\r\n _wrap.attachNum = 0;\r\n },\r\n\r\n _events: function (wrap) {\r\n var self = this;\r\n event.add(wrap.dom.input, \"change\", function () {\r\n event.del(wrap.dom.input, \"change\", arguments.callee);\r\n for (var input = wrap.dom.input.cloneNode(true), i = 0, files = F(wrap.dom.input); i < files.length; i++) {\r\n var item = files.item(i);\r\n var tempFile = item.value || item.name;\r\n var value = item.fileName || (item.fileName = tempFile.split(\"\\\\\").pop()),\r\n ext = -1 !== value.indexOf(\".\") ? value.split(\".\").pop().toLowerCase() : \"unknown\",\r\n size = item.fileSize || item.size;\r\n if (wrap.fileType && -1 === wrap.fileType.indexOf(\"*.\" + ext)) {\r\n // 文件类型不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Type_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 0,\r\n file: item\r\n });\r\n } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {\r\n // 文件大小不支持\r\n BI.Msg.toast(BI.i18nText(\"BI-Upload_File_Size_Error\"), {level: \"error\"});\r\n self.fireEvent(BI.File.EVENT_ERROR, {\r\n errorType: 1,\r\n file: item\r\n });\r\n } else {\r\n wrap.files.unshift(item);\r\n // BI.Msg.toast(value);\r\n }\r\n }\r\n wrap.files.length > 0 && self.fireEvent(BI.File.EVENT_CHANGE, {\r\n files: wrap.files\r\n });\r\n input.value = \"\";\r\n wrap.dom.input.parentNode.replaceChild(input, wrap.dom.input);\r\n wrap.dom.input = input;\r\n event.add(wrap.dom.input, \"change\", arguments.callee);\r\n });\r\n return wrap;\r\n },\r\n\r\n _wrap: function () {\r\n var self = this, o = this.options;\r\n // be sure input accept multiple files\r\n var input = this.element[0];\r\n if (o.multiple === true) {\r\n this.element.attr(\"multiple\", \"multiple\");\r\n }\r\n input.value = \"\";\r\n\r\n // wrap Object\r\n return this._events({\r\n\r\n // DOM namespace\r\n dom: {\r\n input: input, // input file\r\n disabled: false // internal use, checks input file state\r\n },\r\n name: input.name, // name to send for each file ($_FILES[{name}] in the server)\r\n // maxSize is the maximum amount of bytes for each file\r\n maxSize: o.maxSize ? o.maxSize >> 0 : -1,\r\n files: [], // file list\r\n\r\n // remove every file from the noswfupload component\r\n clean: function () {\r\n this.files = [];\r\n },\r\n\r\n // upload one file a time (which make progress possible rather than all files in one shot)\r\n // the handler is an object injected into the wrap one, could be the wrap itself or\r\n // something like {onload:function(){alert(\"OK\")},onerror:function(){alert(\"Error\")}, etc ...}\r\n upload: function (handler) {\r\n if (handler) {\r\n for (var key in handler) {\r\n this[key] = handler[key];\r\n }\r\n }\r\n sendFiles(this, this.maxSize);\r\n return this;\r\n },\r\n\r\n // hide progress bar (total + current) and enable files selection\r\n hide: function () {\r\n if (this.dom.disabled) {\r\n this.dom.disabled = false;\r\n this.dom.input.removeAttribute(\"disabled\");\r\n }\r\n },\r\n\r\n // show progress bar and disable file selection (used during upload)\r\n // total and current are pixels used to style bars\r\n // totalProp and currentProp are properties to change, \"height\" by default\r\n show: function (total, current, totalProp, currentProp) {\r\n if (!this.dom.disabled) {\r\n this.dom.disabled = true;\r\n this.dom.input.setAttribute(\"disabled\", \"disabled\");\r\n }\r\n }\r\n });\r\n },\r\n\r\n select: function () {\r\n this.wrap && BI.Widget._renderEngine.createElement(this.wrap.dom.input).click();\r\n },\r\n\r\n upload: function (handler) {\r\n this.wrap && this.wrap.upload(handler);\r\n },\r\n\r\n getValue: function () {\r\n return this.wrap ? this.wrap.attach_array : [];\r\n },\r\n\r\n reset: function () {\r\n if (this.wrap) {\r\n this.wrap.attach_array = [];\r\n this.wrap.attach_names = [];\r\n this.wrap.attachNum = 0;\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.File.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.attr(\"disabled\", \"disabled\");\r\n } else {\r\n this.element.removeAttr(\"disabled\");\r\n }\r\n }\r\n });\r\n BI.File.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.File.EVENT_UPLOADSTART = \"EVENT_UPLOADSTART\";\r\n BI.File.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.File.EVENT_PROGRESS = \"EVENT_PROGRESS\";\r\n BI.File.EVENT_UPLOADED = \"EVENT_UPLOADED\";\r\n BI.shortcut(\"bi.file\", BI.File);\r\n})(_global.document || {});/**\r\n * guy\r\n * @class BI.Input 一个button和一行数 组成的一行listitem\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Input = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Input.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-input display-block overflow-dot\",\r\n tagName: \"input\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn, // 按确定键能否退出编辑\r\n allowBlank: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Input.superclass._init.apply(this, arguments);\r\n var self = this;\r\n var ctrlKey = false;\r\n var keyCode = null;\r\n var inputEventValid = false;\r\n var _keydown = BI.debounce(function (keyCode) {\r\n self.onKeyDown(keyCode, ctrlKey);\r\n self._keydown_ = false;\r\n }, 300);\r\n var _clk = BI.debounce(BI.bind(this._click, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._focusDebounce = BI.debounce(BI.bind(this._focus, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this._blurDebounce = BI.debounce(BI.bind(this._blur, this), BI.EVENT_RESPONSE_TIME, {\r\n \"leading\": true,\r\n \"trailing\": false\r\n });\r\n this.element\r\n .keydown(function (e) {\r\n inputEventValid = false;\r\n ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下\r\n keyCode = e.keyCode;\r\n self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments);\r\n })\r\n .keyup(function (e) {\r\n keyCode = null;\r\n if (!(inputEventValid && e.keyCode === BI.KeyCode.ENTER)) {\r\n self._keydown_ = true;\r\n _keydown(e.keyCode);\r\n }\r\n })\r\n .on(\"input propertychange\", function (e) {\r\n // 输入内容全选并直接删光,如果按键没放开就失去焦点不会触发keyup,被focusout覆盖了\r\n // 其中propertychange在元素属性发生改变的时候就会触发 是为了兼容IE8\r\n // 通过keyCode判断会漏掉输入法点击输入(右键粘贴暂缓)\r\n var originalEvent = e.originalEvent;\r\n if (BI.isNull(originalEvent.propertyName) || originalEvent.propertyName === \"value\") {\r\n inputEventValid = true;\r\n self._keydown_ = true;\r\n _keydown(keyCode);\r\n keyCode = null;\r\n }\r\n })\r\n .click(function (e) {\r\n e.stopPropagation();\r\n _clk();\r\n })\r\n .mousedown(function (e) {\r\n self.element.val(self.element.val());\r\n })\r\n .focus(function (e) { // 可以不用冒泡\r\n self._focusDebounce();\r\n })\r\n .focusout(function (e) {\r\n self._blurDebounce();\r\n });\r\n if (BI.isKey(this.options.value) || BI.isEmptyString(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n _focus: function () {\r\n this.element.addClass(\"bi-input-focus\");\r\n this._checkValidationOnValueChange();\r\n this._isEditing = true;\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this.fireEvent(BI.Input.EVENT_FOCUS);\r\n },\r\n\r\n _blur: function () {\r\n var self = this;\r\n if (self._keydown_ === true) {\r\n BI.delay(blur, 300);\r\n } else {\r\n blur();\r\n }\r\n\r\n function blur () {\r\n if (!self.isValid() && self.options.quitChecker.apply(self, [BI.trim(self.getValue())]) !== false) {\r\n self.element.val(self._lastValidValue ? self._lastValidValue : \"\");\r\n self._checkValidationOnValueChange();\r\n self._defaultState();\r\n }\r\n self.element.removeClass(\"bi-input-focus\");\r\n self._isEditing = false;\r\n self._start = false;\r\n if (self.isValid()) {\r\n var lastValidValue = self._lastValidValue;\r\n self._lastValidValue = self.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CONFIRM, self.getValue(), self);\r\n self.fireEvent(BI.Input.EVENT_CONFIRM);\r\n if (self._lastValidValue !== lastValidValue) {\r\n self.fireEvent(BI.Input.EVENT_CHANGE_CONFIRM);\r\n }\r\n }\r\n self.fireEvent(BI.Input.EVENT_BLUR);\r\n }\r\n },\r\n\r\n _click: function () {\r\n if (this._isEditing !== true) {\r\n this.selectAll();\r\n this.fireEvent(BI.Input.EVENT_CLICK);\r\n }\r\n },\r\n\r\n onClick: function () {\r\n this._click();\r\n },\r\n\r\n onKeyDown: function (keyCode, ctrlKey) {\r\n if (!this.isValid() || BI.trim(this._lastChangedValue) !== BI.trim(this.getValue())) {\r\n this._checkValidationOnValueChange();\r\n }\r\n if (this.isValid() && BI.trim(this.getValue()) !== \"\") {\r\n if (BI.trim(this.getValue()) !== this._lastValue && (!this._start || this._lastValue == null || this._lastValue === \"\")\r\n || (this._pause === true && !/(\\s|\\u00A0)$/.test(this.getValue()))) {\r\n this._start = true;\r\n this._pause = false;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STARTEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_START);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.ENTER) {\r\n if (this.isValid() || this.options.quitChecker.apply(this, [BI.trim(this.getValue())]) !== false) {\r\n this.blur();\r\n this.fireEvent(BI.Input.EVENT_ENTER);\r\n } else {\r\n this.fireEvent(BI.Input.EVENT_RESTRICT);\r\n }\r\n }\r\n if (keyCode == BI.KeyCode.SPACE) {\r\n this.fireEvent(BI.Input.EVENT_SPACE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE && this._lastValue == \"\") {\r\n this.fireEvent(BI.Input.EVENT_REMOVE);\r\n }\r\n if (keyCode == BI.KeyCode.BACKSPACE || keyCode == BI.KeyCode.DELETE) {\r\n this.fireEvent(BI.Input.EVENT_BACKSPACE);\r\n }\r\n this.fireEvent(BI.Input.EVENT_KEY_DOWN, arguments);\r\n\r\n // _valueChange中会更新_lastValue, 这边缓存用以后续STOP事件服务\r\n var lastValue = this._lastValue;\r\n if(BI.trim(this.getValue()) !== BI.trim(this._lastValue || \"\")){\r\n this._valueChange();\r\n }\r\n if (BI.isEndWithBlank(this.getValue())) {\r\n this._pause = true;\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.PAUSE, \"\", this);\r\n this.fireEvent(BI.Input.EVENT_PAUSE);\r\n this._defaultState();\r\n } else if ((keyCode === BI.KeyCode.BACKSPACE || keyCode === BI.KeyCode.DELETE) &&\r\n BI.trim(this.getValue()) === \"\" && (lastValue !== null && BI.trim(lastValue) !== \"\")) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_STOP);\r\n }\r\n },\r\n\r\n // 初始状态\r\n _defaultState: function () {\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n this._lastSubmitValue = null;\r\n },\r\n\r\n _valueChange: function () {\r\n if (this.isValid() && BI.trim(this.getValue()) !== this._lastSubmitValue) {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CHANGE, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_CHANGE);\r\n this._lastSubmitValue = BI.trim(this.getValue());\r\n }\r\n if (this.getValue() == \"\") {\r\n this.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.EMPTY, this.getValue(), this);\r\n this.fireEvent(BI.Input.EVENT_EMPTY);\r\n }\r\n this._lastValue = this.getValue();\r\n },\r\n\r\n _checkValidationOnValueChange: function () {\r\n var o = this.options;\r\n var v = this.getValue();\r\n this.setValid(\r\n (o.allowBlank === true && BI.trim(v) == \"\") || (\r\n BI.isNotEmptyString(BI.trim(v)) && o.validationChecker.apply(this, [BI.trim(v)]) !== false\r\n )\r\n );\r\n },\r\n\r\n focus: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能focus\");\r\n }\r\n if (!this._isEditing === true) {\r\n this.element.focus();\r\n this.selectAll();\r\n }\r\n },\r\n\r\n blur: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能blur\");\r\n }\r\n if (this._isEditing === true) {\r\n this.element.blur();\r\n this._blurDebounce();\r\n }\r\n },\r\n\r\n selectAll: function () {\r\n if (!this.element.is(\":visible\")) {\r\n throw new Error(\"input输入框在不可见下不能select\");\r\n }\r\n this.element.select();\r\n this._isEditing = true;\r\n },\r\n\r\n setValue: function (textValue) {\r\n this.element.val(textValue);\r\n BI.nextTick(BI.bind(function () {\r\n this._checkValidationOnValueChange();\r\n this._defaultState();\r\n if (this.isValid()) {\r\n this._lastValidValue = this._lastSubmitValue = this.getValue();\r\n }\r\n }, this));\r\n },\r\n\r\n getValue: function () {\r\n return this.element.val() || \"\";\r\n },\r\n\r\n isEditing: function () {\r\n return this._isEditing;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this._lastValidValue;\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this._lastChangedValue;\r\n },\r\n\r\n _setValid: function () {\r\n BI.Input.superclass._setValid.apply(this, arguments);\r\n if (this.isValid()) {\r\n this._lastChangedValue = this.getValue();\r\n this.element.removeClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_VALID, BI.trim(this.getValue()), this);\r\n } else {\r\n if (this._lastChangedValue === this.getValue()) {\r\n this._lastChangedValue = null;\r\n }\r\n this.element.addClass(\"bi-input-error\");\r\n this.fireEvent(BI.Input.EVENT_ERROR, BI.trim(this.getValue()), this);\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.Input.superclass._setEnable.apply(this, [b]);\r\n this.element[0].disabled = !b;\r\n }\r\n});\r\nBI.Input.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.Input.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.Input.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.Input.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.Input.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.Input.EVENT_QUICK_DOWN = \"EVENT_QUICK_DOWN\";\r\nBI.Input.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.Input.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.Input.EVENT_START = \"EVENT_START\";\r\nBI.Input.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.Input.EVENT_STOP = \"EVENT_STOP\";\r\nBI.Input.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.Input.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.Input.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.Input.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.Input.EVENT_VALID = \"EVENT_VALID\";\r\nBI.Input.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.Input.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.Input.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.shortcut(\"bi.input\", BI.Input);\r\n/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.ImageRadio = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ImageRadio.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-radio radio-icon\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ImageRadio.superclass._init.apply(this, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ImageRadio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.ImageRadio.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.ImageRadio.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.image_radio\", BI.ImageRadio);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.Radio = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n baseCls: \"bi-radio\",\r\n selected: false,\r\n handler: BI.emptyFn,\r\n width: 16,\r\n height: 16,\r\n iconWidth: 14,\r\n iconHeight: 14\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"radio-content\",\r\n ref: function (_ref) {\r\n self.radio = _ref;\r\n },\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n };\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Radio.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.radio.element.removeClass(\"base-disabled disabled\");\r\n } else {\r\n this.radio.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n doClick: function () {\r\n BI.Radio.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.Radio.EVENT_CHANGE);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.Radio.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this.radio.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.radio.element.removeClass(\"bi-high-light-background\");\r\n }\r\n }\r\n});\r\nBI.Radio.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.radio\", BI.Radio);/**\r\n * Created by dailer on 2019/6/19.\r\n */\r\n\r\nBI.AbstractLabel = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function (props) {\r\n var conf = BI.AbstractLabel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\", // normal or nowrap\r\n textWidth: null,\r\n textHeight: null,\r\n hgap: 0,\r\n vgap: 0,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n text: \"\",\r\n highLight: false\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.AbstractLabel.superclass._init.apply(this, arguments);\r\n\r\n if (this.options.textAlign === \"center\") {\r\n this._createCenterEl();\r\n } else {\r\n this._createNotCenterEl();\r\n }\r\n },\r\n\r\n _createCenterEl: function () {\r\n var o = this.options;\r\n var json = this._createJson();\r\n json.textAlign = \"left\";\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.maxWidth = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.1\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 1.2\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.3\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.4\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, { // 1.5\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n maxWidth: \"100%\"\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) { // 1.6\r\n json.maxWidth = o.textWidth;\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (o.whiteSpace == \"normal\") { // 1.7\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n this.text = BI.createWidget(json);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n scrollable: true,\r\n element: this,\r\n items: [this.text]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 1.8\r\n this.element.css({\r\n \"line-height\": o.height + \"px\"\r\n });\r\n json.textAlign = o.textAlign;\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this,\r\n items: [this.text]\r\n });\r\n },\r\n\r\n _createNotCenterEl: function () {\r\n var o = this.options;\r\n var adaptLayout = o.textAlign === \"right\" ? \"bi.right_vertical_adapt\" : \"bi.vertical_adapt\";\r\n var json = this._createJson();\r\n if (BI.isNumber(o.width) && o.width > 0) {\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.1\r\n BI.createWidget({\r\n type: adaptLayout,\r\n height: o.height,\r\n scrollable: o.whiteSpace === \"normal\",\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n BI.createWidget({ // 2.2\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) { // 2.3\r\n this.text = BI.createWidget(BI.extend(json, {\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n return;\r\n }\r\n json.width = o.width - 2 * o.hgap - o.lgap - o.rgap;\r\n BI.createWidget({ // 2.4\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [{\r\n el: (this.text = BI.createWidget(json))\r\n }]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.textWidth) && o.textWidth > 0) {\r\n json.width = o.textWidth;\r\n BI.createWidget({ // 2.5\r\n type: adaptLayout,\r\n scrollable: o.whiteSpace === \"normal\",\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n element: this,\r\n items: [\r\n {\r\n el: (this.text = BI.createWidget(json))\r\n }\r\n ]\r\n });\r\n return;\r\n }\r\n if (BI.isNumber(o.height) && o.height > 0) {\r\n if (o.whiteSpace !== \"normal\") {\r\n this.element.css({\r\n \"line-height\": o.height - (o.vgap * 2) + \"px\"\r\n });\r\n }\r\n this.text = BI.createWidget(BI.extend(json, { // 2.6\r\n element: this,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n }));\r\n return;\r\n }\r\n BI.extend(json, {\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap\r\n });\r\n\r\n this.text = BI.createWidget(BI.extend(json, {\r\n maxWidth: \"100%\"\r\n }));\r\n BI.createWidget({\r\n type: adaptLayout,\r\n element: this,\r\n scrollable: o.whiteSpace === \"normal\",\r\n items: [this.text]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setText: function (v) {\r\n this.options.text = v;\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.options.text;\r\n },\r\n\r\n setStyle: function (css) {\r\n this.text.setStyle(css);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.AbstractLabel.superclass.setValue.apply(this, arguments);\r\n if (!this.isReadOnly()) {\r\n this.text.setValue(v);\r\n }\r\n },\r\n\r\n populate: function () {\r\n BI.AbstractLabel.superclass.populate.apply(this, arguments);\r\n }\r\n});/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.HtmlLabel = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-html-label\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.html\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.html_label\", BI.HtmlLabel);/**\r\n * @class BI.IconButton\r\n * @extends BI.BasicButton\r\n * 图标标签\r\n */\r\nBI.IconLabel = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-icon-label horizon-center\",\r\n iconWidth: null,\r\n iconHeight: null\r\n },\r\n\r\n _init: function () {\r\n BI.IconLabel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.element.css({\r\n textAlign: \"center\"\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n });\r\n if (BI.isNumber(o.height) && o.height > 0 && BI.isNull(o.iconWidth) && BI.isNull(o.iconHeight)) {\r\n this.element.css(\"lineHeight\", o.height + \"px\");\r\n BI.createWidget({\r\n type: \"bi.default\",\r\n element: this,\r\n items: [this.icon]\r\n });\r\n } else {\r\n this.element.css(\"lineHeight\", \"1\");\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.center_adapt\",\r\n items: [this.icon]\r\n });\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_label\", BI.IconLabel);/**\r\n * Created by GUY on 2015/6/26.\r\n */\r\n\r\nBI.Label = BI.inherit(BI.AbstractLabel, {\r\n\r\n props: {\r\n baseCls: \"bi-label\",\r\n py: \"\",\r\n keyword: \"\"\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.text\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n highLight: o.highLight\r\n };\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.label\", BI.Label);/**\r\n * guy a元素\r\n * @class BI.Link\r\n * @extends BI.Text\r\n */\r\nBI.Link = BI.inherit(BI.Label, {\r\n _defaultConfig: function () {\r\n var conf = BI.Link.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-link display-block\",\r\n tagName: \"a\",\r\n href: \"\",\r\n target: \"_blank\"\r\n });\r\n },\r\n\r\n _createJson: function () {\r\n var o = this.options;\r\n return {\r\n type: \"bi.a\",\r\n textAlign: o.textAlign,\r\n whiteSpace: o.whiteSpace,\r\n lineHeight: o.textHeight,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py,\r\n href: o.href,\r\n target: o.target\r\n };\r\n },\r\n\r\n _init: function () {\r\n BI.Link.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.link\", BI.Link);/**\r\n * guy\r\n * 气泡提示\r\n * @class BI.Bubble\r\n * @extends BI.Tip\r\n * @type {*|void|Object}\r\n */\r\nBI.Bubble = BI.inherit(BI.Tip, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Bubble.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble\",\r\n direction: \"top\",\r\n text: \"\",\r\n level: \"error\",\r\n height: 18\r\n });\r\n },\r\n _init: function () {\r\n BI.Bubble.superclass._init.apply(this, arguments);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n BI.createWidget({\r\n type: \"bi.left\",\r\n element: this,\r\n items: [this[\"_\" + this.options.direction]()]\r\n });\r\n },\r\n\r\n _createBubbleText: function () {\r\n var o = this.options;\r\n return (this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"bubble-text\" + (\" bubble-\" + o.level),\r\n text: o.text,\r\n hgap: 5,\r\n height: 18\r\n }));\r\n },\r\n\r\n _top: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: this._createBubbleText(),\r\n height: 18\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }]\r\n });\r\n },\r\n\r\n _bottom: function () {\r\n return BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n height: 3\r\n }, {\r\n el: this._createBubbleText(),\r\n height: 18\r\n }]\r\n });\r\n },\r\n\r\n _left: function () {\r\n return BI.createWidget({\r\n type: \"bi.right\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n _right: function () {\r\n return BI.createWidget({\r\n type: \"bi.left\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n width: 3,\r\n height: 18\r\n }\r\n }, {\r\n el: this._createBubbleText()\r\n }]\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble\", BI.Bubble);/**\r\n * toast提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Toast\r\n * @extends BI.Tip\r\n */\r\nBI.Toast = BI.inherit(BI.Tip, {\r\n _const: {\r\n minWidth: 200,\r\n hgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Toast.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-toast\",\r\n text: \"\",\r\n level: \"success\" // success或warning\r\n });\r\n },\r\n _init: function () {\r\n BI.Toast.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.css({\r\n minWidth: this._const.minWidth + \"px\"\r\n });\r\n this.element.addClass(\"toast-\" + o.level);\r\n var fn = function (e) {\r\n e.stopPropagation();\r\n e.stopEvent();\r\n return false;\r\n };\r\n this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn});\r\n var cls = \"close-font\";\r\n switch(o.level) {\r\n case \"success\":\r\n cls = \"toast-success-font\";\r\n break;\r\n case \"error\":\r\n cls = \"toast-error-font\";\r\n break;\r\n case \"warning\":\r\n cls = \"toast-warning-font\";\r\n break;\r\n case \"normal\":\r\n default:\r\n cls = \"toast-message-font\";\r\n break;\r\n }\r\n\r\n var items = [{\r\n type: \"bi.icon_label\",\r\n cls: cls + \" toast-icon\",\r\n width: 36\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 16,\r\n textAlign: \"left\"\r\n },\r\n rgap: o.autoClose ? this._const.hgap : 0\r\n }];\r\n\r\n var columnSize = [36, \"\"];\r\n\r\n if(o.autoClose === false) {\r\n items.push({\r\n type: \"bi.icon_button\",\r\n cls: \"close-font toast-icon\",\r\n handler: function () {\r\n self.destroy();\r\n },\r\n width: 36\r\n });\r\n columnSize.push(36);\r\n }\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.horizontal_adapt\",\r\n element: this,\r\n items: items,\r\n vgap: 7,\r\n columnSize: columnSize\r\n });\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n beforeDestroy: function () {\r\n this.fireEvent(BI.Toast.EVENT_DESTORY);\r\n }\r\n});\r\nBI.Toast.EVENT_DESTORY = \"EVENT_DESTORY\";\r\nBI.shortcut(\"bi.toast\", BI.Toast);/**\r\n * title提示\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Tooltip\r\n * @extends BI.Tip\r\n */\r\nBI.Tooltip = BI.inherit(BI.Tip, {\r\n _const: {\r\n hgap: 5,\r\n vgap: 3\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Tooltip.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tooltip\",\r\n text: \"\",\r\n level: \"success\", // success或warning\r\n stopEvent: false,\r\n stopPropagation: false\r\n });\r\n },\r\n _init: function () {\r\n BI.Tooltip.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.element.addClass(\"tooltip-\" + o.level);\r\n var fn = function (e) {\r\n o.stopPropagation && e.stopPropagation();\r\n o.stopEvent && e.stopEvent();\r\n };\r\n this.element.bind({\r\n click: fn,\r\n mousedown: fn,\r\n mouseup: fn,\r\n mouseover: fn,\r\n mouseenter: fn,\r\n mouseleave: fn,\r\n mousemove: fn\r\n });\r\n\r\n var texts = (o.text + \"\").split(\"\\n\");\r\n if (texts.length > 1) {\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n hgap: this._const.hgap,\r\n items: BI.map(texts, function (i, text) {\r\n return {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: text,\r\n textHeight: 18\r\n };\r\n })\r\n });\r\n } else {\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: \"left\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n textHeight: 18,\r\n hgap: this._const.hgap\r\n });\r\n }\r\n },\r\n\r\n setWidth: function (width) {\r\n this.element.width(width - 2 * this._const.hgap);\r\n },\r\n\r\n setText: function (text) {\r\n this.text && this.text.setText(text);\r\n },\r\n\r\n setLevel: function (level) {\r\n this.element.removeClass(\"tooltip-success\").removeClass(\"tooltip-warning\");\r\n this.element.addClass(\"tooltip-\" + level);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tooltip\", BI.Tooltip);/**\r\n * 下拉\r\n * @class BI.Trigger\r\n * @extends BI.Single\r\n * @abstract\r\n */\r\nBI.Trigger = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.Trigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-trigger cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Trigger.superclass._init.apply(this, arguments);\r\n },\r\n\r\n setKey: function () {\r\n\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});/**\r\n *\r\n * 自定义树\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.CustomTree\r\n * @extends BI.Single\r\n */\r\nBI.CustomTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-tree\",\r\n expander: {\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomTree.superclass._init.apply(this, arguments);\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes) {\r\n var self = this, o = this.options;\r\n nodes = BI.Tree.transformToTreeFormat(nodes);\r\n\r\n var items = [];\r\n BI.each(nodes, function (i, node) {\r\n if (BI.isNotEmptyArray(node.children) || node.isParent === true) {\r\n var item = BI.extend({\r\n type: \"bi.expander\",\r\n el: {\r\n value: node.value\r\n },\r\n popup: {type: \"bi.custom_tree\"}\r\n }, BI.deepClone(o.expander), {\r\n id: node.id,\r\n pId: node.pId\r\n });\r\n var el = BI.stripEL(node);\r\n if (!BI.isWidget(el)) {\r\n el = BI.clone(el);\r\n delete el.children;\r\n BI.extend(item.el, el);\r\n } else {\r\n item.el = el;\r\n }\r\n item.popup.expander = BI.deepClone(o.expander);\r\n item.items = item.popup.items = node.children;\r\n item.itemsCreator = item.popup.itemsCreator = function (op) {\r\n if (BI.isNotNull(op.node)) {// 从子节点传过来的itemsCreator直接向上传递\r\n return o.itemsCreator.apply(self, arguments);\r\n }\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0].node = node;\r\n return o.itemsCreator.apply(self, args);\r\n };\r\n BI.isNull(item.popup.el) && (item.popup.el = BI.deepClone(o.el));\r\n items.push(item);\r\n } else {\r\n items.push(node);\r\n }\r\n });\r\n return items;\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget(o.el, {\r\n element: this,\r\n items: this._formatItems(nodes),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(this, [op, function (items) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[0] = self._formatItems(items);\r\n callback.apply(null, args);\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.CustomTree.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n if (arguments.length > 0) {\r\n args[0] = this._formatItems(nodes);\r\n }\r\n this.tree.populate.apply(this.tree, args);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree && this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree ? this.tree.getValue() : [];\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.tree ? this.tree.getAllButtons() : [];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree ? this.tree.getAllLeaves() : [];\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree && this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree && this.tree.getNodeByValue(id);\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n }\r\n});\r\nBI.CustomTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.custom_tree\", BI.CustomTree);/*\r\n * JQuery zTree core v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\tvar settings = {}, roots = {}, caches = {},\r\n\t//default consts of core\r\n\t_consts = {\r\n\t\tclassName: {\r\n\t\t\tBUTTON: \"button\",\r\n\t\t\tLEVEL: \"level\",\r\n\t\t\tICO_LOADING: \"ico_loading\",\r\n\t\t\tSWITCH: \"switch\"\r\n\t\t},\r\n\t\tevent: {\r\n\t\t\tNODECREATED: \"ztree_nodeCreated\",\r\n\t\t\tCLICK: \"ztree_click\",\r\n\t\t\tEXPAND: \"ztree_expand\",\r\n\t\t\tCOLLAPSE: \"ztree_collapse\",\r\n\t\t\tASYNC_SUCCESS: \"ztree_async_success\",\r\n\t\t\tASYNC_ERROR: \"ztree_async_error\",\r\n\t\t\tREMOVE: \"ztree_remove\",\r\n\t\t\tSELECTED: \"ztree_selected\",\r\n\t\t\tUNSELECTED: \"ztree_unselected\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tA: \"_a\",\r\n\t\t\tICON: \"_ico\",\r\n\t\t\tSPAN: \"_span\",\r\n\t\t\tSWITCH: \"_switch\",\r\n\t\t\tUL: \"_ul\"\r\n\t\t},\r\n\t\tline: {\r\n\t\t\tROOT: \"root\",\r\n\t\t\tROOTS: \"roots\",\r\n\t\t\tCENTER: \"center\",\r\n\t\t\tBOTTOM: \"bottom\",\r\n\t\t\tNOLINE: \"noline\",\r\n\t\t\tLINE: \"line\"\r\n\t\t},\r\n\t\tfolder: {\r\n\t\t\tOPEN: \"open\",\r\n\t\t\tCLOSE: \"close\",\r\n\t\t\tDOCU: \"docu\"\r\n\t\t},\r\n\t\tnode: {\r\n\t\t\tCURSELECTED: \"curSelectedNode\"\r\n\t\t}\r\n\t},\r\n\t//default setting of core\r\n\t_setting = {\r\n\t\ttreeId: \"\",\r\n\t\ttreeObj: null,\r\n\t\tview: {\r\n\t\t\taddDiyDom: null,\r\n\t\t\tautoCancelSelected: true,\r\n\t\t\tdblClickExpand: true,\r\n\t\t\texpandSpeed: \"fast\",\r\n\t\t\tfontCss: {},\r\n\t\t\tnameIsHTML: false,\r\n\t\t\tselectedMulti: true,\r\n\t\t\tshowIcon: true,\r\n\t\t\tshowLine: true,\r\n\t\t\tshowTitle: true,\r\n\t\t\ttxtSelectedEnable: false\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchildren: \"children\",\r\n\t\t\t\tname: \"name\",\r\n\t\t\t\ttitle: \"\",\r\n\t\t\t\turl: \"url\"\r\n\t\t\t},\r\n\t\t\tsimpleData: {\r\n\t\t\t\tenable: false,\r\n\t\t\t\tidKey: \"id\",\r\n\t\t\t\tpIdKey: \"pId\",\r\n\t\t\t\trootPId: null\r\n\t\t\t},\r\n\t\t\tkeep: {\r\n\t\t\t\tparent: false,\r\n\t\t\t\tleaf: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tasync: {\r\n\t\t\tenable: false,\r\n\t\t\tcontentType: \"application/x-www-form-urlencoded\",\r\n\t\t\ttype: \"post\",\r\n\t\t\tdataType: \"text\",\r\n\t\t\turl: \"\",\r\n\t\t\tautoParam: [],\r\n\t\t\totherParam: [],\r\n\t\t\tdataFilter: null\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeAsync:null,\r\n\t\t\tbeforeClick:null,\r\n\t\t\tbeforeDblClick:null,\r\n\t\t\tbeforeRightClick:null,\r\n\t\t\tbeforeMouseDown:null,\r\n\t\t\tbeforeMouseUp:null,\r\n\t\t\tbeforeExpand:null,\r\n\t\t\tbeforeCollapse:null,\r\n\t\t\tbeforeRemove:null,\r\n\r\n\t\t\tonAsyncError:null,\r\n\t\t\tonAsyncSuccess:null,\r\n\t\t\tonNodeCreated:null,\r\n\t\t\tonClick:null,\r\n\t\t\tonDblClick:null,\r\n\t\t\tonRightClick:null,\r\n\t\t\tonMouseDown:null,\r\n\t\t\tonMouseUp:null,\r\n\t\t\tonExpand:null,\r\n\t\t\tonCollapse:null,\r\n\t\t\tonRemove:null\r\n\t\t}\r\n\t},\r\n\t//default root of core\r\n\t//zTree use root to save full data\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tif (!r) {\r\n\t\t\tr = {};\r\n\t\t\tdata.setRoot(setting, r);\r\n\t\t}\r\n\t\tr[setting.data.key.children] = [];\r\n\t\tr.expandTriggerFlag = false;\r\n\t\tr.curSelectedList = [];\r\n\t\tr.noSelection = true;\r\n\t\tr.createdNodes = [];\r\n\t\tr.zId = 0;\r\n\t\tr._ver = (new Date()).getTime();\r\n\t},\r\n\t//default cache of core\r\n\t_initCache = function(setting) {\r\n\t\tvar c = data.getCache(setting);\r\n\t\tif (!c) {\r\n\t\t\tc = {};\r\n\t\t\tdata.setCache(setting, c);\r\n\t\t}\r\n\t\tc.nodes = [];\r\n\t\tc.doms = [];\r\n\t},\r\n\t//default bindEvent of core\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.NODECREATED, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onNodeCreated, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.CLICK, function (event, srcEvent, treeId, node, clickFlag) {\r\n\t\t\ttools.apply(setting.callback.onClick, [srcEvent, treeId, node, clickFlag]);\r\n\t\t});\r\n\r\n\t\to.bind(c.EXPAND, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onExpand, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.COLLAPSE, function (event, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onCollapse, [event, treeId, node]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_SUCCESS, function (event, treeId, node, msg) {\r\n\t\t\ttools.apply(setting.callback.onAsyncSuccess, [event, treeId, node, msg]);\r\n\t\t});\r\n\r\n\t\to.bind(c.ASYNC_ERROR, function (event, treeId, node, XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\ttools.apply(setting.callback.onAsyncError, [event, treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t});\r\n\r\n\t\to.bind(c.REMOVE, function (event, treeId, treeNode) {\r\n\t\t\ttools.apply(setting.callback.onRemove, [event, treeId, treeNode]);\r\n\t\t});\r\n\r\n\t\to.bind(c.SELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t\to.bind(c.UNSELECTED, function (event, srcEvent, treeId, node) {\r\n\t\t\ttools.apply(setting.callback.onUnSelected, [srcEvent, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.NODECREATED)\r\n\t\t.unbind(c.CLICK)\r\n\t\t.unbind(c.EXPAND)\r\n\t\t.unbind(c.COLLAPSE)\r\n\t\t.unbind(c.ASYNC_SUCCESS)\r\n\t\t.unbind(c.ASYNC_ERROR)\r\n\t\t.unbind(c.REMOVE)\r\n\t\t.unbind(c.SELECTED)\r\n\t\t.unbind(c.UNSELECTED);\r\n\t},\r\n\t//default event proxy of core\r\n\t_eventProxy = function(event) {\r\n\t\tvar target = event.target,\r\n\t\tsetting = data.getSetting(event.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null,\r\n\t\ttmp = null;\r\n\r\n\t\tif (tools.eqs(event.type, \"mousedown\")) {\r\n\t\t\ttreeEventType = \"mousedown\";\r\n\t\t} else if (tools.eqs(event.type, \"mouseup\")) {\r\n\t\t\ttreeEventType = \"mouseup\";\r\n\t\t} else if (tools.eqs(event.type, \"contextmenu\")) {\r\n\t\t\ttreeEventType = \"contextmenu\";\r\n\t\t} else if (tools.eqs(event.type, \"click\")) {\r\n\t\t\tif (tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.SWITCH) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t} else {\r\n\t\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\t\tif (tmp) {\r\n\t\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\t\tnodeEventType = \"clickNode\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(event.type, \"dblclick\")) {\r\n\t\t\ttreeEventType = \"dblclick\";\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {\r\n\t\t\t\ttId = tools.getNodeMainDom(tmp).id;\r\n\t\t\t\tnodeEventType = \"switchNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (treeEventType.length > 0 && tId.length == 0) {\r\n\t\t\ttmp = tools.getMDom(setting, target, [{tagName:\"a\", attrName:\"treeNode\"+consts.id.A}]);\r\n\t\t\tif (tmp) {tId = tools.getNodeMainDom(tmp).id;}\r\n\t\t}\r\n\t\t// event to node\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"switchNode\" :\r\n\t\t\t\t\tif (!node.isParent) {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t} else if (tools.eqs(event.type, \"click\")\r\n\t\t\t\t\t\t|| (tools.eqs(event.type, \"dblclick\") && tools.apply(setting.view.dblClickExpand, [setting.treeId, node], setting.view.dblClickExpand))) {\r\n\t\t\t\t\t\tnodeEventCallback = handler.onSwitchNode;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnodeEventType = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"clickNode\" :\r\n\t\t\t\t\tnodeEventCallback = handler.onClickNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// event to zTree\r\n\t\tswitch (treeEventType) {\r\n\t\t\tcase \"mousedown\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMousedown;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"mouseup\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeMouseup;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"dblclick\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeDblclick;\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"contextmenu\" :\r\n\t\t\t\ttreeEventCallback = handler.onZTreeContextmenu;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: false,\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of core\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar r = data.getRoot(setting),\r\n\t\tchildKey = setting.data.key.children;\r\n\t\tn.level = level;\r\n\t\tn.tId = setting.treeId + \"_\" + (++r.zId);\r\n\t\tn.parentTId = parentNode ? parentNode.tId : null;\r\n\t\tn.open = (typeof n.open == \"string\") ? tools.eqs(n.open, \"true\") : !!n.open;\r\n\t\tif (n[childKey] && n[childKey].length > 0) {\r\n\t\t\tn.isParent = true;\r\n\t\t\tn.zAsync = true;\r\n\t\t} else {\r\n\t\t\tn.isParent = (typeof n.isParent == \"string\") ? tools.eqs(n.isParent, \"true\") : !!n.isParent;\r\n\t\t\tn.open = (n.isParent && !setting.async.enable) ? n.open : false;\r\n\t\t\tn.zAsync = !n.isParent;\r\n\t\t}\r\n\t\tn.isFirstNode = isFirstNode;\r\n\t\tn.isLastNode = isLastNode;\r\n\t\tn.getParentNode = function() {return data.getNodeCache(setting, n.parentTId);};\r\n\t\tn.getPreNode = function() {return data.getPreNode(setting, n);};\r\n\t\tn.getNextNode = function() {return data.getNextNode(setting, n);};\r\n\t\tn.isAjaxing = false;\r\n\t\tdata.fixPIdKeyValue(setting, n);\r\n\t},\r\n\t_init = {\r\n\t\tbind: [_bindEvent],\r\n\t\tunbind: [_unbindEvent],\r\n\t\tcaches: [_initCache],\r\n\t\tnodes: [_initNode],\r\n\t\tproxys: [_eventProxy],\r\n\t\troots: [_initRoot],\r\n\t\tbeforeA: [],\r\n\t\tafterA: [],\r\n\t\tinnerBeforeA: [],\r\n\t\tinnerAfterA: [],\r\n\t\tzTreeTools: []\r\n\t},\r\n\t//method of operate data\r\n\tdata = {\r\n\t\taddNodeCache: function(setting, node) {\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = node;\r\n\t\t},\r\n\t\tgetNodeCacheId: function(tId) {\r\n\t\t\treturn tId.substring(tId.lastIndexOf(\"_\")+1);\r\n\t\t},\r\n\t\taddAfterA: function(afterA) {\r\n\t\t\t_init.afterA.push(afterA);\r\n\t\t},\r\n\t\taddBeforeA: function(beforeA) {\r\n\t\t\t_init.beforeA.push(beforeA);\r\n\t\t},\r\n\t\taddInnerAfterA: function(innerAfterA) {\r\n\t\t\t_init.innerAfterA.push(innerAfterA);\r\n\t\t},\r\n\t\taddInnerBeforeA: function(innerBeforeA) {\r\n\t\t\t_init.innerBeforeA.push(innerBeforeA);\r\n\t\t},\r\n\t\taddInitBind: function(bindEvent) {\r\n\t\t\t_init.bind.push(bindEvent);\r\n\t\t},\r\n\t\taddInitUnBind: function(unbindEvent) {\r\n\t\t\t_init.unbind.push(unbindEvent);\r\n\t\t},\r\n\t\taddInitCache: function(initCache) {\r\n\t\t\t_init.caches.push(initCache);\r\n\t\t},\r\n\t\taddInitNode: function(initNode) {\r\n\t\t\t_init.nodes.push(initNode);\r\n\t\t},\r\n\t\taddInitProxy: function(initProxy, isFirst) {\r\n\t\t\tif (!!isFirst) {\r\n\t\t\t\t_init.proxys.splice(0,0,initProxy);\r\n\t\t\t} else {\r\n\t\t\t\t_init.proxys.push(initProxy);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddInitRoot: function(initRoot) {\r\n\t\t\t_init.roots.push(initRoot);\r\n\t\t},\r\n\t\taddNodesData: function(setting, parentNode, nodes) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (!parentNode[childKey]) parentNode[childKey] = [];\r\n\t\t\tif (parentNode[childKey].length > 0) {\r\n\t\t\t\tparentNode[childKey][parentNode[childKey].length - 1].isLastNode = false;\r\n\t\t\t\tview.setNodeLineIcos(setting, parentNode[childKey][parentNode[childKey].length - 1]);\r\n\t\t\t}\r\n\t\t\tparentNode.isParent = true;\r\n\t\t\tparentNode[childKey] = parentNode[childKey].concat(nodes);\r\n\t\t},\r\n\t\taddSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tif (!data.isSelectedNode(setting, node)) {\r\n\t\t\t\troot.curSelectedList.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddCreatedNode: function(setting, node) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\troot.createdNodes.push(node);\r\n\t\t\t}\r\n\t\t},\r\n\t\taddZTreeTools: function(zTreeTools) {\r\n\t\t\t_init.zTreeTools.push(zTreeTools);\r\n\t\t},\r\n\t\texSetting: function(s) {\r\n\t\t\t$.extend(true, _setting, s);\r\n\t\t},\r\n\t\tfixPIdKeyValue: function(setting, node) {\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnode[setting.data.simpleData.pIdKey] = node.parentTId ? node.getParentNode()[setting.data.simpleData.idKey] : setting.data.simpleData.rootPId;\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.afterA.length; i<j; i++) {\r\n\t\t\t\t_init.afterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.beforeA.length; i<j; i++) {\r\n\t\t\t\t_init.beforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerAfterA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerAfterA.length; i<j; i++) {\r\n\t\t\t\t_init.innerAfterA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetInnerBeforeA: function(setting, node, array) {\r\n\t\t\tfor (var i=0, j=_init.innerBeforeA.length; i<j; i++) {\r\n\t\t\t\t_init.innerBeforeA[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetCache: function(setting) {\r\n\t\t\treturn caches[setting.treeId];\r\n\t\t},\r\n\t\tgetNextNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length-1; i<=l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==l ? null : p[childKey][i+1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return null;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\treturn nodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tvar tmp = data.getNodeByParam(setting, nodes[i][childKey], key, value);\r\n\t\t\t\tif (tmp) return tmp;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeCache: function(setting, tId) {\r\n\t\t\tif (!tId) return null;\r\n\t\t\tvar n = caches[setting.treeId].nodes[data.getNodeCacheId(tId)];\r\n\t\t\treturn n ? n : null;\r\n\t\t},\r\n\t\tgetNodeName: function(setting, node) {\r\n\t\t\tvar nameKey = setting.data.key.name;\r\n\t\t\treturn \"\" + node[nameKey];\r\n\t\t},\r\n\t\tgetNodeTitle: function(setting, node) {\r\n\t\t\tvar t = setting.data.key.title === \"\" ? setting.data.key.name : setting.data.key.title;\r\n\t\t\treturn \"\" + node[t];\r\n\t\t},\r\n\t\tgetNodes: function(setting) {\r\n\t\t\treturn data.getRoot(setting)[setting.data.key.children];\r\n\t\t},\r\n\t\tgetNodesByParam: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i][key] == value) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParam(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByParamFuzzy: function(setting, nodes, key, value) {\r\n\t\t\tif (!nodes || !key) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = [];\r\n\t\t\tvalue = value.toLowerCase();\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (typeof nodes[i][key] == \"string\" && nodes[i][key].toLowerCase().indexOf(value)>-1) {\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tresult = result.concat(data.getNodesByParamFuzzy(setting, nodes[i][childKey], key, value));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetNodesByFilter: function(setting, nodes, filter, isSingle, invokeParam) {\r\n\t\t\tif (!nodes) return (isSingle ? null : []);\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tresult = isSingle ? null : [];\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (tools.apply(filter, [nodes[i], invokeParam], false)) {\r\n\t\t\t\t\tif (isSingle) {return nodes[i];}\r\n\t\t\t\t\tresult.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tvar tmpResult = data.getNodesByFilter(setting, nodes[i][childKey], filter, isSingle, invokeParam);\r\n\t\t\t\tif (isSingle && !!tmpResult) {return tmpResult;}\r\n\t\t\t\tresult = isSingle ? tmpResult : result.concat(tmpResult);\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t},\r\n\t\tgetPreNode: function(setting, node) {\r\n\t\t\tif (!node) return null;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tp = node.parentTId ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\tfor (var i=0, l=p[childKey].length; i<l; i++) {\r\n\t\t\t\tif (p[childKey][i] === node) {\r\n\t\t\t\t\treturn (i==0 ? null : p[childKey][i-1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetRoot: function(setting) {\r\n\t\t\treturn setting ? roots[setting.treeId] : null;\r\n\t\t},\r\n\t\tgetRoots: function() {\r\n\t\t\treturn roots;\r\n\t\t},\r\n\t\tgetSetting: function(treeId) {\r\n\t\t\treturn settings[treeId];\r\n\t\t},\r\n\t\tgetSettings: function() {\r\n\t\t\treturn settings;\r\n\t\t},\r\n\t\tgetZTreeTools: function(treeId) {\r\n\t\t\tvar r = this.getRoot(this.getSetting(treeId));\r\n\t\t\treturn r ? r.treeTools : null;\r\n\t\t},\r\n\t\tinitCache: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.caches.length; i<j; i++) {\r\n\t\t\t\t_init.caches[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitNode: function(setting, level, node, parentNode, preNode, nextNode) {\r\n\t\t\tfor (var i=0, j=_init.nodes.length; i<j; i++) {\r\n\t\t\t\t_init.nodes[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tinitRoot: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.roots.length; i<j; i++) {\r\n\t\t\t\t_init.roots[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tisSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i]) return true;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tremoveNodeCache: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i=0, l=node[childKey].length; i<l; i++) {\r\n\t\t\t\t\targuments.callee(setting, node[childKey][i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getCache(setting).nodes[data.getNodeCacheId(node.tId)] = null;\r\n\t\t},\r\n\t\tremoveSelectedNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting);\r\n\t\t\tfor (var i=0, j=root.curSelectedList.length; i<j; i++) {\r\n\t\t\t\tif(node === root.curSelectedList[i] || !data.getNodeCache(setting, root.curSelectedList[i].tId)) {\r\n\t\t\t\t\troot.curSelectedList.splice(i, 1);\r\n\t\t\t\t\ti--;j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetCache: function(setting, cache) {\r\n\t\t\tcaches[setting.treeId] = cache;\r\n\t\t},\r\n\t\tsetRoot: function(setting, root) {\r\n\t\t\troots[setting.treeId] = root;\r\n\t\t},\r\n\t\tsetZTreeTools: function(setting, zTreeTools) {\r\n\t\t\tfor (var i=0, j=_init.zTreeTools.length; i<j; i++) {\r\n\t\t\t\t_init.zTreeTools[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\ttransformToArrayFormat: function (setting, nodes) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tr = [];\r\n\t\t\tif (tools.isArray(nodes)) {\r\n\t\t\t\tfor (var i=0, l=nodes.length; i<l; i++) {\r\n\t\t\t\t\tr.push(nodes[i]);\r\n\t\t\t\t\tif (nodes[i][childKey])\r\n\t\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[i][childKey]));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr.push(nodes);\r\n\t\t\t\tif (nodes[childKey])\r\n\t\t\t\t\tr = r.concat(data.transformToArrayFormat(setting, nodes[childKey]));\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\ttransformTozTreeFormat: function(setting, sNodes) {\r\n\t\t\tvar i,l,\r\n\t\t\tkey = setting.data.simpleData.idKey,\r\n\t\t\tparentKey = setting.data.simpleData.pIdKey,\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!key || key==\"\" || !sNodes) return [];\r\n\r\n\t\t\tif (tools.isArray(sNodes)) {\r\n\t\t\t\tvar r = [];\r\n\t\t\t\tvar tmpMap = {};\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\ttmpMap[sNodes[i][key]] = sNodes[i];\r\n\t\t\t\t}\r\n\t\t\t\tfor (i=0, l=sNodes.length; i<l; i++) {\r\n\t\t\t\t\tif (tmpMap[sNodes[i][parentKey]] && sNodes[i][key] != sNodes[i][parentKey]) {\r\n\t\t\t\t\t\tif (!tmpMap[sNodes[i][parentKey]][childKey])\r\n\t\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey] = [];\r\n\t\t\t\t\t\ttmpMap[sNodes[i][parentKey]][childKey].push(sNodes[i]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tr.push(sNodes[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn r;\r\n\t\t\t}else {\r\n\t\t\t\treturn [sNodes];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\tevent = {\r\n\t\tbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.bind.length; i<j; i++) {\r\n\t\t\t\t_init.bind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tunbindEvent: function(setting) {\r\n\t\t\tfor (var i=0, j=_init.unbind.length; i<j; i++) {\r\n\t\t\t\t_init.unbind[i].apply(this, arguments);\r\n\t\t\t}\r\n\t\t},\r\n\t\tbindTree: function(setting) {\r\n\t\t\tvar eventParam = {\r\n\t\t\t\ttreeId: setting.treeId\r\n\t\t\t},\r\n\t\t\to = setting.treeObj;\r\n\t\t\tif (!setting.view.txtSelectedEnable) {\r\n\t\t\t\t// for can't select text\r\n\t\t\t\to.bind('selectstart', function(e){\r\n\t\t\t\t\tvar node\r\n\t\t\t\t\tvar n = e.originalEvent.srcElement.nodeName.toLowerCase();\r\n\t\t\t\t\treturn (n === \"input\" || n === \"textarea\" );\r\n\t\t\t\t}).css({\r\n\t\t\t\t\t\"-moz-user-select\":\"-moz-none\"\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\to.bind('click', eventParam, event.proxy);\r\n\t\t\to.bind('dblclick', eventParam, event.proxy);\r\n\t\t\to.bind('mouseover', eventParam, event.proxy);\r\n\t\t\to.bind('mouseout', eventParam, event.proxy);\r\n\t\t\to.bind('mousedown', eventParam, event.proxy);\r\n\t\t\to.bind('mouseup', eventParam, event.proxy);\r\n\t\t\to.bind('contextmenu', eventParam, event.proxy);\r\n\t\t},\r\n\t\tunbindTree: function(setting) {\r\n\t\t\tvar o = setting.treeObj;\r\n\t\t\to.unbind('click', event.proxy)\r\n\t\t\t.unbind('dblclick', event.proxy)\r\n\t\t\t.unbind('mouseover', event.proxy)\r\n\t\t\t.unbind('mouseout', event.proxy)\r\n\t\t\t.unbind('mousedown', event.proxy)\r\n\t\t\t.unbind('mouseup', event.proxy)\r\n\t\t\t.unbind('contextmenu', event.proxy);\r\n\t\t},\r\n\t\tdoProxy: function(e) {\r\n\t\t\tvar results = [];\r\n\t\t\tfor (var i=0, j=_init.proxys.length; i<j; i++) {\r\n\t\t\t\tvar proxyResult = _init.proxys[i].apply(this, arguments);\r\n\t\t\t\tresults.push(proxyResult);\r\n\t\t\t\tif (proxyResult.stop) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tproxy: function(e) {\r\n\t\t\tvar setting = data.getSetting(e.data.treeId);\r\n\t\t\tif (!tools.uCanDo(setting, e)) return true;\r\n\t\t\tvar results = event.doProxy(e),\r\n\t\t\tr = true, x = false;\r\n\t\t\tfor (var i=0, l=results.length; i<l; i++) {\r\n\t\t\t\tvar proxyResult = results[i];\r\n\t\t\t\tif (proxyResult.nodeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.nodeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t\tif (proxyResult.treeEventCallback) {\r\n\t\t\t\t\tx = true;\r\n\t\t\t\t\tr = proxyResult.treeEventCallback.apply(proxyResult, [e, proxyResult.node]) && r;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn r;\r\n\t\t}\r\n\t},\r\n\t//method of event handler\r\n\thandler = {\r\n\t\tonSwitchNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (node.open) {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tif (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false) return true;\r\n\t\t\t\tdata.getRoot(setting).expandTriggerFlag = true;\r\n\t\t\t\tview.switchNode(setting, node);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonClickNode: function (event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tclickFlag = ( (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey)) && data.isSelectedNode(setting, node)) ? 0 : (setting.view.autoCancelSelected && (event.ctrlKey || event.metaKey) && setting.view.selectedMulti) ? 2 : 1;\r\n\t\t\tif (tools.apply(setting.callback.beforeClick, [setting.treeId, node, clickFlag], true) == false) return true;\r\n\t\t\tif (clickFlag === 0) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t} else {\r\n\t\t\t\tview.selectNode(setting, node, clickFlag === 2);\r\n\t\t\t}\r\n\t\t\tsetting.treeObj.trigger(consts.event.CLICK, [event, setting.treeId, node, clickFlag]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMousedown: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseDown, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseDown, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeMouseup: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeMouseUp, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onMouseUp, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeDblclick: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeDblClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onDblClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonZTreeContextmenu: function(event, node) {\r\n\t\t\tvar setting = data.getSetting(event.data.treeId);\r\n\t\t\tif (tools.apply(setting.callback.beforeRightClick, [setting.treeId, node], true)) {\r\n\t\t\t\ttools.apply(setting.callback.onRightClick, [event, setting.treeId, node]);\r\n\t\t\t}\r\n\t\t\treturn (typeof setting.callback.onRightClick) != \"function\";\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\ttools = {\r\n\t\tapply: function(fun, param, defaultValue) {\r\n\t\t\tif ((typeof fun) == \"function\") {\r\n\t\t\t\treturn fun.apply(zt, param?param:[]);\r\n\t\t\t}\r\n\t\t\treturn defaultValue;\r\n\t\t},\r\n\t\tcanAsync: function(setting, node) {\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\treturn (setting.async.enable && node && node.isParent && !(node.zAsync || (node[childKey] && node[childKey].length > 0)));\r\n\t\t},\r\n\t\tclone: function (obj){\r\n\t\t\tif (obj === null) return null;\r\n\t\t\tvar o = tools.isArray(obj) ? [] : {};\r\n\t\t\tfor(var i in obj){\r\n\t\t\t\to[i] = (obj[i] instanceof Date) ? new Date(obj[i].getTime()) : (typeof obj[i] === \"object\" ? arguments.callee(obj[i]) : obj[i]);\r\n\t\t\t}\r\n\t\t\treturn o;\r\n\t\t},\r\n\t\teqs: function(str1, str2) {\r\n\t\t\treturn str1.toLowerCase() === str2.toLowerCase();\r\n\t\t},\r\n\t\tisArray: function(arr) {\r\n\t\t\treturn Object.prototype.toString.apply(arr) === \"[object Array]\";\r\n\t\t},\r\n\t\t$: function(node, exp, setting) {\r\n\t\t\tif (!!exp && typeof exp != \"string\") {\r\n\t\t\t\tsetting = exp;\r\n\t\t\t\texp = \"\";\r\n\t\t\t}\r\n\t\t\tif (typeof node == \"string\") {\r\n\t\t\t\treturn $(node, setting ? setting.treeObj.get(0).ownerDocument : null);\r\n\t\t\t} else {\r\n\t\t\t\treturn $(\"#\" + node.tId + exp, setting ? setting.treeObj : null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tgetMDom: function (setting, curDom, targetExpr) {\r\n\t\t\tif (!curDom) return null;\r\n\t\t\twhile (curDom && curDom.id !== setting.treeId) {\r\n\t\t\t\tfor (var i=0, l=targetExpr.length; curDom.tagName && i<l; i++) {\r\n\t\t\t\t\tif (tools.eqs(curDom.tagName, targetExpr[i].tagName) && curDom.getAttribute(targetExpr[i].attrName) !== null) {\r\n\t\t\t\t\t\treturn curDom;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcurDom = curDom.parentNode;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t},\r\n\t\tgetNodeMainDom:function(target) {\r\n\t\t\treturn ($(target).parent(\"li\").get(0) || $(target).parentsUntil(\"li\").parent().get(0));\r\n\t\t},\r\n\t\tisChildOrSelf: function(dom, parentId) {\r\n\t\t\treturn ( $(dom).closest(\"#\" + parentId).length> 0 );\r\n\t\t},\r\n\t\tuCanDo: function(setting, e) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of operate ztree dom\r\n\tview = {\r\n\t\taddNodes: function(setting, parentNode, newNodes, isSilent) {\r\n\t\t\tif (setting.data.keep.leaf && parentNode && !parentNode.isParent) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!tools.isArray(newNodes)) {\r\n\t\t\t\tnewNodes = [newNodes];\r\n\t\t\t}\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\tnewNodes = data.transformTozTreeFormat(setting, newNodes);\r\n\t\t\t}\r\n\t\t\tif (parentNode) {\r\n\t\t\t\tvar target_switchObj = $$(parentNode, consts.id.SWITCH, setting),\r\n\t\t\t\ttarget_icoObj = $$(parentNode, consts.id.ICON, setting),\r\n\t\t\t\ttarget_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\r\n\t\t\t\tif (!parentNode.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(parentNode, target_switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(parentNode, target_icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tparentNode.open = false;\r\n\t\t\t\t\ttarget_ulObj.css({\r\n\t\t\t\t\t\t\"display\": \"none\"\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tdata.addNodesData(setting, parentNode, newNodes);\r\n\t\t\t\tview.createNodes(setting, parentNode.level + 1, newNodes, parentNode);\r\n\t\t\t\tif (!isSilent) {\r\n\t\t\t\t\tview.expandCollapseParentNode(setting, parentNode, true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdata.addNodesData(setting, data.getRoot(setting), newNodes);\r\n\t\t\t\tview.createNodes(setting, 0, newNodes, null);\r\n\t\t\t}\r\n\t\t},\r\n\t\tappendNodes: function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar html = [],\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tvar node = nodes[i];\r\n\t\t\t\tif (initFlag) {\r\n\t\t\t\t\tvar tmpPNode = (parentNode) ? parentNode: data.getRoot(setting),\r\n\t\t\t\t\ttmpPChild = tmpPNode[childKey],\r\n\t\t\t\t\tisFirstNode = ((tmpPChild.length == nodes.length) && (i == 0)),\r\n\t\t\t\t\tisLastNode = (i == (nodes.length - 1));\r\n\t\t\t\t\tdata.initNode(setting, level, node, parentNode, isFirstNode, isLastNode, openFlag);\r\n\t\t\t\t\tdata.addNodeCache(setting, node);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tvar childHtml = [];\r\n\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t//make child html first, because checkType\r\n\t\t\t\t\tchildHtml = view.appendNodes(setting, level + 1, node[childKey], node, initFlag, openFlag && node.open);\r\n\t\t\t\t}\r\n\t\t\t\tif (openFlag) {\r\n\r\n\t\t\t\t\tview.makeDOMNodeMainBefore(html, setting, node);\r\n\t\t\t\t\tview.makeDOMNodeLine(html, setting, node);\r\n\t\t\t\t\tdata.getBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameBefore(html, setting, node);\r\n\t\t\t\t\tdata.getInnerBeforeA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeIcon(html, setting, node);\r\n\t\t\t\t\tdata.getInnerAfterA(setting, node, html);\r\n\t\t\t\t\tview.makeDOMNodeNameAfter(html, setting, node);\r\n\t\t\t\t\tdata.getAfterA(setting, node, html);\r\n\t\t\t\t\tif (node.isParent && node.open) {\r\n\t\t\t\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.makeDOMNodeMainAfter(html, setting, node);\r\n\t\t\t\t\tdata.addCreatedNode(setting, node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn html;\r\n\t\t},\r\n\t\tappendParentULDom: function(setting, node) {\r\n\t\t\tvar html = [],\r\n\t\t\tnObj = $$(node, setting);\r\n\t\t\tif (!nObj.get(0) && !!node.parentTId) {\r\n\t\t\t\tview.appendParentULDom(setting, node.getParentNode());\r\n\t\t\t\tnObj = $$(node, setting);\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting);\r\n\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\tulObj.remove();\r\n\t\t\t}\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tchildHtml = view.appendNodes(setting, node.level+1, node[childKey], node, false, true);\r\n\t\t\tview.makeUlHtml(setting, node, html, childHtml.join(''));\r\n\t\t\tnObj.append(html.join(''));\r\n\t\t},\r\n\t\tasyncNode: function(setting, node, isSilent, callback) {\r\n\t\t\tvar i, l;\r\n\t\t\tif (node && !node.isParent) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (node && node.isAjaxing) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else if (tools.apply(setting.callback.beforeAsync, [setting.treeId, node], true) == false) {\r\n\t\t\t\ttools.apply(callback);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tif (node) {\r\n\t\t\t\tnode.isAjaxing = true;\r\n\t\t\t\tvar icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\ticoObj.attr({\"style\":\"\", \"class\":consts.className.BUTTON + \" \" + consts.className.ICO_LOADING});\r\n\t\t\t}\r\n\r\n\t\t\tvar tmpParam = {};\r\n\t\t\tfor (i = 0, l = setting.async.autoParam.length; node && i < l; i++) {\r\n\t\t\t\tvar pKey = setting.async.autoParam[i].split(\"=\"), spKey = pKey;\r\n\t\t\t\tif (pKey.length>1) {\r\n\t\t\t\t\tspKey = pKey[1];\r\n\t\t\t\t\tpKey = pKey[0];\r\n\t\t\t\t}\r\n\t\t\t\ttmpParam[spKey] = node[pKey];\r\n\t\t\t}\r\n\t\t\tif (tools.isArray(setting.async.otherParam)) {\r\n\t\t\t\tfor (i = 0, l = setting.async.otherParam.length; i < l; i += 2) {\r\n\t\t\t\t\ttmpParam[setting.async.otherParam[i]] = setting.async.otherParam[i + 1];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (var p in setting.async.otherParam) {\r\n\t\t\t\t\ttmpParam[p] = setting.async.otherParam[p];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tvar _tmpV = data.getRoot(setting)._ver;\r\n\t\t\t$.ajax({\r\n\t\t\t\tcontentType: setting.async.contentType,\r\n cache: false,\r\n\t\t\t\ttype: setting.async.type,\r\n\t\t\t\turl: tools.apply(setting.async.url, [setting.treeId, node], setting.async.url),\r\n\t\t\t\tdata: tmpParam,\r\n\t\t\t\tdataType: setting.async.dataType,\r\n\t\t\t\tsuccess: function(msg) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar newNodes = [];\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tif (!msg || msg.length == 0) {\r\n\t\t\t\t\t\t\tnewNodes = [];\r\n\t\t\t\t\t\t} else if (typeof msg == \"string\") {\r\n\t\t\t\t\t\t\tnewNodes = eval(\"(\" + msg + \")\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch(err) {\r\n\t\t\t\t\t\tnewNodes = msg;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tnode.isAjaxing = null;\r\n\t\t\t\t\t\tnode.zAsync = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tif (newNodes && newNodes !== \"\") {\r\n\t\t\t\t\t\tnewNodes = tools.apply(setting.async.dataFilter, [setting.treeId, node, newNodes], newNodes);\r\n\t\t\t\t\t\tview.addNodes(setting, node, !!newNodes ? tools.clone(newNodes) : [], !!isSilent);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tview.addNodes(setting, node, [], !!isSilent);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_SUCCESS, [setting.treeId, node, msg]);\r\n\t\t\t\t\ttools.apply(callback);\r\n\t\t\t\t},\r\n\t\t\t\terror: function(XMLHttpRequest, textStatus, errorThrown) {\r\n\t\t\t\t\tif (_tmpV != data.getRoot(setting)._ver) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (node) node.isAjaxing = null;\r\n\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.ASYNC_ERROR, [setting.treeId, node, XMLHttpRequest, textStatus, errorThrown]);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tcancelPreSelectedNode: function (setting, node, excludeNode) {\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti, n;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tn = list[i];\r\n\t\t\t\tif (node === n || (!node && (!excludeNode || excludeNode !== n))) {\r\n\t\t\t\t\t$$(n, consts.id.A, setting).removeClass(consts.node.CURSELECTED);\r\n\t\t\t\t\tif (node) {\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting, node);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tlist.splice(i, 1);\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.UNSELECTED, [event, setting.treeId, n]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodeCallback: function(setting) {\r\n\t\t\tif (!!setting.callback.onNodeCreated || !!setting.view.addDiyDom) {\r\n\t\t\t\tvar root = data.getRoot(setting);\r\n\t\t\t\twhile (root.createdNodes.length>0) {\r\n\t\t\t\t\tvar node = root.createdNodes.shift();\r\n\t\t\t\t\ttools.apply(setting.view.addDiyDom, [setting.treeId, node]);\r\n\t\t\t\t\tif (!!setting.callback.onNodeCreated) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.NODECREATED, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcreateNodes: function(setting, level, nodes, parentNode) {\r\n\t\t\tif (!nodes || nodes.length == 0) return;\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\topenFlag = !parentNode || parentNode.open || !!$$(parentNode[childKey][0], setting).get(0);\r\n\t\t\troot.createdNodes = [];\r\n\t\t\tvar zTreeHtml = view.appendNodes(setting, level, nodes, parentNode, true, openFlag);\r\n\t\t\tif (!parentNode) {\r\n\t\t\t\tsetting.treeObj.append(zTreeHtml.join(''));\r\n\t\t\t} else {\r\n\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\tif (ulObj.get(0)) {\r\n\t\t\t\t\tulObj.append(zTreeHtml.join(''));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.createNodeCallback(setting);\r\n\t\t},\r\n\t\tdestroy: function(setting) {\r\n\t\t\tif (!setting) return;\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tdelete settings[setting.treeId];\r\n\t\t},\r\n\t\texpandCollapseNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tif (!node) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (root.expandTriggerFlag) {\r\n\t\t\t\tvar _callback = callback;\r\n\t\t\t\tcallback = function(){\r\n\t\t\t\t\tif (_callback) _callback();\r\n\t\t\t\t\tif (node.open) {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.EXPAND, [setting.treeId, node]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetting.treeObj.trigger(consts.event.COLLAPSE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\troot.expandTriggerFlag = false;\r\n\t\t\t}\r\n\t\t\tif (!node.open && node.isParent && ((!$$(node, consts.id.UL, setting).get(0)) || (node[childKey] && node[childKey].length>0 && !$$(node[childKey][0], setting).get(0)))) {\r\n\t\t\t\tview.appendParentULDom(setting, node);\r\n\t\t\t\tview.createNodeCallback(setting);\r\n\t\t\t}\r\n\t\t\tif (node.open == expandFlag) {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvar ulObj = $$(node, consts.id.UL, setting),\r\n\t\t\tswitchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting);\r\n\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tnode.open = !node.open;\r\n\t\t\t\tif (node.iconOpen && node.iconClose) {\r\n\t\t\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (node.open) {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.OPEN);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.OPEN);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\") {\r\n\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\t\t\t\tulObj.slideDown(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tulObj.show();\r\n\t\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(node, switchObj, consts.folder.CLOSE);\r\n\t\t\t\t\tview.replaceIcoClass(node, icoObj, consts.folder.CLOSE);\r\n\t\t\t\t\tif (animateFlag == false || setting.view.expandSpeed == \"\" || !(node[childKey] && node[childKey].length > 0)) {\r\n\t\t\t\t\t\tulObj.hide();\r\n\t\t\t\t\t\ttools.apply(callback, []);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tulObj.slideUp(setting.view.expandSpeed, callback);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\ttools.apply(callback, []);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseParentNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (!node.parentTId) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback);\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag);\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, animateFlag, callback);\r\n\t\t\t}\r\n\t\t},\r\n\t\texpandCollapseSonNode: function(setting, node, expandFlag, animateFlag, callback) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\ttreeNodes = (node) ? node[childKey]: root[childKey],\r\n\t\t\tselfAnimateSign = (node) ? false : animateFlag,\r\n\t\t\texpandTriggerFlag = data.getRoot(setting).expandTriggerFlag;\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = false;\r\n\t\t\tif (treeNodes) {\r\n\t\t\t\tfor (var i = 0, l = treeNodes.length; i < l; i++) {\r\n\t\t\t\t\tif (treeNodes[i]) view.expandCollapseSonNode(setting, treeNodes[i], expandFlag, selfAnimateSign);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tdata.getRoot(setting).expandTriggerFlag = expandTriggerFlag;\r\n\t\t\tview.expandCollapseNode(setting, node, expandFlag, animateFlag, callback );\r\n\t\t},\r\n\t\tisSelectedNode: function (setting, node) {\r\n\t\t\tif (!node) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tvar list = data.getRoot(setting).curSelectedList,\r\n\t\t\t\ti;\r\n\t\t\tfor (i=list.length-1; i>=0; i--) {\r\n\t\t\t\tif (node === list[i]) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t},\r\n\t\tmakeDOMNodeIcon: function(html, setting, node) {\r\n\t\t\tvar nameStr = data.getNodeName(setting, node),\r\n\t\t\tname = setting.view.nameIsHTML ? nameStr : nameStr.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.ICON,\r\n\t\t\t\t\"' title='' treeNode\", consts.id.ICON,\" class='\", view.makeNodeIcoClass(setting, node),\r\n\t\t\t\t\"' style='\", view.makeNodeIcoStyle(setting, node), \"'></span><span id='\", node.tId, consts.id.SPAN,\r\n\t\t\t\t\"'>\",name,\"</span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeLine: function(html, setting, node) {\r\n\t\t\thtml.push(\"<span id='\", node.tId, consts.id.SWITCH,\t\"' title='' class='\", view.makeNodeLineClass(setting, node), \"' treeNode\", consts.id.SWITCH,\"></span>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</li>\");\r\n\t\t},\r\n\t\tmakeDOMNodeMainBefore: function(html, setting, node) {\r\n\t\t\thtml.push(\"<li id='\", node.tId, \"' class='\", consts.className.LEVEL, node.level,\"' tabindex='0' hidefocus='true' treenode>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameAfter: function(html, setting, node) {\r\n\t\t\thtml.push(\"</a>\");\r\n\t\t},\r\n\t\tmakeDOMNodeNameBefore: function(html, setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\turl = view.makeNodeUrl(setting, node),\r\n\t\t\tfontcss = view.makeNodeFontCss(setting, node),\r\n\t\t\tfontStyle = [];\r\n\t\t\tfor (var f in fontcss) {\r\n\t\t\t\tfontStyle.push(f, \":\", fontcss[f], \";\");\r\n\t\t\t}\r\n\t\t\thtml.push(\"<a id='\", node.tId, consts.id.A, \"' class='\", consts.className.LEVEL, node.level,\"' treeNode\", consts.id.A,\" onclick=\\\"\", (node.click || ''),\r\n\t\t\t\t\"\\\" \", ((url != null && url.length > 0) ? \"href='\" + url + \"'\" : \"\"), \" target='\",view.makeNodeTarget(node),\"' style='\", fontStyle.join(''),\r\n\t\t\t\t\"'\");\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle) && title) {html.push(\"title='\", title.replace(/'/g,\"&#39;\").replace(/</g,'&lt;').replace(/>/g,'&gt;'),\"'\");}\r\n\t\t\thtml.push(\">\");\r\n\t\t},\r\n\t\tmakeNodeFontCss: function(setting, node) {\r\n\t\t\tvar fontCss = tools.apply(setting.view.fontCss, [setting.treeId, node], setting.view.fontCss);\r\n\t\t\treturn (fontCss && ((typeof fontCss) != \"function\")) ? fontCss : {};\r\n\t\t},\r\n\t\tmakeNodeIcoClass: function(setting, node) {\r\n\t\t\tvar icoCss = [\"ico\"];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\ticoCss[0] = (node.iconSkin ? node.iconSkin + \"_\" : \"\") + icoCss[0];\r\n\t\t\t\tif (node.isParent) {\r\n\t\t\t\t\ticoCss.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ticoCss.push(consts.folder.DOCU);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn consts.className.BUTTON + \" \" + icoCss.join('_');\r\n\t\t},\r\n\t\tmakeNodeIcoStyle: function(setting, node) {\r\n\t\t\tvar icoStyle = [];\r\n\t\t\tif (!node.isAjaxing) {\r\n\t\t\t\tvar icon = (node.isParent && node.iconOpen && node.iconClose) ? (node.open ? node.iconOpen : node.iconClose) : node.icon;\r\n\t\t\t\tif (icon) icoStyle.push(\"background:url(\", icon, \") 0 0 no-repeat;\");\r\n\t\t\t\tif (setting.view.showIcon == false || !tools.apply(setting.view.showIcon, [setting.treeId, node], true)) {\r\n\t\t\t\t\ticoStyle.push(\"width:0px;height:0px;\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn icoStyle.join('');\r\n\t\t},\r\n\t\tmakeNodeLineClass: function(setting, node) {\r\n\t\t\tvar lineClass = [];\r\n\t\t\tif (setting.view.showLine) {\r\n\t\t\t\tif (node.level == 0 && node.isFirstNode && node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOT);\r\n\t\t\t\t} else if (node.level == 0 && node.isFirstNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.ROOTS);\r\n\t\t\t\t} else if (node.isLastNode) {\r\n\t\t\t\t\tlineClass.push(consts.line.BOTTOM);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tlineClass.push(consts.line.CENTER);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.line.NOLINE);\r\n\t\t\t}\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tlineClass.push(node.open ? consts.folder.OPEN : consts.folder.CLOSE);\r\n\t\t\t} else {\r\n\t\t\t\tlineClass.push(consts.folder.DOCU);\r\n\t\t\t}\r\n\t\t\treturn view.makeNodeLineClassEx(node) + lineClass.join('_');\r\n\t\t},\r\n\t\tmakeNodeLineClassEx: function(node) {\r\n\t\t\treturn consts.className.BUTTON + \" \" + consts.className.LEVEL + node.level + \" \" + consts.className.SWITCH + \" \";\r\n\t\t},\r\n\t\tmakeNodeTarget: function(node) {\r\n\t\t\treturn (node.target || \"_blank\");\r\n\t\t},\r\n\t\tmakeNodeUrl: function(setting, node) {\r\n\t\t\tvar urlKey = setting.data.key.url;\r\n\t\t\treturn node[urlKey] ? node[urlKey] : null;\r\n\t\t},\r\n\t\tmakeUlHtml: function(setting, node, html, content) {\r\n\t\t\thtml.push(\"<ul id='\", node.tId, consts.id.UL, \"' class='\", consts.className.LEVEL, node.level, \" \", view.makeUlLineClass(setting, node), \"' style='display:\", (node.open ? \"block\": \"none\"),\"'>\");\r\n\t\t\thtml.push(content);\r\n\t\t\thtml.push(\"</ul>\");\r\n\t\t},\r\n\t\tmakeUlLineClass: function(setting, node) {\r\n\t\t\treturn ((setting.view.showLine && !node.isLastNode) ? consts.line.LINE : \"\");\r\n\t\t},\r\n\t\tremoveChildNodes: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tnodes = node[childKey];\r\n\t\t\tif (!nodes) return;\r\n\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tdata.removeNodeCache(setting, nodes[i]);\r\n\t\t\t}\r\n\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\tdelete node[childKey];\r\n\r\n\t\t\tif (!setting.data.keep.parent) {\r\n\t\t\t\tnode.isParent = false;\r\n\t\t\t\tnode.open = false;\r\n\t\t\t\tvar tmp_switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\t\ttmp_icoObj = $$(node, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(node, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(node, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\t$$(node, consts.id.UL, setting).remove();\r\n\t\t\t} else {\r\n\t\t\t\t$$(node, consts.id.UL, setting).empty();\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetFirstNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][0].isFirstNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetLastNode: function(setting, parentNode) {\r\n\t\t\tvar childKey = setting.data.key.children, childLength = parentNode[childKey].length;\r\n\t\t\tif ( childLength > 0) {\r\n\t\t\t\tparentNode[childKey][childLength - 1].isLastNode = true;\r\n\t\t\t}\r\n\t\t},\r\n\t\tremoveNode: function(setting, node) {\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : root;\r\n\r\n\t\t\tnode.isFirstNode = false;\r\n\t\t\tnode.isLastNode = false;\r\n\t\t\tnode.getPreNode = function() {return null;};\r\n\t\t\tnode.getNextNode = function() {return null;};\r\n\r\n\t\t\tif (!data.getNodeCache(setting, node.tId)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$$(node, setting).remove();\r\n\t\t\tdata.removeNodeCache(setting, node);\r\n\t\t\tdata.removeSelectedNode(setting, node);\r\n\r\n\t\t\tfor (var i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\tif (parentNode[childKey][i].tId == node.tId) {\r\n\t\t\t\t\tparentNode[childKey].splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tview.setFirstNode(setting, parentNode);\r\n\t\t\tview.setLastNode(setting, parentNode);\r\n\r\n\t\t\tvar tmp_ulObj,tmp_switchObj,tmp_icoObj,\r\n\t\t\tchildLength = parentNode[childKey].length;\r\n\r\n\t\t\t//repair nodes old parent\r\n\t\t\tif (!setting.data.keep.parent && childLength == 0) {\r\n\t\t\t\t//old parentNode has no child nodes\r\n\t\t\t\tparentNode.isParent = false;\r\n\t\t\t\tparentNode.open = false;\r\n\t\t\t\ttmp_ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(parentNode, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(parentNode, consts.id.ICON, setting);\r\n\t\t\t\tview.replaceSwitchClass(parentNode, tmp_switchObj, consts.folder.DOCU);\r\n\t\t\t\tview.replaceIcoClass(parentNode, tmp_icoObj, consts.folder.DOCU);\r\n\t\t\t\ttmp_ulObj.css(\"display\", \"none\");\r\n\r\n\t\t\t} else if (setting.view.showLine && childLength > 0) {\r\n\t\t\t\t//old parentNode has child nodes\r\n\t\t\t\tvar newLast = parentNode[childKey][childLength - 1];\r\n\t\t\t\ttmp_ulObj = $$(newLast, consts.id.UL, setting);\r\n\t\t\t\ttmp_switchObj = $$(newLast, consts.id.SWITCH, setting);\r\n\t\t\t\ttmp_icoObj = $$(newLast, consts.id.ICON, setting);\r\n\t\t\t\tif (parentNode == root) {\r\n\t\t\t\t\tif (parentNode[childKey].length == 1) {\r\n\t\t\t\t\t\t//node was root, and ztree has only one root after move node\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.ROOT);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar tmp_first_switchObj = $$(parentNode[childKey][0], consts.id.SWITCH, setting);\r\n\t\t\t\t\t\tview.replaceSwitchClass(parentNode[childKey][0], tmp_first_switchObj, consts.line.ROOTS);\r\n\t\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tview.replaceSwitchClass(newLast, tmp_switchObj, consts.line.BOTTOM);\r\n\t\t\t\t}\r\n\t\t\t\ttmp_ulObj.removeClass(consts.line.LINE);\r\n\t\t\t}\r\n\t\t},\r\n\t\treplaceIcoClass: function(node, obj, newName) {\r\n\t\t\tif (!obj || node.isAjaxing) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[tmpList.length-1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t},\r\n\t\treplaceSwitchClass: function(node, obj, newName) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tvar tmpName = obj.attr(\"class\");\r\n\t\t\tif (tmpName == undefined) return;\r\n\t\t\tvar tmpList = tmpName.split(\"_\");\r\n\t\t\tswitch (newName) {\r\n\t\t\t\tcase consts.line.ROOT:\r\n\t\t\t\tcase consts.line.ROOTS:\r\n\t\t\t\tcase consts.line.CENTER:\r\n\t\t\t\tcase consts.line.BOTTOM:\r\n\t\t\t\tcase consts.line.NOLINE:\r\n\t\t\t\t\ttmpList[0] = view.makeNodeLineClassEx(node) + newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase consts.folder.OPEN:\r\n\t\t\t\tcase consts.folder.CLOSE:\r\n\t\t\t\tcase consts.folder.DOCU:\r\n\t\t\t\t\ttmpList[1] = newName;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tobj.attr(\"class\", tmpList.join(\"_\"));\r\n\t\t\tif (newName !== consts.folder.DOCU) {\r\n\t\t\t\tobj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tobj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t},\r\n\t\tselectNode: function(setting, node, addFlag) {\r\n\t\t\tif (!addFlag) {\r\n\t\t\t\tview.cancelPreSelectedNode(setting, null, node);\r\n\t\t\t}\r\n\t\t\t$$(node, consts.id.A, setting).addClass(consts.node.CURSELECTED);\r\n\t\t\tdata.addSelectedNode(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.SELECTED, [event, setting.treeId, node]);\r\n\t\t},\r\n\t\tsetNodeFontCss: function(setting, treeNode) {\r\n\t\t\tvar aObj = $$(treeNode, consts.id.A, setting),\r\n\t\t\tfontCss = view.makeNodeFontCss(setting, treeNode);\r\n\t\t\tif (fontCss) {\r\n\t\t\t\taObj.css(fontCss);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeLineIcos: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar switchObj = $$(node, consts.id.SWITCH, setting),\r\n\t\t\tulObj = $$(node, consts.id.UL, setting),\r\n\t\t\ticoObj = $$(node, consts.id.ICON, setting),\r\n\t\t\tulLine = view.makeUlLineClass(setting, node);\r\n\t\t\tif (ulLine.length==0) {\r\n\t\t\t\tulObj.removeClass(consts.line.LINE);\r\n\t\t\t} else {\r\n\t\t\t\tulObj.addClass(ulLine);\r\n\t\t\t}\r\n\t\t\tswitchObj.attr(\"class\", view.makeNodeLineClass(setting, node));\r\n\t\t\tif (node.isParent) {\r\n\t\t\t\tswitchObj.removeAttr(\"disabled\");\r\n\t\t\t} else {\r\n\t\t\t\tswitchObj.attr(\"disabled\", \"disabled\");\r\n\t\t\t}\r\n\t\t\ticoObj.removeAttr(\"style\");\r\n\t\t\ticoObj.attr(\"style\", view.makeNodeIcoStyle(setting, node));\r\n\t\t\ticoObj.attr(\"class\", view.makeNodeIcoClass(setting, node));\r\n\t\t},\r\n\t\tsetNodeName: function(setting, node) {\r\n\t\t\tvar title = data.getNodeTitle(setting, node),\r\n\t\t\tnObj = $$(node, consts.id.SPAN, setting);\r\n\t\t\tnObj.empty();\r\n\t\t\tif (setting.view.nameIsHTML) {\r\n\t\t\t\tnObj.html(data.getNodeName(setting, node));\r\n\t\t\t} else {\r\n\t\t\t\tnObj.text(data.getNodeName(setting, node));\r\n\t\t\t}\r\n\t\t\tif (tools.apply(setting.view.showTitle, [setting.treeId, node], setting.view.showTitle)) {\r\n\t\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\t\taObj.attr(\"title\", !title ? \"\" : title);\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetNodeTarget: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting);\r\n\t\t\taObj.attr(\"target\", view.makeNodeTarget(node));\r\n\t\t},\r\n\t\tsetNodeUrl: function(setting, node) {\r\n\t\t\tvar aObj = $$(node, consts.id.A, setting),\r\n\t\t\turl = view.makeNodeUrl(setting, node);\r\n\t\t\tif (url == null || url.length == 0) {\r\n\t\t\t\taObj.removeAttr(\"href\");\r\n\t\t\t} else {\r\n\t\t\t\taObj.attr(\"href\", url);\r\n\t\t\t}\r\n\t\t},\r\n\t\tswitchNode: function(setting, node) {\r\n\t\t\tif (node.open || !tools.canAsync(setting, node)) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t} else if (setting.async.enable) {\r\n\t\t\t\tif (!view.asyncNode(setting, node)) {\r\n\t\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} else if (node) {\r\n\t\t\t\tview.expandCollapseNode(setting, node, !node.open);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\t// zTree defind\r\n\t$.fn.zTree = {\r\n\t\tconsts : _consts,\r\n\t\t_z : {\r\n\t\t\ttools: tools,\r\n\t\t\tview: view,\r\n\t\t\tevent: event,\r\n\t\t\tdata: data\r\n\t\t},\r\n\t\tgetZTreeObj: function(treeId) {\r\n\t\t\tvar o = data.getZTreeTools(treeId);\r\n\t\t\treturn o ? o : null;\r\n\t\t},\r\n\t\tdestroy: function(treeId) {\r\n\t\t\tif (!!treeId && treeId.length > 0) {\r\n\t\t\t\tview.destroy(data.getSetting(treeId));\r\n\t\t\t} else {\r\n\t\t\t\tfor(var s in settings) {\r\n\t\t\t\t\tview.destroy(settings[s]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tinit: function(obj, zSetting, zNodes) {\r\n\t\t\tvar setting = tools.clone(_setting);\r\n\t\t\t$.extend(true, setting, zSetting);\r\n\t\t\tsetting.treeId = obj.attr(\"id\");\r\n\t\t\tsetting.treeObj = obj;\r\n\t\t\tsetting.treeObj.empty();\r\n\t\t\tsettings[setting.treeId] = setting;\r\n\t\t\t//For some older browser,(e.g., ie6)\r\n\t\t\tif(typeof document.body.style.maxHeight === \"undefined\") {\r\n\t\t\t\tsetting.view.expandSpeed = \"\";\r\n\t\t\t}\r\n\t\t\tdata.initRoot(setting);\r\n\t\t\tvar root = data.getRoot(setting),\r\n\t\t\tchildKey = setting.data.key.children;\r\n\t\t\tzNodes = zNodes ? tools.clone(tools.isArray(zNodes)? zNodes : [zNodes]) : [];\r\n\t\t\tif (setting.data.simpleData.enable) {\r\n\t\t\t\troot[childKey] = data.transformTozTreeFormat(setting, zNodes);\r\n\t\t\t} else {\r\n\t\t\t\troot[childKey] = zNodes;\r\n\t\t\t}\r\n\r\n\t\t\tdata.initCache(setting);\r\n\t\t\tevent.unbindTree(setting);\r\n\t\t\tevent.bindTree(setting);\r\n\t\t\tevent.unbindEvent(setting);\r\n\t\t\tevent.bindEvent(setting);\r\n\r\n\t\t\tvar zTreeTools = {\r\n\t\t\t\tsetting : setting,\r\n\t\t\t\taddNodes : function(parentNode, newNodes, isSilent) {\r\n\t\t\t\t\tif (!newNodes) return null;\r\n\t\t\t\t\tif (!parentNode) parentNode = null;\r\n\t\t\t\t\tif (parentNode && !parentNode.isParent && setting.data.keep.leaf) return null;\r\n\t\t\t\t\tvar xNewNodes = tools.clone(tools.isArray(newNodes)? newNodes: [newNodes]);\r\n\t\t\t\t\tfunction addCallback() {\r\n\t\t\t\t\t\tview.addNodes(setting, parentNode, xNewNodes, (isSilent==true));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (tools.canAsync(setting, parentNode)) {\r\n\t\t\t\t\t\tview.asyncNode(setting, parentNode, isSilent, addCallback);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\taddCallback();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn xNewNodes;\r\n\t\t\t\t},\r\n\t\t\t\tcancelSelectedNode : function(node) {\r\n\t\t\t\t\tview.cancelPreSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\tdestroy : function() {\r\n\t\t\t\t\tview.destroy(setting);\r\n\t\t\t\t},\r\n\t\t\t\texpandAll : function(expandFlag) {\r\n\t\t\t\t\texpandFlag = !!expandFlag;\r\n\t\t\t\t\tview.expandCollapseSonNode(setting, null, expandFlag, true);\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\texpandNode : function(node, expandFlag, sonSign, focus, callbackFlag) {\r\n\t\t\t\t\tif (!node || !node.isParent) return null;\r\n\t\t\t\t\tif (expandFlag !== true && expandFlag !== false) {\r\n\t\t\t\t\t\texpandFlag = !node.open;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\t\t\tif (callbackFlag && expandFlag && (tools.apply(setting.callback.beforeExpand, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t} else if (callbackFlag && !expandFlag && (tools.apply(setting.callback.beforeCollapse, [setting.treeId, node], true) == false)) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag && node.parentTId) {\r\n\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), expandFlag, false);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (expandFlag === node.open && !sonSign) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdata.getRoot(setting).expandTriggerFlag = callbackFlag;\r\n\t\t\t\t\tif (!tools.canAsync(setting, node) && sonSign) {\r\n\t\t\t\t\t\tview.expandCollapseSonNode(setting, node, expandFlag, true, function() {\r\n\t\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnode.open = !expandFlag;\r\n\t\t\t\t\t\tview.switchNode(this.setting, node);\r\n\t\t\t\t\t\tif (focus !== false) {try{$$(node, setting).focus().blur();}catch(e){}}\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn expandFlag;\r\n\t\t\t\t},\r\n\t\t\t\tgetNodes : function() {\r\n\t\t\t\t\treturn data.getNodes(setting);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodeByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeByTId : function(tId) {\r\n\t\t\t\t\treturn data.getNodeCache(setting, tId);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParam : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParam(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByParamFuzzy : function(key, value, parentNode) {\r\n\t\t\t\t\tif (!key) return null;\r\n\t\t\t\t\treturn data.getNodesByParamFuzzy(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), key, value);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodesByFilter: function(filter, isSingle, parentNode, invokeParam) {\r\n\t\t\t\t\tisSingle = !!isSingle;\r\n\t\t\t\t\tif (!filter || (typeof filter != \"function\")) return (isSingle ? null : []);\r\n\t\t\t\t\treturn data.getNodesByFilter(setting, parentNode?parentNode[setting.data.key.children]:data.getNodes(setting), filter, isSingle, invokeParam);\r\n\t\t\t\t},\r\n\t\t\t\tgetNodeIndex : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tparentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\tfor (var i=0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\tif (parentNode[childKey][i] == node) return i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t},\r\n\t\t\t\tgetSelectedNodes : function() {\r\n\t\t\t\t\tvar r = [], list = data.getRoot(setting).curSelectedList;\r\n\t\t\t\t\tfor (var i=0, l=list.length; i<l; i++) {\r\n\t\t\t\t\t\tr.push(list[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn r;\r\n\t\t\t\t},\r\n\t\t\t\tisSelectedNode : function(node) {\r\n\t\t\t\t\treturn data.isSelectedNode(setting, node);\r\n\t\t\t\t},\r\n\t\t\t\treAsyncChildNodes : function(parentNode, reloadType, isSilent) {\r\n\t\t\t\t\tif (!this.setting.async.enable) return;\r\n\t\t\t\t\tvar isRoot = !parentNode;\r\n\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\tparentNode = data.getRoot(setting);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (reloadType==\"refresh\") {\r\n\t\t\t\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\t\t\t\tfor (var i = 0, l = parentNode[childKey] ? parentNode[childKey].length : 0; i < l; i++) {\r\n\t\t\t\t\t\t\tdata.removeNodeCache(setting, parentNode[childKey][i]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.removeSelectedNode(setting);\r\n\t\t\t\t\t\tparentNode[childKey] = [];\r\n\t\t\t\t\t\tif (isRoot) {\r\n\t\t\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvar ulObj = $$(parentNode, consts.id.UL, setting);\r\n\t\t\t\t\t\t\tulObj.empty();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.asyncNode(this.setting, isRoot? null:parentNode, !!isSilent);\r\n\t\t\t\t},\r\n\t\t\t\trefresh : function() {\r\n\t\t\t\t\tthis.setting.treeObj.empty();\r\n\t\t\t\t\tvar root = data.getRoot(setting),\r\n\t\t\t\t\tnodes = root[setting.data.key.children]\r\n\t\t\t\t\tdata.initRoot(setting);\r\n\t\t\t\t\troot[setting.data.key.children] = nodes\r\n\t\t\t\t\tdata.initCache(setting);\r\n\t\t\t\t\tview.createNodes(setting, 0, root[setting.data.key.children]);\r\n\t\t\t\t},\r\n\t\t\t\tremoveChildNodes : function(node) {\r\n\t\t\t\t\tif (!node) return null;\r\n\t\t\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\t\t\tnodes = node[childKey];\r\n\t\t\t\t\tview.removeChildNodes(setting, node);\r\n\t\t\t\t\treturn nodes ? nodes : null;\r\n\t\t\t\t},\r\n\t\t\t\tremoveNode : function(node, callbackFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tcallbackFlag = !!callbackFlag;\r\n\t\t\t\t\tif (callbackFlag && tools.apply(setting.callback.beforeRemove, [setting.treeId, node], true) == false) return;\r\n\t\t\t\t\tview.removeNode(setting, node);\r\n\t\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.REMOVE, [setting.treeId, node]);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tselectNode : function(node, addFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tif (tools.uCanDo(setting)) {\r\n\t\t\t\t\t\taddFlag = setting.view.selectedMulti && addFlag;\r\n\t\t\t\t\t\tif (node.parentTId) {\r\n\t\t\t\t\t\t\tview.expandCollapseParentNode(setting, node.getParentNode(), true, false, function() {\r\n\t\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttry{$$(node, setting).focus().blur();}catch(e){}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tview.selectNode(setting, node, addFlag);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\ttransformTozTreeNodes : function(simpleNodes) {\r\n\t\t\t\t\treturn data.transformTozTreeFormat(setting, simpleNodes);\r\n\t\t\t\t},\r\n\t\t\t\ttransformToArray : function(nodes) {\r\n\t\t\t\t\treturn data.transformToArrayFormat(setting, nodes);\r\n\t\t\t\t},\r\n\t\t\t\tupdateNode : function(node, checkTypeFlag) {\r\n\t\t\t\t\tif (!node) return;\r\n\t\t\t\t\tvar nObj = $$(node, setting);\r\n\t\t\t\t\tif (nObj.get(0) && tools.uCanDo(setting)) {\r\n\t\t\t\t\t\tview.setNodeName(setting, node);\r\n\t\t\t\t\t\tview.setNodeTarget(setting, node);\r\n\t\t\t\t\t\tview.setNodeUrl(setting, node);\r\n\t\t\t\t\t\tview.setNodeLineIcos(setting, node);\r\n\t\t\t\t\t\tview.setNodeFontCss(setting, node);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\troot.treeTools = zTreeTools;\r\n\t\t\tdata.setZTreeTools(setting, zTreeTools);\r\n\r\n\t\t\tif (root[childKey] && root[childKey].length > 0) {\r\n\t\t\t\tview.createNodes(setting, 0, root[childKey]);\r\n\t\t\t} else if (setting.async.enable && setting.async.url && setting.async.url !== '') {\r\n\t\t\t\tview.asyncNode(setting);\r\n\t\t\t}\r\n\t\t\treturn zTreeTools;\r\n\t\t}\r\n\t};\r\n\r\n\tvar zt = $.fn.zTree,\r\n\t$$ = tools.$,\r\n\tconsts = zt.consts;\r\n})(BI.jQuery);/*\r\n * JQuery zTree excheck v3.5.18\r\n * http://zTree.me/\r\n *\r\n * Copyright (c) 2010 Hunter.z\r\n *\r\n * Licensed same as jquery - MIT License\r\n * http://www.opensource.org/licenses/mit-license.php\r\n *\r\n * email: hunter.z@263.net\r\n * Date: 2015-06-18\r\n */\r\n(function($){\r\n\t//default consts of excheck\r\n\tvar _consts = {\r\n\t\tevent: {\r\n\t\t\tCHECK: \"ztree_check\"\r\n\t\t},\r\n\t\tid: {\r\n\t\t\tCHECK: \"_check\"\r\n\t\t},\r\n\t\tcheckbox: {\r\n\t\t\tSTYLE: \"checkbox\",\r\n\t\t\tDEFAULT: \"chk\",\r\n\t\t\tDISABLED: \"disable\",\r\n\t\t\tFALSE: \"false\",\r\n\t\t\tTRUE: \"true\",\r\n\t\t\tFULL: \"full\",\r\n\t\t\tPART: \"part\",\r\n\t\t\tFOCUS: \"focus\"\r\n\t\t},\r\n\t\tradio: {\r\n\t\t\tSTYLE: \"radio\",\r\n\t\t\tTYPE_ALL: \"all\",\r\n\t\t\tTYPE_LEVEL: \"level\"\r\n\t\t}\r\n\t},\r\n\t//default setting of excheck\r\n\t_setting = {\r\n\t\tcheck: {\r\n\t\t\tenable: false,\r\n\t\t\tautoCheckTrigger: false,\r\n\t\t\tchkStyle: _consts.checkbox.STYLE,\r\n\t\t\tnocheckInherit: false,\r\n\t\t\tchkDisabledInherit: false,\r\n\t\t\tradioType: _consts.radio.TYPE_LEVEL,\r\n\t\t\tchkboxType: {\r\n\t\t\t\t\"Y\": \"ps\",\r\n\t\t\t\t\"N\": \"ps\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tkey: {\r\n\t\t\t\tchecked: \"checked\"\r\n\t\t\t}\r\n\t\t},\r\n\t\tcallback: {\r\n\t\t\tbeforeCheck:null,\r\n\t\t\tonCheck:null\r\n\t\t}\r\n\t},\r\n\t//default root of excheck\r\n\t_initRoot = function (setting) {\r\n\t\tvar r = data.getRoot(setting);\r\n\t\tr.radioCheckedList = [];\r\n\t},\r\n\t//default cache of excheck\r\n\t_initCache = function(treeId) {},\r\n\t//default bind event of excheck\r\n\t_bindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.bind(c.CHECK, function (event, srcEvent, treeId, node) {\r\n\t\t\tevent.srcEvent = srcEvent;\r\n\t\t\ttools.apply(setting.callback.onCheck, [event, treeId, node]);\r\n\t\t});\r\n\t},\r\n\t_unbindEvent = function(setting) {\r\n\t\tvar o = setting.treeObj,\r\n\t\tc = consts.event;\r\n\t\to.unbind(c.CHECK);\r\n\t},\r\n\t//default event proxy of excheck\r\n\t_eventProxy = function(e) {\r\n\t\tvar target = e.target,\r\n\t\tsetting = data.getSetting(e.data.treeId),\r\n\t\ttId = \"\", node = null,\r\n\t\tnodeEventType = \"\", treeEventType = \"\",\r\n\t\tnodeEventCallback = null, treeEventCallback = null;\r\n\r\n\t\tif (tools.eqs(e.type, \"mouseover\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoverCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"mouseout\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"mouseoutCheck\";\r\n\t\t\t}\r\n\t\t} else if (tools.eqs(e.type, \"click\")) {\r\n\t\t\tif (setting.check.enable && tools.eqs(target.tagName, \"span\") && target.getAttribute(\"treeNode\"+ consts.id.CHECK) !== null) {\r\n\t\t\t\ttId = tools.getNodeMainDom(target).id;\r\n\t\t\t\tnodeEventType = \"checkNode\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (tId.length>0) {\r\n\t\t\tnode = data.getNodeCache(setting, tId);\r\n\t\t\tswitch (nodeEventType) {\r\n\t\t\t\tcase \"checkNode\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onCheckNode;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoverCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoverCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"mouseoutCheck\" :\r\n\t\t\t\t\tnodeEventCallback = _handler.onMouseoutCheck;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tvar proxyResult = {\r\n\t\t\tstop: nodeEventType === \"checkNode\",\r\n\t\t\tnode: node,\r\n\t\t\tnodeEventType: nodeEventType,\r\n\t\t\tnodeEventCallback: nodeEventCallback,\r\n\t\t\ttreeEventType: treeEventType,\r\n\t\t\ttreeEventCallback: treeEventCallback\r\n\t\t};\r\n\t\treturn proxyResult\r\n\t},\r\n\t//default init node of excheck\r\n\t_initNode = function(setting, level, n, parentNode, isFirstNode, isLastNode, openFlag) {\r\n\t\tif (!n) return;\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (typeof n[checkedKey] == \"string\") n[checkedKey] = tools.eqs(n[checkedKey], \"true\");\r\n\t\tn[checkedKey] = !!n[checkedKey];\r\n\t\tn.checkedOld = n[checkedKey];\r\n\t\tif (typeof n.nocheck == \"string\") n.nocheck = tools.eqs(n.nocheck, \"true\");\r\n\t\tn.nocheck = !!n.nocheck || (setting.check.nocheckInherit && parentNode && !!parentNode.nocheck);\r\n\t\tif (typeof n.chkDisabled == \"string\") n.chkDisabled = tools.eqs(n.chkDisabled, \"true\");\r\n\t\tn.chkDisabled = !!n.chkDisabled || (setting.check.chkDisabledInherit && parentNode && !!parentNode.chkDisabled);\r\n\t\tif (typeof n.halfCheck == \"string\") n.halfCheck = tools.eqs(n.halfCheck, \"true\");\r\n\t\tn.halfCheck = !!n.halfCheck;\r\n\t\tn.check_Child_State = -1;\r\n\t\tn.check_Focus = false;\r\n\t\tn.getCheckStatus = function() {return data.getCheckStatus(setting, n);};\r\n\r\n\t\tif (setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL && n[checkedKey] ) {\r\n\t\t\tvar r = data.getRoot(setting);\r\n\t\t\tr.radioCheckedList.push(n);\r\n\t\t}\r\n\t},\r\n\t//add dom for check\r\n\t_beforeA = function(setting, node, html) {\r\n\t\tvar checkedKey = setting.data.key.checked;\r\n\t\tif (setting.check.enable) {\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\thtml.push(\"<span ID='\", node.tId, consts.id.CHECK, \"' class='\", view.makeChkClass(setting, node), \"' treeNode\", consts.id.CHECK, (node.nocheck === true?\" style='display:none;'\":\"\"),\"></span>\");\r\n\t\t}\r\n\t},\r\n\t//update zTreeObj, add method of check\r\n\t_zTreeTools = function(setting, zTreeTools) {\r\n\t\tzTreeTools.checkNode = function(node, checked, checkTypeFlag, callbackFlag) {\r\n\t\t\tvar checkedKey = this.setting.data.key.checked;\r\n\t\t\tif (node.chkDisabled === true) return;\r\n\t\t\tif (checked !== true && checked !== false) {\r\n\t\t\t\tchecked = !node[checkedKey];\r\n\t\t\t}\r\n\t\t\tcallbackFlag = !!callbackFlag;\r\n\r\n\t\t\tif (node[checkedKey] === checked && !checkTypeFlag) {\r\n\t\t\t\treturn;\r\n\t\t\t} else if (callbackFlag && tools.apply(this.setting.callback.beforeCheck, [this.setting.treeId, node], true) == false) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (tools.uCanDo(this.setting) && this.setting.check.enable && node.nocheck !== true) {\r\n\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t\tif (callbackFlag) {\r\n\t\t\t\t\tthis.setting.treeObj.trigger(consts.event.CHECK, [null, this.setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tzTreeTools.checkAllNodes = function(checked) {\r\n\t\t\tview.repairAllChk(this.setting, !!checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getCheckedNodes = function(checked) {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\tchecked = (checked !== false);\r\n\t\t\treturn data.getTreeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey], checked);\r\n\t\t}\r\n\r\n\t\tzTreeTools.getChangeCheckedNodes = function() {\r\n\t\t\tvar childKey = this.setting.data.key.children;\r\n\t\t\treturn data.getTreeChangeCheckedNodes(this.setting, data.getRoot(this.setting)[childKey]);\r\n\t\t}\r\n\r\n\t\tzTreeTools.setChkDisabled = function(node, disabled, inheritParent, inheritChildren) {\r\n\t\t\tdisabled = !!disabled;\r\n\t\t\tinheritParent = !!inheritParent;\r\n\t\t\tinheritChildren = !!inheritChildren;\r\n\t\t\tview.repairSonChkDisabled(this.setting, node, disabled, inheritChildren);\r\n\t\t\tview.repairParentChkDisabled(this.setting, node.getParentNode(), disabled, inheritParent);\r\n\t\t}\r\n\r\n\t\tvar _updateNode = zTreeTools.updateNode;\r\n\t\tzTreeTools.updateNode = function(node, checkTypeFlag) {\r\n\t\t\tif (_updateNode) _updateNode.apply(zTreeTools, arguments);\r\n\t\t\tif (!node || !this.setting.check.enable) return;\r\n\t\t\tvar nObj = $$(node, this.setting);\r\n\t\t\tif (nObj.get(0) && tools.uCanDo(this.setting)) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, this.setting);\r\n\t\t\t\tif (checkTypeFlag == true || this.setting.check.chkStyle === consts.radio.STYLE) view.checkNodeRelation(this.setting, node);\r\n\t\t\t\tview.setChkClass(this.setting, checkObj, node);\r\n\t\t\t\tview.repairParentChkClassWithSelf(this.setting, node);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t//method of operate data\r\n\t_data = {\r\n\t\tgetRadioCheckedList: function(setting) {\r\n\t\t\tvar checkedList = data.getRoot(setting).radioCheckedList;\r\n\t\t\tfor (var i=0, j=checkedList.length; i<j; i++) {\r\n\t\t\t\tif(!data.getNodeCache(setting, checkedList[i].tId)) {\r\n\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\ti--; j--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn checkedList;\r\n\t\t},\r\n\t\tgetCheckStatus: function(setting, node) {\r\n\t\t\tif (!setting.check.enable || node.nocheck || node.chkDisabled) return null;\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tr = {\r\n\t\t\t\tchecked: node[checkedKey],\r\n\t\t\t\thalf: node.halfCheck ? node.halfCheck : (setting.check.chkStyle == consts.radio.STYLE ? (node.check_Child_State === 2) : (node[checkedKey] ? (node.check_Child_State > -1 && node.check_Child_State < 2) : (node.check_Child_State > 0)))\r\n\t\t\t};\r\n\t\t\treturn r;\r\n\t\t},\r\n\t\tgetTreeCheckedNodes: function(setting, nodes, checked, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tonlyOne = (checked && setting.check.chkStyle == consts.radio.STYLE && setting.check.radioType == consts.radio.TYPE_ALL);\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] == checked) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t\tif(onlyOne) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeCheckedNodes(setting, nodes[i][childKey], checked, results);\r\n\t\t\t\tif(onlyOne && results.length > 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tgetTreeChangeCheckedNodes: function(setting, nodes, results) {\r\n\t\t\tif (!nodes) return [];\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tresults = !results ? [] : results;\r\n\t\t\tfor (var i = 0, l = nodes.length; i < l; i++) {\r\n\t\t\t\tif (nodes[i].nocheck !== true && nodes[i].chkDisabled !== true && nodes[i][checkedKey] != nodes[i].checkedOld) {\r\n\t\t\t\t\tresults.push(nodes[i]);\r\n\t\t\t\t}\r\n\t\t\t\tdata.getTreeChangeCheckedNodes(setting, nodes[i][childKey], results);\r\n\t\t\t}\r\n\t\t\treturn results;\r\n\t\t},\r\n\t\tmakeChkFlag: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tchkFlag = -1;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar cNode = node[childKey][i];\r\n\t\t\t\t\tvar tmp = -1;\r\n\t\t\t\t\tif (setting.check.chkStyle == consts.radio.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey]) {\r\n\t\t\t\t\t\t\ttmp = 2;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State > 0 ? 2:0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp == 2) {\r\n\t\t\t\t\t\t\tchkFlag = 2; break;\r\n\t\t\t\t\t\t} else if (tmp == 0){\r\n\t\t\t\t\t\t\tchkFlag = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (setting.check.chkStyle == consts.checkbox.STYLE) {\r\n\t\t\t\t\t\tif (cNode.nocheck === true || cNode.chkDisabled === true) {\r\n\t\t\t\t\t\t\ttmp = cNode.check_Child_State;\r\n\t\t\t\t\t\t} else if (cNode.halfCheck === true) {\r\n\t\t\t\t\t\t\ttmp = 1;\r\n\t\t\t\t\t\t} else if (cNode[checkedKey] ) {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State === -1 || cNode.check_Child_State === 2) ? 2 : 1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\ttmp = (cNode.check_Child_State > 0) ? 1 : 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (tmp === 1) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp === 2 && chkFlag > -1 && i > 0 && tmp !== chkFlag) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (chkFlag === 2 && tmp > -1 && tmp < 2) {\r\n\t\t\t\t\t\t\tchkFlag = 1; break;\r\n\t\t\t\t\t\t} else if (tmp > -1) {\r\n\t\t\t\t\t\t\tchkFlag = tmp;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tnode.check_Child_State = chkFlag;\r\n\t\t}\r\n\t},\r\n\t//method of event proxy\r\n\t_event = {\r\n\r\n\t},\r\n\t//method of event handler\r\n\t_handler = {\r\n\t\tonCheckNode: function (event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckedKey = setting.data.key.checked;\r\n\t\t\tif (tools.apply(setting.callback.beforeCheck, [setting.treeId, node], true) == false) return true;\r\n\t\t\tnode[checkedKey] = !node[checkedKey];\r\n\t\t\tview.checkNodeRelation(setting, node);\r\n\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\tview.repairParentChkClassWithSelf(setting, node);\r\n\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [event, setting.treeId, node]);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoverCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = true;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t},\r\n\t\tonMouseoutCheck: function(event, node) {\r\n\t\t\tif (node.chkDisabled === true) return false;\r\n\t\t\tvar setting = data.getSetting(event.data.treeId),\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tnode.check_Focus = false;\r\n\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t},\r\n\t//method of tools for zTree\r\n\t_tools = {\r\n\r\n\t},\r\n\t//method of operate ztree dom\r\n\t_view = {\r\n\t\tcheckNodeRelation: function(setting, node) {\r\n\t\t\tvar pNode, i, l,\r\n\t\t\tchildKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tr = consts.radio;\r\n\t\t\tif (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tvar checkedList = data.getRadioCheckedList(setting);\r\n\t\t\t\tif (node[checkedKey]) {\r\n\t\t\t\t\tif (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\t\tfor (i = checkedList.length-1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tpNode = checkedList[i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t\tif (pNode.parentTId != node.parentTId) {\r\n\t\t\t\t\t\t\t\t\tview.repairParentChkClassWithSelf(setting, pNode);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcheckedList.push(node);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tvar parentNode = (node.parentTId) ? node.getParentNode() : data.getRoot(setting);\r\n\t\t\t\t\t\tfor (i = 0, l = parentNode[childKey].length; i < l; i++) {\r\n\t\t\t\t\t\t\tpNode = parentNode[childKey][i];\r\n\t\t\t\t\t\t\tif (pNode[checkedKey] && pNode != node) {\r\n\t\t\t\t\t\t\t\tpNode[checkedKey] = false;\r\n\t\t\t\t\t\t\t\tview.setChkClass(setting, $$(pNode, consts.id.CHECK, setting), pNode);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (setting.check.radioType == r.TYPE_ALL) {\r\n\t\t\t\t\tfor (i = 0, l = checkedList.length; i < l; i++) {\r\n\t\t\t\t\t\tif (node == checkedList[i]) {\r\n\t\t\t\t\t\t\tcheckedList.splice(i, 1);\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.Y.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && (!node[childKey] || node[childKey].length==0 || setting.check.chkboxType.N.indexOf(\"s\") > -1)) {\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t\tif (node[checkedKey] && setting.check.chkboxType.Y.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, true);\r\n\t\t\t\t}\r\n\t\t\t\tif (!node[checkedKey] && setting.check.chkboxType.N.indexOf(\"p\") > -1) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node, false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tmakeChkClass: function(setting, node) {\r\n\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\tc = consts.checkbox, r = consts.radio,\r\n\t\t\tcheckboxType = setting.check.chkboxType;\r\n\t\t\tvar notEffectByOtherNode = (checkboxType.Y === \"\" && checkboxType.N === \"\");\r\n\t\t\tfullStyle = \"\";\r\n\t\t\tif (node.chkDisabled === true) {\r\n\t\t\t\tfullStyle = c.DISABLED;\r\n\t\t\t} else if (node.halfCheck) {\r\n\t\t\t\tfullStyle = c.PART;\r\n\t\t\t} else if (setting.check.chkStyle == r.STYLE) {\r\n\t\t\t\tfullStyle = (node.check_Child_State < 1)? c.FULL:c.PART;\r\n\t\t\t} else {\r\n\t\t\t\tfullStyle = node[checkedKey] ? ((node.check_Child_State === 2 || node.check_Child_State === -1) || notEffectByOtherNode ? c.FULL:c.PART) : ((node.check_Child_State < 1 || notEffectByOtherNode)? c.FULL:c.PART);\r\n\t\t\t}\r\n\t\t\tvar chkName = setting.check.chkStyle + \"_\" + (node[checkedKey] ? c.TRUE : c.FALSE) + \"_\" + fullStyle;\r\n\t\t\tchkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + \"_\" + c.FOCUS : chkName;\r\n\t\t\treturn consts.className.BUTTON + \" \" + c.DEFAULT + \" \" + chkName;\r\n\t\t},\r\n\t\trepairAllChk: function(setting, checked) {\r\n\t\t\tif (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) {\r\n\t\t\t\tvar checkedKey = setting.data.key.checked,\r\n\t\t\t\tchildKey = setting.data.key.children,\r\n\t\t\t\troot = data.getRoot(setting);\r\n\t\t\t\tfor (var i = 0, l = root[childKey].length; i<l ; i++) {\r\n\t\t\t\t\tvar node = root[childKey][i];\r\n\t\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\t\tnode[checkedKey] = checked;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, node, checked);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairChkClass: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true) {\r\n\t\t\t\tvar checkObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkClass: function(setting, node) {\r\n\t\t\tif (!node || !node.parentTId) return;\r\n\t\t\tvar pNode = node.getParentNode();\r\n\t\t\tview.repairChkClass(setting, pNode);\r\n\t\t\tview.repairParentChkClass(setting, pNode);\r\n\t\t},\r\n\t\trepairParentChkClassWithSelf: function(setting, node) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node[childKey] && node[childKey].length > 0) {\r\n\t\t\t\tview.repairParentChkClass(setting, node[childKey][0]);\r\n\t\t\t} else {\r\n\t\t\t\tview.repairParentChkClass(setting, node);\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairSonChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children;\r\n\t\t\tif (node.chkDisabled != chkDisabled) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tif (node[childKey] && inherit) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.repairSonChkDisabled(setting, sNode, chkDisabled, inherit);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepairParentChkDisabled: function(setting, node, chkDisabled, inherit) {\r\n\t\t\tif (!node) return;\r\n\t\t\tif (node.chkDisabled != chkDisabled && inherit) {\r\n\t\t\t\tnode.chkDisabled = chkDisabled;\r\n\t\t\t}\r\n\t\t\tview.repairChkClass(setting, node);\r\n\t\t\tview.repairParentChkDisabled(setting, node.getParentNode(), chkDisabled, inherit);\r\n\t\t},\r\n\t\tsetChkClass: function(setting, obj, node) {\r\n\t\t\tif (!obj) return;\r\n\t\t\tif (node.nocheck === true) {\r\n\t\t\t\tobj.hide();\r\n\t\t\t} else {\r\n\t\t\t\tobj.show();\r\n\t\t\t}\r\n obj.attr('class', view.makeChkClass(setting, node));\r\n\t\t},\r\n\t\tsetParentNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (node.parentTId) {\r\n\t\t\t\tvar pSign = true;\r\n\t\t\t\tif (!value) {\r\n\t\t\t\t\tvar pNodes = node.getParentNode()[childKey];\r\n\t\t\t\t\tfor (var i = 0, l = pNodes.length; i < l; i++) {\r\n\t\t\t\t\t\tif ((pNodes[i].nocheck !== true && pNodes[i].chkDisabled !== true && pNodes[i][checkedKey])\r\n\t\t\t\t\t\t|| ((pNodes[i].nocheck === true || pNodes[i].chkDisabled === true) && pNodes[i].check_Child_State > 0)) {\r\n\t\t\t\t\t\t\tpSign = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (pSign) {\r\n\t\t\t\t\tview.setParentNodeCheckBox(setting, node.getParentNode(), value, srcNode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsetSonNodeCheckBox: function(setting, node, value, srcNode) {\r\n\t\t\tif (!node) return;\r\n\t\t\tvar childKey = setting.data.key.children,\r\n\t\t\tcheckedKey = setting.data.key.checked,\r\n\t\t\tcheckObj = $$(node, consts.id.CHECK, setting);\r\n\t\t\tif (!srcNode) srcNode = node;\r\n\r\n\t\t\tvar hasDisable = false;\r\n\t\t\tif (node[childKey]) {\r\n\t\t\t\tfor (var i = 0, l = node[childKey].length; i < l && node.chkDisabled !== true; i++) {\r\n\t\t\t\t\tvar sNode = node[childKey][i];\r\n\t\t\t\t\tview.setSonNodeCheckBox(setting, sNode, value, srcNode);\r\n\t\t\t\t\tif (sNode.chkDisabled === true) hasDisable = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (node != data.getRoot(setting) && node.chkDisabled !== true) {\r\n\t\t\t\tif (hasDisable && node.nocheck !== true) {\r\n\t\t\t\t\tdata.makeChkFlag(setting, node);\r\n\t\t\t\t}\r\n\t\t\t\tif (node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tnode[checkedKey] = value;\r\n\t\t\t\t\tif (!hasDisable) node.check_Child_State = (node[childKey] && node[childKey].length > 0) ? (value ? 2 : 0) : -1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnode.check_Child_State = -1;\r\n\t\t\t\t}\r\n\t\t\t\tview.setChkClass(setting, checkObj, node);\r\n\t\t\t\tif (setting.check.autoCheckTrigger && node != srcNode && node.nocheck !== true && node.chkDisabled !== true) {\r\n\t\t\t\t\tsetting.treeObj.trigger(consts.event.CHECK, [null, setting.treeId, node]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_z = {\r\n\t\ttools: _tools,\r\n\t\tview: _view,\r\n\t\tevent: _event,\r\n\t\tdata: _data\r\n\t};\r\n\t$.extend(true, $.fn.zTree.consts, _consts);\r\n\t$.extend(true, $.fn.zTree._z, _z);\r\n\r\n\tvar zt = $.fn.zTree,\r\n\ttools = zt._z.tools,\r\n\tconsts = zt.consts,\r\n\tview = zt._z.view,\r\n\tdata = zt._z.data,\r\n\tevent = zt._z.event,\r\n\t$$ = tools.$;\r\n\r\n\tdata.exSetting(_setting);\r\n\tdata.addInitBind(_bindEvent);\r\n\tdata.addInitUnBind(_unbindEvent);\r\n\tdata.addInitCache(_initCache);\r\n\tdata.addInitNode(_initNode);\r\n\tdata.addInitProxy(_eventProxy, true);\r\n\tdata.addInitRoot(_initRoot);\r\n\tdata.addBeforeA(_beforeA);\r\n\tdata.addZTreeTools(_zTreeTools);\r\n\r\n\tvar _createNodes = view.createNodes;\r\n\tview.createNodes = function(setting, level, nodes, parentNode) {\r\n\t\tif (_createNodes) _createNodes.apply(view, arguments);\r\n\t\tif (!nodes) return;\r\n\t\tview.repairParentChkClassWithSelf(setting, parentNode);\r\n\t}\r\n\tvar _removeNode = view.removeNode;\r\n\tview.removeNode = function(setting, node) {\r\n\t\tvar parentNode = node.getParentNode();\r\n\t\tif (_removeNode) _removeNode.apply(view, arguments);\r\n\t\tif (!node || !parentNode) return;\r\n\t\tview.repairChkClass(setting, parentNode);\r\n\t\tview.repairParentChkClass(setting, parentNode);\r\n\t}\r\n\r\n\tvar _appendNodes = view.appendNodes;\r\n\tview.appendNodes = function(setting, level, nodes, parentNode, initFlag, openFlag) {\r\n\t\tvar html = \"\";\r\n\t\tif (_appendNodes) {\r\n\t\t\thtml = _appendNodes.apply(view, arguments);\r\n\t\t}\r\n\t\tif (parentNode) {\r\n\t\t\tdata.makeChkFlag(setting, parentNode);\r\n\t\t}\r\n\t\treturn html;\r\n\t}\r\n})(BI.jQuery);/**\r\n * @author windy\r\n * @version 2.0\r\n * Created by windy on 2020/1/8\r\n * 提供节点滚动加载方式\r\n */\r\n\r\n!(function () {\r\n BI.TreeRenderScrollService = BI.inherit(BI.OB, {\r\n _init: function () {\r\n this.nodeLists = {};\r\n\r\n this.id = this.options.id;\r\n // renderService是否已经注册了滚动\r\n this.hasBinded = false;\r\n\r\n this.container = this.options.container;\r\n },\r\n\r\n _getNodeListBounds: function (tId) {\r\n var nodeList = this.options.subNodeListGetter(tId)[0];\r\n return {\r\n top: nodeList.offsetTop,\r\n left: nodeList.offsetLeft,\r\n width: nodeList.offsetWidth,\r\n height: nodeList.offsetHeight\r\n }\r\n },\r\n\r\n _getTreeContainerBounds: function () {\r\n var nodeList = this.container[0];\r\n if (BI.isNotNull(nodeList)) {\r\n return {\r\n top: nodeList.offsetTop + nodeList.scrollTop,\r\n left: nodeList.offsetLeft + nodeList.scrollLeft,\r\n width: nodeList.offsetWidth,\r\n height: nodeList.offsetHeight\r\n };\r\n }\r\n return {};\r\n },\r\n\r\n _canNodePopulate: function (tId) {\r\n if (this.nodeLists[tId].locked) {\r\n return false;\r\n }\r\n // 获取ul, 即子节点列表的bounds\r\n // 是否需要继续加载,只需要看子节点列表的下边界与container是否无交集\r\n var bounds = this._getNodeListBounds(tId);\r\n var containerBounds = this._getTreeContainerBounds(tId);\r\n // ul底部是不是漏出来了\r\n if (bounds.top + bounds.height < containerBounds.top + containerBounds.height) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n _isNodeInVisible: function (tId) {\r\n var nodeList = this.options.subNodeListGetter(tId);\r\n return nodeList.length === 0 || nodeList.css(\"display\") === \"none\";\r\n },\r\n\r\n pushNodeList: function (tId, populate) {\r\n var self = this;\r\n if (!BI.has(this.nodeLists, tId)) {\r\n this.nodeLists[tId] = {\r\n populate: BI.debounce(populate, 0),\r\n options: {\r\n times: 1\r\n },\r\n // 在上一次请求返回前, 通过滚动再次触发加载的时候, 不应该认为是下一次分页, 需要等待上次请求返回\r\n // 以保证顺序和请求次数的完整\r\n locked: false\r\n };\r\n } else {\r\n this.nodeLists[tId].locked = false;\r\n }\r\n if(!this.hasBinded) {\r\n // console.log(\"绑定事件\");\r\n this.hasBinded = true;\r\n this.container && this.container.on(\"scroll\", BI.debounce(function () {\r\n self.refreshAllNodes();\r\n }, 30));\r\n }\r\n },\r\n\r\n refreshAllNodes: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n // 不展开的节点就不看了\r\n !self._isNodeInVisible(tId) && self.refreshNodes(tId);\r\n });\r\n },\r\n\r\n refreshNodes: function (tId) {\r\n if (this._canNodePopulate(tId)) {\r\n var nodeList = this.nodeLists[tId];\r\n nodeList.options.times++;\r\n nodeList.locked = true;\r\n nodeList.populate({\r\n times: nodeList.options.times\r\n });\r\n }\r\n },\r\n\r\n removeNodeList: function (tId) {\r\n delete this.nodeLists[tId];\r\n if (BI.size(this.nodeLists) === 0) {\r\n this.clear();\r\n }\r\n },\r\n\r\n clear: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n self.removeNodeList(tId);\r\n });\r\n this.nodeLists = {};\r\n // console.log(\"解绑事件\");\r\n this.container.off(\"scroll\");\r\n this.hasBinded = false;\r\n }\r\n });\r\n})();/**\r\n * @author windy\r\n * @version 2.0\r\n * Created by windy on 2020/1/8\r\n * 提供节点分页加载方式\r\n */\r\n\r\n!(function () {\r\n BI.TreeRenderPageService = BI.inherit(BI.OB, {\r\n _init: function () {\r\n this.nodeLists = {};\r\n },\r\n\r\n _getLoadingBar: function(tId) {\r\n var self = this;\r\n var tip = BI.createWidget({\r\n type: \"bi.loading_bar\",\r\n height: 25,\r\n handler: function () {\r\n self.refreshNodes(tId);\r\n }\r\n });\r\n tip.setLoaded();\r\n return tip;\r\n },\r\n\r\n pushNodeList: function (tId, populate) {\r\n var self = this, o = this.options;\r\n var tip = this._getLoadingBar(tId);\r\n if (!BI.has(this.nodeLists, tId)) {\r\n this.nodeLists[tId] = {\r\n populate: BI.debounce(populate, 0),\r\n options: {\r\n times: 1\r\n },\r\n loadWidget: tip\r\n };\r\n } else {\r\n this.nodeLists[tId].loadWidget.destroy();\r\n this.nodeLists[tId].loadWidget = tip;\r\n }\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: o.subNodeListGetter(tId),\r\n items: [tip]\r\n });\r\n },\r\n\r\n refreshNodes: function (tId) {\r\n var nodeList = this.nodeLists[tId];\r\n nodeList.options.times++;\r\n nodeList.loadWidget.setLoading();\r\n nodeList.populate({\r\n times: nodeList.options.times\r\n });\r\n },\r\n\r\n removeNodeList: function (tId) {\r\n this.nodeLists[tId] && this.nodeLists[tId].loadWidget.destroy();\r\n this.nodeLists[tId] && (this.nodeLists[tId].loadWidget = null);\r\n delete this.nodeLists[tId];\r\n if (BI.size(this.nodeLists) === 0) {\r\n this.clear();\r\n }\r\n },\r\n\r\n clear: function () {\r\n var self = this;\r\n BI.each(this.nodeLists, function (tId) {\r\n self.removeNodeList(tId);\r\n });\r\n this.nodeLists = {};\r\n }\r\n });\r\n\r\n})();/**\r\n * 可以改变图标的button\r\n *\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconChangeButton\r\n * @extends BI.Single\r\n */\r\nBI.IconChangeButton = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconChangeButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-icon-change-button\",\r\n iconCls: \"\",\r\n iconWidth: null,\r\n iconHeight: null,\r\n\r\n stopEvent: false,\r\n stopPropagation: false,\r\n selected: false,\r\n once: false, // 点击一次选中有效,再点无效\r\n forceSelected: false, // 点击即选中, 选中了就不会被取消\r\n forceNotSelected: false, // 无论怎么点击都不会被选中\r\n disableSelected: false, // 使能选中\r\n\r\n shadow: false,\r\n isShadowShowingOnSelected: false, // 选中状态下是否显示阴影\r\n trigger: null,\r\n handler: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconChangeButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.button = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n element: this,\r\n cls: o.iconCls,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n\r\n stopEvent: o.stopEvent,\r\n stopPropagation: o.stopPropagation,\r\n selected: o.selected,\r\n once: o.once,\r\n forceSelected: o.forceSelected,\r\n forceNotSelected: o.forceNotSelected,\r\n disableSelected: o.disableSelected,\r\n\r\n shadow: o.shadow,\r\n isShadowShowingOnSelected: o.isShadowShowingOnSelected,\r\n trigger: o.trigger,\r\n handler: o.handler\r\n });\r\n\r\n this.button.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.IconChangeButton.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.button.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.button.setSelected(b);\r\n },\r\n\r\n setIcon: function (cls) {\r\n var o = this.options;\r\n if (o.iconCls !== cls) {\r\n this.element.removeClass(o.iconCls).addClass(cls);\r\n o.iconCls = cls;\r\n }\r\n }\r\n});\r\nBI.IconChangeButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_change_button\", BI.IconChangeButton);/**\r\n * 统一的trigger图标按钮\r\n *\r\n * Created by GUY on 2015/9/16.\r\n * @class BI.TriggerIconButton\r\n * @extends BI.IconButton\r\n */\r\nBI.TriggerIconButton = BI.inherit(BI.IconButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TriggerIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-trigger-icon-button\",\r\n extraCls: \"pull-down-font\"\r\n });\r\n }\r\n});\r\nBI.TriggerIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\nBI.shortcut(\"bi.trigger_icon_button\", BI.TriggerIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfIconButton = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-icon-button check-half-select-icon\",\r\n height: 16,\r\n width: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n selected: false\r\n });\r\n }\r\n});\r\nBI.HalfIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE;\r\n\r\nBI.shortcut(\"bi.half_icon_button\", BI.HalfIconButton);/**\r\n * guy\r\n * @extends BI.Single\r\n * @type {*|void|Object}\r\n */\r\nBI.HalfButton = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-half-button bi-high-light-border\",\r\n height: 14,\r\n width: 14,\r\n selected: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.HalfButton.superclass._init.apply(this, arguments);\r\n BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n element: this.element,\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bi-high-light-background\",\r\n width: 8,\r\n height: 8\r\n }]\r\n });\r\n },\r\n\r\n doClick: function () {\r\n BI.HalfButton.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.HalfButton.EVENT_CHANGE);\r\n }\r\n }\r\n});\r\nBI.HalfButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.half_button\", BI.HalfButton);/**\r\n * guy\r\n * 复选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.MultiSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-item\",\r\n height: 24,\r\n logic: {\r\n dynamic: false\r\n },\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n rgap: o.rgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox],\r\n width: o.iconWrapperWidth\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectItem.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.MultiSelectItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiSelectItem.superclass.setSelected.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\nBI.MultiSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_item\", BI.MultiSelectItem);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.SingleSelectIconTextItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.SingleSelectIconTextItem = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-icon-text-item bi-list-item-active\",\r\n iconCls: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.icon_text_item\",\r\n element: this,\r\n cls: o.iconCls,\r\n once: o.once,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n selected: o.selected,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isSelected: function () {\r\n return this.text.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n this.text.setSelected(b);\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.single_select_icon_text_item\", BI.SingleSelectIconTextItem);BI.SingleSelectItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-item bi-list-item-active\",\r\n hgap: 10,\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textAlign: o.textAlign,\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n title: o.title || o.text,\r\n warningTitle: o.warningTitle,\r\n py: o.py\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectItem.superclass.setSelected.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_item\", BI.SingleSelectItem);/**\r\n * guy\r\n * 单选框item\r\n * @type {*|void|Object}\r\n */\r\nBI.SingleSelectRadioItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectRadioItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n hgap: 10,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectRadioItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\",\r\n once: o.once\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 16\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectRadioItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectRadioItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectRadioItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectRadioItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_radio_item\", BI.SingleSelectRadioItem);/**\r\n * Created by roy on 15/10/16.\r\n */\r\nBI.ArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.ArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-arrow-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconWrapperWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.ArrowNode.superclass._init.apply(this, arguments);\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\"\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: o.iconWrapperWidth,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.ArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isOpened());\r\n },\r\n \r\n setText: function (text) {\r\n BI.ArrowNode.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.ArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.checkbox.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.arrow_group_node\", BI.ArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.FirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.FirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.FirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-first-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.FirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.FirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_plus_group_node\", BI.FirstPlusGroupNode);/**\r\n * Created by User on 2016/3/31.\r\n */\r\n/**\r\n * > + icon + 文本\r\n * @class BI.IconArrowNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.IconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.IconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-icon-arrow-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n iconCls: \"\",\r\n iconWrapperWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n BI.IconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.arrow_group_node_checkbox\",\r\n width: 24,\r\n stopPropagation: true\r\n });\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.icon_label\",\r\n width: 24,\r\n cls: o.iconCls,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: o.iconWrapperWidth,\r\n el: this.checkbox\r\n }, {\r\n width: 16,\r\n el: icon\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n rgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.IconArrowNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.IconArrowNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_arrow_node\", BI.IconArrowNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.LastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.LastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.LastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-last-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if(type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.LastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.LastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_plus_group_node\", BI.LastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.MidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-mid-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_plus_group_node\", BI.MidPlusGroupNode);BI.MultiLayerIconArrowNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerIconArrowNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-icon-arrow-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24,\r\n iconHeight: 16,\r\n iconWidth: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconArrowNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.icon_arrow_node\",\r\n iconCls: o.iconCls,\r\n cls: \"bi-list-item-none\",\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerIconArrowNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerIconArrowNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_arrow_node\", BI.MultiLayerIconArrowNode);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.PlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.PlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.PlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-plus-group-node bi-list-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.PlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.setSelected(self.isSelected());\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.PlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.checkbox.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.PlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (this.checkbox) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.plus_group_node\", BI.PlusGroupNode);/**\r\n * Created by Windy on 2018/2/1.\r\n */\r\nBI.Switch = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-switch\",\r\n height: 22,\r\n width: 44,\r\n logic: {\r\n dynamic: false\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.layout = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"circle-button bi-card\"\r\n },\r\n width: 18,\r\n height: 18,\r\n top: 2,\r\n left: this.options.selected ? 24 : 2\r\n }]\r\n };\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.Switch.superclass.setSelected.apply(this, arguments);\r\n this.layout.attr(\"items\")[0].left = v ? 24 : 2;\r\n this.layout.resize();\r\n },\r\n\r\n doClick: function () {\r\n BI.Switch.superclass.doClick.apply(this, arguments);\r\n this.fireEvent(BI.Switch.EVENT_CHANGE);\r\n }\r\n});\r\nBI.Switch.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.switch\", BI.Switch);BI.FirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.FirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.FirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"first-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.first_tree_leaf_item\", BI.FirstTreeLeafItem);BI.IconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 24,\r\n cls: o.iconCls,\r\n items: [{\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }]\r\n });\r\n\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 16,\r\n el: icon\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items,\r\n hgap: 5\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.icon_tree_leaf_item\", BI.IconTreeLeafItem);BI.LastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.LastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"last-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.last_tree_leaf_item\", BI.LastTreeLeafItem);BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n layer: 0,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? \"\" : {\r\n width: 12,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: (o.pNode && o.pNode.isLastNode) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n }\r\n }), {\r\n width: 24,\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"mid-line-conn-background\",\r\n width: 24,\r\n height: o.height\r\n }\r\n }, {\r\n el: this.text\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.mid_tree_leaf_item\", BI.MidTreeLeafItem);/**\r\n * @class BI.MultiLayerIconTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerIconTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerIconTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-icon-tree-leaf-item bi-list-item-active\",\r\n layer: 0,\r\n height: 24,\r\n iconCls: \"\",\r\n iconHeight: 16,\r\n iconWidth: 16\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.icon_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n iconCls: o.iconCls,\r\n id: o.id,\r\n pId: o.pId,\r\n isFront: true,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function () {\r\n items.push({\r\n type: \"bi.layout\",\r\n width: 15,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 15),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.item.doRedMark.apply(this.item, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.item.unRedMark.apply(this.item, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerIconTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerIconTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_icon_tree_leaf_item\", BI.MultiLayerIconTreeLeafItem);\r\n/**\r\n * 树叶子节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.TreeTextLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-tree-text-leaf-item bi-list-item-active\",\r\n id: \"\",\r\n pId: \"\",\r\n height: 24,\r\n hgap: 0,\r\n lgap: 0,\r\n rgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.TreeTextLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n lgap: o.lgap,\r\n rgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.tree_text_leaf_item\", BI.TreeTextLeafItem);/**\r\n * 专门为calendar的视觉加的button,作为私有button,不能配置任何属性,也不要用这个玩意\r\n */\r\nBI.CalendarDateItem = BI.inherit(BI.BasicButton, {\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n text: o.text,\r\n value: o.value,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n left: o.lgap,\r\n right: o.rgap,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.CalendarDateItem.superclass.setSelected.apply(this, arguments);\r\n this.text.setSelected(b);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.calendar_date_item\", BI.CalendarDateItem);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.Calendar\r\n * @extends BI.Widget\r\n */\r\nBI.Calendar = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.Calendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: 2015,\r\n month: 8,\r\n day: 25\r\n });\r\n },\r\n\r\n _dateCreator: function (Y, M, D) {\r\n var self = this, o = this.options, log = {}, De = BI.getDate();\r\n var mins = o.min.match(/\\d+/g);\r\n var maxs = o.max.match(/\\d+/g);\r\n Y < (mins[0] | 0) && (Y = (mins[0] | 0));\r\n Y > (maxs[0] | 0) && (Y = (maxs[0] | 0));\r\n\r\n De.setFullYear(Y, M, D);\r\n log.ymd = [De.getFullYear(), De.getMonth(), De.getDate()];\r\n\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(log.ymd[0]) ? 29 : 28;\r\n\r\n // 日期所在月第一天\r\n De.setFullYear(log.ymd[0], log.ymd[1], 1);\r\n // 是周几\r\n log.FDay = De.getDay();\r\n\r\n // 当前BI.StartOfWeek与周日对齐后的FDay是周几\r\n var offSetFDay = (7 - BI.StartOfWeek + log.FDay) % 7;\r\n\r\n // 当前月页第一天是几号\r\n log.PDay = MD[M === 0 ? 11 : M - 1] - offSetFDay + 1;\r\n log.NDay = 1;\r\n\r\n var items = [];\r\n BI.each(BI.range(42), function (i) {\r\n var td = {}, YY = log.ymd[0], MM = log.ymd[1] + 1, DD;\r\n // 上个月的日期\r\n if (i < offSetFDay) {\r\n td.lastMonth = true;\r\n DD = i + log.PDay;\r\n // 上一年\r\n MM === 1 && (YY -= 1);\r\n MM = MM === 1 ? 12 : MM - 1;\r\n } else if (i >= offSetFDay && i < offSetFDay + MD[log.ymd[1]]) {\r\n DD = i - offSetFDay + 1;\r\n if (i - offSetFDay + 1 === log.ymd[2]) {\r\n td.currentDay = true;\r\n }\r\n } else {\r\n td.nextMonth = true;\r\n DD = log.NDay++;\r\n MM === 12 && (YY += 1);\r\n MM = MM === 12 ? 1 : MM + 1;\r\n }\r\n if (BI.checkDateVoid(YY, MM, DD, mins, maxs)[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = DD;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.Calendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var items = BI.map(this._getWeekLabel(), function (i, value) {\r\n return {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: value\r\n };\r\n });\r\n var title = BI.createWidget({\r\n type: \"bi.button_group\",\r\n height: 44,\r\n items: items,\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 5,\r\n vgap: 10\r\n }]\r\n });\r\n\r\n this.days = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 7,\r\n rows: 6,\r\n columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],\r\n rowSize: 24,\r\n vgap: 10\r\n }))]\r\n });\r\n this.days.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", title, this.days)\r\n }))));\r\n },\r\n\r\n _getWeekLabel: function () {\r\n return BI.map(BI.range(0, 7), function (idx, v) {\r\n return BI.Date._SDN[(v + BI.StartOfWeek) % 7];\r\n });\r\n },\r\n\r\n isFrontDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, -1 * (day + 1));\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n isFinalDate: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year, M = o.month, De = BI.getDate(), day = De.getDay();\r\n Y = Y | 0;\r\n De.setFullYear(Y, M, 1);\r\n var newDate = BI.getOffsetDate(De, 42 - day);\r\n return !!BI.checkDateVoid(newDate.getFullYear(), newDate.getMonth(), newDate.getDate(), o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var days = this._dateCreator(o.year, o.month - 1, o.day);\r\n var items = [];\r\n items.push(days.slice(0, 7));\r\n items.push(days.slice(7, 14));\r\n items.push(days.slice(14, 21));\r\n items.push(days.slice(21, 28));\r\n items.push(days.slice(28, 35));\r\n items.push(days.slice(35, 42));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n var month = td.lastMonth ? o.month - 1 : (td.nextMonth ? o.month + 1 : o.month);\r\n return BI.extend(td, {\r\n type: \"bi.calendar_date_item\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n value: o.year + \"-\" + month + \"-\" + td.text,\r\n disabled: td.lastMonth || td.nextMonth || td.disabled,\r\n lgap: 5,\r\n rgap: 5\r\n // selected: td.currentDay\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function() {\r\n this.days.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.days.setValue([ob.year + \"-\" + ob.month + \"-\" + ob.day]);\r\n },\r\n\r\n getValue: function () {\r\n var date = this.days.getValue()[0].match(/\\d+/g);\r\n return {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n };\r\n }\r\n});\r\n\r\nBI.extend(BI.Calendar, {\r\n getPageByDateJSON: function (json) {\r\n var year = BI.getDate().getFullYear();\r\n var month = BI.getDate().getMonth();\r\n var page = (json.year - year) * 12;\r\n page += json.month - 1 - month;\r\n return page;\r\n },\r\n getDateJSONByPage: function (v) {\r\n var months = BI.getDate().getMonth();\r\n var page = v;\r\n\r\n // 对当前page做偏移,使到当前年初\r\n page = page + months;\r\n\r\n var year = BI.parseInt(page / 12);\r\n if(page < 0 && page % 12 !== 0) {\r\n year--;\r\n }\r\n var month = page >= 0 ? (page % 12) : ((12 + page % 12) % 12);\r\n return {\r\n year: BI.getDate().getFullYear() + year,\r\n month: month + 1\r\n };\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.calendar\", BI.Calendar);/**\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.YearCalendar\r\n * @extends BI.Widget\r\n */\r\nBI.YearCalendar = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.YearCalendar.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-calendar\",\r\n behaviors: {},\r\n logic: {\r\n dynamic: false\r\n },\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n year: null\r\n });\r\n },\r\n\r\n _yearCreator: function (Y) {\r\n var o = this.options;\r\n Y = Y | 0;\r\n var start = BI.YearCalendar.getStartYear(Y);\r\n var items = [];\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n BI.each(BI.range(BI.YearCalendar.INTERVAL), function (i) {\r\n var td = {};\r\n if (BI.checkDateVoid(start + i, 1, 1, BI.print(BI.getDate(startDate.getFullYear(), 0, 1), \"%Y-%X-%d\"), BI.print(BI.getDate(endDate.getFullYear(), 0, 1), \"%Y-%X-%d\"))[0]) {\r\n td.disabled = true;\r\n }\r\n td.text = start + i;\r\n items.push(td);\r\n });\r\n return items;\r\n },\r\n\r\n _init: function () {\r\n BI.YearCalendar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.currentYear = BI.getDate().getFullYear();\r\n\r\n this.years = BI.createWidget({\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n items: BI.createItems(this._getItems(), {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({}, o.logic, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 24\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1\r\n }]\r\n });\r\n this.years.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n BI.createWidget(BI.extend({\r\n element: this\r\n\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend({}, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this.years)\r\n }))));\r\n },\r\n\r\n isFrontYear: function () {\r\n var o = this.options;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getStartYear(Y) - 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n isFinalYear: function () {\r\n var o = this.options, c = this._const;\r\n var Y = o.year;\r\n Y = Y | 0;\r\n return !!BI.checkDateVoid(BI.YearCalendar.getEndYear(Y) + 1, 1, 1, o.min, o.max)[0];\r\n },\r\n\r\n _getItems: function () {\r\n var o = this.options;\r\n var years = this._yearCreator(o.year || this.currentYear);\r\n\r\n // 纵向排列年\r\n var len = years.length, tyears = BI.makeArray(len, \"\");\r\n var map = [0, 6, 1, 7, 2, 8, 3, 9, 4, 10, 5, 11];\r\n BI.each(years, function (i, y) {\r\n tyears[i] = years[map[i]];\r\n });\r\n\r\n var items = [];\r\n items.push(tyears.slice(0, 2));\r\n items.push(tyears.slice(2, 4));\r\n items.push(tyears.slice(4, 6));\r\n items.push(tyears.slice(6, 8));\r\n items.push(tyears.slice(8, 10));\r\n items.push(tyears.slice(10, 12));\r\n\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return BI.extend(td, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"normal\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24,\r\n width: 45,\r\n value: td.text,\r\n disabled: td.disabled\r\n });\r\n });\r\n });\r\n },\r\n\r\n _populate: function () {\r\n this.years.populate(this._getItems());\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(o.min)) {\r\n o.min = minDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n o.max = maxDate;\r\n this._populate();\r\n }\r\n },\r\n\r\n setValue: function (val) {\r\n this.years.setValue([val]);\r\n },\r\n\r\n getValue: function () {\r\n return this.years.getValue()[0];\r\n }\r\n});\r\n// 类方法\r\nBI.extend(BI.YearCalendar, {\r\n INTERVAL: 12,\r\n\r\n // 获取显示的第一年\r\n getStartYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n return year - ((year - cur + 3) % BI.YearCalendar.INTERVAL + 12) % BI.YearCalendar.INTERVAL;\r\n },\r\n\r\n getEndYear: function (year) {\r\n return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;\r\n },\r\n\r\n getPageByYear: function (year) {\r\n var cur = BI.getDate().getFullYear();\r\n year = BI.YearCalendar.getStartYear(year);\r\n return (year - cur + 3) / BI.YearCalendar.INTERVAL;\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.year_calendar\", BI.YearCalendar);/**\r\n * Created by roy on 15/10/16.\r\n * 右与下箭头切换的树节点\r\n */\r\nBI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ArrowTreeGroupNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-arrow-group-node-checkbox\"\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.removeClass(\"expander-right-font\").addClass(\"expander-down-font\");\r\n } else {\r\n this.element.removeClass(\"expander-down-font\").addClass(\"expander-right-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.arrow_group_node_checkbox\", BI.ArrowTreeGroupNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.CheckingMarkNode\r\n * @extends BI.IconButton\r\n */\r\nBI.CheckingMarkNode = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.CheckingMarkNode.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"check-mark-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.CheckingMarkNode.superclass._init.apply(this, arguments);\r\n this.setSelected(this.options.selected);\r\n\r\n },\r\n setSelected: function (v) {\r\n BI.CheckingMarkNode.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"check-mark-font\");\r\n } else {\r\n this.element.removeClass(\"check-mark-font\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.checking_mark_node\", BI.CheckingMarkNode);/**\r\n * 十字型的树节点\r\n * @class BI.FirstTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.FirstTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type2\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type2\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type2\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.first_tree_node_checkbox\", BI.FirstTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.LastTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LastTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type4\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if (v === true) {\r\n this.element.addClass(\"tree-expand-icon-type4\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type4\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.last_tree_node_checkbox\", BI.LastTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.MidTreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MidTreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type3\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v === true) {\r\n this.element.addClass(\"tree-expand-icon-type3\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type3\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.mid_tree_node_checkbox\", BI.MidTreeNodeCheckbox);/**\r\n * 十字型的树节点\r\n * @class BI.TreeNodeCheckbox\r\n * @extends BI.IconButton\r\n */\r\nBI.TreeNodeCheckbox = BI.inherit(BI.IconButton, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.TreeNodeCheckbox.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"tree-collapse-icon-type1\",\r\n iconWidth: 24,\r\n iconHeight: 24\r\n });\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments);\r\n if(v) {\r\n this.element.addClass(\"tree-expand-icon-type1\");\r\n } else {\r\n this.element.removeClass(\"tree-expand-icon-type1\");\r\n }\r\n }\r\n});\r\nBI.shortcut(\"bi.tree_node_checkbox\", BI.TreeNodeCheckbox);/**\r\n * 自定义选色\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.CustomColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.CustomColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.CustomColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-custom-color-chooser\",\r\n width: 227,\r\n height: 245\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.CustomColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.editor, {\r\n type: \"bi.simple_color_picker_editor\"\r\n });\r\n this.editor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n this.farbtastic = BI.createWidget({\r\n type: \"bi.farbtastic\"\r\n });\r\n this.farbtastic.on(BI.Farbtastic.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.editor,\r\n left: 0,\r\n top: 0,\r\n right: 0\r\n }],\r\n height: 30\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.farbtastic,\r\n left: 15,\r\n right: 15,\r\n top: 7\r\n }],\r\n height: 215\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (color) {\r\n this.editor.setValue(color);\r\n this.farbtastic.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.CustomColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.custom_color_chooser\", BI.CustomColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser\",\r\n value: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 1,\r\n isNeedAdjustWidth: false,\r\n isNeedAdjustHeight: false,\r\n el: BI.extend({\r\n type: o.width <= 24 ? \"bi.color_chooser_trigger\" : \"bi.long_color_chooser_trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n width: o.width - 2,\r\n height: o.height - 2\r\n }, o.el),\r\n popup: {\r\n el: BI.extend({\r\n type: \"bi.color_chooser_popup\",\r\n ref: function (_ref) {\r\n self.colorPicker = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.ColorChooserPopup.EVENT_VALUE_CHANGE,\r\n action: function () {\r\n fn();\r\n if (!self._isRGBColor(self.colorPicker.getValue())) {\r\n self.combo.hideView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.ColorChooserPopup.EVENT_CHANGE,\r\n action: function () {\r\n fn();\r\n self.combo.hideView();\r\n }\r\n }]\r\n }, o.popup),\r\n value: o.value,\r\n width: 230\r\n },\r\n value: o.value\r\n });\r\n\r\n var fn = function () {\r\n var color = self.colorPicker.getValue();\r\n self.trigger.setValue(color);\r\n };\r\n\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.ColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.ColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser\", BI.ColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.ColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-color-chooser-popup\",\r\n width: 230,\r\n height: 145,\r\n simple: false // 简单模式, popup中没有自动和透明\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.colorEditor = BI.createWidget(o.editor, {\r\n type: o.simple ? \"bi.simple_color_picker_editor\" : \"bi.color_picker_editor\",\r\n value: o.value,\r\n cls: \"bi-header-background bi-border-bottom\",\r\n height: 30\r\n });\r\n\r\n this.colorEditor.on(BI.ColorPickerEditor.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue());\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n\r\n this.storeColors = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n cls: \"bi-border-bottom bi-border-right\",\r\n items: [this._digestStoreColors(this._getStoreColors())],\r\n width: 210,\r\n height: 24,\r\n value: o.value\r\n });\r\n this.storeColors.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.colorPicker = BI.createWidget({\r\n type: \"bi.color_picker\",\r\n width: 210,\r\n height: 50,\r\n value: o.value\r\n });\r\n\r\n this.colorPicker.on(BI.ColorPicker.EVENT_CHANGE, function () {\r\n self.setValue(this.getValue()[0]);\r\n self._dealStoreColors();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.customColorChooser = BI.createWidget({\r\n type: \"bi.custom_color_chooser\",\r\n editor: o.editor\r\n });\r\n\r\n var panel = BI.createWidget({\r\n type: \"bi.popup_panel\",\r\n buttons: [BI.i18nText(\"BI-Basic_Cancel\"), BI.i18nText(\"BI-Basic_Save\")],\r\n title: BI.i18nText(\"BI-Custom_Color\"),\r\n el: this.customColorChooser,\r\n stopPropagation: false,\r\n bgap: -1,\r\n rgap: 1,\r\n lgap: 1,\r\n minWidth: 227\r\n });\r\n\r\n this.more = BI.createWidget({\r\n type: \"bi.combo\",\r\n cls: \"bi-border-top\",\r\n container: null,\r\n direction: \"right,top\",\r\n isNeedAdjustHeight: false,\r\n el: {\r\n type: \"bi.text_item\",\r\n cls: \"color-chooser-popup-more bi-list-item\",\r\n textAlign: \"center\",\r\n height: 24,\r\n textLgap: 10,\r\n text: BI.i18nText(\"BI-Basic_More\") + \"...\"\r\n },\r\n popup: panel\r\n });\r\n\r\n this.more.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self.customColorChooser.setValue(self.getValue());\r\n });\r\n panel.on(BI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.more.hideView();\r\n break;\r\n case 1:\r\n self.setValue(self.customColorChooser.getValue());\r\n self._dealStoreColors();\r\n self.more.hideView();\r\n self.fireEvent(BI.ColorChooserPopup.EVENT_CHANGE, arguments);\r\n break;\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vtape\",\r\n items: [this.colorEditor, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.storeColors,\r\n left: 10,\r\n right: 10,\r\n top: 5\r\n }]\r\n },\r\n height: 29\r\n }, {\r\n el: {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.colorPicker,\r\n left: 10,\r\n right: 10,\r\n top: 5,\r\n bottom: 5\r\n }]\r\n },\r\n height: 60\r\n }, {\r\n el: this.more,\r\n height: 24\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"disable-mask\",\r\n invisible: !o.disabled,\r\n ref: function () {\r\n self.mask = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var self = this;\r\n var o = this.options;\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorChooserPopup.superclass._setEnable.apply(this, arguments);\r\n this.mask.setVisible(!enable);\r\n },\r\n\r\n _dealStoreColors: function () {\r\n var color = this.getValue();\r\n var colors = this._getStoreColors();\r\n var que = new BI.Queue(8);\r\n que.fromArray(colors);\r\n que.remove(color);\r\n que.unshift(color);\r\n var array = que.toArray();\r\n BI.Cache.setItem(\"colors\", BI.array2String(array));\r\n this.setStoreColors(array);\r\n },\r\n\r\n _digestStoreColors: function (colors) {\r\n var items = BI.map(colors, function (i, color) {\r\n return {\r\n value: color\r\n };\r\n });\r\n BI.count(colors.length, 8, function (i) {\r\n items.push({\r\n value: \"\",\r\n disabled: true\r\n });\r\n });\r\n return items;\r\n },\r\n\r\n _getStoreColors: function() {\r\n var self = this, o = this.options;\r\n var colorsArray = BI.string2Array(BI.Cache.getItem(\"colors\") || \"\");\r\n return BI.filter(colorsArray, function (idx, color) {\r\n return o.simple ? self._isRGBColor(color) : true;\r\n });\r\n },\r\n\r\n _isRGBColor: function (color) {\r\n return BI.isNotEmptyString(color) && color !== \"transparent\";\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n if (BI.isArray(colors)) {\r\n this.storeColors.populate([this._digestStoreColors(colors)]);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorEditor.setValue(color);\r\n this.colorPicker.setValue(color);\r\n this.storeColors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colorEditor.getValue();\r\n }\r\n});\r\nBI.ColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.ColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_popup\", BI.ColorChooserPopup);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooserPopup\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooserPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooserPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-chooser-popup\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooserPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.color_chooser_popup\",\r\n value: o.value,\r\n element: this,\r\n simple: true // 是否有自动\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.ColorChooserPopup.EVENT_VALUE_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE, arguments);\r\n });\r\n },\r\n\r\n setStoreColors: function (colors) {\r\n this.popup.setStoreColors(colors);\r\n },\r\n\r\n setValue: function (color) {\r\n this.popup.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooserPopup.EVENT_VALUE_CHANGE = \"EVENT_VALUE_CHANGE\";\r\nBI.SimpleColorChooserPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser_popup\", BI.SimpleColorChooserPopup);/**\r\n * 简单选色控件,没有自动和透明\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.SimpleColorChooser\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorChooser = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorChooser.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-color-chooser\",\r\n value: \"#ffffff\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorChooser.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.color_chooser\",\r\n element: this,\r\n container: o.container,\r\n value: o.value,\r\n width: o.width,\r\n height: o.height,\r\n popup: {\r\n type: \"bi.simple_color_chooser_popup\"\r\n }\r\n });\r\n this.combo.on(BI.ColorChooser.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleColorChooser.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo.showView();\r\n },\r\n\r\n setValue: function (color) {\r\n this.combo.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n }\r\n});\r\nBI.SimpleColorChooser.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_chooser\", BI.SimpleColorChooser);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.ColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.ColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorChooserTrigger.superclass._init.apply(this, arguments);\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-chooser-trigger-content\" + (BI.isIE9Below && BI.isIE9Below() ? \" hack\" : \"\")\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: -1,\r\n bottom: 1\r\n }]\r\n });\r\n if (BI.isNotNull(this.options.value)) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.ColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\").removeClass(\"auto-color-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color}).removeClass(\"auto-color-background\").removeClass(\"trans-color-background\");\r\n }\r\n }\r\n});\r\nBI.ColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_chooser_trigger\", BI.ColorChooserTrigger);/**\r\n * 选色控件\r\n *\r\n * Created by GUY on 2015/11/17.\r\n * @class BI.LongColorChooserTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.LongColorChooserTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.LongColorChooserTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-chooser-trigger bi-border\",\r\n height: 22\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LongColorChooserTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colorContainer = BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"color-chooser-trigger-content\",\r\n items: [{\r\n type: \"bi.icon_change_button\",\r\n ref: function (_ref) {\r\n self.changeIcon = _ref;\r\n },\r\n disableSelected: true,\r\n iconCls: \"auto-color-icon\",\r\n width: 24,\r\n iconWidth: 16,\r\n iconHeight: 16\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n },\r\n textAlign: \"left\",\r\n hgap: 5,\r\n height: 18,\r\n text: BI.i18nText(\"BI-Basic_Auto\")\r\n }\r\n }]\r\n });\r\n\r\n var down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font icon-size-12\",\r\n width: 12,\r\n height: 8\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.colorContainer,\r\n left: 3,\r\n right: 3,\r\n top: 3,\r\n bottom: 3\r\n }, {\r\n el: down,\r\n right: 3,\r\n bottom: 3\r\n }]\r\n });\r\n if (this.options.value) {\r\n this.setValue(this.options.value);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n BI.LongColorChooserTrigger.superclass.setValue.apply(this, arguments);\r\n if (color === \"\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"auto-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Basic_Auto\"));\r\n } else if (color === \"transparent\") {\r\n this.colorContainer.element.css(\"background-color\", \"\");\r\n this.changeIcon.setVisible(true);\r\n this.label.setVisible(true);\r\n this.changeIcon.setIcon(\"trans-color-icon\");\r\n this.label.setText(BI.i18nText(\"BI-Transparent_Color\"));\r\n } else {\r\n this.colorContainer.element.css({\"background-color\": color});\r\n this.changeIcon.setVisible(false);\r\n this.label.setVisible(false);\r\n }\r\n }\r\n});\r\nBI.LongColorChooserTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.long_color_chooser_trigger\", BI.LongColorChooserTrigger);/**\r\n * 简单选色控件按钮\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.ColorPickerButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ColorPickerButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-color-picker-button bi-background bi-border-top bi-border-left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.value) {\r\n this.element.css(\"background-color\", o.value);\r\n var name = this.getName();\r\n this.element.hover(function () {\r\n self._createMask();\r\n if (self.isEnabled()) {\r\n BI.Maskers.show(name);\r\n }\r\n }, function () {\r\n if (!self.isSelected()) {\r\n BI.Maskers.hide(name);\r\n }\r\n });\r\n }\r\n },\r\n\r\n _createMask: function () {\r\n var o = this.options, name = this.getName();\r\n if (this.isEnabled() && !BI.Maskers.has(name)) {\r\n var w = BI.Maskers.make(name, this, {\r\n offset: {\r\n left: -1,\r\n top: -1,\r\n right: -1,\r\n bottom: -1\r\n }\r\n });\r\n w.element.addClass(\"color-picker-button-mask\").css(\"background-color\", o.value);\r\n }\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.ColorPickerButton.superclass.setSelected.apply(this, arguments);\r\n if (b) {\r\n this._createMask();\r\n }\r\n BI.Maskers[b ? \"show\" : \"hide\"](this.getName());\r\n }\r\n});\r\nBI.ColorPickerButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_button\", BI.ColorPickerButton);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPicker\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPicker = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPicker.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker\",\r\n items: null\r\n });\r\n },\r\n\r\n _items: [\r\n [{\r\n value: \"#ffffff\"\r\n }, {\r\n value: \"#f2f2f2\"\r\n }, {\r\n value: \"#e5e5e5\"\r\n }, {\r\n value: \"#d9d9d9\"\r\n }, {\r\n value: \"#cccccc\"\r\n }, {\r\n value: \"#bfbfbf\"\r\n }, {\r\n value: \"#b2b2b2\"\r\n }, {\r\n value: \"#a6a6a6\"\r\n }, {\r\n value: \"#999999\"\r\n }, {\r\n value: \"#8c8c8c\"\r\n }, {\r\n value: \"#808080\"\r\n }, {\r\n value: \"#737373\"\r\n }, {\r\n value: \"#666666\"\r\n }, {\r\n value: \"#4d4d4d\"\r\n }, {\r\n value: \"#333333\"\r\n }, {\r\n value: \"#000000\"\r\n }],\r\n [{\r\n value: \"#d8b5a6\"\r\n }, {\r\n value: \"#ff9e9a\"\r\n }, {\r\n value: \"#ffc17d\"\r\n }, {\r\n value: \"#f5e56b\"\r\n }, {\r\n value: \"#d8e698\"\r\n }, {\r\n value: \"#e0ebaf\"\r\n }, {\r\n value: \"#c3d825\"\r\n }, {\r\n value: \"#bbe2e7\"\r\n }, {\r\n value: \"#85d3cd\"\r\n }, {\r\n value: \"#bde1e6\"\r\n }, {\r\n value: \"#a0d8ef\"\r\n }, {\r\n value: \"#89c3eb\"\r\n }, {\r\n value: \"#bbc8e6\"\r\n }, {\r\n value: \"#bbbcde\"\r\n }, {\r\n value: \"#d6b4cc\"\r\n }, {\r\n value: \"#fbc0d3\"\r\n }],\r\n [{\r\n value: \"#bb9581\"\r\n }, {\r\n value: \"#f37d79\"\r\n }, {\r\n value: \"#fba74f\"\r\n }, {\r\n value: \"#ffdb4f\"\r\n }, {\r\n value: \"#c7dc68\"\r\n }, {\r\n value: \"#b0ca71\"\r\n }, {\r\n value: \"#99ab4e\"\r\n }, {\r\n value: \"#84b9cb\"\r\n }, {\r\n value: \"#00a3af\"\r\n }, {\r\n value: \"#2ca9e1\"\r\n }, {\r\n value: \"#0095d9\"\r\n }, {\r\n value: \"#4c6cb3\"\r\n }, {\r\n value: \"#8491c3\"\r\n }, {\r\n value: \"#a59aca\"\r\n }, {\r\n value: \"#cc7eb1\"\r\n }, {\r\n value: \"#e89bb4\"\r\n }],\r\n [{\r\n value: \"#9d775f\"\r\n }, {\r\n value: \"#dd4b4b\"\r\n }, {\r\n value: \"#ef8b07\"\r\n }, {\r\n value: \"#fcc800\"\r\n }, {\r\n value: \"#aacf53\"\r\n }, {\r\n value: \"#82ae46\"\r\n }, {\r\n value: \"#69821b\"\r\n }, {\r\n value: \"#59b9c6\"\r\n }, {\r\n value: \"#2a83a2\"\r\n }, {\r\n value: \"#007bbb\"\r\n }, {\r\n value: \"#19448e\"\r\n }, {\r\n value: \"#274a78\"\r\n }, {\r\n value: \"#4a488e\"\r\n }, {\r\n value: \"#7058a3\"\r\n }, {\r\n value: \"#884898\"\r\n }, {\r\n value: \"#d47596\"\r\n }]\r\n ],\r\n\r\n _init: function () {\r\n BI.ColorPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.colors = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(o.items || this._items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n }),\r\n layouts: [{\r\n type: \"bi.grid\"\r\n }],\r\n value: o.value\r\n });\r\n this.colors.on(BI.ButtonGroup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ColorPicker.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n var args = [].slice.call(arguments);\r\n args[0] = BI.createItems(items, {\r\n type: \"bi.color_picker_button\",\r\n once: false\r\n });\r\n this.colors.populate.apply(this.colors, args);\r\n },\r\n\r\n setValue: function (color) {\r\n this.colors.setValue(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.colors.getValue();\r\n }\r\n});\r\nBI.ColorPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker\", BI.ColorPicker);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.ColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.storeValue = {};\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (checker(self.storeValue.r) && checker(self.storeValue.g) && checker(self.storeValue.b)) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n this.none = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"auto-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Basic_Auto\")\r\n });\r\n this.none.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"\");\r\n } else {\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) || self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.transparent = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"trans-color-icon\",\r\n width: 16,\r\n height: 16,\r\n iconWidth: 16,\r\n iconHeight: 16,\r\n title: BI.i18nText(\"BI-Transparent_Color\")\r\n });\r\n this.transparent.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (this.isSelected()) {\r\n self.lastColor = self.getValue();\r\n self.setValue(\"transparent\");\r\n } else {\r\n if (self.lastColor === \"transparent\") {\r\n self.lastColor = \"\";\r\n }\r\n self.setValue(self.lastColor || \"#ffffff\");\r\n }\r\n if ((self.R.isValid() && self.G.isValid() && self.B.isValid()) ||\r\n self._isEmptyRGB()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.ColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: this.colorShow,\r\n width: 16\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: this.transparent,\r\n width: 16,\r\n lgap: 5\r\n }, {\r\n el: this.none,\r\n width: 16,\r\n lgap: 5\r\n }]\r\n },\r\n left: 10,\r\n right: 10,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n this.storeValue = {\r\n r: this.R.getValue() || 0,\r\n g: this.G.getValue() || 0,\r\n b: this.B.getValue() || 0\r\n };\r\n },\r\n\r\n _isEmptyRGB: function () {\r\n return BI.isEmptyString(this.storeValue.r) && BI.isEmptyString(this.storeValue.g) && BI.isEmptyString(this.storeValue.b);\r\n },\r\n\r\n _showPreColor: function (color) {\r\n if (color === \"\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"trans-color-background\").addClass(\"auto-color-normal-background\");\r\n } else if (color === \"transparent\") {\r\n this.colorShow.element.css(\"background-color\", \"\").removeClass(\"auto-color-normal-background\").addClass(\"trans-color-background\");\r\n } else {\r\n this.colorShow.element.css({\"background-color\": color}).removeClass(\"auto-color-normal-background\").removeClass(\"trans-color-background\");\r\n }\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.ColorPickerEditor.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n if (color === \"transparent\") {\r\n this.transparent.setSelected(true);\r\n this.none.setSelected(false);\r\n this._showPreColor(\"transparent\");\r\n this.R.setValue(\"\");\r\n this.G.setValue(\"\");\r\n this.B.setValue(\"\");\r\n this.storeValue = {\r\n r: \"\",\r\n g: \"\",\r\n b: \"\"\r\n };\r\n return;\r\n }\r\n if (!color) {\r\n color = \"\";\r\n this.none.setSelected(true);\r\n } else {\r\n this.none.setSelected(false);\r\n }\r\n this.transparent.setSelected(false);\r\n this._showPreColor(color);\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.storeValue = {\r\n r: BI.isNull(json.r) ? \"\" : json.r,\r\n g: BI.isNull(json.r) ? \"\" : json.g,\r\n b: BI.isNull(json.r) ? \"\" : json.b\r\n };\r\n this.R.setValue(this.storeValue.r);\r\n this.G.setValue(this.storeValue.g);\r\n this.B.setValue(this.storeValue.b);\r\n },\r\n\r\n getValue: function () {\r\n if (this._isEmptyRGB() && this.transparent.isSelected()) {\r\n return \"transparent\";\r\n }\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.storeValue.r,\r\n g: this.storeValue.g,\r\n b: this.storeValue.b\r\n }));\r\n }\r\n});\r\nBI.ColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.color_picker_editor\", BI.ColorPickerEditor);/**\r\n * 简单选色控件\r\n *\r\n * Created by GUY on 2015/11/16.\r\n * @class BI.SimpleColorPickerEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleColorPickerEditor = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n REB_WIDTH: 32\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleColorPickerEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-color-picker-editor\",\r\n // width: 200,\r\n height: 30\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleColorPickerEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this.constants;\r\n this.colorShow = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"color-picker-editor-display bi-card bi-border\",\r\n height: 16,\r\n width: 16\r\n });\r\n var RGB = BI.createWidgets(BI.createItems([{text: \"R\"}, {text: \"G\"}, {text: \"B\"}], {\r\n type: \"bi.label\",\r\n cls: \"color-picker-editor-label\",\r\n width: 20,\r\n height: 20\r\n }));\r\n\r\n var checker = function (v) {\r\n return BI.isNumeric(v) && (v | 0) >= 0 && (v | 0) <= 255;\r\n };\r\n var Ws = BI.createWidgets([{}, {}, {}], {\r\n type: \"bi.small_text_editor\",\r\n cls: \"color-picker-editor-input\",\r\n validationChecker: checker,\r\n errorText: BI.i18nText(\"BI-Color_Picker_Error_Text\"),\r\n allowBlank: true,\r\n value: 255,\r\n width: c.REB_WIDTH,\r\n height: 20\r\n });\r\n BI.each(Ws, function (i, w) {\r\n w.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self._checkEditors();\r\n if (self.R.isValid() && self.G.isValid() && self.B.isValid()) {\r\n self.colorShow.element.css(\"background-color\", self.getValue());\r\n self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE);\r\n }\r\n });\r\n });\r\n this.R = Ws[0];\r\n this.G = Ws[1];\r\n this.B = Ws[2];\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.colorShow,\r\n width: 16,\r\n lgap: 20,\r\n rgap: 15\r\n }, {\r\n el: RGB[0],\r\n width: 20\r\n }, {\r\n el: this.R,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[1],\r\n width: 20\r\n }, {\r\n el: this.G,\r\n width: c.REB_WIDTH\r\n }, {\r\n el: RGB[2],\r\n width: 20\r\n }, {\r\n el: this.B,\r\n width: c.REB_WIDTH\r\n }]\r\n });\r\n },\r\n\r\n _checkEditors: function () {\r\n if(BI.isEmptyString(this.R.getValue())) {\r\n this.R.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.G.getValue())) {\r\n this.G.setValue(0);\r\n }\r\n if(BI.isEmptyString(this.B.getValue())) {\r\n this.B.setValue(0);\r\n }\r\n },\r\n\r\n setValue: function (color) {\r\n this.colorShow.element.css({\"background-color\": color});\r\n var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color));\r\n this.R.setValue(BI.isNull(json.r) ? \"\" : json.r);\r\n this.G.setValue(BI.isNull(json.g) ? \"\" : json.g);\r\n this.B.setValue(BI.isNull(json.b) ? \"\" : json.b);\r\n },\r\n\r\n getValue: function () {\r\n return BI.DOM.rgb2hex(BI.DOM.json2rgb({\r\n r: this.R.getValue(),\r\n g: this.G.getValue(),\r\n b: this.B.getValue()\r\n }));\r\n }\r\n});\r\nBI.SimpleColorPickerEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_color_picker_editor\", BI.SimpleColorPickerEditor);BI.Farbtastic = BI.inherit(BI.BasicButton, {\r\n\r\n constants: {\r\n RADIUS: 84,\r\n SQUARE: 100,\r\n WIDTH: 194\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-farbtastic\",\r\n width: 195,\r\n height: 195,\r\n stopPropagation: true,\r\n value: \"#000000\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"\",\r\n ref: function (_ref) {\r\n self.colorWrapper = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"wheel\",\r\n ref: function (_ref) {\r\n self.wheel = _ref;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"overlay\",\r\n ref: function (_ref) {\r\n self.overlay = _ref;\r\n }\r\n },\r\n top: 47,\r\n left: 47,\r\n width: 101,\r\n height: 101\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.hMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"marker\",\r\n ref: function (_ref) {\r\n self.slMarker = _ref;\r\n },\r\n scrollable: false,\r\n width: 17,\r\n height: 17\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _unpack: function (color) {\r\n if (color.length === 7) {\r\n return [parseInt(\"0x\" + color.substring(1, 3)) / 255,\r\n parseInt(\"0x\" + color.substring(3, 5)) / 255,\r\n parseInt(\"0x\" + color.substring(5, 7)) / 255];\r\n } else if (color.length === 4) {\r\n return [parseInt(\"0x\" + color.substring(1, 2)) / 15,\r\n parseInt(\"0x\" + color.substring(2, 3)) / 15,\r\n parseInt(\"0x\" + color.substring(3, 4)) / 15];\r\n }\r\n },\r\n\r\n _pack: function (rgb) {\r\n var r = Math.round(rgb[0] * 255);\r\n var g = Math.round(rgb[1] * 255);\r\n var b = Math.round(rgb[2] * 255);\r\n return \"#\" + (r < 16 ? \"0\" : \"\") + r.toString(16) +\r\n (g < 16 ? \"0\" : \"\") + g.toString(16) +\r\n (b < 16 ? \"0\" : \"\") + b.toString(16);\r\n },\r\n\r\n _setColor: function (color) {\r\n var unpack = this._unpack(color);\r\n if (this.value !== color && unpack) {\r\n this.value = color;\r\n this.rgb = unpack;\r\n this.hsl = this._RGBToHSL(this.rgb);\r\n this._updateDisplay();\r\n }\r\n },\r\n\r\n _setHSL: function (hsl) {\r\n this.hsl = hsl;\r\n this.rgb = this._HSLToRGB(hsl);\r\n this.value = this._pack(this.rgb);\r\n this._updateDisplay();\r\n return this;\r\n },\r\n\r\n _HSLToRGB: function (hsl) {\r\n var m1, m2, r, g, b;\r\n var h = hsl[0], s = hsl[1], l = hsl[2];\r\n m2 = (l <= 0.5) ? l * (s + 1) : l + s - l * s;\r\n m1 = l * 2 - m2;\r\n return [this._hueToRGB(m1, m2, h + 0.33333),\r\n this._hueToRGB(m1, m2, h),\r\n this._hueToRGB(m1, m2, h - 0.33333)];\r\n },\r\n\r\n _hueToRGB: function (m1, m2, h) {\r\n h = (h < 0) ? h + 1 : ((h > 1) ? h - 1 : h);\r\n if (h * 6 < 1) return m1 + (m2 - m1) * h * 6;\r\n if (h * 2 < 1) return m2;\r\n if (h * 3 < 2) return m1 + (m2 - m1) * (0.66666 - h) * 6;\r\n return m1;\r\n },\r\n\r\n _RGBToHSL: function (rgb) {\r\n var min, max, delta, h, s, l;\r\n var r = rgb[0], g = rgb[1], b = rgb[2];\r\n min = Math.min(r, Math.min(g, b));\r\n max = Math.max(r, Math.max(g, b));\r\n delta = max - min;\r\n l = (min + max) / 2;\r\n s = 0;\r\n if (l > 0 && l < 1) {\r\n s = delta / (l < 0.5 ? (2 * l) : (2 - 2 * l));\r\n }\r\n h = 0;\r\n if (delta > 0) {\r\n if (max == r && max != g) h += (g - b) / delta;\r\n if (max == g && max != b) h += (2 + (b - r) / delta);\r\n if (max == b && max != r) h += (4 + (r - g) / delta);\r\n h /= 6;\r\n }\r\n return [h, s, l];\r\n },\r\n\r\n _updateDisplay: function () {\r\n var angle = this.hsl[0] * 6.28;\r\n this.hMarker.element.css({\r\n left: Math.round(Math.sin(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(-Math.cos(angle) * this.constants.RADIUS + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n this.slMarker.element.css({\r\n left: Math.round(this.constants.SQUARE * (.5 - this.hsl[1]) + this.constants.WIDTH / 2) + \"px\",\r\n top: Math.round(this.constants.SQUARE * (.5 - this.hsl[2]) + this.constants.WIDTH / 2) + \"px\"\r\n });\r\n\r\n // Saturation/Luminance gradient\r\n this.colorWrapper.element.css(\"backgroundColor\", this._pack(this._HSLToRGB([this.hsl[0], 1, 0.5])));\r\n\r\n this.fireEvent(BI.Farbtastic.EVENT_CHANGE, this.getValue(), this);\r\n },\r\n\r\n _absolutePosition: function (el) {\r\n var r = {x: el.offsetLeft, y: el.offsetTop};\r\n // Resolve relative to offsetParent\r\n if (el.offsetParent) {\r\n var tmp = this._absolutePosition(el.offsetParent);\r\n r.x += tmp.x;\r\n r.y += tmp.y;\r\n }\r\n return r;\r\n },\r\n\r\n _widgetCoords: function (event) {\r\n var x, y;\r\n var el = event.target || event.srcElement;\r\n var reference = this.wheel.element[0];\r\n\r\n if (typeof event.offsetX !== \"undefined\") {\r\n // Use offset coordinates and find common offsetParent\r\n var pos = {x: event.offsetX, y: event.offsetY};\r\n\r\n // Send the coordinates upwards through the offsetParent chain.\r\n var e = el;\r\n while (e) {\r\n e.mouseX = pos.x;\r\n e.mouseY = pos.y;\r\n pos.x += e.offsetLeft;\r\n pos.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Look for the coordinates starting from the wheel widget.\r\n var e = reference;\r\n var offset = {x: 0, y: 0};\r\n while (e) {\r\n if (typeof e.mouseX !== \"undefined\") {\r\n x = e.mouseX - offset.x;\r\n y = e.mouseY - offset.y;\r\n break;\r\n }\r\n offset.x += e.offsetLeft;\r\n offset.y += e.offsetTop;\r\n e = e.offsetParent;\r\n }\r\n\r\n // Reset stored coordinates\r\n e = el;\r\n while (e) {\r\n e.mouseX = undefined;\r\n e.mouseY = undefined;\r\n e = e.offsetParent;\r\n }\r\n } else {\r\n // Use absolute coordinates\r\n var pos = this._absolutePosition(reference);\r\n x = (event.pageX || 0) - pos.x;\r\n y = (event.pageY || 0) - pos.y;\r\n }\r\n // Subtract distance to middle\r\n return {x: x - this.constants.WIDTH / 2, y: y - this.constants.WIDTH / 2};\r\n },\r\n\r\n _doMouseMove: function (event) {\r\n var pos = this._widgetCoords(event);\r\n\r\n // Set new HSL parameters\r\n if (this.circleDrag) {\r\n var hue = Math.atan2(pos.x, -pos.y) / 6.28;\r\n if (hue < 0) hue += 1;\r\n this._setHSL([hue, this.hsl[1], this.hsl[2]]);\r\n } else {\r\n var sat = Math.max(0, Math.min(1, -(pos.x / this.constants.SQUARE) + .5));\r\n var lum = Math.max(0, Math.min(1, -(pos.y / this.constants.SQUARE) + .5));\r\n this._setHSL([this.hsl[0], sat, lum]);\r\n }\r\n },\r\n\r\n doClick: function (event) {\r\n var pos = this._widgetCoords(event);\r\n this.circleDrag = Math.max(Math.abs(pos.x), Math.abs(pos.y)) * 2 > this.constants.SQUARE;\r\n\r\n // Process\r\n this._doMouseMove(event);\r\n return false;\r\n },\r\n\r\n setValue: function (color) {\r\n this._setColor(color);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n }\r\n});\r\nBI.Farbtastic.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.farbtastic\", BI.Farbtastic);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubbleCombo\r\n * @extends BI.Widget\r\n */\r\nBI.BubbleCombo = BI.inherit(BI.Widget, {\r\n _const: {\r\n TRIANGLE_LENGTH: 6\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubbleCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-bubble-combo\",\r\n trigger: \"click\",\r\n toggle: true,\r\n direction: \"bottom,left\", // top||bottom||left||right||top,left||top,right||bottom,left||bottom,right\r\n isDefaultInit: false,\r\n destroyWhenHide: false,\r\n isNeedAdjustHeight: true, // 是否需要高度调整\r\n isNeedAdjustWidth: true,\r\n stopPropagation: false,\r\n adjustLength: 0, // 调整的距离\r\n // adjustXOffset: 0,\r\n // adjustYOffset: 10,\r\n hideChecker: BI.emptyFn,\r\n offsetStyle: \"left\", // left,right,center\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n _init: function () {\r\n BI.BubbleCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n container: o.container,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n destroyWhenHide: o.destroyWhenHide,\r\n isNeedAdjustHeight: o.isNeedAdjustHeight,\r\n isNeedAdjustWidth: o.isNeedAdjustWidth,\r\n adjustLength: this._getAdjustLength(),\r\n stopPropagation: o.stopPropagation,\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n hideChecker: o.hideChecker,\r\n offsetStyle: o.offsetStyle,\r\n el: o.el,\r\n popup: BI.extend({\r\n type: \"bi.bubble_popup_view\"\r\n }, o.popup)\r\n });\r\n this.combo.on(BI.Combo.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_TRIGGER_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_EXPAND, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_EXPAND, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_COLLAPSE, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_COLLAPSE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_INIT, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_INIT, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_POPUPVIEW, function () {\r\n self._showTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_POPUPVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n self._hideTriangle();\r\n self.fireEvent(BI.BubbleCombo.EVENT_BEFORE_HIDEVIEW, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n self.fireEvent(BI.BubbleCombo.EVENT_AFTER_HIDEVIEW, arguments);\r\n });\r\n },\r\n\r\n _getAdjustLength: function () {\r\n return this._const.TRIANGLE_LENGTH + this.options.adjustLength;\r\n },\r\n\r\n _createTriangle: function (direction) {\r\n var pos = {}, op = {};\r\n var adjustLength = this.options.adjustLength;\r\n var offset = this.element.offset();\r\n var left = offset.left, right = offset.left + this.element.outerWidth();\r\n var top = offset.top, bottom = offset.top + this.element.outerHeight();\r\n switch (direction) {\r\n case \"left\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: left - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"right\":\r\n pos = {\r\n top: top,\r\n height: this.element.outerHeight(),\r\n left: right + adjustLength\r\n };\r\n op = {width: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"top\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: top - adjustLength - this._const.TRIANGLE_LENGTH\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n case \"bottom\":\r\n pos = {\r\n left: left,\r\n width: this.element.outerWidth(),\r\n top: bottom + adjustLength\r\n };\r\n op = {height: this._const.TRIANGLE_LENGTH};\r\n break;\r\n default:\r\n break;\r\n }\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = BI.createWidget(op, {\r\n type: \"bi.center_adapt\",\r\n cls: \"button-combo-triangle-wrapper\",\r\n items: [{\r\n type: \"bi.layout\",\r\n cls: \"bubble-combo-triangle-\" + direction\r\n }]\r\n });\r\n pos.el = this.triangle;\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [pos]\r\n });\r\n },\r\n\r\n _createLeftTriangle: function () {\r\n this._createTriangle(\"left\");\r\n },\r\n\r\n _createRightTriangle: function () {\r\n this._createTriangle(\"right\");\r\n },\r\n\r\n _createTopTriangle: function () {\r\n this._createTriangle(\"top\");\r\n },\r\n\r\n _createBottomTriangle: function () {\r\n this._createTriangle(\"bottom\");\r\n },\r\n\r\n _showTriangle: function () {\r\n var pos = this.combo.getPopupPosition();\r\n switch (pos.dir) {\r\n case \"left,top\":\r\n case \"left,bottom\":\r\n this._createLeftTriangle();\r\n break;\r\n case \"right,top\":\r\n case \"right,bottom\":\r\n this._createRightTriangle();\r\n break;\r\n case \"top,left\":\r\n case \"top,right\":\r\n this._createTopTriangle();\r\n break;\r\n case \"bottom,left\":\r\n case \"bottom,right\":\r\n this._createBottomTriangle();\r\n break;\r\n }\r\n },\r\n\r\n _hideTriangle: function () {\r\n this.triangle && this.triangle.destroy();\r\n this.triangle = null;\r\n },\r\n\r\n hideView: function () {\r\n this._hideTriangle();\r\n this.combo && this.combo.hideView();\r\n },\r\n\r\n showView: function () {\r\n this.combo && this.combo.showView();\r\n },\r\n\r\n isViewVisible: function () {\r\n return this.combo.isViewVisible();\r\n }\r\n});\r\n\r\nBI.BubbleCombo.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.BubbleCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.BubbleCombo.EVENT_EXPAND = \"EVENT_EXPAND\";\r\nBI.BubbleCombo.EVENT_COLLAPSE = \"EVENT_COLLAPSE\";\r\nBI.BubbleCombo.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\n\r\n\r\nBI.BubbleCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_POPUPVIEW = \"EVENT_AFTER_POPUPVIEW\";\r\nBI.BubbleCombo.EVENT_BEFORE_HIDEVIEW = \"EVENT_BEFORE_HIDEVIEW\";\r\nBI.BubbleCombo.EVENT_AFTER_HIDEVIEW = \"EVENT_AFTER_HIDEVIEW\";\r\nBI.shortcut(\"bi.bubble_combo\", BI.BubbleCombo);/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupView\r\n * @extends BI.PopupView\r\n */\r\nBI.BubblePopupView = BI.inherit(BI.PopupView, {\r\n _defaultConfig: function () {\r\n var config = BI.BubblePopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(config, {\r\n baseCls: config.baseCls + \" bi-bubble-popup-view\",\r\n minWidth: 220,\r\n maxWidth: 300,\r\n minHeight: 90\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupView.superclass._init.apply(this, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.bubble_popup_view\", BI.BubblePopupView);\r\n\r\n/**\r\n * Created by GUY on 2017/2/8.\r\n *\r\n * @class BI.BubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.BubblePopupBarView.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-bubble-bar-popup-view\",\r\n buttons: [{\r\n value: false,\r\n text: BI.i18nText(\"BI-Basic_Cancel\"),\r\n ghost: true\r\n }, {\r\n text: BI.i18nText(BI.i18nText(\"BI-Basic_Sure\")),\r\n value: true\r\n }]\r\n });\r\n },\r\n _init: function () {\r\n BI.BubblePopupBarView.superclass._init.apply(this, arguments);\r\n },\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n\r\n var items = [];\r\n BI.each(o.buttons, function (i, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n items.push(buttonOpt);\r\n } else {\r\n items.push(BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);\r\n }\r\n }, buttonOpt));\r\n }\r\n });\r\n return BI.createWidget({\r\n type: \"bi.center\",\r\n height: 44,\r\n rgap: 15,\r\n items: [{\r\n type: \"bi.right_vertical_adapt\",\r\n lgap: 10,\r\n items: items\r\n }]\r\n });\r\n },\r\n\r\n _createView: function () {\r\n var o = this.options;\r\n\r\n var button = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: [o.el],\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n cls: \"bar-popup-container\",\r\n hgap: 15,\r\n tgap: 10\r\n }]\r\n });\r\n\r\n button.element.css(\"min-height\", o.minHeight - 44);\r\n\r\n return button;\r\n }\r\n});\r\nBI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.bubble_bar_popup_view\", BI.BubblePopupBarView);\r\n\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n *\r\n * @class BI.TextBubblePopupBarView\r\n * @extends BI.BubblePopupView\r\n */\r\nBI.TextBubblePopupBarView = BI.inherit(BI.Widget, {\r\n\r\n props: function () {\r\n return {\r\n baseCls: \"bi-text-bubble-bar-popup-view\",\r\n text: \"\",\r\n buttons: [{\r\n level: \"ignore\",\r\n value: false,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n }, {\r\n value: true,\r\n stopPropagation: true,\r\n text: BI.i18nText(\"BI-Basic_Sure\")\r\n }]\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var buttons = BI.map(o.buttons, function (index, buttonOpt) {\r\n if (BI.isWidget(buttonOpt)) {\r\n return buttonOpt;\r\n }\r\n return BI.extend({\r\n type: \"bi.button\",\r\n height: 24,\r\n handler: function (v) {\r\n self.fireEvent(BI.TextBubblePopupBarView.EVENT_CHANGE, v);\r\n }\r\n }, buttonOpt);\r\n\r\n });\r\n return {\r\n type: \"bi.bubble_bar_popup_view\",\r\n minWidth: o.minWidth,\r\n maxWidth: o.maxWidth,\r\n minHeight: o.minHeight,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n el: {\r\n type: \"bi.label\",\r\n text: o.text,\r\n whiteSpace: \"normal\",\r\n textAlign: \"left\",\r\n ref: function () {\r\n self.text = this;\r\n }\r\n },\r\n buttons: buttons\r\n };\r\n },\r\n\r\n populate: function (v) {\r\n this.text.setText(v || this.options.text);\r\n }\r\n});\r\nBI.TextBubblePopupBarView.EVENT_CHANGE = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\nBI.shortcut(\"bi.text_bubble_bar_popup_view\", BI.TextBubblePopupBarView);\r\n/**\r\n * Created by Young's on 2016/4/28.\r\n */\r\nBI.EditorIconCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.EditorIconCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseClass: \"bi-check-editor-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.EditorIconCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.editor_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n value: o.value\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_CHANGE, function () {\r\n self.popup.setValue(this.getValue());\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_FOCUS, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_EMPTY, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_VALID, arguments);\r\n });\r\n this.trigger.on(BI.EditorTrigger.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_ERROR, arguments);\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.editorIconCheckCombo.hideView();\r\n self.fireEvent(BI.EditorIconCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editorIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.editorIconCheckCombo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.trigger.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.editorIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.EditorIconCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorIconCheckCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorIconCheckCombo.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorIconCheckCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorIconCheckCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_icon_check_combo\", BI.EditorIconCheckCombo);\r\n/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconCombo\r\n * @extend BI.Widget\r\n */\r\nBI.IconCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-combo\",\r\n width: 24,\r\n height: 24,\r\n el: {},\r\n popup: {},\r\n minWidth: 100,\r\n maxWidth: \"auto\",\r\n maxHeight: 300,\r\n direction: \"bottom\",\r\n adjustLength: 3, // 调整的距离\r\n adjustXOffset: 0,\r\n adjustYOffset: 0,\r\n offsetStyle: \"left\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.icon_combo_trigger\",\r\n iconCls: o.iconCls,\r\n title: o.title,\r\n items: o.items,\r\n width: o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget(o.popup, {\r\n type: \"bi.icon_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.iconCombo.hideView();\r\n self.fireEvent(BI.IconCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.iconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n direction: o.direction,\r\n trigger: o.trigger,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n adjustXOffset: o.adjustXOffset,\r\n adjustYOffset: o.adjustYOffset,\r\n offsetStyle: o.offsetStyle,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxWidth: o.maxWidth,\r\n maxHeight: o.maxHeight,\r\n minWidth: o.minWidth\r\n }\r\n });\r\n },\r\n\r\n showView: function () {\r\n this.iconCombo.showView();\r\n },\r\n\r\n hideView: function () {\r\n this.iconCombo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.iconCombo.populate(items);\r\n }\r\n});\r\nBI.IconCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo\", BI.IconCombo);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboPopup\r\n * @extend BI.Pane\r\n */\r\nBI.IconComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi.icon-combo-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.IconComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_popup\", BI.IconComboPopup);/**\r\n * Created by GUY on 2016/2/2.\r\n *\r\n * @class BI.IconComboTrigger\r\n * @extend BI.Widget\r\n */\r\nBI.IconComboTrigger = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconComboTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-icon-combo-trigger\",\r\n el: {},\r\n items: [],\r\n iconCls: \"\",\r\n width: 24,\r\n height: 24,\r\n isShowDown: true,\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconComboTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n var iconCls = \"\";\r\n if(BI.isKey(o.value)){\r\n iconCls = this._digest(o.value, o.items);\r\n }\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: iconCls,\r\n disableSelected: true,\r\n width: o.isShowDown ? o.width - 12 : o.width,\r\n height: o.height,\r\n iconWidth: o.iconWidth,\r\n iconHeight: o.iconHeight,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n disableSelected: true,\r\n cls: \"icon-combo-down-icon trigger-triangle-font font-size-12\",\r\n width: 12,\r\n height: 8,\r\n selected: BI.isNotEmptyString(iconCls)\r\n });\r\n this.down.setVisible(o.isShowDown);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.button,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: this.down,\r\n right: 3,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _digest: function (v, items) {\r\n var iconCls = \"\";\r\n v = BI.isArray(v) ? v[0] : v;\r\n BI.any(items, function (i, item) {\r\n if (v === item.value) {\r\n iconCls = item.iconCls;\r\n return true;\r\n }\r\n });\r\n return iconCls;\r\n },\r\n\r\n populate: function (items) {\r\n var o = this.options;\r\n this.options.items = items || [];\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n },\r\n\r\n setValue: function (v) {\r\n BI.IconComboTrigger.superclass.setValue.apply(this, arguments);\r\n var o = this.options;\r\n var iconCls = this._digest(v, this.options.items);\r\n v = BI.isArray(v) ? v[0] : v;\r\n if (BI.isNotEmptyString(iconCls)) {\r\n this.button.setIcon(iconCls);\r\n this.button.setSelected(true);\r\n this.down.setSelected(true);\r\n } else {\r\n this.button.setIcon(o.iconCls);\r\n this.button.setSelected(false);\r\n this.down.setSelected(false);\r\n }\r\n }\r\n});\r\nBI.IconComboTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_combo_trigger\", BI.IconComboTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n * combo : icon + text + icon, popup : icon + text\r\n */\r\nBI.IconTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-value-combo\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_icon_text_trigger\",\r\n cls: \"icon-text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n iconCls: o.iconCls,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n title: o.title,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.icon_text_value_combo_popup\",\r\n items: o.items,\r\n value: o.value,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n this.popup.on(BI.IconTextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.IconTextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.options.tipType = \"warning\";\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.IconTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo\", BI.IconTextValueCombo);\r\n/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.IconTextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-text-icon-popup\",\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: o.behaviors,\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.IconTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items, keyword) {\r\n BI.IconTextValueComboPopup.superclass.populate.apply(this, arguments);\r\n var o = this.options;\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_icon_text_item\",\r\n height: 24,\r\n iconWrapperWidth: o.iconWrapperWidth,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.IconTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.icon_text_value_combo_popup\", BI.IconTextValueComboPopup);\r\n/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n tipType: \"\",\r\n warningTitle: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n adjustLength: 2,\r\n toggle: false,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n el: {\r\n type: \"bi.search_text_value_trigger\",\r\n cls: \"search-text-value-trigger\",\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n items: o.items,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.SearchTextValueTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: o.value,\r\n items: o.items,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.getSearcher().setAdapter(self.popup);\r\n },\r\n listeners: [{\r\n eventName: BI.TextValueComboPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n value: o.value,\r\n maxHeight: 252,\r\n minHeight: 25\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function () {\r\n self.triggerBtn = this;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n var o = this.options;\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"warning\");\r\n } else {\r\n this.element.removeClass(\"combo-error\");\r\n this.trigger.attr(\"tipType\", \"success\");\r\n }\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.combo.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n }\r\n});\r\nBI.SearchTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchTextValueCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.search_text_value_combo\", BI.SearchTextValueCombo);\r\n/**\r\n * Created by Windy on 2018/2/5.\r\n */\r\nBI.SearchTextValueComboPopup = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-search-text-value-popup\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SearchTextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this.check();\r\n },\r\n\r\n populate: function (find, match, keyword) {\r\n var items = BI.concat(find, match);\r\n BI.SearchTextValueComboPopup.superclass.populate.apply(this, items);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items, keyword);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.SearchTextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_combo_popup\", BI.SearchTextValueComboPopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.SearchTextValueTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: {\r\n extraCls: \"bi-search-text-value-trigger bi-border\",\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value, o.items),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\"\r\n },\r\n popup: {\r\n type: \"bi.search_text_value_combo_popup\",\r\n cls: \"bi-card\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n var finding = BI.Func.getSearchResult(o.items, keyword);\r\n var matched = finding.match, find = finding.find;\r\n callback(find, matched);\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.SearchTextValueTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n },\r\n\r\n _setState: function (v) {\r\n this.editor.setState(v);\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return result.join(\",\");\r\n } else {\r\n return BI.isFunction(o.text) ? o.text() : o.text;\r\n }\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n },\r\n\r\n setValue: function (vals) {\r\n this._setState(this._digest(vals, this.options.items));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.SearchTextValueTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchTextValueTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchTextValueTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchTextValueTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_text_value_trigger\", BI.SearchTextValueTrigger);/**\r\n * @class BI.TextValueCheckCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : check + text\r\n */\r\nBI.TextValueCheckCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-check-combo\",\r\n width: 100,\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_check_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items,\r\n value: o.value\r\n });\r\n this.popup.on(BI.TextValueCheckComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCheckCombo.hideView();\r\n self.fireEvent(BI.TextValueCheckCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCheckCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 300\r\n }\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n setTitle: function (title) {\r\n this.trigger.setTitle(title);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.trigger.setWarningTitle(title);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCheckCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCheckCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo\", BI.TextValueCheckCombo);BI.TextValueCheckComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCheckComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCheckComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: this._formatItems(o.items),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueCheckComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n return BI.map(items, function (i, item) {\r\n return BI.extend({\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item\",\r\n height: 24\r\n }, item);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueCheckComboPopup.superclass.populate.apply(this, arguments);\r\n this.popup.populate(this._formatItems(items));\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueCheckComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_check_combo_popup\", BI.TextValueCheckComboPopup);\r\n/**\r\n * @class BI.TextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.TextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-combo\",\r\n height: 24,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n text: \"\",\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n cls: \"text-value-trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text,\r\n value: o.value,\r\n warningTitle: o.warningTitle\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n value: o.value,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.textIconCombo.hideView();\r\n self.fireEvent(BI.TextValueCombo.EVENT_CHANGE, arguments);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.textIconCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n if(BI.isKey(o.value)) {\r\n this._checkError(o.value);\r\n }\r\n },\r\n\r\n _checkError: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyArray(v) || BI.isEmptyString(v)) {\r\n this.trigger.options.tipType = \"success\";\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.options.items, function (idx, item) {\r\n return BI.contains(v, item.value);\r\n });\r\n if (BI.isNull(result)) {\r\n this.trigger.setTipType(\"warning\");\r\n this.element.removeClass(\"combo-error\").addClass(\"combo-error\");\r\n } else {\r\n this.trigger.setTipType(\"success\");\r\n this.element.removeClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n this._checkError(v);\r\n },\r\n\r\n getValue: function () {\r\n var value = this.popup.getValue();\r\n return BI.isNull(value) ? [] : (BI.isArray(value) ? value : [value]);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.textIconCombo.populate(items);\r\n }\r\n});\r\nBI.TextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo\", BI.TextValueCombo);\r\n/**\r\n * @class BI.SmallTextValueCombo\r\n * @extend BI.Widget\r\n * combo : text + icon, popup : text\r\n * 参见场景dashboard布局方式选择\r\n */\r\nBI.SmallTextValueCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n width: 100,\r\n height: 20,\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n el: {},\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.trigger = BI.createWidget(o.el, {\r\n type: \"bi.small_select_text_trigger\",\r\n items: o.items,\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.popup = BI.createWidget({\r\n type: \"bi.text_value_combo_popup\",\r\n chooseType: o.chooseType,\r\n items: o.items\r\n });\r\n this.popup.on(BI.TextValueComboPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.SmallTextValueCombo.hideView();\r\n self.fireEvent(BI.SmallTextValueCombo.EVENT_CHANGE);\r\n });\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.SmallTextValueCombo = BI.createWidget({\r\n type: \"bi.combo\",\r\n element: this,\r\n container: o.container,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup,\r\n maxHeight: 240,\r\n minHeight: 25\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.SmallTextValueCombo.populate(items);\r\n }\r\n});\r\nBI.SmallTextValueCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.small_text_value_combo\", BI.SmallTextValueCombo);BI.TextValueComboPopup = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueComboPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-icon-popup\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueComboPopup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.single_select_item\",\r\n textAlign: o.textAlign,\r\n height: 24\r\n }),\r\n chooseType: o.chooseType,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.TextValueComboPopup.EVENT_CHANGE, val, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.popup]\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n BI.TextValueComboPopup.superclass.populate.apply(this, arguments);\r\n items = BI.createItems(items, {\r\n type: \"bi.single_select_item\",\r\n height: 24\r\n });\r\n this.popup.populate(items);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.popup.setValue(v);\r\n }\r\n\r\n});\r\nBI.TextValueComboPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_combo_popup\", BI.TextValueComboPopup);/**\r\n * 有清楚按钮的文本框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.ClearEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ClearEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-clear-editor\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: \"\",\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.ClearEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"search-close-h-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n self.fireEvent(BI.ClearEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ClearEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.ClearEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ClearEditor.EVENT_STOP);\r\n });\r\n\r\n if (BI.isKey(o.value)) {\r\n this.clear.visible();\r\n } else {\r\n this.clear.invisible();\r\n }\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n return this.editor.getValue();\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.ClearEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ClearEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ClearEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ClearEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ClearEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ClearEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ClearEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.ClearEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.ClearEditor.EVENT_START = \"EVENT_START\";\r\nBI.ClearEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ClearEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ClearEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ClearEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ClearEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ClearEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ClearEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ClearEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ClearEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.ClearEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.clear_editor\", BI.ClearEditor);/**\r\n * 带标记的文本框\r\n * Created by GUY on 2016/1/25.\r\n * @class BI.ShelterEditor\r\n * @extends BI.Widget\r\n */\r\nBI.ShelterEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.ShelterEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-shelter-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n textAlign: \"left\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ShelterEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"shelter-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: o.hgap\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.text.on(BI.Controller.EVENT_CHANGE, function () {\r\n arguments[2] = self;\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK_LABEL);\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.ShelterEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.ShelterEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.ShelterEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setTextStyle: function (style) {\r\n this.text.setStyle(style);\r\n },\r\n\r\n setValue: function (k) {\r\n var o = this.options;\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.ShelterEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.ShelterEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ShelterEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ShelterEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.ShelterEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.ShelterEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.ShelterEditor.EVENT_START = \"EVENT_START\";\r\nBI.ShelterEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.ShelterEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ShelterEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ShelterEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.ShelterEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.ShelterEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.ShelterEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.ShelterEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.ShelterEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.ShelterEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.shelter_editor\", BI.ShelterEditor);\r\n/**\r\n * 带标记的文本框\r\n * Created by GUY on 2015/8/28.\r\n * @class BI.SignEditor\r\n * @extends BI.Widget\r\n */\r\nBI.SignEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: o.title,\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType,\r\n textAlign: \"left\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SignEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n self.fireEvent(BI.SignEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SignEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this.text.setValue(this.editor.getValue());\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n BI.isKey(o.keyword) && this.text.doRedMark(o.keyword);\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n this._showHint();\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SignEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SignEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SignEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SignEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SignEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SignEditor.EVENT_START = \"EVENT_START\";\r\nBI.SignEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SignEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SignEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SignEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SignEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SignEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SignEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SignEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.sign_editor\", BI.SignEditor);/**\r\n * guy\r\n * 记录状态的输入框\r\n * @class BI.StateEditor\r\n * @extends BI.Single\r\n */\r\nBI.StateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n defaultText: \"\", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\") // 显示值\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.StateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark tip-text-style\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n },\r\n title: BI.isNotNull(o.tipText) ? o.tipText : function () {\r\n var title = \"\";\r\n if (BI.isString(self.stateValue)) {\r\n title = self.stateValue;\r\n }\r\n if (BI.isArray(self.stateValue) && self.stateValue.length === 1) {\r\n title = self.stateValue[0];\r\n }\r\n return title;\r\n },\r\n warningTitle: o.warningTitle,\r\n tipType: o.tipType\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.StateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.StateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.StateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if (BI.isNotNull(o.text)) {\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n if (this.options.disabled === false) {\r\n this._showInput();\r\n this.editor.focus();\r\n }\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n _setText: function (v) {\r\n this.text.setText(v);\r\n this.text.setTitle(v);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.StateEditor.superclass.setValue.apply(this, arguments);\r\n this.stateValue = v;\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this._setText(BI.i18nText(\"BI-Select_All\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this._setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (BI.isString(v)) {\r\n this._setText(v);\r\n // 配置了defaultText才判断标灰,其他情况不标灰\r\n (BI.isKey(o.defaultText) && o.defaultText === v) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n return;\r\n }\r\n if (BI.isArray(v)) {\r\n if (BI.isEmpty(v)) {\r\n this._setText(BI.isKey(o.defaultText) ? o.defaultText : o.text);\r\n BI.isKey(o.defaultText) ? this.text.element.addClass(\"bi-water-mark\") : this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v.length === 1) {\r\n this._setText(v[0]);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.i18nText(\"BI-Select_Part\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.StateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.StateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.StateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.StateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.StateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.StateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.StateEditor.EVENT_START = \"EVENT_START\";\r\nBI.StateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.StateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.StateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.StateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.StateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.StateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.StateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.StateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.StateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.StateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.state_editor\", BI.StateEditor);\r\n/**\r\n * 无限制-已选择状态输入框\r\n * Created by GUY on 2016/5/18.\r\n * @class BI.SimpleStateEditor\r\n * @extends BI.Single\r\n */\r\nBI.SimpleStateEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SimpleStateEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-simple-state-editor\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n mouseOut: false,\r\n allowBlank: true,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24,\r\n text: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SimpleStateEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"bi-water-mark\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n height: o.height,\r\n hgap: o.hgap,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.setValue(\"\");\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_BLUR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CLICK, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_KEY_DOWN, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_START, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_PAUSE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_STOP, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_SPACE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_ENTER, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_RESTRICT, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.SimpleStateEditor.EVENT_EMPTY, arguments);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n if(BI.isNotNull(o.text)){\r\n this.setState(o.text);\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n _setText: function (v) {\r\n this.text.setText(v);\r\n this.text.setTitle(v);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (k) {\r\n this.editor.setValue(k);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getValue().match(/[^\\s]+/g);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n BI.SimpleStateEditor.superclass.setValue.apply(this, arguments);\r\n if (BI.isNumber(v)) {\r\n if (v === BI.Selection.All) {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (v === BI.Selection.Multi) {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n }\r\n return;\r\n }\r\n if (!BI.isArray(v) || v.length === 1) {\r\n this._setText(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n } else if (BI.isEmpty(v)) {\r\n this._setText(o.text);\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n this._setText(BI.i18nText(\"BI-Already_Selected\"));\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n }\r\n});\r\nBI.SimpleStateEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SimpleStateEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SimpleStateEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SimpleStateEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SimpleStateEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SimpleStateEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.SimpleStateEditor.EVENT_START = \"EVENT_START\";\r\nBI.SimpleStateEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SimpleStateEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SimpleStateEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SimpleStateEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SimpleStateEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SimpleStateEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SimpleStateEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SimpleStateEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SimpleStateEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.simple_state_editor\", BI.SimpleStateEditor);/**\r\n * 下拉框弹出层的多选版本,toolbar带有若干按钮, zIndex在1000w\r\n * @class BI.MultiPopupView\r\n * @extends BI.Widget\r\n */\r\n\r\nBI.MultiPopupView = BI.inherit(BI.PopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.MultiPopupView.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n _baseCls: (conf._baseCls || \"\") + \" bi-multi-list-view\",\r\n buttons: [BI.i18nText(\"BI-Basic_Sure\")]\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiPopupView.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createToolBar: function () {\r\n var o = this.options, self = this;\r\n if (o.buttons.length === 0) {\r\n return;\r\n }\r\n\r\n var text = []; // 构造[{text:content},……]\r\n BI.each(o.buttons, function (idx, item) {\r\n text.push({\r\n text: item,\r\n value: idx\r\n });\r\n });\r\n\r\n this.buttongroup = BI.createWidget({\r\n type: \"bi.button_group\",\r\n cls: \"list-view-toolbar bi-high-light bi-split-top\",\r\n height: 24,\r\n items: BI.createItems(text, {\r\n type: \"bi.text_button\",\r\n once: false,\r\n shadow: true,\r\n isShadowShowingOnSelected: true\r\n }),\r\n layouts: [{\r\n type: \"bi.center\",\r\n hgap: 0,\r\n vgap: 0\r\n }]\r\n });\r\n\r\n this.buttongroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, value, obj);\r\n });\r\n\r\n return this.buttongroup;\r\n }\r\n\r\n});\r\n\r\nBI.MultiPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.multi_popup_view\", BI.MultiPopupView);/**\r\n * 可以理解为MultiPopupView和Panel两个面板的结合体\r\n * @class BI.PopupPanel\r\n * @extends BI.MultiPopupView\r\n */\r\n\r\nBI.PopupPanel = BI.inherit(BI.MultiPopupView, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.PopupPanel.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-popup-panel\",\r\n title: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.PopupPanel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _createTool: function () {\r\n var self = this, o = this.options;\r\n var close = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"close-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n close.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setVisible(false);\r\n self.fireEvent(BI.PopupPanel.EVENT_CLOSE);\r\n });\r\n return BI.createWidget({\r\n type: \"bi.htape\",\r\n cls: \"popup-panel-title bi-header-background\",\r\n height: 25,\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n text: o.title,\r\n height: 25,\r\n lgap: 10\r\n }\r\n }, {\r\n el: close,\r\n width: 25\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.PopupPanel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.PopupPanel.EVENT_CLOSE = \"EVENT_CLOSE\";\r\nBI.PopupPanel.EVENT_CLICK_TOOLBAR_BUTTON = \"EVENT_CLICK_TOOLBAR_BUTTON\";\r\n\r\nBI.shortcut(\"bi.popup_panel\", BI.PopupPanel);/**\r\n * list面板\r\n *\r\n * Created by GUY on 2015/10/30.\r\n * @class BI.ListPane\r\n * @extends BI.Pane\r\n */\r\nBI.ListPane = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.ListPane.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-list-pane\",\r\n logic: {\r\n dynamic: true\r\n },\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n vgap: 0,\r\n hgap: 0,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.button_group\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.ListPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {},\r\n items: o.items,\r\n itemsCreator: function (op, calback) {\r\n if (op.times === 1) {\r\n self.empty();\r\n BI.nextTick(function () {\r\n self.loading();\r\n });\r\n }\r\n o.itemsCreator(op, function () {\r\n calback.apply(self, arguments);\r\n op.times === 1 && BI.nextTick(function () {\r\n self.loaded();\r\n // callback可能在loading之前执行, check保证显示正确\r\n self.check();\r\n });\r\n });\r\n },\r\n hasNext: o.hasNext,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListPane.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n this.check();\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n vgap: o.vgap,\r\n hgap: o.hgap\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n },\r\n\r\n hasPrev: function () {\r\n return this.button_group.hasPrev && this.button_group.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.button_group.hasNext && this.button_group.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.options.items = items.concat(this.options.items);\r\n this.button_group.prependItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n addItems: function (items) {\r\n this.options.items = this.options.items.concat(items);\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n removeItemAt: function (indexes) {\r\n indexes = indexes || [];\r\n BI.removeAt(this.options.items, indexes);\r\n this.button_group.removeItemAt.apply(this.button_group, arguments);\r\n this.check();\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(this.button_group.attr(\"itemsCreator\")))) {// 接管loader的populate方法\r\n this.button_group.attr(\"itemsCreator\").apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n }]);\r\n return;\r\n }\r\n BI.ListPane.superclass.populate.apply(this, arguments);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_pane\", BI.ListPane);/**\r\n * 带有标题栏的pane\r\n * @class BI.Panel\r\n * @extends BI.Widget\r\n */\r\nBI.Panel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Panel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-panel bi-border\",\r\n title: \"\",\r\n titleButtons: [],\r\n el: {},\r\n logic: {\r\n dynamic: false\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.Panel.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"vertical\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"top\", this._createTitle()\r\n , this.options.el)\r\n }))));\r\n },\r\n\r\n _createTitle: function () {\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"panel-title-text\",\r\n text: o.title,\r\n height: 30\r\n });\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n items: o.titleButtons,\r\n layouts: [{\r\n type: \"bi.center_adapt\",\r\n lgap: 10\r\n }]\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.button_group.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Panel.EVENT_CHANGE, value, obj);\r\n });\r\n\r\n return {\r\n el: {\r\n type: \"bi.left_right_vertical_adapt\",\r\n cls: \"panel-title bi-header-background bi-border-bottom\",\r\n height: 29,\r\n items: {\r\n left: [this.text],\r\n right: [this.button_group]\r\n },\r\n lhgap: 10,\r\n rhgap: 10\r\n },\r\n height: 29\r\n };\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setValue(title);\r\n }\r\n});\r\nBI.Panel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.panel\", BI.Panel);\r\nBI.LinearSegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n props: {\r\n extraCls: \"bi-line-segment-button bi-list-item-effect\",\r\n once: true,\r\n readonly: true,\r\n hgap: 10,\r\n height: 25\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return [{\r\n type: \"bi.label\",\r\n text: o.text,\r\n height: o.height,\r\n value: o.value,\r\n hgap: o.hgap,\r\n ref: function () {\r\n self.text = this;\r\n }\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"line-segment-button-line\",\r\n height: 2,\r\n ref: function () {\r\n self.line = this;\r\n }\r\n },\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n }];\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.LinearSegmentButton.superclass.setSelected.apply(this, arguments);\r\n if (v) {\r\n this.line.element.addClass(\"bi-high-light-background\");\r\n } else {\r\n this.line.element.removeClass(\"bi-high-light-background\");\r\n }\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment_button\", BI.LinearSegmentButton);BI.LinearSegment = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-linear-segment bi-split-bottom\",\r\n items: [],\r\n layouts: [{\r\n type: \"bi.center\"\r\n }],\r\n height: 29\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.button_group\",\r\n items: BI.createItems(o.items, {\r\n type: \"bi.linear_segment_button\",\r\n height: o.height - 1\r\n }),\r\n layouts: o.layouts,\r\n listeners: [{\r\n eventName: \"__EVENT_CHANGE__\",\r\n action: function () {\r\n self.fireEvent(\"__EVENT_CHANGE__\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.buttonGroup = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.shortcut(\"bi.linear_segment\", BI.LinearSegment);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n iconWrapperWidth: 36\r\n },\r\n el: {\r\n type: \"bi.list_pane\"\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 全选\r\n this.toolbar = BI.createWidget(o.toolbar);\r\n this.allSelected = false;\r\n this.toolbar.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.allSelected = this.isSelected();\r\n if (type === BI.Events.CLICK) {\r\n self.setAllSelected(self.allSelected);\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);\r\n }\r\n self._checkAllSelected();\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self._checkAllSelected();\r\n self.fireEvent(BI.SelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(o.direction, this.toolbar, this.list)\r\n }))));\r\n\r\n if (o.items.length <= 0) {\r\n this.toolbar.setVisible(false);\r\n this.toolbar.setEnable(false);\r\n }\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkAllSelected: function () {\r\n var selectLength = this.list.getValue().length;\r\n var notSelectLength = this.getAllLeaves().length - selectLength;\r\n var hasNext = this.list.hasNext();\r\n var isAlreadyAllSelected = this.toolbar.isSelected();\r\n var isHalf = selectLength > 0 && (notSelectLength > 0 || (!isAlreadyAllSelected && hasNext));\r\n isHalf = isHalf || (notSelectLength > 0 && hasNext && isAlreadyAllSelected);\r\n this.toolbar.setHalfSelected(isHalf);\r\n !isHalf && this.toolbar.setSelected(selectLength > 0 && notSelectLength <= 0 && (!hasNext || isAlreadyAllSelected));\r\n },\r\n\r\n setAllSelected: function (v) {\r\n BI.each(this.getAllButtons(), function (i, btn) {\r\n (btn.setSelected || btn.setAllSelected).apply(btn, [v]);\r\n });\r\n this.allSelected = !!v;\r\n this.toolbar.setSelected(v);\r\n this.toolbar.setHalfSelected(false);\r\n },\r\n\r\n setToolBarVisible: function (b) {\r\n this.toolbar.setVisible(b);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.allSelected;\r\n // return this.toolbar.isSelected();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (data) {\r\n var selectAll = data.type === BI.ButtonGroup.CHOOSE_TYPE_ALL;\r\n this.setAllSelected(selectAll);\r\n this.list[selectAll ? \"setNotSelectedValue\" : \"setValue\"](data.value);\r\n this._checkAllSelected();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isAllSelected() === false) {\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n value: this.list.getValue(),\r\n assist: this.list.getNotSelectedValue()\r\n };\r\n }\r\n return {\r\n type: BI.ButtonGroup.CHOOSE_TYPE_ALL,\r\n value: this.list.getNotSelectedValue(),\r\n assist: this.list.getValue()\r\n };\r\n\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.toolbar.setVisible(!BI.isEmptyArray(items));\r\n this.toolbar.setEnable(this.isEnabled() && !BI.isEmptyArray(items));\r\n this.list.populate.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.SelectList.superclass._setEnable.apply(this, arguments);\r\n this.toolbar.setEnable(enable);\r\n },\r\n\r\n resetHeight: function (h) {\r\n var toolHeight = ( this.toolbar.element.outerHeight() || 25) * ( this.toolbar.isVisible() ? 1 : 0);\r\n this.list.resetHeight ? this.list.resetHeight(h - toolHeight) :\r\n this.list.element.css({\"max-height\": h - toolHeight + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n this._checkAllSelected();\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_list\", BI.SelectList);/**\r\n * Created by roy on 15/11/6.\r\n */\r\nBI.LazyLoader = BI.inherit(BI.Widget, {\r\n _const: {\r\n PAGE: 100\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LazyLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-lazy-loader\",\r\n el: {},\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.LazyLoader.superclass._init.apply(this, arguments);\r\n var all = o.items.length;\r\n this.loader = BI.createWidget({\r\n type: \"bi.loader\",\r\n element: this,\r\n // 下面是button_group的属性\r\n el: o.el,\r\n\r\n itemsCreator: function (options, populate) {\r\n populate(self._getNextItems(options));\r\n },\r\n hasNext: function (option) {\r\n return option.count < all;\r\n }\r\n });\r\n\r\n this.loader.on(BI.Loader.EVENT_CHANGE, function (obj) {\r\n self.fireEvent(BI.LazyLoader.EVENT_CHANGE, obj);\r\n });\r\n },\r\n _getNextItems: function (options) {\r\n var self = this, o = this.options;\r\n var lastNum = o.items.length - this._const.PAGE * (options.times - 1);\r\n var lastItems = BI.takeRight(o.items, lastNum);\r\n var nextItems = BI.take(lastItems, this._const.PAGE);\r\n return nextItems;\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate(items);\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue.apply(this.loader, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n }\r\n});\r\nBI.LazyLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.lazy_loader\", BI.LazyLoader);/**\r\n * 恶心的加载控件, 为解决排序问题引入的控件\r\n *\r\n * Created by GUY on 2015/11/12.\r\n * @class BI.ListLoader\r\n * @extends BI.Widget\r\n */\r\nBI.ListLoader = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-loader\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n });\r\n },\r\n\r\n _nextLoad: function () {\r\n var self = this, o = this.options;\r\n this.next.setLoading();\r\n o.itemsCreator.apply(this, [{times: ++this.times}, function () {\r\n self.next.setLoaded();\r\n self.addItems.apply(self, arguments);\r\n }]);\r\n },\r\n\r\n _init: function () {\r\n BI.ListLoader.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (o.itemsCreator === false) {\r\n o.next = false;\r\n }\r\n\r\n this.button_group = BI.createWidget(o.el, {\r\n type: \"bi.button_group\",\r\n element: this,\r\n chooseType: 0,\r\n items: o.items,\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.ListLoader.EVENT_CHANGE, obj);\r\n }\r\n });\r\n\r\n if (o.next !== false) {\r\n this.next = BI.createWidget(BI.extend({\r\n type: \"bi.loading_bar\"\r\n }, o.next));\r\n this.next.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self._nextLoad();\r\n }\r\n });\r\n }\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.next]\r\n });\r\n\r\n o.isDefaultInit && BI.isEmpty(o.items) && BI.nextTick(BI.bind(function () {\r\n this.populate();\r\n }, this));\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate(o.items);\r\n }\r\n },\r\n\r\n hasNext: function () {\r\n var o = this.options;\r\n if (BI.isNumber(o.count)) {\r\n return this.count < o.count;\r\n }\r\n return !!o.hasNext.apply(this, [{\r\n times: this.times,\r\n count: this.count\r\n }]);\r\n },\r\n\r\n addItems: function (items) {\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n this.options.items = this.options.items.concat(items);\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.setEnd();\r\n }\r\n }\r\n this.button_group.addItems.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n populate: function (items) {\r\n var self = this, o = this.options;\r\n if (arguments.length === 0 && (BI.isFunction(o.itemsCreator))) {\r\n o.itemsCreator.apply(this, [{times: 1}, function () {\r\n if (arguments.length === 0) {\r\n throw new Error(\"参数不能为空\");\r\n }\r\n self.populate.apply(self, arguments);\r\n o.onLoaded();\r\n }]);\r\n return;\r\n }\r\n this.options.items = items;\r\n this.times = 1;\r\n this.count = 0;\r\n this.count += items.length;\r\n if (BI.isObject(this.next)) {\r\n if (this.hasNext()) {\r\n this.next.setLoaded();\r\n } else {\r\n this.next.invisible();\r\n }\r\n }\r\n BI.DOM.hang([this.next]);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n this.next.element.appendTo(this.element);\r\n },\r\n\r\n empty: function () {\r\n BI.DOM.hang([this.next]);\r\n this.button_group.empty();\r\n this.next.element.appendTo(this.element);\r\n BI.each([this.next], function (i, ob) {\r\n ob && ob.setVisible(false);\r\n });\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.button_group.setNotSelectedValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.button_group.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.button_group.setValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue.apply(this.button_group, arguments);\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.button_group.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.button_group.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.button_group.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.button_group.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.button_group.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.button_group.getNodeByValue(value);\r\n }\r\n});\r\nBI.ListLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.list_loader\", BI.ListLoader);/**\r\n * Created by GUY on 2016/4/29.\r\n *\r\n * @class BI.SortList\r\n * @extends BI.Widget\r\n */\r\nBI.SortList = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SortList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-sort-list\",\r\n\r\n isDefaultInit: true, // 是否默认初始化数据\r\n\r\n // 下面是button_group的属性\r\n el: {\r\n type: \"bi.button_group\"\r\n },\r\n\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n\r\n // 下面是分页信息\r\n count: false,\r\n next: {},\r\n hasNext: BI.emptyFn\r\n\r\n // containment: this.element,\r\n // connectWith: \".bi-sort-list\",\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SortList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.loader = BI.createWidget({\r\n type: \"bi.list_loader\",\r\n element: this,\r\n isDefaultInit: o.isDefaultInit,\r\n el: o.el,\r\n items: this._formatItems(o.items),\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (items) {\r\n callback(self._formatItems(items));\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n count: o.count,\r\n next: o.next,\r\n hasNext: o.hasNext\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE, value, obj);\r\n }\r\n });\r\n\r\n this.loader.element.sortable({\r\n containment: o.containment || this.element,\r\n connectWith: o.connectWith || \".bi-sort-list\",\r\n items: \".sort-item\",\r\n cursor: o.cursor || \"drag\",\r\n tolerance: o.tolerance || \"intersect\",\r\n placeholder: {\r\n element: function ($currentItem) {\r\n var holder = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"bi-sortable-holder\",\r\n height: $currentItem.outerHeight()\r\n });\r\n holder.element.css({\r\n \"margin-left\": $currentItem.css(\"margin-left\"),\r\n \"margin-right\": $currentItem.css(\"margin-right\"),\r\n \"margin-top\": $currentItem.css(\"margin-top\"),\r\n \"margin-bottom\": $currentItem.css(\"margin-bottom\"),\r\n margin: $currentItem.css(\"margin\")\r\n });\r\n return holder.element;\r\n },\r\n update: function () {\r\n\r\n }\r\n },\r\n start: function (event, ui) {\r\n\r\n },\r\n stop: function (event, ui) {\r\n self.fireEvent(BI.SortList.EVENT_CHANGE);\r\n },\r\n over: function (event, ui) {\r\n\r\n }\r\n });\r\n },\r\n\r\n _formatItems: function (items) {\r\n BI.each(items, function (i, item) {\r\n item = BI.stripEL(item);\r\n item.cls = item.cls ? item.cls + \" sort-item\" : \"sort-item\";\r\n item.attributes = {\r\n sorted: item.value\r\n };\r\n });\r\n return items;\r\n },\r\n\r\n hasNext: function () {\r\n return this.loader.hasNext();\r\n },\r\n\r\n addItems: function (items) {\r\n this.loader.addItems(items);\r\n },\r\n\r\n populate: function (items) {\r\n if (items) {\r\n arguments[0] = this._formatItems(items);\r\n }\r\n this.loader.populate.apply(this.loader, arguments);\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.loader.setNotSelectedValue.apply(this.loader, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.loader.getNotSelectedValue();\r\n },\r\n\r\n setValue: function () {\r\n this.loader.setValue.apply(this.loader, arguments);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.loader.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.loader.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.loader.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.loader.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.loader.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.loader.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.loader.getNodeByValue(value);\r\n },\r\n\r\n getSortedValues: function () {\r\n return this.loader.element.sortable(\"toArray\", {attribute: \"sorted\"});\r\n }\r\n});\r\nBI.SortList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.sort_list\", BI.SortList);\r\n/**\r\n * author: young\r\n * createdDate: 2018/12/18\r\n * description:\r\n */\r\nBI.LoadingPane = BI.inherit(BI.Pane, {\r\n _mount: function () {\r\n var isMounted = BI.Pane.superclass._mount.apply(this, arguments);\r\n if (isMounted) {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.loading();\r\n this.beforeInit(BI.bind(this.__loaded, this));\r\n }\r\n }\r\n },\r\n\r\n _initRender: function () {\r\n if (this.beforeInit) {\r\n this.__async = true;\r\n } else {\r\n this._render();\r\n }\r\n },\r\n\r\n __loaded: function () {\r\n this.__asking = false;\r\n this.loaded();\r\n this._render();\r\n }\r\n});/**\r\n * 有总页数和总行数的分页控件\r\n * Created by Young's on 2016/10/13.\r\n */\r\nBI.AllCountPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllCountPager.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-all-count-pager\",\r\n pagerDirection: \"vertical\", // 翻页按钮方向,可选值:vertical/horizontal\r\n height: 24,\r\n pages: 1, // 必选项\r\n curr: 1, // 初始化当前页, pages为数字时可用,\r\n count: 1 // 总行数\r\n });\r\n },\r\n _init: function () {\r\n BI.AllCountPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, pagerIconCls = this._getPagerIconCls();\r\n this.editor = BI.createWidget({\r\n type: \"bi.small_text_editor\",\r\n cls: \"pager-editor bi-border-radius\",\r\n validationChecker: function (v) {\r\n return (self.rowCount.getValue() === 0 && v === \"0\") || BI.isPositiveInteger(v);\r\n },\r\n hgap: 4,\r\n vgap: 0,\r\n value: o.curr,\r\n errorText: BI.i18nText(\"BI-Please_Input_Positive_Integer\"),\r\n width: 40,\r\n height: 24,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.pager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 58,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n lgap: 5\r\n }],\r\n\r\n dynamicShow: false,\r\n pages: o.pages,\r\n curr: o.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Previous_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-prev bi-list-item-select2 \" + pagerIconCls.preCls\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Next_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius all-pager-next bi-list-item-select2 \" + pagerIconCls.nextCls\r\n },\r\n\r\n hasPrev: o.hasPrev,\r\n hasNext: o.hasNext,\r\n firstPage: o.firstPage,\r\n lastPage: o.lastPage,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.pager.setValue(BI.parseInt(self.editor.getValue()));\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllCountPager.EVENT_CHANGE);\r\n });\r\n this.pager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.editor.setValue(self.pager.getCurrentPage());\r\n });\r\n\r\n this.allPages = BI.createWidget({\r\n type: \"bi.label\",\r\n title: o.pages,\r\n text: \"/\" + o.pages,\r\n lgap: 5,\r\n invisible: o.pages <= 1\r\n });\r\n\r\n this.rowCount = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"row-count\",\r\n height: o.height,\r\n hgap: 5,\r\n text: o.count,\r\n title: o.count\r\n });\r\n\r\n var count = BI.createWidget({\r\n type: \"bi.left\",\r\n height: o.height,\r\n scrollable: false,\r\n items: [{\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Basic_Total\"),\r\n width: 15\r\n }, this.rowCount, {\r\n type: \"bi.label\",\r\n height: o.height,\r\n text: BI.i18nText(\"BI-Tiao_Data\"),\r\n width: 50,\r\n textAlign: \"left\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.left_right_vertical_adapt\",\r\n element: this,\r\n items: {\r\n left: [count],\r\n right: [this.editor, this.allPages, this.pager]\r\n }\r\n });\r\n },\r\n\r\n alwaysShowPager: true,\r\n\r\n _getPagerIconCls: function () {\r\n var o = this.options;\r\n switch (o.pagerDirection) {\r\n case \"horizontal\":\r\n return {\r\n preCls: \"row-pre-page-h-font \",\r\n nextCls: \"row-next-page-h-font \"\r\n };\r\n case \"vertical\":\r\n default:\r\n return {\r\n preCls: \"column-pre-page-h-font \",\r\n nextCls: \"column-next-page-h-font \"\r\n };\r\n }\r\n },\r\n\r\n setAllPages: function (v) {\r\n this.allPages.setText(\"/\" + v);\r\n this.allPages.setTitle(v);\r\n this.options.pages = v;\r\n this.pager.setAllPages(v);\r\n this.editor.setEnable(v >= 1);\r\n this.setPagerVisible(v > 1);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setVPage: function (v) {\r\n this.pager.setValue(v);\r\n },\r\n\r\n setCount: function (count) {\r\n this.rowCount.setText(count);\r\n this.rowCount.setTitle(count);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.pager.getCurrentPage();\r\n },\r\n\r\n hasPrev: function () {\r\n return this.pager.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.pager.hasNext();\r\n },\r\n\r\n setPagerVisible: function (b) {\r\n this.editor.setVisible(b);\r\n this.allPages.setVisible(b);\r\n this.pager.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.pager.populate();\r\n this.setPagerVisible(this.options.pages > 1);\r\n }\r\n});\r\nBI.AllCountPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_count_pager\", BI.AllCountPager);/**\r\n * 显示页码的分页控件\r\n *\r\n * Created by GUY on 2016/6/30.\r\n * @class BI.DirectionPager\r\n * @extends BI.Widget\r\n */\r\nBI.DirectionPager = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DirectionPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-direction-pager\",\r\n height: 24,\r\n horizontal: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n },\r\n vertical: {\r\n pages: false, // 总页数\r\n curr: 1, // 初始化当前页, pages为数字时可用\r\n\r\n hasPrev: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n firstPage: 1,\r\n lastPage: BI.emptyFn\r\n }\r\n });\r\n },\r\n _init: function () {\r\n BI.DirectionPager.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var v = o.vertical, h = o.horizontal;\r\n this._createVPager();\r\n this._createHPager();\r\n this.layout = BI.createWidget({\r\n type: \"bi.absolute\",\r\n scrollable: false,\r\n element: this,\r\n items: [{\r\n el: this.vpager,\r\n top: 0,\r\n right: 86\r\n }, {\r\n el: this.vlabel,\r\n top: 0,\r\n right: 110\r\n }, {\r\n el: this.hpager,\r\n top: 0,\r\n right: 0\r\n }, {\r\n el: this.hlabel,\r\n top: 0,\r\n right: 24\r\n }]\r\n });\r\n },\r\n\r\n _createVPager: function () {\r\n var self = this, o = this.options;\r\n var v = o.vertical;\r\n this.vlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: v.curr,\r\n title: v.curr,\r\n invisible: true\r\n });\r\n this.vpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: v.pages,\r\n curr: v.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Up_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev column-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Down_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next column-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: v.hasPrev,\r\n hasNext: v.hasNext,\r\n firstPage: v.firstPage,\r\n lastPage: v.lastPage\r\n });\r\n\r\n this.vpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.vpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.vlabel.setValue(this.getCurrentPage());\r\n self.vlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n _createHPager: function () {\r\n var self = this, o = this.options;\r\n var h = o.horizontal;\r\n this.hlabel = BI.createWidget({\r\n type: \"bi.label\",\r\n width: 24,\r\n height: 24,\r\n value: h.curr,\r\n title: h.curr,\r\n invisible: true\r\n });\r\n this.hpager = BI.createWidget({\r\n type: \"bi.pager\",\r\n width: 72,\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n scrollx: false,\r\n rgap: 24\r\n }],\r\n invisible: true,\r\n\r\n dynamicShow: false,\r\n pages: h.pages,\r\n curr: h.curr,\r\n groups: 0,\r\n\r\n first: false,\r\n last: false,\r\n prev: {\r\n type: \"bi.icon_button\",\r\n value: \"prev\",\r\n title: BI.i18nText(\"BI-Left_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_First_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-prev row-pre-page-h-font bi-list-item-select2\"\r\n },\r\n next: {\r\n type: \"bi.icon_button\",\r\n value: \"next\",\r\n title: BI.i18nText(\"BI-Right_Page\"),\r\n warningTitle: BI.i18nText(\"BI-Current_Is_Last_Page\"),\r\n height: 22,\r\n width: 22,\r\n cls: \"bi-border bi-border-radius direction-pager-next row-next-page-h-font bi-list-item-select2\"\r\n },\r\n\r\n hasPrev: h.hasPrev,\r\n hasNext: h.hasNext,\r\n firstPage: h.firstPage,\r\n lastPage: h.lastPage\r\n });\r\n\r\n this.hpager.on(BI.Pager.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DirectionPager.EVENT_CHANGE);\r\n });\r\n this.hpager.on(BI.Pager.EVENT_AFTER_POPULATE, function () {\r\n self.hlabel.setValue(this.getCurrentPage());\r\n self.hlabel.setTitle(this.getCurrentPage());\r\n });\r\n },\r\n\r\n getVPage: function () {\r\n return this.vpager.getCurrentPage();\r\n },\r\n\r\n getHPage: function () {\r\n return this.hpager.getCurrentPage();\r\n },\r\n\r\n setVPage: function (v) {\r\n this.vpager.setValue(v);\r\n this.vlabel.setValue(v);\r\n this.vlabel.setTitle(v);\r\n },\r\n\r\n setHPage: function (v) {\r\n this.hpager.setValue(v);\r\n this.hlabel.setValue(v);\r\n this.hlabel.setTitle(v);\r\n },\r\n\r\n hasVNext: function () {\r\n return this.vpager.hasNext();\r\n },\r\n\r\n hasHNext: function () {\r\n return this.hpager.hasNext();\r\n },\r\n\r\n hasVPrev: function () {\r\n return this.vpager.hasPrev();\r\n },\r\n\r\n hasHPrev: function () {\r\n return this.hpager.hasPrev();\r\n },\r\n\r\n setHPagerVisible: function (b) {\r\n this.hpager.setVisible(b);\r\n this.hlabel.setVisible(b);\r\n },\r\n\r\n setVPagerVisible: function (b) {\r\n this.vpager.setVisible(b);\r\n this.vlabel.setVisible(b);\r\n },\r\n\r\n populate: function () {\r\n this.vpager.populate();\r\n this.hpager.populate();\r\n var vShow = false, hShow = false;\r\n if (!this.hasHNext() && !this.hasHPrev()) {\r\n this.setHPagerVisible(false);\r\n } else {\r\n this.setHPagerVisible(true);\r\n hShow = true;\r\n }\r\n if (!this.hasVNext() && !this.hasVPrev()) {\r\n this.setVPagerVisible(false);\r\n } else {\r\n this.setVPagerVisible(true);\r\n vShow = true;\r\n }\r\n this.setVisible(hShow || vShow);\r\n var num = [86, 110, 0, 24];\r\n var items = this.layout.attr(\"items\");\r\n\r\n if (vShow === true && hShow === true) {\r\n items[0].right = num[0];\r\n items[1].right = num[1];\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n } else if (vShow === true) {\r\n items[0].right = num[2];\r\n items[1].right = num[3];\r\n } else if (hShow === true) {\r\n items[2].right = num[2];\r\n items[3].right = num[3];\r\n }\r\n this.layout.attr(\"items\", items);\r\n this.layout.resize();\r\n },\r\n\r\n clear: function () {\r\n this.vpager.attr(\"curr\", 1);\r\n this.hpager.attr(\"curr\", 1);\r\n }\r\n});\r\nBI.DirectionPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.direction_pager\", BI.DirectionPager);/**\r\n * 分页控件\r\n *\r\n * Created by GUY on 2015/8/31.\r\n * @class BI.DetailPager\r\n * @extends BI.Widget\r\n */\r\nBI.DetailPager = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DetailPager.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-detail-pager\",\r\n behaviors: {},\r\n layouts: [{\r\n type: \"bi.horizontal\",\r\n hgap: 10,\r\n vgap: 0\r\n }],\r\n\r\n dynamicShow: true, // 是否动态显示上一页、下一页、首页、尾页, 若为false,则指对其设置使能状态\r\n // dynamicShow为false时以下两个有用\r\n dynamicShowFirstLast: false, // 是否动态显示首页、尾页\r\n dynamicShowPrevNext: false, // 是否动态显示上一页、下一页\r\n pages: false, // 总页数\r\n curr: function () {\r\n return 1;\r\n }, // 初始化当前页\r\n groups: 0, // 连续显示分页数\r\n jump: BI.emptyFn, // 分页的回调函数\r\n\r\n first: false, // 是否显示首页\r\n last: false, // 是否显示尾页\r\n prev: \"上一页\",\r\n next: \"下一页\",\r\n\r\n firstPage: 1,\r\n lastPage: function () { // 在万不得已时才会调用这个函数获取最后一页的页码, 主要作用于setValue方法\r\n return 1;\r\n },\r\n hasPrev: BI.emptyFn, // pages不可用时有效\r\n hasNext: BI.emptyFn // pages不可用时有效\r\n });\r\n },\r\n _init: function () {\r\n BI.DetailPager.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.currPage = BI.result(this.options, \"curr\");\r\n // 翻页太灵敏\r\n this._lock = false;\r\n this._debouce = BI.debounce(function () {\r\n self._lock = false;\r\n }, 300);\r\n this._populate();\r\n },\r\n\r\n _populate: function () {\r\n var self = this, o = this.options, view = [], dict = {};\r\n this.empty();\r\n var pages = BI.result(o, \"pages\");\r\n var curr = BI.result(this, \"currPage\");\r\n var groups = BI.result(o, \"groups\");\r\n var first = BI.result(o, \"first\");\r\n var last = BI.result(o, \"last\");\r\n var prev = BI.result(o, \"prev\");\r\n var next = BI.result(o, \"next\");\r\n\r\n if (pages === false) {\r\n groups = 0;\r\n first = false;\r\n last = false;\r\n } else {\r\n groups > pages && (groups = pages);\r\n }\r\n\r\n // 计算当前组\r\n dict.index = Math.ceil((curr + ((groups > 1 && groups !== pages) ? 1 : 0)) / (groups === 0 ? 1 : groups));\r\n\r\n // 当前页非首页,则输出上一页\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) || curr > 1) && prev !== false) {\r\n if (BI.isKey(prev)) {\r\n view.push({\r\n text: prev,\r\n value: \"prev\",\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n });\r\n } else {\r\n view.push(BI.extend({\r\n disabled: pages === false ? o.hasPrev(curr) === false : !(curr > 1 && prev !== false)\r\n }, prev));\r\n }\r\n }\r\n\r\n // 当前组非首组,则输出首页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (dict.index > 1 && groups !== 0)) && first) {\r\n view.push({\r\n text: first,\r\n value: \"first\",\r\n disabled: !(dict.index > 1 && groups !== 0)\r\n });\r\n if (dict.index > 1 && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n }\r\n\r\n // 输出当前页组\r\n dict.poor = Math.floor((groups - 1) / 2);\r\n dict.start = dict.index > 1 ? curr - dict.poor : 1;\r\n dict.end = dict.index > 1 ? (function () {\r\n var max = curr + (groups - dict.poor - 1);\r\n return max > pages ? pages : max;\r\n }()) : groups;\r\n if (dict.end - dict.start < groups - 1) { // 最后一组状态\r\n dict.start = dict.end - groups + 1;\r\n }\r\n var s = dict.start, e = dict.end;\r\n if (first && last && (dict.index > 1 && groups !== 0) && (pages > groups && dict.end < pages && groups !== 0)) {\r\n s++;\r\n e--;\r\n }\r\n for (; s <= e; s++) {\r\n if (s === curr) {\r\n view.push({\r\n text: s,\r\n value: s,\r\n selected: true\r\n });\r\n } else {\r\n view.push({\r\n text: s,\r\n value: s\r\n });\r\n }\r\n }\r\n\r\n // 总页数大于连续分页数,且当前组最大页小于总页,输出尾页\r\n if (((!o.dynamicShow && !o.dynamicShowFirstLast) || (pages > groups && dict.end < pages && groups !== 0)) && last) {\r\n if (pages > groups && dict.end < pages && groups !== 0) {\r\n view.push({\r\n type: \"bi.label\",\r\n cls: \"page-ellipsis\",\r\n text: \"\\u2026\"\r\n });\r\n }\r\n view.push({\r\n text: last,\r\n value: \"last\",\r\n disabled: !(pages > groups && dict.end < pages && groups !== 0)\r\n });\r\n }\r\n\r\n // 当前页不为尾页时,输出下一页\r\n dict.flow = !prev && groups === 0;\r\n if (((!o.dynamicShow && !o.dynamicShowPrevNext) && next) || (curr !== pages && next || dict.flow)) {\r\n view.push((function () {\r\n if (BI.isKey(next)) {\r\n if (pages === false) {\r\n return {text: next, value: \"next\", disabled: o.hasNext(curr) === false};\r\n }\r\n return (dict.flow && curr === pages)\r\n ?\r\n {text: next, value: \"next\", disabled: true}\r\n :\r\n {text: next, value: \"next\", disabled: !(curr !== pages && next || dict.flow)};\r\n }\r\n return BI.extend({\r\n disabled: pages === false ? o.hasNext(curr) === false : !(curr !== pages && next || dict.flow)\r\n }, next);\r\n\r\n }()));\r\n }\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n items: BI.createItems(view, {\r\n cls: \"page-item bi-border bi-list-item-active\",\r\n height: 23,\r\n hgap: 10\r\n }),\r\n behaviors: o.behaviors,\r\n layouts: o.layouts\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (self._lock === true) {\r\n return;\r\n }\r\n self._lock = true;\r\n self._debouce();\r\n if (type === BI.Events.CLICK) {\r\n var v = self.button_group.getValue()[0];\r\n switch (v) {\r\n case \"first\":\r\n self.currPage = 1;\r\n break;\r\n case \"last\":\r\n self.currPage = pages;\r\n break;\r\n case \"prev\":\r\n self.currPage--;\r\n break;\r\n case \"next\":\r\n self.currPage++;\r\n break;\r\n default:\r\n self.currPage = v;\r\n break;\r\n }\r\n o.jump.apply(self, [{\r\n pages: pages,\r\n curr: self.currPage\r\n }]);\r\n self._populate();\r\n self.fireEvent(BI.DetailPager.EVENT_CHANGE, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.fireEvent(BI.DetailPager.EVENT_AFTER_POPULATE);\r\n },\r\n\r\n getCurrentPage: function () {\r\n return this.currPage;\r\n },\r\n\r\n setAllPages: function (pages) {\r\n this.options.pages = pages;\r\n },\r\n\r\n hasPrev: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasPrev(v) : v > 1;\r\n },\r\n\r\n hasNext: function (v) {\r\n v || (v = 1);\r\n var o = this.options;\r\n var pages = this.options.pages;\r\n return pages === false ? o.hasNext(v) : v < pages;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = v || 0;\r\n v = v < 1 ? 1 : v;\r\n if (o.pages === false) {\r\n var lastPage = BI.result(o, \"lastPage\"), firstPage = 1;\r\n this.currPage = v > lastPage ? lastPage : ((firstPage = BI.result(o, \"firstPage\")), (v < firstPage ? firstPage : v));\r\n } else {\r\n v = v > o.pages ? o.pages : v;\r\n this.currPage = v;\r\n }\r\n this._populate();\r\n },\r\n\r\n getValue: function () {\r\n var val = this.button_group.getValue()[0];\r\n switch (val) {\r\n case \"prev\":\r\n return -1;\r\n case \"next\":\r\n return 1;\r\n case \"first\":\r\n return BI.MIN;\r\n case \"last\":\r\n return BI.MAX;\r\n default :\r\n return val;\r\n }\r\n },\r\n\r\n attr: function (key, value) {\r\n BI.DetailPager.superclass.attr.apply(this, arguments);\r\n if (key === \"curr\") {\r\n this.currPage = BI.result(this.options, \"curr\");\r\n }\r\n },\r\n\r\n populate: function () {\r\n this._populate();\r\n }\r\n});\r\nBI.DetailPager.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DetailPager.EVENT_AFTER_POPULATE = \"EVENT_AFTER_POPULATE\";\r\nBI.shortcut(\"bi.detail_pager\", BI.DetailPager);/**\r\n * 分段控件使用的button\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.SegmentButton\r\n * @extends BI.BasicButton\r\n */\r\nBI.SegmentButton = BI.inherit(BI.BasicButton, {\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SegmentButton.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-segment-button bi-list-item-select\",\r\n shadow: true,\r\n readonly: true,\r\n hgap: 5\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SegmentButton.superclass._init.apply(this, arguments);\r\n var opts = this.options, self = this;\r\n // if (BI.isNumber(opts.height) && BI.isNull(opts.lineHeight)) {\r\n // this.element.css({lineHeight : (opts.height - 2) + 'px'});\r\n // }\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n element: this,\r\n textHeight: opts.height,\r\n whiteSpace: opts.whiteSpace,\r\n text: opts.text,\r\n value: opts.value,\r\n hgap: opts.hgap\r\n });\r\n },\r\n\r\n setSelected: function () {\r\n BI.SegmentButton.superclass.setSelected.apply(this, arguments);\r\n },\r\n\r\n setText: function (text) {\r\n BI.SegmentButton.superclass.setText.apply(this, arguments);\r\n this.text.setText(text);\r\n },\r\n\r\n destroy: function () {\r\n BI.SegmentButton.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.segment_button\", BI.SegmentButton);/**\r\n * 单选按钮组\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.Segment\r\n * @extends BI.Widget\r\n */\r\nBI.Segment = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.Segment.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-segment\",\r\n items: [],\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.Segment.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.buttonGroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_group\",\r\n value: o.value,\r\n items: BI.createItems(o.items, {\r\n type: \"bi.segment_button\",\r\n height: o.height - 2,\r\n whiteSpace: o.whiteSpace\r\n }),\r\n layout: [\r\n {\r\n type: \"bi.center\"\r\n }\r\n ]\r\n });\r\n this.buttonGroup.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.buttonGroup.on(BI.ButtonGroup.EVENT_CHANGE, function (value, obj) {\r\n self.fireEvent(BI.Segment.EVENT_CHANGE, value, obj);\r\n });\r\n },\r\n\r\n _setEnable: function (enable) {\r\n BI.Segment.superclass._setEnable.apply(this, arguments);\r\n if (enable === true) {\r\n this.element.removeClass(\"base-disabled disabled\");\r\n } else if (enable === false) {\r\n this.element.addClass(\"base-disabled disabled\");\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.buttonGroup.setValue(v);\r\n },\r\n\r\n setEnabledValue: function (v) {\r\n this.buttonGroup.setEnabledValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.buttonGroup.getValue();\r\n }\r\n});\r\nBI.Segment.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.segment\", BI.Segment);/**\r\n * guy\r\n * 复选导航条\r\n * Created by GUY on 2015/8/25.\r\n * @class BI.MultiSelectBar\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiSelectBar = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectBar.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multi-select-bar\",\r\n height: 25,\r\n text: BI.i18nText(\"BI-Select_All\"),\r\n isAllCheckedBySelectedValue: BI.emptyFn,\r\n // 手动控制选中\r\n disableSelected: true,\r\n isHalfCheckedBySelectedValue: function (selectedValues) {\r\n return selectedValues.length > 0;\r\n },\r\n halfSelected: false,\r\n iconWrapperWidth: 26\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectBar.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var isSelect = o.selected === true;\r\n var isHalfSelect = !o.selected && o.halfSelected;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.checkbox\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(self.isSelected());\r\n },\r\n selected: isSelect,\r\n invisible: isHalfSelect\r\n });\r\n this.half = BI.createWidget({\r\n type: \"bi.half_icon_button\",\r\n stopPropagation: true,\r\n handler: function () {\r\n self.setSelected(true);\r\n },\r\n invisible: isSelect || !isHalfSelect\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.checkbox.on(BI.Checkbox.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.half.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.CLICK, self.isSelected(), self);\r\n });\r\n this.half.on(BI.HalfIconButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, self.isSelected(), self);\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n width: o.iconWrapperWidth,\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.checkbox, this.half]\r\n }\r\n }, {\r\n el: this.text\r\n }]\r\n });\r\n },\r\n\r\n _setSelected: function (v) {\r\n this.checkbox.setSelected(!!v);\r\n },\r\n\r\n // 自己手动控制选中\r\n beforeClick: function () {\r\n var isHalf = this.isHalfSelected(), isSelected = this.isSelected();\r\n if (isHalf === true) {\r\n this.setSelected(true);\r\n } else {\r\n this.setSelected(!isSelected);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n this.checkbox.setSelected(v);\r\n this.setHalfSelected(false);\r\n },\r\n\r\n setHalfSelected: function (b) {\r\n this.halfSelected = !!b;\r\n if (b === true) {\r\n this.checkbox.setSelected(false);\r\n this.half.visible();\r\n this.checkbox.invisible();\r\n } else {\r\n this.half.invisible();\r\n this.checkbox.visible();\r\n }\r\n },\r\n\r\n isHalfSelected: function () {\r\n return !this.isSelected() && !!this.halfSelected;\r\n },\r\n\r\n isSelected: function () {\r\n return this.checkbox.isSelected();\r\n },\r\n\r\n setValue: function (selectedValues) {\r\n BI.MultiSelectBar.superclass.setValue.apply(this, arguments);\r\n var isAllChecked = this.options.isAllCheckedBySelectedValue.apply(this, arguments);\r\n this._setSelected(isAllChecked);\r\n !isAllChecked && this.setHalfSelected(this.options.isHalfCheckedBySelectedValue.apply(this, arguments));\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiSelectBar.superclass.doClick.apply(this, arguments);\r\n if(this.isValid()) {\r\n this.fireEvent(BI.MultiSelectBar.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n }\r\n});\r\nBI.MultiSelectBar.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_bar\", BI.MultiSelectBar);\r\n/**\r\n * guy\r\n * 二级树\r\n * @class BI.LevelTree\r\n * @extends BI.Single\r\n */\r\nBI.LevelTree = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.LevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-level-tree\",\r\n el: {\r\n chooseType: 0\r\n },\r\n expander: {},\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.LevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.initTree(this.options.items);\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n element: this,\r\n expander: BI.extend({\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n }, o.expander),\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n\r\n el: BI.extend({\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }, o.el)\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value, ob) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.LevelTree.EVENT_CHANGE, value, ob);\r\n }\r\n });\r\n },\r\n\r\n // 生成树方法\r\n stroke: function (nodes) {\r\n this.tree.stroke.apply(this.tree, arguments);\r\n },\r\n\r\n populate: function (items, keyword) {\r\n items = this._formatItems(BI.Tree.transformToTreeFormat(items), 0);\r\n this.tree.populate(items, keyword);\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.LevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.level_tree\", BI.LevelTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.DisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.DisplayTree = BI.inherit(BI.TreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.DisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.DisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.DisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.display_tree\", BI.DisplayTree);/**\r\n * guy\r\n * 异步树\r\n * @class BI.ListListDisplayTree\r\n * @extends BI.TreeView\r\n */\r\nBI.ListDisplayTree = BI.inherit(BI.ListTreeView, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListDisplayTree.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-list-display-tree\"\r\n });\r\n },\r\n _init: function () {\r\n BI.ListDisplayTree.superclass._init.apply(this, arguments);\r\n },\r\n\r\n // 配置属性\r\n _configSetting: function () {\r\n var setting = {\r\n view: {\r\n selectedMulti: false,\r\n dblClickExpand: false,\r\n showIcon: false,\r\n nameIsHTML: true,\r\n showTitle: false,\r\n fontCss: getFont\r\n },\r\n data: {\r\n key: {\r\n title: \"title\",\r\n name: \"text\"\r\n },\r\n simpleData: {\r\n enable: true\r\n }\r\n },\r\n callback: {\r\n beforeCollapse: beforeCollapse\r\n }\r\n };\r\n\r\n function beforeCollapse(treeId, treeNode) {\r\n return false;\r\n }\r\n\r\n function getFont(treeId, node) {\r\n return node.isLeaf ? {} : {color: \"#999999\"};\r\n }\r\n\r\n return setting;\r\n },\r\n\r\n _dealWidthNodes: function (nodes) {\r\n nodes = BI.ListDisplayTree.superclass._dealWidthNodes.apply(this, arguments);\r\n var self = this, o = this.options;\r\n BI.each(nodes, function (i, node) {\r\n node.isParent = node.isParent || node.parent;\r\n if (node.text == null) {\r\n if (node.count > 0) {\r\n node.text = node.value + \"(\" + BI.i18nText(\"BI-Basic_Altogether\") + node.count + BI.i18nText(\"BI-Basic_Count\") + \")\";\r\n }\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n initTree: function (nodes, setting) {\r\n var setting = setting || this._configSetting();\r\n this.nodes = BI.$.fn.zTree.init(this.tree.element, setting, nodes);\r\n },\r\n\r\n destroy: function () {\r\n BI.ListDisplayTree.superclass.destroy.apply(this, arguments);\r\n }\r\n});\r\nBI.ListDisplayTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.list_display_tree\", BI.ListDisplayTree);/**\r\n * 简单的多选树\r\n *\r\n * Created by GUY on 2016/2/16.\r\n * @class BI.SimpleTreeView\r\n * @extends BI.Widget\r\n */\r\nBI.SimpleTreeView = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SimpleTreeView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-simple-tree\",\r\n itemsCreator: BI.emptyFn,\r\n items: null\r\n });\r\n },\r\n _init: function () {\r\n BI.SimpleTreeView.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.structure = new BI.Tree();\r\n this.tree = BI.createWidget({\r\n type: \"bi.tree_view\",\r\n element: this,\r\n itemsCreator: function (op, callback) {\r\n var fn = function (items) {\r\n callback({\r\n items: items\r\n });\r\n self.structure.initTree(BI.Tree.transformToTreeFormat(items));\r\n };\r\n if (BI.isNotNull(o.items)) {\r\n fn(o.items);\r\n } else {\r\n o.itemsCreator(op, fn);\r\n }\r\n }\r\n });\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SimpleTreeView.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotEmptyArray(o.items)) {\r\n this.populate();\r\n }\r\n if (BI.isNotNull(o.value)) {\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n populate: function (items, keyword) {\r\n if (items) {\r\n this.options.items = items;\r\n }\r\n this.tree.stroke({\r\n keyword: keyword\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n v || (v = []);\r\n var self = this, map = {};\r\n var selected = [];\r\n BI.each(v, function (i, val) {\r\n var node = self.structure.search(val, \"value\");\r\n if (node) {\r\n var p = node;\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n\r\n while (p && p.getChildrenLength() <= map[p.value]) {\r\n selected.push(p.value);\r\n p = p.getParent();\r\n if (p) {\r\n if (!map[p.value]) {\r\n map[p.value] = 0;\r\n }\r\n map[p.value]++;\r\n }\r\n }\r\n }\r\n });\r\n return BI.makeObject(v.concat(selected));\r\n },\r\n\r\n setValue: function (v) {\r\n this.tree.setValue(this._digest(v));\r\n },\r\n\r\n _getValue: function () {\r\n var self = this, result = [], val = this.tree.getValue();\r\n var track = function (nodes) {\r\n BI.each(nodes, function (key, node) {\r\n if (BI.isEmpty(node)) {\r\n result.push(key);\r\n } else {\r\n track(node);\r\n }\r\n });\r\n };\r\n track(val);\r\n return result;\r\n },\r\n\r\n empty: function () {\r\n this.tree.empty();\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [], val = this._getValue();\r\n BI.each(val, function (i, key) {\r\n var target = self.structure.search(key, \"value\");\r\n if (target) {\r\n self.structure._traverse(target, function (node) {\r\n if (node.isLeaf()) {\r\n result.push(node.value);\r\n }\r\n });\r\n }\r\n });\r\n return result;\r\n }\r\n});\r\nBI.SimpleTreeView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.simple_tree\", BI.SimpleTreeView);\r\n/**\r\n * 文本输入框trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.EditorTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.EditorTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.EditorTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-editor-trigger bi-border\",\r\n height: 24,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.EditorTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText,\r\n title: function () {\r\n return self.getValue();\r\n }\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_FOCUS, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_EMPTY, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_VALID, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.EditorTrigger.EVENT_ERROR, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n },\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (value) {\r\n this.editor.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.editor.setState(text);\r\n }\r\n});\r\nBI.EditorTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.EditorTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.EditorTrigger.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.EditorTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.EditorTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.editor_trigger\", BI.EditorTrigger);\r\n/**\r\n * 图标按钮trigger\r\n *\r\n * Created by GUY on 2015/10/8.\r\n * @class BI.IconTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.IconTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-icon-trigger\",\r\n extraCls: \"pull-down-font\",\r\n el: {},\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n var o = this.options;\r\n BI.IconTrigger.superclass._init.apply(this, arguments);\r\n this.iconButton = BI.createWidget(o.el, {\r\n type: \"bi.trigger_icon_button\",\r\n element: this,\r\n width: o.width,\r\n height: o.height,\r\n extraCls: o.extraCls\r\n });\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_trigger\", BI.IconTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.IconTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.IconTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.IconTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.IconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n ref: function (_ref) {\r\n self.wrapper = _ref;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_change_button\",\r\n cls: \"icon-combo-trigger-icon\",\r\n iconCls: o.iconCls,\r\n ref: function (_ref) {\r\n self.icon = _ref;\r\n },\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n disableSelected: true\r\n },\r\n width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height)\r\n },\r\n {\r\n el: this.text,\r\n lgap: BI.isEmptyString(o.iconCls) ? 5 : 0\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setIcon: function (iconCls) {\r\n var o = this.options;\r\n this.icon.setIcon(iconCls);\r\n var iconItem = this.wrapper.attr(\"items\")[0];\r\n var textItem = this.wrapper.attr(\"items\")[1];\r\n if(BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {\r\n if(iconItem.width !== 0) {\r\n iconItem.width = 0;\r\n textItem.lgap = 5;\r\n this.wrapper.resize();\r\n }\r\n }else{\r\n if(iconItem.width !== (o.iconWrapperWidth || o.height)) {\r\n iconItem.width = (o.iconWrapperWidth || o.height);\r\n textItem.lgap = 0;\r\n this.wrapper.resize();\r\n }\r\n }\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.icon_text_trigger\", BI.IconTextTrigger);/**\r\n * Created by Windy on 2017/12/12.\r\n */\r\nBI.SelectIconTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectIconTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border\",\r\n height: 24,\r\n iconHeight: null,\r\n iconWidth: null,\r\n iconCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectIconTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digist(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.icon_text_trigger\",\r\n element: this,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n iconCls: obj.iconCls,\r\n height: o.height,\r\n iconHeight: o.iconHeight,\r\n iconWidth: o.iconWidth,\r\n iconWrapperWidth: o.iconWrapperWidth\r\n });\r\n },\r\n\r\n _digist: function (vals, items) {\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result;\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.any(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value)) {\r\n result = {\r\n text: item.text || item.value,\r\n iconCls: item.iconCls\r\n };\r\n return true;\r\n }\r\n });\r\n\r\n if (BI.isNotNull(result)) {\r\n return {\r\n text: result.text,\r\n textCls: \"\",\r\n iconCls: result.iconCls\r\n };\r\n } else {\r\n return {\r\n text: BI.isFunction(o.text) ? o.text() : o.text,\r\n textCls: \"bi-water-mark\",\r\n iconCls: o.iconCls\r\n };\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var obj = this._digist(vals, this.options.items);\r\n this.trigger.setText(obj.text);\r\n this.trigger.setIcon(obj.iconCls);\r\n this.trigger.setTextCls(obj.textCls);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_icon_text_trigger\", BI.SelectIconTextTrigger);/**\r\n * 文字trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.TextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.TextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.TextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 24,\r\n textCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"select-text-label\" + (BI.isKey(o.textCls) ? (\" \" + o.textCls) : \"\"),\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n title: function () {\r\n return self.text.getText();\r\n },\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n hgap: c.hgap,\r\n readonly: o.readonly\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setTextCls: function(cls) {\r\n var o = this.options;\r\n var oldCls = o.textCls;\r\n o.textCls = cls;\r\n this.text.element.removeClass(oldCls).addClass(cls);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.text.options.tipType = v;\r\n }\r\n});\r\nBI.shortcut(\"bi.text_trigger\", BI.TextTrigger);\r\n/**\r\n * 选择字段trigger\r\n *\r\n * Created by GUY on 2015/9/15.\r\n * @class BI.SelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-text-trigger bi-border bi-focus-shadow\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.text_trigger\",\r\n element: this,\r\n height: o.height,\r\n readonly: o.readonly,\r\n text: obj.text,\r\n textCls: obj.textCls,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n textCls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n textCls: \"bi-water-mark\",\r\n text: BI.isFunction(o.text) ? o.text() : o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.setTextCls(formatValue.textCls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.trigger.setTipType(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.select_text_trigger\", BI.SelectTextTrigger);\r\n/**\r\n * 选择字段trigger小一号的\r\n *\r\n * @class BI.SmallSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SmallSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-small-select-text-trigger bi-border\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SmallSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var obj = this._digest(o.value, o.items);\r\n this.trigger = BI.createWidget({\r\n type: \"bi.small_text_trigger\",\r\n element: this,\r\n height: o.height - 2,\r\n text: obj.text,\r\n cls: obj.cls\r\n });\r\n },\r\n\r\n _digest: function(vals, items){\r\n var o = this.options;\r\n vals = BI.isArray(vals) ? vals : [vals];\r\n var result = [];\r\n var formatItems = BI.Tree.transformToArrayFormat(items);\r\n BI.each(formatItems, function (i, item) {\r\n if (BI.deepContains(vals, item.value) && !BI.contains(result, item.text || item.value)) {\r\n result.push(item.text || item.value);\r\n }\r\n });\r\n\r\n if (result.length > 0) {\r\n return {\r\n cls: \"\",\r\n text: result.join(\",\")\r\n }\r\n } else {\r\n return {\r\n cls: \"bi-water-mark\",\r\n text: o.text\r\n }\r\n }\r\n },\r\n\r\n setValue: function (vals) {\r\n var formatValue = this._digest(vals, this.options.items);\r\n this.trigger.element.removeClass(\"bi-water-mark\").addClass(formatValue.cls);\r\n this.trigger.setText(formatValue.text);\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n }\r\n});\r\nBI.shortcut(\"bi.small_select_text_trigger\", BI.SmallSelectTextTrigger);/**\r\n * 文字trigger(右边小三角小一号的) ==\r\n *\r\n * @class BI.SmallTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.SmallTextTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-text-trigger\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n text: o.text,\r\n hgap: c.hgap\r\n });\r\n this.trigerButton = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.triggerWidth || o.height\r\n });\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: this.text\r\n }, {\r\n el: this.trigerButton,\r\n width: o.triggerWidth || o.height\r\n }\r\n ]\r\n });\r\n },\r\n\r\n setValue: function (value) {\r\n this.text.setValue(value);\r\n },\r\n\r\n setText: function (text) {\r\n this.text.setText(text);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_trigger\", BI.SmallTextTrigger);/**\r\n * 日期控件中的月份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.MonthDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.MonthDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-combo\",\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.MonthDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.month_popup\",\r\n behaviors: o.behaviors\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n container: o.container,\r\n element: this,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.combo.hideView();\r\n self.fireEvent(BI.MonthDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.MonthDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_date_combo\", BI.MonthDateCombo);/**\r\n * 年份下拉框\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearDateCombo\r\n * @extends BI.Trigger\r\n */\r\nBI.YearDateCombo = BI.inherit(BI.Trigger, {\r\n _defaultConfig: function () {\r\n return BI.extend( BI.YearDateCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-combo\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n behaviors: {},\r\n height: 24,\r\n container: null\r\n });\r\n },\r\n _init: function () {\r\n BI.YearDateCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_triangle_trigger\"\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.year_popup\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.popup.on(BI.YearPopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n offsetStyle: \"center\",\r\n element: this,\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: this.popup\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.YearDateCombo.EVENT_CHANGE);\r\n });\r\n // BI-22551 popup未初始化传入的behavior无效\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.doBehavior();\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\nBI.YearDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_date_combo\", BI.YearDateCombo);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DatePicker\r\n * @extends BI.Widget\r\n */\r\nBI.DatePicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DatePicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-picker\",\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DatePicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this._month = BI.getDate().getMonth() + 1;\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 1) {\r\n self.setValue({\r\n year: self.year.getValue() - 1,\r\n month: 12\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() - 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self._month === 12) {\r\n self.setValue({\r\n year: self.year.getValue() + 1,\r\n month: 1\r\n });\r\n } else {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue() + 1\r\n });\r\n }\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n this.month = BI.createWidget({\r\n type: \"bi.month_date_combo\",\r\n behaviors: o.behaviors\r\n });\r\n this.month.on(BI.MonthDateCombo.EVENT_CHANGE, function () {\r\n self.setValue({\r\n year: self.year.getValue(),\r\n month: self.month.getValue()\r\n });\r\n self.fireEvent(BI.DatePicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 24\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal\",\r\n width: 120,\r\n rgap: 10,\r\n items: [{\r\n el: this.year,\r\n lgap: 10\r\n }, this.month]\r\n }\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 24\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year,\r\n month: this._month\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 1 && this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._month === 12 && this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.year.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.year.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (ob) {\r\n this._year = BI.parseInt(ob.year);\r\n this._month = BI.parseInt(ob.month);\r\n this.year.setValue(ob.year);\r\n this.month.setValue(ob.month);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.year.getValue(),\r\n month: this.month.getValue()\r\n };\r\n }\r\n});\r\nBI.DatePicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_picker\", BI.DatePicker);/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.YearPicker\r\n * @extends BI.Widget\r\n */\r\nBI.YearPicker = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.YearPicker.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-year-picker\",\r\n behaviors: {},\r\n height: 40,\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.YearPicker.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this._year = BI.getDate().getFullYear();\r\n this.left = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n this.left.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() - 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.right = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25\r\n });\r\n\r\n this.right.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue() + 1);\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n });\r\n\r\n this.year = BI.createWidget({\r\n type: \"bi.year_date_combo\",\r\n min: o.min,\r\n behaviors: o.behaviors,\r\n max: o.max,\r\n width: 50\r\n });\r\n this.year.on(BI.YearDateCombo.EVENT_CHANGE, function () {\r\n self.setValue(self.year.getValue());\r\n self.fireEvent(BI.YearPicker.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.left]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n el: this.year\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [this.right]\r\n },\r\n width: 25\r\n }]\r\n });\r\n this.setValue({\r\n year: this._year\r\n });\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.min, \"%Y-%X-%d\").getFullYear());\r\n this.left.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = !(this._year === BI.parseDateTime(o.max, \"%Y-%X-%d\").getFullYear());\r\n this.right.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n\r\n setValue: function (v) {\r\n this._year = v;\r\n this.year.setValue(v);\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.year.getValue();\r\n }\r\n});\r\nBI.YearPicker.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_picker\", BI.YearPicker);\r\n/**\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateCalendarPopup\r\n * @extends BI.Widget\r\n */\r\nBI.DateCalendarPopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.DateCalendarPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-calendar-popup\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: true\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n // BI-45616 此处为确定当前应该展示哪个年月对应的Calendar, day不是关键数据, 给1号就可\r\n day: 1\r\n });\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.DateCalendarPopup.superclass._init.apply(this, arguments);\r\n var self = this,\r\n o = this.options;\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n this._day = this.today.getDate();\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month,\r\n day: this._day\r\n };\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"top\",\r\n logic: {\r\n dynamic: true\r\n },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this),\r\n\r\n afterCardCreated: function () {\r\n\r\n },\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedTime);\r\n }\r\n });\r\n\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n self.selectedTime = self.datePicker.getValue();\r\n self.selectedTime.day = 1;\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n });\r\n\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.calendar,\r\n left: 5,\r\n right: 5\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.calendar.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this.datePicker.setMinDate(minDate);\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this.datePicker.setMaxDate(maxDate);\r\n this._checkMax();\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this.datePicker.setValue(timeOb);\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(timeOb));\r\n this.calendar.setValue(timeOb);\r\n this.selectedTime = timeOb;\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n});\r\nBI.DateCalendarPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_calendar_popup\", BI.DateCalendarPopup);/**\r\n * 月份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.MonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.MonthPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MonthPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-month-popup\",\r\n behaviors: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MonthPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n items = BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td\r\n };\r\n });\r\n });\r\n\r\n this.month = BI.createWidget({\r\n type: \"bi.button_group\",\r\n element: this,\r\n behaviors: o.behaviors,\r\n items: BI.createItems(items, {}),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value\r\n });\r\n\r\n this.month.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.MonthPopup.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.month.getValue()[0];\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.parseInt(v);\r\n this.month.setValue([v]);\r\n }\r\n});\r\nBI.MonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.month_popup\", BI.MonthPopup);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.YearPopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.YearPopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.YearPopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: -1\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 24,\r\n height: 24,\r\n value: 1\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n cls: \"year-popup-navigation bi-high-light bi-split-top\",\r\n height: 24,\r\n items: [this.backBtn, this.preBtn]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n calendar && self.backBtn.setEnable(!calendar.isFrontYear());\r\n calendar && self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.YearPopup.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkMin: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMinDate(this.options.min);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n _checkMax: function () {\r\n var calendar = this.navigation.getSelectedCard();\r\n if (BI.isNotNull(calendar)) {\r\n calendar.setMaxDate(this.options.max);\r\n this.backBtn.setEnable(!calendar.isFrontYear());\r\n this.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n this._checkMin();\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n this._checkMax();\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedYear;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseInt(v);\r\n // 对于年控件来说,只要传入的minDate和maxDate的year区间包含v就是合法的\r\n var startDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var endDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n if (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]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = v;\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(v);\r\n }\r\n }\r\n});\r\nBI.YearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.year_popup\", BI.YearPopup);/**\r\n * 日期控件中的年份或月份trigger\r\n *\r\n * Created by GUY on 2015/9/7.\r\n * @class BI.DateTriangleTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DateTriangleTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n height: 24,\r\n iconWidth: 12,\r\n iconHeight: 12\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend( BI.DateTriangleTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-triangle-trigger pull-down-ha-font cursor-pointer\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTriangleTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"right\",\r\n text: o.text,\r\n value: o.value,\r\n height: c.height\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical_adapt\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n rgap: 5\r\n }, {\r\n type: \"bi.icon_label\",\r\n width: 16\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.text.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function (v) {\r\n this.text.setText(v);\r\n },\r\n\r\n getText: function () {\r\n return this.item.getText();\r\n },\r\n\r\n getKey: function () {\r\n\r\n }\r\n});\r\nBI.shortcut(\"bi.date_triangle_trigger\", BI.DateTriangleTrigger);/**\r\n * Created by zcf on 2017/2/20.\r\n */\r\nBI.StaticDatePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDatePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDatePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = {\r\n year: value.year,\r\n month: value.month\r\n };\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = self.calendar.getValue();\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar],\r\n hgap: 10\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = date;\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_pane_card\", BI.StaticDatePaneCard);BI.DynamicDatePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDatePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDatePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDatePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDatePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDatePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDatePane.Static:\r\n return {\r\n type: \"bi.static_date_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDatePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateCombo.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_pane\", BI.DynamicDatePane);\r\n\r\nBI.extend(BI.DynamicDatePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 290,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-combo bi-border bi-border-radius\",\r\n width: 200,\r\n height: 24,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeCombo.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n var date = BI.getDate();\r\n this.storeValue = BI.isNotNull(opts.value) ? opts.value : {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.trigger = BI.createWidget({\r\n type: \"bi.date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n value: opts.value\r\n });\r\n self.setValue(this.storeValue);\r\n\r\n this.popup.on(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE, function () {\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CANCEL);\r\n });\r\n this.popup.on(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE, function () {\r\n self.storeValue = self.popup.getValue();\r\n self.setValue(self.storeValue);\r\n self.hidePopupView();\r\n self.fireEvent(BI.DateTimeCombo.EVENT_CONFIRM);\r\n });\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: this.popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: 24,\r\n height: 24\r\n });\r\n triggerBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.combo,\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.popup.setValue(v);\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DateTimeCombo.EVENT_CANCEL = \"EVENT_CANCEL\";\r\nBI.DateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.date_time_combo\", BI.DateTimeCombo);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-date-time-popup\",\r\n width: 268,\r\n height: 374\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n this.cancelButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top bi-border-right\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Cancel\")\r\n });\r\n this.cancelButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE);\r\n });\r\n\r\n this.okButton = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"multidate-popup-button bi-border-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\")\r\n });\r\n this.okButton.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n });\r\n\r\n this.dateCombo = BI.createWidget({\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: opts.behaviors,\r\n min: self.options.min,\r\n max: self.options.max\r\n });\r\n self.dateCombo.on(BI.DateCalendarPopup.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DateTimePopup.CALENDAR_EVENT_CHANGE);\r\n });\r\n\r\n this.dateButton = BI.createWidget({\r\n type: \"bi.grid\",\r\n items: [[this.cancelButton, this.okButton]]\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this.dateCombo\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n height: 50\r\n }, {\r\n el: this.dateButton,\r\n height: 30\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n setValue: function (v) {\r\n var value = v, date;\r\n if (BI.isNull(value)) {\r\n date = BI.getDate();\r\n this.dateCombo.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue({\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n });\r\n } else {\r\n this.dateCombo.setValue({\r\n year: value.year,\r\n month: value.month,\r\n day: value.day\r\n });\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.extend({\r\n year: this.dateCombo.getValue().year,\r\n month: this.dateCombo.getValue().month,\r\n day: this.dateCombo.getValue().day\r\n }, this.timeSelect.getValue());\r\n }\r\n});\r\nBI.DateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DateTimePopup.BUTTON_CANCEL_EVENT_CHANGE = \"BUTTON_CANCEL_EVENT_CHANGE\";\r\nBI.DateTimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_time_popup\", BI.DateTimePopup);\r\n/**\r\n * Created by Urthur on 2017/7/14.\r\n */\r\nBI.DateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DateTimeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n width: 200\r\n });\r\n },\r\n _init: function () {\r\n BI.DateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n height: o.height,\r\n width: o.width,\r\n hgap: c.hgap\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.text\r\n },{\r\n el: BI.createWidget(),\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _printTime: function (v) {\r\n return v < 10 ? \"0\" + v : v;\r\n },\r\n\r\n setValue: function (v) {\r\n var self = this;\r\n var value = v, dateStr;\r\n if(BI.isNull(value)) {\r\n value = BI.getDate();\r\n dateStr = BI.print(value, \"%Y-%X-%d %H:%M:%S\");\r\n } else {\r\n var date = BI.getDate(value.year, value.month - 1, value.day, value.hour, value.minute, value.second);\r\n dateStr = BI.print(date, \"%Y-%X-%d %H:%M:%S\");\r\n\r\n }\r\n this.text.setText(dateStr);\r\n this.text.setTitle(dateStr);\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.date_time_trigger\", BI.DateTimeTrigger);\r\nBI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.StaticDateTimePaneCard.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-date-time-pane\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n selectedTime: null\r\n });\r\n },\r\n _init: function () {\r\n BI.StaticDateTimePaneCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.today = BI.getDate();\r\n this._year = this.today.getFullYear();\r\n this._month = this.today.getMonth() + 1;\r\n\r\n this.selectedTime = o.selectedTime || {\r\n year: this._year,\r\n month: this._month\r\n };\r\n\r\n this.datePicker = BI.createWidget({\r\n type: \"bi.date_picker\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n });\r\n this.datePicker.on(BI.DatePicker.EVENT_CHANGE, function () {\r\n var value = self.datePicker.getValue();\r\n var monthDay = BI.getMonthDays(BI.getDate(value.year, value.month - 1, 1));\r\n var day = self.selectedTime.day || 0;\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n self.selectedTime = BI.extend(self.selectedTime, {\r\n year: value.year,\r\n month: value.month\r\n });\r\n day !== 0 && (self.selectedTime.day = day);\r\n self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));\r\n self.calendar.setValue(self.selectedTime);\r\n day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n this.calendar = BI.createWidget({\r\n direction: \"custom\",\r\n // logic: {\r\n // dynamic: false\r\n // },\r\n type: \"bi.navigation\",\r\n tab: this.datePicker,\r\n cardCreator: BI.bind(this._createNav, this)\r\n });\r\n this.calendar.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.calendar.empty();\r\n self.setValue(self.selectedTime);\r\n self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n hgap: 10,\r\n items: [{\r\n el: this.datePicker,\r\n height: 40\r\n }, this.calendar, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeSelect.EVENT_CONFIRM,\r\n action: function () {\r\n self.selectedTime = BI.extend(self.calendar.getValue(), self.timeSelect.getValue());\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n height: 40\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-split-top\"\r\n },\r\n height: 1,\r\n top: 40,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n this.setValue(o.selectedTime);\r\n\r\n },\r\n\r\n _createNav: function (v) {\r\n var date = BI.Calendar.getDateJSONByPage(v);\r\n var calendar = BI.createWidget({\r\n type: \"bi.calendar\",\r\n logic: {\r\n dynamic: false\r\n },\r\n min: this.options.min,\r\n max: this.options.max,\r\n year: date.year,\r\n month: date.month,\r\n day: this.selectedTime.day\r\n });\r\n return calendar;\r\n },\r\n\r\n _getNewCurrentDate: function () {\r\n var today = BI.getDate();\r\n return {\r\n year: today.getFullYear(),\r\n month: today.getMonth() + 1\r\n };\r\n },\r\n\r\n _setCalenderValue: function (date) {\r\n this.calendar.setSelect(BI.Calendar.getPageByDateJSON(date));\r\n this.calendar.setValue(date);\r\n this.selectedTime = BI.extend({}, this.timeSelect.getValue(), date);\r\n },\r\n\r\n _setDatePicker: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.year) || BI.isNull(timeOb.month)) {\r\n this.datePicker.setValue(this._getNewCurrentDate());\r\n } else {\r\n this.datePicker.setValue(timeOb);\r\n }\r\n },\r\n\r\n _setCalendar: function (timeOb) {\r\n if (BI.isNull(timeOb) || BI.isNull(timeOb.day)) {\r\n this.calendar.empty();\r\n this._setCalenderValue(this._getNewCurrentDate());\r\n } else {\r\n this._setCalenderValue(timeOb);\r\n }\r\n },\r\n\r\n setValue: function (timeOb) {\r\n timeOb = timeOb || {};\r\n this._setDatePicker(timeOb);\r\n this._setCalendar(timeOb);\r\n this.timeSelect.setValue({\r\n hour: timeOb.hour,\r\n minute: timeOb.minute,\r\n second: timeOb.second\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return this.selectedTime;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.static_date_time_pane_card\", BI.StaticDateTimePaneCard);BI.DynamicDateTimePane = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-pane\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: 30,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateTimePane.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateTimePane.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n }),\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue()[0];\r\n self.dateTab.setSelect(value);\r\n switch (value) {\r\n case BI.DynamicDateTimePane.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n break;\r\n case BI.DynamicDateTimePane.Dynamic:\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.switcher = this;\r\n }\r\n },\r\n height: 30\r\n }, {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n showIndex: BI.DynamicDateTimePane.Static,\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateTimePane.Static:\r\n return {\r\n type: \"bi.static_date_time_pane_card\",\r\n behaviors: o.behaviors,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n case BI.DynamicDateTimePane.Dynamic:\r\n default:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n if(self._checkValue(self.getValue())) {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this.setValue(this.options.value);\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n var type = v.type || BI.DynamicDateTimePane.Static;\r\n var value = v.value || v;\r\n this.switcher.setValue(type);\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateTimePane.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n break;\r\n case BI.DynamicDateTimePane.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n });\r\n } else {\r\n this.ymd.setValue(value);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.dynamic_date_time_pane\", BI.DynamicDateTimePane);\r\n\r\nBI.extend(BI.DynamicDateTimePane, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls,\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000,\r\n minWidth: 140\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/6.\r\n */\r\nBI.DownListGroup = BI.inherit(BI.Widget, {\r\n constants: {\r\n iconCls: \"check-mark-ha-font\"\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListGroup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-group\",\r\n items: [\r\n {\r\n el: {}\r\n }\r\n ]\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroup.superclass._init.apply(this, arguments);\r\n var o = this.options, self = this;\r\n\r\n this.downlistgroup = BI.createWidget({\r\n element: this,\r\n type: \"bi.button_tree\",\r\n items: o.items,\r\n chooseType: 0, // 0单选,1多选\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: 0,\r\n vgap: 0\r\n }],\r\n value: o.value\r\n });\r\n this.downlistgroup.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if(type === BI.Events.CLICK) {\r\n self.fireEvent(BI.DownListGroup.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n },\r\n getValue: function () {\r\n return this.downlistgroup.getValue();\r\n },\r\n setValue: function (v) {\r\n this.downlistgroup.setValue(v);\r\n }\r\n\r\n\r\n});\r\nBI.DownListGroup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group\", BI.DownListGroup);BI.DownListItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-item bi-list-item-active\",\r\n cls: \"\",\r\n height: 24,\r\n logic: {\r\n dynamic: true\r\n },\r\n selected: false,\r\n iconHeight: null,\r\n iconWidth: null,\r\n textHgap: 0,\r\n textVgap: 0,\r\n textLgap: 0,\r\n textRgap: 0\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n hgap: o.textHgap,\r\n vgap: o.textVgap,\r\n lgap: o.textLgap,\r\n rgap: o.textRgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n height: o.height\r\n });\r\n this.icon = BI.createWidget({\r\n type: \"bi.center_adapt\",\r\n width: 36,\r\n height: o.height,\r\n items: [{\r\n el: {\r\n type: \"bi.icon\",\r\n width: o.iconWidth,\r\n height: o.iconHeight\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left), BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, this.icon, this.text)\r\n }))));\r\n },\r\n\r\n setValue: function () {\r\n if (!this.isReadOnly()) {\r\n this.text.setValue.apply(this.text, arguments);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setText: function () {\r\n this.text.setText.apply(this.text, arguments);\r\n },\r\n\r\n getText: function () {\r\n return this.text.getText();\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListItem.EVENT_CHANGE, this.getValue(), this);\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n }\r\n});\r\nBI.DownListItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_item\", BI.DownListItem);BI.DownListGroupItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.DownListGroupItem.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-down-list-group-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n // invalid: true,\r\n iconCls1: \"dot-e-font\",\r\n iconCls2: \"pull-right-e-font\"\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListGroupItem.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n var self = this;\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-group-item-text\",\r\n textAlign: \"left\",\r\n text: o.text,\r\n value: o.value,\r\n height: o.height\r\n });\r\n\r\n this.icon1 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls1,\r\n width: 36,\r\n disableSelected: true,\r\n selected: this._digest(o.value)\r\n });\r\n\r\n this.icon2 = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: o.iconCls2,\r\n width: 24,\r\n forceNotSelected: true\r\n });\r\n\r\n var blank = BI.createWidget({\r\n type: \"bi.layout\",\r\n width: 24\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.icon2,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", this.icon1, this.text, blank)\r\n }))));\r\n\r\n this.element.hover(function () {\r\n if (self.isEnabled()) {\r\n self.hover();\r\n }\r\n }, function () {\r\n if (self.isEnabled()) {\r\n self.dishover();\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n var self = this, o = this.options;\r\n v = BI.isArray(v) ? v : [v];\r\n return BI.any(v, function (idx, value) {\r\n return BI.contains(o.childValues, value);\r\n });\r\n },\r\n\r\n hover: function () {\r\n BI.DownListGroupItem.superclass.hover.apply(this, arguments);\r\n this.icon1.element.addClass(\"hover\");\r\n this.icon2.element.addClass(\"hover\");\r\n\r\n },\r\n\r\n dishover: function () {\r\n BI.DownListGroupItem.superclass.dishover.apply(this, arguments);\r\n this.icon1.element.removeClass(\"hover\");\r\n this.icon2.element.removeClass(\"hover\");\r\n },\r\n\r\n doClick: function () {\r\n BI.DownListGroupItem.superclass.doClick.apply(this, arguments);\r\n if (this.isValid()) {\r\n this.fireEvent(BI.DownListGroupItem.EVENT_CHANGE, this.getValue());\r\n }\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.icon1.setSelected(this._digest(v));\r\n }\r\n});\r\nBI.DownListGroupItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.down_list_group_item\", BI.DownListGroupItem);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.DownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 24,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.DownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.items = BI.deepClone(this.options.items);\r\n var self = this, o = this.options, children = this._createChildren(this.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n self.fireEvent(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, self.fatherValueMap[value]);\r\n } else {\r\n self.fireEvent(BI.DownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createChildren: function (items) {\r\n var self = this, result = [];\r\n // 不能修改populate进来的item的引用\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n // popup未初始化返回的是options中的value, 在经过buttontree的getValue concat之后,无法区分值来自options\r\n // 还是item自身, 这边控制defaultInit为true来避免这个问题\r\n item.isDefaultInit = true;\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5,\r\n maxHeight: 378\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-split-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10,\r\n rgap: 0\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n return fatherValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var value = [];\r\n BI.each(this.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = BI.map(item.children, \"value\");\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.DownListPopup.superclass.populate.apply(this, arguments);\r\n this.items = BI.deepClone(items);\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n this.singleValues = [];\r\n var children = this._createChildren(this.items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n this.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n valueItem.value = fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.DownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.down_list_popup\", BI.DownListPopup);!(function () {\r\n BI.DynamicDateHelper = {};\r\n BI.extend(BI.DynamicDateHelper, {\r\n getCalculation: function (obj) {\r\n var date = BI.getDate();\r\n\r\n return this.getCalculationByDate(date, obj);\r\n },\r\n\r\n getCalculationByDate: function (date, obj) {\r\n if (BI.isNotNull(obj.year)) {\r\n date = BI.getDate((date.getFullYear() + BI.parseInt(obj.year)), date.getMonth(), date.getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n date = BI.getOffsetQuarter(date, BI.parseInt(obj.quarter));\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n date = BI.getOffsetMonth(date, BI.parseInt(obj.month));\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.week) * 7);\r\n }\r\n if (BI.isNotNull(obj.day)) {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.day));\r\n }\r\n if (BI.isNotNull(obj.workDay)) {\r\n // 配置了节假日就按照节假日计算工作日偏移,否则按正常的天去算\r\n if(BI.isNotNull(BI.holidays)) {\r\n var count = Math.abs(obj.workDay);\r\n for (var i = 0; i < count; i++) {\r\n date = BI.getOffsetDate(date, obj.workDay < 0 ? -1 : 1);\r\n if(BI.isNotNull(BI.holidays[BI.print(date, \"%Y-%X-%d\")])) {\r\n i--;\r\n }\r\n }\r\n } else {\r\n date = BI.getOffsetDate(date, BI.parseInt(obj.workDay));\r\n }\r\n }\r\n if (BI.isNotNull(obj.position) && obj.position !== BI.DynamicDateCard.OFFSET.CURRENT) {\r\n date = this.getBeginDate(date, obj);\r\n }\r\n\r\n return BI.getDate(date.getFullYear(), date.getMonth(), date.getDate());\r\n },\r\n\r\n getBeginDate: function (date, obj) {\r\n if (BI.isNotNull(obj.day)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.week)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getWeekStartDate(date) : BI.getWeekEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.month)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), date.getMonth(), 1) : BI.getDate(date.getFullYear(), date.getMonth(), (BI.getLastDateOfMonth(date)).getDate());\r\n }\r\n if (BI.isNotNull(obj.quarter)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getQuarterStartDate(date) : BI.getQuarterEndDate(date);\r\n }\r\n if (BI.isNotNull(obj.year)) {\r\n return obj.position === BI.DynamicDateCard.OFFSET.BEGIN ? BI.getDate(date.getFullYear(), 0, 1) : BI.getDate(date.getFullYear(), 11, 31);\r\n }\r\n return date;\r\n }\r\n });\r\n})();\r\nBI.DynamicDateCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n this.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 12,\r\n lgap: 10\r\n },\r\n tgap: 10,\r\n bgap: 5\r\n }, {\r\n type: \"bi.button_group\",\r\n ref: function () {\r\n self.checkgroup = this;\r\n },\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n lgap: 4,\r\n value: [BI.DynamicDateCard.TYPE.YEAR],\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year\"),\r\n value: BI.DynamicDateCard.TYPE.YEAR\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Single_Quarter\"),\r\n value: BI.DynamicDateCard.TYPE.QUARTER\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month\"),\r\n value: BI.DynamicDateCard.TYPE.MONTH\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week\"),\r\n value: BI.DynamicDateCard.TYPE.WEEK\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Day\"),\r\n value: BI.DynamicDateCard.TYPE.DAY\r\n }], {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: true\r\n }\r\n }),\r\n layouts: [{\r\n type: \"bi.left\",\r\n rgap: 4\r\n }],\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n var value = self.checkgroup.getValue();\r\n if(value.length !== 0) {\r\n self.workDayBox.setSelected(false);\r\n }\r\n\r\n var plainValue = {};\r\n BI.each(self.resultPane.getAllButtons(), function (idx, button) {\r\n var value = button.getValue();\r\n if(BI.isNotNull(value.dateType)) {\r\n plainValue[value.dateType] = {\r\n value: value.value,\r\n offset: value.offset\r\n };\r\n }\r\n });\r\n self.resultPane.populate(self._getParamJson(BI.map(self.checkgroup.getValue(), function (idx, v) {\r\n var obj = {\r\n dateType: v\r\n };\r\n if(BI.has(plainValue, v)) {\r\n obj.value = plainValue[v].value;\r\n obj.offset = plainValue[v].offset;\r\n }\r\n return obj;\r\n })));\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.vertical_adapt\",\r\n lgap: 2,\r\n items: [{\r\n el: {\r\n type: \"bi.multi_select_item\",\r\n ref: function () {\r\n self.workDayBox = this;\r\n },\r\n logic: {\r\n dynamic: true\r\n },\r\n text: BI.i18nText(\"BI-Basic_Work_Day\"),\r\n value: BI.DynamicDateCard.TYPE.WORK_DAY,\r\n listeners: [{\r\n eventName: BI.MultiSelectItem.EVENT_CHANGE,\r\n action: function () {\r\n if(this.isSelected()) {\r\n self.checkgroup.setValue();\r\n }\r\n self.resultPane.populate(this.isSelected() ? self._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.WORK_DAY\r\n }]) : []);\r\n self.position = BI.DynamicDateCard.OFFSET.CURRENT;\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }\r\n }],\r\n ref: function () {\r\n self.workDay = this;\r\n }\r\n }, {\r\n type: \"bi.button_group\",\r\n items: this._getParamJson([{\r\n dateType: BI.DynamicDateCard.TYPE.YEAR\r\n }]),\r\n ref: function () {\r\n self.resultPane = this;\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n bgap: 10,\r\n hgap: 10\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getParamJson: function (values, positionValue) {\r\n var self = this;\r\n var items = BI.map(values, function (idx, value) {\r\n return {\r\n el: {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: value.dateType,\r\n value: value.value,\r\n offset: value.offset,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n tgap: idx === 0 ? 5 : 0\r\n };\r\n });\r\n\r\n if(values.length === 1 && values[0].dateType === BI.DynamicDateCard.TYPE.DAY) {\r\n var comboItems = this._getText(BI.DynamicDateCard.TYPE.MONTH);\r\n comboItems[0].text = BI.i18nText(\"BI-Basic_Empty\");\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: comboItems,\r\n container: null,\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n }else{\r\n if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {\r\n items.push({\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n container: null,\r\n items: this._getText(BI.last(values).dateType),\r\n value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.position = this.getValue()[0];\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n });\r\n\r\n }\r\n }\r\n\r\n return items;\r\n },\r\n\r\n _getText: function (lastValue) {\r\n switch (lastValue) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Year_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Quarter_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Month_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n default:\r\n return [{\r\n text: BI.i18nText(\"BI-Basic_Current_Day\"),\r\n value: BI.DynamicDateCard.OFFSET.CURRENT\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_Begin\"),\r\n value: BI.DynamicDateCard.OFFSET.BEGIN\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Week_End\"),\r\n value: BI.DynamicDateCard.OFFSET.END\r\n }];\r\n }\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n this.position = v.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n var values = [];\r\n var valuesItems = [];\r\n if(BI.isNotNull(v.year)) {\r\n values.push(BI.DynamicDateCard.TYPE.YEAR);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n }\r\n if(BI.isNotNull(v.quarter)) {\r\n values.push(BI.DynamicDateCard.TYPE.QUARTER);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n }\r\n if(BI.isNotNull(v.month)) {\r\n values.push(BI.DynamicDateCard.TYPE.MONTH);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n }\r\n if(BI.isNotNull(v.week)) {\r\n values.push(BI.DynamicDateCard.TYPE.WEEK);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WEEK, v.week));\r\n }\r\n if(BI.isNotNull(v.day)) {\r\n values.push(BI.DynamicDateCard.TYPE.DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.DAY, v.day));\r\n }\r\n if(BI.isNotNull(v.workDay)) {\r\n values.push(BI.DynamicDateCard.TYPE.WORK_DAY);\r\n valuesItems.push(this._createValue(BI.DynamicDateCard.TYPE.WORK_DAY, v.workDay));\r\n }\r\n this.checkgroup.setValue(values);\r\n this.workDayBox.setSelected(BI.isNotNull(v.workDay));\r\n this.resultPane.populate(this._getParamJson(valuesItems, v.position));\r\n },\r\n\r\n getValue: function () {\r\n var self = this;\r\n var valueMap = {};\r\n var selectValues = this.checkgroup.getValue();\r\n var buttons = this.resultPane.getAllButtons();\r\n if(selectValues.length !== 0) {\r\n BI.each(buttons, function (idx, button) {\r\n var value = button.getValue();\r\n switch (value.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n valueMap.year = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n valueMap.quarter = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n valueMap.month = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n valueMap.week = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n valueMap.day = (value.offset === 0 ? -value.value : value.value);\r\n break;\r\n default:\r\n break;\r\n }\r\n if(BI.isNull(value.dateType)) {\r\n valueMap.position = self.position || BI.DynamicDateCard.OFFSET.CURRENT;\r\n }\r\n });\r\n }\r\n if(this.workDayBox.isSelected()) {\r\n var value = buttons[0].getValue();\r\n valueMap.workDay = (value.offset === 0 ? -value.value : value.value);\r\n }\r\n return valueMap;\r\n }\r\n\r\n});\r\nBI.shortcut(\"bi.dynamic_date_card\", BI.DynamicDateCard);\r\n\r\nBI.extend(BI.DynamicDateCard, {\r\n TYPE: {\r\n YEAR: 1,\r\n QUARTER: 2,\r\n MONTH: 3,\r\n WEEK: 4,\r\n DAY: 5,\r\n WORK_DAY: 6\r\n },\r\n OFFSET: {\r\n CURRENT: 1,\r\n BEGIN: 2,\r\n END: 3\r\n }\r\n\r\n});BI.DynamicDateCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n destroyWhenHide: true,\r\n el: {\r\n type: \"bi.dynamic_date_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n format: opts.format,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDatePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n // DEC-4250 和复选下拉一样,点击triggerBtn不默认收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n _defaultState: function () {\r\n\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n }\r\n});\r\n\r\nBI.DynamicDateCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_combo\", BI.DynamicDateCombo);\r\n\r\nBI.extend(BI.DynamicDateCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateParamItem = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-param-item\",\r\n dateType: BI.DynamicDateCard.TYPE.YEAR,\r\n value: 0,\r\n offset: 0,\r\n height: 24\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n cls: \"bi-border\",\r\n height: 22,\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v);\r\n },\r\n value: o.value,\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n errorText: function (v) {\r\n if(BI.isEmptyString(v)) {\r\n return BI.i18nText(\"BI-Basic_Please_Input_Content\");\r\n }\r\n return BI.i18nText(\"BI-Please_Input_Natural_Number\");\r\n },\r\n allowBlank: false,\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n },\r\n width: 60\r\n }, {\r\n el: {\r\n type: \"bi.label\",\r\n height: 24,\r\n text: this._getText()\r\n },\r\n width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20\r\n }, {\r\n type: \"bi.text_value_combo\",\r\n height: 24,\r\n items: [{\r\n text: BI.i18nText(\"BI-Basic_Front\"),\r\n value: 0\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Behind\"),\r\n value: 1\r\n }],\r\n ref: function () {\r\n self.offsetCombo = this;\r\n },\r\n container: null,\r\n value: o.offset,\r\n listeners: [{\r\n eventName: BI.TextValueCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateParamItem.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _getText: function () {\r\n var text = \"\";\r\n switch (this.options.dateType) {\r\n case BI.DynamicDateCard.TYPE.YEAR:\r\n text = BI.i18nText(\"BI-Basic_Year\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.QUARTER:\r\n text = BI.i18nText(\"BI-Basic_Single_Quarter\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.MONTH:\r\n text = BI.i18nText(\"BI-Basic_Month\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WEEK:\r\n text = BI.i18nText(\"BI-Basic_Week\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.DAY:\r\n text = BI.i18nText(\"BI-Basic_Day\");\r\n break;\r\n case BI.DynamicDateCard.TYPE.WORK_DAY:\r\n default:\r\n text = BI.i18nText(\"BI-Basic_Work_Day\");\r\n break;\r\n }\r\n return text;\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {};\r\n v.value = v.value || 0;\r\n v.offset = v.offset || 0;\r\n this.editor.setValue(v.value);\r\n this.offsetCombo.setValue(v.offset);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n dateType: this.options.dateType,\r\n value: this.editor.getValue(),\r\n offset: this.offsetCombo.getValue()[0]\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicDateParamItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_param_item\", BI.DynamicDateParamItem);\r\nBI.DynamicDatePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-popup\",\r\n width: 248,\r\n height: 344\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDatePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n textHeight: c.buttonHeight - 1,\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DateCalendarPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDatePopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDatePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDatePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_popup\", BI.DynamicDatePopup);BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Date_Trigger_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [0, 1, 2];\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n default:\r\n result[2] = idx;\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g);\r\n var newArray = [];\r\n BI.each(dateArray, function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 这边之所以不直接返回join结果是因为年的格式可能只有2位,所以需要format一下\r\n if(newArray.length === result.length && newArray[0].length === 2) {\r\n return BI.print(BI.parseDateTime(newArray.join(\"-\"), c.compareFormat), c.compareFormat);\r\n }\r\n // 这边format成-20-也没关系, 反正都是不合法的\r\n return newArray.join(\"-\");\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, this._getFormatString()), this._const.compareFormat);\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n var dateStr = BI.print(date, this._const.compareFormat);\r\n return (date.getMonth() >= 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_trigger\", BI.DynamicDateTrigger);\r\nBI.DynamicDateTimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 259,\r\n popupWidth: 270,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-combo bi-border bi-focus-shadow bi-border-radius\",\r\n height: 22,\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\",\r\n format: \"\",\r\n allowEdit: true\r\n },\r\n\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n var date = BI.getDate();\r\n this.storeValue = opts.value;\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: opts.height\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n destroyWhenHide: true,\r\n container: opts.container,\r\n ref: function () {\r\n self.combo = this;\r\n },\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.dynamic_date_time_trigger\",\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n height: opts.height,\r\n value: opts.value,\r\n ref: function () {\r\n self.trigger = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_STOP,\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK,\r\n action: function () {\r\n self.combo.toggle();\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_ERROR,\r\n action: function () {\r\n self.storeValue = {\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1\r\n }\r\n };\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_ERROR);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_VALID);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimeTrigger.EVENT_CONFIRM,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: {\r\n type: \"bi.dynamic_date_time_popup\",\r\n behaviors: opts.behaviors,\r\n min: opts.minDate,\r\n max: opts.maxDate,\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({\r\n type: BI.DynamicDateTimeCombo.Static,\r\n value: {\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate(),\r\n hour: 0,\r\n minute: 0,\r\n second: 0\r\n }\r\n });\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n var value = self.popup.getValue();\r\n if(self._checkValue(value)) {\r\n self.setValue(value);\r\n }\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicDateTimePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n },\r\n stopPropagation: false\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.popup.setMinDate(opts.minDate);\r\n self.popup.setMaxDate(opts.maxDate);\r\n self.fireEvent(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n // DEC-4250 和复选下拉一样,点击不收起\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-font\",\r\n width: opts.height,\r\n height: opts.height,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function () {\r\n self.triggerBtn = this;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }],\r\n ref: function (_ref) {\r\n self.comboWrapper = _ref;\r\n }\r\n };\r\n },\r\n\r\n mounted: function () {\r\n this._checkDynamicValue(this.storeValue);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var o = this.options;\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateTimeCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = o.height;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n _checkValue: function (v) {\r\n switch (v.type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return BI.isNotEmptyObject(v.value);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return true;\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n var o = this.options;\r\n o.minDate = minDate;\r\n this.trigger.setMinDate(minDate);\r\n this.popup && this.popup.setMinDate(minDate);\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n var o = this.options;\r\n o.maxDate = maxDate;\r\n this.trigger.setMaxDate(maxDate);\r\n this.popup && this.popup.setMaxDate(maxDate);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n});\r\n\r\nBI.DynamicDateTimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicDateTimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.dynamic_date_time_combo\", BI.DynamicDateTimeCombo);\r\n\r\nBI.extend(BI.DynamicDateTimeCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-dynamic-date-time-popup\",\r\n width: 248,\r\n height: 385\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimePopup.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicDateCombo.Static};\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Multi_Date_Today\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n });\r\n this.setValue(opts.value);\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Multi_Date_YMD\"),\r\n value: BI.DynamicDateCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicDateCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_date_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n type: \"bi.date_calendar_popup\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n ref: function () {\r\n self.ymd = this;\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.dynamic_date_time_select\",\r\n cls: \"bi-split-top\",\r\n ref: function () {\r\n self.timeSelect = this;\r\n }\r\n },\r\n height: 40\r\n }]\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicDateCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n self.timeSelect.setValue();\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicDateCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%X-%d\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.ymd.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.ymd.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (this._checkValueValid(value)) {\r\n var date = BI.getDate();\r\n this.ymd.setValue({\r\n year: date.getFullYear(),\r\n month: date.getMonth() + 1,\r\n day: date.getDate()\r\n });\r\n this.timeSelect.setValue();\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n } else {\r\n this.ymd.setValue(value);\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n this.textButton.setValue(BI.i18nText(\"BI-Multi_Date_Today\"));\r\n }\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n var type = this.dateTab.getSelect();\r\n return {\r\n type: type,\r\n value: type === BI.DynamicDateTimeCombo.Static ? BI.extend(this.ymd.getValue(), this.timeSelect.getValue()) : this.dynamicPane.getValue()\r\n };\r\n }\r\n});\r\nBI.DynamicDateTimePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicDateTimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_date_time_popup\", BI.DynamicDateTimePopup);BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-date-time-select\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.center_adapt\",\r\n items: [{\r\n type: \"bi.vertical_adapt\",\r\n items: [{\r\n el: {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.hour = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-23\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkHour(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.HOUR);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.minute = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMinute(value);\r\n this.setValue(self._formatValueToDoubleDigit(value), BI.DynamicDateTimeSelect.MINUTE);\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.SignEditor.EVENT_CHANGE,\r\n action: function () {\r\n var value = self._autoSwitch(this.getValue(), BI.DynamicDateTimeSelect.MINUTE);\r\n this.setValue(value);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }, {\r\n type: \"bi.label\",\r\n text: \":\",\r\n width: 20\r\n }, {\r\n type: \"bi.number_editor\",\r\n ref: function () {\r\n self.second = this;\r\n },\r\n validationChecker: function (v) {\r\n return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;\r\n },\r\n errorText: function (v) {\r\n if(BI.isNumeric(v)) {\r\n return BI.i18nText(\"BI-Basic_Input_From_To_Number\", \"\\\"00-59\\\"\");\r\n }\r\n return BI.i18nText(\"BI-Numerical_Interval_Input_Data\");\r\n },\r\n listeners: [{\r\n eventName: BI.SignEditor.EVENT_CONFIRM,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkSecond(value);\r\n this.setValue(self._formatValueToDoubleDigit(value));\r\n self.fireEvent(BI.DynamicDateTimeSelect.EVENT_CONFIRM);\r\n }\r\n }],\r\n width: 60,\r\n height: 24\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n _checkBorder: function (v) {\r\n v = v || {};\r\n this._checkHour(v.hour);\r\n this._checkMinute(v.minute);\r\n this._checkSecond(v.second);\r\n },\r\n\r\n _checkHour: function (value) {\r\n this.hour.setDownEnable(BI.parseInt(value) > 0);\r\n this.hour.setUpEnable(BI.parseInt(value) < 23);\r\n },\r\n\r\n _checkMinute: function (value) {\r\n this.minute.setDownEnable(BI.parseInt(value) > 0);\r\n this.minute.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _checkSecond: function (value) {\r\n this.second.setDownEnable(BI.parseInt(value) > 0);\r\n this.second.setUpEnable(BI.parseInt(value) < 59);\r\n },\r\n\r\n _autoSwitch: function (v, type) {\r\n var limit = 0;\r\n var value = v + \"\";\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n limit = 2;\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n limit = 5;\r\n break;\r\n default:\r\n break;\r\n }\r\n if(value.length === 1 && BI.parseInt(value) > limit) {\r\n value = \"0\" + value;\r\n }\r\n if (value.length === 2) {\r\n switch (type) {\r\n case BI.DynamicDateTimeSelect.HOUR:\r\n this.hour.isEditing() && this.minute.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.MINUTE:\r\n this.minute.isEditing() && this.second.focus();\r\n break;\r\n case BI.DynamicDateTimeSelect.SECOND:\r\n default:\r\n break;\r\n }\r\n }\r\n return value;\r\n },\r\n\r\n _formatValueToDoubleDigit: function (v) {\r\n if(BI.isNull(v) || BI.isEmptyString(v)) {\r\n v = 0;\r\n }\r\n var value = BI.parseInt(v);\r\n if(value < 10) {\r\n value = \"0\" + value;\r\n }\r\n return value;\r\n },\r\n\r\n _assertValue: function (v) {\r\n v = v || {};\r\n v.hour = this._formatValueToDoubleDigit(v.hour) || \"00\";\r\n v.minute = this._formatValueToDoubleDigit(v.minute) || \"00\";\r\n v.second = this._formatValueToDoubleDigit(v.second) || \"00\";\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n hour: BI.parseInt(this.hour.getValue()),\r\n minute: BI.parseInt(this.minute.getValue()),\r\n second: BI.parseInt(this.second.getValue())\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._assertValue(v);\r\n this.hour.setValue(v.hour);\r\n this.minute.setValue(v.minute);\r\n this.second.setValue(v.second);\r\n this._checkBorder(v);\r\n }\r\n\r\n});\r\nBI.DynamicDateTimeSelect.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.dynamic_date_time_select\", BI.DynamicDateTimeSelect);\r\n\r\nBI.extend(BI.DynamicDateTimeSelect, {\r\n HOUR: 1,\r\n MINUTE: 2,\r\n SECOND: 3\r\n});BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2,\r\n yearLength: 4,\r\n yearMonthLength: 6,\r\n yearFullMonthLength: 7,\r\n compareFormat: \"%Y-%X-%d %H:%M:%S\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-date-time-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24,\r\n format: \"\", // 显示的日期格式化方式\r\n allowEdit: true, // 是否允许编辑\r\n watermark: \"\"\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.storeTriggerValue = \"\";\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n var formatStr = self._getStandardDateStr(v);\r\n var date = formatStr.match(/\\d+/g);\r\n !BI.isKey(o.format) && self._autoAppend(v, date);\r\n return self._dateCheck(formatStr) && BI.checkDateLegal(formatStr) && self._checkVoid({\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0\r\n });\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function () {\r\n var str = \"\";\r\n if (!BI.isKey(o.format)) {\r\n str = self.editor.isEditing() ? BI.i18nText(\"BI-Basic_Date_Time_Error_Text\") : BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n return str;\r\n },\r\n title: BI.bind(this._getTitle, this)\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_VALID);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var formatStr = self._getStandardDateStr(value);\r\n var date = formatStr.match(/\\d+/g);\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: date[0] | 0,\r\n month: date[1] | 0,\r\n day: date[2] | 0,\r\n hour: date[3] | 0,\r\n minute: date[4] | 0,\r\n second: date[5] | 0\r\n }\r\n };\r\n }\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_CHANGE);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: BI.bind(this._getTitle, this)\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, this._getFormatString());\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n return \"\";\r\n }\r\n return BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n }\r\n },\r\n\r\n _getStandardDateStr: function (v) {\r\n var c = this._const;\r\n var result = [];\r\n var hasSecond = false;\r\n var formatArray = this._getFormatString().match(/%./g);\r\n BI.each(formatArray, function (idx, v) {\r\n switch (v) {\r\n case \"%Y\":\r\n case \"%y\":\r\n result[0] = idx;\r\n break;\r\n case \"%X\":\r\n case \"%x\":\r\n result[1] = idx;\r\n break;\r\n case \"%d\":\r\n case \"%e\":\r\n result[2] = idx;\r\n break;\r\n case \"%S\":\r\n hasSecond = true;\r\n break;\r\n default:\r\n break;\r\n }\r\n });\r\n // 这边不能直接用\\d+去切日期, 因为format格式可能是20190607这样的没有分割符的 = =\r\n // 先看一下是否是合法的, 如果合法就变成标准格式的走原来的流程, 不合法不关心\r\n var date = BI.parseDateTime(v, this._getFormatString());\r\n if(BI.print(date, this._getFormatString()) === v) {\r\n v = BI.print(date, c.compareFormat);\r\n result = [0, 1, 2];\r\n }\r\n var dateArray = v.match(/\\d+/g) || [];\r\n var newArray = [];\r\n // 处理乱序的年月日\r\n BI.each(dateArray.slice(0, 3), function (idx) {\r\n newArray[idx] = dateArray[result[idx]];\r\n });\r\n // 拼接时分秒和pm\r\n var suffixArray = dateArray.slice(3);\r\n // 时分秒补0\r\n BI.each(suffixArray, function (idx, v) {\r\n BI.isNumeric(v) && v.length === 1 && (suffixArray[idx] = \"0\" + v);\r\n });\r\n // hh:mm\r\n if(suffixArray.length === 2 && !hasSecond) {\r\n suffixArray.push(\"00\");\r\n }\r\n var suffixString = suffixArray.join(\":\");\r\n var dateString = newArray.slice(0, 3).join(\"-\");\r\n if (BI.isNotEmptyString(suffixString)) {\r\n dateString += \" \" + suffixString;\r\n }\r\n return dateString;\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.compareFormat;\r\n },\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date ||\r\n\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, this.options.min, this.options.max)[0];\r\n },\r\n _autoAppend: function (v, dateObj) {\r\n if (BI.isNotNull(dateObj) && BI.checkDateLegal(v)) {\r\n switch (v.length) {\r\n case this._const.yearLength:\r\n if (this._yearCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n case this._const.yearMonthLength:\r\n case this._const.yearFullMonthLength:\r\n var splitMonth = v.split(\"-\")[1];\r\n if ((BI.isNotNull(splitMonth) && splitMonth.length === 2) || this._monthCheck(v)) {\r\n this.editor.setValue(v + \"-\");\r\n }\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _monthCheck: function (v) {\r\n var date = BI.parseDateTime(v, \"%Y-%X-%d\");\r\n var dateStr = BI.print(date, \"%Y-%X-%d\");\r\n return (date.getMonth() > 0 && (BI.print(BI.parseDateTime(v, \"%Y-%X\"), \"%Y-%X\") === v ||\r\n BI.print(BI.parseDateTime(v, \"%Y-%x\"), \"%Y-%x\") === v)) && dateStr >= this.options.min && dateStr <= this.options.max;\r\n },\r\n\r\n _setInnerValue: function (date) {\r\n var dateStr = BI.print(date, this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n var endText = \"\";\r\n if(BI.isNotNull(obj.year)) {\r\n if(BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Year\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.quarter)) {\r\n if(BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Single_Quarter\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.month)) {\r\n if(BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.week)) {\r\n if(BI.parseInt(obj.week) !== 0) {\r\n value += Math.abs(obj.week) + BI.i18nText(\"BI-Basic_Week\") + (obj.week < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = getPositionText(BI.i18nText(\"BI-Basic_Week\"), obj.position);\r\n }\r\n if(BI.isNotNull(obj.day)) {\r\n if(BI.parseInt(obj.day) !== 0) {\r\n value += Math.abs(obj.day) + BI.i18nText(\"BI-Basic_Day\") + (obj.day < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n endText = BI.size(obj) === 1 ? getPositionText(BI.i18nText(\"BI-Basic_Month\"), obj.position) : \"\";\r\n }\r\n if(BI.isNotNull(obj.workDay) && BI.parseInt(obj.workDay) !== 0) {\r\n value += Math.abs(obj.workDay) + BI.i18nText(\"BI-Basic_Work_Day\") + (obj.workDay < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value + endText;\r\n\r\n function getPositionText (baseText, position) {\r\n switch (position) {\r\n case BI.DynamicDateCard.OFFSET.BEGIN:\r\n return baseText + BI.i18nText(\"BI-Basic_Begin_Start\");\r\n case BI.DynamicDateCard.OFFSET.END:\r\n return baseText + BI.i18nText(\"BI-Basic_End_Stop\");\r\n case BI.DynamicDateCard.OFFSET.CURRENT:\r\n default:\r\n return BI.i18nText(\"BI-Basic_Current_Day\");\r\n }\r\n }\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (BI.isNotEmptyString(this.options.min)) {\r\n this.options.min = minDate;\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (BI.isNotEmptyString(this.options.max)) {\r\n this.options.max = maxDate;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value, self = this;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n if (BI.isNull(value) || BI.isNull(value.day)) {\r\n this.editor.setState(\"\");\r\n this.editor.setValue(\"\");\r\n } else {\r\n var dateStr = BI.print(BI.getDate(value.year, (value.month - 1), value.day, value.hour || 0, value.minute || 0,\r\n value.second || 0), this._getFormatString());\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n }\r\n break;\r\n }\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n\r\n});\r\n\r\nBI.DynamicDateTimeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.DynamicDateTimeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicDateTimeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicDateTimeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicDateTimeTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicDateTimeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DynamicDateTimeTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicDateTimeTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicDateTimeTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.DynamicDateTimeTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_date_time_trigger\", BI.DynamicDateTimeTrigger);/**\r\n * Created by roy on 15/9/14.\r\n */\r\nBI.SearchEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-search-editor bi-border bi-focus-shadow\",\r\n height: 24,\r\n errorText: \"\",\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n this.options.height -= 2;\r\n BI.SearchEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n hgap: 1,\r\n errorText: o.errorText,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n value: o.value\r\n });\r\n this.clear = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n stopEvent: true,\r\n cls: \"close-font\"\r\n });\r\n this.clear.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self.setValue(\"\");\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, BI.Events.STOPEDIT);\r\n // 从有内容到无内容的清空也是一次change\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.SearchEditor.EVENT_CLEAR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.icon_label\",\r\n cls: \"search-font\"\r\n },\r\n width: 24\r\n },\r\n {\r\n el: self.editor\r\n },\r\n {\r\n el: this.clear,\r\n width: 24\r\n }\r\n ]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.SearchEditor.EVENT_KEY_DOWN, v);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ERROR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self._checkClear();\r\n self.fireEvent(BI.SearchEditor.EVENT_EMPTY);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchEditor.EVENT_STOP);\r\n });\r\n\r\n this.clear.invisible();\r\n },\r\n\r\n _checkClear: function () {\r\n if (!this.getValue()) {\r\n this.clear.invisible();\r\n } else {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n getValue: function () {\r\n if (this.isValid()) {\r\n return this.editor.getValue();\r\n }\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n if (BI.isKey(v)) {\r\n this.clear.visible();\r\n }\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n }\r\n});\r\nBI.SearchEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SearchEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SearchEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.SearchEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.SearchEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.SearchEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\nBI.SearchEditor.EVENT_CLEAR = \"EVENT_CLEAR\";\r\n\r\nBI.SearchEditor.EVENT_START = \"EVENT_START\";\r\nBI.SearchEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SearchEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SearchEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.SearchEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.SearchEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.SearchEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.SearchEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.SearchEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\nBI.shortcut(\"bi.search_editor\", BI.SearchEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallSearchEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallSearchEditor = BI.inherit(BI.SearchEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallSearchEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-search-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallSearchEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_search_editor\", BI.SmallSearchEditor);/**\r\n * guy\r\n * @class BI.TextEditor\r\n * @extends BI.Single\r\n */\r\nBI.TextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.TextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-text-editor bi-border bi-focus-shadow\",\r\n hgap: 4,\r\n vgap: 2,\r\n lgap: 0,\r\n rgap: 0,\r\n tgap: 0,\r\n bgap: 0,\r\n validationChecker: BI.emptyFn,\r\n quitChecker: BI.emptyFn,\r\n allowBlank: false,\r\n watermark: \"\",\r\n errorText: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNumber(o.height)) {\r\n this.element.css({height: o.height - 2});\r\n }\r\n if (BI.isNumber(o.width)) {\r\n this.element.css({width: o.width - 2});\r\n }\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height - 2,\r\n hgap: o.hgap,\r\n vgap: o.vgap,\r\n lgap: o.lgap,\r\n rgap: o.rgap,\r\n tgap: o.tgap,\r\n bgap: o.bgap,\r\n value: o.value,\r\n title: o.title,\r\n tipType: o.tipType,\r\n validationChecker: o.validationChecker,\r\n quitChecker: o.quitChecker,\r\n allowBlank: o.allowBlank,\r\n watermark: o.watermark,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.Editor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_BLUR);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CLICK, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CLICK);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_KEY_DOWN);\r\n });\r\n this.editor.on(BI.Editor.EVENT_SPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_SPACE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_BACKSPACE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_BACKSPACE);\r\n });\r\n\r\n\r\n this.editor.on(BI.Editor.EVENT_VALID, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_VALID);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_CHANGE_CONFIRM);\r\n });\r\n this.editor.on(BI.Editor.EVENT_REMOVE, function (v) {\r\n self.fireEvent(BI.TextEditor.EVENT_REMOVE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_START, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_START);\r\n });\r\n this.editor.on(BI.Editor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.Editor.EVENT_STOP, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_STOP);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ERROR, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ENTER, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_ENTER);\r\n });\r\n this.editor.on(BI.Editor.EVENT_RESTRICT, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_RESTRICT);\r\n });\r\n this.editor.on(BI.Editor.EVENT_EMPTY, function () {\r\n self.fireEvent(BI.TextEditor.EVENT_EMPTY);\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n },\r\n\r\n setWaterMark: function (v) {\r\n this.options.watermark = v;\r\n this.editor.setWaterMark(v);\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n }\r\n});\r\nBI.TextEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.TextEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TextEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TextEditor.EVENT_CLICK = \"EVENT_CLICK\";\r\nBI.TextEditor.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.TextEditor.EVENT_SPACE = \"EVENT_SPACE\";\r\nBI.TextEditor.EVENT_BACKSPACE = \"EVENT_BACKSPACE\";\r\n\r\nBI.TextEditor.EVENT_START = \"EVENT_START\";\r\nBI.TextEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.TextEditor.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.TextEditor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TextEditor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TextEditor.EVENT_ENTER = \"EVENT_ENTER\";\r\nBI.TextEditor.EVENT_RESTRICT = \"EVENT_RESTRICT\";\r\nBI.TextEditor.EVENT_REMOVE = \"EVENT_REMOVE\";\r\nBI.TextEditor.EVENT_EMPTY = \"EVENT_EMPTY\";\r\n\r\nBI.shortcut(\"bi.text_editor\", BI.TextEditor);/**\r\n * 小号搜索框\r\n * Created by GUY on 2015/9/29.\r\n * @class BI.SmallTextEditor\r\n * @extends BI.SearchEditor\r\n */\r\nBI.SmallTextEditor = BI.inherit(BI.TextEditor, {\r\n _defaultConfig: function () {\r\n var conf = BI.SmallTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-small-text-editor\",\r\n height: 20\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SmallTextEditor.superclass._init.apply(this, arguments);\r\n }\r\n});\r\nBI.shortcut(\"bi.small_text_editor\", BI.SmallTextEditor);/**\r\n * Created by zcf on 2016/9/26.\r\n */\r\nBI.IntervalSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 58,\r\n EDITOR_R_GAP: 60,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-interval-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n\r\n var self = this;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.calculation = new BI.AccurateCalculationModel();\r\n\r\n // this.backgroundTrack = BI.createWidget({\r\n // type: \"bi.layout\",\r\n // cls: \"background-track\",\r\n // height: c.TRACK_HEIGHT\r\n // });\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.labelOne = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelOne.element.hover(function () {\r\n self.labelOne.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelOne.element.removeClass(\"bi-border\");\r\n });\r\n this.labelOne.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueOne = self.valueOne;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueOne = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 分成1000份\r\n self._setSliderOnePosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(oldValueOne, self.valueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.labelTwo = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: this.options.unit,\r\n allowBlank: false,\r\n width: c.EDITOR_WIDTH,\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.labelTwo.element.hover(function () {\r\n self.labelTwo.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.labelTwo.element.removeClass(\"bi-border\");\r\n });\r\n this.labelTwo.on(BI.Editor.EVENT_CONFIRM, function () {\r\n var oldValueTwo = self.valueTwo;\r\n var v = BI.parseFloat(this.getValue());\r\n self.valueTwo = v;\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderTwoPosition(significantPercent);\r\n self._setBlueTrack();\r\n self._checkLabelPosition(self.valueOne, oldValueTwo, self.valueOne, self.valueTwo);\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n });\r\n\r\n this.sliderOne = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this.sliderTwo = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.sliderOne, true);\r\n this._draggable(this.sliderTwo, false);\r\n this._setVisible(false);\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: 7,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n },\r\n this._createLabelWrapper(),\r\n this._createSliderWrapper()\r\n ]\r\n };\r\n },\r\n\r\n _rePosBySizeAfterMove: function (size, isLeft) {\r\n var o = this.options;\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n var v = this._getValueByPercent(significantPercent);\r\n v = this._assertValue(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n var oldValueOne = this.valueOne, oldValueTwo = this.valueTwo;\r\n if(isLeft) {\r\n this._setSliderOnePosition(significantPercent);\r\n this.labelOne.setValue(v);\r\n this.valueOne = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, v, this.valueTwo);\r\n }else{\r\n this._setSliderTwoPosition(significantPercent);\r\n this.labelTwo.setValue(v);\r\n this.valueTwo = v;\r\n this._checkLabelPosition(oldValueOne, oldValueTwo, this.valueOne, v);\r\n }\r\n this._setBlueTrack();\r\n },\r\n\r\n _rePosBySizeAfterStop: function (size, isLeft) {\r\n var percent = size * 100 / (this._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n isLeft ? this._setSliderOnePosition(significantPercent) : this._setSliderTwoPosition(significantPercent);\r\n },\r\n\r\n _draggable: function (widget, isLeft) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n self._rePosBySizeAfterMove(size, isLeft);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n self._rePosBySizeAfterStop(size, isLeft);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.IntervalSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createLabelWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.labelTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n rgap: c.EDITOR_R_GAP,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createSliderWrapper: function () {\r\n var c = this._constant;\r\n return {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderOne,\r\n top: 0,\r\n left: \"0%\"\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.sliderTwo,\r\n top: 0,\r\n left: \"100%\"\r\n }]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n },\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n };\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n // 像90.这样的既不属于整数又不属于小数,是不合法的值\r\n var dotText = (v + \"\").split(\".\")[1];\r\n if (BI.isEmptyString(dotText)) {\r\n }else{\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n // 虽然规定了所填写的小数位数,但是我们认为所有的整数都是满足设置的小数位数的\r\n // 100等价于100.0 100.00 100.000\r\n if(o.digit === false || BI.isInteger(v)) {\r\n valid = true;\r\n }else{\r\n dotText = dotText || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _checkOverlap: function () {\r\n var labelOneLeft = this.labelOne.element[0].offsetLeft;\r\n var labelTwoLeft = this.labelTwo.element[0].offsetLeft;\r\n if (labelOneLeft <= labelTwoLeft) {\r\n if ((labelTwoLeft - labelOneLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n } else {\r\n if ((labelOneLeft - labelTwoLeft) < 90) {\r\n this.labelTwo.element.css({top: 40});\r\n } else {\r\n this.labelTwo.element.css({top: 0});\r\n }\r\n }\r\n },\r\n\r\n _checkLabelPosition: function (oldValueOne, oldValueTwo, valueOne, valueTwo, isLeft) {\r\n oldValueOne = BI.parseFloat(oldValueOne);\r\n oldValueTwo = BI.parseFloat(oldValueTwo);\r\n valueOne = BI.parseFloat(valueOne);\r\n valueTwo = BI.parseFloat(valueTwo);\r\n if((oldValueOne <= oldValueTwo && valueOne > valueTwo) || (oldValueOne >= oldValueTwo && valueOne < valueTwo)) {\r\n var isSliderOneLeft = BI.parseFloat(this.sliderOne.element[0].style.left) < BI.parseFloat(this.sliderTwo.element[0].style.left);\r\n this._resetLabelPosition(!isSliderOneLeft);\r\n }\r\n },\r\n\r\n _resetLabelPosition: function(needReverse) {\r\n this.labelOne.element.css({left: needReverse ? \"100%\" : \"0%\"});\r\n this.labelTwo.element.css({left: needReverse ? \"0%\" : \"100%\"});\r\n },\r\n\r\n _setSliderOnePosition: function (percent) {\r\n this.sliderOne.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderTwoPosition: function (percent) {\r\n this.sliderTwo.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackLeft: function (percent) {\r\n this.blueTrack.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrackWidth: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setBlueTrack: function () {\r\n var percentOne = this._getPercentByValue(this.labelOne.getValue());\r\n var percentTwo = this._getPercentByValue(this.labelTwo.getValue());\r\n if (percentOne <= percentTwo) {\r\n this._setBlueTrackLeft(percentOne);\r\n this._setBlueTrackWidth(percentTwo - percentOne);\r\n } else {\r\n this._setBlueTrackLeft(percentTwo);\r\n this._setBlueTrackWidth(percentOne - percentTwo);\r\n }\r\n },\r\n\r\n _setAllPosition: function (one, two) {\r\n this._setSliderOnePosition(one);\r\n this._setSliderTwoPosition(two);\r\n this._setBlueTrack();\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.sliderOne.setVisible(visible);\r\n this.sliderTwo.setVisible(visible);\r\n this.labelOne.setVisible(visible);\r\n this.labelTwo.setVisible(visible);\r\n },\r\n\r\n _setErrorText: function () {\r\n var errorText = BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max);\r\n this.labelOne.setErrorText(errorText);\r\n this.labelTwo.setErrorText(errorText);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n // 其中取max-min后保留4为有效数字后的值的小数位数为最终value的精度\r\n // 端点处的值有可能因为min,max相差量级很大(precision很大)而丢失精度,此时直接返回端点值即可\r\n _getValueByPercent: function (percent) {// return (((max-min)*percent)/100+min)\r\n if (percent === 0) {\r\n return this.min;\r\n }\r\n if (percent === 100) {\r\n return this.max;\r\n }\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var mul = this.calculation.accurateMultiplication(sub, percent);\r\n var div = this.calculation.accurateDivisionTenExponent(mul, 2);\r\n if(this.precision < 0) {\r\n var value = BI.parseFloat(this.calculation.accurateAddition(div, this.min));\r\n var reduceValue = Math.round(this.calculation.accurateDivisionTenExponent(value, -this.precision));\r\n return this.calculation.accurateMultiplication(reduceValue, Math.pow(10, -this.precision));\r\n }\r\n return BI.parseFloat(this.calculation.accurateAddition(div, this.min).toFixed(this.precision));\r\n\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setDraggableEnable: function (enable) {\r\n this.sliderOne.setEnable(enable);\r\n this.sliderTwo.setEnable(enable);\r\n },\r\n\r\n _getPrecision: function () {\r\n // 计算每一份值的精度(最大值和最小值的差值保留4为有效数字后的精度)\r\n // 如果差值的整数位数大于4,toPrecision(4)得到的是科学计数法123456 => 1.235e+5\r\n // 返回非负值: 保留的小数位数\r\n // 返回负值: 保留的10^n精度中的n\r\n var sub = this.calculation.accurateSubtraction(this.max, this.min);\r\n var pre = sub.toPrecision(4);\r\n // 科学计数法\r\n var eIndex = pre.indexOf(\"e\");\r\n var arr = [];\r\n if(eIndex > -1) {\r\n arr = pre.split(\"e\");\r\n var decimalPartLength = BI.size(arr[0].split(\".\")[1]);\r\n var sciencePartLength = BI.parseInt(arr[1].substring(1));\r\n return decimalPartLength - sciencePartLength;\r\n }\r\n arr = pre.split(\".\");\r\n return arr.length > 1 ? arr[1].length : 0;\r\n\r\n },\r\n\r\n _assertValue: function (value) {\r\n if(value <= this.min) {\r\n return this.min;\r\n }\r\n if(value >= this.max) {\r\n return this.max;\r\n }\r\n return value;\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.IntervalSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.valueOne <= this.valueTwo) {\r\n return {min: this.valueOne, max: this.valueTwo};\r\n }\r\n return {min: this.valueTwo, max: this.valueOne};\r\n\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber >= minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n this.valueOne = minNumber;\r\n this.valueTwo = maxNumber;\r\n this.precision = this._getPrecision();\r\n this._setDraggableEnable(true);\r\n }\r\n if (maxNumber === minNumber) {\r\n this._setDraggableEnable(false);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n var valueOne = BI.parseFloat(v.min);\r\n var valueTwo = BI.parseFloat(v.max);\r\n valueOne = o.digit === false ? valueOne : BI.parseFloat(valueOne.toFixed(o.digit));\r\n valueTwo = o.digit === false ? valueTwo : BI.parseFloat(valueTwo.toFixed(o.digit));\r\n if (!isNaN(valueOne) && !isNaN(valueTwo)) {\r\n if (this._checkValidation(valueOne)) {\r\n this.valueOne = (this.valueOne <= this.valueTwo ? valueOne : valueTwo);\r\n }\r\n if (this._checkValidation(valueTwo)) {\r\n this.valueTwo = (this.valueOne <= this.valueTwo ? valueTwo : valueOne);\r\n }\r\n if (valueOne < this.min) {\r\n this.valueOne = this.min;\r\n }\r\n if (valueTwo > this.max) {\r\n this.valueTwo = this.max;\r\n }\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.valueOne = \"\";\r\n this.valueTwo = \"\";\r\n this.min = NaN;\r\n this.max = NaN;\r\n this._setBlueTrackWidth(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this.enable = true;\r\n this._setVisible(true);\r\n this._setErrorText();\r\n if ((BI.isNumeric(this.valueOne) || BI.isNotEmptyString(this.valueOne)) && (BI.isNumeric(this.valueTwo) || BI.isNotEmptyString(this.valueTwo))) {\r\n this.labelOne.setValue(o.digit === false ? this.valueOne : BI.parseFloat(this.valueOne).toFixed(o.digit));\r\n this.labelTwo.setValue(o.digit === false ? this.valueTwo : BI.parseFloat(this.valueTwo).toFixed(o.digit));\r\n this._setAllPosition(this._getPercentByValue(this.valueOne), this._getPercentByValue(this.valueTwo));\r\n } else {\r\n this.labelOne.setValue(this.min);\r\n this.labelTwo.setValue(this.max);\r\n this._setAllPosition(0, 100);\r\n }\r\n this._resetLabelPosition(this.valueOne > this.valueTwo);\r\n }\r\n }\r\n});\r\nBI.IntervalSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.interval_slider\", BI.IntervalSlider);/**\r\n * Created by zcf on 2017/3/1.\r\n * 万恶的IEEE-754\r\n * 使用字符串精确计算含小数加法、减法、乘法和10的指数倍除法,支持负数\r\n */\r\nBI.AccurateCalculationModel = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AccurateCalculationModel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AccurateCalculationModel.superclass._init.apply(this, arguments);\r\n },\r\n\r\n _getMagnitude: function (n) {\r\n var magnitude = \"1\";\r\n for (var i = 0; i < n; i++) {\r\n magnitude += \"0\";\r\n }\r\n return BI.parseInt(magnitude);\r\n },\r\n\r\n _formatDecimal: function (stringNumber1, stringNumber2) {\r\n if (stringNumber1.numDecimalLength === stringNumber2.numDecimalLength) {\r\n return;\r\n }\r\n var magnitudeDiff = stringNumber1.numDecimalLength - stringNumber2.numDecimalLength;\r\n if (magnitudeDiff > 0) {\r\n var needAddZero = stringNumber2;\r\n } else {\r\n var needAddZero = stringNumber1;\r\n magnitudeDiff = (0 - magnitudeDiff);\r\n }\r\n for (var i = 0; i < magnitudeDiff; i++) {\r\n if (needAddZero.numDecimal === \"0\" && i === 0) {\r\n continue;\r\n }\r\n needAddZero.numDecimal += \"0\";\r\n }\r\n },\r\n\r\n _stringNumberFactory: function (num) {\r\n var strNum = num.toString();\r\n var numStrArray = strNum.split(\".\");\r\n var numInteger = numStrArray[0];\r\n if (numStrArray.length === 1) {\r\n var numDecimal = \"0\";\r\n var numDecimalLength = 0;\r\n } else {\r\n var numDecimal = numStrArray[1];\r\n var numDecimalLength = numStrArray[1].length;\r\n }\r\n return {\r\n numInteger: numInteger,\r\n numDecimal: numDecimal,\r\n numDecimalLength: numDecimalLength\r\n };\r\n },\r\n\r\n _accurateSubtraction: function (num1, num2) {// num1-num2 && num1>num2\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) - BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n var decimalMaxLength = getDecimalMaxLength(stringNumber1, stringNumber2);\r\n\r\n if (BI.parseInt(stringNumber1.numDecimal) >= BI.parseInt(stringNumber2.numDecimal)) {\r\n var decimalResultTemp = (BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n } else {// 否则借位\r\n integerResult--;\r\n var borrow = this._getMagnitude(decimalMaxLength);\r\n var decimalResultTemp = (borrow + BI.parseInt(stringNumber1.numDecimal) - BI.parseInt(stringNumber2.numDecimal)).toString();\r\n var decimalResult = addZero(decimalResultTemp, decimalMaxLength);\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function getDecimalMaxLength (num1, num2) {\r\n if (num1.numDecimal.length >= num2.numDecimal.length) {\r\n return num1.numDecimal.length;\r\n }\r\n return num2.numDecimal.length;\r\n }\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateAddition: function (num1, num2) {// 加法结合律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) + BI.parseInt(stringNumber2.numInteger);\r\n // 小数部分\r\n this._formatDecimal(stringNumber1, stringNumber2);\r\n\r\n var decimalResult = (BI.parseInt(stringNumber1.numDecimal) + BI.parseInt(stringNumber2.numDecimal)).toString();\r\n\r\n if (decimalResult !== \"0\") {\r\n if (decimalResult.length <= stringNumber1.numDecimal.length) {\r\n decimalResult = addZero(decimalResult, stringNumber1.numDecimal.length);\r\n } else {\r\n integerResult++;// 进一\r\n decimalResult = decimalResult.slice(1);\r\n }\r\n }\r\n var result = integerResult + \".\" + decimalResult;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n _accurateMultiplication: function (num1, num2) {// 乘法分配律\r\n var stringNumber1 = this._stringNumberFactory(num1);\r\n var stringNumber2 = this._stringNumberFactory(num2);\r\n // 整数部分计算\r\n var integerResult = BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numInteger);\r\n // num1的小数和num2的整数\r\n var dec1Int2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numInteger), stringNumber1.numDecimalLength);\r\n // num1的整数和num2的小数\r\n var int1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numInteger) * BI.parseInt(stringNumber2.numDecimal), stringNumber2.numDecimalLength);\r\n // 小数*小数\r\n var dec1dec2 = this._accurateDivisionTenExponent(BI.parseInt(stringNumber1.numDecimal) * BI.parseInt(stringNumber2.numDecimal), (stringNumber1.numDecimalLength + stringNumber2.numDecimalLength));\r\n\r\n return this._accurateAddition(this._accurateAddition(this._accurateAddition(integerResult, dec1Int2), int1dec2), dec1dec2);\r\n },\r\n\r\n _accurateDivisionTenExponent: function (num, n) {// num/10^n && n>0\r\n var stringNumber = this._stringNumberFactory(num);\r\n if (stringNumber.numInteger.length > n) {\r\n var integerResult = stringNumber.numInteger.slice(0, (stringNumber.numInteger.length - n));\r\n var partDecimalResult = stringNumber.numInteger.slice(-n);\r\n } else {\r\n var integerResult = \"0\";\r\n var partDecimalResult = addZero(stringNumber.numInteger, n);\r\n }\r\n var result = integerResult + \".\" + partDecimalResult + stringNumber.numDecimal;\r\n return BI.parseFloat(result);\r\n\r\n function addZero (resultTemp, length) {\r\n var diff = length - resultTemp.length;\r\n for (var i = 0; i < diff; i++) {\r\n resultTemp = \"0\" + resultTemp;\r\n }\r\n return resultTemp;\r\n }\r\n },\r\n\r\n accurateSubtraction: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(num1, num2);\r\n }\r\n return -this._accurateSubtraction(num2, num1);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this._accurateAddition(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateAddition(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n if (num1 >= num2) {\r\n return this._accurateSubtraction(-num2, -num1);\r\n }\r\n return this._accurateSubtraction(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateAddition: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateAddition(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return this.accurateSubtraction(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return this.accurateSubtraction(num2, -num1);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return -this._accurateAddition(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateMultiplication: function (num1, num2) {\r\n if (num1 >= 0 && num2 >= 0) {\r\n return this._accurateMultiplication(num1, num2);\r\n }\r\n if (num1 >= 0 && num2 < 0) {\r\n return -this._accurateMultiplication(num1, -num2);\r\n }\r\n if (num1 < 0 && num2 >= 0) {\r\n return -this._accurateMultiplication(-num1, num2);\r\n }\r\n if (num1 < 0 && num2 < 0) {\r\n return this._accurateMultiplication(-num1, -num2);\r\n }\r\n },\r\n\r\n accurateDivisionTenExponent: function (num1, n) {\r\n if (num1 >= 0) {\r\n return this._accurateDivisionTenExponent(num1, n);\r\n }\r\n return -this._accurateDivisionTenExponent(-num1, n);\r\n }\r\n});/**\r\n * Created by roy on 15/8/14.\r\n */\r\nBI.DownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-down-list-combo\",\r\n height: 24,\r\n items: [],\r\n adjustLength: 0,\r\n direction: \"bottom\",\r\n trigger: \"click\",\r\n container: null,\r\n stopPropagation: false,\r\n el: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popupview = BI.createWidget({\r\n type: \"bi.multi_layer_down_list_popup\",\r\n items: o.items,\r\n chooseType: o.chooseType,\r\n value: o.value\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_CHANGE, function (value) {\r\n self.fireEvent(BI.DownListCombo.EVENT_CHANGE, value);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n this.popupview.on(BI.DownListPopup.EVENT_SON_VALUE_CHANGE, function (value, fatherValue) {\r\n self.fireEvent(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, value, fatherValue);\r\n self.downlistcombo.hideView();\r\n });\r\n\r\n\r\n this.downlistcombo = BI.createWidget({\r\n element: this,\r\n type: \"bi.combo\",\r\n trigger: o.trigger,\r\n isNeedAdjustWidth: false,\r\n container: o.container,\r\n adjustLength: o.adjustLength,\r\n direction: o.direction,\r\n stopPropagation: o.stopPropagation,\r\n el: BI.createWidget(o.el, {\r\n type: \"bi.icon_trigger\",\r\n extraCls: o.iconCls ? o.iconCls : \"pull-down-font\",\r\n width: o.width,\r\n height: o.height\r\n }),\r\n popup: {\r\n el: this.popupview,\r\n stopPropagation: o.stopPropagation,\r\n maxHeight: 1000\r\n }\r\n });\r\n\r\n this.downlistcombo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.DownListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n },\r\n\r\n hideView: function () {\r\n this.downlistcombo.hideView();\r\n },\r\n\r\n showView: function (e) {\r\n this.downlistcombo.showView(e);\r\n },\r\n\r\n populate: function (items) {\r\n this.popupview.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupview.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.popupview.getValue();\r\n }\r\n});\r\nBI.DownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.DownListCombo.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.DownListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_layer_down_list_combo\", BI.DownListCombo);/**\r\n * Created by roy on 15/9/8.\r\n * 处理popup中的item分组样式\r\n * 一个item分组中的成员大于一时,该分组设置为单选,并且默认状态第一个成员设置为已选择项\r\n */\r\nBI.MultiLayerDownListPopup = BI.inherit(BI.Pane, {\r\n constants: {\r\n nextIcon: \"pull-right-e-font\",\r\n height: 25,\r\n iconHeight: 12,\r\n iconWidth: 12,\r\n hgap: 0,\r\n vgap: 0,\r\n border: 1\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerDownListPopup.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: \"bi-down-list-popup\",\r\n items: [],\r\n chooseType: BI.Selection.Multi\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerDownListPopup.superclass._init.apply(this, arguments);\r\n this.singleValues = [];\r\n this.childValueMap = {};\r\n this.fatherValueMap = {};\r\n var self = this, o = this.options, children = this._createPopupItems(o.items);\r\n this.popup = BI.createWidget({\r\n type: \"bi.button_tree\",\r\n items: BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n ),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n hgap: this.constants.hgap,\r\n vgap: this.constants.vgap\r\n }],\r\n value: this._digest(o.value),\r\n chooseType: o.chooseType\r\n });\r\n\r\n this.popup.on(BI.ButtonTree.EVENT_CHANGE, function (value, object) {\r\n var changedValue = value;\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n changedValue = self.childValueMap[value];\r\n var fatherValue = self.fatherValueMap[value];\r\n var fatherArrayValue = (fatherValue + \"\").split(\"_\");\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE, changedValue, fatherArrayValue.length > 1 ? fatherArrayValue : fatherValue);\r\n } else {\r\n self.fireEvent(BI.MultiLayerDownListPopup.EVENT_CHANGE, changedValue, object);\r\n }\r\n\r\n\r\n if (!BI.contains(self.singleValues, changedValue)) {\r\n var item = self.getValue();\r\n var result = [];\r\n BI.each(item, function (i, valueObject) {\r\n if (valueObject.value != changedValue) {\r\n result.push(valueObject);\r\n }\r\n });\r\n self.setValue(result);\r\n }\r\n\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.popup],\r\n vgap: 5\r\n });\r\n\r\n },\r\n _createPopupItems: function (items) {\r\n var self = this, result = [];\r\n BI.each(items, function (i, it) {\r\n var item_done = {\r\n type: \"bi.down_list_group\",\r\n items: []\r\n };\r\n\r\n BI.each(it, function (i, item) {\r\n if (BI.isNotEmptyArray(item.children) && !BI.isEmpty(item.el)) {\r\n item.type = \"bi.combo_group\";\r\n item.cls = \"down-list-group\";\r\n item.trigger = \"hover\";\r\n item.isNeedAdjustWidth = false;\r\n item.el.title = item.el.title || item.el.text;\r\n item.el.type = \"bi.down_list_group_item\";\r\n item.el.logic = {\r\n dynamic: true\r\n };\r\n item.el.height = self.constants.height;\r\n item.el.iconCls2 = self.constants.nextIcon;\r\n item.popup = {\r\n lgap: 1,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: 0,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n\r\n },\r\n innerVGap: 5\r\n };\r\n item.el.childValues = [];\r\n BI.each(item.children, function (i, child) {\r\n child = child.el ? BI.extend(child.el, {children: child.children}) : child;\r\n var fatherValue = BI.deepClone(item.el.value);\r\n var childValue = BI.deepClone(child.value);\r\n self.singleValues.push(child.value);\r\n child.type = \"bi.down_list_item\";\r\n child.extraCls = \" child-down-list-item\";\r\n child.title = child.title || child.text;\r\n child.textRgap = 10;\r\n child.isNeedAdjustWidth = false;\r\n child.logic = {\r\n dynamic: true\r\n };\r\n child.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n child.value = self._createChildValue(fatherValue, childValue);\r\n item.el.childValues.push(child.value);\r\n if (BI.isNotEmptyArray(child.children)) {\r\n child.type = \"bi.down_list_group_item\";\r\n self._createChildren(child);\r\n child.height = self.constants.height;\r\n child.iconCls2 = self.constants.nextIcon;\r\n item.el.childValues = BI.concat(item.el.childValues, child.childValues);\r\n }\r\n });\r\n } else {\r\n item.type = \"bi.down_list_item\";\r\n item.title = item.title || item.text;\r\n item.textRgap = 10;\r\n item.isNeedAdjustWidth = false;\r\n item.logic = {\r\n dynamic: true\r\n };\r\n }\r\n var el_done = {};\r\n el_done.el = item;\r\n item_done.items.push(el_done);\r\n });\r\n if (self._isGroup(item_done.items)) {\r\n BI.each(item_done.items, function (i, item) {\r\n self.singleValues.push(item.el.value);\r\n });\r\n }\r\n\r\n result.push(item_done);\r\n if (self._needSpliter(i, items.length)) {\r\n var spliter_container = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n el: {\r\n type: \"bi.layout\",\r\n cls: \"bi-down-list-spliter bi-border-top cursor-pointer\",\r\n height: 0\r\n }\r\n\r\n }],\r\n cls: \"bi-down-list-spliter-container cursor-pointer\",\r\n vgap: 5,\r\n lgap: 10\r\n });\r\n result.push(spliter_container);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n _createChildren: function (child) {\r\n var self = this;\r\n child.childValues = [];\r\n BI.each(child.children, function (i, c) {\r\n var fatherValue = BI.deepClone(child.value);\r\n var childValue = BI.deepClone(c.value);\r\n c.type = \"bi.down_list_item\";\r\n c.title = c.title || c.text;\r\n c.textRgap = 10;\r\n c.isNeedAdjustWidth = false;\r\n c.logic = {\r\n dynamic: true\r\n };\r\n c.father = fatherValue;\r\n self.fatherValueMap[self._createChildValue(fatherValue, childValue)] = fatherValue;\r\n self.childValueMap[self._createChildValue(fatherValue, childValue)] = childValue;\r\n c.value = self._createChildValue(fatherValue, childValue);\r\n child.childValues.push(c.value);\r\n });\r\n },\r\n\r\n _isGroup: function (i) {\r\n return i.length > 1;\r\n },\r\n\r\n _needSpliter: function (i, itemLength) {\r\n return i < itemLength - 1;\r\n },\r\n\r\n _createChildValue: function (fatherValue, childValue) {\r\n var fValue = fatherValue;\r\n if(BI.isArray(fatherValue)) {\r\n fValue = fatherValue.join(\"_\");\r\n }\r\n return fValue + \"_\" + childValue;\r\n },\r\n\r\n _digest: function (valueItem) {\r\n var self = this;\r\n var valueArray = [];\r\n BI.each(valueItem, function (i, item) {\r\n var value;\r\n if (BI.isNotNull(item.childValue)) {\r\n value = self._createChildValue(item.value, item.childValue);\r\n } else {\r\n value = item.value;\r\n }\r\n valueArray.push(value);\r\n }\r\n );\r\n return valueArray;\r\n },\r\n\r\n _checkValues: function (values) {\r\n var self = this, o = this.options;\r\n var value = [];\r\n BI.each(o.items, function (idx, itemGroup) {\r\n BI.each(itemGroup, function (id, item) {\r\n if(BI.isNotNull(item.children)) {\r\n var childValues = getChildrenValue(item);\r\n var v = joinValue(childValues, values[idx]);\r\n if(BI.isNotEmptyString(v)) {\r\n value.push(v);\r\n }\r\n }else{\r\n if(item.value === values[idx][0]) {\r\n value.push(values[idx][0]);\r\n }\r\n }\r\n });\r\n });\r\n return value;\r\n\r\n function joinValue (sources, targets) {\r\n var value = \"\";\r\n BI.some(sources, function (idx, s) {\r\n return BI.some(targets, function (id, t) {\r\n if(s === t) {\r\n value = s;\r\n return true;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n\r\n function getChildrenValue (item) {\r\n var children = [];\r\n if(BI.isNotNull(item.children)) {\r\n BI.each(item.children, function (idx, child) {\r\n children = BI.concat(children, getChildrenValue(child));\r\n });\r\n } else {\r\n children.push(item.value);\r\n }\r\n return children;\r\n }\r\n },\r\n\r\n populate: function (items) {\r\n BI.MultiLayerDownListPopup.superclass.populate.apply(this, arguments);\r\n var self = this;\r\n self.childValueMap = {};\r\n self.fatherValueMap = {};\r\n self.singleValues = [];\r\n var children = self._createPopupItems(items);\r\n var popupItem = BI.createItems(children,\r\n {}, {\r\n adjustLength: -2\r\n }\r\n );\r\n self.popup.populate(popupItem);\r\n },\r\n\r\n setValue: function (valueItem) {\r\n this.popup.setValue(this._digest(valueItem));\r\n },\r\n\r\n _getValue: function () {\r\n var v = [];\r\n BI.each(this.popup.getAllButtons(), function (i, item) {\r\n i % 2 === 0 && v.push(item.getValue());\r\n });\r\n return v;\r\n },\r\n\r\n getValue: function () {\r\n var self = this, result = [];\r\n var values = this._checkValues(this._getValue());\r\n BI.each(values, function (i, value) {\r\n var valueItem = {};\r\n if (BI.isNotNull(self.childValueMap[value])) {\r\n var fartherValue = self.fatherValueMap[value];\r\n valueItem.childValue = self.childValueMap[value];\r\n var fatherArrayValue = (fartherValue + \"\").split(\"_\");\r\n valueItem.value = fatherArrayValue.length > 1 ? fatherArrayValue : fartherValue;\r\n } else {\r\n valueItem.value = value;\r\n }\r\n result.push(valueItem);\r\n });\r\n return result;\r\n }\r\n\r\n\r\n});\r\n\r\nBI.MultiLayerDownListPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerDownListPopup.EVENT_SON_VALUE_CHANGE = \"EVENT_SON_VALUE_CHANGE\";\r\nBI.shortcut(\"bi.multi_layer_down_list_popup\", BI.MultiLayerDownListPopup);/**\r\n * @class BI.MultiLayerSelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_select_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_select_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-select-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0;\r\n\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multilayer_select_tree_combo\", BI.MultiLayerSelectTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSelectTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_insert_search_pane\", BI.MultiLayerSelectTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSelectLevelTree\r\n * @extends BI.Pane\r\n */\r\nBI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n value: \"\",\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_select_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n value: o.value,\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(value);\r\n self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSelectLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_select_level_tree\", BI.MultiLayerSelectLevelTree);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-select-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n onLoaded: BI.emptyFn,\r\n minHeight: 240\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_select_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.tree.css(\"min-height\", o.minHeight - 10);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_select_tree_popup\", BI.MultiLayerSelectTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-select-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false,\r\n title: BI.bind(this._getShowText, this)\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_select_tree_insert_search_pane\" : \"bi.multilayer_select_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSelectTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n },\r\n\r\n _getShowText: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData(items);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiLayerSelectTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSelectTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_select_tree_trigger\", BI.MultiLayerSelectTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_first_plus_group_node\", BI.MultiLayerSelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-last-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_last_plus_group_node\", BI.MultiLayerSelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-mid-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_mid_plus_group_node\", BI.MultiLayerSelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-select-tree-first-plus-group-node bi-list-item-active\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = BI.createWidget({\r\n type: \"bi.select_tree_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n stopPropagation: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n keyword: o.keyword,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py\r\n });\r\n this.node.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n self.setSelected(self.isSelected());\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n isSelected: function () {\r\n return this.node.isSelected();\r\n },\r\n\r\n setSelected: function (b) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setSelected.apply(this, arguments);\r\n this.node.setSelected(b);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n this.node.setOpened(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_select_tree_plus_group_node\", BI.MultiLayerSelectTreePlusGroupNode);/**\r\n * 多层级下拉单选树\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-tree-combo\",\r\n isDefaultInit: false,\r\n height: 24,\r\n text: \"\",\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: false,\r\n allowSearchValue: false,\r\n allowInsertValue: false\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();\r\n\r\n return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n cls: \"trigger-icon-button\",\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n },\r\n width: o.height,\r\n height: o.height,\r\n handler: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n },\r\n right: 0,\r\n bottom: 0,\r\n top: 0\r\n }]\r\n };\r\n },\r\n\r\n _getBaseConfig: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.combo\",\r\n container: o.container,\r\n destroyWhenHide: o.destroyWhenHide,\r\n adjustLength: 2,\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n },\r\n popup: {\r\n el: {\r\n type: \"bi.multilayer_single_tree_popup\",\r\n isDefaultInit: o.isDefaultInit,\r\n itemsCreator: o.itemsCreator,\r\n items: o.items,\r\n ref: function (_ref) {\r\n self.trigger && self.trigger.getSearcher().setAdapter(_ref);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }],\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n maxHeight: 400,\r\n minHeight: 240\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n _getSearchConfig: function() {\r\n var self = this, o = this.options;\r\n return {\r\n el: {\r\n type: \"bi.multilayer_single_tree_trigger\",\r\n container: o.container,\r\n allowInsertValue: o.allowInsertValue,\r\n allowSearchValue: o.allowSearchValue,\r\n allowEdit: o.allowEdit,\r\n cls: \"multilayer-single-tree-trigger\",\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n watermark: o.watermark,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n height: o.height - 2,\r\n text: o.text,\r\n value: o.value,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n title: o.title,\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(this.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM,\r\n action: function () {\r\n var value = self.trigger.getSearcher().getKeyword();\r\n self.combo.setValue([value]);\r\n self.combo.hideView();\r\n }\r\n }]\r\n },\r\n toggle: !o.allowEdit,\r\n hideChecker: function (e) {\r\n // 新增传配置container后对应hideChecker的修改\r\n // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿\r\n // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以\r\n // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪\r\n return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_AFTER_HIDEVIEW,\r\n action: function () {\r\n self.trigger.stopEditing();\r\n }\r\n }, {\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n }\r\n },\r\n\r\n _getSyncConfig: function () {\r\n var o = this.options;\r\n var baseConfig = this._getBaseConfig();\r\n return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : {\r\n el: {\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }\r\n });\r\n },\r\n\r\n _getAsyncConfig: function () {\r\n var config = this._getBaseConfig();\r\n return BI.extend(config, this._getSearchConfig());\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSingleTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multilayer_single_tree_combo\", BI.MultiLayerSingleTreeCombo);/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreeInsertSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane = BI.inherit(BI.Widget, {\r\n\r\n props: function() {\r\n return {\r\n baseCls: \"bi-multilayer-single-tree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n value: \"\"\r\n };\r\n },\r\n\r\n render: function() {\r\n var self = this, o = this.options;\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_single_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n });\r\n },\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.MultiLayerSelectLevelTree.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n return {\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n vgap: 5,\r\n items: [{\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: 24,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n ref: function (_ref) {\r\n self.addNotMatchTip = _ref;\r\n },\r\n handler: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n }, this.tree]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var showTip = BI.isEmptyArray(this.tree.getAllLeaves());\r\n this.addNotMatchTip.setVisible(showTip);\r\n showTip && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiLayerSingleTreeInsertSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_insert_search_pane\", BI.MultiLayerSingleTreeInsertSearchPane);/**\r\n * guy\r\n * 二级树\r\n * @class BI.MultiLayerSingleLevelTree\r\n * @extends BI.Single\r\n */\r\nBI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-single-level-tree\",\r\n isDefaultInit: false,\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n chooseType: BI.Selection.Single,\r\n scrollable: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n var o = this.options;\r\n BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);\r\n\r\n this.storeValue = o.value;\r\n\r\n this.initTree(this.options.items);\r\n\r\n this.check();\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this, o = this.options;\r\n var keyword = o.keywordGetter();\r\n BI.each(nodes, function (i, node) {\r\n var extend = {};\r\n node.layer = layer;\r\n if (!BI.isKey(node.id)) {\r\n node.id = BI.UUID();\r\n }\r\n node.keyword = node.keyword || keyword;\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.multilayer_single_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_plus_group_node\";\r\n }\r\n if (i === 0 && i === nodes.length - 1 && !pNode) { // 根\r\n extend.type = \"bi.multilayer_single_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.multilayer_single_tree_mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.multilayer_single_tree_first_tree_leaf_item\";\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.multilayer_single_tree_last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _assertId: function (sNodes) {\r\n BI.each(sNodes, function (i, node) {\r\n node.id = node.id || BI.UUID();\r\n });\r\n },\r\n\r\n // 构造树结构,\r\n initTree: function (nodes) {\r\n var self = this, o = this.options;\r\n var hasNext = false;\r\n this.empty();\r\n this._assertId(nodes);\r\n this.tree = BI.createWidget({\r\n type: \"bi.custom_tree\",\r\n cls: \"tree-view display-table\",\r\n expander: {\r\n isDefaultInit: o.isDefaultInit,\r\n el: {},\r\n popup: {\r\n type: \"bi.custom_tree\"\r\n }\r\n },\r\n\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),\r\n value: o.value,\r\n itemsCreator: function (op, callback) {\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loading();\r\n });\r\n o.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n (op.times === 1 && !op.node) && self._populate(ob.items);\r\n callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node));\r\n self.setValue(self.storeValue);\r\n (op.times === 1 && !op.node) && BI.nextTick(function () {\r\n self.loaded();\r\n });\r\n });\r\n },\r\n\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: o.itemsCreator !== BI.emptyFn,\r\n el: {\r\n type: \"bi.button_tree\",\r\n chooseType: o.chooseType,\r\n behaviors: o.behaviors,\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n }\r\n });\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n if (type === BI.Events.CLICK) {\r\n self.setValue(v);\r\n self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.adaptive\",\r\n element: this,\r\n scrollable: o.scrollable,\r\n items: [this.tree]\r\n });\r\n },\r\n\r\n _populate: function () {\r\n BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);\r\n },\r\n\r\n populate: function (nodes) {\r\n this._populate(nodes);\r\n BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));\r\n },\r\n\r\n setValue: function (v) {\r\n // getValue依赖于storeValue, 那么不选的时候就不要更新storeValue了\r\n if(this.options.chooseType === BI.Selection.None) {\r\n } else {\r\n this.storeValue = v;\r\n this.tree.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return BI.isArray(this.storeValue) ?\r\n this.storeValue : BI.isNull(this.storeValue) ?\r\n [] : [this.storeValue];\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.tree.getAllLeaves();\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.tree.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (id) {\r\n return this.tree.getNodeByValue(id);\r\n }\r\n});\r\nBI.MultiLayerSingleLevelTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multilayer_single_level_tree\", BI.MultiLayerSingleLevelTree);\r\n/**\r\n * Created by GUY on 2016/1/26.\r\n *\r\n * @class BI.MultiLayerSingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multilayer-singletree-popup\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n isDefaultInit: false,\r\n itemsCreator: BI.emptyFn,\r\n items: [],\r\n onLoaded: BI.emptyFn,\r\n minHeight: 240\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiLayerSingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.multilayer_single_level_tree\",\r\n isDefaultInit: o.isDefaultInit,\r\n items: o.items,\r\n itemsCreator: o.itemsCreator,\r\n keywordGetter: o.keywordGetter,\r\n value: o.value,\r\n scrollable: null,\r\n onLoaded: function () {\r\n self.tree.check();\r\n o.onLoaded();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n scrollable: true,\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.tree.css(\"min-height\", o.minHeight - 10);\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.MultiLayerSingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multilayer_single_tree_popup\", BI.MultiLayerSingleTreePopup);/**\r\n * Created by Windy on 2018/2/2.\r\n */\r\nBI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n props: function() {\r\n return {\r\n extraCls: \"bi-multi-layer-single-tree-trigger bi-border bi-focus-shadow bi-border-radius\",\r\n height: 24,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n itemsCreator: BI.emptyFn,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowSearchValue: false,\r\n title: BI.bind(this._getShowText, this)\r\n };\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n this._initData();\r\n }\r\n var content = {\r\n type: \"bi.htape\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.searcher\",\r\n ref: function () {\r\n self.searcher = this;\r\n },\r\n masker: BI.isNotNull(o.container) ? {\r\n offset: {},\r\n container: o.container\r\n } : {\r\n offset: {}\r\n },\r\n isAutoSearch: false,\r\n el: {\r\n type: \"bi.state_editor\",\r\n ref: function () {\r\n self.editor = this;\r\n },\r\n defaultText: o.text,\r\n text: this._digest(o.value),\r\n value: o.value,\r\n height: o.height,\r\n tipText: \"\",\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.StateEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.StateEditor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING);\r\n }\r\n }]\r\n },\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multilayer_single_tree_insert_search_pane\" : \"bi.multilayer_single_tree_popup\",\r\n itemsCreator: o.itemsCreator === BI.emptyFn ? BI.emptyFn : function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n cls: \"bi-card\",\r\n listeners: [{\r\n eventName: BI.MultiLayerSingleTreeInsertSearchPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.options.text = self.getSearcher().getKeyword();\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n },\r\n onSearch: function (obj, callback) {\r\n var keyword = obj.keyword;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n callback(self._getSearchItems(keyword));\r\n o.allowInsertValue && self.popup.setKeyword(keyword);\r\n } else {\r\n callback();\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_CHANGE);\r\n }\r\n }]\r\n }\r\n }, {\r\n el: {\r\n type: \"bi.layout\",\r\n width: 24\r\n },\r\n width: 24\r\n }\r\n ]\r\n };\r\n\r\n return o.allowEdit ? content : {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: content,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.layout\"\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _initData: function() {\r\n var o = this.options;\r\n this.tree = new BI.Tree();\r\n this.nodes = BI.Tree.treeFormat(BI.deepClone(o.items));\r\n this.tree.initTree(this.nodes);\r\n },\r\n\r\n _getSearchItems: function(keyword) {\r\n var self = this, o = this.options;\r\n // 把数组搜索换成用BI.tree搜索节点, 搜到了就不再往下搜索\r\n var items = [];\r\n this.tree.traverse(function (node) {\r\n var find = BI.Func.getSearchResult(self.tree.isRoot(node) ? [] : BI.concat([node.text], (o.allowSearchValue ? [node.value] : [])), keyword);\r\n if(find.find.length > 0 || find.match.length > 0) {\r\n items.push(node);\r\n return true;\r\n }\r\n });\r\n return this._fillTreeStructure4Search(items, \"id\");\r\n },\r\n\r\n _createJson: function(node, open) {\r\n return {\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n isParent: BI.isNotEmptyArray(node.children),\r\n open: open\r\n }\r\n },\r\n\r\n _getChildren: function(node) {\r\n var self = this;\r\n node.children = node.children || [];\r\n var nodes = [];\r\n BI.each(node.children, function (idx, child) {\r\n var children = self._getChildren(child);\r\n nodes = nodes.concat(children);\r\n });\r\n return node.children.concat(nodes);\r\n },\r\n\r\n // 将搜索到的节点进行补充,构造成一棵完整的树\r\n _fillTreeStructure4Search: function (leaves) {\r\n var self = this;\r\n var result = [];\r\n var queue = [];\r\n BI.each(leaves, function (idx, node) {\r\n queue.push({pId: node.pId});\r\n result.push(node);\r\n result = result.concat(self._getChildren(node));\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.pop();\r\n var pNode = this.tree.search(this.tree.getRoot(), node.pId, \"id\");\r\n if (pNode != null) {\r\n pNode.open = true;\r\n queue.push({pId: pNode.pId});\r\n result.push(pNode);\r\n }\r\n }\r\n return BI.uniqBy(BI.map(result, function (idx, node) {\r\n return self._createJson(node, node.open);\r\n }), \"id\");\r\n },\r\n\r\n _digest: function (v) {\r\n var o = this.options;\r\n if(o.itemsCreator === BI.emptyFn) {\r\n var result = BI.find(o.items, function (i, item) {\r\n return item.value === v;\r\n });\r\n return BI.isNotNull(result) ? result.text : o.text;\r\n }\r\n return o.valueFormatter(v);\r\n\r\n },\r\n\r\n _getShowText: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._initData();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setState(this._digest(v[0]));\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\nBI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiLayerSingleTreeTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.shortcut(\"bi.multilayer_single_tree_trigger\", BI.MultiLayerSingleTreeTrigger);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-first-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.first_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_plus_group_node\", BI.MultiLayerSingleTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-last-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.last_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_plus_group_node\", BI.MultiLayerSingleTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.MultiLayerSingleTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-mid-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.mid_plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_plus_group_node\", BI.MultiLayerSingleTreeMidPlusGroupNode);/**\r\n *@desc 根节点,既是第一个又是最后一个\r\n *@author dailer\r\n *@date 2018/09/16\r\n */\r\nBI.MultiLayerSingleTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.MultiLayerSingleTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-multilayer-single-tree-plus-group-node bi-list-item\",\r\n layer: 0, // 第几层级\r\n id: \"\",\r\n pId: \"\",\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.node = this._createNode();\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.node);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doRedMark: function () {\r\n this.node.doRedMark.apply(this.node, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.node.unRedMark.apply(this.node, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.doClick.apply(this, arguments);\r\n this.node.setSelected(this.isSelected());\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.MultiLayerSingleTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.node)) {\r\n this.node.setOpened(v);\r\n }\r\n },\r\n\r\n _createNode: function () {\r\n var self = this, o = this.options;\r\n\r\n return BI.createWidget({\r\n type: \"bi.plus_group_node\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n open: o.open,\r\n isLastNode: o.isLastNode,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n });\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_plus_group_node\", BI.MultiLayerSingleTreePlusGroupNode);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeFirstTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeFirstTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-first-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.first_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeFirstTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_first_tree_leaf_item\", BI.MultiLayerSingleTreeFirstTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeLastTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeLastTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-last-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.last_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeLastTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_last_tree_leaf_item\", BI.MultiLayerSingleTreeLastTreeLeafItem);/**\r\n *\r\n * Created by GUY on 2016/1/27.\r\n * @class BI.MultiLayerSingleTreeMidTreeLeafItem\r\n * @extends BI.BasicButton\r\n */\r\nBI.MultiLayerSingleTreeMidTreeLeafItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-multilayer-single-tree-mid-tree-leaf-item bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n layer: 0,\r\n id: \"\",\r\n pId: \"\",\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.item = BI.createWidget({\r\n type: \"bi.mid_tree_leaf_item\",\r\n cls: \"bi-list-item-none\",\r\n logic: {\r\n dynamic: true\r\n },\r\n id: o.id,\r\n pId: o.pId,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n py: o.py,\r\n keyword: o.keyword\r\n });\r\n this.item.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {// 本身实现click功能\r\n return;\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n var needBlankLayers = [];\r\n var pNode = o.pNode;\r\n while (pNode) {\r\n if (pNode.isLastNode) {\r\n needBlankLayers.push(pNode.layer)\r\n }\r\n pNode = pNode.pNode;\r\n }\r\n\r\n var items = [];\r\n BI.count(0, o.layer, function (index) {\r\n items.push({\r\n type: \"bi.layout\",\r\n cls: BI.contains(needBlankLayers, index) ? \"\" : \"base-line-conn-background\",\r\n width: 12,\r\n height: o.height\r\n });\r\n });\r\n items.push(this.item);\r\n BI.createWidget({\r\n type: \"bi.td\",\r\n element: this,\r\n columnSize: BI.makeArray(o.layer, 12),\r\n items: [items]\r\n });\r\n },\r\n\r\n doHighLight: function () {\r\n this.item.doHighLight.apply(this.item, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.item.unHighLight.apply(this.item, arguments);\r\n },\r\n\r\n getId: function () {\r\n return this.options.id;\r\n },\r\n\r\n getPId: function () {\r\n return this.options.pId;\r\n },\r\n\r\n doClick: function () {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.doClick.apply(this, arguments);\r\n this.item.setSelected(this.isSelected());\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.MultiLayerSingleTreeMidTreeLeafItem.superclass.setSelected.apply(this, arguments);\r\n this.item.setSelected(v);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multilayer_single_tree_mid_tree_leaf_item\", BI.MultiLayerSingleTreeMidTreeLeafItem);/**\r\n *\r\n * @class BI.MultiSelectCheckPane\r\n * @extends BI.Widget\r\n */\r\nBI.MultiSelectCheckPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 12,\r\n lgap: 10,\r\n tgap: 10,\r\n bgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-pane bi-background\",\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n onClickContinueSelect: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.storeValue = opts.value || {};\r\n this.display = BI.createWidget({\r\n type: \"bi.display_selected_list\",\r\n items: opts.items,\r\n itemsCreator: function (op, callback) {\r\n op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n });\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n callback({\r\n items: BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt\r\n };\r\n })\r\n });\r\n return;\r\n }\r\n opts.itemsCreator(op, callback);\r\n }\r\n });\r\n\r\n this.continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-select-check-selected bi-high-light\"\r\n });\r\n\r\n this.continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n cls: \"multi-select-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap\r\n },\r\n {\r\n el: this.continueSelect,\r\n lgap: this.constants.lgap\r\n }]\r\n },\r\n tgap: this.constants.tgap\r\n }, {\r\n height: \"fill\",\r\n el: this.display,\r\n tgap: this.constants.bgap\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function () {\r\n this.display.populate.apply(this.display, arguments);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.multi_select_check_pane\", BI.MultiSelectCheckPane);/**\r\n *\r\n *\r\n * 查看已选弹出层的展示面板\r\n * @class BI.DisplaySelectedList\r\n * @extends BI.Widget\r\n */\r\nBI.DisplaySelectedList = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DisplaySelectedList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-display-list\",\r\n itemsCreator: BI.emptyFn,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DisplaySelectedList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.list_pane\",\r\n element: this,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n items: this._createItems(opts.items),\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n lgap: 10\r\n }]\r\n },\r\n itemsCreator: function (options, callback) {\r\n\r\n opts.itemsCreator(options, function (ob) {\r\n self.hasNext = !!ob.hasNext;\r\n callback(self._createItems(ob.items));\r\n });\r\n },\r\n hasNext: function () {\r\n return self.hasNext;\r\n }\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.icon_text_item\",\r\n cls: \"cursor-default check-font icon-size-12 display-list-item bi-tips\",\r\n once: true,\r\n invalid: true,\r\n selected: true,\r\n height: this.constants.height,\r\n logic: {\r\n dynamic: true\r\n }\r\n });\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n if (arguments.length === 0) {\r\n this.button_group.populate();\r\n } else {\r\n this.button_group.populate(this._createItems(items));\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.display_selected_list\", BI.DisplaySelectedList);/**\r\n *\r\n * @class BI.MultiSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n\r\n this._assertValue(this.storeValue);\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 && self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: this.storeValue\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_combo\", BI.MultiSelectCombo);/**\r\n *\r\n * @class BI.MultiSelectNoBarCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function (op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _stopEditing: function () {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest(items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust() {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectNoBarCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectNoBarCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectNoBarCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectNoBarCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectNoBarCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_combo\", BI.MultiSelectNoBarCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if(self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = o.value || {};\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n var addedValue = this.getSearcher().getKeyword();\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM, addedValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n container: o.container,\r\n popup: {\r\n type: \"bi.multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n // value更新的时候assist也需要更新\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiSelectInsertCombo.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_combo\", BI.MultiSelectInsertCombo);/**\r\n *\r\n * @class BI.MultiSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-combo-no-bar\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n if (BI.isKey(self._startValue)) {\r\n if (self.storeValue.type === BI.Selection.All) {\r\n BI.remove(self.storeValue.value, self._startValue);\r\n self.storeValue.assist = self.storeValue.assist || [];\r\n self.storeValue.assist.pushDistinct(self._startValue);\r\n } else {\r\n BI.pushDistinct(self.storeValue.value, self._startValue);\r\n BI.remove(self.storeValue.assist, self._startValue);\r\n }\r\n }\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.numberCounter.setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_insert_trigger\",\r\n height: o.height,\r\n text: o.text,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {\r\n if (!this.getSearcher().hasMatched()) {\r\n self._addItem(assertShowValue);\r\n var addedValue = this.getSearcher().getKeyword();\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM, addedValue);\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n // counter的值随点击项的改变而改变, 点击counter的时候不需要setValue(counter会请求刷新计数)\r\n // 只需要更新查看面板的selectedValue用以请求已选数据\r\n self.numberCounter.updateSelectedValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_select_no_bar_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self._stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: BI.bind(this._itemsCreator4Trigger, this),\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.updateSelectedValue(self.storeValue);\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height\r\n }]\r\n });\r\n },\r\n\r\n _itemsCreator4Trigger: function(op, callback) {\r\n var self = this, o = this.options;\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.storeValue));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n\r\n _addItem: function (assertShowValue) {\r\n var self = this;\r\n var keyword = this.trigger.getSearcher().getKeyword();\r\n this._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n // 如果在不选的状态下直接把该值添加进来\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue(\"\");\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.combo.setValue(this.storeValue);\r\n this.numberCounter.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this._populate.apply(this, arguments);\r\n this.numberCounter.populateSwitcher.apply(this.numberCounter, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_combo\", BI.MultiSelectInsertNoBarCombo);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectInsertTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_insert_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectInsertTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectInsertTrigger.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.multi_select_insert_trigger\", BI.MultiSelectInsertTrigger);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n logic: opts.logic,\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({\r\n scrolly: true,\r\n vgap: 5\r\n }, opts.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group)\r\n }))));\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h - 10);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_loader\", BI.MultiSelectLoader);/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.MultiSelectNoBarLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget(BI.extend({\r\n type: \"bi.list_pane\",\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n }, opts.el));\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: this.options.logic,\r\n height: 24,\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue.value);\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: this.button_group.getValue()\r\n };\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n resetWidth: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_no_bar_loader\", BI.MultiSelectNoBarLoader);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_popup_view\", BI.MultiSelectPopupView);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectNoBarPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectNoBarPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectNoBarPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiSelectNoBarPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_select_no_bar_popup_view\", BI.MultiSelectNoBarPopupView);/**\r\n *\r\n * 复选下拉框\r\n * @class BI.MultiSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.MultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border bi-border-radius\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.multi_select_searcher\",\r\n height: o.height,\r\n text: o.text,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n watermark: o.watermark,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS);\r\n });\r\n\r\n this.wrapNumberCounter = BI.createWidget({\r\n type: \"bi.layout\"\r\n });\r\n\r\n this.wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: this.wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n /**\r\n * 重新调整numberCounter的空白占位符\r\n */\r\n refreshPlaceHolderWidth: function(width) {\r\n this.wrapper.attr(\"items\")[1].width = width;\r\n this.wrapper.resize();\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.MultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.MultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.MultiSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\n\r\nBI.shortcut(\"bi.multi_select_trigger\", BI.MultiSelectTrigger);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) {\r\n return keyword === btn.getValue();\r\n });\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue;\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_insert_pane\", BI.MultiSelectSearchInsertPane);/**\r\n * 多选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.MultiSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-loader\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = BI.deepClone(opts.value);\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n toolbar: {\r\n type: \"bi.multi_select_bar\",\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n },\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword);\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n cls: \"bi-list-item-active\",\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = BI.deepClone(src.value) || [];\r\n var newValues = BI.map(values, function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: src.type === BI.Selection.All\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = BI.deepClone(v);\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_search_loader\", BI.MultiSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.MultiSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"multi-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.multi_select_search_loader\",\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.multi_select_search_pane\", BI.MultiSelectSearchPane);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.text_button\",\r\n element: this,\r\n hgap: 4,\r\n text: \"0\",\r\n textAlign: \"center\",\r\n textHeight: 16,\r\n cls: \"bi-high-light-background count-tip\"\r\n });\r\n this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.numberCounter.element.hover(function () {\r\n self.numberCounter.setTag(self.numberCounter.getText());\r\n self.numberCounter.setText(BI.i18nText(\"BI-Check_Selected\"));\r\n }, function () {\r\n self.numberCounter.setText(self.numberCounter.getTag());\r\n });\r\n this.setVisible(false);\r\n if(BI.isNotNull(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _populate: function (ob) {\r\n var self = this, o = this.options;\r\n if (ob.type === BI.Selection.All) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n var length = res.count - ob.value.length;\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(length);\r\n self.setVisible(length > 0);\r\n });\r\n });\r\n return;\r\n }\r\n BI.nextTick(function () {\r\n self.numberCounter.setText(ob.value.length);\r\n self.setVisible(ob.value.length > 0);\r\n });\r\n },\r\n\r\n _assertValue: function (ob) {\r\n ob || (ob = {});\r\n ob.type || (ob.type = BI.Selection.Multi);\r\n ob.value || (ob.value = []);\r\n return ob;\r\n },\r\n\r\n setValue: function (ob) {\r\n ob = this._assertValue(ob);\r\n this.options.value = ob;\r\n this._populate(ob);\r\n },\r\n\r\n populate: function () {\r\n this._populate(this._assertValue(this.options.value));\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_check_selected_button\", BI.MultiSelectCheckSelectedButton);/**\r\n * 多选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectEditor\r\n * @extends Widget\r\n */\r\nBI.MultiSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-editor\",\r\n el: {},\r\n watermark: BI.i18nText(\"BI-Basic_Search\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: o.watermark,\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getState: function () {\r\n return this.editor.getText();\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.MultiSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_select_editor\", BI.MultiSelectEditor);\r\n/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectInsertSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectInsertSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM);\r\n }\r\n }]\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectInsertSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectInsertSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectInsertSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectInsertSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectInsertSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectInsertSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectInsertSearcher.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\nBI.MultiSelectInsertSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectInsertSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_insert_searcher\", BI.MultiSelectInsertSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.MultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.shortcut(\"bi.multi_select_searcher\", BI.MultiSelectSearcher);/**\r\n * 查看已选switcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiSelectCheckSelectedSwitcher\r\n * @extends Widget\r\n */\r\nBI.MultiSelectCheckSelectedSwitcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectCheckSelectedSwitcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-check-selected-switcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectCheckSelectedSwitcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.button = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_check_selected_button\",\r\n itemsCreator: o.itemsCreator,\r\n value: o.value\r\n });\r\n this.button.on(BI.Events.VIEW, function () {\r\n self.fireEvent(BI.Events.VIEW, arguments);\r\n });\r\n this.switcher = BI.createWidget({\r\n type: \"bi.switcher\",\r\n toggle: false,\r\n element: this,\r\n el: this.button,\r\n popup: BI.extend({\r\n type: \"bi.multi_select_check_pane\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n onClickContinueSelect: function () {\r\n self.switcher.hideView();\r\n },\r\n ref: function (_ref) {\r\n self.checkPane = _ref;\r\n },\r\n value: o.value\r\n }, o.popup),\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.switcher.on(BI.Switcher.EVENT_AFTER_POPUPVIEW, function () {\r\n var me = this;\r\n BI.nextTick(function () {\r\n me.populate();\r\n });\r\n });\r\n },\r\n\r\n adjustView: function () {\r\n this.switcher.adjustView();\r\n },\r\n\r\n hideView: function () {\r\n this.switcher.empty();\r\n this.switcher.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.switcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.switcher.setValue(v);\r\n },\r\n\r\n // 与setValue的区别是只更新查看已选面板的的selectedValue, 不会更新按钮的计数\r\n updateSelectedValue: function (v) {\r\n this.checkPane.setValue(v);\r\n },\r\n\r\n setButtonChecked: function (v) {\r\n this.button.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n\r\n },\r\n\r\n populate: function (items) {\r\n this.switcher.populate.apply(this.switcher, arguments);\r\n },\r\n\r\n populateSwitcher: function () {\r\n this.button.populate.apply(this.button, arguments);\r\n }\r\n});\r\n\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE = \"EVENT_TRIGGER_CHANGE\";\r\nBI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.multi_select_check_selected_switcher\", BI.MultiSelectCheckSelectedSwitcher);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value || {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n self._showAdapter();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: o.value\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_list\", BI.MultiSelectInsertList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectInsertNoBarList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectInsertNoBarList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n };\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_no_bar_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_insert_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n BI.pushDistinct(self.storeValue.value, keyword);\r\n }\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeywords();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }],\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 30,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectInsertNoBarList.REQ_GET_ALL_DATA,\r\n keywords: [self.trigger.getKeyword()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n callback();\r\n });\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n callback();\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectInsertNoBarList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectInsertNoBarList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_insert_no_bar_list\", BI.MultiSelectInsertNoBarList);/**\r\n * Created by zcf_1 on 2017/5/2.\r\n */\r\nBI.MultiSelectList = BI.inherit(BI.Widget, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-list\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = {};\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_loader\",\r\n cls: \"popup-multi-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: false\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {}\r\n });\r\n this.adapter.on(BI.MultiSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_select_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.trigger.getKeyword();\r\n if (BI.isNotEmptyString(keyword)) {\r\n op.keywords = [keyword];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n }\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue(\"\");\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue(\"\");\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n self.fireEvent(BI.MultiSelectList.EVENT_CHANGE);\r\n });\r\n }\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n // 和复选下拉框同步,allData做缓存是会爆炸的\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.MultiSelectList.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.MultiSelectList, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.MultiSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_list\", BI.MultiSelectList);/**\r\n * Created by zcf_1 on 2017/5/11.\r\n */\r\nBI.MultiSelectTree = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_HEIGHT: 24\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiSelectTree.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = {value: {}};\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.multi_select_tree_popup\",\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.adapter.on(BI.MultiSelectTreePopup.EVENT_CHANGE, function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n });\r\n\r\n // 搜索中的时候用的是parttree,同adapter中的synctree不一样\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.multi_tree_search_pane\",\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n keywordGetter: function () {\r\n return self.searcher.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.searcher.getKeyword();\r\n o.itemsCreator(op, callback);\r\n }\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.searcher.getKeyword()\r\n });\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n masker: false,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n // self.storeValue = {value: self.adapter.getValue()};\r\n // self.searcherPane.setSelectedValue(self.storeValue.value);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n // self.storeValue = {value: self.searcherPane.getValue()};\r\n // self.adapter.setSelectedValue(self.storeValue.value);\r\n BI.nextTick(function () {\r\n self.adapter.populate();\r\n });\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n if (self.searcher.isSearching()) {\r\n self.storeValue = {value: self.searcherPane.getValue()};\r\n } else {\r\n self.storeValue = {value: self.adapter.getValue()};\r\n }\r\n self.setSelectedValue(self.storeValue.value);\r\n self.fireEvent(BI.MultiSelectTree.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n self._showAdapter();\r\n // BI-64732 pause 和stop一致, 都应该刷新adapter\r\n BI.nextTick(function () {\r\n self.adapter.populate();\r\n });\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.searcher,\r\n height: this._constant.EDITOR_HEIGHT\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: this._constant.EDITOR_HEIGHT,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n resize: function () {\r\n\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.adapter.setSelectedValue(v);\r\n this.searcherPane.setSelectedValue(v);\r\n this.searcher.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.adapter.setValue(v);\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n updateValue: function (v) {\r\n this.adapter.updateValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue.value;\r\n },\r\n\r\n populate: function () {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n }\r\n});\r\nBI.MultiSelectTree.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree\", BI.MultiSelectTree);/**\r\n * Created by zcf on 2016/12/21.\r\n */\r\nBI.MultiSelectTreePopup = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.MultiSelectTreePopup.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.popup = BI.createWidget({\r\n type: \"bi.async_tree\",\r\n element: this,\r\n itemsCreator: o.itemsCreator\r\n });\r\n this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT);\r\n });\r\n this.popup.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n hasChecked: function () {\r\n return this.popup.hasChecked();\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.popup.setValue(v);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.popup.setSelectedValue(v);\r\n },\r\n\r\n updateValue: function (v) {\r\n this.popup.updateValue(v);\r\n this.popup.refresh();\r\n },\r\n\r\n populate: function (config) {\r\n this.popup.stroke(config);\r\n }\r\n\r\n});\r\nBI.MultiSelectTreePopup.EVENT_AFTER_INIT = \"EVENT_AFTER_INIT\";\r\nBI.MultiSelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_select_tree_popup\", BI.MultiSelectTreePopup);/**\r\n *\r\n * @class BI.MultiTreeCheckPane\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreeCheckPane = BI.inherit(BI.Pane, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-pane bi-background\",\r\n onClickContinueSelect: BI.emptyFn,\r\n el: {\r\n type: \"bi.display_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckPane.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n\r\n this.selectedValues = {};\r\n\r\n var continueSelect = BI.createWidget({\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Continue_Select\"),\r\n cls: \"multi-tree-check-selected\"\r\n });\r\n continueSelect.on(BI.TextButton.EVENT_CHANGE, function () {\r\n opts.onClickContinueSelect();\r\n BI.nextTick(function () {\r\n self.empty();\r\n });\r\n });\r\n\r\n var backToPopup = BI.createWidget({\r\n type: \"bi.left\",\r\n cls: \"multi-tree-continue-select\",\r\n items: [\r\n {\r\n el: {\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Selected_Data\")\r\n },\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n },\r\n {\r\n el: continueSelect,\r\n lgap: this.constants.lgap,\r\n tgap: this.constants.tgap\r\n }]\r\n });\r\n\r\n this.display = BI.createWidget(opts.el, {\r\n type: \"bi.display_tree\",\r\n cls: \"bi-multi-tree-display\",\r\n itemsCreator: function (op, callback) {\r\n op.type = BI.TreeView.REQ_TYPE_GET_SELECTED_DATA;\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: (opts.value || {}).value\r\n });\r\n\r\n this.display.on(BI.Events.AFTERINIT, function () {\r\n self.fireEvent(BI.Events.AFTERINIT);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_INIT, function () {\r\n backToPopup.setVisible(false);\r\n });\r\n\r\n this.display.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n backToPopup.setVisible(true);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n height: this.constants.height,\r\n el: backToPopup\r\n }, {\r\n height: \"fill\",\r\n el: this.display\r\n }]\r\n });\r\n\r\n },\r\n\r\n empty: function () {\r\n this.display.empty();\r\n },\r\n\r\n populate: function (configs) {\r\n this.display.stroke(configs);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.display.setSelectedValue(v.value);\r\n },\r\n\r\n getValue: function () {\r\n\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckPane.EVENT_CONTINUE_CLICK = \"EVENT_CONTINUE_CLICK\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_check_pane\", BI.MultiTreeCheckPane);/**\r\n *\r\n * @class BI.MultiTreeCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n text: o.text,\r\n watermark: o.watermark,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n itemsCreator: o.itemsCreator\r\n },\r\n value: {value: o.value || {}}\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n value: {value: o.value || {}}\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_combo\", BI.MultiTreeCombo);/**\r\n * 可以往当前选中节点下添加新值的下拉树\r\n * @class BI.MultiTreeInsertCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeInsertCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-insert-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeInsertCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || {}};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_tree_searcher\",\r\n text: o.text,\r\n watermark: o.watermark,\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: \"bi.multi_tree_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value[self.trigger.getSearcher().getKeyword()] = {};\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : {}\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self._stopEditing();\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: {}};\r\n }\r\n self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || {};\r\n this.combo.setValue({\r\n value: v || {}\r\n });\r\n this.numberCounter.setValue({\r\n value: v || {}\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_insert_combo\", BI.MultiTreeInsertCombo);/**\r\n * 选中节点不影响父子节点状态的下拉树\r\n * @class BI.MultiTreeListCombo\r\n * @extends BI.Single\r\n */\r\n\r\nBI.MultiTreeListCombo = BI.inherit(BI.Single, {\r\n\r\n constants: {\r\n offset: {\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-list-combo\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n allowEdit: true,\r\n allowInsertValue: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeListCombo.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n var isInit = false;\r\n var want2showCounter = false;\r\n\r\n this.storeValue = {value: o.value || []};\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.multi_select_trigger\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n watermark: o.watermark,\r\n height: o.height,\r\n valueFormatter: o.valueFormatter,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: this.constants.offset\r\n },\r\n searcher: {\r\n type: \"bi.multi_list_tree_searcher\",\r\n itemsCreator: o.itemsCreator,\r\n popup: {\r\n type: o.allowInsertValue ? \"bi.multi_tree_search_insert_pane\" : \"bi.multi_tree_search_pane\",\r\n el: {\r\n type: \"bi.list_part_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n self.storeValue.value.unshift([self.trigger.getSearcher().getKeyword()]);\r\n self._assertShowValue();\r\n // setValue以更新paras.value, 之后从search popup中拿到的就能有add的值了\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self._stopEditing();\r\n }\r\n }]\r\n }\r\n },\r\n switcher: {\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\",\r\n el: {\r\n type: \"bi.list_display_tree\"\r\n },\r\n itemsCreator: o.itemsCreator\r\n }\r\n },\r\n value: {value: o.value || {}}\r\n\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: !o.allowEdit,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.multi_tree_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n self.numberCounter.setAdapter(this);\r\n },\r\n el: {\r\n type: \"bi.list_async_tree\"\r\n },\r\n listeners: [{\r\n eventName: BI.MultiTreePopup.EVENT_AFTERINIT,\r\n action: function () {\r\n self.numberCounter.adjustView();\r\n isInit = true;\r\n if (want2showCounter === true) {\r\n showCounter();\r\n }\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CHANGE,\r\n action: function () {\r\n change = true;\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: this.hasChecked() ? this.getValue() : []\r\n };\r\n self.trigger.getSearcher().setState(val);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self.combo.hideView();\r\n }\r\n }, {\r\n eventName: BI.MultiTreePopup.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n clear = true;\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.numberCounter.adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: {value: o.value || {}},\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0 &&\r\n self.numberCounter.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n var change = false;\r\n var clear = false; // 标识当前是否点击了清空\r\n\r\n var isSearching = function () {\r\n return self.trigger.getSearcher().isSearching();\r\n };\r\n\r\n var isPopupView = function () {\r\n return self.combo.isViewVisible();\r\n };\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self.storeValue = {value: self.combo.getValue()};\r\n this.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self.storeValue = {value: this.getValue()};\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n if (isPopupView()) {\r\n self.combo.populate();\r\n }\r\n });\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_STOP);\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING);\r\n });\r\n\r\n function showCounter () {\r\n if (isSearching()) {\r\n self.storeValue = {value: self.trigger.getValue()};\r\n } else if (isPopupView()) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n }\r\n self.trigger.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n }\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_TRIGGER_CLICK, function () {\r\n self.combo.toggle();\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function () {\r\n var checked = this.getSearcher().hasChecked();\r\n var val = {\r\n type: BI.Selection.Multi,\r\n value: checked ? {1: 1} : {}\r\n };\r\n this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None);\r\n self.numberCounter.setButtonChecked(val);\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM, self.combo.getValue());\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (isSearching()) {\r\n return;\r\n }\r\n if (change === true) {\r\n self.storeValue = {value: self.combo.getValue()};\r\n change = false;\r\n }\r\n self.combo.setValue(self.storeValue);\r\n self.numberCounter.setValue(self.storeValue);\r\n self.populate();\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_HIDEVIEW, function () {\r\n if (isSearching()) {\r\n self.trigger.stopEditing();\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n } else {\r\n if (isPopupView()) {\r\n self._stopEditing();\r\n self.storeValue = {value: self.combo.getValue()};\r\n if (clear === true) {\r\n self.storeValue = {value: []};\r\n }\r\n self.fireEvent(BI.MultiTreeListCombo.EVENT_CONFIRM);\r\n }\r\n }\r\n clear = false;\r\n change = false;\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.numberCounter.hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.numberCounter = BI.createWidget({\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n el: {\r\n type: \"bi.multi_tree_check_selected_button\"\r\n },\r\n popup: {\r\n type: \"bi.multi_tree_check_pane\"\r\n },\r\n itemsCreator: o.itemsCreator,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n valueFormatter: o.valueFormatter,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n if (want2showCounter === false) {\r\n want2showCounter = true;\r\n }\r\n if (isInit === true) {\r\n want2showCounter = null;\r\n showCounter();\r\n }\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n self.trigger.refreshPlaceHolderWidth((b === true ? self.numberCounter.element.outerWidth() + 8 : 0));\r\n });\r\n });\r\n\r\n this.trigger.element.click(function (e) {\r\n if (self.trigger.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.vertical_adapt\",\r\n items: [this.numberCounter]\r\n },\r\n right: o.height,\r\n top: 0,\r\n height: o.height,\r\n }]\r\n });\r\n },\r\n\r\n _assertShowValue: function () {\r\n this.trigger.getSearcher().setState(this.storeValue);\r\n this.numberCounter.setButtonChecked(this.storeValue);\r\n },\r\n\r\n _stopEditing: function() {\r\n this.trigger.stopEditing();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n _defaultState: function () {\r\n this._stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue.value = v || [];\r\n this.combo.setValue({\r\n value: v || []\r\n });\r\n this.numberCounter.setValue({\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue.value);\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeListCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.MultiTreeListCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.MultiTreeListCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeListCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.MultiTreeListCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeListCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.MultiTreeListCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.multi_tree_list_combo\", BI.MultiTreeListCombo);/**\r\n * 带加载的多选下拉面板\r\n * @class BI.MultiTreePopup\r\n * @extends BI.Pane\r\n */\r\nBI.MultiTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-popup\",\r\n maxWidth: \"auto\",\r\n minWidth: 140,\r\n maxHeight: 400,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.async_tree\"\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options, v = opts.value;\r\n\r\n this.selectedValues = {};\r\n\r\n this.tree = BI.createWidget(opts.el, {\r\n type: \"bi.async_tree\",\r\n height: 400,\r\n cls: \"popup-view-tree\",\r\n itemsCreator: opts.itemsCreator,\r\n onLoaded: opts.onLoaded,\r\n value: v.value || {}\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n element: this,\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.tree\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.tree.on(BI.TreeView.EVENT_AFTERINIT, function () {\r\n self.fireEvent(BI.MultiTreePopup.EVENT_AFTERINIT);\r\n });\r\n\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n this.tree.setSelectedValue(v.value);\r\n },\r\n\r\n populate: function (config) {\r\n this.tree.stroke(config);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.tree.hasChecked();\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.MultiTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreePopup.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreePopup.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreePopup.EVENT_AFTERINIT = \"EVENT_AFTERINIT\";\r\n\r\n\r\nBI.shortcut(\"bi.multi_tree_popup_view\", BI.MultiTreePopup);/**\r\n * 查看已选按钮\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeCheckSelectedButton\r\n * @extends BI.Single\r\n */\r\nBI.MultiTreeCheckSelectedButton = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-check-selected-button\",\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeCheckSelectedButton.superclass._init.apply(this, arguments);\r\n var self = this;\r\n this.indicator = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"check-font trigger-check-selected icon-size-12\",\r\n width: 15,\r\n height: 15,\r\n stopPropagation: true\r\n });\r\n\r\n this.checkSelected = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"trigger-check-selected\",\r\n invisible: true,\r\n hgap: 4,\r\n text: BI.i18nText(\"BI-Check_Selected\"),\r\n textAlign: \"center\",\r\n textHeight: 15\r\n });\r\n this.checkSelected.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.checkSelected.on(BI.TextButton.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiSelectCheckSelectedButton.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.horizontal\",\r\n element: this,\r\n items: [this.indicator, this.checkSelected]\r\n });\r\n\r\n this.element.hover(function () {\r\n self.indicator.setVisible(false);\r\n self.checkSelected.setVisible(true);\r\n }, function () {\r\n self.indicator.setVisible(true);\r\n self.checkSelected.setVisible(false);\r\n });\r\n this.setVisible(false);\r\n },\r\n\r\n setValue: function (v) {\r\n v || (v = {});\r\n var show = BI.size(v.value) > 0;\r\n this.setVisible(show);\r\n }\r\n});\r\n\r\nBI.MultiTreeCheckSelectedButton.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.multi_tree_check_selected_button\", BI.MultiTreeCheckSelectedButton);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchInsertPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 24,\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-insert-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n el: {\r\n type: \"bi.part_tree\"\r\n }\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n ref: function (_ref) {\r\n self.addTip = _ref;\r\n },\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n handler: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM, opts.keywordGetter());\r\n }\r\n },\r\n top: 5,\r\n left: 0,\r\n right: 0\r\n }, {\r\n el: BI.extend({\r\n type: \"bi.part_tree\",\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, function (res) {\r\n callback(res);\r\n self.setKeyword(opts.keywordGetter(), res.items);\r\n });\r\n },\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchInsertPane.EVENT_CHANGE);\r\n }\r\n }]\r\n }, opts.el),\r\n left: 0,\r\n top: 0,\r\n bottom: 0,\r\n right: 0\r\n }]\r\n };\r\n },\r\n\r\n setKeyword: function (keyword, nodes) {\r\n var isAddTipVisible = BI.isEmptyArray(nodes);\r\n this.addTip.setVisible(isAddTipVisible);\r\n this.partTree.setVisible(!isAddTipVisible);\r\n isAddTipVisible && this.addTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchInsertPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\nBI.MultiTreeSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_insert_pane\", BI.MultiTreeSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.MultiTreeSearchPane\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.MultiTreeSearchPane = BI.inherit(BI.Pane, {\r\n\r\n props: {\r\n baseCls: \"bi-multi-tree-search-pane bi-card\",\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n\r\n return BI.extend({\r\n type: \"bi.part_tree\",\r\n element: this,\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n itemsCreator: function (op, callback) {\r\n op.keyword = opts.keywordGetter();\r\n opts.itemsCreator(op, callback);\r\n },\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.TreeView.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.MultiTreeSearchPane.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.partTree = _ref;\r\n }\r\n }, opts.el);\r\n },\r\n\r\n hasChecked: function () {\r\n return this.partTree.hasChecked();\r\n },\r\n\r\n setValue: function (v) {\r\n this.setSelectedValue(v.value);\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n v || (v = {});\r\n this.partTree.setSelectedValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.partTree.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.partTree.empty();\r\n },\r\n\r\n populate: function (op) {\r\n this.partTree.stroke.apply(this.partTree, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.MultiTreeSearchPane.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\nBI.shortcut(\"bi.multi_tree_search_pane\", BI.MultiTreeSearchPane);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiListTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiListTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiListTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiListTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n watermark: o.watermark,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n height: o.height\r\n }\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiListTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = []);\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (idx, path) {\r\n var childValue = BI.last(path);\r\n text += (o.valueFormatter(childValue + \"\") || childValue) + \"; \";\r\n count++;\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiListTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiListTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiListTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiListTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiListTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_list_tree_searcher\", BI.MultiListTreeSearcher);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.MultiTreeSearcher\r\n * @extends Widget\r\n */\r\nBI.MultiTreeSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.MultiTreeSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-tree-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n popup: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.MultiTreeSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.multi_select_editor\",\r\n watermark: o.watermark,\r\n height: o.height,\r\n el: {\r\n type: \"bi.simple_state_editor\",\r\n text: o.text,\r\n height: o.height\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n element: this,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback({\r\n keyword: self.editor.getValue()\r\n });\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_tree_search_pane\",\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keyword = self.editor.getValue();\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if (BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setState: function (ob) {\r\n var o = this.options;\r\n ob || (ob = {});\r\n ob.value || (ob.value = {});\r\n var count = 0;\r\n if (BI.isNumber(ob)) {\r\n this.editor.setState(ob);\r\n } else if (BI.size(ob.value) === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n var text = \"\";\r\n BI.each(ob.value, function (name, children) {\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + \"; \";\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n\r\n if (count > 20) {\r\n this.editor.setState(BI.Selection.Multi);\r\n } else {\r\n this.editor.setState(text);\r\n }\r\n }\r\n\r\n function getChildrenNode (ob) {\r\n var text = \"\";\r\n var index = 0, size = BI.size(ob);\r\n BI.each(ob, function (name, children) {\r\n index++;\r\n var childNodes = getChildrenNode(children);\r\n text += (o.valueFormatter(name + \"\") || name) + (childNodes === \"\" ? \"\" : (\":\" + childNodes)) + (index === size ? \"\" : \",\");\r\n if (childNodes === \"\") {\r\n count++;\r\n }\r\n });\r\n return text;\r\n }\r\n },\r\n\r\n getState: function() {\r\n return this.editor.getState();\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.MultiTreeSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.MultiTreeSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.MultiTreeSearcher.EVENT_START = \"EVENT_START\";\r\nBI.MultiTreeSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.MultiTreeSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.multi_tree_searcher\", BI.MultiTreeSearcher);/**\r\n * Created by windy on 2017/3/13.\r\n * 数值微调器\r\n */\r\nBI.NumberEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.NumberEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-number-editor bi-border bi-focus-shadow\",\r\n validationChecker: function () {\r\n return true;\r\n },\r\n valueFormatter: function (v) {\r\n return v;\r\n },\r\n value: 0,\r\n allowBlank: false,\r\n errorText: \"\",\r\n step: 1\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.NumberEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height - 2,\r\n allowBlank: o.allowBlank,\r\n value: o.valueFormatter(o.value),\r\n validationChecker: o.validationChecker,\r\n errorText: o.errorText\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_ERROR, function () {\r\n o.value = BI.parseFloat(this.getLastValidValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_VALID, function () {\r\n o.value = BI.parseFloat(this.getValue());\r\n });\r\n this.editor.on(BI.TextEditor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.topBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n forceNotSelected: true,\r\n trigger: \"lclick,\",\r\n cls: \"add-up-font top-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.topBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n this.bottomBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n trigger: \"lclick,\",\r\n forceNotSelected: true,\r\n cls: \"minus-down-font bottom-button bi-border-left bi-list-item-active2 icon-size-12\"\r\n });\r\n this.bottomBtn.on(BI.IconButton.EVENT_CHANGE, function () {\r\n self._finetuning(-o.step);\r\n self.fireEvent(BI.NumberEditor.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberEditor.EVENT_CONFIRM);\r\n });\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n height: o.height - 2,\r\n element: this,\r\n items: [this.editor, {\r\n el: {\r\n type: \"bi.grid\",\r\n columns: 1,\r\n rows: 2,\r\n items: [{\r\n column: 0,\r\n row: 0,\r\n el: this.topBtn\r\n }, {\r\n column: 0,\r\n row: 1,\r\n el: this.bottomBtn\r\n }]\r\n },\r\n width: 23\r\n }]\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n // 微调\r\n _finetuning: function (add) {\r\n var v = BI.parseFloat(this.getValue());\r\n this.setValue(BI.add(v, add));\r\n },\r\n\r\n setUpEnable: function (v) {\r\n this.topBtn.setEnable(!!v);\r\n },\r\n\r\n setDownEnable: function (v) {\r\n this.bottomBtn.setEnable(!!v);\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n o.value = v;\r\n this.editor.setValue(o.valueFormatter(v));\r\n }\r\n\r\n});\r\nBI.NumberEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberEditor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.number_editor\", BI.NumberEditor);// 小于号的值为:0,小于等于号的值为:1\r\n// closeMIn:最小值的符号,closeMax:最大值的符号\r\n/**\r\n * Created by roy on 15/9/17.\r\n *\r\n */\r\nBI.NumberInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n typeError: \"typeBubble\",\r\n numberError: \"numberBubble\",\r\n signalError: \"signalBubble\",\r\n editorWidth: 114,\r\n columns: 5,\r\n width: 24,\r\n rows: 1,\r\n numberErrorCls: \"number-error\",\r\n border: 1,\r\n less: 0,\r\n less_equal: 1,\r\n numTip: \"\",\r\n adjustYOffset: 2\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.NumberInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-number-interval\" + ((BI.isIE() && BI.getIEVersion() < 10) ? \" hack\" : \"\"),\r\n height: 24,\r\n validation: \"valid\",\r\n closeMin: true,\r\n allowBlank: true,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\")\r\n });\r\n },\r\n _init: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n BI.NumberInterval.superclass._init.apply(this, arguments);\r\n this.smallEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.min,\r\n level: \"warning\",\r\n tipType: \"success\",\r\n title: function () {\r\n return self.smallEditor && self.smallEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.smallEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-small-editor bi-border\"\r\n });\r\n\r\n this.smallTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.smallEditor.element,\r\n items: [{\r\n el: this.smallTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n\r\n this.bigEditor = BI.createWidget({\r\n type: \"bi.number_interval_single_editor\",\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.max,\r\n title: function () {\r\n return self.bigEditor && self.bigEditor.getValue();\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n validationChecker: function (v) {\r\n if (!BI.isNumeric(v)) {\r\n self.bigEditorBubbleType = c.typeError;\r\n return false;\r\n }\r\n return true;\r\n },\r\n cls: \"number-interval-big-editor bi-border\"\r\n });\r\n\r\n this.bigTip = BI.createWidget({\r\n type: \"bi.label\",\r\n text: o.numTip,\r\n height: o.height - 2,\r\n invisible: true\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this.bigEditor.element,\r\n items: [{\r\n el: this.bigTip,\r\n top: 0,\r\n right: 5\r\n }]\r\n });\r\n this.smallCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-small-combo bi-border-top bi-border-bottom bi-border-right\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMin === true) {\r\n this.smallCombo.setValue(1);\r\n } else {\r\n this.smallCombo.setValue(0);\r\n }\r\n this.bigCombo = BI.createWidget({\r\n type: \"bi.icon_combo\",\r\n cls: \"number-interval-big-combo bi-border-top bi-border-bottom bi-border-left\",\r\n height: o.height - 2,\r\n items: [{\r\n text: \"(\" + BI.i18nText(\"BI-Less_Than\") + \")\",\r\n iconCls: \"less-font\",\r\n value: 0\r\n }, {\r\n text: \"(\" + BI.i18nText(\"BI-Less_And_Equal\") + \")\",\r\n value: 1,\r\n iconCls: \"less-equal-font\"\r\n }]\r\n });\r\n if (o.closeMax === true) {\r\n this.bigCombo.setValue(1);\r\n } else {\r\n this.bigCombo.setValue(0);\r\n }\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Basic_Value\"),\r\n textHeight: o.height - c.border * 2,\r\n width: c.width - c.border * 2,\r\n height: o.height - c.border * 2,\r\n level: \"warning\",\r\n tipType: \"warning\"\r\n });\r\n this.left = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.smallEditor\r\n }, {\r\n el: self.smallCombo,\r\n width: c.width - c.border\r\n }]\r\n\r\n });\r\n this.right = BI.createWidget({\r\n type: \"bi.htape\",\r\n items: [{\r\n el: self.bigCombo,\r\n width: c.width - c.border\r\n }, {\r\n el: self.bigEditor,\r\n // BI-23883 间距考虑边框\r\n lgap: 1\r\n }]\r\n });\r\n\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: o.height,\r\n items: [\r\n {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: -15,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: -15,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }\r\n ]\r\n });\r\n\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.horizontal_auto\",\r\n items: [\r\n self.label\r\n ]\r\n });\r\n\r\n\r\n self._setValidEvent(self.bigEditor, c.bigEditor);\r\n self._setValidEvent(self.smallEditor, c.smallEditor);\r\n self._setErrorEvent(self.bigEditor, c.bigEditor);\r\n self._setErrorEvent(self.smallEditor, c.smallEditor);\r\n self._setBlurEvent(self.bigEditor);\r\n self._setBlurEvent(self.smallEditor);\r\n self._setFocusEvent(self.bigEditor);\r\n self._setFocusEvent(self.smallEditor);\r\n self._setComboValueChangedEvent(self.bigCombo);\r\n self._setComboValueChangedEvent(self.smallCombo);\r\n self._setEditorValueChangedEvent(self.bigEditor);\r\n self._setEditorValueChangedEvent(self.smallEditor);\r\n\r\n self._checkValidation();\r\n },\r\n\r\n _checkValidation: function () {\r\n var self = this, c = this.constants, o = this.options;\r\n self._setTitle(\"\");\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n if (!self.smallEditor.isValid() || !self.bigEditor.isValid()) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.typeError;\r\n }\r\n if (BI.isEmptyString(self.smallEditor.getValue()) || BI.isEmptyString(self.bigEditor.getValue())) {\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n }\r\n var smallValue = parseFloat(self.smallEditor.getValue()), bigValue = parseFloat(self.bigEditor.getValue()),\r\n bigComboValue = self.bigCombo.getValue(), smallComboValue = self.smallCombo.getValue();\r\n if (bigComboValue[0] === c.less_equal && smallComboValue[0] === c.less_equal) {\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n }\r\n if (smallValue > bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.numberError;\r\n } else if (smallValue === bigValue) {\r\n self.element.addClass(\"number-error\");\r\n o.validation = \"invalid\";\r\n return c.signalError;\r\n }\r\n self.element.removeClass(\"number-error\");\r\n o.validation = \"valid\";\r\n return \"\";\r\n\r\n\r\n\r\n\r\n\r\n },\r\n\r\n _setTitle: function (v) {\r\n this.label.setTitle(v);\r\n },\r\n\r\n _setFocusEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, function () {\r\n self._setTitle(\"\");\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n return;\r\n }\r\n\r\n });\r\n },\r\n _setBlurEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_BLUR, function () {\r\n BI.Bubbles.hide(c.typeError);\r\n BI.Bubbles.hide(c.numberError);\r\n BI.Bubbles.hide(c.signalError);\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n break;\r\n default:\r\n self._setTitle(\"\");\r\n }\r\n });\r\n },\r\n\r\n _setErrorEvent: function (w) {\r\n var c = this.constants, self = this;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_ERROR, function () {\r\n self._checkValidation();\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n });\r\n },\r\n\r\n\r\n _setValidEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_VALID, function () {\r\n switch (self._checkValidation()) {\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default:\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n\r\n _setEditorValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n BI.Bubbles.show(c.typeError, BI.i18nText(\"BI-Numerical_Interval_Input_Data\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.numberError:\r\n BI.Bubbles.show(c.numberError, BI.i18nText(\"BI-Numerical_Interval_Number_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n case c.signalError:\r\n BI.Bubbles.show(c.signalError, BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"), self, {\r\n offsetStyle: \"left\",\r\n adjustYOffset: c.adjustYOffset\r\n });\r\n break;\r\n default :\r\n break;\r\n }\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n });\r\n w.on(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n _setComboValueChangedEvent: function (w) {\r\n var self = this, c = this.constants;\r\n w.on(BI.IconCombo.EVENT_CHANGE, function () {\r\n switch (self._checkValidation()) {\r\n case c.typeError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Input_Data\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.numberError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Number_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n case c.signalError:\r\n self._setTitle(BI.i18nText(\"BI-Numerical_Interval_Signal_Value\"));\r\n self.fireEvent(BI.NumberInterval.EVENT_ERROR);\r\n break;\r\n default :\r\n self.fireEvent(BI.NumberInterval.EVENT_CHANGE);\r\n self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);\r\n self.fireEvent(BI.NumberInterval.EVENT_VALID);\r\n }\r\n });\r\n },\r\n\r\n isStateValid: function () {\r\n return this.options.validation === \"valid\";\r\n },\r\n\r\n setMinEnable: function (b) {\r\n this.smallEditor.setEnable(b);\r\n },\r\n\r\n setCloseMinEnable: function (b) {\r\n this.smallCombo.setEnable(b);\r\n },\r\n\r\n setMaxEnable: function (b) {\r\n this.bigEditor.setEnable(b);\r\n },\r\n\r\n setCloseMaxEnable: function (b) {\r\n this.bigCombo.setEnable(b);\r\n },\r\n\r\n showNumTip: function () {\r\n this.smallTip.setVisible(true);\r\n this.bigTip.setVisible(true);\r\n },\r\n\r\n hideNumTip: function () {\r\n this.smallTip.setVisible(false);\r\n this.bigTip.setVisible(false);\r\n },\r\n\r\n setNumTip: function (numTip) {\r\n this.smallTip.setText(numTip);\r\n this.bigTip.setText(numTip);\r\n },\r\n\r\n getNumTip: function () {\r\n return this.smallTip.getText();\r\n },\r\n\r\n setValue: function (data) {\r\n data = data || {};\r\n var self = this, combo_value;\r\n if (BI.isNumeric(data.min) || BI.isEmptyString(data.min)) {\r\n self.smallEditor.setValue(data.min);\r\n }\r\n\r\n if (!BI.isNotNull(data.min)) {\r\n self.smallEditor.setValue(\"\");\r\n }\r\n\r\n if (BI.isNumeric(data.max) || BI.isEmptyString(data.max)) {\r\n self.bigEditor.setValue(data.max);\r\n }\r\n\r\n if (!BI.isNotNull(data.max)) {\r\n self.bigEditor.setValue(\"\");\r\n }\r\n\r\n if (!BI.isNull(data.closeMin)) {\r\n if (data.closeMin === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.smallCombo.setValue(combo_value);\r\n }\r\n\r\n if (!BI.isNull(data.closeMax)) {\r\n if (data.closeMax === true) {\r\n combo_value = 1;\r\n } else {\r\n combo_value = 0;\r\n }\r\n self.bigCombo.setValue(combo_value);\r\n }\r\n\r\n this._checkValidation();\r\n },\r\n\r\n\r\n getValue: function () {\r\n var self = this, value = {}, minComboValue = self.smallCombo.getValue(), maxComboValue = self.bigCombo.getValue();\r\n value.min = self.smallEditor.getValue();\r\n value.max = self.bigEditor.getValue();\r\n if (minComboValue[0] === 0) {\r\n value.closeMin = false;\r\n } else {\r\n value.closeMin = true;\r\n }\r\n\r\n if (maxComboValue[0] === 0) {\r\n value.closeMax = false;\r\n } else {\r\n value.closeMax = true;\r\n }\r\n return value;\r\n },\r\n\r\n destroyed: function () {\r\n var c = this.constants;\r\n BI.Bubbles.remove(c.typeError);\r\n BI.Bubbles.remove(c.numberError);\r\n BI.Bubbles.remove(c.signalError);\r\n }\r\n});\r\nBI.NumberInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberInterval.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.NumberInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.shortcut(\"bi.number_interval\", BI.NumberInterval);BI.NumberIntervalSingleEidtor = BI.inherit(BI.Single, {\r\n props: {\r\n baseCls: \"bi-number-interval-single-editor\",\r\n tipType: \"success\",\r\n title: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.editor\",\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n height: o.height - 2,\r\n watermark: o.watermark,\r\n allowBlank: o.allowBlank,\r\n value: o.value,\r\n quitChecker: o.quitChecker,\r\n validationChecker: o.validationChecker,\r\n listeners: [{\r\n eventName: BI.Editor.EVENT_ERROR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_ERROR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_FOCUS, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_BLUR, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_VALID,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_VALID, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CONFIRM, arguments);\r\n }\r\n }, {\r\n eventName: BI.Editor.EVENT_CHANGE_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM, arguments);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n return this.editor.setValue(v);\r\n }\r\n});\r\n\r\nBI.NumberIntervalSingleEidtor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.NumberIntervalSingleEidtor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.NumberIntervalSingleEidtor.EVENT_VALID = \"EVENT_VALID\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.NumberIntervalSingleEidtor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.number_interval_single_editor\", BI.NumberIntervalSingleEidtor);/**\r\n *\r\n * @class BI.SearchMultiTextValueCombo\r\n * @extends BI.Single\r\n */\r\nBI.SearchMultiTextValueCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiTextValueCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-combo bi-search-multi-text-value-combo\",\r\n height: 24,\r\n items: []\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiTextValueCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));\r\n self._updateAllValue();\r\n self._checkError();\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n self.trigger.getCounter().setButtonChecked(self.storeValue);\r\n };\r\n this.storeValue = BI.deepClone(o.value || {});\r\n this._updateAllValue();\r\n\r\n this._assertValue(this.storeValue);\r\n this._checkError();\r\n\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.search_multi_select_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n // adapter: this.popup,\r\n masker: {\r\n offset: {\r\n left: 0,\r\n top: 0,\r\n right: 0,\r\n bottom: 25\r\n }\r\n },\r\n allValueGetter: function () {\r\n return self.allValue;\r\n },\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n self._itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(BI.deepClone(self.getValue()));\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n value: this.storeValue,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () {\r\n self._setStartValue(\"\");\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue(\"\");\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self._join({\r\n type: BI.Selection.Multi,\r\n value: [keyword]\r\n }, function () {\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self._populate();\r\n self._setStartValue(\"\");\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue(\"\");\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n });\r\n\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n if (obj instanceof BI.MultiSelectBar) {\r\n self._joinAll(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n } else {\r\n self._join(this.getValue(), function () {\r\n assertShowValue();\r\n });\r\n }\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () {\r\n this.getCounter().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.MultiSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n toggle: false,\r\n container: o.container,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.search_multi_select_popup_view\",\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.MultiSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n });\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM,\r\n action: function () {\r\n self._defaultState();\r\n }\r\n }, {\r\n eventName: BI.MultiSelectPopupView.EVENT_CLICK_CLEAR,\r\n action: function () {\r\n self.setValue();\r\n self._defaultState();\r\n }\r\n }],\r\n itemsCreator: BI.bind(self._itemsCreator, this),\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getCounter().adjustView();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n value: o.value,\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n }\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self._populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n /**\r\n * 在存在标红的情况,如果popover没有发生改变就确认需要同步trigger的值,否则对外value值和trigger样式不统一\r\n */\r\n assertShowValue();\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"multi-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n self.trigger.getCounter().hideView();\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this._checkError();\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n var o = this.options;\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n BI.remove(val.value, function (idx, value) {\r\n return !BI.contains(BI.map(o.items, \"value\"), value);\r\n });\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Multi ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _joinAll: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this.requesting = true;\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_ALL_DATA,\r\n keywords: [this.trigger.getKey()]\r\n }, function (ob) {\r\n var items = BI.map(ob.items, \"value\");\r\n if (self.storeValue.type === res.type) {\r\n var change = false;\r\n var map = self._makeMap(self.storeValue.value);\r\n BI.each(items, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (self.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n var selectedMap = self._makeMap(self.storeValue.value);\r\n var notSelectedMap = self._makeMap(res.value);\r\n var newItems = [];\r\n BI.each(items, function (i, item) {\r\n if (BI.isNotNull(selectedMap[items[i]])) {\r\n self.storeValue.assist && self.storeValue.assist.push(selectedMap[items[i]]);\r\n delete selectedMap[items[i]];\r\n }\r\n if (BI.isNull(notSelectedMap[items[i]])) {\r\n BI.remove(self.storeValue.assist, item);\r\n newItems.push(item);\r\n }\r\n });\r\n self.storeValue.value = newItems.concat(BI.values(selectedMap));\r\n self._adjust(callback);\r\n });\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n this._itemsCreator({\r\n type: BI.SearchMultiTextValueCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.storeValue.type === BI.Selection.All && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.Multi,\r\n value: []\r\n };\r\n } else if (self.storeValue.type === BI.Selection.Multi && self.storeValue.value.length >= self._count) {\r\n self.storeValue = {\r\n type: BI.Selection.All,\r\n value: []\r\n };\r\n }\r\n self._updateAllValue();\r\n self._checkError();\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SearchMultiTextValueCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _join: function (res, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(res);\r\n this._assertValue(this.storeValue);\r\n if (this.storeValue.type === res.type) {\r\n var map = this._makeMap(this.storeValue.value);\r\n BI.each(res.value, function (i, v) {\r\n if (!map[v]) {\r\n self.storeValue.value.push(v);\r\n BI.remove(self.storeValue.assist, v);\r\n map[v] = v;\r\n }\r\n });\r\n var change = false;\r\n BI.each(res.assist, function (i, v) {\r\n if (BI.isNotNull(map[v])) {\r\n change = true;\r\n self.storeValue.assist && self.storeValue.assist.push(map[v]);\r\n delete map[v];\r\n }\r\n });\r\n change && (this.storeValue.value = BI.values(map));\r\n self._adjust(callback);\r\n return;\r\n }\r\n this._joinAll(res, callback);\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * 100; items[i] && i < times * 100; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * 100 < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n var items = o.items;\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n items = search.match.concat(search.find);\r\n });\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n items = BI.filter(items, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: items\r\n });\r\n return;\r\n }\r\n if (options.type == BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: items.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(items, options.times),\r\n hasNext: self._hasNextByTimes(items, options.times)\r\n });\r\n },\r\n\r\n _checkError: function () {\r\n var v = this.storeValue.value || [];\r\n if(BI.isNotEmptyArray(v)) {\r\n v = BI.isArray(v) ? v : [v];\r\n var result = BI.find(this.allValue, function (idx, value) {\r\n return !BI.contains(v, value);\r\n });\r\n if (BI.isNull(result)) {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n } else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n } else {\r\n if(v.length === this.allValue.length){\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"success\"));\r\n this.element.removeClass(\"combo-error\");\r\n }else {\r\n BI.isNotNull(this.trigger) && (this.trigger.setTipType(\"warning\"));\r\n this.element.addClass(\"combo-error\");\r\n }\r\n }\r\n },\r\n\r\n _updateAllValue: function () {\r\n this.storeValue = this.storeValue || {};\r\n this.allValue = BI.deepClone(this.storeValue.value || []);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = BI.deepClone(v || {});\r\n this._updateAllValue();\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n this._checkError();\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n _populate: function () {\r\n this._count = null;\r\n this.combo.populate();\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this._populate();\r\n }\r\n});\r\n\r\nBI.extend(BI.SearchMultiTextValueCombo, {\r\n REQ_GET_DATA_LENGTH: 1,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SearchMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.search_multi_text_value_combo\", BI.SearchMultiTextValueCombo);\r\nBI.SearchMultiSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-trigger bi-border\",\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.search_multi_select_searcher\",\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n allValueGetter: o.allValueGetter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.numberCounter = BI.createWidget(o.switcher, {\r\n type: \"bi.multi_select_check_selected_switcher\",\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: o.itemsCreator,\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_TRIGGER_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK);\r\n });\r\n this.numberCounter.on(BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW);\r\n });\r\n\r\n var wrapNumberCounter = BI.createWidget({\r\n type: \"bi.right_vertical_adapt\",\r\n hgap: 4,\r\n items: [{\r\n el: this.numberCounter\r\n }]\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: wrapNumberCounter,\r\n width: 0\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n this.numberCounter.on(BI.Events.VIEW, function (b) {\r\n BI.nextTick(function () {// 自动调整宽度\r\n wrapper.attr(\"items\")[1].width = (b === true ? self.numberCounter.element.outerWidth() + 8 : 0);\r\n wrapper.resize();\r\n });\r\n });\r\n\r\n this.element.click(function (e) {\r\n if (self.element.find(e.target).length > 0) {\r\n self.numberCounter.hideView();\r\n }\r\n });\r\n },\r\n\r\n getCounter: function () {\r\n return this.numberCounter;\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n this.numberCounter.hideView();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n this.numberCounter.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.searcher.setValue(ob);\r\n this.numberCounter.setValue(ob);\r\n },\r\n\r\n setTipType: function (v) {\r\n this.searcher.setTipType(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SearchMultiSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SearchMultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\n\r\nBI.shortcut(\"bi.search_multi_select_trigger\", BI.SearchMultiSelectTrigger);\r\n/**\r\n * 多选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SearchMultiSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SearchMultiSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.storeValue = opts.value || {};\r\n this._assertValue(this.storeValue);\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.select_list\",\r\n element: this,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_MULTI,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: BI.isKey(startValue) && self.storeValue.type === BI.Selection.Multi\r\n ? self.storeValue.value.concat(startValue) : self.storeValue.value\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && self.storeValue) {\r\n var json = BI.map(self.storeValue.value, function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: self.storeValue.type === BI.Selection.Multi\r\n };\r\n });\r\n if (BI.isKey(self._startValue) && !BI.contains(self.storeValue.value, self._startValue)) {\r\n var txt = opts.valueFormatter(startValue) || startValue;\r\n json.unshift({\r\n text: txt,\r\n value: startValue,\r\n title: txt,\r\n selected: true\r\n });\r\n }\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, startValue) : BI.pushDistinct(self.storeValue.value, startValue));\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: \"bi.multi_select_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: this.isAllSelected(),\r\n iconWrapperWidth: 36\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.button_group.isAllSelected();\r\n },\r\n\r\n _assertValue: function (val) {\r\n val || (val = {});\r\n val.type || (val.type = BI.Selection.Multi);\r\n val.value || (val.value = []);\r\n },\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v || {};\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n arguments[0] = this._createItems(items);\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.search_multi_select_loader\", BI.SearchMultiSelectLoader);BI.SearchMultiSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-popup-view\",\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.search_multi_select_loader\",\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.multi_popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n buttons: [BI.i18nText(\"BI-Basic_Clears\"), BI.i18nText(\"BI-Basic_Sure\")],\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CHANGE);\r\n });\r\n this.popupView.on(BI.MultiPopupView.EVENT_CLICK_TOOLBAR_BUTTON, function (index) {\r\n switch (index) {\r\n case 0:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR);\r\n break;\r\n case 1:\r\n self.fireEvent(BI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM);\r\n break;\r\n }\r\n });\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.loader.isAllSelected();\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CONFIRM = \"EVENT_CLICK_CONFIRM\";\r\nBI.SearchMultiSelectPopupView.EVENT_CLICK_CLEAR = \"EVENT_CLICK_CLEAR\";\r\n\r\n\r\nBI.shortcut(\"bi.search_multi_select_popup_view\", BI.SearchMultiSelectPopupView);BI.SearchMultiSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SearchMultiSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SearchMultiSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.multi_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n tipType: o.tipType,\r\n warningTitle: o.warningTitle\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.multi_select_search_pane\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SearchMultiSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n if(BI.isNotNull(o.value)) {\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (obj) {\r\n var o = this.options;\r\n var ob = {};\r\n ob.type = obj.type;\r\n ob.value = o.allValueGetter() || [];\r\n ob.assist = obj.assist;\r\n if (ob.type === BI.Selection.All) {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.All);\r\n } else if (BI.size(ob.assist) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.assist, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n } else {\r\n if (ob.value.length === 0) {\r\n this.editor.setState(BI.Selection.None);\r\n } else if (BI.size(ob.value) <= 20) {\r\n var state = \"\";\r\n BI.each(ob.value, function (i, v) {\r\n if (i === 0) {\r\n state += \"\" + (o.valueFormatter(v + \"\") || v);\r\n } else {\r\n state += \",\" + (o.valueFormatter(v + \"\") || v);\r\n }\r\n });\r\n this.editor.setState(state);\r\n } else {\r\n this.editor.setState(BI.Selection.Multi);\r\n }\r\n }\r\n },\r\n\r\n setTipType: function (v) {\r\n this.editor.setTipType(v);\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SearchMultiSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SearchMultiSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SearchMultiSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SearchMultiSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SearchMultiSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SearchMultiSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.search_multi_select_searcher\", BI.SearchMultiSelectSearcher);\r\n/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeFirstPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeFirstPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeFirstPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-first-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeFirstPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.first_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeFirstPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_first_plus_group_node\", BI.SelectTreeFirstPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeLastPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeLastPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeLastPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-last-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeLastPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.last_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeLastPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_last_plus_group_node\", BI.SelectTreeLastPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreeMidPlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreeMidPlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreeMidPlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-mid-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreeMidPlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.mid_tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreeMidPlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_mid_plus_group_node\", BI.SelectTreeMidPlusGroupNode);/**\r\n * 加号表示的组节点\r\n * Created by GUY on 2015/9/6.\r\n * @class BI.SelectTreePlusGroupNode\r\n * @extends BI.NodeButton\r\n */\r\nBI.SelectTreePlusGroupNode = BI.inherit(BI.NodeButton, {\r\n _defaultConfig: function () {\r\n var conf = BI.SelectTreePlusGroupNode.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-select-tree-plus-group-node bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n id: \"\",\r\n pId: \"\",\r\n readonly: true,\r\n open: false,\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SelectTreePlusGroupNode.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.checkbox = BI.createWidget({\r\n type: \"bi.tree_node_checkbox\",\r\n stopPropagation: true\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n value: o.value,\r\n keyword: o.keyword,\r\n py: o.py\r\n });\r\n this.checkbox.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.triggerExpand();\r\n } else {\r\n self.triggerCollapse();\r\n }\r\n }\r\n });\r\n var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);\r\n var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, {\r\n width: 24,\r\n el: this.checkbox\r\n }, this.text);\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {\r\n items: items\r\n }))));\r\n },\r\n\r\n isOnce: function () {\r\n return true;\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.NodeButton.superclass.doClick.apply(this, arguments);\r\n },\r\n\r\n setOpened: function (v) {\r\n BI.SelectTreePlusGroupNode.superclass.setOpened.apply(this, arguments);\r\n if (BI.isNotNull(this.checkbox)) {\r\n this.checkbox.setSelected(v);\r\n }\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_plus_group_node\", BI.SelectTreePlusGroupNode);/**\r\n * @class BI.SelectTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-combo\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.select_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n }\r\n});\r\n\r\n\r\nBI.shortcut(\"bi.select_tree_combo\", BI.SelectTreeCombo);/**\r\n * @class BI.SelectTreeExpander\r\n * @extends BI.Widget\r\n */\r\nBI.SelectTreeExpander = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreeExpander.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-tree-expander\",\r\n trigger: \"\",\r\n toggle: true,\r\n direction: \"bottom\",\r\n isDefaultInit: true,\r\n el: {},\r\n popup: {}\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreeExpander.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(o.el);\r\n this.trigger.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n if (this.isSelected()) {\r\n self.expander.setValue([]);\r\n }\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.expander = BI.createWidget({\r\n type: \"bi.expander\",\r\n element: this,\r\n trigger: o.trigger,\r\n toggle: o.toggle,\r\n direction: o.direction,\r\n isDefaultInit: o.isDefaultInit,\r\n el: this.trigger,\r\n popup: o.popup\r\n });\r\n this.expander.on(BI.Controller.EVENT_CHANGE, function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.trigger.setSelected(false);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.expander.getAllLeaves();\r\n },\r\n\r\n setValue: function (v) {\r\n if (BI.contains(v, this.trigger.getValue())) {\r\n this.trigger.setSelected(true);\r\n this.expander.setValue([]);\r\n } else {\r\n this.trigger.setSelected(false);\r\n this.expander.setValue(v);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n if (this.trigger.isSelected()) {\r\n return [this.trigger.getValue()];\r\n }\r\n return this.expander.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.expander.populate(items);\r\n }\r\n});\r\n\r\nBI.shortcut(\"bi.select_tree_expander\", BI.SelectTreeExpander);/**\r\n * @class BI.SelectTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SelectTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SelectTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _formatItems: function (nodes, layer, pNode) {\r\n var self = this;\r\n BI.each(nodes, function (i, node) {\r\n var extend = {layer: layer};\r\n node.id = node.id || BI.UUID();\r\n extend.pNode = pNode;\r\n if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) {\r\n extend.type = \"bi.select_tree_mid_plus_group_node\";\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.select_tree_last_plus_group_node\";\r\n extend.isLastNode = true;\r\n }\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.select_tree_first_plus_group_node\"\r\n }\r\n if (i === 0 && i === nodes.length - 1) { // 根\r\n extend.type = \"bi.select_tree_plus_group_node\";\r\n }\r\n BI.defaults(node, extend);\r\n self._formatItems(node.children, layer + 1, node);\r\n } else {\r\n extend.type = \"bi.mid_tree_leaf_item\";\r\n if (i === 0 && !pNode) {\r\n extend.type = \"bi.first_tree_leaf_item\"\r\n }\r\n if (i === nodes.length - 1) {\r\n extend.type = \"bi.last_tree_leaf_item\";\r\n }\r\n BI.defaults(node, extend);\r\n }\r\n });\r\n return nodes;\r\n },\r\n\r\n _init: function () {\r\n BI.SelectTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n type: \"bi.select_tree_expander\",\r\n isDefaultInit: true\r\n },\r\n items: this._formatItems(BI.Tree.transformToTreeFormat(o.items), 0),\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SelectTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SelectTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(items)));\r\n }\r\n});\r\n\r\nBI.SelectTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.select_level_tree\", BI.SelectTreePopup);/**\r\n * 单选加载数据搜索loader面板\r\n * Created by guy on 15/11/4.\r\n * @class BI.SingleSelectSearchLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-loader\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n keywordGetter: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n element: this,\r\n logic: {\r\n dynamic: false\r\n },\r\n value: opts.value,\r\n el: {\r\n tipText: BI.i18nText(\"BI-No_Select\"),\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n },\r\n itemsCreator: function (op, callback) {\r\n self.storeValue && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n var keyword = ob.keyword = opts.keywordGetter();\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = self._filterValues(self.storeValue);\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n self.setValue(self.storeValue);\r\n }\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n }\r\n });\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearchLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n cls: \"bi-list-item-active\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 25,\r\n selected: false\r\n });\r\n },\r\n\r\n _filterValues: function (src) {\r\n var o = this.options;\r\n var keyword = o.keywordGetter();\r\n var values = src || [];\r\n var newValues = BI.map(BI.isArray(values) ? values : [values], function (i, v) {\r\n return {\r\n text: o.valueFormatter(v) || v,\r\n value: v\r\n };\r\n });\r\n if (BI.isKey(keyword)) {\r\n var search = BI.Func.getSearchResult(newValues, keyword);\r\n values = search.match.concat(search.find);\r\n }\r\n return BI.map(values, function (i, v) {\r\n return {\r\n text: v.text,\r\n title: v.text,\r\n value: v.value,\r\n selected: false\r\n };\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了\r\n this.storeValue = v;\r\n this.button_group.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_search_loader\", BI.SingleSelectSearchLoader);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchInsertPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchInsertPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"single-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.addNotMatchTip = BI.createWidget({\r\n type: \"bi.text_button\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Basic_Click_To_Add_Text\", \"\"),\r\n height: this.constants.height,\r\n cls: \"bi-high-light\",\r\n hgap: 5,\r\n handler: function () {\r\n self.fireEvent(BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM, o.keywordGetter());\r\n }\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n type: \"bi.vertical\",\r\n items: [this.tooltipClick, this.addNotMatchTip],\r\n height: this.constants.height\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) {\r\n return keyword === btn.getValue();\r\n });\r\n var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue;\r\n this.tooltipClick.setVisible(isMatchTipVisible);\r\n this.addNotMatchTip.setVisible(!isMatchTipVisible);\r\n !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText(\"BI-Basic_Click_To_Add_Text\", keyword));\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchInsertPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM = \"EVENT_ADD_ITEM\";\r\n\r\nBI.shortcut(\"bi.single_select_search_insert_pane\", BI.SingleSelectSearchInsertPane);/**\r\n *\r\n * 在搜索框中输入文本弹出的面板\r\n * @class BI.SingleSelectSearchPane\r\n * @extends Widget\r\n */\r\n\r\nBI.SingleSelectSearchPane = BI.inherit(BI.Widget, {\r\n\r\n constants: {\r\n height: 25,\r\n lgap: 10,\r\n tgap: 5\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearchPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-search-pane bi-card\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n keywordGetter: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearchPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.tooltipClick = BI.createWidget({\r\n type: \"bi.label\",\r\n invisible: true,\r\n text: BI.i18nText(\"BI-Click_Blank_To_Select\"),\r\n cls: \"single-select-toolbar\",\r\n height: this.constants.height\r\n });\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_search_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n keywordGetter: o.keywordGetter,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator.apply(self, [op, function (res) {\r\n callback(res);\r\n self.setKeyword(o.keywordGetter());\r\n }]);\r\n },\r\n value: o.value\r\n });\r\n this.loader.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.resizer = BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.tooltipClick,\r\n height: 0\r\n }, {\r\n el: this.loader\r\n }]\r\n });\r\n this.tooltipClick.setVisible(false);\r\n },\r\n\r\n setKeyword: function (keyword) {\r\n var btn;\r\n var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === btn.getValue());\r\n if (isVisible !== this.tooltipClick.isVisible()) {\r\n this.tooltipClick.setVisible(isVisible);\r\n this.resizer.attr(\"items\")[0].height = (isVisible ? this.constants.height : 0);\r\n this.resizer.resize();\r\n }\r\n },\r\n\r\n hasMatched: function () {\r\n return this.tooltipClick.isVisible();\r\n },\r\n\r\n setValue: function (v) {\r\n this.loader.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.loader.getValue();\r\n },\r\n\r\n empty: function () {\r\n this.loader.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.loader.populate.apply(this.loader, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearchPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\nBI.shortcut(\"bi.single_select_search_pane\", BI.SingleSelectSearchPane);/**\r\n *\r\n * @class BI.SingleSelectCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n // adapter: this.popup,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n if (!this._count) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectCombo.REQ_GET_DATA_LENGTH\r\n }, function (res) {\r\n self._count = res.count;\r\n adjust();\r\n callback();\r\n });\r\n } else {\r\n adjust();\r\n callback();\r\n\r\n }\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_combo\", BI.SingleSelectCombo);\r\n/**\r\n *\r\n * @class BI.SingleSelectInsertCombo\r\n * @extends BI.Single\r\n */\r\nBI.SingleSelectInsertCombo = BI.inherit(BI.Single, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-combo\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n },\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n self.trigger.getSearcher().setState(self.storeValue);\r\n };\r\n this.storeValue = o.value;\r\n // 标记正在请求数据\r\n this.requesting = false;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.single_select_trigger\",\r\n height: o.height,\r\n allowNoSelect: o.allowNoSelect,\r\n allowEdit: o.allowEdit,\r\n // adapter: this.popup,\r\n valueFormatter: o.valueFormatter,\r\n itemsCreator: function (op, callback) {\r\n o.itemsCreator(op, function (res) {\r\n if (op.times === 1 && BI.isNotNull(op.keywords)) {\r\n // 预防trigger内部把当前的storeValue改掉\r\n self.trigger.setValue(self.getValue());\r\n }\r\n callback.apply(self, arguments);\r\n });\r\n },\r\n text: o.text,\r\n value: this.storeValue,\r\n searcher: {\r\n popup: {\r\n type: \"bi.single_select_search_insert_pane\",\r\n listeners: [{\r\n eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n if (!self.trigger.getSearcher().hasMatched()) {\r\n self.storeValue = self.trigger.getSearcher().getKeyword();\r\n assertShowValue();\r\n self._defaultState();\r\n }\r\n }\r\n }]\r\n }\r\n }\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () {\r\n self._setStartValue();\r\n this.getSearcher().setValue(self.storeValue);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () {\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP);\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () {\r\n if (this.getSearcher().hasMatched()) {\r\n var keyword = this.getSearcher().getKeyword();\r\n self.storeValue = keyword;\r\n self.combo.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.populate();\r\n self._setStartValue();\r\n }\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) {\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n self.combo.populate();\r\n self._setStartValue();\r\n } else {\r\n self.combo.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING);\r\n });\r\n\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n this.trigger.on(BI.SingleSelectTrigger.EVENT_COUNTER_CLICK, function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n toggle: false,\r\n el: this.trigger,\r\n adjustLength: 1,\r\n popup: {\r\n type: \"bi.single_select_popup_view\",\r\n allowNoSelect: o.allowNoSelect,\r\n ref: function () {\r\n self.popup = this;\r\n self.trigger.setAdapter(this);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectPopupView.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self._adjust(function () {\r\n assertShowValue();\r\n self._defaultState();\r\n });\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }],\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n onLoaded: function () {\r\n BI.nextTick(function () {\r\n self.combo.adjustWidth();\r\n self.combo.adjustHeight();\r\n self.trigger.getSearcher().adjustView();\r\n });\r\n }\r\n },\r\n hideChecker: function (e) {\r\n return triggerBtn.element.find(e.target).length === 0;\r\n },\r\n value: o.value\r\n });\r\n\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n this.setValue(self.storeValue);\r\n BI.nextTick(function () {\r\n self.populate();\r\n });\r\n });\r\n // 当退出的时候如果还在处理请求,则等请求结束后再对外发确定事件\r\n this.wants2Quit = false;\r\n this.combo.on(BI.Combo.EVENT_AFTER_HIDEVIEW, function () {\r\n // important:关闭弹出时又可能没有退出编辑状态\r\n self.trigger.stopEditing();\r\n if (self.requesting === true) {\r\n self.wants2Quit = true;\r\n } else {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n var triggerBtn = BI.createWidget({\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height,\r\n height: o.height,\r\n cls: \"single-select-trigger-icon-button\"\r\n });\r\n triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.combo,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: triggerBtn,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n this.combo.hideView();\r\n },\r\n\r\n _assertValue: function (val) {\r\n },\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n this.requesting = true;\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertCombo.REQ_GET_ALL_DATA,\r\n keywords: keywords\r\n }, function (ob) {\r\n var values = BI.map(ob.items, \"value\");\r\n digest(values);\r\n });\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n self._adjust(callback);\r\n }\r\n },\r\n\r\n _adjust: function (callback) {\r\n var self = this, o = this.options;\r\n adjust();\r\n callback();\r\n\r\n function adjust () {\r\n if (self.wants2Quit === true) {\r\n self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CONFIRM);\r\n self.wants2Quit = false;\r\n }\r\n self.requesting = false;\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.popup.setStartValue(value);\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.combo.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n populate: function () {\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertCombo, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.SingleSelectInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n\r\nBI.shortcut(\"bi.single_select_insert_combo\", BI.SingleSelectInsertCombo);BI.SingleSelectComboItem = BI.inherit(BI.BasicButton, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectComboItem.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-single-select-radio-item\",\r\n logic: {\r\n dynamic: false\r\n },\r\n height: 24\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectComboItem.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.radio = BI.createWidget({\r\n type: \"bi.radio\"\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.label\",\r\n cls: \"list-item-text\",\r\n textAlign: \"left\",\r\n whiteSpace: \"nowrap\",\r\n textHeight: o.height,\r\n height: o.height,\r\n hgap: o.hgap,\r\n text: o.text,\r\n keyword: o.keyword,\r\n value: o.value,\r\n py: o.py\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(\"horizontal\", BI.extend(o.logic, {\r\n items: BI.LogicFactory.createLogicItemsByDirection(\"left\", {\r\n type: \"bi.center_adapt\",\r\n items: [this.radio],\r\n width: 26\r\n }, this.text)\r\n }))));\r\n },\r\n\r\n doRedMark: function () {\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doClick: function () {\r\n BI.SingleSelectComboItem.superclass.doClick.apply(this, arguments);\r\n this.radio.setSelected(this.isSelected());\r\n if (this.isValid()) {\r\n this.fireEvent(BI.SingleSelectComboItem.EVENT_CHANGE, this.isSelected(), this);\r\n }\r\n },\r\n\r\n setSelected: function (v) {\r\n BI.SingleSelectComboItem.superclass.setSelected.apply(this, arguments);\r\n this.radio.setSelected(v);\r\n\r\n }\r\n});\r\nBI.SingleSelectComboItem.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_combo_item\", BI.SingleSelectComboItem);/**\r\n * 选择列表\r\n *\r\n * Created by GUY on 2015/11/1.\r\n * @class BI.SingleSelectList\r\n * @extends BI.Widget\r\n */\r\nBI.SingleSelectList = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-select-list\",\r\n direction: BI.Direction.Top, // toolbar的位置\r\n logic: {\r\n dynamic: true\r\n },\r\n items: [],\r\n itemsCreator: BI.emptyFn,\r\n hasNext: BI.emptyFn,\r\n onLoaded: BI.emptyFn,\r\n el: {\r\n type: \"bi.list_pane\"\r\n },\r\n allowNoSelect: false\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectList.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.list = BI.createWidget(o.el, {\r\n type: \"bi.list_pane\",\r\n items: o.items,\r\n itemsCreator: function (op, callback) {\r\n op.times === 1 && self.toolbar && self.toolbar.setVisible(false);\r\n o.itemsCreator(op, function (items) {\r\n callback.apply(self, arguments);\r\n if (op.times === 1) {\r\n self.toolbar && self.toolbar.setVisible(items && items.length > 0);\r\n self.toolbar && self.toolbar.setEnable(items && items.length > 0);\r\n }\r\n });\r\n },\r\n onLoaded: o.onLoaded,\r\n hasNext: o.hasNext,\r\n value: o.value\r\n });\r\n\r\n this.list.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {\r\n if (type === BI.Events.CLICK) {\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE, value, obj);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n BI.createWidget(BI.extend({\r\n element: this\r\n }, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(o.direction), BI.extend({\r\n scrolly: true\r\n }, o.logic, {\r\n items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {\r\n type: \"bi.single_select_item\",\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n forceNotSelected: true,\r\n text: BI.i18nText(\"BI-Basic_No_Select\"),\r\n ref: function (_ref) {\r\n self.toolbar = _ref;\r\n },\r\n listeners: [{\r\n eventName: BI.Controller.EVENT_CHANGE,\r\n action: function (type) {\r\n if (type === BI.Events.CLICK) {\r\n self.list.setValue();\r\n self.fireEvent(BI.SingleSelectList.EVENT_CHANGE);\r\n }\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n }\r\n }]\r\n }, this.list) : BI.LogicFactory.createLogicItemsByDirection(o.direction, this.list)\r\n }))));\r\n\r\n },\r\n\r\n hasPrev: function () {\r\n return this.list.hasPrev();\r\n },\r\n\r\n hasNext: function () {\r\n return this.list.hasNext();\r\n },\r\n\r\n prependItems: function (items) {\r\n this.list.prependItems.apply(this.list, arguments);\r\n },\r\n\r\n addItems: function (items) {\r\n this.list.addItems.apply(this.list, arguments);\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue([v]);\r\n },\r\n\r\n getValue: function () {\r\n return this.list.getValue()[0];\r\n },\r\n\r\n empty: function () {\r\n this.list.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.list.populate.apply(this.list, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.list.resetHeight ? this.list.resetHeight(h) :\r\n this.list.element.css({\"max-height\": h + \"px\"});\r\n },\r\n\r\n setNotSelectedValue: function () {\r\n this.list.setNotSelectedValue.apply(this.list, arguments);\r\n },\r\n\r\n getNotSelectedValue: function () {\r\n return this.list.getNotSelectedValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.list.getAllButtons();\r\n },\r\n\r\n getAllLeaves: function () {\r\n return this.list.getAllLeaves();\r\n },\r\n\r\n getSelectedButtons: function () {\r\n return this.list.getSelectedButtons();\r\n },\r\n\r\n getNotSelectedButtons: function () {\r\n return this.list.getNotSelectedButtons();\r\n },\r\n\r\n getIndexByValue: function (value) {\r\n return this.list.getIndexByValue(value);\r\n },\r\n\r\n getNodeById: function (id) {\r\n return this.list.getNodeById(id);\r\n },\r\n\r\n getNodeByValue: function (value) {\r\n return this.list.getNodeByValue(value);\r\n }\r\n});\r\nBI.SingleSelectList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_list\", BI.SingleSelectList);/**\r\n * 单选加载数据面板\r\n * Created by guy on 15/11/2.\r\n * @class BI.SingleSelectLoader\r\n * @extends Widget\r\n */\r\nBI.SingleSelectLoader = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-loader\",\r\n logic: {\r\n dynamic: true\r\n },\r\n el: {\r\n height: 400\r\n },\r\n allowNoSelect: false,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectLoader.superclass._init.apply(this, arguments);\r\n\r\n var self = this, opts = this.options;\r\n var hasNext = false;\r\n this.storeValue = opts.value;\r\n this.button_group = BI.createWidget({\r\n type: \"bi.single_select_list\",\r\n allowNoSelect: opts.allowNoSelect,\r\n logic: opts.logic,\r\n el: BI.extend({\r\n onLoaded: opts.onLoaded,\r\n el: {\r\n type: \"bi.loader\",\r\n isDefaultInit: false,\r\n logic: {\r\n dynamic: true,\r\n scrolly: true\r\n },\r\n el: {\r\n chooseType: BI.ButtonGroup.CHOOSE_TYPE_SINGLE,\r\n behaviors: {\r\n redmark: function () {\r\n return true;\r\n }\r\n },\r\n layouts: [{\r\n type: \"bi.vertical\"\r\n }]\r\n }\r\n }\r\n }, opts.el),\r\n itemsCreator: function (op, callback) {\r\n var startValue = self._startValue;\r\n BI.isNotNull(self.storeValue) && (op = BI.extend(op || {}, {\r\n selectedValues: [self.storeValue]\r\n }));\r\n opts.itemsCreator(op, function (ob) {\r\n hasNext = ob.hasNext;\r\n var firstItems = [];\r\n if (op.times === 1 && BI.isNotNull(self.storeValue)) {\r\n var json = BI.map([self.storeValue], function (i, v) {\r\n var txt = opts.valueFormatter(v) || v;\r\n return {\r\n text: txt,\r\n value: v,\r\n title: txt,\r\n selected: true\r\n };\r\n });\r\n firstItems = self._createItems(json);\r\n }\r\n callback(firstItems.concat(self._createItems(ob.items)), ob.keyword || \"\");\r\n if (op.times === 1 && self.storeValue) {\r\n BI.isKey(startValue) && (self.storeValue = startValue);\r\n self.setValue(self.storeValue);\r\n }\r\n (op.times === 1) && self._scrollToTop();\r\n });\r\n },\r\n hasNext: function () {\r\n return hasNext;\r\n },\r\n value: this.storeValue\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n items: [this.button_group],\r\n vgap: 5\r\n });\r\n\r\n this.button_group.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.button_group.on(BI.SingleSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectLoader.EVENT_CHANGE, arguments);\r\n });\r\n },\r\n\r\n _createItems: function (items) {\r\n return BI.createItems(items, {\r\n type: this.options.allowNoSelect ? \"bi.single_select_item\" : \"bi.single_select_combo_item\",\r\n logic: this.options.logic,\r\n cls: \"bi-list-item-active\",\r\n height: 24,\r\n selected: false\r\n });\r\n },\r\n\r\n _scrollToTop: function () {\r\n var self = this;\r\n BI.delay(function () {\r\n self.button_group.element.scrollTop(0);\r\n }, 30);\r\n },\r\n\r\n _assertValue: function (val) {},\r\n\r\n setStartValue: function (v) {\r\n this._startValue = v;\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this._assertValue(this.storeValue);\r\n this.button_group.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return this.button_group.getValue();\r\n },\r\n\r\n getAllButtons: function () {\r\n return this.button_group.getAllButtons();\r\n },\r\n\r\n empty: function () {\r\n this.button_group.empty();\r\n },\r\n\r\n populate: function (items) {\r\n this.button_group.populate.apply(this.button_group, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.button_group.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.button_group.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectLoader.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_loader\", BI.SingleSelectLoader);\r\n/**\r\n * 带加载的单选下拉面板\r\n * @class BI.SingleSelectPopupView\r\n * @extends Widget\r\n */\r\nBI.SingleSelectPopupView = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectPopupView.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-popup-view\",\r\n allowNoSelect: false,\r\n maxWidth: \"auto\",\r\n minWidth: 135,\r\n maxHeight: 400,\r\n valueFormatter: BI.emptyFn,\r\n itemsCreator: BI.emptyFn,\r\n onLoaded: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectPopupView.superclass._init.apply(this, arguments);\r\n var self = this, opts = this.options;\r\n\r\n this.loader = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: opts.allowNoSelect,\r\n itemsCreator: opts.itemsCreator,\r\n valueFormatter: opts.valueFormatter,\r\n onLoaded: opts.onLoaded,\r\n value: opts.value\r\n });\r\n\r\n this.popupView = BI.createWidget({\r\n type: \"bi.popup_view\",\r\n stopPropagation: false,\r\n maxWidth: opts.maxWidth,\r\n minWidth: opts.minWidth,\r\n maxHeight: opts.maxHeight,\r\n element: this,\r\n el: this.loader,\r\n value: opts.value\r\n });\r\n\r\n this.popupView.on(BI.MultiPopupView.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectPopupView.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setStartValue: function (v) {\r\n this.loader.setStartValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.popupView.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popupView.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.popupView.populate.apply(this.popupView, arguments);\r\n },\r\n\r\n resetHeight: function (h) {\r\n this.popupView.resetHeight(h);\r\n },\r\n\r\n resetWidth: function (w) {\r\n this.popupView.resetWidth(w);\r\n }\r\n});\r\n\r\nBI.SingleSelectPopupView.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n\r\n\r\nBI.shortcut(\"bi.single_select_popup_view\", BI.SingleSelectPopupView);/**\r\n *\r\n * 单选下拉框\r\n * @class BI.SingleSelectTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleSelectTrigger = BI.inherit(BI.Trigger, {\r\n\r\n constants: {\r\n height: 14,\r\n rgap: 4,\r\n lgap: 4\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-trigger bi-border bi-border-radius\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn,\r\n searcher: {},\r\n switcher: {},\r\n\r\n adapter: null,\r\n masker: {},\r\n allowEdit: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n if (o.height) {\r\n this.setHeight(o.height - 2);\r\n }\r\n\r\n this.searcher = BI.createWidget(o.searcher, {\r\n type: \"bi.single_select_searcher\",\r\n allowNoSelect: o.allowNoSelect,\r\n text: o.text,\r\n height: o.height,\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n popup: {},\r\n adapter: o.adapter,\r\n masker: o.masker,\r\n value: o.value\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_START);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_SEARCHING, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_SEARCHING, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS);\r\n });\r\n this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR, arguments);\r\n });\r\n\r\n var wrapper = BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n items: [\r\n {\r\n el: this.searcher,\r\n width: \"fill\"\r\n }, {\r\n el: BI.createWidget(),\r\n width: 24\r\n }]\r\n });\r\n\r\n !o.allowEdit && BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.text\",\r\n title: function () {\r\n return self.searcher.getState();\r\n }\r\n },\r\n left: 0,\r\n right: 24,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n },\r\n\r\n getSearcher: function () {\r\n return this.searcher;\r\n },\r\n\r\n stopEditing: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setValue: function (v) {\r\n this.searcher.setValue(v);\r\n },\r\n\r\n getKey: function () {\r\n return this.searcher.getKey();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n }\r\n});\r\n\r\nBI.SingleSelectTrigger.EVENT_TRIGGER_CLICK = \"EVENT_TRIGGER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_COUNTER_CLICK = \"EVENT_COUNTER_CLICK\";\r\nBI.SingleSelectTrigger.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectTrigger.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectTrigger.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectTrigger.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = \"EVENT_BEFORE_COUNTER_POPUPVIEW\";\r\nBI.SingleSelectTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectTrigger.EVENT_BLUR = \"EVENT_BLUR\";\r\n\r\nBI.shortcut(\"bi.single_select_trigger\", BI.SingleSelectTrigger);/**\r\n * @author: Teller\r\n * @createdAt: 2018/3/28\r\n * @Description\r\n*/\r\nBI.SingleSelectInsertList = BI.inherit(BI.Single, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-multi-select-insert-list\",\r\n allowNoSelect: false,\r\n itemsCreator: BI.emptyFn,\r\n valueFormatter: BI.emptyFn\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSelectInsertList.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n\r\n var assertShowValue = function () {\r\n BI.isKey(self._startValue) && (self.storeValue = self._startValue);\r\n // self.trigger.setValue(self.storeValue);\r\n };\r\n\r\n this.adapter = BI.createWidget({\r\n type: \"bi.single_select_loader\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"popup-single-select-list bi-border-left bi-border-right bi-border-bottom\",\r\n itemsCreator: o.itemsCreator,\r\n valueFormatter: o.valueFormatter,\r\n logic: {\r\n dynamic: true\r\n },\r\n // onLoaded: o.onLoaded,\r\n el: {},\r\n value: o.value\r\n });\r\n this.adapter.on(BI.SingleSelectLoader.EVENT_CHANGE, function () {\r\n self.storeValue = this.getValue();\r\n assertShowValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n });\r\n\r\n this.searcherPane = BI.createWidget({\r\n type: \"bi.single_select_search_insert_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n cls: \"bi-border-left bi-border-right bi-border-bottom\",\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.trigger.getKeyword();\r\n },\r\n itemsCreator: function (op, callback) {\r\n op.keywords = [self.trigger.getKeyword()];\r\n this.setKeyword(op.keywords[0]);\r\n o.itemsCreator(op, callback);\r\n },\r\n listeners: [{\r\n eventName: BI.SingleSelectSearchInsertPane.EVENT_ADD_ITEM,\r\n action: function () {\r\n var keyword = self.trigger.getKeyword();\r\n if (!self.trigger.hasMatched()) {\r\n self.storeValue = keyword;\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self.adapter.populate();\r\n if (self.storeValue.type === BI.Selection.Multi) {\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }\r\n }\r\n }]\r\n });\r\n this.searcherPane.setVisible(false);\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n adapter: this.adapter,\r\n popup: this.searcherPane,\r\n height: 200,\r\n masker: false,\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.Searcher.EVENT_START,\r\n action: function () {\r\n self._showSearcherPane();\r\n self._setStartValue();\r\n this.setValue(BI.deepClone(self.storeValue));\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_STOP,\r\n action: function () {\r\n self._showAdapter();\r\n self._setStartValue();\r\n self.adapter.setValue(self.storeValue);\r\n // 需要刷新回到初始界面,否则搜索的结果不能放在最前面\r\n self.adapter.populate();\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_PAUSE,\r\n action: function () {\r\n var keyword = this.getKeyword();\r\n if (this.hasMatched()) {\r\n self.storeValue = keyword;\r\n self._showAdapter();\r\n self.adapter.setValue(self.storeValue);\r\n self._setStartValue(keyword);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n } else {\r\n self._showAdapter();\r\n }\r\n\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_SEARCHING,\r\n action: function () {\r\n var keywords = this.getKeyword();\r\n var last = BI.last(keywords);\r\n keywords = BI.initial(keywords || []);\r\n if (keywords.length > 0) {\r\n self._joinKeywords(keywords, function () {\r\n if (BI.isEndWithBlank(last)) {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n self.adapter.populate();\r\n self._setStartValue();\r\n } else {\r\n self.adapter.setValue(self.storeValue);\r\n assertShowValue();\r\n }\r\n });\r\n }\r\n }\r\n }, {\r\n eventName: BI.Searcher.EVENT_CHANGE,\r\n action: function () {\r\n self.storeValue = this.getValue();\r\n self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE);\r\n }\r\n }]\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vtape\",\r\n element: this,\r\n items: [{\r\n el: this.trigger,\r\n height: 24\r\n }, {\r\n el: this.adapter,\r\n height: \"fill\"\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.searcherPane,\r\n top: 24,\r\n bottom: 0,\r\n left: 0,\r\n right: 0\r\n }]\r\n });\r\n },\r\n\r\n _showAdapter: function () {\r\n this.adapter.setVisible(true);\r\n this.searcherPane.setVisible(false);\r\n },\r\n\r\n _showSearcherPane: function () {\r\n this.searcherPane.setVisible(true);\r\n this.adapter.setVisible(false);\r\n },\r\n\r\n _defaultState: function () {\r\n this.trigger.stopEditing();\r\n },\r\n\r\n _assertValue: function () {},\r\n\r\n _makeMap: function (values) {\r\n return BI.makeObject(values || []);\r\n },\r\n\r\n _joinKeywords: function (keywords, callback) {\r\n var self = this, o = this.options;\r\n this._assertValue(this.storeValue);\r\n if (!this._allData) {\r\n o.itemsCreator({\r\n type: BI.SingleSelectInsertList.REQ_GET_ALL_DATA\r\n }, function (ob) {\r\n self._allData = BI.map(ob.items, \"value\");\r\n digest(self._allData);\r\n });\r\n } else {\r\n digest(this._allData);\r\n }\r\n\r\n function digest (items) {\r\n var selectedMap = self._makeMap(items);\r\n BI.each(keywords, function (i, val) {\r\n if (BI.isNotNull(selectedMap[val])) {\r\n self.storeValue.type === BI.Selection.Single ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val);\r\n }\r\n });\r\n callback();\r\n }\r\n },\r\n\r\n _setStartValue: function (value) {\r\n this._startValue = value;\r\n this.adapter.setStartValue(value);\r\n },\r\n\r\n isAllSelected: function () {\r\n return this.adapter.isAllSelected();\r\n },\r\n\r\n resize: function () {\r\n // this.trigger.getCounter().adjustView();\r\n // this.trigger.adjustView();\r\n },\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.adapter.setValue(this.storeValue);\r\n this.trigger.setValue(this.storeValue);\r\n },\r\n\r\n getValue: function () {\r\n return BI.deepClone(this.storeValue);\r\n },\r\n\r\n populate: function () {\r\n this._count = null;\r\n this._allData = null;\r\n this.adapter.populate.apply(this.adapter, arguments);\r\n this.trigger.populate.apply(this.trigger, arguments);\r\n }\r\n});\r\n\r\nBI.extend(BI.SingleSelectInsertList, {\r\n REQ_GET_DATA_LENGTH: 0,\r\n REQ_GET_ALL_DATA: -1\r\n});\r\n\r\nBI.SingleSelectInsertList.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_select_insert_list\", BI.SingleSelectInsertList);\r\n/**\r\n * 单选输入框\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectEditor\r\n * @extends Widget\r\n */\r\nBI.SingleSelectEditor = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectEditor.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-editor\",\r\n el: {},\r\n text: BI.i18nText(\"BI-Basic_Please_Select\")\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.state_editor\",\r\n element: this,\r\n height: o.height,\r\n watermark: BI.i18nText(\"BI-Basic_Search\"),\r\n allowBlank: true,\r\n value: o.value,\r\n defaultText: o.text,\r\n text: o.text,\r\n });\r\n\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.editor.on(BI.StateEditor.EVENT_PAUSE, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.StateEditor.EVENT_BLUR, function () {\r\n self.fireEvent(BI.SingleSelectEditor.EVENT_BLUR);\r\n });\r\n },\r\n\r\n focus: function () {\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n },\r\n\r\n setState: function (state) {\r\n this.editor.setState(state);\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.editor.getState();\r\n if (BI.isArray(v) && v.length > 0) {\r\n return v[v.length - 1];\r\n }\r\n return \"\";\r\n\r\n },\r\n\r\n getKeywords: function () {\r\n var val = this.editor.getLastChangedValue();\r\n var keywords = val.match(/[\\S]+/g);\r\n if (BI.isEndWithBlank(val)) {\r\n return keywords.concat([\" \"]);\r\n }\r\n return keywords;\r\n },\r\n\r\n populate: function (items) {\r\n\r\n }\r\n});\r\n\r\nBI.SingleSelectEditor.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectEditor.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectEditor.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.shortcut(\"bi.single_select_editor\", BI.SingleSelectEditor);/**\r\n * searcher\r\n * Created by guy on 15/11/3.\r\n * @class BI.SingleSelectSearcher\r\n * @extends Widget\r\n */\r\nBI.SingleSelectSearcher = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSelectSearcher.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-select-searcher\",\r\n itemsCreator: BI.emptyFn,\r\n el: {},\r\n popup: {},\r\n valueFormatter: BI.emptyFn,\r\n adapter: null,\r\n masker: {},\r\n allowNoSelect: false\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleSelectSearcher.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget(o.el, {\r\n type: \"bi.single_select_editor\",\r\n height: o.height,\r\n text: o.text,\r\n listeners: [{\r\n eventName: BI.SingleSelectEditor.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.SingleSelectEditor.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR);\r\n }\r\n }]\r\n });\r\n\r\n this.searcher = BI.createWidget({\r\n type: \"bi.searcher\",\r\n allowSearchBlank: false,\r\n element: this,\r\n height: o.height,\r\n isAutoSearch: false,\r\n isAutoSync: false,\r\n onSearch: function (op, callback) {\r\n callback();\r\n },\r\n el: this.editor,\r\n\r\n popup: BI.extend({\r\n type: \"bi.single_select_search_pane\",\r\n allowNoSelect: o.allowNoSelect,\r\n valueFormatter: o.valueFormatter,\r\n keywordGetter: function () {\r\n return self.editor.getValue();\r\n },\r\n itemsCreator: function (op, callback) {\r\n var keyword = self.editor.getValue();\r\n op.keywords = [keyword];\r\n this.setKeyword(keyword);\r\n o.itemsCreator(op, callback);\r\n },\r\n value: o.value\r\n }, o.popup),\r\n\r\n adapter: o.adapter,\r\n masker: o.masker\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_START, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_START);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_PAUSE, function () {\r\n if (this.hasMatched()) {\r\n\r\n }\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_PAUSE);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_STOP, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_STOP);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_CHANGE, arguments);\r\n });\r\n this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () {\r\n var keywords = this.getKeywords();\r\n self.fireEvent(BI.SingleSelectSearcher.EVENT_SEARCHING, keywords);\r\n });\r\n\r\n if(BI.isNotNull(o.value)){\r\n this.setState(o.value);\r\n }\r\n },\r\n\r\n adjustView: function () {\r\n this.searcher.adjustView();\r\n },\r\n\r\n isSearching: function () {\r\n return this.searcher.isSearching();\r\n },\r\n\r\n stopSearch: function () {\r\n this.searcher.stopSearch();\r\n },\r\n\r\n getKeyword: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n hasMatched: function () {\r\n return this.searcher.hasMatched();\r\n },\r\n\r\n hasChecked: function () {\r\n return this.searcher.getView() && this.searcher.getView().hasChecked();\r\n },\r\n\r\n setAdapter: function (adapter) {\r\n this.searcher.setAdapter(adapter);\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n if (BI.isNull(v)) {\r\n this.editor.setState(BI.Selection.None);\r\n } else {\r\n this.editor.setState(o.valueFormatter(v + \"\") || (v + \"\"));\r\n }\r\n },\r\n\r\n setValue: function (ob) {\r\n this.setState(ob);\r\n this.searcher.setValue(ob);\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getValue: function () {\r\n return this.searcher.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this.searcher.populate.apply(this.searcher, arguments);\r\n }\r\n});\r\n\r\nBI.SingleSelectSearcher.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.SingleSelectSearcher.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.SingleSelectSearcher.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleSelectSearcher.EVENT_START = \"EVENT_START\";\r\nBI.SingleSelectSearcher.EVENT_STOP = \"EVENT_STOP\";\r\nBI.SingleSelectSearcher.EVENT_PAUSE = \"EVENT_PAUSE\";\r\nBI.SingleSelectSearcher.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.single_select_searcher\", BI.SingleSelectSearcher);\r\nBI.SignTextEditor = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n var conf = BI.SignTextEditor.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n baseCls: (conf.baseCls || \"\") + \" bi-sign-initial-editor\",\r\n validationChecker: BI.emptyFn,\r\n text: \"\",\r\n height: 24\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SignTextEditor.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.editor = BI.createWidget({\r\n type: \"bi.editor\",\r\n height: o.height,\r\n hgap: 4,\r\n vgap: 2,\r\n value: o.value,\r\n validationChecker: o.validationChecker,\r\n allowBlank: false\r\n });\r\n this.text = BI.createWidget({\r\n type: \"bi.text_button\",\r\n cls: \"sign-editor-text\",\r\n title: function () {\r\n return self.getValue();\r\n },\r\n textAlign: o.textAlign,\r\n height: o.height,\r\n hgap: 4,\r\n handler: function () {\r\n self._showInput();\r\n self.editor.focus();\r\n self.editor.selectAll();\r\n }\r\n });\r\n this.text.on(BI.TextButton.EVENT_CHANGE, function () {\r\n BI.nextTick(function () {\r\n self.fireEvent(BI.SignTextEditor.EVENT_CLICK_LABEL);\r\n });\r\n });\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: this.text,\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n });\r\n this.editor.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () {\r\n self._showHint();\r\n self._checkText();\r\n self.fireEvent(BI.SignTextEditor.EVENT_CHANGE_CONFIRM, arguments);\r\n });\r\n this.editor.on(BI.Editor.EVENT_ERROR, function () {\r\n self._checkText();\r\n });\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n scrolly: false,\r\n element: this,\r\n items: [this.editor]\r\n });\r\n this._showHint();\r\n self._checkText();\r\n },\r\n\r\n _checkText: function () {\r\n var o = this.options;\r\n BI.nextTick(BI.bind(function () {\r\n if (this.editor.getValue() === \"\") {\r\n this.text.setValue(o.watermark || \"\");\r\n this.text.element.addClass(\"bi-water-mark\");\r\n } else {\r\n var v = this.editor.getValue();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n this.text.element.removeClass(\"bi-water-mark\");\r\n }\r\n }, this));\r\n },\r\n\r\n _showInput: function () {\r\n this.editor.visible();\r\n this.text.invisible();\r\n },\r\n\r\n _showHint: function () {\r\n this.editor.invisible();\r\n this.text.visible();\r\n },\r\n\r\n setTitle: function (title) {\r\n this.text.setTitle(title);\r\n },\r\n\r\n setWarningTitle: function (title) {\r\n this.text.setWarningTitle(title);\r\n },\r\n\r\n focus: function () {\r\n this._showInput();\r\n this.editor.focus();\r\n },\r\n\r\n blur: function () {\r\n this.editor.blur();\r\n this._showHint();\r\n this._checkText();\r\n },\r\n\r\n doRedMark: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doRedMark.apply(this.text, arguments);\r\n },\r\n\r\n unRedMark: function () {\r\n this.text.unRedMark.apply(this.text, arguments);\r\n },\r\n\r\n doHighLight: function () {\r\n if (this.editor.getValue() === \"\" && BI.isKey(this.options.watermark)) {\r\n return;\r\n }\r\n this.text.doHighLight.apply(this.text, arguments);\r\n },\r\n\r\n unHighLight: function () {\r\n this.text.unHighLight.apply(this.text, arguments);\r\n },\r\n\r\n isValid: function () {\r\n return this.editor.isValid();\r\n },\r\n\r\n setErrorText: function (text) {\r\n this.editor.setErrorText(text);\r\n },\r\n\r\n getErrorText: function () {\r\n return this.editor.getErrorText();\r\n },\r\n\r\n isEditing: function () {\r\n return this.editor.isEditing();\r\n },\r\n\r\n getLastValidValue: function () {\r\n return this.editor.getLastValidValue();\r\n },\r\n\r\n getLastChangedValue: function () {\r\n return this.editor.getLastChangedValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.editor.setValue(v);\r\n this._checkText();\r\n },\r\n\r\n getValue: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n getState: function () {\r\n return this.text.getValue();\r\n },\r\n\r\n setState: function (v) {\r\n var o = this.options;\r\n this._showHint();\r\n v = (BI.isEmpty(v) || v == o.text) ? o.text : v + o.text;\r\n this.text.setValue(v);\r\n }\r\n});\r\nBI.SignTextEditor.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CHANGE_CONFIRM = \"EVENT_CHANGE_CONFIRM\";\r\nBI.SignTextEditor.EVENT_CLICK_LABEL = \"EVENT_CLICK_LABEL\";\r\n\r\nBI.shortcut(\"bi.sign_text_editor\", BI.SignTextEditor);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SliderIconButton = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-button\"\r\n },\r\n\r\n constants: {\r\n LARGE_SIZE: 16,\r\n NORMAL_SIZE: 12,\r\n LARGE_OFFSET: 4,\r\n NORMAL_OFFSET: 6\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.absolute\",\r\n ref: function () {\r\n self.wrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.text_button\",\r\n cls: \"slider-button bi-high-light-border\",\r\n ref: function () {\r\n self.slider = this;\r\n }\r\n }\r\n }]\r\n };\r\n }\r\n});\r\nBI.shortcut(\"bi.single_slider_button\", BI.SliderIconButton);/**\r\n * Created by zcf on 2016/9/22.\r\n */\r\nBI.SingleSlider = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 30,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n // 这边其实是有问题的,拖拽区域是个圆,在圆的边缘拖拽后放开,这边计算出来的蓝条宽度实际上会比放开时长一点或者短一点\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.sign_text_editor\",\r\n cls: \"slider-editor-button\",\r\n text: o.unit,\r\n width: c.EDITOR_WIDTH - 2,\r\n allowBlank: false,\r\n textAlign: \"center\",\r\n validationChecker: function (v) {\r\n return self._checkValidation(v);\r\n }\r\n });\r\n this.label.element.hover(function () {\r\n self.label.element.removeClass(\"bi-border\").addClass(\"bi-border\");\r\n }, function () {\r\n self.label.element.removeClass(\"bi-border\");\r\n });\r\n this.label.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var v = BI.parseFloat(this.getValue());\r\n var percent = self._getPercentByValue(v);\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n this.setValue(v);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n });\r\n this._setVisible(false);\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 23,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 20,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v);\r\n self.value = v;\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n var o = this.options;\r\n var valid = false;\r\n if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {\r\n if(o.digit === false) {\r\n valid = true;\r\n }else{\r\n var dotText = (v + \"\").split(\".\")[1] || \"\";\r\n valid = (dotText.length === o.digit);\r\n }\r\n }\r\n return valid;\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSlider.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n this.label.setErrorText(BI.i18nText(\"BI-Basic_Please_Enter_Number_Between\", this.min, this.max));\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSlider.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider\", BI.SingleSlider);/**\r\n * Created by Urthur on 2017/9/12.\r\n */\r\nBI.SingleSliderLabel = BI.inherit(BI.Single, {\r\n _constant: {\r\n EDITOR_WIDTH: 90,\r\n EDITOR_HEIGHT: 20,\r\n HEIGHT: 20,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleSliderLabel.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-slider-label bi-slider-track\",\r\n digit: false,\r\n unit: \"\"\r\n });\r\n },\r\n _init: function () {\r\n BI.SingleSliderLabel.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n var c = this._constant;\r\n this.enable = false;\r\n this.value = \"\";\r\n\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n this.track = this._createTrackWrapper();\r\n\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setText(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n });\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: c.HEIGHT,\r\n width: c.EDITOR_WIDTH - 2\r\n });\r\n\r\n this._setVisible(false);\r\n BI.createWidget({\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 13,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 10,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.horizontal_auto\",\r\n items: [this.label]\r\n }],\r\n height: c.EDITOR_HEIGHT\r\n },\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setLabelPosition(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.label.setValue(v + o.unit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSliderLabel.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrackWrapper: function () {\r\n return BI.createWidget({\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n });\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setLabelPosition: function (percent) {\r\n // this.label.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setLabelPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n this.label.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var o = this.options;\r\n v = BI.parseFloat(v);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n if ((!isNaN(v))) {\r\n if (this._checkValidation(v)) {\r\n this.value = v;\r\n }\r\n if (v > this.max) {\r\n this.value = this.max;\r\n }\r\n if (v < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n var o = this.options;\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this.label.setValue(this.value + o.unit);\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this.label.setValue(this.max + o.unit);\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderLabel.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_slider_label\", BI.SingleSliderLabel);/**\r\n * normal single slider\r\n * Created by Young on 2017/6/21.\r\n */\r\nBI.SingleSliderNormal = BI.inherit(BI.Single, {\r\n\r\n _constant: {\r\n HEIGHT: 28,\r\n SLIDER_WIDTH_HALF: 15,\r\n SLIDER_WIDTH: 30,\r\n SLIDER_HEIGHT: 30,\r\n TRACK_HEIGHT: 24,\r\n TRACK_GAP_HALF: 7,\r\n TRACK_GAP: 14\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-single-slider-normal bi-slider-track\",\r\n minMax: {\r\n min: 0,\r\n max: 100\r\n }\r\n // color: \"#3f8ce8\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n var c = this._constant;\r\n var track = this._createTrack();\r\n this.slider = BI.createWidget({\r\n type: \"bi.single_slider_button\"\r\n });\r\n this._draggable(this.slider);\r\n\r\n var sliderVertical = BI.createWidget({\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [this.slider]\r\n }],\r\n hgap: c.SLIDER_WIDTH_HALF,\r\n height: c.SLIDER_HEIGHT\r\n });\r\n sliderVertical.element.click(function (e) {\r\n if (self.enable && self.isEnabled() && sliderVertical.element[0] === e.originalEvent.target) {\r\n var offset = e.clientX - self.element.offset().left - c.SLIDER_WIDTH_HALF;\r\n var trackLength = self.track.element[0].scrollWidth - c.TRACK_GAP;\r\n var percent = 0;\r\n if (offset < 0) {\r\n percent = 0;\r\n }\r\n if (offset > 0 && offset < trackLength) {\r\n percent = offset * 100 / self._getGrayTrackLength();\r\n }\r\n if (offset >= trackLength) {\r\n percent = 100;\r\n }\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setAllPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n element: this,\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: track,\r\n width: \"100%\",\r\n height: c.TRACK_HEIGHT\r\n }]\r\n }],\r\n hgap: c.TRACK_GAP_HALF,\r\n height: c.TRACK_HEIGHT\r\n },\r\n top: 3,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: sliderVertical,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }]\r\n };\r\n },\r\n\r\n _draggable: function (widget) {\r\n var self = this, o = this.options;\r\n var startDrag = false;\r\n var size = 0, offset = 0, defaultSize = 0;\r\n var mouseMoveTracker = new BI.MouseMoveTracker(function (deltaX) {\r\n if (mouseMoveTracker.isDragging()) {\r\n startDrag = true;\r\n offset += deltaX;\r\n size = optimizeSize(defaultSize + offset);\r\n widget.element.addClass(\"dragging\");\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));// 直接对计算出来的百分数保留到小数点后一位,相当于分成了1000份。\r\n self._setBlueTrack(significantPercent);\r\n self._setSliderPosition(significantPercent);\r\n var v = self._getValueByPercent(significantPercent);\r\n v = o.digit === false ? v : v.toFixed(o.digit);\r\n self.value = v;\r\n self.fireEvent(BI.SingleSliderNormal.EVENT_DRAG, v);\r\n }\r\n }, function () {\r\n if (startDrag === true) {\r\n size = optimizeSize(size);\r\n var percent = size * 100 / (self._getGrayTrackLength());\r\n var significantPercent = BI.parseFloat(percent.toFixed(1));\r\n self._setSliderPosition(significantPercent);\r\n size = 0;\r\n offset = 0;\r\n defaultSize = size;\r\n startDrag = false;\r\n }\r\n widget.element.removeClass(\"dragging\");\r\n mouseMoveTracker.releaseMouseMoves();\r\n self.fireEvent(BI.SingleSlider.EVENT_CHANGE);\r\n }, window);\r\n widget.element.on(\"mousedown\", function (event) {\r\n if(!widget.isEnabled()) {\r\n return;\r\n }\r\n defaultSize = this.offsetLeft;\r\n optimizeSize(defaultSize);\r\n mouseMoveTracker.captureMouseMoves(event);\r\n });\r\n\r\n function optimizeSize (s) {\r\n return BI.clamp(s, 0, self._getGrayTrackLength());\r\n }\r\n },\r\n\r\n _createTrack: function () {\r\n var self = this;\r\n var c = this._constant;\r\n this.grayTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"gray-track\",\r\n height: 6\r\n });\r\n this.blueTrack = BI.createWidget({\r\n type: \"bi.layout\",\r\n cls: \"blue-track bi-high-light-background\",\r\n height: 6\r\n });\r\n if (this.options.color) {\r\n this.blueTrack.element.css({\"background-color\": this.options.color});\r\n }\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: this.grayTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"100%\"\r\n }, {\r\n el: this.blueTrack,\r\n top: 0,\r\n left: 0,\r\n width: \"0%\"\r\n }]\r\n }],\r\n hgap: 8,\r\n height: 8\r\n },\r\n top: 8,\r\n left: 0,\r\n width: \"100%\"\r\n }],\r\n ref: function (ref) {\r\n self.track = ref;\r\n }\r\n };\r\n },\r\n\r\n _checkValidation: function (v) {\r\n return !(BI.isNull(v) || v < this.min || v > this.max);\r\n },\r\n\r\n _setBlueTrack: function (percent) {\r\n this.blueTrack.element.css({width: percent + \"%\"});\r\n },\r\n\r\n _setSliderPosition: function (percent) {\r\n this.slider.element.css({left: percent + \"%\"});\r\n },\r\n\r\n _setAllPosition: function (percent) {\r\n this._setSliderPosition(percent);\r\n this._setBlueTrack(percent);\r\n },\r\n\r\n _setVisible: function (visible) {\r\n this.slider.setVisible(visible);\r\n },\r\n\r\n _getGrayTrackLength: function () {\r\n return this.grayTrack.element[0].scrollWidth;\r\n },\r\n\r\n _getValueByPercent: function (percent) {\r\n var thousandth = BI.parseInt(percent * 10);\r\n return (((this.max - this.min) * thousandth) / 1000 + this.min);\r\n },\r\n\r\n _getPercentByValue: function (v) {\r\n return (v - this.min) * 100 / (this.max - this.min);\r\n },\r\n\r\n _setEnable: function (b) {\r\n BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]);\r\n if(b) {\r\n this.blueTrack.element.removeClass(\"disabled-blue-track\").addClass(\"blue-track\");\r\n } else {\r\n this.blueTrack.element.removeClass(\"blue-track\").addClass(\"disabled-blue-track\");\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.value;\r\n },\r\n\r\n setValue: function (v) {\r\n var value = BI.parseFloat(v);\r\n if ((!isNaN(value))) {\r\n if (this._checkValidation(value)) {\r\n this.value = value;\r\n }\r\n if (value > this.max) {\r\n this.value = this.max;\r\n }\r\n if (value < this.min) {\r\n this.value = this.min;\r\n }\r\n }\r\n },\r\n\r\n setMinAndMax: function (v) {\r\n var minNumber = BI.parseFloat(v.min);\r\n var maxNumber = BI.parseFloat(v.max);\r\n if ((!isNaN(minNumber)) && (!isNaN(maxNumber)) && (maxNumber > minNumber )) {\r\n this.min = minNumber;\r\n this.max = maxNumber;\r\n }\r\n },\r\n\r\n reset: function () {\r\n this._setVisible(false);\r\n this.enable = false;\r\n this.value = \"\";\r\n this.min = 0;\r\n this.max = 0;\r\n this._setBlueTrack(0);\r\n },\r\n\r\n populate: function () {\r\n if (!isNaN(this.min) && !isNaN(this.max)) {\r\n this._setVisible(true);\r\n this.enable = true;\r\n if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) {\r\n this._setAllPosition(this._getPercentByValue(this.value));\r\n } else {\r\n this._setAllPosition(100);\r\n }\r\n }\r\n }\r\n});\r\nBI.SingleSliderNormal.EVENT_DRAG = \"EVENT_DRAG\";\r\nBI.shortcut(\"bi.single_slider_normal\", BI.SingleSliderNormal);/**\r\n * @class BI.SingleTreeCombo\r\n * @extends BI.Widget\r\n */\r\nBI.SingleTreeCombo = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-combo\",\r\n trigger: {},\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\",\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget(BI.extend({\r\n type: \"bi.single_tree_trigger\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: o.value\r\n }, o.trigger));\r\n\r\n this.popup = BI.createWidget({\r\n type: \"bi.single_level_tree\",\r\n items: o.items,\r\n value: o.value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n element: this,\r\n adjustLength: 2,\r\n el: this.trigger,\r\n popup: {\r\n el: this.popup\r\n }\r\n });\r\n\r\n this.combo.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW, arguments);\r\n });\r\n\r\n this.popup.on(BI.SingleTreePopup.EVENT_CHANGE, function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.SingleTreeCombo.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n populate: function (items) {\r\n this.combo.populate(items);\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.trigger.setValue(v);\r\n this.popup.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.popup.getValue();\r\n }\r\n});\r\n\r\nBI.SingleTreeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.SingleTreeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.single_tree_combo\", BI.SingleTreeCombo);/**\r\n * @class BI.SingleTreePopup\r\n * @extends BI.Pane\r\n */\r\n\r\nBI.SingleTreePopup = BI.inherit(BI.Pane, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreePopup.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-level-tree\",\r\n tipText: BI.i18nText(\"BI-No_Selected_Item\"),\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreePopup.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n \r\n this.tree = BI.createWidget({\r\n type: \"bi.level_tree\",\r\n expander: {\r\n isDefaultInit: true\r\n },\r\n items: o.items,\r\n value: o.value,\r\n chooseType: BI.Selection.Single\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.vertical\",\r\n element: this,\r\n vgap: 5,\r\n items: [this.tree]\r\n });\r\n\r\n this.tree.on(BI.Controller.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n });\r\n\r\n this.tree.on(BI.LevelTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.SingleTreePopup.EVENT_CHANGE);\r\n });\r\n\r\n this.check();\r\n },\r\n\r\n getValue: function () {\r\n return this.tree.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.tree.setValue(v);\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreePopup.superclass.populate.apply(this, arguments);\r\n this.tree.populate(items);\r\n }\r\n});\r\n\r\nBI.SingleTreePopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.single_level_tree\", BI.SingleTreePopup);/**\r\n * @class BI.SingleTreeTrigger\r\n * @extends BI.Trigger\r\n */\r\n\r\nBI.SingleTreeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.SingleTreeTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-single-tree-trigger\",\r\n height: 24,\r\n text: \"\",\r\n items: [],\r\n value: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.SingleTreeTrigger.superclass._init.apply(this, arguments);\r\n\r\n var self = this, o = this.options;\r\n\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n text: o.text,\r\n items: o.items,\r\n height: o.height,\r\n value: o.value\r\n });\r\n },\r\n\r\n _checkTitle: function () {\r\n var self = this, val = this.getValue();\r\n BI.any(this.options.items, function (i, item) {\r\n if (BI.contains(val, item.value)) {\r\n self.trigger.setTitle(item.text || item.value);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n v = BI.isArray(v) ? v : [v];\r\n this.options.value = v;\r\n this.trigger.setValue(v);\r\n this._checkTitle();\r\n },\r\n\r\n getValue: function () {\r\n return this.options.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n BI.SingleTreeTrigger.superclass.populate.apply(this, arguments);\r\n this.trigger.populate(items);\r\n }\r\n\r\n});\r\n\r\nBI.shortcut(\"bi.single_tree_trigger\", BI.SingleTreeTrigger);/**\r\n * @class BI.TextValueDownListCombo\r\n * @extend BI.Widget\r\n */\r\nBI.TextValueDownListCombo = BI.inherit(BI.Widget, {\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-text-value-down-list-combo\",\r\n height: 24,\r\n attributes: {\r\n tabIndex: 0\r\n }\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TextValueDownListCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this._createValueMap();\r\n\r\n var value;\r\n if(BI.isNotNull(o.value)) {\r\n value = this._digest(o.value);\r\n }\r\n this.trigger = BI.createWidget({\r\n type: \"bi.down_list_select_text_trigger\",\r\n cls: \"text-value-down-list-trigger\",\r\n height: o.height,\r\n items: o.items,\r\n text: o.text,\r\n value: value\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.down_list_combo\",\r\n element: this,\r\n chooseType: BI.Selection.Single,\r\n adjustLength: 2,\r\n height: o.height,\r\n el: this.trigger,\r\n value: BI.isNull(value) ? [] : [value],\r\n items: BI.deepClone(o.items)\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].value;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n\r\n this.combo.on(BI.DownListCombo.EVENT_SON_VALUE_CHANGE, function () {\r\n var currentVal = self.combo.getValue()[0].childValue;\r\n if (currentVal !== self.value) {\r\n self.setValue(currentVal);\r\n self.fireEvent(BI.TextValueDownListCombo.EVENT_CHANGE);\r\n }\r\n });\r\n },\r\n\r\n _createValueMap: function () {\r\n var self = this;\r\n this.valueMap = {};\r\n BI.each(BI.flatten(this.options.items), function (idx, item) {\r\n if (BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n self.valueMap[it.value] = {value: item.el.value, childValue: it.value};\r\n });\r\n } else {\r\n self.valueMap[item.value] = {value: item.value};\r\n }\r\n });\r\n },\r\n\r\n _digest: function (v) {\r\n this.value = v;\r\n return this.valueMap[v];\r\n },\r\n\r\n setValue: function (v) {\r\n v = this._digest(v);\r\n this.combo.setValue([v]);\r\n this.trigger.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var v = this.combo.getValue()[0];\r\n return [v.childValue || v.value];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = BI.flatten(items);\r\n this.combo.populate(items);\r\n this._createValueMap();\r\n }\r\n});\r\nBI.TextValueDownListCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.text_value_down_list_combo\", BI.TextValueDownListCombo);/**\r\n * 选择字段trigger, downlist专用\r\n * 显示形式为 父亲值(儿子值)\r\n *\r\n * @class BI.DownListSelectTextTrigger\r\n * @extends BI.Trigger\r\n */\r\nBI.DownListSelectTextTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DownListSelectTextTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-down-list-select-text-trigger\",\r\n height: 24,\r\n text: \"\"\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.DownListSelectTextTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.select_text_trigger\",\r\n element: this,\r\n height: o.height,\r\n items: this._formatItemArray(o.items),\r\n text: o.text,\r\n value: BI.isNull(o.value) ? \"\" : o.value.childValue || o.value.value\r\n });\r\n },\r\n\r\n _formatItemArray: function () {\r\n var sourceArray = BI.flatten(BI.deepClone(this.options.items));\r\n var targetArray = [];\r\n BI.each(sourceArray, function (idx, item) {\r\n if(BI.has(item, \"el\")) {\r\n BI.each(item.children, function (id, it) {\r\n it.text = item.el.text + \"(\" + it.text + \")\";\r\n });\r\n targetArray = BI.concat(targetArray, item.children);\r\n }else{\r\n targetArray.push(item);\r\n }\r\n });\r\n return targetArray;\r\n },\r\n\r\n setValue: function (vals) {\r\n this.trigger.setValue(vals.childValue || vals.value);\r\n },\r\n\r\n populate: function (items) {\r\n this.trigger.populate(this._formatItemArray(items));\r\n }\r\n});\r\nBI.shortcut(\"bi.down_list_select_text_trigger\", BI.DownListSelectTextTrigger);!(function () {\r\n BI.TimePopup = BI.inherit(BI.Widget, {\r\n props: {\r\n baseCls: \"bi-date-time-popup\",\r\n height: 68\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n cls: \"bi-split-top\",\r\n items: [{\r\n type: \"bi.dynamic_date_time_select\",\r\n value: o.value,\r\n ref: function (_ref) {\r\n self.timeSelect = _ref;\r\n }\r\n }]\r\n },\r\n hgap: 10,\r\n height: 44\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clears\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Now\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_NOW_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (value) {\r\n if (this._checkValueValid(value)) {\r\n this.timeSelect.setValue();\r\n } else {\r\n this.timeSelect.setValue({\r\n hour: value.hour,\r\n minute: value.minute,\r\n second: value.second\r\n });\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.timeSelect.getValue();\r\n },\r\n\r\n _checkValueValid: function (value) {\r\n return BI.isNull(value) || BI.isEmptyObject(value) || BI.isEmptyString(value);\r\n }\r\n });\r\n BI.TimePopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\n BI.TimePopup.BUTTON_NOW_EVENT_CHANGE = \"BUTTON_NOW_EVENT_CHANGE\";\r\n BI.TimePopup.CALENDAR_EVENT_CHANGE = \"CALENDAR_EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_popup\", BI.TimePopup);\r\n})();/**\r\n * 时间选择\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimeCombo = BI.inherit(BI.Single, {\r\n constants: {\r\n popupHeight: 80,\r\n popupWidth: 240,\r\n comboAdjustHeight: 1,\r\n border: 1\r\n },\r\n props: {\r\n baseCls: \"bi-time-combo bi-border bi-border-radius bi-focus-shadow\",\r\n width: 78,\r\n height: 22,\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = opts.value;\r\n\r\n var popup = {\r\n type: \"bi.time_popup\",\r\n value: opts.value,\r\n listeners: [{\r\n eventName: BI.TimePopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.hidePopupView();\r\n self.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.TimePopup.BUTTON_NOW_EVENT_CHANGE,\r\n action: function () {\r\n self._setNowTime();\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.popup = _ref;\r\n }\r\n };\r\n return {\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.combo\",\r\n container: opts.container,\r\n toggle: false,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: {\r\n type: \"bi.time_trigger\",\r\n height: opts.height,\r\n allowEdit: opts.allowEdit,\r\n watermark: opts.watermark,\r\n format: opts.format,\r\n value: opts.value,\r\n ref: function (_ref) {\r\n self.trigger = _ref;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n self.fireEvent(BI.TimeCombo.EVENT_KEY_DOWN, arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n if (!self.combo.isViewVisible()) {\r\n self.combo.showView();\r\n }\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n var date = BI.getDate();\r\n self.storeValue = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n } else if (BI.isEmptyString(dateObj)) {\r\n self.storeValue = null;\r\n self.trigger.setValue();\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }]\r\n },\r\n adjustLength: this.constants.comboAdjustHeight,\r\n popup: {\r\n el: popup,\r\n width: this.constants.popupWidth,\r\n stopPropagation: false\r\n },\r\n hideChecker: function (e) {\r\n return self.triggerBtn.element.find(e.target).length === 0;\r\n },\r\n listeners: [{\r\n eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.TimeCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.combo = _ref;\r\n }\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 22,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button time-font icon-size-16\",\r\n width: 22,\r\n height: 22,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n if (self.combo.isViewVisible()) {\r\n // self.combo.hideView();\r\n } else {\r\n self.combo.showView();\r\n }\r\n }\r\n }],\r\n ref: function (_ref) {\r\n self.triggerBtn = _ref;\r\n }\r\n },\r\n top: 0,\r\n right: 0\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n },\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n hidePopupView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n _setNowTime: function () {\r\n var date = BI.getDate();\r\n var nowTome = {\r\n hour: date.getHours(),\r\n minute: date.getMinutes(),\r\n second: date.getSeconds()\r\n };\r\n this.setValue(nowTome);\r\n this.hidePopupView();\r\n this.fireEvent(BI.TimeCombo.EVENT_CONFIRM);\r\n }\r\n });\r\n\r\n BI.TimeCombo.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\n BI.TimeCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimeCombo.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.TimeCombo.EVENT_VALID = \"EVENT_VALID\";\r\n BI.TimeCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\n BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\n BI.shortcut(\"bi.time_combo\", BI.TimeCombo);\r\n})();!(function () {\r\n BI.TimeTrigger = BI.inherit(BI.Trigger, {\r\n\r\n _const: {\r\n COMPARE_FORMAT: \"%H:%M:%S\",\r\n COMPLETE_COMPARE_FORMAT: \"%Y-%M-%d %H:%M:%S %P\",\r\n FORMAT_ARRAY: [\r\n \"%H:%M:%S\", // HH:mm:ss\r\n \"%I:%M:%S\", // hh:mm:ss\r\n \"%l:%M:%S\", // h:mm:ss\r\n \"%k:%M:%S\", // H:mm:ss\r\n \"%l:%M:%S %p\", // h:mm:ss a\r\n \"%l:%M:%S %P\", // h:mm:ss a\r\n \"%H:%M:%S %p\", // HH:mm:ss a\r\n \"%H:%M:%S %P\", // HH:mm:ss a\r\n \"%l:%M\", // h:mm\r\n \"%k:%M\", // H:mm\r\n \"%I:%M\", // hh:mm\r\n \"%H:%M\", // HH:mm\r\n \"%M:%S\" // mm:ss\r\n ],\r\n DEFAULT_DATE_STRING: \"2000-01-01\",\r\n DEFAULT_HOUR: \"00\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-time-trigger\",\r\n value: {},\r\n format: \"\",\r\n allowEdit: false\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.storeTriggerValue = \"\";\r\n this.storeValue = o.value;\r\n return {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: {\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return self._dateCheck(v);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n ref: function (_ref) {\r\n self.editor = _ref;\r\n },\r\n value: this._formatValue(o.value),\r\n hgap: 4,\r\n allowBlank: true,\r\n watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n title: BI.bind(this._getTitle, this),\r\n listeners: [{\r\n eventName: \"EVENT_KEY_DOWN\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_KEY_DOWN\", arguments);\r\n }\r\n }, {\r\n eventName: \"EVENT_FOCUS\",\r\n action: function () {\r\n self.storeTriggerValue = self.getKey();\r\n self.fireEvent(\"EVENT_FOCUS\");\r\n }\r\n }, {\r\n eventName: \"EVENT_BLUR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_BLUR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_STOP\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_STOP\");\r\n }\r\n }, {\r\n eventName: \"EVENT_VALID\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_VALID\");\r\n }\r\n }, {\r\n eventName: \"EVENT_ERROR\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_ERROR\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CONFIRM\",\r\n action: function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setState(value);\r\n }\r\n if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) {\r\n var date = value.match(/\\d+/g);\r\n self.storeValue = {\r\n hour: date[0] | 0,\r\n minute: date[1] | 0,\r\n second: date[2] | 0\r\n };\r\n }\r\n self.fireEvent(\"EVENT_CONFIRM\");\r\n }\r\n }, {\r\n eventName: \"EVENT_START\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_START\");\r\n }\r\n }, {\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.text\",\r\n invisible: o.allowEdit,\r\n cls: \"show-text\",\r\n title: BI.bind(this._getTitle, this),\r\n hgap: 4\r\n },\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _dateCheck: function (date) {\r\n var c = this._const;\r\n var self = this;\r\n return BI.any(c.FORMAT_ARRAY, function (idx, format) {\r\n return BI.print(BI.parseDateTime(c.DEFAULT_DATE_STRING + \" \" + self._getCompleteHMS(date, format), c.COMPLETE_COMPARE_FORMAT), format) === date;\r\n });\r\n },\r\n\r\n _getCompleteHMS: function (str, format) {\r\n var c = this._const;\r\n switch (format) {\r\n case \"%M:%S\":\r\n str = c.DEFAULT_HOUR + \":\" + str;\r\n break;\r\n default:\r\n break;\r\n }\r\n return str;\r\n },\r\n\r\n _getTitle: function () {\r\n var storeValue = this.storeValue || {};\r\n var date = BI.getDate();\r\n return BI.print(BI.getDate(date.getFullYear(), 0, 1, storeValue.hour, storeValue.minute, storeValue.second), this._getFormatString());\r\n },\r\n\r\n _getFormatString: function () {\r\n return this.options.format || this._const.COMPARE_FORMAT;\r\n },\r\n\r\n _formatValue: function (v) {\r\n var now = BI.getDate();\r\n return BI.isNotEmptyObject(v) ? BI.print(BI.getDate(now.getFullYear(), now.getMonth(), now.getDay(), v.hour, v.minute, v.second), this._getFormatString()) : \"\";\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.editor.setValue(this._formatValue(v));\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n });\r\n BI.shortcut(\"bi.time_trigger\", BI.TimeTrigger);\r\n})();/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.DateInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.DateInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-date-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.DateInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // combo.on(BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.DateInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d\"), \"%Y-%x-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d\"), \"%Y-%X-%d\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e\"), \"%Y-%x-%e\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e\"), \"%Y-%X-%e\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.DateInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DateInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DateInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.date_interval\", BI.DateInterval);/**\r\n * Created by Baron on 2015/10/19.\r\n */\r\nBI.TimeInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0,\r\n timeErrorCls: \"time-error\"\r\n },\r\n _defaultConfig: function () {\r\n var conf = BI.TimeInterval.superclass._defaultConfig.apply(this, arguments);\r\n return BI.extend(conf, {\r\n extraCls: \"bi-time-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n });\r\n },\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.TimeInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_date_time_combo\",\r\n behaviors: o.behaviors,\r\n value: v\r\n });\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_VALID, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_FOCUS, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n });\r\n\r\n // 不知道干啥的,先注释掉\r\n // combo.on(BI.DynamicDateTimeCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n // self.left.hidePopupView();\r\n // self.right.hidePopupView();\r\n // });\r\n\r\n combo.on(BI.DynamicDateTimeCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.TimeInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x-%d %H:%M:%S\"), \"%Y-%x-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%x-%e %H:%M:%S\"), \"%Y-%x-%e %H:%M:%S\") === date ||\r\n BI.print(BI.parseDateTime(date, \"%Y-%X-%e %H:%M:%S\"), \"%Y-%X-%e %H:%M:%S\") === date;\r\n },\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, obj.day, o.minDate, o.maxDate)[0];\r\n },\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n return this._dateCheck(smallDate) && BI.checkDateLegal(smallDate) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1],\r\n day: smallObj[2]\r\n }) && this._dateCheck(bigDate) && BI.checkDateLegal(bigDate) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1],\r\n day: bigObj[2]\r\n });\r\n },\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X-%d %H:%M:%S\"), \"%Y-%X-%d %H:%M:%S\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.left.setTitle(v);\r\n this.right.setTitle(v);\r\n this.label.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.left.setTitle(\"\");\r\n this.right.setTitle(\"\");\r\n this.label.setTitle(\"\");\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.TimeInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.TimeInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.TimeInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.time_interval\", BI.TimeInterval);/**\r\n * 时间区间\r\n * qcc\r\n * 2019/2/28\r\n */\r\n\r\n!(function () {\r\n BI.TimePeriods = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 24,\r\n lgap: 15,\r\n offset: 0\r\n },\r\n props: {\r\n extraCls: \"bi-time-interval\",\r\n value: {}\r\n },\r\n render: function () {\r\n var self = this, o = this.options;\r\n\r\n return {\r\n type: \"bi.absolute\",\r\n height: this.constants.height,\r\n items: [{\r\n el: {\r\n type: \"bi.horizontal_auto\",\r\n items: [{\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\",\r\n ref: function (_ref) {\r\n self.label = _ref;\r\n }\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }, {\r\n el: {\r\n type: \"bi.center\",\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.left = _ref;\r\n }\r\n }, this._createCombo(o.value.start)),\r\n left: this.constants.offset,\r\n right: this.constants.width / 2,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: BI.extend({\r\n ref: function (_ref) {\r\n self.right = _ref;\r\n }\r\n }, this._createCombo(o.value.end)),\r\n left: this.constants.width / 2,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n },\r\n top: 0,\r\n left: 0,\r\n right: 0,\r\n bottom: 0\r\n }]\r\n };\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this;\r\n return {\r\n type: \"bi.time_combo\",\r\n value: v,\r\n listeners: [{\r\n eventName: BI.TimeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.left.hidePopupView();\r\n self.right.hidePopupView();\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CHANGE);\r\n }\r\n }, {\r\n eventName: BI.TimeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TimePeriods.EVENT_CONFIRM);\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n });\r\n BI.TimePeriods.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\n BI.TimePeriods.EVENT_CHANGE = \"EVENT_CHANGE\";\r\n BI.shortcut(\"bi.time_periods\", BI.TimePeriods);\r\n})();/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.item = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0};\r\n this.item.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n },\r\n\r\n getValue: function () {\r\n var value = this.item.getValue();\r\n return {\r\n year: (value.offset === 0 ? -value.value : value.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_card\", BI.DynamicYearCard);/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.StaticYearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.StaticYearCard = BI.inherit(BI.Widget, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.StaticYearCard.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-year-card\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\" // 最大日期\r\n });\r\n },\r\n\r\n _createYearCalendar: function (v) {\r\n var o = this.options, y = this._year;\r\n\r\n var calendar = BI.createWidget({\r\n type: \"bi.year_calendar\",\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max,\r\n logic: {\r\n dynamic: true\r\n },\r\n year: y + v * 12\r\n });\r\n calendar.setValue(this._year);\r\n return calendar;\r\n },\r\n\r\n _init: function () {\r\n BI.StaticYearCard.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n\r\n this.selectedYear = this._year = BI.getDate().getFullYear();\r\n\r\n this.backBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"pre-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: -1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() - 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.preBtn = BI.createWidget({\r\n type: \"bi.icon_button\",\r\n cls: \"next-page-h-font\",\r\n width: 25,\r\n height: 25,\r\n value: 1,\r\n listeners: [{\r\n eventName: BI.IconButton.EVENT_CHANGE,\r\n action: function () {\r\n self.navigation.setSelect(self.navigation.getSelect() + 1);\r\n self._checkLeftValid();\r\n self._checkRightValid();\r\n }\r\n }]\r\n });\r\n\r\n this.navigation = BI.createWidget({\r\n type: \"bi.navigation\",\r\n direction: \"top\",\r\n element: this,\r\n single: true,\r\n logic: {\r\n dynamic: true\r\n },\r\n tab: {\r\n type: \"bi.htape\",\r\n cls: \"bi-split-top bi-split-bottom\",\r\n height: 30,\r\n items: [{\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.backBtn]\r\n },\r\n width: 25\r\n }, {\r\n type: \"bi.layout\"\r\n }, {\r\n el: {\r\n type: \"bi.center_adapt\",\r\n items: [self.preBtn]\r\n },\r\n width: 25\r\n }]\r\n },\r\n cardCreator: BI.bind(this._createYearCalendar, this),\r\n\r\n afterCardShow: function () {\r\n this.setValue(self.selectedYear);\r\n var calendar = this.getSelectedCard();\r\n self.backBtn.setEnable(!calendar.isFrontYear());\r\n self.preBtn.setEnable(!calendar.isFinalYear());\r\n }\r\n });\r\n\r\n this.navigation.on(BI.Navigation.EVENT_CHANGE, function () {\r\n self.selectedYear = this.getValue();\r\n self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);\r\n self.fireEvent(BI.StaticYearCard.EVENT_CHANGE, self.selectedYear);\r\n });\r\n\r\n if(BI.isKey(o.value)){\r\n this.setValue(o.value);\r\n }\r\n },\r\n\r\n _checkLeftValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.backBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n _checkRightValid: function () {\r\n var o = this.options;\r\n var valid = true;\r\n this.preBtn.setEnable(valid);\r\n return valid;\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n obj = obj || {};\r\n var v = obj.year;\r\n if (BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]) {\r\n v = BI.getDate().getFullYear();\r\n this.selectedYear = \"\";\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(\"\");\r\n } else {\r\n this.selectedYear = BI.parseInt(v);\r\n this.navigation.setSelect(BI.YearCalendar.getPageByYear(v));\r\n this.navigation.setValue(this.selectedYear);\r\n }\r\n this._checkLeftValid();\r\n this._checkRightValid();\r\n }\r\n});\r\nBI.StaticYearCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_card\", BI.StaticYearCard);BI.DynamicYearCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_KEY_DOWN, function () {\r\n if (self.combo.isViewVisible()) {\r\n self.combo.hideView();\r\n }\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = this.getKey();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearTrigger.EVENT_CONFIRM, function () {\r\n if (self.combo.isViewVisible()) {\r\n return;\r\n }\r\n if (this.getKey() && this.getKey() !== self.storeTriggerValue) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.storeValue);\r\n } else if (!this.getKey()) {\r\n self.storeValue = null;\r\n self.setValue();\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearCombo.Static, value: {year: date.getFullYear()}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_combo\", BI.DynamicYearCombo);\r\n\r\nBI.extend(BI.DynamicYearCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年份展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n textHeight: c.buttonHeight - 1,\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Year\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Fen\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear()});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Year\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_popup\", BI.DynamicYearPopup);BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.DynamicYearTrigger.superclass._defaultConfig.apply(this, arguments), {\r\n extraCls: \"bi-year-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 24\r\n });\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearTrigger.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options, c = this._const;\r\n this.editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function (v) {\r\n return false;\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n allowBlank: true,\r\n errorText: function () {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_KEY_DOWN, arguments);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_FOCUS);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_STOP);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n var value = self.editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n self.editor.setValue(value);\r\n }\r\n if (BI.isNotEmptyString(value)) {\r\n self.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: value\r\n }\r\n };\r\n }\r\n\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_CONFIRM);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (self.editor.isValid()) {\r\n self.editor.blur();\r\n }\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_START);\r\n });\r\n this.editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearTrigger.EVENT_ERROR);\r\n });\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n el: this.editor\r\n }, {\r\n el: {\r\n type: \"bi.text_button\",\r\n baseCls: \"bi-trigger-year-text\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y\");\r\n this.editor.setState(dateStr);\r\n this.editor.setValue(dateStr);\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.editor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return value.year;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n this.editor.setState(value.year);\r\n this.editor.setValue(value.year);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.editor.getValue() | 0;\r\n }\r\n});\r\nBI.DynamicYearTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.DynamicYearTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.shortcut(\"bi.dynamic_year_trigger\", BI.DynamicYearTrigger);/**\r\n * 年月展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.MONTH,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.month.setValue(this._createValue(BI.DynamicDateCard.TYPE.MONTH, v.month));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var month = this.month.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n month: (month.offset === 0 ? -month.value : month.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_card\", BI.DynamicYearMonthCard);BI.StaticYearMonthCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-month-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createMonths: function () {\r\n var self = this;\r\n // 纵向排列月\r\n var month = [1, 7, 2, 8, 3, 9, 4, 10, 5, 11, 6, 12];\r\n var items = [];\r\n items.push(month.slice(0, 2));\r\n items.push(month.slice(2, 4));\r\n items.push(month.slice(4, 6));\r\n items.push(month.slice(6, 8));\r\n items.push(month.slice(8, 10));\r\n items.push(month.slice(10, 12));\r\n return BI.map(items, function (i, item) {\r\n return BI.map(item, function (j, td) {\r\n return {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 23,\r\n width: 38,\r\n value: td,\r\n text: td,\r\n ref: function (_ref) {\r\n self.monthMap[j === 0 ? i : i + 6] = _ref;\r\n }\r\n };\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n this.monthMap = {};\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n min: o.min,\r\n max: o.max,\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self._checkMonthStatus(value);\r\n self.setValue({\r\n year: value,\r\n month: self.selectedMonth\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n cls: \"bi-split-top\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.month = this;\r\n },\r\n items: this._createMonths(),\r\n layouts: [BI.LogicFactory.createLogic(\"table\", BI.extend({\r\n dynamic: true\r\n }, {\r\n columns: 2,\r\n rows: 6,\r\n columnSize: [1 / 2, 1 / 2],\r\n rowSize: 25\r\n })), {\r\n type: \"bi.center_adapt\",\r\n vgap: 1,\r\n hgap: 2\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedMonth = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearMonthCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n mounted: function() {\r\n this._checkMonthStatus(this.selectedYear);\r\n },\r\n\r\n _checkMonthStatus: function (year) {\r\n var o = this.options;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\"), maxDate = BI.parseDateTime(o.max, \"%Y-%X-%d\");\r\n var minYear = minDate.getFullYear(), maxYear = maxDate.getFullYear();\r\n var minMonth = 0; var maxMonth = 11;\r\n minYear === year && (minMonth = minDate.getMonth());\r\n maxYear === year && (maxMonth = maxDate.getMonth());\r\n var yearInvalid = year < minYear || year > maxYear;\r\n BI.each(this.monthMap, function (month, obj) {\r\n var monthInvalid = month < minMonth || month > maxMonth;\r\n obj.setEnable(!yearInvalid && !monthInvalid);\r\n });\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.yearPicker.setMinDate(minDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.yearPicker.setMaxDate(maxDate);\r\n this._checkMonthStatus(this.selectedYear);\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n month: this.selectedMonth\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.month = obj.month || 0;\r\n if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedMonth = \"\";\r\n this.yearPicker.setValue(year);\r\n this.month.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedMonth = BI.parseInt(newObj.month);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.month.setValue(this.selectedMonth);\r\n }\r\n }\r\n});\r\nBI.StaticYearMonthCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_month_card\", BI.StaticYearMonthCard);\r\nBI.DynamicYearMonthCombo = BI.inherit(BI.Single, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n minDate: \"1900-01-01\", // 最小日期\r\n maxDate: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n this.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_month_trigger\",\r\n min: o.minDate,\r\n max: o.maxDate,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_ERROR);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_VALID, function () {\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_FOCUS);\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 100,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_month_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), month: date.getMonth() + 1}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.minDate,\r\n max: o.maxDate\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearMonthCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n hideView: function () {\r\n this.combo.hideView();\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.trigger.getKey();\r\n },\r\n\r\n isValid: function () {\r\n return this.trigger.isValid();\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthCombo.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthCombo.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_month_combo\", BI.DynamicYearMonthCombo);\r\n\r\nBI.extend(BI.DynamicYearMonthCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});/**\r\n * 年月\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.DynamicYearMonthPopup\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-month-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearMonthCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Month\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicDateCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%x\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Month\"),\r\n value: BI.DynamicYearCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_month_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_month_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.StaticYearMonthCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearMonthPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), month: date.getMonth() + 1});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setMinDate: function (minDate) {\r\n if (this.options.min !== minDate) {\r\n this.options.min = minDate;\r\n this.year.setMinDate(minDate);\r\n }\r\n },\r\n\r\n setMaxDate: function (maxDate) {\r\n if (this.options.max !== maxDate) {\r\n this.options.max = maxDate;\r\n this.year.setMaxDate(maxDate);\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Month\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearMonthPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearMonthPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_month_popup\", BI.DynamicYearMonthPopup);BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n beforeInit: function (callback) {\r\n var o = this.options;\r\n o.title = BI.bind(this._titleCreator, this);\r\n callback();\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearMonthTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.monthEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.monthEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Month\"),\r\n width: o.height\r\n },\r\n width: o.height}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var minDate = BI.parseDateTime(o.min, \"%Y-%X-%d\");\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, v === minDate.getFullYear() ? minDate.getMonth() + 1 : 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 12) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_VALID, function () {\r\n var year = self.yearEditor.getValue();\r\n var month = self.monthEditor.getValue();\r\n if(BI.isNotEmptyString(year) && BI.isNotEmptyString(month)) {\r\n if(BI.isPositiveInteger(year) && month >= 1 && month <= 12 && !BI.checkDateVoid(year, month, 1, o.min, o.max)[0]) {\r\n self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_VALID);\r\n }\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _titleCreator: function () {\r\n var storeValue = this.storeValue || {};\r\n var type = storeValue.type || BI.DynamicDateCombo.Static;\r\n var value = storeValue.value;\r\n if(!this.monthEditor.isValid() || !this.yearEditor.isValid()) {\r\n return \"\";\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n var date = BI.getDate();\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n var dateStr = BI.print(date, \"%Y-%x\");\r\n return BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr);\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n return this._getStaticTitle(value);\r\n }\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var monthValue = this.monthEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicDateCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n month: BI.isEmptyString(this.monthEditor.getValue()) ? \"\" : monthValue\r\n }\r\n };\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);\r\n this.monthEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.month) && BI.parseInt(obj.month) !== 0) {\r\n value += Math.abs(obj.month) + BI.i18nText(\"BI-Basic_Month\") + (obj.month < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.monthEditor.setValue(date.getMonth() + 1);\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.month) || BI.isEmptyString(value.month));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.month;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.month;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n value = value || {};\r\n var month = BI.isNull(value.month) ? null : value.month;\r\n this.yearEditor.setValue(value.year);\r\n this.monthEditor.setValue(month);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.monthEditor.getValue();\r\n },\r\n\r\n isValid: function () {\r\n return this.yearEditor.isValid() && this.monthEditor.isValid();\r\n }\r\n});\r\nBI.DynamicYearMonthTrigger.EVENT_VALID = \"EVENT_VALID\";\r\nBI.DynamicYearMonthTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearMonthTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearMonthTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearMonthTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearMonthTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearMonthTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_month_trigger\", BI.DynamicYearMonthTrigger);BI.YearMonthInterval = BI.inherit(BI.Single, {\r\n constants: {\r\n height: 24,\r\n width: 25,\r\n lgap: 15,\r\n offset: -15,\r\n timeErrorCls: \"time-error\"\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-month-interval\",\r\n minDate: \"1900-01-01\",\r\n maxDate: \"2099-12-31\"\r\n },\r\n\r\n _init: function () {\r\n var self = this, o = this.options;\r\n BI.YearMonthInterval.superclass._init.apply(this, arguments);\r\n\r\n o.value = o.value || {};\r\n this.left = this._createCombo(o.value.start);\r\n this.right = this._createCombo(o.value.end);\r\n this.label = BI.createWidget({\r\n type: \"bi.label\",\r\n height: this.constants.height,\r\n width: this.constants.width,\r\n text: \"-\"\r\n });\r\n BI.createWidget({\r\n element: self,\r\n type: \"bi.center\",\r\n hgap: 15,\r\n height: this.constants.height,\r\n items: [{\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.left,\r\n left: this.constants.offset,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }, {\r\n type: \"bi.absolute\",\r\n items: [{\r\n el: self.right,\r\n left: 0,\r\n right: this.constants.offset,\r\n top: 0,\r\n bottom: 0\r\n }]\r\n }]\r\n });\r\n BI.createWidget({\r\n type: \"bi.horizontal_auto\",\r\n element: this,\r\n items: [\r\n self.label\r\n ]\r\n });\r\n },\r\n\r\n _createCombo: function (v) {\r\n var self = this, o = this.options;\r\n var combo = BI.createWidget({\r\n type: \"bi.dynamic_year_month_combo\",\r\n behaviors: o.behaviors,\r\n value: v,\r\n listeners: [{\r\n eventName: BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_ERROR, function () {\r\n self._clearTitle();\r\n BI.Bubbles.hide(\"error\");\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_VALID, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_FOCUS, function () {\r\n self._checkValid();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.left.hideView();\r\n self.right.hideView();\r\n });\r\n\r\n combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () {\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n }else{\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n self.fireEvent(BI.YearMonthInterval.EVENT_CHANGE);\r\n }\r\n });\r\n return combo;\r\n },\r\n\r\n\r\n _dateCheck: function (date) {\r\n return BI.print(BI.parseDateTime(date, \"%Y-%x\"), \"%Y-%x\") === date || BI.print(BI.parseDateTime(date, \"%Y-%X\"), \"%Y-%X\") === date;\r\n },\r\n\r\n\r\n // 判是否在最大最小之间\r\n _checkVoid: function (obj) {\r\n var o = this.options;\r\n return !BI.checkDateVoid(obj.year, obj.month, 1, o.minDate, o.maxDate)[0];\r\n },\r\n\r\n // 判格式合法\r\n _check: function (smallDate, bigDate) {\r\n var smallObj = smallDate.match(/\\d+/g), bigObj = bigDate.match(/\\d+/g);\r\n\r\n var smallDate4Check = \"\";\r\n if (BI.isNotNull(smallObj)) {\r\n smallDate4Check = (smallObj[0] || \"\") + \"-\" + (smallObj[1] || 1);\r\n }\r\n\r\n var bigDate4Check = \"\";\r\n if (BI.isNotNull(bigObj)) {\r\n bigDate4Check = (bigObj[0] || \"\") + \"-\" + (bigObj[1] || 1);\r\n }\r\n\r\n return this._dateCheck(smallDate4Check) && BI.checkDateLegal(smallDate4Check) && this._checkVoid({\r\n year: smallObj[0],\r\n month: smallObj[1] || 1,\r\n day: 1\r\n }) && this._dateCheck(bigDate4Check) && BI.checkDateLegal(bigDate4Check) && this._checkVoid({\r\n year: bigObj[0],\r\n month: bigObj[1] || 1,\r\n day: 1\r\n });\r\n },\r\n\r\n _compare: function (smallDate, bigDate) {\r\n smallDate = BI.print(BI.parseDateTime(smallDate, \"%Y-%X\"), \"%Y-%X\");\r\n bigDate = BI.print(BI.parseDateTime(bigDate, \"%Y-%X\"), \"%Y-%X\");\r\n return BI.isNotNull(smallDate) && BI.isNotNull(bigDate) && smallDate > bigDate;\r\n },\r\n _setTitle: function (v) {\r\n this.setTitle(v);\r\n },\r\n _clearTitle: function () {\r\n this.setTitle(\"\");\r\n },\r\n _checkValid: function () {\r\n var self = this;\r\n\r\n BI.Bubbles.hide(\"error\");\r\n var smallDate = self.left.getKey(), bigDate = self.right.getKey();\r\n if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {\r\n self._setTitle(BI.i18nText(\"BI-Time_Interval_Error_Text\"));\r\n self.element.addClass(self.constants.timeErrorCls);\r\n BI.Bubbles.show(\"error\", BI.i18nText(\"BI-Time_Interval_Error_Text\"), self, {\r\n offsetStyle: \"center\"\r\n });\r\n self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);\r\n } else {\r\n self._clearTitle();\r\n self.element.removeClass(self.constants.timeErrorCls);\r\n }\r\n },\r\n setValue: function (date) {\r\n date = date || {};\r\n this.left.setValue(date.start);\r\n this.right.setValue(date.end);\r\n\r\n this._checkValid();\r\n },\r\n getValue: function () {\r\n return {start: this.left.getValue(), end: this.right.getValue()};\r\n }\r\n});\r\nBI.YearMonthInterval.EVENT_VALID = \"EVENT_VALID\";\r\nBI.YearMonthInterval.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.YearMonthInterval.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.YearMonthInterval.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.year_month_interval\", BI.YearMonthInterval);\r\n/**\r\n * 年季度展示面板\r\n *\r\n * Created by GUY on 2015/9/2.\r\n * @class BI.YearCard\r\n * @extends BI.Trigger\r\n */\r\nBI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-month-card\"\r\n },\r\n\r\n render: function () {\r\n var self = this;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.label\",\r\n text: BI.i18nText(\"BI-Multi_Date_Relative_Current_Time\"),\r\n textAlign: \"left\",\r\n height: 24\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n ref: function () {\r\n self.year = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }, {\r\n type: \"bi.dynamic_date_param_item\",\r\n dateType: BI.DynamicDateCard.TYPE.QUARTER,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self.fireEvent(\"EVENT_CHANGE\");\r\n }\r\n }]\r\n }],\r\n vgap: 10,\r\n hgap: 10\r\n };\r\n },\r\n\r\n _createValue: function (type, v) {\r\n return {\r\n dateType: type,\r\n value: Math.abs(v),\r\n offset: v > 0 ? 1 : 0\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n v = v || {year: 0, month: 0};\r\n this.year.setValue(this._createValue(BI.DynamicDateCard.TYPE.YEAR, v.year));\r\n this.quarter.setValue(this._createValue(BI.DynamicDateCard.TYPE.QUARTER, v.quarter));\r\n },\r\n\r\n getValue: function () {\r\n var year = this.year.getValue();\r\n var quarter = this.quarter.getValue();\r\n return {\r\n year: (year.offset === 0 ? -year.value : year.value),\r\n quarter: (quarter.offset === 0 ? -quarter.value : quarter.value)\r\n };\r\n }\r\n});\r\nBI.DynamicYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_card\", BI.DynamicYearQuarterCard);BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-static-year-quarter-card\",\r\n behaviors: {}\r\n },\r\n\r\n _createQuarter: function () {\r\n\r\n var items = [{\r\n text: BI.Date._QN[1],\r\n value: 1\r\n }, {\r\n text: BI.Date._QN[2],\r\n value: 2\r\n }, {\r\n text: BI.Date._QN[3],\r\n value: 3\r\n }, {\r\n text: BI.Date._QN[4],\r\n value: 4\r\n }];\r\n return BI.map(items, function (j, item) {\r\n return BI.extend(item, {\r\n type: \"bi.text_item\",\r\n cls: \"bi-list-item-select\",\r\n textAlign: \"center\",\r\n whiteSpace: \"nowrap\",\r\n once: false,\r\n forceSelected: true,\r\n height: 24\r\n });\r\n });\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.vertical\",\r\n items: [{\r\n type: \"bi.year_picker\",\r\n ref: function () {\r\n self.yearPicker = this;\r\n },\r\n behaviors: o.behaviors,\r\n height: 30,\r\n listeners: [{\r\n eventName: BI.YearPicker.EVENT_CHANGE,\r\n action: function () {\r\n var value = this.getValue();\r\n self.setValue({\r\n year: value,\r\n quarter: self.selectedQuarter\r\n });\r\n }\r\n }]\r\n }, {\r\n type: \"bi.button_group\",\r\n behaviors: o.behaviors,\r\n ref: function () {\r\n self.quarter = this;\r\n },\r\n items: this._createQuarter(),\r\n layouts: [{\r\n type: \"bi.vertical\",\r\n vgap: 10\r\n }],\r\n value: o.value,\r\n listeners: [{\r\n eventName: BI.ButtonGroup.EVENT_CHANGE,\r\n action: function () {\r\n self.selectedYear = self.yearPicker.getValue();\r\n self.selectedQuarter = this.getValue()[0];\r\n self.fireEvent(BI.StaticYearQuarterCard.EVENT_CHANGE);\r\n }\r\n }]\r\n }]\r\n };\r\n },\r\n\r\n\r\n getValue: function () {\r\n return {\r\n year: this.selectedYear,\r\n quarter: this.selectedQuarter\r\n };\r\n },\r\n\r\n setValue: function (obj) {\r\n var o = this.options;\r\n var newObj = {};\r\n newObj.year = obj.year || 0;\r\n newObj.quarter = obj.quarter || 0;\r\n if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {\r\n var year = newObj.year || BI.getDate().getFullYear();\r\n this.selectedYear = year;\r\n this.selectedQuarter = \"\";\r\n this.yearPicker.setValue(year);\r\n this.quarter.setValue();\r\n } else {\r\n this.selectedYear = BI.parseInt(newObj.year);\r\n this.selectedQuarter = BI.parseInt(newObj.quarter);\r\n this.yearPicker.setValue(this.selectedYear);\r\n this.quarter.setValue(this.selectedQuarter);\r\n }\r\n }\r\n});\r\nBI.StaticYearQuarterCard.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.static_year_quarter_card\", BI.StaticYearQuarterCard);\r\nBI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-combo bi-border bi-focus-shadow\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.storeValue = o.value;\r\n self.storeTriggerValue = \"\";\r\n this.trigger = BI.createWidget({\r\n type: \"bi.dynamic_year_quarter_trigger\",\r\n min: o.min,\r\n max: o.max,\r\n height: o.height,\r\n value: o.value || \"\"\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_START, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_STOP, function () {\r\n self.combo.showView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_ERROR, function () {\r\n self.combo.isViewVisible() && self.combo.hideView();\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {\r\n // 没看出来干啥的,先去掉\r\n // if (self.combo.isViewVisible()) {\r\n // return;\r\n // }\r\n var dateStore = self.storeTriggerValue;\r\n var dateObj = self.trigger.getKey();\r\n if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {\r\n self.storeValue = self.trigger.getValue();\r\n self.setValue(self.trigger.getValue());\r\n }\r\n self._checkDynamicValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n });\r\n this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_FOCUS, function () {\r\n self.storeTriggerValue = self.trigger.getKey();\r\n });\r\n\r\n this.combo = BI.createWidget({\r\n type: \"bi.combo\",\r\n container: o.container,\r\n isNeedAdjustHeight: false,\r\n isNeedAdjustWidth: false,\r\n el: this.trigger,\r\n popup: {\r\n minWidth: 85,\r\n stopPropagation: false,\r\n el: {\r\n type: \"bi.dynamic_year_quarter_popup\",\r\n ref: function () {\r\n self.popup = this;\r\n },\r\n listeners: [{\r\n eventName: BI.DynamicYearQuarterPopup.EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue();\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,\r\n action: function () {\r\n var date = BI.getDate();\r\n self.setValue({type: BI.DynamicYearMonthCombo.Static, value: {year: date.getFullYear(), quarter: BI.getQuarter(date)}});\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE,\r\n action: function () {\r\n self.setValue(self.popup.getValue());\r\n self.combo.hideView();\r\n self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n behaviors: o.behaviors,\r\n min: o.min,\r\n max: o.max\r\n },\r\n value: o.value || \"\"\r\n }\r\n });\r\n this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () {\r\n self.popup.setValue(self.storeValue);\r\n self.fireEvent(BI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW);\r\n });\r\n\r\n BI.createWidget({\r\n type: \"bi.htape\",\r\n element: this,\r\n ref: function () {\r\n self.comboWrapper = this;\r\n },\r\n items: [{\r\n el: {\r\n type: \"bi.icon_button\",\r\n cls: \"bi-trigger-icon-button date-change-h-font\",\r\n width: 24,\r\n height: 24,\r\n ref: function () {\r\n self.changeIcon = this;\r\n }\r\n },\r\n width: 24\r\n }, this.combo]\r\n });\r\n this._checkDynamicValue(o.value);\r\n },\r\n\r\n _checkDynamicValue: function (v) {\r\n var type = null;\r\n if (BI.isNotNull(v)) {\r\n type = v.type;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n this.changeIcon.setVisible(true);\r\n this.comboWrapper.attr(\"items\")[0].width = 24;\r\n this.comboWrapper.resize();\r\n break;\r\n default:\r\n this.comboWrapper.attr(\"items\")[0].width = 0;\r\n this.comboWrapper.resize();\r\n this.changeIcon.setVisible(false);\r\n break;\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n this.trigger.setValue(v);\r\n this._checkDynamicValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_combo\", BI.DynamicYearQuarterCombo);\r\n\r\nBI.extend(BI.DynamicYearQuarterCombo, {\r\n Static: 1,\r\n Dynamic: 2\r\n});BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {\r\n constants: {\r\n tabHeight: 30,\r\n buttonHeight: 24\r\n },\r\n\r\n props: {\r\n baseCls: \"bi-year-quarter-popup\",\r\n behaviors: {},\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期,\r\n width: 180,\r\n height: 240\r\n },\r\n\r\n render: function () {\r\n var self = this, opts = this.options, c = this.constants;\r\n this.storeValue = {type: BI.DynamicYearQuarterCombo.Static};\r\n return {\r\n type: \"bi.vtape\",\r\n items: [{\r\n el: this._getTabJson()\r\n }, {\r\n el: {\r\n type: \"bi.grid\",\r\n items: [[{\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_Clear\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-left bi-split-right bi-high-light bi-split-top\",\r\n textHeight: c.buttonHeight - 1,\r\n shadow: true,\r\n text: BI.i18nText(\"BI-Basic_Current_Quarter\"),\r\n ref: function () {\r\n self.textButton = this;\r\n },\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE);\r\n }\r\n }]\r\n }, {\r\n type: \"bi.text_button\",\r\n cls: \"bi-split-top bi-high-light\",\r\n shadow: true,\r\n textHeight: c.buttonHeight - 1,\r\n text: BI.i18nText(\"BI-Basic_OK\"),\r\n listeners: [{\r\n eventName: BI.TextButton.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE);\r\n }\r\n }]\r\n }]]\r\n },\r\n height: 24\r\n }]\r\n };\r\n },\r\n\r\n _setInnerValue: function () {\r\n if (this.dateTab.getSelect() === BI.DynamicYearQuarterCombo.Static) {\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n } else {\r\n var date = BI.DynamicDateHelper.getCalculation(this.dynamicPane.getValue());\r\n date = BI.print(date, \"%Y-%Q\");\r\n this.textButton.setValue(date);\r\n this.textButton.setEnable(false);\r\n }\r\n },\r\n\r\n _getTabJson: function () {\r\n var self = this, o = this.options;\r\n return {\r\n type: \"bi.tab\",\r\n ref: function () {\r\n self.dateTab = this;\r\n },\r\n tab: {\r\n type: \"bi.linear_segment\",\r\n cls: \"bi-split-bottom\",\r\n height: this.constants.tabHeight,\r\n items: BI.createItems([{\r\n text: BI.i18nText(\"BI-Basic_Year_Quarter\"),\r\n value: BI.DynamicYearQuarterCombo.Static\r\n }, {\r\n text: BI.i18nText(\"BI-Basic_Dynamic_Title\"),\r\n value: BI.DynamicYearQuarterCombo.Dynamic\r\n }], {\r\n textAlign: \"center\"\r\n })\r\n },\r\n cardCreator: function (v) {\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n return {\r\n type: \"bi.dynamic_year_quarter_card\",\r\n listeners: [{\r\n eventName: \"EVENT_CHANGE\",\r\n action: function () {\r\n self._setInnerValue(self.year, v);\r\n }\r\n }],\r\n ref: function () {\r\n self.dynamicPane = this;\r\n }\r\n };\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n return {\r\n type: \"bi.static_year_quarter_card\",\r\n behaviors: o.behaviors,\r\n min: self.options.min,\r\n max: self.options.max,\r\n listeners: [{\r\n eventName: BI.DynamicYearCard.EVENT_CHANGE,\r\n action: function () {\r\n self.fireEvent(BI.DynamicYearQuarterPopup.EVENT_CHANGE);\r\n }\r\n }],\r\n ref: function () {\r\n self.year = this;\r\n }\r\n };\r\n }\r\n },\r\n listeners: [{\r\n eventName: BI.Tab.EVENT_CHANGE,\r\n action: function () {\r\n var v = self.dateTab.getSelect();\r\n switch (v) {\r\n case BI.DynamicYearQuarterCombo.Static:\r\n var date = BI.DynamicDateHelper.getCalculation(self.dynamicPane.getValue());\r\n self.year.setValue({year: date.getFullYear(), quarter: BI.getQuarter(date)});\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n default:\r\n if(self.storeValue && self.storeValue.type === BI.DynamicYearQuarterCombo.Dynamic) {\r\n self.dynamicPane.setValue(self.storeValue.value);\r\n }else{\r\n self.dynamicPane.setValue({\r\n year: 0\r\n });\r\n }\r\n self._setInnerValue();\r\n break;\r\n }\r\n }\r\n }]\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n this.storeValue = v;\r\n var self = this;\r\n var type, value;\r\n v = v || {};\r\n type = v.type || BI.DynamicDateCombo.Static;\r\n value = v.value || v;\r\n this.dateTab.setSelect(type);\r\n switch (type) {\r\n case BI.DynamicDateCombo.Dynamic:\r\n this.dynamicPane.setValue(value);\r\n self._setInnerValue();\r\n break;\r\n case BI.DynamicDateCombo.Static:\r\n default:\r\n this.year.setValue(value);\r\n this.textButton.setValue(BI.i18nText(\"BI-Basic_Current_Quarter\"));\r\n this.textButton.setEnable(true);\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return {\r\n type: this.dateTab.getSelect(),\r\n value: this.dateTab.getValue()\r\n };\r\n }\r\n\r\n});\r\nBI.DynamicYearQuarterPopup.BUTTON_CLEAR_EVENT_CHANGE = \"BUTTON_CLEAR_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE = \"BUTTON_lABEL_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.BUTTON_OK_EVENT_CHANGE = \"BUTTON_OK_EVENT_CHANGE\";\r\nBI.DynamicYearQuarterPopup.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_popup\", BI.DynamicYearQuarterPopup);BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {\r\n _const: {\r\n hgap: 4,\r\n vgap: 2\r\n },\r\n\r\n props: {\r\n extraCls: \"bi-year-quarter-trigger\",\r\n min: \"1900-01-01\", // 最小日期\r\n max: \"2099-12-31\", // 最大日期\r\n height: 22\r\n },\r\n\r\n _init: function () {\r\n BI.DynamicYearQuarterTrigger.superclass._init.apply(this, arguments);\r\n var o = this.options;\r\n\r\n this.yearEditor = this._createEditor(true);\r\n this.quarterEditor = this._createEditor(false);\r\n\r\n BI.createWidget({\r\n element: this,\r\n type: \"bi.htape\",\r\n items: [{\r\n type: \"bi.center\",\r\n items: [{\r\n type: \"bi.htape\",\r\n items: [this.yearEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Year\"),\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n }, {\r\n type: \"bi.htape\",\r\n items: [this.quarterEditor, {\r\n el: {\r\n type: \"bi.text_button\",\r\n text: BI.i18nText(\"BI-Multi_Date_Quarter\"),\r\n width: 24\r\n },\r\n width: 24}]\r\n }]\r\n }, {\r\n el: {\r\n type: \"bi.trigger_icon_button\",\r\n width: o.height\r\n },\r\n width: o.height\r\n }]\r\n });\r\n this.setValue(o.value);\r\n },\r\n\r\n _createEditor: function (isYear) {\r\n var self = this, o = this.options, c = this._const;\r\n var editor = BI.createWidget({\r\n type: \"bi.sign_editor\",\r\n height: o.height,\r\n validationChecker: function (v) {\r\n if(isYear) {\r\n return v === \"\" || (BI.isPositiveInteger(v) && !BI.checkDateVoid(v, 1, 1, o.min, o.max)[0]);\r\n }\r\n return v === \"\" || ((BI.isPositiveInteger(v) && v >= 1 && v <= 4) && !BI.checkDateVoid(BI.getDate().getFullYear(), v, 1, o.min, o.max)[0]);\r\n },\r\n quitChecker: function () {\r\n return false;\r\n },\r\n errorText: function (v) {\r\n return BI.i18nText(\"BI-Year_Trigger_Invalid_Text\");\r\n },\r\n watermark: BI.i18nText(\"BI-Basic_Unrestricted\"),\r\n hgap: c.hgap,\r\n vgap: c.vgap,\r\n title: \"\",\r\n allowBlank: true\r\n });\r\n editor.on(BI.SignEditor.EVENT_KEY_DOWN, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN);\r\n });\r\n editor.on(BI.SignEditor.EVENT_FOCUS, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_FOCUS);\r\n });\r\n editor.on(BI.SignEditor.EVENT_STOP, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_STOP);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CONFIRM, function () {\r\n self._doEditorConfirm(editor);\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n });\r\n editor.on(BI.SignEditor.EVENT_SPACE, function () {\r\n if (editor.isValid()) {\r\n editor.blur();\r\n }\r\n });\r\n editor.on(BI.SignEditor.EVENT_START, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_START);\r\n });\r\n editor.on(BI.SignEditor.EVENT_ERROR, function () {\r\n self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_ERROR);\r\n });\r\n editor.on(BI.SignEditor.EVENT_CHANGE, function () {\r\n if(isYear) {\r\n self._autoSwitch(editor);\r\n }\r\n });\r\n\r\n return editor;\r\n },\r\n\r\n _doEditorConfirm: function (editor) {\r\n var value = editor.getValue();\r\n if (BI.isNotNull(value)) {\r\n editor.setValue(value);\r\n }\r\n var quarterValue = this.quarterEditor.getValue();\r\n this.storeValue = {\r\n type: BI.DynamicYearQuarterCombo.Static,\r\n value: {\r\n year: this.yearEditor.getValue(),\r\n quarter: BI.isEmptyString(this.quarterEditor.getValue()) ? \"\" : quarterValue\r\n }\r\n };\r\n this.setTitle(this._getStaticTitle(this.storeValue.value));\r\n },\r\n\r\n _yearCheck: function (v) {\r\n var date = BI.print(BI.parseDateTime(v, \"%Y-%X-%d\"), \"%Y-%X-%d\");\r\n return BI.print(BI.parseDateTime(v, \"%Y\"), \"%Y\") === v && date >= this.options.min && date <= this.options.max;\r\n },\r\n\r\n _autoSwitch: function (editor) {\r\n var v = editor.getValue();\r\n if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) {\r\n if (v.length === 4 && this._yearCheck(v)) {\r\n this._doEditorConfirm(editor);\r\n this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);\r\n this.quarterEditor.focus();\r\n }\r\n }\r\n },\r\n\r\n _getStaticTitle: function (value) {\r\n value = value || {};\r\n var hasYear = !(BI.isNull(value.year) || BI.isEmptyString(value.year));\r\n var hasMonth = !(BI.isNull(value.quarter) || BI.isEmptyString(value.quarter));\r\n switch ((hasYear << 1) | hasMonth) {\r\n // !hasYear && !hasMonth\r\n case 0:\r\n return \"\";\r\n // !hasYear && hasMonth\r\n case 1:\r\n return value.quarter;\r\n // hasYear && !hasMonth\r\n case 2:\r\n return value.year;\r\n // hasYear && hasMonth\r\n case 3:\r\n default:\r\n return value.year + \"-\" + value.quarter;\r\n }\r\n },\r\n\r\n _getText: function (obj) {\r\n var value = \"\";\r\n if(BI.isNotNull(obj.year) && BI.parseInt(obj.year) !== 0) {\r\n value += Math.abs(obj.year) + BI.i18nText(\"BI-Basic_Year\") + (obj.year < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n if(BI.isNotNull(obj.quarter) && BI.parseInt(obj.quarter) !== 0) {\r\n value += Math.abs(obj.quarter) + BI.i18nText(\"BI-Basic_Single_Quarter\") + (obj.quarter < 0 ? BI.i18nText(\"BI-Basic_Front\") : BI.i18nText(\"BI-Basic_Behind\"));\r\n }\r\n return value;\r\n },\r\n\r\n _setInnerValue: function (date, text) {\r\n var dateStr = BI.print(date, \"%Y-%Q\");\r\n this.yearEditor.setValue(date.getFullYear());\r\n this.quarterEditor.setValue(BI.getQuarter(date));\r\n this.setTitle(BI.isEmptyString(text) ? dateStr : (text + \":\" + dateStr));\r\n },\r\n\r\n setValue: function (v) {\r\n var type, value;\r\n var date = BI.getDate();\r\n this.storeValue = v;\r\n if (BI.isNotNull(v)) {\r\n type = v.type || BI.DynamicYearQuarterCombo.Static;\r\n value = v.value || v;\r\n }\r\n switch (type) {\r\n case BI.DynamicYearQuarterCombo.Dynamic:\r\n var text = this._getText(value);\r\n date = BI.DynamicDateHelper.getCalculation(value);\r\n this._setInnerValue(date, text);\r\n break;\r\n case BI.DynamicYearQuarterCombo.Static:\r\n default:\r\n value = value || {};\r\n var quarter = BI.isNull(value.quarter) ? null : value.quarter;\r\n this.yearEditor.setValue(value.year);\r\n this.yearEditor.setTitle(value.year);\r\n this.quarterEditor.setValue(quarter);\r\n this.quarterEditor.setTitle(quarter);\r\n this.setTitle(this._getStaticTitle(value));\r\n break;\r\n }\r\n },\r\n\r\n getValue: function () {\r\n return this.storeValue;\r\n },\r\n\r\n getKey: function () {\r\n return this.yearEditor.getValue() + \"-\" + this.quarterEditor.getValue();\r\n }\r\n});\r\nBI.DynamicYearQuarterTrigger.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.DynamicYearQuarterTrigger.EVENT_ERROR = \"EVENT_ERROR\";\r\nBI.DynamicYearQuarterTrigger.EVENT_START = \"EVENT_START\";\r\nBI.DynamicYearQuarterTrigger.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.DynamicYearQuarterTrigger.EVENT_STOP = \"EVENT_STOP\";\r\nBI.DynamicYearQuarterTrigger.EVENT_KEY_DOWN = \"EVENT_KEY_DOWN\";\r\nBI.shortcut(\"bi.dynamic_year_quarter_trigger\", BI.DynamicYearQuarterTrigger);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractAllValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractAllValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractAllValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n // 需要考虑到value也可能是数字\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n if (options.keyword) {\r\n keywords.push(options.keyword);\r\n }\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: resultItems,\r\n hasNext: false\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserCombo\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserCombo = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n text: o.text,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n value: {\r\n type: BI.Selection.Multi,\r\n value: o.value || []\r\n }\r\n });\r\n\r\n this.combo.on(BI.MultiSelectCombo.EVENT_CONFIRM, function () {\r\n self.fireEvent(BI.AllValueChooserCombo.EVENT_CONFIRM);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\nBI.AllValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_chooser_combo\", BI.AllValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况, 与valuechooser的区别是allvaluechooser setValue和getValue返回的是所有值\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AllValueChooserPane\r\n * @extends BI.AbstractAllValueChooser\r\n */\r\nBI.AllValueChooserPane = BI.inherit(BI.AbstractAllValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AllValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-all-value-chooser-pane\",\r\n width: 200,\r\n height: 30,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.AllValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.AllValueChooserPane.EVENT_CHANGE);\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue({\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n });\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n if (val.type === BI.Selection.All) {\r\n return val.assist;\r\n }\r\n return val.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.AllValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.all_value_chooser_pane\", BI.AllValueChooserPane);BI.AllValueMultiTextValueCombo = BI.inherit(BI.Widget, {\r\n\r\n props: {\r\n baseCls: \"bi-all-value-multi-text-value-combo\",\r\n width: 200,\r\n height: 24,\r\n items: []\r\n },\r\n\r\n render: function () {\r\n var self = this, o = this.options;\r\n var value = this._digestValue(o.value);\r\n return {\r\n type: \"bi.search_multi_text_value_combo\",\r\n text: o.text,\r\n height: o.height,\r\n items: o.items,\r\n value: value,\r\n numOfPage: 100,\r\n valueFormatter: o.valueFormatter,\r\n warningTitle: o.warningTitle,\r\n listeners: [{\r\n eventName: BI.SearchMultiTextValueCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.AllValueMultiTextValueCombo.EVENT_CONFIRM);\r\n }\r\n }],\r\n ref: function () {\r\n self.combo = this;\r\n }\r\n };\r\n },\r\n\r\n setValue: function (v) {\r\n var value = this._digestValue(v);\r\n this.combo.setValue(value);\r\n },\r\n\r\n getValue: function () {\r\n var obj = this.combo.getValue() || {};\r\n obj.value = obj.value || [];\r\n if(obj.type === BI.Selection.All) {\r\n var values = [];\r\n BI.each(this.options.items, function (idx, item) {\r\n !BI.contains(obj.value, item.value) && values.push(item.value);\r\n });\r\n return values;\r\n }\r\n return obj.value || [];\r\n },\r\n\r\n populate: function (items) {\r\n this.options.items = items;\r\n this.combo.populate.apply(this.combo, arguments);\r\n },\r\n\r\n _digestValue: function (v) {\r\n return {\r\n type: BI.Selection.Multi,\r\n value: v || []\r\n };\r\n }\r\n});\r\nBI.AllValueMultiTextValueCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.all_value_multi_text_value_combo\", BI.AllValueMultiTextValueCombo);\r\nBI.AbstractTreeValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractTreeValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n open: false\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _initData: function (items) {\r\n this.items = items;\r\n var nodes = BI.Tree.treeFormat(items);\r\n this.tree = new BI.Tree();\r\n this.tree.initTree(nodes);\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self._initData(items);\r\n call();\r\n });\r\n } else {\r\n call();\r\n }\r\n\r\n function call() {\r\n switch (options.type) {\r\n case BI.TreeView.REQ_TYPE_INIT_DATA:\r\n self._reqInitTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_ADJUST_DATA:\r\n self._reqAdjustTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_SELECT_DATA:\r\n self._reqSelectedTreeNode(options, callback);\r\n break;\r\n case BI.TreeView.REQ_TYPE_GET_SELECTED_DATA:\r\n self._reqDisplayTreeNode(options, callback);\r\n break;\r\n default :\r\n self._reqTreeNode(options, callback);\r\n break;\r\n }\r\n }\r\n },\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: result\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n BI.each(node.getChildren(), function (i, child) {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(child.value);\r\n var llen = self._getChildCount(newParents);\r\n createOneJson(child, node.id, llen);\r\n doCheck(newParents, child, {});\r\n });\r\n return;\r\n }\r\n BI.each(selected, function (k) {\r\n var node = self._getTreeNode(parentValues, k);\r\n // 找不到就是新增值\r\n if(BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: k,\r\n value: k\r\n }, BI.UUID(), 0);\r\n } else {\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(node.value);\r\n createOneJson(node, node.parent && node.parent.id, getCount(selected[k], newParents));\r\n doCheck(newParents, node, selected[k]);\r\n }\r\n });\r\n }\r\n\r\n function getCount(jo, parentValues) {\r\n if (jo == null) {\r\n return 0;\r\n }\r\n if (BI.isEmpty(jo)) {\r\n return self._getChildCount(parentValues);\r\n }\r\n\r\n return BI.size(jo);\r\n }\r\n\r\n function createOneJson(node, pId, llen) {\r\n result.push({\r\n id: node.id,\r\n pId: pId,\r\n text: node.text + (llen > 0 ? (\"(\" + BI.i18nText(\"BI-Basic_Altogether\") + llen + BI.i18nText(\"BI-Basic_Count\") + \")\") : \"\"),\r\n value: node.value,\r\n open: true\r\n });\r\n }\r\n },\r\n\r\n _reqSelectedTreeNode: function (op, callback) {\r\n var self = this;\r\n var selectedValues = BI.deepClone(op.selectedValues);\r\n var notSelectedValue = op.notSelectedValue || {};\r\n var keyword = op.keyword || \"\";\r\n var parentValues = op.parentValues || [];\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n dealWithSelectedValues(selectedValues);\r\n callback(selectedValues);\r\n\r\n\r\n function dealWithSelectedValues(selectedValues) {\r\n var p = parentValues.concat(notSelectedValue);\r\n // 存储的值中存在这个值就把它删掉\r\n // 例如选中了中国-江苏-南京, 取消中国或江苏或南京\r\n // p长度不大于selectedValues的情况才可能找到,这样可以直接删除selectedValues的节点\r\n if (canFindKey(selectedValues, p)) {\r\n // 如果搜索的值在父亲链中\r\n if (isSearchValueInParent(p)) {\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消江苏(干掉了江苏)\r\n self._deleteNode(selectedValues, p);\r\n } else {\r\n var searched = [];\r\n // 要找到所有以notSelectedValue为叶子节点的链路\r\n var find = search(parentValues, notSelectedValue, [], searched);\r\n if (find && BI.isNotEmptyArray(searched)) {\r\n BI.each(searched, function (i, arr) {\r\n var node = self._getNode(selectedValues, arr);\r\n if (node) {\r\n // 例如选中了 中国-江苏, 搜索江苏, 取消中国(实际上只想删除中国-江苏,因为搜的是江苏)\r\n // 例如选中了 中国-江苏-南京,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)\r\n self._deleteNode(selectedValues, arr);\r\n } else {\r\n // 例如选中了 中国-江苏,搜索南京,取消中国(实际上只想删除中国-江苏-南京,因为搜的是南京)\r\n expandSelectedValue(selectedValues, arr, BI.last(arr));\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n // 存储的值中不存在这个值,但父亲节点是全选的情况\r\n // 例如选中了中国-江苏,取消南京\r\n // important 选中了中国-江苏,取消了江苏,但是搜索的是南京\r\n if (isChild(selectedValues, p)) {\r\n var result = [], find = false;\r\n // 如果parentValues中有匹配的值,说明搜索结果不在当前值下\r\n if (isSearchValueInParent(p)) {\r\n find = true;\r\n } else {\r\n // 从当前值开始搜\r\n find = search(parentValues, notSelectedValue, result);\r\n p = parentValues;\r\n }\r\n\r\n if (find === true) {\r\n // 去掉点击的节点之后的结果集\r\n expandSelectedValue(selectedValues, p, notSelectedValue);\r\n // 添加去掉搜索的结果集\r\n if (result.length > 0) {\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(selectedValues, strs);\r\n });\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n function expandSelectedValue(selectedValues, parents, notSelectedValue) {\r\n var next = selectedValues;\r\n var childrenCount = [];\r\n var path = [];\r\n // 去掉点击的节点之后的结果集\r\n BI.some(parents, function (i, v) {\r\n var t = next[v];\r\n if (t == null) {\r\n if (i === 0) {\r\n return true;\r\n }\r\n if (BI.isEmpty(next)) {\r\n var split = parents.slice(0, i);\r\n var expanded = self._getChildren(split);\r\n path.push(split);\r\n childrenCount.push(expanded.length);\r\n // 如果只有一个值且取消的就是这个值\r\n if (i === parents.length - 1 && expanded.length === 1 && expanded[0].value === notSelectedValue) {\r\n for (var j = childrenCount.length - 1; j >= 0; j--) {\r\n if (childrenCount[j] === 1) {\r\n self._deleteNode(selectedValues, path[j]);\r\n } else {\r\n break;\r\n }\r\n }\r\n } else {\r\n BI.each(expanded, function (m, child) {\r\n if (i === parents.length - 1 && child.value === notSelectedValue) {\r\n return true;\r\n }\r\n next[child.value] = {};\r\n });\r\n }\r\n next = next[v];\r\n } else {\r\n return true;\r\n // next = {};\r\n // next[v] = {};\r\n }\r\n } else {\r\n next = t;\r\n }\r\n });\r\n }\r\n\r\n function search(parents, current, result, searched) {\r\n var newParents = BI.clone(parents);\r\n newParents.push(current);\r\n if (self._isMatch(parents, current, keyword)) {\r\n searched && searched.push(newParents);\r\n return true;\r\n }\r\n\r\n var children = self._getChildren(newParents);\r\n\r\n var notSearch = [];\r\n var can = false;\r\n\r\n BI.each(children, function (i, child) {\r\n if (search(newParents, child.value, result, searched)) {\r\n can = true;\r\n } else {\r\n notSearch.push(child.value);\r\n }\r\n });\r\n if (can === true) {\r\n BI.each(notSearch, function (i, v) {\r\n var next = BI.clone(newParents);\r\n next.push(v);\r\n result.push(next);\r\n });\r\n }\r\n return can;\r\n }\r\n\r\n function isSearchValueInParent(parentValues) {\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (self._isMatch(parentValues.slice(0, i), parentValues[i], keyword)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function canFindKey(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n t = t[v];\r\n if (t == null) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n function isChild(selectedValues, parents) {\r\n var t = selectedValues;\r\n for (var i = 0; i < parents.length; i++) {\r\n var v = parents[i];\r\n if (!BI.has(t, v)) {\r\n return false;\r\n }\r\n t = t[v];\r\n if (BI.isEmpty(t)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n },\r\n\r\n _reqAdjustTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var selectedValues = op.selectedValues;\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n BI.each(selectedValues, function (k, v) {\r\n result.push([k]);\r\n });\r\n\r\n dealWithSelectedValues(selectedValues, []);\r\n\r\n var jo = {};\r\n BI.each(result, function (i, strs) {\r\n self._buildTree(jo, strs);\r\n });\r\n callback(jo);\r\n\r\n function dealWithSelectedValues(selected, parents) {\r\n if (selected == null || BI.isEmpty(selected)) {\r\n return true;\r\n }\r\n var can = true;\r\n BI.each(selected, function (k, v) {\r\n var p = BI.clone(parents);\r\n p.push(k);\r\n if (!dealWithSelectedValues(selected[k], p)) {\r\n BI.each(selected[k], function (nk, nv) {\r\n var t = BI.clone(p);\r\n t.push(nk);\r\n result.push(t);\r\n });\r\n can = false;\r\n }\r\n });\r\n return can && isAllSelected(selected, parents);\r\n }\r\n\r\n function isAllSelected(selected, parents) {\r\n return BI.isEmpty(selected) || self._getChildCount(parents) === BI.size(selected);\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, false, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, isAllSelect, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isAllSelect || isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, !isAllSelect && isHalf(parentValues, current), true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n var isCurAllSelected = isAllSelect || isAllSelected(parentValues, current);\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, isCurAllSelected, result);\r\n // 当前节点的子节点是否选中,并不确定全选还是半选\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n // 当前节点的子节点要不要加入到结果集中\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n // 子节点匹配, 补充父节点\r\n if (can === true) {\r\n checked = isCurAllSelected || (isSelected(parentValues, current) && checked);\r\n createOneJson(parentValues, current, true, checked, false, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, half, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: half,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return false;\r\n }\r\n return BI.any(find, function (v) {\r\n if (v === value) {\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var checkState = op.checkState || {};\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || {};\r\n var valueMap = {};\r\n // if (judgeState(parentValues, selectedValues, checkState)) {\r\n valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n // }\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var state = getCheckState(nodes[i].value, parentValues, valueMap, checkState);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);\r\n // REPORT-24409 fix: 设置节点全部展开,添加的节点没有给状态\r\n var parentCheckState = {};\r\n var find = BI.find(result, function (idx, pNode) {\r\n return pNode.id === node.pId;\r\n });\r\n if (find) {\r\n parentCheckState.checked = find.halfCheck ? false : find.checked;\r\n parentCheckState.half = find.halfCheck;\r\n }\r\n var state = getCheckState(node.value, node.parentValues, valueMap, parentCheckState);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: state[0],\r\n halfCheck: state[1],\r\n open: self.options.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function judgeState(parentValues, selected_value, checkState) {\r\n var checked = checkState.checked, half = checkState.half;\r\n if (parentValues.length > 0 && !checked) {\r\n return false;\r\n }\r\n return (parentValues.length === 0 || (checked && half) && !BI.isEmpty(selected_value));\r\n }\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(parentValues, function (i, v) {\r\n selectedValues = selectedValues[v] || {};\r\n });\r\n BI.each(selectedValues, function (value, obj) {\r\n if (BI.isNull(obj)) {\r\n valueMap[value] = [0, 0];\r\n return;\r\n }\r\n if (BI.isEmpty(obj)) {\r\n valueMap[value] = [2, 0];\r\n return;\r\n }\r\n var nextNames = {};\r\n BI.each(obj, function (t, o) {\r\n if (BI.isNull(o) || BI.isEmpty(o)) {\r\n nextNames[t] = true;\r\n }\r\n });\r\n // valueMap的数组第一个参数为不选: 0, 半选: 1, 全选:2, 第二个参数为改节点下选中的子节点个数(子节点全选或者不存在)\r\n valueMap[value] = [1, BI.size(nextNames)];\r\n });\r\n return valueMap;\r\n }\r\n\r\n function getCheckState(current, parentValues, valueMap, checkState) {\r\n // 节点本身的checked和half优先级最高\r\n var checked = checkState.checked, half = checkState.half;\r\n var tempCheck = false, halfCheck = false;\r\n if (BI.has(valueMap, current)) {\r\n // 可能是半选\r\n if (valueMap[current][0] === 1) {\r\n var values = BI.clone(parentValues);\r\n values.push(current);\r\n var childCount = self._getChildCount(values);\r\n if (childCount > 0 && childCount !== valueMap[current][1]) {\r\n halfCheck = true;\r\n }\r\n } else if (valueMap[current][0] === 2) {\r\n tempCheck = true;\r\n }\r\n }\r\n var check;\r\n // 展开的节点checked为false 且没有明确得出当前子节点是半选或者全选, 则check状态取决于valueMap\r\n if (!checked && !halfCheck && !tempCheck) {\r\n check = BI.has(valueMap, current);\r\n } else {\r\n // 不是上面那种情况就先看在节点没有带有明确半选的时候,通过节点自身的checked和valueMap的状态能都得到选中信息\r\n check = ((tempCheck || checked) && !half) || BI.has(valueMap, current);\r\n }\r\n return [check, halfCheck];\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n return BI.map(BI.difference(BI.keys(selectedValues), BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n },\r\n\r\n _getNode: function (selectedValues, parentValues) {\r\n var pNode = selectedValues;\r\n for (var i = 0, len = parentValues.length; i < len; i++) {\r\n if (pNode == null) {\r\n return null;\r\n }\r\n pNode = pNode[parentValues[i]];\r\n }\r\n return pNode;\r\n },\r\n\r\n _deleteNode: function (selectedValues, values) {\r\n var name = values[values.length - 1];\r\n var p = values.slice(0, values.length - 1);\r\n var pNode = this._getNode(selectedValues, p);\r\n if (pNode != null && pNode[name]) {\r\n delete pNode[name];\r\n // 递归删掉空父节点\r\n while (p.length > 0 && BI.isEmpty(pNode)) {\r\n name = p[p.length - 1];\r\n p = p.slice(0, p.length - 1);\r\n pNode = this._getNode(selectedValues, p);\r\n if (pNode != null) {\r\n delete pNode[name];\r\n }\r\n }\r\n }\r\n },\r\n\r\n _buildTree: function (jo, values) {\r\n var t = jo;\r\n BI.each(values, function (i, v) {\r\n if (!BI.has(t, v)) {\r\n t[v] = {};\r\n }\r\n t = t[v];\r\n });\r\n },\r\n\r\n _isMatch: function (parentValues, value, keyword) {\r\n var o = this.options;\r\n var node = this._getTreeNode(parentValues, value);\r\n if (!node) {\r\n return false;\r\n }\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n if(o.allowSearchValue && node.value) {\r\n var valueFind = BI.Func.getSearchResult([node.value], keyword);\r\n return valueFind.find.length > 0 || valueFind.match.length > 0 ||\r\n find.find.length > 0 || find.match.length > 0;\r\n }\r\n return find.find.length > 0 || find.match.length > 0;\r\n },\r\n\r\n _getTreeNode: function (parentValues, v) {\r\n var self = this;\r\n var findParentNode;\r\n var index = 0;\r\n this.tree.traverse(function (node) {\r\n if (self.tree.isRoot(node)) {\r\n return;\r\n }\r\n if (index > parentValues.length) {\r\n return false;\r\n }\r\n if (index === parentValues.length && node.value === v) {\r\n findParentNode = node;\r\n return false;\r\n }\r\n if (node.value === parentValues[index]) {\r\n index++;\r\n return;\r\n }\r\n return true;\r\n });\r\n return findParentNode;\r\n },\r\n\r\n _getChildren: function (parentValues) {\r\n if (parentValues.length > 0) {\r\n var value = BI.last(parentValues);\r\n var parent = this._getTreeNode(parentValues.slice(0, parentValues.length - 1), value);\r\n } else {\r\n var parent = this.tree.getRoot();\r\n }\r\n return parent.getChildren();\r\n },\r\n\r\n _getAllChildren: function(parentValues) {\r\n var children = this._getChildren(parentValues);\r\n var nodes = [].concat(children);\r\n BI.each(nodes, function (idx, node) {\r\n node.parentValues = parentValues;\r\n });\r\n var queue = BI.map(children, function (idx, node) {\r\n return {\r\n parentValues: parentValues,\r\n value: node.value\r\n };\r\n });\r\n while (BI.isNotEmptyArray(queue)) {\r\n var node = queue.shift();\r\n var pValues = (node.parentValues).concat(node.value);\r\n var childNodes = this._getChildren(pValues);\r\n BI.each(childNodes, function (idx, node) {\r\n node.parentValues = pValues;\r\n });\r\n queue = queue.concat(childNodes);\r\n nodes = nodes.concat(childNodes);\r\n }\r\n return nodes;\r\n },\r\n\r\n _getChildCount: function (parentValues) {\r\n return this._getChildren(parentValues).length;\r\n }\r\n});BI.AbstractListTreeValueChooser = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _reqDisplayTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = {};\r\n var selectedValues = op.selectedValues;\r\n\r\n if (selectedValues == null || BI.isEmpty(selectedValues)) {\r\n callback({});\r\n return;\r\n }\r\n\r\n doCheck([], this.tree.getRoot(), selectedValues);\r\n\r\n callback({\r\n items: BI.values(result)\r\n });\r\n\r\n function doCheck(parentValues, node, selected) {\r\n BI.each(selected, function (idx, path) {\r\n BI.each(path, function (id, value) {\r\n var nodeValue = value;\r\n var node = self._getTreeNode(path.slice(0, id), nodeValue);\r\n // 找不到就是新增值\r\n if (BI.isNull(node)) {\r\n createOneJson({\r\n id: BI.UUID(),\r\n text: nodeValue,\r\n value: nodeValue,\r\n isLeaf: true\r\n }, BI.UUID());\r\n } else {\r\n if(!BI.has(result, node.id)) {\r\n createOneJson(node, node.parent && node.parent.id);\r\n }\r\n result[node.id].isLeaf !== true && (result[node.id].isLeaf = id === path.length - 1);\r\n }\r\n });\r\n });\r\n }\r\n\r\n function createOneJson(node, pId) {\r\n result[node.id] = {\r\n id: node.id,\r\n pId: pId,\r\n text: node.text,\r\n value: node.value,\r\n open: true,\r\n isLeaf: node.isLeaf\r\n };\r\n }\r\n },\r\n\r\n _reqInitTreeNode: function (op, callback) {\r\n var self = this;\r\n var result = [];\r\n var keyword = op.keyword || \"\";\r\n var selectedValues = op.selectedValues;\r\n var lastSearchValue = op.lastSearchValue || \"\"; // 一次请求100个,但是搜索是拿全部的,lastSearchValue是上一次遍历到的节点索引\r\n var output = search();\r\n BI.nextTick(function () {\r\n callback({\r\n hasNext: output.length > self._const.perPage,\r\n items: result,\r\n lastSearchValue: BI.last(output)\r\n });\r\n });\r\n\r\n function search() {\r\n var children = self._getChildren([]);\r\n var start = children.length;\r\n if (lastSearchValue !== \"\") {\r\n for (var j = 0, len = start; j < len; j++) {\r\n if (children[j].value === lastSearchValue) {\r\n start = j + 1;\r\n break;\r\n }\r\n }\r\n } else {\r\n start = 0;\r\n }\r\n var output = [];\r\n for (var i = start, len = children.length; i < len; i++) {\r\n if (output.length < self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, result);\r\n } else if (output.length === self._const.perPage) {\r\n var find = nodeSearch(1, [], children[i].value, []);\r\n }\r\n if (find[0] === true) {\r\n output.push(children[i].value);\r\n }\r\n if (output.length > self._const.perPage) {\r\n break;\r\n }\r\n }\r\n\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (op.times === 1) {\r\n var nodes = self._getAddedValueNode([], selectedValues);\r\n result = BI.concat(BI.filter(nodes, function (idx, node) {\r\n var find = BI.Func.getSearchResult([node.text || node.value], keyword);\r\n return find.find.length > 0 || find.match.length > 0;\r\n }), result);\r\n }\r\n return output;\r\n }\r\n\r\n function nodeSearch(deep, parentValues, current, result) {\r\n if (self._isMatch(parentValues, current, keyword)) {\r\n var checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, false, checked, true, result);\r\n return [true, checked];\r\n }\r\n var newParents = BI.clone(parentValues);\r\n newParents.push(current);\r\n var children = self._getChildren(newParents);\r\n\r\n var can = false, checked = false;\r\n\r\n BI.each(children, function (i, child) {\r\n var state = nodeSearch(deep + 1, newParents, child.value, result);\r\n if (state[1] === true) {\r\n checked = true;\r\n }\r\n if (state[0] === true) {\r\n can = true;\r\n }\r\n });\r\n if (can === true) {\r\n checked = isSelected(parentValues, current);\r\n createOneJson(parentValues, current, true, checked, false, result);\r\n }\r\n return [can, checked];\r\n }\r\n\r\n function createOneJson(parentValues, value, isOpen, checked, flag, result) {\r\n var node = self._getTreeNode(parentValues, value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n text: node.text,\r\n value: node.value,\r\n title: node.title,\r\n isParent: node.getChildrenLength() > 0,\r\n open: isOpen,\r\n checked: checked,\r\n halfCheck: false,\r\n flag: flag\r\n });\r\n }\r\n\r\n function isHalf(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && !BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isAllSelected(parentValues, value) {\r\n var find = findSelectedObj(parentValues);\r\n if (find == null) {\r\n return null;\r\n }\r\n return BI.any(find, function (v, ob) {\r\n if (v === value) {\r\n if (ob != null && BI.isEmpty(ob)) {\r\n return true;\r\n }\r\n }\r\n });\r\n }\r\n\r\n function isSelected(parentValues, value) {\r\n return BI.any(selectedValues, function (idx, array) {\r\n return BI.isEqual(parentValues, array.slice(0, parentValues.length)) && BI.last(array) === value;\r\n });\r\n }\r\n\r\n function findSelectedObj(parentValues) {\r\n var find = selectedValues;\r\n if (find == null) {\r\n return null;\r\n }\r\n BI.every(parentValues, function (i, v) {\r\n find = find[v];\r\n if (find == null) {\r\n return false;\r\n }\r\n return true;\r\n });\r\n return find;\r\n }\r\n },\r\n\r\n _reqTreeNode: function (op, callback) {\r\n var self = this, o = this.options;\r\n var result = [];\r\n var times = op.times;\r\n var parentValues = op.parentValues || [];\r\n var selectedValues = op.selectedValues || [];\r\n var valueMap = dealWithSelectedValue(parentValues, selectedValues);\r\n var nodes = this._getChildren(parentValues);\r\n for (var i = (times - 1) * this._const.perPage; nodes[i] && i < times * this._const.perPage; i++) {\r\n var checked = BI.has(valueMap, nodes[i].value);\r\n result.push({\r\n id: nodes[i].id,\r\n pId: nodes[i].pId,\r\n value: nodes[i].value,\r\n text: nodes[i].text,\r\n times: 1,\r\n isParent: nodes[i].getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n }\r\n // 如果指定节点全部打开\r\n if (o.open) {\r\n var allNodes = [];\r\n // 获取所有节点\r\n BI.each(nodes, function (idx, node) {\r\n allNodes = BI.concat(allNodes, self._getAllChildren(parentValues.concat([node.value])));\r\n });\r\n BI.each(allNodes, function (idx, node) {\r\n var valueMap = dealWithSelectedValue(node.parentValues, selectedValues);\r\n var checked = BI.has(valueMap, node.value);\r\n result.push({\r\n id: node.id,\r\n pId: node.pId,\r\n value: node.value,\r\n text: node.text,\r\n times: 1,\r\n isParent: node.getChildrenLength() > 0,\r\n checked: checked,\r\n halfCheck: false,\r\n open: o.open\r\n });\r\n });\r\n }\r\n // 深层嵌套的比较麻烦,这边先实现的是在根节点添加\r\n if (parentValues.length === 0 && times === 1) {\r\n result = BI.concat(self._getAddedValueNode(parentValues, selectedValues), result);\r\n }\r\n BI.nextTick(function () {\r\n callback({\r\n items: result,\r\n hasNext: nodes.length > times * self._const.perPage\r\n });\r\n });\r\n\r\n function dealWithSelectedValue(parentValues, selectedValues) {\r\n var valueMap = {};\r\n BI.each(selectedValues, function (idx, v) {\r\n if (BI.isEqual(parentValues, v.slice(0, parentValues.length))) {\r\n valueMap[BI.last(v)] = [2, 0];\r\n }\r\n });\r\n return valueMap;\r\n }\r\n },\r\n\r\n _getAddedValueNode: function (parentValues, selectedValues) {\r\n var nodes = this._getChildren(parentValues);\r\n var values = BI.flatten(BI.filter(selectedValues, function (idx, array) {\r\n return array.length === 1;\r\n }));\r\n return BI.map(BI.difference(values, BI.map(nodes, \"value\")), function (idx, v) {\r\n return {\r\n id: BI.UUID(),\r\n pId: nodes.length > 0 ? nodes[0].pId : BI.UUID(),\r\n value: v,\r\n text: v,\r\n times: 1,\r\n isParent: false,\r\n checked: true,\r\n halfCheck: false\r\n };\r\n });\r\n }\r\n});/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ListTreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ListTreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-list-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ListTreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_list_combo\",\r\n element: this,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n allowInsertValue: o.allowInsertValue,\r\n allowEdit: o.allowEdit,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeListCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CLICK_ITEM,\r\n action: function (v) {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM, v);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeListCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.ListTreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.ListTreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.list_tree_value_chooser_insert_combo\", BI.ListTreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况, 可以自增值\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserInsertCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_insert_combo\",\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeInsertCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM,\r\n action: function (v) {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM, v);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeInsertCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.TreeValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TreeValueChooserInsertCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.shortcut(\"bi.tree_value_chooser_insert_combo\", BI.TreeValueChooserInsertCombo);/**\r\n * 简单的复选下拉树控件, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_tree_combo\",\r\n text: o.text,\r\n allowEdit: o.allowEdit,\r\n value: o.value,\r\n watermark: o.watermark,\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiTreeCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CLICK_ITEM,\r\n action: function (v) {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CLICK_ITEM, v);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }, {\r\n eventName: BI.MultiTreeCombo.EVENT_BEFORE_POPUPVIEW,\r\n action: function () {\r\n self.fireEvent(BI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.combo.getValue();\r\n },\r\n\r\n populate: function (items) {\r\n this._initData(items);\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.TreeValueChooserCombo.EVENT_BEFORE_POPUPVIEW = \"EVENT_BEFORE_POPUPVIEW\";\r\nBI.TreeValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.TreeValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.TreeValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.TreeValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.TreeValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.TreeValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.shortcut(\"bi.tree_value_chooser_combo\", BI.TreeValueChooserCombo);/**\r\n * 简单的树面板, 适用于数据量少的情况\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.TreeValueChooserPane\r\n * @extends BI.AbstractTreeValueChooser\r\n */\r\nBI.TreeValueChooserPane = BI.inherit(BI.AbstractTreeValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.TreeValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-tree-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.TreeValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.pane = BI.createWidget({\r\n type: \"bi.multi_select_tree\",\r\n element: this,\r\n itemsCreator: BI.bind(this._itemsCreator, this)\r\n });\r\n\r\n this.pane.on(BI.MultiSelectTree.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.TreeValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this._initData(o.items);\r\n this.populate();\r\n }\r\n },\r\n\r\n setSelectedValue: function (v) {\r\n this.pane.setSelectedValue(v);\r\n },\r\n\r\n setValue: function (v) {\r\n this.pane.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n return this.pane.getValue();\r\n },\r\n\r\n populate: function () {\r\n this.pane.populate.apply(this.pane, arguments);\r\n }\r\n});\r\nBI.TreeValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.tree_value_chooser_pane\", BI.TreeValueChooserPane);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.AbstractValueChooser\r\n * @extends BI.Widget\r\n */\r\nBI.AbstractValueChooser = BI.inherit(BI.Widget, {\r\n\r\n _const: {\r\n perPage: 100\r\n },\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.AbstractValueChooser.superclass._defaultConfig.apply(this, arguments), {\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _valueFormatter: function (v) {\r\n var text = v;\r\n if (BI.isNotNull(this.items)) {\r\n BI.some(this.items, function (i, item) {\r\n // 把value都换成字符串\r\n if (item.value === v || item.value + \"\" === v) {\r\n text = item.text;\r\n return true;\r\n }\r\n });\r\n }\r\n return text;\r\n },\r\n\r\n _getItemsByTimes: function (items, times) {\r\n var res = [];\r\n for (var i = (times - 1) * this._const.perPage; items[i] && i < times * this._const.perPage; i++) {\r\n res.push(items[i]);\r\n }\r\n return res;\r\n },\r\n\r\n _hasNextByTimes: function (items, times) {\r\n return times * this._const.perPage < items.length;\r\n },\r\n\r\n _itemsCreator: function (options, callback) {\r\n var self = this, o = this.options;\r\n if (!o.cache || !this.items) {\r\n o.itemsCreator({}, function (items) {\r\n self.items = items;\r\n call(items);\r\n });\r\n } else {\r\n call(this.items);\r\n }\r\n function call (items) {\r\n var keywords = (options.keywords || []).slice();\r\n var resultItems = items;\r\n if(BI.isNotEmptyArray(keywords)) {\r\n resultItems = [];\r\n BI.each(keywords, function (i, kw) {\r\n var search = BI.Func.getSearchResult(items, kw);\r\n resultItems = resultItems.concat(search.match).concat(search.find);\r\n });\r\n resultItems = BI.uniq(resultItems);\r\n }\r\n if (options.selectedValues) {// 过滤\r\n var filter = BI.makeObject(options.selectedValues, true);\r\n resultItems = BI.filter(resultItems, function (i, ob) {\r\n return !filter[ob.value];\r\n });\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_ALL_DATA) {\r\n callback({\r\n items: resultItems\r\n });\r\n return;\r\n }\r\n if (options.type === BI.MultiSelectCombo.REQ_GET_DATA_LENGTH) {\r\n callback({count: resultItems.length});\r\n return;\r\n }\r\n callback({\r\n items: self._getItemsByTimes(resultItems, options.times),\r\n hasNext: self._hasNextByTimes(resultItems, options.times)\r\n });\r\n }\r\n }\r\n});/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n */\r\nBI.ValueChooserInsertCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserInsertCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-insert-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserInsertCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_insert_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserInsertCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserInsertCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserInsertCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserInsertCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserInsertCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserInsertCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserInsertCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_insert_combo\", BI.ValueChooserInsertCombo);/**\r\n * 简单的复选下拉框控件, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserCombo\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserCombo = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserCombo.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-combo\",\r\n width: 200,\r\n height: 24,\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserCombo.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n }\r\n this.combo = BI.createWidget({\r\n type: \"bi.multi_select_combo\",\r\n element: this,\r\n allowEdit: o.allowEdit,\r\n text: o.text,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this),\r\n width: o.width,\r\n height: o.height,\r\n listeners: [{\r\n eventName: BI.MultiSelectCombo.EVENT_FOCUS,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_FOCUS);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_BLUR,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_BLUR);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_STOP,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_STOP);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CLICK_ITEM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CLICK_ITEM);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_SEARCHING,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_SEARCHING);\r\n }\r\n }, {\r\n eventName: BI.MultiSelectCombo.EVENT_CONFIRM,\r\n action: function () {\r\n self.fireEvent(BI.ValueChooserCombo.EVENT_CONFIRM);\r\n }\r\n }]\r\n });\r\n },\r\n\r\n setValue: function (v) {\r\n this.combo.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.combo.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n this.items = items;\r\n this.combo.populate.apply(this.combo, arguments);\r\n }\r\n});\r\n\r\nBI.ValueChooserCombo.EVENT_BLUR = \"EVENT_BLUR\";\r\nBI.ValueChooserCombo.EVENT_FOCUS = \"EVENT_FOCUS\";\r\nBI.ValueChooserCombo.EVENT_STOP = \"EVENT_STOP\";\r\nBI.ValueChooserCombo.EVENT_SEARCHING = \"EVENT_SEARCHING\";\r\nBI.ValueChooserCombo.EVENT_CLICK_ITEM = \"EVENT_CLICK_ITEM\";\r\nBI.ValueChooserCombo.EVENT_CONFIRM = \"EVENT_CONFIRM\";\r\nBI.shortcut(\"bi.value_chooser_combo\", BI.ValueChooserCombo);/**\r\n * 简单的复选面板, 适用于数据量少的情况\r\n * 封装了字段处理逻辑\r\n *\r\n * Created by GUY on 2015/10/29.\r\n * @class BI.ValueChooserPane\r\n * @extends BI.Widget\r\n */\r\nBI.ValueChooserPane = BI.inherit(BI.AbstractValueChooser, {\r\n\r\n _defaultConfig: function () {\r\n return BI.extend(BI.ValueChooserPane.superclass._defaultConfig.apply(this, arguments), {\r\n baseCls: \"bi-value-chooser-pane\",\r\n items: null,\r\n itemsCreator: BI.emptyFn,\r\n cache: true\r\n });\r\n },\r\n\r\n _init: function () {\r\n BI.ValueChooserPane.superclass._init.apply(this, arguments);\r\n var self = this, o = this.options;\r\n this.list = BI.createWidget({\r\n type: \"bi.multi_select_list\",\r\n element: this,\r\n value: o.value,\r\n itemsCreator: BI.bind(this._itemsCreator, this),\r\n valueFormatter: BI.bind(this._valueFormatter, this)\r\n });\r\n\r\n this.list.on(BI.MultiSelectList.EVENT_CHANGE, function () {\r\n self.fireEvent(BI.ValueChooserPane.EVENT_CHANGE);\r\n });\r\n if (BI.isNotNull(o.items)) {\r\n this.items = o.items;\r\n this.list.populate();\r\n }\r\n },\r\n\r\n setValue: function (v) {\r\n this.list.setValue(v);\r\n },\r\n\r\n getValue: function () {\r\n var val = this.list.getValue() || {};\r\n return {\r\n type: val.type,\r\n value: val.value\r\n };\r\n },\r\n\r\n populate: function (items) {\r\n // 直接用combo的populate不会作用到AbstractValueChooser上\r\n items && (this.items = items);\r\n this.list.populate.apply(this.list, arguments);\r\n }\r\n});\r\nBI.ValueChooserPane.EVENT_CHANGE = \"EVENT_CHANGE\";\r\nBI.shortcut(\"bi.value_chooser_pane\", BI.ValueChooserPane);(function () {\r\n var Events = {\r\n\r\n // Bind an event to a `callback` function. Passing `\"all\"` will bind\r\n // the callback to all events fired.\r\n on: function (name, callback, context) {\r\n if (!eventsApi(this, \"on\", name, [callback, context]) || !callback) return this;\r\n this._events || (this._events = {});\r\n var events = this._events[name] || (this._events[name] = []);\r\n events.push({callback: callback, context: context, ctx: context || this});\r\n return this;\r\n },\r\n\r\n // Bind an event to only be triggered a single time. After the first time\r\n // the callback is invoked, it will be removed.\r\n once: function (name, callback, context) {\r\n if (!eventsApi(this, \"once\", name, [callback, context]) || !callback) return this;\r\n var self = this;\r\n var once = _.once(function () {\r\n self.off(name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.on(name, once, context);\r\n },\r\n\r\n // Remove one or many callbacks. If `context` is null, removes all\r\n // callbacks with that function. If `callback` is null, removes all\r\n // callbacks for the event. If `name` is null, removes all bound\r\n // callbacks for all events.\r\n off: function (name, callback, context) {\r\n if (!this._events || !eventsApi(this, \"off\", name, [callback, context])) return this;\r\n\r\n // Remove all callbacks for all events.\r\n if (!name && !callback && !context) {\r\n this._events = void 0;\r\n return this;\r\n }\r\n\r\n var names = name ? [name] : _.keys(this._events);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n name = names[i];\r\n\r\n // Bail out if there are no events stored.\r\n var events = this._events[name];\r\n if (!events) continue;\r\n\r\n // Remove all callbacks for this event.\r\n if (!callback && !context) {\r\n delete this._events[name];\r\n continue;\r\n }\r\n\r\n // Find any remaining events.\r\n var remaining = [];\r\n for (var j = 0, k = events.length; j < k; j++) {\r\n var event = events[j];\r\n if (\r\n callback && callback !== event.callback &&\r\n callback !== event.callback._callback ||\r\n context && context !== event.context\r\n ) {\r\n remaining.push(event);\r\n }\r\n }\r\n\r\n // Replace events if there are any remaining. Otherwise, clean up.\r\n if (remaining.length) {\r\n this._events[name] = remaining;\r\n } else {\r\n delete this._events[name];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n un: function () {\r\n this.off.apply(this, arguments);\r\n },\r\n\r\n // Trigger one or many events, firing all bound callbacks. Callbacks are\r\n // passed the same arguments as `trigger` is, apart from the event name\r\n // (unless you're listening on `\"all\"`, which will cause your callback to\r\n // receive the true name of the event as the first argument).\r\n trigger: function (name) {\r\n if (!this._events) return this;\r\n var args = slice.call(arguments, 1);\r\n if (!eventsApi(this, \"trigger\", name, args)) return this;\r\n var events = this._events[name];\r\n var allEvents = this._events.all;\r\n if (events) triggerEvents(events, args);\r\n if (allEvents) triggerEvents(allEvents, arguments);\r\n return this;\r\n },\r\n\r\n fireEvent: function () {\r\n this.trigger.apply(this, arguments);\r\n },\r\n\r\n // Inversion-of-control versions of `on` and `once`. Tell *this* object to\r\n // listen to an event in another object ... keeping track of what it's\r\n // listening to.\r\n listenTo: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo || (this._listeningTo = {});\r\n var id = obj._listenId || (obj._listenId = _.uniqueId(\"l\"));\r\n listeningTo[id] = obj;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n obj.on(name, callback, this);\r\n return this;\r\n },\r\n\r\n listenToOnce: function (obj, name, callback) {\r\n if (typeof name === \"object\") {\r\n for (var event in name) this.listenToOnce(obj, event, name[event]);\r\n return this;\r\n }\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n this.listenToOnce(obj, names[i], callback);\r\n }\r\n return this;\r\n }\r\n if (!callback) return this;\r\n var once = _.once(function () {\r\n this.stopListening(obj, name, once);\r\n callback.apply(this, arguments);\r\n });\r\n once._callback = callback;\r\n return this.listenTo(obj, name, once);\r\n },\r\n\r\n // Tell this object to stop listening to either specific events ... or\r\n // to every object it's currently listening to.\r\n stopListening: function (obj, name, callback) {\r\n var listeningTo = this._listeningTo;\r\n if (!listeningTo) return this;\r\n var remove = !name && !callback;\r\n if (!callback && typeof name === \"object\") callback = this;\r\n if (obj) (listeningTo = {})[obj._listenId] = obj;\r\n for (var id in listeningTo) {\r\n obj = listeningTo[id];\r\n obj.off(name, callback, this);\r\n if (remove || _.isEmpty(obj._events)) delete this._listeningTo[id];\r\n }\r\n return this;\r\n }\r\n\r\n };\r\n\r\n // Regular expression used to split event strings.\r\n var eventSplitter = /\\s+/;\r\n\r\n // Implement fancy features of the Events API such as multiple event\r\n // names `\"change blur\"` and jQuery-style event maps `{change: action}`\r\n // in terms of the existing API.\r\n var eventsApi = function (obj, action, name, rest) {\r\n if (!name) return true;\r\n\r\n // Handle event maps.\r\n if (typeof name === \"object\") {\r\n for (var key in name) {\r\n obj[action].apply(obj, [key, name[key]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n // Handle space separated event names.\r\n if (eventSplitter.test(name)) {\r\n var names = name.split(eventSplitter);\r\n for (var i = 0, length = names.length; i < length; i++) {\r\n obj[action].apply(obj, [names[i]].concat(rest));\r\n }\r\n return false;\r\n }\r\n\r\n return true;\r\n };\r\n\r\n // A difficult-to-believe, but optimized internal dispatch function for\r\n // triggering events. Tries to keep the usual cases speedy (most internal\r\n // BI events have 3 arguments).\r\n var triggerEvents = function (events, args) {\r\n var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];\r\n switch (args.length) {\r\n case 0:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx);\r\n return;\r\n case 1:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1);\r\n return;\r\n case 2:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2);\r\n return;\r\n case 3:\r\n while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3);\r\n return;\r\n default:\r\n while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);\r\n return;\r\n }\r\n };\r\n\r\n // BI.Router\r\n // ---------------\r\n\r\n // Routers map faux-URLs to actions, and fire events when routes are\r\n // matched. Creating a new one sets its `routes` hash, if not set statically.\r\n var Router = BI.Router = function (options) {\r\n options || (options = {});\r\n if (options.routes) this.routes = options.routes;\r\n this._bindRoutes();\r\n this._init.apply(this, arguments);\r\n };\r\n\r\n // Cached regular expressions for matching named param parts and splatted\r\n // parts of route strings.\r\n var optionalParam = /\\((.*?)\\)/g;\r\n var namedParam = /(\\(\\?)?:\\w+/g;\r\n var splatParam = /\\*\\w+/g;\r\n var escapeRegExp = /[\\-{}\\[\\]+?.,\\\\\\^$|#\\s]/g;\r\n\r\n // Set up all inheritable **BI.Router** properties and methods.\r\n _.extend(Router.prototype, Events, {\r\n\r\n // _init is an empty function by default. Override it with your own\r\n // initialization logic.\r\n _init: function () {\r\n },\r\n\r\n // Manually bind a single named route to a callback. For example:\r\n //\r\n // this.route('search/:query/p:num', 'search', function(query, num) {\r\n // ...\r\n // });\r\n //\r\n route: function (route, name, callback) {\r\n if (!_.isRegExp(route)) route = this._routeToRegExp(route);\r\n if (_.isFunction(name)) {\r\n callback = name;\r\n name = \"\";\r\n }\r\n if (!callback) callback = this[name];\r\n var router = this;\r\n BI.history.route(route, function (fragment) {\r\n var args = router._extractParameters(route, fragment);\r\n if (router.execute(callback, args, name) !== false) {\r\n router.trigger.apply(router, [\"route:\" + name].concat(args));\r\n router.trigger(\"route\", name, args);\r\n BI.history.trigger(\"route\", router, name, args);\r\n }\r\n });\r\n return this;\r\n },\r\n\r\n // Execute a route handler with the provided parameters. This is an\r\n // excellent place to do pre-route setup or post-route cleanup.\r\n execute: function (callback, args, name) {\r\n if (callback) callback.apply(this, args);\r\n },\r\n\r\n // Simple proxy to `BI.history` to save a fragment into the history.\r\n navigate: function (fragment, options) {\r\n BI.history.navigate(fragment, options);\r\n return this;\r\n },\r\n\r\n // Bind all defined routes to `BI.history`. We have to reverse the\r\n // order of the routes here to support behavior where the most general\r\n // routes can be defined at the bottom of the route map.\r\n _bindRoutes: function () {\r\n if (!this.routes) return;\r\n this.routes = _.result(this, \"routes\");\r\n var route, routes = _.keys(this.routes);\r\n while ((route = routes.pop()) != null) {\r\n this.route(route, this.routes[route]);\r\n }\r\n },\r\n\r\n // Convert a route string into a regular expression, suitable for matching\r\n // against the current location hash.\r\n _routeToRegExp: function (route) {\r\n route = route.replace(escapeRegExp, \"\\\\$&\")\r\n .replace(optionalParam, \"(?:$1)?\")\r\n .replace(namedParam, function (match, optional) {\r\n return optional ? match : \"([^/?]+)\";\r\n })\r\n .replace(splatParam, \"([^?]*?)\");\r\n return new RegExp(\"^\" + route + \"(?:\\\\?([\\\\s\\\\S]*))?$\");\r\n },\r\n\r\n // Given a route, and a URL fragment that it matches, return the array of\r\n // extracted decoded parameters. Empty or unmatched parameters will be\r\n // treated as `null` to normalize cross-browser behavior.\r\n _extractParameters: function (route, fragment) {\r\n var params = route.exec(fragment).slice(1);\r\n return _.map(params, function (param, i) {\r\n // Don't decode the search params.\r\n if (i === params.length - 1) return param || null;\r\n return param ? decodeURIComponent(param) : null;\r\n });\r\n }\r\n\r\n });\r\n\r\n // History\r\n // ----------------\r\n\r\n // Handles cross-browser history management, based on either\r\n // [pushState](http://diveintohtml5.info/history.html) and real URLs, or\r\n // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)\r\n // and URL fragments. If the browser supports neither (old IE, natch),\r\n // falls back to polling.\r\n var History = function () {\r\n this.handlers = [];\r\n this.checkUrl = _.bind(this.checkUrl, this);\r\n\r\n // Ensure that `History` can be used outside of the browser.\r\n if (typeof window !== \"undefined\") {\r\n this.location = _global.location;\r\n this.history = _global.history;\r\n }\r\n };\r\n\r\n // Cached regex for stripping a leading hash/slash and trailing space.\r\n var routeStripper = /^[#\\/]|\\s+$/g;\r\n\r\n // Cached regex for stripping leading and trailing slashes.\r\n var rootStripper = /^\\/+|\\/+$/g;\r\n\r\n // Cached regex for stripping urls of hash.\r\n var pathStripper = /#.*$/;\r\n\r\n // Has the history handling already been started?\r\n History.started = false;\r\n\r\n // Set up all inheritable **BI.History** properties and methods.\r\n _.extend(History.prototype, Events, {\r\n\r\n // The default interval to poll for hash changes, if necessary, is\r\n // twenty times a second.\r\n interval: 50,\r\n\r\n // Are we at the app root?\r\n atRoot: function () {\r\n var path = this.location.pathname.replace(/[^\\/]$/, \"$&/\");\r\n return path === this.root && !this.getSearch();\r\n },\r\n\r\n // In IE6, the hash fragment and search params are incorrect if the\r\n // fragment contains `?`.\r\n getSearch: function () {\r\n var match = this.location.href.replace(/#.*/, \"\").match(/\\?.+/);\r\n return match ? match[0] : \"\";\r\n },\r\n\r\n // Gets the true hash value. Cannot use location.hash directly due to bug\r\n // in Firefox where location.hash will always be decoded.\r\n getHash: function (window) {\r\n var match = (window || this).location.href.match(/#(.*)$/);\r\n return match ? match[1] : \"\";\r\n },\r\n\r\n // Get the pathname and search params, without the root.\r\n getPath: function () {\r\n var path = decodeURI(this.location.pathname + this.getSearch());\r\n var root = this.root.slice(0, -1);\r\n if (!path.indexOf(root)) path = path.slice(root.length);\r\n return path.charAt(0) === \"/\" ? path.slice(1) : path;\r\n },\r\n\r\n // Get the cross-browser normalized URL fragment from the path or hash.\r\n getFragment: function (fragment) {\r\n if (fragment == null) {\r\n if (this._hasPushState || !this._wantsHashChange) {\r\n fragment = this.getPath();\r\n } else {\r\n fragment = this.getHash();\r\n }\r\n }\r\n return fragment.replace(routeStripper, \"\");\r\n },\r\n\r\n // Start the hash change handling, returning `true` if the current URL matches\r\n // an existing route, and `false` otherwise.\r\n start: function (options) {\r\n if (History.started) throw new Error(\"BI.history has already been started\");\r\n History.started = true;\r\n\r\n // Figure out the initial configuration. Do we need an iframe?\r\n // Is pushState desired ... is it available?\r\n this.options = _.extend({root: \"/\"}, this.options, options);\r\n this.root = this.options.root;\r\n this._wantsHashChange = this.options.hashChange !== false;\r\n this._hasHashChange = \"onhashchange\" in window;\r\n this._wantsPushState = !!this.options.pushState;\r\n this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);\r\n this.fragment = this.getFragment();\r\n\r\n // Normalize root to always include a leading and trailing slash.\r\n this.root = (\"/\" + this.root + \"/\").replace(rootStripper, \"/\");\r\n\r\n // Transition from hashChange to pushState or vice versa if both are\r\n // requested.\r\n if (this._wantsHashChange && this._wantsPushState) {\r\n\r\n // If we've started off with a route from a `pushState`-enabled\r\n // browser, but we're currently in a browser that doesn't support it...\r\n if (!this._hasPushState && !this.atRoot()) {\r\n var root = this.root.slice(0, -1) || \"/\";\r\n this.location.replace(root + \"#\" + this.getPath());\r\n // Return immediately as browser will do redirect to new url\r\n return true;\r\n\r\n // Or if we've started out with a hash-based route, but we're currently\r\n // in a browser where it could be `pushState`-based instead...\r\n } else if (this._hasPushState && this.atRoot()) {\r\n this.navigate(this.getHash(), {replace: true});\r\n }\r\n\r\n }\r\n\r\n // Proxy an iframe to handle location events if the browser doesn't\r\n // support the `hashchange` event, HTML5 history, or the user wants\r\n // `hashChange` but not `pushState`.\r\n if (!this._hasHashChange && this._wantsHashChange && (!this._wantsPushState || !this._hasPushState)) {\r\n var iframe = document.createElement(\"iframe\");\r\n iframe.src = \"javascript:0\";\r\n iframe.style.display = \"none\";\r\n iframe.tabIndex = -1;\r\n var body = document.body;\r\n // Using `appendChild` will throw on IE < 9 if the document is not ready.\r\n this.iframe = body.insertBefore(iframe, body.firstChild).contentWindow;\r\n this.iframe.document.open().close();\r\n this.iframe.location.hash = \"#\" + this.fragment;\r\n }\r\n\r\n // Add a cross-platform `addEventListener` shim for older browsers.\r\n var addEventListener = _global.addEventListener || function (eventName, listener) {\r\n return attachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Depending on whether we're using pushState or hashes, and whether\r\n // 'onhashchange' is supported, determine how we check the URL state.\r\n if (this._hasPushState) {\r\n addEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n addEventListener(\"hashchange\", this.checkUrl, false);\r\n } else if (this._wantsHashChange) {\r\n this._checkUrlInterval = setInterval(this.checkUrl, this.interval);\r\n }\r\n\r\n if (!this.options.silent) return this.loadUrl();\r\n },\r\n\r\n // Disable BI.history, perhaps temporarily. Not useful in a real app,\r\n // but possibly useful for unit testing Routers.\r\n stop: function () {\r\n // Add a cross-platform `removeEventListener` shim for older browsers.\r\n var removeEventListener = _global.removeEventListener || function (eventName, listener) {\r\n return detachEvent(\"on\" + eventName, listener);\r\n };\r\n\r\n // Remove window listeners.\r\n if (this._hasPushState) {\r\n removeEventListener(\"popstate\", this.checkUrl, false);\r\n } else if (this._wantsHashChange && this._hasHashChange && !this.iframe) {\r\n removeEventListener(\"hashchange\", this.checkUrl, false);\r\n }\r\n\r\n // Clean up the iframe if necessary.\r\n if (this.iframe) {\r\n document.body.removeChild(this.iframe.frameElement);\r\n this.iframe = null;\r\n }\r\n\r\n // Some environments will throw when clearing an undefined interval.\r\n if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);\r\n History.started = false;\r\n },\r\n\r\n // Add a route to be tested when the fragment changes. Routes added later\r\n // may override previous routes.\r\n route: function (route, callback) {\r\n this.handlers.unshift({route: route, callback: callback});\r\n },\r\n\r\n // remove a route match in routes\r\n unRoute: function (route) {\r\n var index = _.findIndex(this.handlers, function (handler) {\r\n return handler.route.test(route);\r\n });\r\n if (index > -1) {\r\n this.handlers.splice(index, 1);\r\n }\r\n },\r\n\r\n // Checks the current URL to see if it has changed, and if it has,\r\n // calls `loadUrl`, normalizing across the hidden iframe.\r\n checkUrl: function (e) {\r\n var current = this.getFragment();\r\n try {\r\n // getFragment 得到的值是编码过的,而this.fragment是没有编码过的\r\n // 英文路径没有问题,遇上中文和空格有问题了\r\n current = decodeURIComponent(current);\r\n } catch(e) {\r\n }\r\n // If the user pressed the back button, the iframe's hash will have\r\n // changed and we should use that for comparison.\r\n if (current === this.fragment && this.iframe) {\r\n current = this.getHash(this.iframe);\r\n }\r\n\r\n if (current === this.fragment) return false;\r\n if (this.iframe) this.navigate(current);\r\n this.loadUrl();\r\n },\r\n\r\n // Attempt to load the current URL fragment. If a route succeeds with a\r\n // match, returns `true`. If no defined routes matches the fragment,\r\n // returns `false`.\r\n loadUrl: function (fragment) {\r\n fragment = this.fragment = this.getFragment(fragment);\r\n return _.some(this.handlers, function (handler) {\r\n if (handler.route.test(fragment)) {\r\n handler.callback(fragment);\r\n return true;\r\n }\r\n });\r\n },\r\n\r\n // Save a fragment into the hash history, or replace the URL state if the\r\n // 'replace' option is passed. You are responsible for properly URL-encoding\r\n // the fragment in advance.\r\n //\r\n // The options object can contain `trigger: true` if you wish to have the\r\n // route callback be fired (not usually desirable), or `replace: true`, if\r\n // you wish to modify the current URL without adding an entry to the history.\r\n navigate: function (fragment, options) {\r\n if (!History.started) return false;\r\n if (!options || options === true) options = {trigger: !!options};\r\n\r\n // Normalize the fragment.\r\n fragment = this.getFragment(fragment || \"\");\r\n\r\n // Don't include a trailing slash on the root.\r\n var root = this.root;\r\n if (fragment === \"\" || fragment.charAt(0) === \"?\") {\r\n root = root.slice(0, -1) || \"/\";\r\n }\r\n var url = root + fragment;\r\n\r\n // Strip the hash and decode for matching.\r\n fragment = decodeURI(fragment.replace(pathStripper, \"\"));\r\n\r\n if (this.fragment === fragment) return;\r\n this.fragment = fragment;\r\n\r\n // If pushState is available, we use it to set the fragment as a real URL.\r\n if (this._hasPushState) {\r\n this.history[options.replace ? \"replaceState\" : \"pushState\"]({}, document.title, url);\r\n\r\n // If hash changes haven't been explicitly disabled, update the hash\r\n // fragment to store history.\r\n } else if (this._wantsHashChange) {\r\n this._updateHash(this.location, fragment, options.replace);\r\n if (this.iframe && (fragment !== this.getHash(this.iframe))) {\r\n // Opening and closing the iframe tricks IE7 and earlier to push a\r\n // history entry on hash-tag change. When replace is true, we don't\r\n // want this.\r\n if (!options.replace) this.iframe.document.open().close();\r\n this._updateHash(this.iframe.location, fragment, options.replace);\r\n }\r\n\r\n // If you've told us that you explicitly don't want fallback hashchange-\r\n // based history, then `navigate` becomes a page refresh.\r\n } else {\r\n return this.location.assign(url);\r\n }\r\n if (options.trigger) return this.loadUrl(fragment);\r\n },\r\n\r\n // Update the hash location, either replacing the current entry, or adding\r\n // a new one to the browser history.\r\n _updateHash: function (location, fragment, replace) {\r\n if (replace) {\r\n var href = location.href.replace(/(javascript:|#).*$/, \"\");\r\n location.replace(href + \"#\" + fragment);\r\n } else {\r\n // Some browsers require that `hash` contains a leading #.\r\n location.hash = \"#\" + fragment;\r\n }\r\n }\r\n\r\n });\r\n\r\n // Create the default BI.history.\r\n BI.history = new History;\r\n}());;(function () {\r\n function initWatch(vm, watch) {\r\n vm._watchers || (vm._watchers = []);\r\n for (var key in watch) {\r\n var handler = watch[key];\r\n if (BI.isArray(handler)) {\r\n for (var i = 0; i < handler.length; i++) {\r\n vm._watchers.push(createWatcher(vm, key, handler[i]));\r\n }\r\n } else {\r\n vm._watchers.push(createWatcher(vm, key, handler));\r\n }\r\n }\r\n }\r\n\r\n function createWatcher(vm, keyOrFn, cb, options) {\r\n if (BI.isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n options = options || {};\r\n return Fix.watch(vm.model, keyOrFn, _.bind(cb, vm), BI.extend(options, {\r\n store: vm.store\r\n }));\r\n }\r\n\r\n var target = null;\r\n var targetStack = [];\r\n\r\n function pushTarget(_target) {\r\n if (target) targetStack.push(target);\r\n Fix.Model.target = target = _target;\r\n }\r\n\r\n function popTarget() {\r\n Fix.Model.target = target = targetStack.pop();\r\n }\r\n\r\n var context = null;\r\n var contextStack = [];\r\n\r\n function pushContext(_context) {\r\n if (context) contextStack.push(context);\r\n Fix.Model.context = context = _context;\r\n }\r\n\r\n function popContext() {\r\n Fix.Model.context = context = contextStack.pop();\r\n }\r\n\r\n var oldWatch = Fix.watch;\r\n Fix.watch = function (model, expOrFn, cb, options) {\r\n if (BI.isPlainObject(cb)) {\r\n options = cb;\r\n cb = cb.handler;\r\n }\r\n if (typeof cb === \"string\") {\r\n cb = model[cb];\r\n }\r\n return oldWatch.call(this, model, expOrFn, function () {\r\n options && options.store && pushTarget(options.store);\r\n var res = cb.apply(this, arguments);\r\n options && options.store && popTarget();\r\n return res;\r\n }, options);\r\n };\r\n\r\n function findStore(widget) {\r\n if (target != null) {\r\n return target;\r\n }\r\n widget = widget || context;\r\n var p = widget;\r\n while (p) {\r\n if (p instanceof Fix.Model || p.store || p.__cacheStore) {\r\n break;\r\n }\r\n p = p._parent || (p.options && p.options.element);\r\n }\r\n if (p) {\r\n if (p instanceof Fix.Model) {\r\n return widget.__cacheStore = p;\r\n }\r\n widget.__cacheStore = p.store || p.__cacheStore;\r\n return p.__cacheStore || p.store;\r\n }\r\n }\r\n\r\n var _create = BI.createWidget;\r\n BI.createWidget = function (item, options, context) {\r\n var pushed = false;\r\n if (BI.isWidget(options)) {\r\n pushContext(options);\r\n pushed = true;\r\n } else if (context != null) {\r\n pushContext(context);\r\n pushed = true;\r\n }\r\n var result = _create.apply(this, arguments);\r\n pushed && popContext();\r\n return result;\r\n };\r\n\r\n _.each([\"populate\", \"addItems\", \"prependItems\"], function (name) {\r\n var old = BI.Loader.prototype[name];\r\n BI.Loader.prototype[name] = function () {\r\n pushContext(this);\r\n var result = old.apply(this, arguments);\r\n popContext();\r\n return result;\r\n };\r\n });\r\n\r\n function createStore() {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n var store = findStore(this.options.context || this.options.element);\r\n if (store) {\r\n pushTarget(store);\r\n needPop = true;\r\n }\r\n this.store = this._store();\r\n this.store && (this.store._widget = this);\r\n needPop && popTarget();\r\n needPop = false;\r\n pushTarget(this.store);\r\n if (this.store instanceof Fix.Model) {\r\n this.model = this.store.model;\r\n } else {\r\n this.model = this.store;\r\n }\r\n needPop = true;\r\n }\r\n return needPop;\r\n }\r\n\r\n BI.Widget.prototype._initRender = function () {\r\n if (this.beforeInit) {\r\n this.__asking = true;\r\n this.beforeInit(BI.bind(function () {\r\n if (this.model && this.model.$vm) {\r\n this.model.$vm.$digest();\r\n }\r\n this._render();\r\n }, this));\r\n if (this.__asking === true) {\r\n this.__async = true;\r\n }\r\n } else {\r\n this._render();\r\n }\r\n };\r\n\r\n var _init = BI.Widget.prototype._init;\r\n BI.Widget.prototype._init = function () {\r\n var self = this;\r\n var needPop = createStore.call(this);\r\n _init.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var _render = BI.Widget.prototype._render;\r\n BI.Widget.prototype._render = function () {\r\n var needPop = false;\r\n if (_global.Fix && this._store) {\r\n needPop = true;\r\n pushTarget(this.store);\r\n initWatch(this, this.watch);\r\n }\r\n _render.apply(this, arguments);\r\n needPop && popTarget();\r\n };\r\n\r\n var unMount = BI.Widget.prototype.__d;\r\n BI.Widget.prototype.__d = function () {\r\n unMount.apply(this, arguments);\r\n this.store && BI.isFunction(this.store.destroy) && this.store.destroy();\r\n BI.each(this._watchers, function (i, unwatches) {\r\n unwatches = BI.isArray(unwatches) ? unwatches : [unwatches];\r\n BI.each(unwatches, function (j, unwatch) {\r\n unwatch();\r\n });\r\n });\r\n this._watchers && (this._watchers = []);\r\n if (this.store) {\r\n this.store._parent && (this.store._parent = null);\r\n this.store._widget && (this.store._widget = null);\r\n this.store = null;\r\n }\r\n delete this.__cacheStore;\r\n };\r\n\r\n _.each([\"_mount\"], function (name) {\r\n var old = BI.Widget.prototype[name];\r\n old && (BI.Widget.prototype[name] = function () {\r\n this.store && pushTarget(this.store);\r\n try {\r\n var res = old.apply(this, arguments);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n this.store && popTarget();\r\n return res;\r\n });\r\n });\r\n\r\n var additionFunc = function () {\r\n BI.nextTick(function () {\r\n Fix && Fix.refreshAll && Fix.refreshAll();\r\n });\r\n };\r\n\r\n $(document).ajaxComplete(additionFunc);\r\n\r\n if (BI.history) {\r\n var navigate = BI.history.navigate;\r\n // navigate之后不会立即变化有一段延迟\r\n BI.history.navigate = function () {\r\n navigate.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n var back = window.history.back;\r\n window.history.back = function () {\r\n back.apply(this, arguments);\r\n BI.defer(function () {\r\n additionFunc();\r\n }, 200);\r\n }\r\n }\r\n\r\n if (BI.Router) {\r\n var execute = BI.Router.prototype.execute;\r\n BI.Router.prototype.execute = function () {\r\n execute.apply(this, arguments);\r\n additionFunc();\r\n }\r\n }\r\n\r\n _.each([\"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\",\r\n \"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\",\r\n \"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n var old = BI[name];\r\n BI[name] = function (obj, fn, context) {\r\n return typeof fn === \"function\" ? old(obj, function (key, value) {\r\n if (!(key in Fix.$$skipArray)) {\r\n return fn.apply(this, arguments);\r\n }\r\n }, context) : old.apply(this, arguments);\r\n };\r\n });\r\n BI.isEmpty = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length === 0;\r\n }\r\n return _.isEmpty(ob);\r\n };\r\n BI.keys = function (ob) {\r\n var keys = _.keys(ob);\r\n var nKeys = [];\r\n for (var i = 0; i < keys.length; i++) {\r\n if (!(keys[i] in Fix.$$skipArray)) {\r\n nKeys.push(keys[i]);\r\n }\r\n }\r\n return nKeys;\r\n };\r\n BI.values = function (ob) {\r\n var keys = BI.keys(obj);\r\n var length = keys.length;\r\n var values = [];\r\n for (var i = 0; i < length; i++) {\r\n values[i] = obj[keys[i]];\r\n }\r\n return values;\r\n };\r\n BI.extend = function () {\r\n var args = Array.prototype.slice.call(arguments);\r\n if (args.length < 1) {\r\n return {};\r\n }\r\n var object = args[0];\r\n var i = 1;\r\n while (i < args.length) {\r\n BI.each(args[i], function (key, v) {\r\n object[key] = v;\r\n });\r\n i++;\r\n }\r\n return object;\r\n };\r\n BI.size = function (ob) {\r\n if (BI.isPlainObject(ob) && ob.__ob__) {\r\n return BI.keys(ob).length;\r\n }\r\n return _.size(ob);\r\n };\r\n BI.isEmptyObject = function (ob) {\r\n return BI.size(ob) === 0;\r\n };\r\n BI.deepClone = function (ob) {\r\n return Fix.toJSON(ob);\r\n };\r\n\r\n Fix.set = function (obj, k, v) {\r\n try {\r\n if(obj) {\r\n obj[k] = v;\r\n }\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n Fix.del = function (obj, k) {\r\n try {\r\n delete obj[k];\r\n } catch (e) {\r\n\r\n } finally {\r\n return _.cloneDeep(obj);\r\n }\r\n }\r\n BI.watch = Fix.watch;\r\n}());\r\n\n//# sourceMappingURL=fineui.ie.js.map"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 148);\n","import fineui from \"./index\";\r\n\r\nBI.extend(BI, fineui);\r\n","import { _Combo, _ComboStatic } from \"./base/combination/combo\";\r\nimport { _ButtonGroup, _ButtonGroupChooseType, _ButtonGroupStatic } from \"./base/combination/group.button\";\r\nimport { _Tab, _TabStatic } from \"./base/combination/tab\";\r\nimport { _Pane, _PaneStatic } from \"./base/pane\";\r\nimport { _BasicButton, _BasicButtonStatic } from \"./base/single/button/button.basic\";\r\nimport { _NodeButton } from \"./base/single/button/button.node\";\r\nimport { _Button, _ButtonStatic } from \"./base/single/button/buttons/button\";\r\nimport { _TextButton, _TextButtonStatic } from \"./base/single/button/buttons/button.text\";\r\nimport { _IconTextItem, _IconTextItemStatic } from \"./base/single/button/listitem/icontextitem\";\r\nimport { _Editor, _EditorStatic } from \"./base/single/editor/editor\";\r\nimport { _Iframe } from \"./base/single/iframe/iframe\";\r\nimport { _Checkbox, _CheckboxStatic } from \"./base/single/input/checkbox\";\r\nimport { _AbstractLabel } from \"./base/single/label/abstract.label\";\r\nimport { _Label } from \"./base/single/label/label\";\r\nimport { _Single } from \"./base/single/single\";\r\nimport { _Text } from \"./base/single/text\";\r\nimport { _Trigger } from \"./base/single/trigger/trigger\";\r\nimport { _IconChangeButton, _IconChangeButtonStatic } from \"./case/button/icon/icon.change\";\r\nimport { _MultiSelectItem, _MultiSelectItemStatic } from \"./case/button/item.multiselect\";\r\nimport { _BubbleCombo, _BubbleComboStatic } from \"./case/combo/bubblecombo/combo.bubble\";\r\nimport { _TextValueCombo, _TextValueComboStatic } from \"./case/combo/combo.textvalue\";\r\nimport { _SignEditor, _SignEditorStatic } from \"./case/editor/editor.sign\";\r\nimport { _LoadingPane } from \"./case/loading/loading_pane\";\r\nimport { _AllValueMultiTextValueCombo, _AllValueMultiTextValueComboStatic } from \"./component/allvaluemultitextvaluecombo/allvalue.multitextvalue.combo\";\r\nimport { _AbstractTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser\";\r\nimport { _AbstractListTreeValueChooser } from \"./component/treevaluechooser/abstract.treevaluechooser.list\";\r\nimport { _Action, _ActionFactory } from \"./core/action/action\";\r\nimport { _ShowAction } from \"./core/action/action.show\";\r\nimport { _base } from \"./core/base\";\r\nimport { _Behavior, _BehaviorFactory } from \"./core/behavior/behavior\";\r\nimport { _HighlightBehavior } from \"./core/behavior/behavior.highlight\";\r\nimport { _RedMarkBehavior } from \"./core/behavior/behavior.redmark\";\r\nimport * as decorator from \"./core/decorator/decorator\";\r\nimport { _func } from \"./core/func\";\r\nimport { _i18n } from \"./core/i18n\";\r\nimport { _OB } from \"./core/ob\";\r\nimport { _Widget, _WidgetStatic } from \"./core/widget\";\r\nimport { _Layout } from \"./core/wrapper/layout\";\r\nimport { _AbsoluteLayout } from \"./core/wrapper/layout/layout.absolute\";\r\nimport { _HTapeLayout, _VTapeLayout } from \"./core/wrapper/layout/layout.tape\";\r\nimport { _VerticalLayout } from \"./core/wrapper/layout/layout.vertical\";\r\nimport { _DownListCombo, _DownListComboStatic } from \"./widget/downlist/combo.downlist\";\r\n\r\n\r\ntype ClassConstructor<T extends {}> = T & {\r\n new(config: any): T;\r\n (config: any): T;\r\n readonly prototype: T;\r\n}\r\n\r\nexport interface BI extends _func, _i18n, _base {\r\n OB: ClassConstructor<_OB>;\r\n Widget: ClassConstructor<_Widget> & _WidgetStatic;\r\n Single: ClassConstructor<_Single>;\r\n BasicButton: ClassConstructor<_BasicButton> & _BasicButtonStatic;\r\n NodeButton: ClassConstructor<_NodeButton>;\r\n Checkbox: ClassConstructor<_Checkbox> & _CheckboxStatic;\r\n Button: ClassConstructor<_Button> & _ButtonStatic;\r\n TextButton: ClassConstructor<_TextButton> & _TextButtonStatic;\r\n IconChangeButton: ClassConstructor<_IconChangeButton> & _IconChangeButtonStatic;\r\n Trigger: ClassConstructor<_Trigger>;\r\n Action: ClassConstructor<_Action>;\r\n ActionFactory: ClassConstructor<_ActionFactory>;\r\n ShowAction: ClassConstructor<_ShowAction>;\r\n Behavior: ClassConstructor<_Behavior>;\r\n BehaviorFactory: ClassConstructor<_BehaviorFactory>;\r\n HighlightBehavior: ClassConstructor<_HighlightBehavior>;\r\n RedMarkBehavior: ClassConstructor<_RedMarkBehavior>;\r\n Pane: ClassConstructor<_Pane> & _PaneStatic;\r\n LoadingPane: ClassConstructor<_LoadingPane>;\r\n Tab: ClassConstructor<_Tab> & _TabStatic;\r\n ButtonGroup: ClassConstructor<_ButtonGroup> & _ButtonGroupChooseType & _ButtonGroupStatic;\r\n Combo: ClassConstructor<_Combo> & _ComboStatic;\r\n TextValueCombo: ClassConstructor<_TextValueCombo> & _TextValueComboStatic;\r\n BubbleCombo: ClassConstructor<_BubbleCombo> & _BubbleComboStatic;\r\n AllValueMultiTextValueCombo: ClassConstructor<_AllValueMultiTextValueCombo> & _AllValueMultiTextValueComboStatic;\r\n IconTextItem: ClassConstructor<_IconTextItem> & _IconTextItemStatic;\r\n MultiSelectItem: ClassConstructor<_MultiSelectItem> & _MultiSelectItemStatic;\r\n AbstractLabel: ClassConstructor<_AbstractLabel>;\r\n Label: ClassConstructor<_Label>;\r\n Text: ClassConstructor<_Text>;\r\n Editor: ClassConstructor<_Editor> & _EditorStatic;\r\n SignEditor: ClassConstructor<_SignEditor> & _SignEditorStatic;\r\n Layout: ClassConstructor<_Layout>;\r\n HTapeLayout: ClassConstructor<_HTapeLayout>;\r\n VTapeLayout: ClassConstructor<_VTapeLayout>;\r\n AbstractTreeValueChooser: ClassConstructor<_AbstractTreeValueChooser>;\r\n AbstractListTreeValueChooser: ClassConstructor<_AbstractListTreeValueChooser>;\r\n Decorators: typeof decorator;\r\n DownListCombo: ClassConstructor<_DownListCombo> & _DownListComboStatic;\r\n Iframe: ClassConstructor<_Iframe>;\r\n AbsoluteLayout: ClassConstructor<_AbsoluteLayout>;\r\n VerticalLayout: ClassConstructor<_VerticalLayout>;\r\n}\r\n\r\nexport default {\r\n Decorators: decorator,\r\n};\r\n","export type Constructor<T> = new(...args: any[]) => T;\r\n\r\n/**\r\n * 注册widget\r\n */\r\nexport function shortcut() {\r\n return function decorator<U>(Target: Constructor<U> & {xtype: string}): void {\r\n BI.shortcut(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 注册model\r\n */\r\nexport function model() {\r\n return function decorator<U extends {new(...args:any[]):{}} & {xtype: string, context?: ReadonlyArray<string>}>(Target: U): void {\r\n BI.model(Target.xtype, Target);\r\n };\r\n}\r\n\r\n/**\r\n * 类注册_store属性\r\n * @param Model model类\r\n * @param opts 额外条件\r\n */\r\nexport function store<T>(Model: Constructor<T> & {xtype: string}, opts: { props?(this: unknown): { [key: string]: unknown } } = {}) {\r\n return function classDecorator<U extends {new(...args:any[]):{}}>(constructor:U) {\r\n return class extends constructor {\r\n _store() {\r\n const props = opts.props ? opts.props.apply(this) : undefined;\r\n\r\n return BI.Models.getModel(Model.xtype, props);\r\n }\r\n };\r\n };\r\n}\r\n\r\n/**\r\n * Model基类\r\n */\r\nexport class Model<U extends {types?: {[key: string]: unknown} | {}, context?: ReadonlyArray<string>} = {}> extends Fix.Model {\r\n // @ts-ignore this[\"computed\"][key]为空\r\n model: Pick<{[key in keyof U[\"types\"]]: U[\"types\"][key]}, U[\"context\"][number]> & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]} & {[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>};\r\n\r\n store: this[\"actions\"];\r\n\r\n state(): {[key: string]: unknown} | {} {\r\n return {};\r\n }\r\n\r\n context: U[\"context\"];\r\n\r\n actions:{[key: string]: (...args: any[]) => any};\r\n\r\n childContext: ReadonlyArray<keyof (this[\"computed\"] & ReturnType<this[\"state\"]>)>;\r\n\r\n // @ts-ignore this[\"computed\"][key]为空\r\n TYPE: Pick<{[key in keyof this[\"computed\"]]: ReturnType<this[\"computed\"][key]>} & {[key in keyof ReturnType<this[\"state\"]>]: ReturnType<this[\"state\"]>[key]}, this[\"childContext\"][number]>;\r\n\r\n computed: {[key: string]: () => unknown} | {};\r\n}\r\n\r\n/* 分享一段很好看的代码\r\n// union to intersection of functions\r\ntype UnionToIoF<U> =\r\n (U extends any ? (k: (x: U) => void) => void : never) extends\r\n ((k: infer I) => void) ? I : never\r\n\r\n// return last element from Union\r\ntype UnionPop<U> = UnionToIoF<U> extends { (a: infer A): void; } ? A : never;\r\n\r\n// prepend an element to a tuple.\r\ntype Prepend<U, T extends ReadonlyArray<any>> =\r\n ((a: U, ...r: T) => void) extends (...r: infer R) => void ? R : never;\r\n\r\ntype UnionToTupleRecursively<Union, Result extends ReadonlyArray<any>> = {\r\n 1: Result;\r\n 0: UnionToTupleRecursively_<Union, UnionPop<Union>, Result>;\r\n // 0: UnionToTupleRecursively<Exclude<Union, UnionPop<Union>>, Prepend<UnionPop<Union>, Result>>\r\n}[[Union] extends [never] ? 1 : 0];\r\n\r\ntype UnionToTupleRecursively_<Union, Element, Result extends ReadonlyArray<any>> =\r\n UnionToTupleRecursively<Exclude<Union, Element>, Prepend<Element, Result>>;\r\n\r\ntype UnionToTuple<U> = UnionToTupleRecursively<U, []>;\r\n*/\r\n"]}