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
857 KiB
1 lines
857 KiB
{"version":3,"sources":["utils.js"],"names":["_global","window","global","self","this","BI","prepares","apply","func","thisArg","args","length","call","arrayAggregator","array","setter","iteratee","accumulator","index","value","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","result","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","Array","arrayPush","values","offset","arrayReduce","initAccum","arraySome","asciiToArray","string","split","baseFindKey","collection","eachFunc","key","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","undefined","basePropertyOf","baseReduce","baseSortBy","comparer","sort","baseTimes","n","baseUnary","baseValues","props","cacheHas","cache","has","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","test","iteratorToArray","iterator","data","next","done","push","mapToArray","map","size","forEach","overArg","transform","arg","replaceHolders","PLACEHOLDER","safeGet","setToArray","set","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lastIndex","match","lodash","isObjectLike","isArray","LazyWrapper","LodashWrapper","hasOwnProperty","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","dir","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","type","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entries","clear","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","pop","splice","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","hash","Map","mapCacheDelete","getMapData","mapCacheGet","get","mapCacheHas","mapCacheSet","SetCache","add","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","String","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","source","copyObject","keys","baseAssignIn","keysIn","defineProperty","configurable","enumerable","writable","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","tag","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","TypeError","FUNC_ERROR_TEXT","setTimeout","baseDifference","includes","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","Object","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","parent","last","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","toString","castSlice","buffer","slice","allocUnsafe","constructor","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","exec","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","fn","root","Ctor","isBind","arguments","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","prototype","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","name","message","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","e","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","join","replace","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","proto","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","concat","drop","findIndex","findLastIndex","flattenDeep","head","indexOf","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","previous","wrapperReverse","wrapped","wrapperValue","every","filter","reduce","reject","negate","isString","some","before","debounce","options","invokeFunc","time","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","now","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","Cache","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNaN","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","valueOf","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","create","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","random","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","_","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","max","min","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","RegExp","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","Function","freeExports","exports","nodeType","freeModule","module","moduleExports","freeProcess","process","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","Symbol","getPrototypeOf","objectCreate","propertyIsEnumerable","isConcatSpreadable","toStringTag","Math","ceil","floor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","Date","DataView","Promise","Set","WeakMap","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","resolve","ctorString","charCodeAt","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","find","groupBy","sortBy","bind","defer","delay","assignIn","defaults","propsIndex","propsLength","defaultsDeep","mergeWith","invert","invertBy","merge","omit","pick","range","extend","each","first","isFilter","getIteratee","takeName","dropName","findLast","invokeMap","dropRight","takeRightWhile","takeWhile","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","names","define","amd","MAX","MIN","EVENT_RESPONSE_TIME","zIndex_layer","zIndex_popover","zIndex_popup","zIndex_masker","zIndex_tip","emptyStr","emptyFn","empty","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","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","Status","SUCCESS","WRONG","START","WAITING","READY","RUNNING","OUTOFBOUNDS","NULL","Direction","Top","Bottom","Left","Right","Custom","Axis","Vertical","Horizontal","Selection","Default","None","Single","Multi","All","HorizontalAlign","Center","Stretch","VerticalAlign","Middle","StartOfWeek","pushArray","sArray","i","pushDistinct","obj","contains","pushDistinctArray","len","num","accAdd","arg1","arg2","r1","r2","m","c","abs","pow","cm","Number","sub","accSub","toFixed","mul","accMul","s1","s2","div","digitLength","eSplit","float2Fixed","dLen","times","num1","num2","others","_i","num1Changed","num2Changed","baseNum","leftValue","accDivide","startWith","str","startTag","substr","endWith","endTag","substring","getQuery","reg","r","unescape","appendQuery","paras","src","replaceAll","perfectStart","allIndexOf","location","loc","SECOND","MINUTE","HOUR","DAY","WEEK","getTimezone","date","getMonthDays","month","year","getFullYear","getMonth","_MD","getLastDateOfMonth","getDate","getDayOfYear","then","getWeekNumber","d","week","getDay","startOfWeek","middleDay","offsetWeekStartCount","offsetWeekMiddleCount","setDate","ms","setMonth","getQuarter","getOffsetDate","getTime","getHours","getMinutes","getSeconds","getOffsetQuarter","dt","day","monthDay","getQuarterStartMonth","quarterStartMonth","nowMonth","getQuarterStartDate","getQuarterEndDate","quarterEndMonth","getOffsetMonth","getWeekStartDate","w","_OFFSET","getWeekEndDate","print","y","yWith4number","wn","qr","s","hr","pm","ir","dy","sec","_SDN","_DN","_SMN","_MN","re","isKhtml","navigator","userAgent","par","a","tmp","Func","createDistinctName","idx","item","getGBWidth","getSearchResult","items","keyword","param","deepClone","t","text","py","toUpperCase","matched","stripEL","val","isNotNull","makeFirstPY","splitChar","pidx","beforeFunc","sFunc","__self","afterFunc","ret","traverse","context","_apply","_applyFunc","assert","v","is","Error","deepContains","warn","console","UUID","f","isWidget","widget","Widget","View","createWidgets","createWidget","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","k","it","formatEL","trans2Element","widgets","wi","element","from","to","inverse","firstKey","res","any","lastKey","firstObject","lastObject","obj1","obj2","backEach","backAny","backEvery","backFindKey","backFind","remove","target","removeAt","string2Array","array2String","abc2Int","charAt","int2Abc","DIGITS","makeObject","makeArrayByArray","callee","isSorted","inherit","sb","sp","overrides","F","spp","superclass","init","initialized","freeze","isCapitalEqual","b","toLowerCase","isWidthOrHeight","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTick","nextTickHandler","pending","copies","callbacks","timerFunc","p","MutationObserver","counter","observer","textNode","document","createTextNode","observe","characterData","queueNextTick","cb","_resolve","performance","webkitNow","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","CRYPT_TYPE","AES","aesEncrypt","leftPad","ch","format","isLeapYear","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","parseDateTime","fmt","today","yearlength","otherlength","j","search","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","isInvalidDate","_eFormat","eFormat","neg","magnitudeNeg","magnitude","log","integerLen","getInteger","precision","getPrecision","isValueCarry","isValueCarried","round","formatExponential","isAllZero","formatLeft","valueLeftLen","roundNum","_dealNumberPrecision","fright","_numberFormat","numMod","fp","fleft","tp","tleft","tright","paddingZero","right","_dealWithRight","leftPlus","left","_dealWithLeft","rll","numReg","orilen","newnum","combo","com","tll","newstr","lres","cjkEncode","newText","code","cjkDecode","rightIdx","subText","fromCharCode","eval","SPECIAL_TAGS"," ","htmlEncode","htmlDecode","cjkEncodeDO","o","jsonEncode","useHasOwn","\b","\t","\n","\f","\r","\\","encodeString","encodeArray","l","__time__","jsonDecode","_hasDateInJson","json","jo","$","parseJSON","JSON","parse","getEncodeURL","urlTemplate","ori","encodeURIComponent","url","specialCharsMap","decodeURIComponent","reserveSpecialCharsMap","initialChar","encodeChar","contentFormat","cv","needTrim","date2Str","parseFmt","str2Date","compileJFmt","jfmt","hour","flagch","char","object2Number","object2Date","object2Time","moduleInjection","xtype","cls","error","constantInjection","modelInjection","model","storeInjection","store","serviceInjection","service","providerInjection","provider","configFunctions","configFn","providers","Plugin","configWidget","queue","globalAction","actionFn","points","point","pointFn","after","Modules","getModule","getAllModules","Constants","getConstant","callPoint","inst","bfns","aspect","afns","Models","getModel","stores","Stores","getStore","services","Services","getService","providerInstance","Providers","getProvider","$get","Actions","runAction","event","act","runGlobalAction","getContext","i18nStore","addI18n","i18n","i18nText","localeText","CryptoJS","C","C_lib","lib","Base","subtype","mixIn","$super","instance","propertyName","WordArray","words","sigBytes","encoder","Hex","stringify","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","C_enc","enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","utf8Str","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","Hasher","cfg","_doReset","update","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","C_algo","HMAC","algo","Base64","_map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","FF","x","GG","HH","II","T","sin","MD5","_hash","M","offset_i","M_offset_i","H","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","decrypt","ciphertext","StreamCipher","finalProcessedBlocks","C_mode","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","s3","t0","t1","t2","t3","base64Cipher","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","localStorage","setItem","getUsername","getItem","_getKeyPrefix","_generateKey","removeItem","addCookie","expiresHours","cookieString","setTime","toUTCString","cookie","getCookie","deleteCookie","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","stop","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","arrRslt","multiLen","strlen","tmpStr","tmpArr","arrResult","defaultComparator","Heap","_items","_size","_comparator","_heapify","elt","lastElt","_sinkDown","_bubbleUp","peek","parentIndex","parentElt","leftChildIndex","rightChildIndex","swapIndex","leftChild","rightChild","LinkHashMap","scope","LRU","limit","tail","_keymap","put","removed","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","height","width","_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","children","child","_toJSON","getChildren","toJSON","_toJSONWithNode","toJSONWithNode","_traverse","callback","_recursion","route","recursion","inOrderTraverse","_inOrderTraverse","getLeft","getRight","nrInOrderTraverse","preOrderTraverse","_preOrderTraverse","nrPreOrderTraverse","postOrderTraverse","_postOrderTraverse","nrPostOrderTraverse","preNode","isLeaf","getChildrenLength","getFirstChild","getLastChild","setLeft","setRight","setParent","getParent","getChild","getChildIndex","removeChild","removeChildByIndex","behind","removeAllChilds","cur","equals","transformToArrayFormat","pId","newNodes","arrayFormat","transformToTreeFormat","sNodes","tmpMap","treeFormat","traversal","Vector","cross","sqrt","Region","h","isIntersects","isPointInside","vector1","vector2","vector3","getPosition","pos","BI-Multi_Date_Quarter_End","BI-Multi_Date_Month_Begin","BI-Multi_Date_YMD","BI-Custom_Color","BI-Numerical_Interval_Input_Data","BI-Please_Input_Natural_Number","BI-No_More_Data","BI-Basic_Altogether","BI-Basic_Sunday","BI-Widget_Background_Colour","BI-Color_Picker_Error_Text","BI-Multi_Date_Month","BI-No_Selected_Item","BI-Multi_Date_Year_Begin","BI-Quarter_1","BI-Quarter_2","BI-Quarter_3","BI-Quarter_4","BI-Multi_Date_Year_Next","BI-Multi_Date_Month_Prev","BI-Month_Trigger_Error_Text","BI-Less_And_Equal","BI-Year_Trigger_Invalid_Text","BI-Multi_Date_Week_Next","BI-Font_Size","BI-Basic_Total","BI-Already_Selected","BI-Formula_Insert","BI-Select_All","BI-Basic_Tuesday","BI-Multi_Date_Month_End","BI-Load_More","BI-Basic_September","BI-Current_Is_Last_Page","BI-Basic_Auto","BI-Basic_Count","BI-Basic_Value","BI-Basic_Unrestricted","BI-Quarter_Trigger_Error_Text","BI-Basic_More","BI-Basic_Wednesday","BI-Basic_Bold","BI-Basic_Simple_Saturday","BI-Multi_Date_Month_Next","BI-Basic_March","BI-Current_Is_First_Page","BI-Basic_Thursday","BI-Basic_Prompt","BI-Multi_Date_Today","BI-Multi_Date_Quarter_Prev","BI-Row_Header","BI-Date_Trigger_Error_Text","BI-Basic_Cancel","BI-Basic_January","BI-Basic_June","BI-Basic_July","BI-Basic_April","BI-Multi_Date_Quarter_Begin","BI-Multi_Date_Week","BI-Click_Blank_To_Select","BI-Basic_August","BI-Word_Align_Left","BI-Basic_November","BI-Font_Colour","BI-Multi_Date_Day_Prev","BI-Select_Part","BI-Multi_Date_Day_Next","BI-Less_Than","BI-Basic_February","BI-Multi_Date_Year","BI-Number_Index","BI-Multi_Date_Week_Prev","BI-Next_Page","BI-Right_Page","BI-Numerical_Interval_Signal_Value","BI-Basic_December","BI-Basic_Saturday","BI-Basic_Simple_Wednesday","BI-Multi_Date_Quarter_Next","BI-Basic_October","BI-Basic_Simple_Friday","BI-Basic_Save","BI-Numerical_Interval_Number_Value","BI-Previous_Page","BI-No_Select","BI-Basic_Clears","BI-Created_By_Me","BI-Basic_Simple_Tuesday","BI-Word_Align_Right","BI-Summary_Values","BI-Basic_Clear","BI-Upload_File_Size_Error","BI-Up_Page","BI-Basic_Simple_Sunday","BI-Multi_Date_Relative_Current_Time","BI-Selected_Data","BI-Multi_Date_Quarter","BI-Check_Selected","BI-Basic_Search","BI-Basic_May","BI-Continue_Select","BI-Please_Input_Positive_Integer","BI-Upload_File_Type_Error","BI-Upload_File_Error","BI-Basic_Friday","BI-Down_Page","BI-Basic_Monday","BI-Left_Page","BI-Transparent_Color","BI-Basic_Simple_Monday","BI-Multi_Date_Year_End","BI-Time_Interval_Error_Text","BI-Basic_Time","BI-Basic_OK","BI-Basic_Sure","BI-Basic_Simple_Thursday","BI-Multi_Date_Year_Prev","BI-Tiao_Data","BI-Basic_Italic","BI-Basic_Dynamic_Title","BI-Basic_Year","BI-Basic_Single_Quarter","BI-Basic_Month","BI-Basic_Week","BI-Basic_Day","BI-Basic_Work_Day","BI-Basic_Front","BI-Basic_Behind","BI-Basic_Empty","BI-Basic_Month_End","BI-Basic_Month_Begin","BI-Basic_Year_End","BI-Basic_Year_Begin","BI-Basic_Quarter_End","BI-Basic_Quarter_Begin","BI-Basic_Week_End","BI-Basic_Week_Begin","BI-Basic_Current_Day","BI-Basic_Begin_Start","BI-Basic_End_Stop","BI-Basic_Current_Year","BI-Basic_Year_Fen","BI-Basic_Current_Month","BI-Basic_Current_Quarter","BI-Basic_Year_Month","BI-Basic_Year_Quarter","BI-Basic_Input_Can_Not_Null","BI-Basic_Date_Time_Error_Text","BI-Basic_Input_From_To_Number","BI-Basic_Or","BI-Basic_And","BI-Conf_Add_Formula","BI-Conf_Add_Condition","BI-Conf_Formula_And","BI-Conf_Formula_Or","BI-Conf_Condition_And","BI-Conf_Condition_Or","BI-Microsoft_YaHei","BI-Apple_Light","BI-Font_Family","BI-Basic_Please_Input_Content","BI-Word_Align_Center","BI-Basic_Please_Enter_Number_Between","BI-More_Than","BI-More_And_Equal","BI-Please_Enter_SQL","BI-Basic_Click_To_Add_Text","BI-Basic_Please_Select","BI-Basic_Font_Color","BI-Basic_Background_Color","BI-Basic_Underline","BI-Basic_Param_Month","BI-Basic_Param_Day","BI-Basic_Param_Quarter","BI-Basic_Param_Week_Count","BI-Basic_Param_Hour","BI-Basic_Param_Minute","BI-Basic_Param_Second","BI-Basic_Param_Year","BI-Basic_Date_Day","BI-Basic_Hour_Sin","BI-Basic_Seconds","BI-Basic_Minute","BI-Basic_Wan","BI-Basic_Million","BI-Basic_Billion","BI-Basic_Quarter","BI-Basic_No_Select","BI-Basic_Now","_FD","_QN","MODE","BufferPool","_Shared","SharingPool","shared","cat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O,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,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,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,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,KAC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AO,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,IAG3D7jC,GAAG0zB,KAAKsS,SAAW,qBAMnB,WACI,GAAInT,WACA+sD,MAAO,CAEX5/E,IAAG6/E,YACC9T,IAAK,SAAUjqD,KAAMne,OACjB,GAAI3D,GAAGyoC,UAAU5V,OAAO/Q,OACpB,KAAM,IAAI2nB,OAAM,mCAEpB5W,QAAO/Q,MAAQne,OAGnB8G,IAAK,SAAUqX,MACX,MAAO+Q,QAAO/Q,WAQ1B,WACI,GAAIg+D,WACJ9/E,IAAG+/E,aACCD,QAASA,QACT/T,IAAK,SAAUjqD,KAAMk+D,QACjBF,QAAQh+D,MAAQk+D,QAGpBC,IAAK,WAGD,IAAK,GAFD5/E,MAAOqB,MAAM2c,UAAUvE,MAAMvZ,KAAKyd,UAAW,GAC7C/D,KAAO6lE,QACFxgD,EAAI,EAAGA,EAAIj/B,KAAKC,OAAQg/B,IAC7BrlB,KAAOA,MAAQA,KAAK5Z,KAAKi/B,GAE7B,OAAOrlB,OAGXxP,IAAK,WACD,MAAOzK,IAAGioC,UAAUloC,KAAKkgF,IAAI//E,MAAMH,KAAMie,aAG7CouB,OAAQ,SAAU7pC,WACPu9E,SAAQv9E,UAGtBvC,GAAGkgF","file":"utils.min.js","sourcesContent":["/**\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\"`\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 '&': '&',\r\n '<': '<',\r\n '>': '>',\r\n '\"': '"',\r\n \"'\": '''\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 * 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, & 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.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 */\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});/**\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\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 (src.endWith(\"?\") !== 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 str.replace(new RegExp(s1, \"gm\"), s2);\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 (str.startWith(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});/** 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});/**\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 },\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 obj1 + \"\" + obj2;\r\n }\r\n if (BI.isArray(obj1)) {\r\n return obj1.concat(obj2);\r\n }\r\n if (BI.isObject(obj1)) {\r\n return _.extend({}, obj1, obj2);\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\"], 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;\r\n\r\n function nextTickHandler () {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks = [];\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 () {\r\n p.then(nextTickHandler);\r\n };\r\n } else\r\n\r\n /* istanbul ignore if */\r\n if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(counter + \"\");\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function () {\r\n counter = (counter + 1) % 2;\r\n textNode.data = counter + \"\";\r\n };\r\n } else {\r\n timerFunc = function () {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n return function queueNextTick (cb) {\r\n var _resolve;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n cb.apply(null, args);\r\n }\r\n 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 if (!cb && typeof Promise !== \"undefined\") {\r\n return new Promise(function (resolve) {\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 * @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})();(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 \"&\": \"&\",\r\n \"\\\"\": \""\",\r\n \"<\": \"<\",\r\n \">\": \">\",\r\n \" \": \" \"\r\n };\r\n BI.htmlEncode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|\\\"|<|>|\\\\s\", function (v) {\r\n return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : \" \";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|"|<|>| \", function (v) {\r\n switch (v) {\r\n case \"&\":\r\n return \"&\";\r\n case \""\":\r\n return \"\\\"\";\r\n case \"<\":\r\n return \"<\";\r\n case \">\":\r\n return \">\";\r\n case \" \":\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 urlTemplate.replaceAll(\"\\\\{(.*?)\\\\}\", 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(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 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 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, 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 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 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);\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})();!(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 /*\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}());!(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 = \"YDYQSXMWZSSXJ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LJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\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: \"JC\",\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})();\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.i18n = {\r\n \"BI-Multi_Date_Quarter_End\": \"季度末\",\r\n \"BI-Multi_Date_Month_Begin\": \"月初\",\r\n \"BI-Multi_Date_YMD\": \"年月日\",\r\n \"BI-Custom_Color\": \"自定义颜色\",\r\n \"BI-Numerical_Interval_Input_Data\": \"请输入数值\",\r\n \"BI-Please_Input_Natural_Number\": \"请输入非负整数\",\r\n \"BI-No_More_Data\": \"无更多数据\",\r\n \"BI-Basic_Altogether\": \"共\",\r\n \"BI-Basic_Sunday\": \"星期日\",\r\n \"BI-Widget_Background_Colour\": \"组件背景\",\r\n \"BI-Color_Picker_Error_Text\": \"请输入0~255的正整数\",\r\n \"BI-Multi_Date_Month\": \"月\",\r\n \"BI-No_Selected_Item\": \"没有可选项\",\r\n \"BI-Multi_Date_Year_Begin\": \"年初\",\r\n \"BI-Quarter_1\": \"第1季度\",\r\n \"BI-Quarter_2\": \"第2季度\",\r\n \"BI-Quarter_3\": \"第3季度\",\r\n \"BI-Quarter_4\": \"第4季度\",\r\n \"BI-Multi_Date_Year_Next\": \"年后\",\r\n \"BI-Multi_Date_Month_Prev\": \"个月前\",\r\n \"BI-Month_Trigger_Error_Text\": \"请输入1~12的正整数\",\r\n \"BI-Less_And_Equal\": \"小于等于\",\r\n \"BI-Year_Trigger_Invalid_Text\": \"请输入有效时间\",\r\n \"BI-Multi_Date_Week_Next\": \"周后\",\r\n \"BI-Font_Size\": \"字号\",\r\n \"BI-Basic_Total\": \"共\",\r\n \"BI-Already_Selected\": \"已选择\",\r\n \"BI-Formula_Insert\": \"插入\",\r\n \"BI-Select_All\": \"全选\",\r\n \"BI-Basic_Tuesday\": \"星期二\",\r\n \"BI-Multi_Date_Month_End\": \"月末\",\r\n \"BI-Load_More\": \"点击加载更多数据\",\r\n \"BI-Basic_September\": \"九月\",\r\n \"BI-Current_Is_Last_Page\": \"当前已是最后一页\",\r\n \"BI-Basic_Auto\": \"自动\",\r\n \"BI-Basic_Count\": \"个\",\r\n \"BI-Basic_Value\": \"值\",\r\n \"BI-Basic_Unrestricted\": \"无限制\",\r\n \"BI-Quarter_Trigger_Error_Text\": \"请输入1~4的正整数\",\r\n \"BI-Basic_More\": \"更多\",\r\n \"BI-Basic_Wednesday\": \"星期三\",\r\n \"BI-Basic_Bold\": \"加粗\",\r\n \"BI-Basic_Simple_Saturday\": \"六\",\r\n \"BI-Multi_Date_Month_Next\": \"个月后\",\r\n \"BI-Basic_March\": \"三月\",\r\n \"BI-Current_Is_First_Page\": \"当前已是第一页\",\r\n \"BI-Basic_Thursday\": \"星期四\",\r\n \"BI-Basic_Prompt\": \"提示\",\r\n \"BI-Multi_Date_Today\": \"今天\",\r\n \"BI-Multi_Date_Quarter_Prev\": \"个季度前\",\r\n \"BI-Row_Header\": \"行表头\",\r\n \"BI-Date_Trigger_Error_Text\": \"日期格式示例:2015-3-11\",\r\n \"BI-Basic_Cancel\": \"取消\",\r\n \"BI-Basic_January\": \"一月\",\r\n \"BI-Basic_June\": \"六月\",\r\n \"BI-Basic_July\": \"七月\",\r\n \"BI-Basic_April\": \"四月\",\r\n \"BI-Multi_Date_Quarter_Begin\": \"季度初\",\r\n \"BI-Multi_Date_Week\": \"周\",\r\n \"BI-Click_Blank_To_Select\": \"点击\\\"空格键\\\"选中完全匹配项\",\r\n \"BI-Basic_August\": \"八月\",\r\n \"BI-Word_Align_Left\": \"文字居左\",\r\n \"BI-Basic_November\": \"十一月\",\r\n \"BI-Font_Colour\": \"字体颜色\",\r\n \"BI-Multi_Date_Day_Prev\": \"天前\",\r\n \"BI-Select_Part\": \"部分选择\",\r\n \"BI-Multi_Date_Day_Next\": \"天后\",\r\n \"BI-Less_Than\": \"小于\",\r\n \"BI-Basic_February\": \"二月\",\r\n \"BI-Multi_Date_Year\": \"年\",\r\n \"BI-Number_Index\": \"序号\",\r\n \"BI-Multi_Date_Week_Prev\": \"周前\",\r\n \"BI-Next_Page\": \"下一页\",\r\n \"BI-Right_Page\": \"向右翻页\",\r\n \"BI-Numerical_Interval_Signal_Value\": \"前后值相等,请将操作符改为“≤”\",\r\n \"BI-Basic_December\": \"十二月\",\r\n \"BI-Basic_Saturday\": \"星期六\",\r\n \"BI-Basic_Simple_Wednesday\": \"三\",\r\n \"BI-Multi_Date_Quarter_Next\": \"个季度后\",\r\n \"BI-Basic_October\": \"十月\",\r\n \"BI-Basic_Simple_Friday\": \"五\",\r\n \"BI-Basic_Save\": \"保存\",\r\n \"BI-Numerical_Interval_Number_Value\": \"请保证前面的数值小于/等于后面的数值\",\r\n \"BI-Previous_Page\": \"上一页\",\r\n \"BI-No_Select\": \"搜索结果为空\",\r\n \"BI-Basic_Clears\": \"清空\",\r\n \"BI-Created_By_Me\": \"我创建的\",\r\n \"BI-Basic_Simple_Tuesday\": \"二\",\r\n \"BI-Word_Align_Right\": \"文字居右\",\r\n \"BI-Summary_Values\": \"汇总\",\r\n \"BI-Basic_Clear\": \"清除\",\r\n \"BI-Upload_File_Size_Error\": \"文件大小不支持\",\r\n \"BI-Up_Page\": \"向上翻页\",\r\n \"BI-Basic_Simple_Sunday\": \"日\",\r\n \"BI-Multi_Date_Relative_Current_Time\": \"相对当前时间\",\r\n \"BI-Selected_Data\": \"已选数据:\",\r\n \"BI-Multi_Date_Quarter\": \"季度\",\r\n \"BI-Check_Selected\": \"查看已选\",\r\n \"BI-Basic_Search\": \"搜索\",\r\n \"BI-Basic_May\": \"五月\",\r\n \"BI-Continue_Select\": \"继续选择\",\r\n \"BI-Please_Input_Positive_Integer\": \"请输入正整数\",\r\n \"BI-Upload_File_Type_Error\": \"文件类型不支持\",\r\n \"BI-Upload_File_Error\": \"文件上传失败\",\r\n \"BI-Basic_Friday\": \"星期五\",\r\n \"BI-Down_Page\": \"向下翻页\",\r\n \"BI-Basic_Monday\": \"星期一\",\r\n \"BI-Left_Page\": \"向左翻页\",\r\n \"BI-Transparent_Color\": \"透明\",\r\n \"BI-Basic_Simple_Monday\": \"一\",\r\n \"BI-Multi_Date_Year_End\": \"年末\",\r\n \"BI-Time_Interval_Error_Text\": \"请保证开始时间早于/等于结束时间\",\r\n \"BI-Basic_Time\": \"时间\",\r\n \"BI-Basic_OK\": \"确定\",\r\n \"BI-Basic_Sure\": \"确定\",\r\n \"BI-Basic_Simple_Thursday\": \"四\",\r\n \"BI-Multi_Date_Year_Prev\": \"年前\",\r\n \"BI-Tiao_Data\": \"条数据\",\r\n \"BI-Basic_Italic\": \"斜体\",\r\n \"BI-Basic_Dynamic_Title\": \"动态时间\",\r\n \"BI-Basic_Year\": \"年\",\r\n \"BI-Basic_Single_Quarter\": \"季\",\r\n \"BI-Basic_Month\": \"月\",\r\n \"BI-Basic_Week\": \"周\",\r\n \"BI-Basic_Day\": \"天\",\r\n \"BI-Basic_Work_Day\": \"工作日\",\r\n \"BI-Basic_Front\": \"前\",\r\n \"BI-Basic_Behind\": \"后\",\r\n \"BI-Basic_Empty\": \"空\",\r\n \"BI-Basic_Month_End\": \"月末\",\r\n \"BI-Basic_Month_Begin\": \"月初\",\r\n \"BI-Basic_Year_End\": \"年末\",\r\n \"BI-Basic_Year_Begin\": \"年初\",\r\n \"BI-Basic_Quarter_End\": \"季末\",\r\n \"BI-Basic_Quarter_Begin\": \"季初\",\r\n \"BI-Basic_Week_End\": \"周末\",\r\n \"BI-Basic_Week_Begin\": \"周初\",\r\n \"BI-Basic_Current_Day\": \"当天\",\r\n \"BI-Basic_Begin_Start\": \"初\",\r\n \"BI-Basic_End_Stop\": \"末\",\r\n \"BI-Basic_Current_Year\": \"今年\",\r\n \"BI-Basic_Year_Fen\": \"年份\",\r\n \"BI-Basic_Current_Month\": \"本月\",\r\n \"BI-Basic_Current_Quarter\": \"本季度\",\r\n \"BI-Basic_Year_Month\": \"年月\",\r\n \"BI-Basic_Year_Quarter\": \"年季度\",\r\n \"BI-Basic_Input_Can_Not_Null\": \"输入框不能为空\",\r\n \"BI-Basic_Date_Time_Error_Text\": \"日期格式示例:2015-3-11 00:00:00\",\r\n \"BI-Basic_Input_From_To_Number\": \"请输入{R1}的数值\",\r\n \"BI-Basic_Or\": \"或\",\r\n \"BI-Basic_And\": \"且\",\r\n \"BI-Conf_Add_Formula\": \"添加公式\",\r\n \"BI-Conf_Add_Condition\": \"添加条件\",\r\n \"BI-Conf_Formula_And\": \"且公式条件\",\r\n \"BI-Conf_Formula_Or\": \"或公式条件\",\r\n \"BI-Conf_Condition_And\": \"且条件\",\r\n \"BI-Conf_Condition_Or\": \"或条件\",\r\n \"BI-Microsoft_YaHei\": \"微软雅黑\",\r\n \"BI-Apple_Light\": \"苹方-light\",\r\n \"BI-Font_Family\": \"字体\",\r\n \"BI-Basic_Please_Input_Content\": \"请输入内容\",\r\n \"BI-Word_Align_Center\": \"文字居中\",\r\n \"BI-Basic_Please_Enter_Number_Between\": \"请输入{R1}-{R2}的值\",\r\n \"BI-More_Than\": \"大于\",\r\n \"BI-More_And_Equal\": \"大于等于\",\r\n \"BI-Please_Enter_SQL\": \"请输入SQL\",\r\n \"BI-Basic_Click_To_Add_Text\": \"+点击新增\\\"{R1}\\\"\",\r\n \"BI-Basic_Please_Select\": \"请选择\",\r\n \"BI-Basic_Font_Color\": \"文字颜色\",\r\n \"BI-Basic_Background_Color\": \"背景色\",\r\n \"BI-Basic_Underline\": \"下划线\",\r\n \"BI-Basic_Param_Month\": \"{R1}月\",\r\n \"BI-Basic_Param_Day\": \"{R1}日\",\r\n \"BI-Basic_Param_Quarter\": \"{R1}季度\",\r\n \"BI-Basic_Param_Week_Count\": \"第{R1}周\",\r\n \"BI-Basic_Param_Hour\": \"{R1}时\",\r\n \"BI-Basic_Param_Minute\": \"{R1}分\",\r\n \"BI-Basic_Param_Second\": \"{R1}秒\",\r\n \"BI-Basic_Param_Year\": \"{R1}年\",\r\n \"BI-Basic_Date_Day\": \"日\",\r\n \"BI-Basic_Hour_Sin\": \"时\",\r\n \"BI-Basic_Seconds\": \"秒\",\r\n \"BI-Basic_Minute\": \"分\",\r\n \"BI-Basic_Wan\": \"万\",\r\n \"BI-Basic_Million\": \"百万\",\r\n \"BI-Basic_Billion\": \"亿\",\r\n \"BI-Basic_Quarter\": \"季度\",\r\n \"BI-Basic_No_Select\": \"不选\",\r\n \"BI-Basic_Now\": \"此刻\"\r\n};/**\r\n * Created by astronaut007 on 2018/8/8\r\n */\r\n// 牵扯到国际化这些常量在页面加载后再生效\r\n// full day names\r\nBI.Date = BI.Date || {};\r\nBI.Date._DN = [\"星期日\",\r\n \"星期一\",\r\n \"星期二\",\r\n \"星期三\",\r\n \"星期四\",\r\n \"星期五\",\r\n \"星期六\",\r\n \"星期日\"];\r\n\r\n// short day names\r\nBI.Date._SDN = [\"日\",\r\n \"一\",\r\n \"二\",\r\n \"三\",\r\n \"四\",\r\n \"五\",\r\n \"六\",\r\n \"日\"];\r\n\r\n// Monday first, etc.\r\nBI.Date._FD = 1;\r\n\r\n// full month namesdat\r\nBI.Date._MN = [\r\n \"一月\",\r\n \"二月\",\r\n \"三月\",\r\n \"四月\",\r\n \"五月\",\r\n \"六月\",\r\n \"七月\",\r\n \"八月\",\r\n \"九月\",\r\n \"十月\",\r\n \"十一月\",\r\n \"十二月\"];\r\n\r\n// short month names\r\nBI.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\nBI.Date._QN = [\"\", \"第1季度\",\r\n \"第2季度\",\r\n \"第3季度\",\r\n \"第4季度\"];\r\n\r\n/** Adds the number of days array to the Date object. */\r\nBI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以\r\nBI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];\r\n/**\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\n\n//# sourceMappingURL=utils.js.map"]} |