Edit File by line
/home/zeestwma/richards.../wp-inclu.../js
File: underscore.js
(function (global, factory) {
[0] Fix | Delete
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
[1] Fix | Delete
typeof define === 'function' && define.amd ? define('underscore', factory) :
[2] Fix | Delete
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
[3] Fix | Delete
var current = global._;
[4] Fix | Delete
var exports = global._ = factory();
[5] Fix | Delete
exports.noConflict = function () { global._ = current; return exports; };
[6] Fix | Delete
}()));
[7] Fix | Delete
}(this, (function () {
[8] Fix | Delete
// Underscore.js 1.13.7
[9] Fix | Delete
// https://underscorejs.org
[10] Fix | Delete
// (c) 2009-2024 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
[11] Fix | Delete
// Underscore may be freely distributed under the MIT license.
[12] Fix | Delete
[13] Fix | Delete
// Current version.
[14] Fix | Delete
var VERSION = '1.13.7';
[15] Fix | Delete
[16] Fix | Delete
// Establish the root object, `window` (`self`) in the browser, `global`
[17] Fix | Delete
// on the server, or `this` in some virtual machines. We use `self`
[18] Fix | Delete
// instead of `window` for `WebWorker` support.
[19] Fix | Delete
var root = (typeof self == 'object' && self.self === self && self) ||
[20] Fix | Delete
(typeof global == 'object' && global.global === global && global) ||
[21] Fix | Delete
Function('return this')() ||
[22] Fix | Delete
{};
[23] Fix | Delete
[24] Fix | Delete
// Save bytes in the minified (but not gzipped) version:
[25] Fix | Delete
var ArrayProto = Array.prototype, ObjProto = Object.prototype;
[26] Fix | Delete
var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;
[27] Fix | Delete
[28] Fix | Delete
// Create quick reference variables for speed access to core prototypes.
[29] Fix | Delete
var push = ArrayProto.push,
[30] Fix | Delete
slice = ArrayProto.slice,
[31] Fix | Delete
toString = ObjProto.toString,
[32] Fix | Delete
hasOwnProperty = ObjProto.hasOwnProperty;
[33] Fix | Delete
[34] Fix | Delete
// Modern feature detection.
[35] Fix | Delete
var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',
[36] Fix | Delete
supportsDataView = typeof DataView !== 'undefined';
[37] Fix | Delete
[38] Fix | Delete
// All **ECMAScript 5+** native function implementations that we hope to use
[39] Fix | Delete
// are declared here.
[40] Fix | Delete
var nativeIsArray = Array.isArray,
[41] Fix | Delete
nativeKeys = Object.keys,
[42] Fix | Delete
nativeCreate = Object.create,
[43] Fix | Delete
nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;
[44] Fix | Delete
[45] Fix | Delete
// Create references to these builtin functions because we override them.
[46] Fix | Delete
var _isNaN = isNaN,
[47] Fix | Delete
_isFinite = isFinite;
[48] Fix | Delete
[49] Fix | Delete
// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.
[50] Fix | Delete
var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
[51] Fix | Delete
var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',
[52] Fix | Delete
'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
[53] Fix | Delete
[54] Fix | Delete
// The largest integer that can be represented exactly.
[55] Fix | Delete
var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
[56] Fix | Delete
[57] Fix | Delete
// Some functions take a variable number of arguments, or a few expected
[58] Fix | Delete
// arguments at the beginning and then a variable number of values to operate
[59] Fix | Delete
// on. This helper accumulates all remaining arguments past the function’s
[60] Fix | Delete
// argument length (or an explicit `startIndex`), into an array that becomes
[61] Fix | Delete
// the last argument. Similar to ES6’s "rest parameter".
[62] Fix | Delete
function restArguments(func, startIndex) {
[63] Fix | Delete
startIndex = startIndex == null ? func.length - 1 : +startIndex;
[64] Fix | Delete
return function() {
[65] Fix | Delete
var length = Math.max(arguments.length - startIndex, 0),
[66] Fix | Delete
rest = Array(length),
[67] Fix | Delete
index = 0;
[68] Fix | Delete
for (; index < length; index++) {
[69] Fix | Delete
rest[index] = arguments[index + startIndex];
[70] Fix | Delete
}
[71] Fix | Delete
switch (startIndex) {
[72] Fix | Delete
case 0: return func.call(this, rest);
[73] Fix | Delete
case 1: return func.call(this, arguments[0], rest);
[74] Fix | Delete
case 2: return func.call(this, arguments[0], arguments[1], rest);
[75] Fix | Delete
}
[76] Fix | Delete
var args = Array(startIndex + 1);
[77] Fix | Delete
for (index = 0; index < startIndex; index++) {
[78] Fix | Delete
args[index] = arguments[index];
[79] Fix | Delete
}
[80] Fix | Delete
args[startIndex] = rest;
[81] Fix | Delete
return func.apply(this, args);
[82] Fix | Delete
};
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
// Is a given variable an object?
[86] Fix | Delete
function isObject(obj) {
[87] Fix | Delete
var type = typeof obj;
[88] Fix | Delete
return type === 'function' || (type === 'object' && !!obj);
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
// Is a given value equal to null?
[92] Fix | Delete
function isNull(obj) {
[93] Fix | Delete
return obj === null;
[94] Fix | Delete
}
[95] Fix | Delete
[96] Fix | Delete
// Is a given variable undefined?
[97] Fix | Delete
function isUndefined(obj) {
[98] Fix | Delete
return obj === void 0;
[99] Fix | Delete
}
[100] Fix | Delete
[101] Fix | Delete
// Is a given value a boolean?
[102] Fix | Delete
function isBoolean(obj) {
[103] Fix | Delete
return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
// Is a given value a DOM element?
[107] Fix | Delete
function isElement(obj) {
[108] Fix | Delete
return !!(obj && obj.nodeType === 1);
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
// Internal function for creating a `toString`-based type tester.
[112] Fix | Delete
function tagTester(name) {
[113] Fix | Delete
var tag = '[object ' + name + ']';
[114] Fix | Delete
return function(obj) {
[115] Fix | Delete
return toString.call(obj) === tag;
[116] Fix | Delete
};
[117] Fix | Delete
}
[118] Fix | Delete
[119] Fix | Delete
var isString = tagTester('String');
[120] Fix | Delete
[121] Fix | Delete
var isNumber = tagTester('Number');
[122] Fix | Delete
[123] Fix | Delete
var isDate = tagTester('Date');
[124] Fix | Delete
[125] Fix | Delete
var isRegExp = tagTester('RegExp');
[126] Fix | Delete
[127] Fix | Delete
var isError = tagTester('Error');
[128] Fix | Delete
[129] Fix | Delete
var isSymbol = tagTester('Symbol');
[130] Fix | Delete
[131] Fix | Delete
var isArrayBuffer = tagTester('ArrayBuffer');
[132] Fix | Delete
[133] Fix | Delete
var isFunction = tagTester('Function');
[134] Fix | Delete
[135] Fix | Delete
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
[136] Fix | Delete
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
[137] Fix | Delete
var nodelist = root.document && root.document.childNodes;
[138] Fix | Delete
if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
[139] Fix | Delete
isFunction = function(obj) {
[140] Fix | Delete
return typeof obj == 'function' || false;
[141] Fix | Delete
};
[142] Fix | Delete
}
[143] Fix | Delete
[144] Fix | Delete
var isFunction$1 = isFunction;
[145] Fix | Delete
[146] Fix | Delete
var hasObjectTag = tagTester('Object');
[147] Fix | Delete
[148] Fix | Delete
// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.
[149] Fix | Delete
// In IE 11, the most common among them, this problem also applies to
[150] Fix | Delete
// `Map`, `WeakMap` and `Set`.
[151] Fix | Delete
// Also, there are cases where an application can override the native
[152] Fix | Delete
// `DataView` object, in cases like that we can't use the constructor
[153] Fix | Delete
// safely and should just rely on alternate `DataView` checks
[154] Fix | Delete
var hasDataViewBug = (
[155] Fix | Delete
supportsDataView && (!/\[native code\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8))))
[156] Fix | Delete
),
[157] Fix | Delete
isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));
[158] Fix | Delete
[159] Fix | Delete
var isDataView = tagTester('DataView');
[160] Fix | Delete
[161] Fix | Delete
// In IE 10 - Edge 13, we need a different heuristic
[162] Fix | Delete
// to determine whether an object is a `DataView`.
[163] Fix | Delete
// Also, in cases where the native `DataView` is
[164] Fix | Delete
// overridden we can't rely on the tag itself.
[165] Fix | Delete
function alternateIsDataView(obj) {
[166] Fix | Delete
return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer);
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
var isDataView$1 = (hasDataViewBug ? alternateIsDataView : isDataView);
[170] Fix | Delete
[171] Fix | Delete
// Is a given value an array?
[172] Fix | Delete
// Delegates to ECMA5's native `Array.isArray`.
[173] Fix | Delete
var isArray = nativeIsArray || tagTester('Array');
[174] Fix | Delete
[175] Fix | Delete
// Internal function to check whether `key` is an own property name of `obj`.
[176] Fix | Delete
function has$1(obj, key) {
[177] Fix | Delete
return obj != null && hasOwnProperty.call(obj, key);
[178] Fix | Delete
}
[179] Fix | Delete
[180] Fix | Delete
var isArguments = tagTester('Arguments');
[181] Fix | Delete
[182] Fix | Delete
// Define a fallback version of the method in browsers (ahem, IE < 9), where
[183] Fix | Delete
// there isn't any inspectable "Arguments" type.
[184] Fix | Delete
(function() {
[185] Fix | Delete
if (!isArguments(arguments)) {
[186] Fix | Delete
isArguments = function(obj) {
[187] Fix | Delete
return has$1(obj, 'callee');
[188] Fix | Delete
};
[189] Fix | Delete
}
[190] Fix | Delete
}());
[191] Fix | Delete
[192] Fix | Delete
var isArguments$1 = isArguments;
[193] Fix | Delete
[194] Fix | Delete
// Is a given object a finite number?
[195] Fix | Delete
function isFinite$1(obj) {
[196] Fix | Delete
return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));
[197] Fix | Delete
}
[198] Fix | Delete
[199] Fix | Delete
// Is the given value `NaN`?
[200] Fix | Delete
function isNaN$1(obj) {
[201] Fix | Delete
return isNumber(obj) && _isNaN(obj);
[202] Fix | Delete
}
[203] Fix | Delete
[204] Fix | Delete
// Predicate-generating function. Often useful outside of Underscore.
[205] Fix | Delete
function constant(value) {
[206] Fix | Delete
return function() {
[207] Fix | Delete
return value;
[208] Fix | Delete
};
[209] Fix | Delete
}
[210] Fix | Delete
[211] Fix | Delete
// Common internal logic for `isArrayLike` and `isBufferLike`.
[212] Fix | Delete
function createSizePropertyCheck(getSizeProperty) {
[213] Fix | Delete
return function(collection) {
[214] Fix | Delete
var sizeProperty = getSizeProperty(collection);
[215] Fix | Delete
return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
[216] Fix | Delete
}
[217] Fix | Delete
}
[218] Fix | Delete
[219] Fix | Delete
// Internal helper to generate a function to obtain property `key` from `obj`.
[220] Fix | Delete
function shallowProperty(key) {
[221] Fix | Delete
return function(obj) {
[222] Fix | Delete
return obj == null ? void 0 : obj[key];
[223] Fix | Delete
};
[224] Fix | Delete
}
[225] Fix | Delete
[226] Fix | Delete
// Internal helper to obtain the `byteLength` property of an object.
[227] Fix | Delete
var getByteLength = shallowProperty('byteLength');
[228] Fix | Delete
[229] Fix | Delete
// Internal helper to determine whether we should spend extensive checks against
[230] Fix | Delete
// `ArrayBuffer` et al.
[231] Fix | Delete
var isBufferLike = createSizePropertyCheck(getByteLength);
[232] Fix | Delete
[233] Fix | Delete
// Is a given value a typed array?
[234] Fix | Delete
var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;
[235] Fix | Delete
function isTypedArray(obj) {
[236] Fix | Delete
// `ArrayBuffer.isView` is the most future-proof, so use it when available.
[237] Fix | Delete
// Otherwise, fall back on the above regular expression.
[238] Fix | Delete
return nativeIsView ? (nativeIsView(obj) && !isDataView$1(obj)) :
[239] Fix | Delete
isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));
[240] Fix | Delete
}
[241] Fix | Delete
[242] Fix | Delete
var isTypedArray$1 = supportsArrayBuffer ? isTypedArray : constant(false);
[243] Fix | Delete
[244] Fix | Delete
// Internal helper to obtain the `length` property of an object.
[245] Fix | Delete
var getLength = shallowProperty('length');
[246] Fix | Delete
[247] Fix | Delete
// Internal helper to create a simple lookup structure.
[248] Fix | Delete
// `collectNonEnumProps` used to depend on `_.contains`, but this led to
[249] Fix | Delete
// circular imports. `emulatedSet` is a one-off solution that only works for
[250] Fix | Delete
// arrays of strings.
[251] Fix | Delete
function emulatedSet(keys) {
[252] Fix | Delete
var hash = {};
[253] Fix | Delete
for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;
[254] Fix | Delete
return {
[255] Fix | Delete
contains: function(key) { return hash[key] === true; },
[256] Fix | Delete
push: function(key) {
[257] Fix | Delete
hash[key] = true;
[258] Fix | Delete
return keys.push(key);
[259] Fix | Delete
}
[260] Fix | Delete
};
[261] Fix | Delete
}
[262] Fix | Delete
[263] Fix | Delete
// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't
[264] Fix | Delete
// be iterated by `for key in ...` and thus missed. Extends `keys` in place if
[265] Fix | Delete
// needed.
[266] Fix | Delete
function collectNonEnumProps(obj, keys) {
[267] Fix | Delete
keys = emulatedSet(keys);
[268] Fix | Delete
var nonEnumIdx = nonEnumerableProps.length;
[269] Fix | Delete
var constructor = obj.constructor;
[270] Fix | Delete
var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto;
[271] Fix | Delete
[272] Fix | Delete
// Constructor is a special case.
[273] Fix | Delete
var prop = 'constructor';
[274] Fix | Delete
if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
[275] Fix | Delete
[276] Fix | Delete
while (nonEnumIdx--) {
[277] Fix | Delete
prop = nonEnumerableProps[nonEnumIdx];
[278] Fix | Delete
if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {
[279] Fix | Delete
keys.push(prop);
[280] Fix | Delete
}
[281] Fix | Delete
}
[282] Fix | Delete
}
[283] Fix | Delete
[284] Fix | Delete
// Retrieve the names of an object's own properties.
[285] Fix | Delete
// Delegates to **ECMAScript 5**'s native `Object.keys`.
[286] Fix | Delete
function keys(obj) {
[287] Fix | Delete
if (!isObject(obj)) return [];
[288] Fix | Delete
if (nativeKeys) return nativeKeys(obj);
[289] Fix | Delete
var keys = [];
[290] Fix | Delete
for (var key in obj) if (has$1(obj, key)) keys.push(key);
[291] Fix | Delete
// Ahem, IE < 9.
[292] Fix | Delete
if (hasEnumBug) collectNonEnumProps(obj, keys);
[293] Fix | Delete
return keys;
[294] Fix | Delete
}
[295] Fix | Delete
[296] Fix | Delete
// Is a given array, string, or object empty?
[297] Fix | Delete
// An "empty" object has no enumerable own-properties.
[298] Fix | Delete
function isEmpty(obj) {
[299] Fix | Delete
if (obj == null) return true;
[300] Fix | Delete
// Skip the more expensive `toString`-based type checks if `obj` has no
[301] Fix | Delete
// `.length`.
[302] Fix | Delete
var length = getLength(obj);
[303] Fix | Delete
if (typeof length == 'number' && (
[304] Fix | Delete
isArray(obj) || isString(obj) || isArguments$1(obj)
[305] Fix | Delete
)) return length === 0;
[306] Fix | Delete
return getLength(keys(obj)) === 0;
[307] Fix | Delete
}
[308] Fix | Delete
[309] Fix | Delete
// Returns whether an object has a given set of `key:value` pairs.
[310] Fix | Delete
function isMatch(object, attrs) {
[311] Fix | Delete
var _keys = keys(attrs), length = _keys.length;
[312] Fix | Delete
if (object == null) return !length;
[313] Fix | Delete
var obj = Object(object);
[314] Fix | Delete
for (var i = 0; i < length; i++) {
[315] Fix | Delete
var key = _keys[i];
[316] Fix | Delete
if (attrs[key] !== obj[key] || !(key in obj)) return false;
[317] Fix | Delete
}
[318] Fix | Delete
return true;
[319] Fix | Delete
}
[320] Fix | Delete
[321] Fix | Delete
// If Underscore is called as a function, it returns a wrapped object that can
[322] Fix | Delete
// be used OO-style. This wrapper holds altered versions of all functions added
[323] Fix | Delete
// through `_.mixin`. Wrapped objects may be chained.
[324] Fix | Delete
function _$1(obj) {
[325] Fix | Delete
if (obj instanceof _$1) return obj;
[326] Fix | Delete
if (!(this instanceof _$1)) return new _$1(obj);
[327] Fix | Delete
this._wrapped = obj;
[328] Fix | Delete
}
[329] Fix | Delete
[330] Fix | Delete
_$1.VERSION = VERSION;
[331] Fix | Delete
[332] Fix | Delete
// Extracts the result from a wrapped and chained object.
[333] Fix | Delete
_$1.prototype.value = function() {
[334] Fix | Delete
return this._wrapped;
[335] Fix | Delete
};
[336] Fix | Delete
[337] Fix | Delete
// Provide unwrapping proxies for some methods used in engine operations
[338] Fix | Delete
// such as arithmetic and JSON stringification.
[339] Fix | Delete
_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
[340] Fix | Delete
[341] Fix | Delete
_$1.prototype.toString = function() {
[342] Fix | Delete
return String(this._wrapped);
[343] Fix | Delete
};
[344] Fix | Delete
[345] Fix | Delete
// Internal function to wrap or shallow-copy an ArrayBuffer,
[346] Fix | Delete
// typed array or DataView to a new view, reusing the buffer.
[347] Fix | Delete
function toBufferView(bufferSource) {
[348] Fix | Delete
return new Uint8Array(
[349] Fix | Delete
bufferSource.buffer || bufferSource,
[350] Fix | Delete
bufferSource.byteOffset || 0,
[351] Fix | Delete
getByteLength(bufferSource)
[352] Fix | Delete
);
[353] Fix | Delete
}
[354] Fix | Delete
[355] Fix | Delete
// We use this string twice, so give it a name for minification.
[356] Fix | Delete
var tagDataView = '[object DataView]';
[357] Fix | Delete
[358] Fix | Delete
// Internal recursive comparison function for `_.isEqual`.
[359] Fix | Delete
function eq(a, b, aStack, bStack) {
[360] Fix | Delete
// Identical objects are equal. `0 === -0`, but they aren't identical.
[361] Fix | Delete
// See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).
[362] Fix | Delete
if (a === b) return a !== 0 || 1 / a === 1 / b;
[363] Fix | Delete
// `null` or `undefined` only equal to itself (strict comparison).
[364] Fix | Delete
if (a == null || b == null) return false;
[365] Fix | Delete
// `NaN`s are equivalent, but non-reflexive.
[366] Fix | Delete
if (a !== a) return b !== b;
[367] Fix | Delete
// Exhaust primitive checks
[368] Fix | Delete
var type = typeof a;
[369] Fix | Delete
if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
[370] Fix | Delete
return deepEq(a, b, aStack, bStack);
[371] Fix | Delete
}
[372] Fix | Delete
[373] Fix | Delete
// Internal recursive comparison function for `_.isEqual`.
[374] Fix | Delete
function deepEq(a, b, aStack, bStack) {
[375] Fix | Delete
// Unwrap any wrapped objects.
[376] Fix | Delete
if (a instanceof _$1) a = a._wrapped;
[377] Fix | Delete
if (b instanceof _$1) b = b._wrapped;
[378] Fix | Delete
// Compare `[[Class]]` names.
[379] Fix | Delete
var className = toString.call(a);
[380] Fix | Delete
if (className !== toString.call(b)) return false;
[381] Fix | Delete
// Work around a bug in IE 10 - Edge 13.
[382] Fix | Delete
if (hasDataViewBug && className == '[object Object]' && isDataView$1(a)) {
[383] Fix | Delete
if (!isDataView$1(b)) return false;
[384] Fix | Delete
className = tagDataView;
[385] Fix | Delete
}
[386] Fix | Delete
switch (className) {
[387] Fix | Delete
// These types are compared by value.
[388] Fix | Delete
case '[object RegExp]':
[389] Fix | Delete
// RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')
[390] Fix | Delete
case '[object String]':
[391] Fix | Delete
// Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
[392] Fix | Delete
// equivalent to `new String("5")`.
[393] Fix | Delete
return '' + a === '' + b;
[394] Fix | Delete
case '[object Number]':
[395] Fix | Delete
// `NaN`s are equivalent, but non-reflexive.
[396] Fix | Delete
// Object(NaN) is equivalent to NaN.
[397] Fix | Delete
if (+a !== +a) return +b !== +b;
[398] Fix | Delete
// An `egal` comparison is performed for other numeric values.
[399] Fix | Delete
return +a === 0 ? 1 / +a === 1 / b : +a === +b;
[400] Fix | Delete
case '[object Date]':
[401] Fix | Delete
case '[object Boolean]':
[402] Fix | Delete
// Coerce dates and booleans to numeric primitive values. Dates are compared by their
[403] Fix | Delete
// millisecond representations. Note that invalid dates with millisecond representations
[404] Fix | Delete
// of `NaN` are not equivalent.
[405] Fix | Delete
return +a === +b;
[406] Fix | Delete
case '[object Symbol]':
[407] Fix | Delete
return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);
[408] Fix | Delete
case '[object ArrayBuffer]':
[409] Fix | Delete
case tagDataView:
[410] Fix | Delete
// Coerce to typed array so we can fall through.
[411] Fix | Delete
return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);
[412] Fix | Delete
}
[413] Fix | Delete
[414] Fix | Delete
var areArrays = className === '[object Array]';
[415] Fix | Delete
if (!areArrays && isTypedArray$1(a)) {
[416] Fix | Delete
var byteLength = getByteLength(a);
[417] Fix | Delete
if (byteLength !== getByteLength(b)) return false;
[418] Fix | Delete
if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;
[419] Fix | Delete
areArrays = true;
[420] Fix | Delete
}
[421] Fix | Delete
if (!areArrays) {
[422] Fix | Delete
if (typeof a != 'object' || typeof b != 'object') return false;
[423] Fix | Delete
[424] Fix | Delete
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
[425] Fix | Delete
// from different frames are.
[426] Fix | Delete
var aCtor = a.constructor, bCtor = b.constructor;
[427] Fix | Delete
if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor &&
[428] Fix | Delete
isFunction$1(bCtor) && bCtor instanceof bCtor)
[429] Fix | Delete
&& ('constructor' in a && 'constructor' in b)) {
[430] Fix | Delete
return false;
[431] Fix | Delete
}
[432] Fix | Delete
}
[433] Fix | Delete
// Assume equality for cyclic structures. The algorithm for detecting cyclic
[434] Fix | Delete
// structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
[435] Fix | Delete
[436] Fix | Delete
// Initializing stack of traversed objects.
[437] Fix | Delete
// It's done here since we only need them for objects and arrays comparison.
[438] Fix | Delete
aStack = aStack || [];
[439] Fix | Delete
bStack = bStack || [];
[440] Fix | Delete
var length = aStack.length;
[441] Fix | Delete
while (length--) {
[442] Fix | Delete
// Linear search. Performance is inversely proportional to the number of
[443] Fix | Delete
// unique nested structures.
[444] Fix | Delete
if (aStack[length] === a) return bStack[length] === b;
[445] Fix | Delete
}
[446] Fix | Delete
[447] Fix | Delete
// Add the first object to the stack of traversed objects.
[448] Fix | Delete
aStack.push(a);
[449] Fix | Delete
bStack.push(b);
[450] Fix | Delete
[451] Fix | Delete
// Recursively compare objects and arrays.
[452] Fix | Delete
if (areArrays) {
[453] Fix | Delete
// Compare array lengths to determine if a deep comparison is necessary.
[454] Fix | Delete
length = a.length;
[455] Fix | Delete
if (length !== b.length) return false;
[456] Fix | Delete
// Deep compare the contents, ignoring non-numeric properties.
[457] Fix | Delete
while (length--) {
[458] Fix | Delete
if (!eq(a[length], b[length], aStack, bStack)) return false;
[459] Fix | Delete
}
[460] Fix | Delete
} else {
[461] Fix | Delete
// Deep compare objects.
[462] Fix | Delete
var _keys = keys(a), key;
[463] Fix | Delete
length = _keys.length;
[464] Fix | Delete
// Ensure that both objects contain the same number of properties before comparing deep equality.
[465] Fix | Delete
if (keys(b).length !== length) return false;
[466] Fix | Delete
while (length--) {
[467] Fix | Delete
// Deep compare each member
[468] Fix | Delete
key = _keys[length];
[469] Fix | Delete
if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
[470] Fix | Delete
}
[471] Fix | Delete
}
[472] Fix | Delete
// Remove the first object from the stack of traversed objects.
[473] Fix | Delete
aStack.pop();
[474] Fix | Delete
bStack.pop();
[475] Fix | Delete
return true;
[476] Fix | Delete
}
[477] Fix | Delete
[478] Fix | Delete
// Perform a deep comparison to check if two objects are equal.
[479] Fix | Delete
function isEqual(a, b) {
[480] Fix | Delete
return eq(a, b);
[481] Fix | Delete
}
[482] Fix | Delete
[483] Fix | Delete
// Retrieve all the enumerable property names of an object.
[484] Fix | Delete
function allKeys(obj) {
[485] Fix | Delete
if (!isObject(obj)) return [];
[486] Fix | Delete
var keys = [];
[487] Fix | Delete
for (var key in obj) keys.push(key);
[488] Fix | Delete
// Ahem, IE < 9.
[489] Fix | Delete
if (hasEnumBug) collectNonEnumProps(obj, keys);
[490] Fix | Delete
return keys;
[491] Fix | Delete
}
[492] Fix | Delete
[493] Fix | Delete
// Since the regular `Object.prototype.toString` type tests don't work for
[494] Fix | Delete
// some types in IE 11, we use a fingerprinting heuristic instead, based
[495] Fix | Delete
// on the methods. It's not great, but it's the best we got.
[496] Fix | Delete
// The fingerprint method lists are defined below.
[497] Fix | Delete
function ie11fingerprint(methods) {
[498] Fix | Delete
var length = getLength(methods);
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function