Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../public_h.../wp-inclu.../js
File: underscore.js
for (var i = 0; i < length; i++) {
[500] Fix | Delete
if (!isFunction$1(obj[methods[i]])) return false;
[501] Fix | Delete
}
[502] Fix | Delete
// If we are testing against `WeakMap`, we need to ensure that
[503] Fix | Delete
// `obj` doesn't have a `forEach` method in order to distinguish
[504] Fix | Delete
// it from a regular `Map`.
[505] Fix | Delete
return methods !== weakMapMethods || !isFunction$1(obj[forEachName]);
[506] Fix | Delete
};
[507] Fix | Delete
}
[508] Fix | Delete
[509] Fix | Delete
// In the interest of compact minification, we write
[510] Fix | Delete
// each string in the fingerprints only once.
[511] Fix | Delete
var forEachName = 'forEach',
[512] Fix | Delete
hasName = 'has',
[513] Fix | Delete
commonInit = ['clear', 'delete'],
[514] Fix | Delete
mapTail = ['get', hasName, 'set'];
[515] Fix | Delete
[516] Fix | Delete
// `Map`, `WeakMap` and `Set` each have slightly different
[517] Fix | Delete
// combinations of the above sublists.
[518] Fix | Delete
var mapMethods = commonInit.concat(forEachName, mapTail),
[519] Fix | Delete
weakMapMethods = commonInit.concat(mapTail),
[520] Fix | Delete
setMethods = ['add'].concat(commonInit, forEachName, hasName);
[521] Fix | Delete
[522] Fix | Delete
var isMap = isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');
[523] Fix | Delete
[524] Fix | Delete
var isWeakMap = isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');
[525] Fix | Delete
[526] Fix | Delete
var isSet = isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');
[527] Fix | Delete
[528] Fix | Delete
var isWeakSet = tagTester('WeakSet');
[529] Fix | Delete
[530] Fix | Delete
// Retrieve the values of an object's properties.
[531] Fix | Delete
function values(obj) {
[532] Fix | Delete
var _keys = keys(obj);
[533] Fix | Delete
var length = _keys.length;
[534] Fix | Delete
var values = Array(length);
[535] Fix | Delete
for (var i = 0; i < length; i++) {
[536] Fix | Delete
values[i] = obj[_keys[i]];
[537] Fix | Delete
}
[538] Fix | Delete
return values;
[539] Fix | Delete
}
[540] Fix | Delete
[541] Fix | Delete
// Convert an object into a list of `[key, value]` pairs.
[542] Fix | Delete
// The opposite of `_.object` with one argument.
[543] Fix | Delete
function pairs(obj) {
[544] Fix | Delete
var _keys = keys(obj);
[545] Fix | Delete
var length = _keys.length;
[546] Fix | Delete
var pairs = Array(length);
[547] Fix | Delete
for (var i = 0; i < length; i++) {
[548] Fix | Delete
pairs[i] = [_keys[i], obj[_keys[i]]];
[549] Fix | Delete
}
[550] Fix | Delete
return pairs;
[551] Fix | Delete
}
[552] Fix | Delete
[553] Fix | Delete
// Invert the keys and values of an object. The values must be serializable.
[554] Fix | Delete
function invert(obj) {
[555] Fix | Delete
var result = {};
[556] Fix | Delete
var _keys = keys(obj);
[557] Fix | Delete
for (var i = 0, length = _keys.length; i < length; i++) {
[558] Fix | Delete
result[obj[_keys[i]]] = _keys[i];
[559] Fix | Delete
}
[560] Fix | Delete
return result;
[561] Fix | Delete
}
[562] Fix | Delete
[563] Fix | Delete
// Return a sorted list of the function names available on the object.
[564] Fix | Delete
function functions(obj) {
[565] Fix | Delete
var names = [];
[566] Fix | Delete
for (var key in obj) {
[567] Fix | Delete
if (isFunction$1(obj[key])) names.push(key);
[568] Fix | Delete
}
[569] Fix | Delete
return names.sort();
[570] Fix | Delete
}
[571] Fix | Delete
[572] Fix | Delete
// An internal function for creating assigner functions.
[573] Fix | Delete
function createAssigner(keysFunc, defaults) {
[574] Fix | Delete
return function(obj) {
[575] Fix | Delete
var length = arguments.length;
[576] Fix | Delete
if (defaults) obj = Object(obj);
[577] Fix | Delete
if (length < 2 || obj == null) return obj;
[578] Fix | Delete
for (var index = 1; index < length; index++) {
[579] Fix | Delete
var source = arguments[index],
[580] Fix | Delete
keys = keysFunc(source),
[581] Fix | Delete
l = keys.length;
[582] Fix | Delete
for (var i = 0; i < l; i++) {
[583] Fix | Delete
var key = keys[i];
[584] Fix | Delete
if (!defaults || obj[key] === void 0) obj[key] = source[key];
[585] Fix | Delete
}
[586] Fix | Delete
}
[587] Fix | Delete
return obj;
[588] Fix | Delete
};
[589] Fix | Delete
}
[590] Fix | Delete
[591] Fix | Delete
// Extend a given object with all the properties in passed-in object(s).
[592] Fix | Delete
var extend = createAssigner(allKeys);
[593] Fix | Delete
[594] Fix | Delete
// Assigns a given object with all the own properties in the passed-in
[595] Fix | Delete
// object(s).
[596] Fix | Delete
// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
[597] Fix | Delete
var extendOwn = createAssigner(keys);
[598] Fix | Delete
[599] Fix | Delete
// Fill in a given object with default properties.
[600] Fix | Delete
var defaults = createAssigner(allKeys, true);
[601] Fix | Delete
[602] Fix | Delete
// Create a naked function reference for surrogate-prototype-swapping.
[603] Fix | Delete
function ctor() {
[604] Fix | Delete
return function(){};
[605] Fix | Delete
}
[606] Fix | Delete
[607] Fix | Delete
// An internal function for creating a new object that inherits from another.
[608] Fix | Delete
function baseCreate(prototype) {
[609] Fix | Delete
if (!isObject(prototype)) return {};
[610] Fix | Delete
if (nativeCreate) return nativeCreate(prototype);
[611] Fix | Delete
var Ctor = ctor();
[612] Fix | Delete
Ctor.prototype = prototype;
[613] Fix | Delete
var result = new Ctor;
[614] Fix | Delete
Ctor.prototype = null;
[615] Fix | Delete
return result;
[616] Fix | Delete
}
[617] Fix | Delete
[618] Fix | Delete
// Creates an object that inherits from the given prototype object.
[619] Fix | Delete
// If additional properties are provided then they will be added to the
[620] Fix | Delete
// created object.
[621] Fix | Delete
function create(prototype, props) {
[622] Fix | Delete
var result = baseCreate(prototype);
[623] Fix | Delete
if (props) extendOwn(result, props);
[624] Fix | Delete
return result;
[625] Fix | Delete
}
[626] Fix | Delete
[627] Fix | Delete
// Create a (shallow-cloned) duplicate of an object.
[628] Fix | Delete
function clone(obj) {
[629] Fix | Delete
if (!isObject(obj)) return obj;
[630] Fix | Delete
return isArray(obj) ? obj.slice() : extend({}, obj);
[631] Fix | Delete
}
[632] Fix | Delete
[633] Fix | Delete
// Invokes `interceptor` with the `obj` and then returns `obj`.
[634] Fix | Delete
// The primary purpose of this method is to "tap into" a method chain, in
[635] Fix | Delete
// order to perform operations on intermediate results within the chain.
[636] Fix | Delete
function tap(obj, interceptor) {
[637] Fix | Delete
interceptor(obj);
[638] Fix | Delete
return obj;
[639] Fix | Delete
}
[640] Fix | Delete
[641] Fix | Delete
// Normalize a (deep) property `path` to array.
[642] Fix | Delete
// Like `_.iteratee`, this function can be customized.
[643] Fix | Delete
function toPath$1(path) {
[644] Fix | Delete
return isArray(path) ? path : [path];
[645] Fix | Delete
}
[646] Fix | Delete
_$1.toPath = toPath$1;
[647] Fix | Delete
[648] Fix | Delete
// Internal wrapper for `_.toPath` to enable minification.
[649] Fix | Delete
// Similar to `cb` for `_.iteratee`.
[650] Fix | Delete
function toPath(path) {
[651] Fix | Delete
return _$1.toPath(path);
[652] Fix | Delete
}
[653] Fix | Delete
[654] Fix | Delete
// Internal function to obtain a nested property in `obj` along `path`.
[655] Fix | Delete
function deepGet(obj, path) {
[656] Fix | Delete
var length = path.length;
[657] Fix | Delete
for (var i = 0; i < length; i++) {
[658] Fix | Delete
if (obj == null) return void 0;
[659] Fix | Delete
obj = obj[path[i]];
[660] Fix | Delete
}
[661] Fix | Delete
return length ? obj : void 0;
[662] Fix | Delete
}
[663] Fix | Delete
[664] Fix | Delete
// Get the value of the (deep) property on `path` from `object`.
[665] Fix | Delete
// If any property in `path` does not exist or if the value is
[666] Fix | Delete
// `undefined`, return `defaultValue` instead.
[667] Fix | Delete
// The `path` is normalized through `_.toPath`.
[668] Fix | Delete
function get(object, path, defaultValue) {
[669] Fix | Delete
var value = deepGet(object, toPath(path));
[670] Fix | Delete
return isUndefined(value) ? defaultValue : value;
[671] Fix | Delete
}
[672] Fix | Delete
[673] Fix | Delete
// Shortcut function for checking if an object has a given property directly on
[674] Fix | Delete
// itself (in other words, not on a prototype). Unlike the internal `has`
[675] Fix | Delete
// function, this public version can also traverse nested properties.
[676] Fix | Delete
function has(obj, path) {
[677] Fix | Delete
path = toPath(path);
[678] Fix | Delete
var length = path.length;
[679] Fix | Delete
for (var i = 0; i < length; i++) {
[680] Fix | Delete
var key = path[i];
[681] Fix | Delete
if (!has$1(obj, key)) return false;
[682] Fix | Delete
obj = obj[key];
[683] Fix | Delete
}
[684] Fix | Delete
return !!length;
[685] Fix | Delete
}
[686] Fix | Delete
[687] Fix | Delete
// Keep the identity function around for default iteratees.
[688] Fix | Delete
function identity(value) {
[689] Fix | Delete
return value;
[690] Fix | Delete
}
[691] Fix | Delete
[692] Fix | Delete
// Returns a predicate for checking whether an object has a given set of
[693] Fix | Delete
// `key:value` pairs.
[694] Fix | Delete
function matcher(attrs) {
[695] Fix | Delete
attrs = extendOwn({}, attrs);
[696] Fix | Delete
return function(obj) {
[697] Fix | Delete
return isMatch(obj, attrs);
[698] Fix | Delete
};
[699] Fix | Delete
}
[700] Fix | Delete
[701] Fix | Delete
// Creates a function that, when passed an object, will traverse that object’s
[702] Fix | Delete
// properties down the given `path`, specified as an array of keys or indices.
[703] Fix | Delete
function property(path) {
[704] Fix | Delete
path = toPath(path);
[705] Fix | Delete
return function(obj) {
[706] Fix | Delete
return deepGet(obj, path);
[707] Fix | Delete
};
[708] Fix | Delete
}
[709] Fix | Delete
[710] Fix | Delete
// Internal function that returns an efficient (for current engines) version
[711] Fix | Delete
// of the passed-in callback, to be repeatedly applied in other Underscore
[712] Fix | Delete
// functions.
[713] Fix | Delete
function optimizeCb(func, context, argCount) {
[714] Fix | Delete
if (context === void 0) return func;
[715] Fix | Delete
switch (argCount == null ? 3 : argCount) {
[716] Fix | Delete
case 1: return function(value) {
[717] Fix | Delete
return func.call(context, value);
[718] Fix | Delete
};
[719] Fix | Delete
// The 2-argument case is omitted because we’re not using it.
[720] Fix | Delete
case 3: return function(value, index, collection) {
[721] Fix | Delete
return func.call(context, value, index, collection);
[722] Fix | Delete
};
[723] Fix | Delete
case 4: return function(accumulator, value, index, collection) {
[724] Fix | Delete
return func.call(context, accumulator, value, index, collection);
[725] Fix | Delete
};
[726] Fix | Delete
}
[727] Fix | Delete
return function() {
[728] Fix | Delete
return func.apply(context, arguments);
[729] Fix | Delete
};
[730] Fix | Delete
}
[731] Fix | Delete
[732] Fix | Delete
// An internal function to generate callbacks that can be applied to each
[733] Fix | Delete
// element in a collection, returning the desired result — either `_.identity`,
[734] Fix | Delete
// an arbitrary callback, a property matcher, or a property accessor.
[735] Fix | Delete
function baseIteratee(value, context, argCount) {
[736] Fix | Delete
if (value == null) return identity;
[737] Fix | Delete
if (isFunction$1(value)) return optimizeCb(value, context, argCount);
[738] Fix | Delete
if (isObject(value) && !isArray(value)) return matcher(value);
[739] Fix | Delete
return property(value);
[740] Fix | Delete
}
[741] Fix | Delete
[742] Fix | Delete
// External wrapper for our callback generator. Users may customize
[743] Fix | Delete
// `_.iteratee` if they want additional predicate/iteratee shorthand styles.
[744] Fix | Delete
// This abstraction hides the internal-only `argCount` argument.
[745] Fix | Delete
function iteratee(value, context) {
[746] Fix | Delete
return baseIteratee(value, context, Infinity);
[747] Fix | Delete
}
[748] Fix | Delete
_$1.iteratee = iteratee;
[749] Fix | Delete
[750] Fix | Delete
// The function we call internally to generate a callback. It invokes
[751] Fix | Delete
// `_.iteratee` if overridden, otherwise `baseIteratee`.
[752] Fix | Delete
function cb(value, context, argCount) {
[753] Fix | Delete
if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
[754] Fix | Delete
return baseIteratee(value, context, argCount);
[755] Fix | Delete
}
[756] Fix | Delete
[757] Fix | Delete
// Returns the results of applying the `iteratee` to each element of `obj`.
[758] Fix | Delete
// In contrast to `_.map` it returns an object.
[759] Fix | Delete
function mapObject(obj, iteratee, context) {
[760] Fix | Delete
iteratee = cb(iteratee, context);
[761] Fix | Delete
var _keys = keys(obj),
[762] Fix | Delete
length = _keys.length,
[763] Fix | Delete
results = {};
[764] Fix | Delete
for (var index = 0; index < length; index++) {
[765] Fix | Delete
var currentKey = _keys[index];
[766] Fix | Delete
results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
[767] Fix | Delete
}
[768] Fix | Delete
return results;
[769] Fix | Delete
}
[770] Fix | Delete
[771] Fix | Delete
// Predicate-generating function. Often useful outside of Underscore.
[772] Fix | Delete
function noop(){}
[773] Fix | Delete
[774] Fix | Delete
// Generates a function for a given object that returns a given property.
[775] Fix | Delete
function propertyOf(obj) {
[776] Fix | Delete
if (obj == null) return noop;
[777] Fix | Delete
return function(path) {
[778] Fix | Delete
return get(obj, path);
[779] Fix | Delete
};
[780] Fix | Delete
}
[781] Fix | Delete
[782] Fix | Delete
// Run a function **n** times.
[783] Fix | Delete
function times(n, iteratee, context) {
[784] Fix | Delete
var accum = Array(Math.max(0, n));
[785] Fix | Delete
iteratee = optimizeCb(iteratee, context, 1);
[786] Fix | Delete
for (var i = 0; i < n; i++) accum[i] = iteratee(i);
[787] Fix | Delete
return accum;
[788] Fix | Delete
}
[789] Fix | Delete
[790] Fix | Delete
// Return a random integer between `min` and `max` (inclusive).
[791] Fix | Delete
function random(min, max) {
[792] Fix | Delete
if (max == null) {
[793] Fix | Delete
max = min;
[794] Fix | Delete
min = 0;
[795] Fix | Delete
}
[796] Fix | Delete
return min + Math.floor(Math.random() * (max - min + 1));
[797] Fix | Delete
}
[798] Fix | Delete
[799] Fix | Delete
// A (possibly faster) way to get the current timestamp as an integer.
[800] Fix | Delete
var now = Date.now || function() {
[801] Fix | Delete
return new Date().getTime();
[802] Fix | Delete
};
[803] Fix | Delete
[804] Fix | Delete
// Internal helper to generate functions for escaping and unescaping strings
[805] Fix | Delete
// to/from HTML interpolation.
[806] Fix | Delete
function createEscaper(map) {
[807] Fix | Delete
var escaper = function(match) {
[808] Fix | Delete
return map[match];
[809] Fix | Delete
};
[810] Fix | Delete
// Regexes for identifying a key that needs to be escaped.
[811] Fix | Delete
var source = '(?:' + keys(map).join('|') + ')';
[812] Fix | Delete
var testRegexp = RegExp(source);
[813] Fix | Delete
var replaceRegexp = RegExp(source, 'g');
[814] Fix | Delete
return function(string) {
[815] Fix | Delete
string = string == null ? '' : '' + string;
[816] Fix | Delete
return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
[817] Fix | Delete
};
[818] Fix | Delete
}
[819] Fix | Delete
[820] Fix | Delete
// Internal list of HTML entities for escaping.
[821] Fix | Delete
var escapeMap = {
[822] Fix | Delete
'&': '&amp;',
[823] Fix | Delete
'<': '&lt;',
[824] Fix | Delete
'>': '&gt;',
[825] Fix | Delete
'"': '&quot;',
[826] Fix | Delete
"'": '&#x27;',
[827] Fix | Delete
'`': '&#x60;'
[828] Fix | Delete
};
[829] Fix | Delete
[830] Fix | Delete
// Function for escaping strings to HTML interpolation.
[831] Fix | Delete
var _escape = createEscaper(escapeMap);
[832] Fix | Delete
[833] Fix | Delete
// Internal list of HTML entities for unescaping.
[834] Fix | Delete
var unescapeMap = invert(escapeMap);
[835] Fix | Delete
[836] Fix | Delete
// Function for unescaping strings from HTML interpolation.
[837] Fix | Delete
var _unescape = createEscaper(unescapeMap);
[838] Fix | Delete
[839] Fix | Delete
// By default, Underscore uses ERB-style template delimiters. Change the
[840] Fix | Delete
// following template settings to use alternative delimiters.
[841] Fix | Delete
var templateSettings = _$1.templateSettings = {
[842] Fix | Delete
evaluate: /<%([\s\S]+?)%>/g,
[843] Fix | Delete
interpolate: /<%=([\s\S]+?)%>/g,
[844] Fix | Delete
escape: /<%-([\s\S]+?)%>/g
[845] Fix | Delete
};
[846] Fix | Delete
[847] Fix | Delete
// When customizing `_.templateSettings`, if you don't want to define an
[848] Fix | Delete
// interpolation, evaluation or escaping regex, we need one that is
[849] Fix | Delete
// guaranteed not to match.
[850] Fix | Delete
var noMatch = /(.)^/;
[851] Fix | Delete
[852] Fix | Delete
// Certain characters need to be escaped so that they can be put into a
[853] Fix | Delete
// string literal.
[854] Fix | Delete
var escapes = {
[855] Fix | Delete
"'": "'",
[856] Fix | Delete
'\\': '\\',
[857] Fix | Delete
'\r': 'r',
[858] Fix | Delete
'\n': 'n',
[859] Fix | Delete
'\u2028': 'u2028',
[860] Fix | Delete
'\u2029': 'u2029'
[861] Fix | Delete
};
[862] Fix | Delete
[863] Fix | Delete
var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g;
[864] Fix | Delete
[865] Fix | Delete
function escapeChar(match) {
[866] Fix | Delete
return '\\' + escapes[match];
[867] Fix | Delete
}
[868] Fix | Delete
[869] Fix | Delete
// In order to prevent third-party code injection through
[870] Fix | Delete
// `_.templateSettings.variable`, we test it against the following regular
[871] Fix | Delete
// expression. It is intentionally a bit more liberal than just matching valid
[872] Fix | Delete
// identifiers, but still prevents possible loopholes through defaults or
[873] Fix | Delete
// destructuring assignment.
[874] Fix | Delete
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
[875] Fix | Delete
[876] Fix | Delete
// JavaScript micro-templating, similar to John Resig's implementation.
[877] Fix | Delete
// Underscore templating handles arbitrary delimiters, preserves whitespace,
[878] Fix | Delete
// and correctly escapes quotes within interpolated code.
[879] Fix | Delete
// NB: `oldSettings` only exists for backwards compatibility.
[880] Fix | Delete
function template(text, settings, oldSettings) {
[881] Fix | Delete
if (!settings && oldSettings) settings = oldSettings;
[882] Fix | Delete
settings = defaults({}, settings, _$1.templateSettings);
[883] Fix | Delete
[884] Fix | Delete
// Combine delimiters into one regular expression via alternation.
[885] Fix | Delete
var matcher = RegExp([
[886] Fix | Delete
(settings.escape || noMatch).source,
[887] Fix | Delete
(settings.interpolate || noMatch).source,
[888] Fix | Delete
(settings.evaluate || noMatch).source
[889] Fix | Delete
].join('|') + '|$', 'g');
[890] Fix | Delete
[891] Fix | Delete
// Compile the template source, escaping string literals appropriately.
[892] Fix | Delete
var index = 0;
[893] Fix | Delete
var source = "__p+='";
[894] Fix | Delete
text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
[895] Fix | Delete
source += text.slice(index, offset).replace(escapeRegExp, escapeChar);
[896] Fix | Delete
index = offset + match.length;
[897] Fix | Delete
[898] Fix | Delete
if (escape) {
[899] Fix | Delete
source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
[900] Fix | Delete
} else if (interpolate) {
[901] Fix | Delete
source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
[902] Fix | Delete
} else if (evaluate) {
[903] Fix | Delete
source += "';\n" + evaluate + "\n__p+='";
[904] Fix | Delete
}
[905] Fix | Delete
[906] Fix | Delete
// Adobe VMs need the match returned to produce the correct offset.
[907] Fix | Delete
return match;
[908] Fix | Delete
});
[909] Fix | Delete
source += "';\n";
[910] Fix | Delete
[911] Fix | Delete
var argument = settings.variable;
[912] Fix | Delete
if (argument) {
[913] Fix | Delete
// Insure against third-party code injection. (CVE-2021-23358)
[914] Fix | Delete
if (!bareIdentifier.test(argument)) throw new Error(
[915] Fix | Delete
'variable is not a bare identifier: ' + argument
[916] Fix | Delete
);
[917] Fix | Delete
} else {
[918] Fix | Delete
// If a variable is not specified, place data values in local scope.
[919] Fix | Delete
source = 'with(obj||{}){\n' + source + '}\n';
[920] Fix | Delete
argument = 'obj';
[921] Fix | Delete
}
[922] Fix | Delete
[923] Fix | Delete
source = "var __t,__p='',__j=Array.prototype.join," +
[924] Fix | Delete
"print=function(){__p+=__j.call(arguments,'');};\n" +
[925] Fix | Delete
source + 'return __p;\n';
[926] Fix | Delete
[927] Fix | Delete
var render;
[928] Fix | Delete
try {
[929] Fix | Delete
render = new Function(argument, '_', source);
[930] Fix | Delete
} catch (e) {
[931] Fix | Delete
e.source = source;
[932] Fix | Delete
throw e;
[933] Fix | Delete
}
[934] Fix | Delete
[935] Fix | Delete
var template = function(data) {
[936] Fix | Delete
return render.call(this, data, _$1);
[937] Fix | Delete
};
[938] Fix | Delete
[939] Fix | Delete
// Provide the compiled source as a convenience for precompilation.
[940] Fix | Delete
template.source = 'function(' + argument + '){\n' + source + '}';
[941] Fix | Delete
[942] Fix | Delete
return template;
[943] Fix | Delete
}
[944] Fix | Delete
[945] Fix | Delete
// Traverses the children of `obj` along `path`. If a child is a function, it
[946] Fix | Delete
// is invoked with its parent as context. Returns the value of the final
[947] Fix | Delete
// child, or `fallback` if any child is undefined.
[948] Fix | Delete
function result(obj, path, fallback) {
[949] Fix | Delete
path = toPath(path);
[950] Fix | Delete
var length = path.length;
[951] Fix | Delete
if (!length) {
[952] Fix | Delete
return isFunction$1(fallback) ? fallback.call(obj) : fallback;
[953] Fix | Delete
}
[954] Fix | Delete
for (var i = 0; i < length; i++) {
[955] Fix | Delete
var prop = obj == null ? void 0 : obj[path[i]];
[956] Fix | Delete
if (prop === void 0) {
[957] Fix | Delete
prop = fallback;
[958] Fix | Delete
i = length; // Ensure we don't continue iterating.
[959] Fix | Delete
}
[960] Fix | Delete
obj = isFunction$1(prop) ? prop.call(obj) : prop;
[961] Fix | Delete
}
[962] Fix | Delete
return obj;
[963] Fix | Delete
}
[964] Fix | Delete
[965] Fix | Delete
// Generate a unique integer id (unique within the entire client session).
[966] Fix | Delete
// Useful for temporary DOM ids.
[967] Fix | Delete
var idCounter = 0;
[968] Fix | Delete
function uniqueId(prefix) {
[969] Fix | Delete
var id = ++idCounter + '';
[970] Fix | Delete
return prefix ? prefix + id : id;
[971] Fix | Delete
}
[972] Fix | Delete
[973] Fix | Delete
// Start chaining a wrapped Underscore object.
[974] Fix | Delete
function chain(obj) {
[975] Fix | Delete
var instance = _$1(obj);
[976] Fix | Delete
instance._chain = true;
[977] Fix | Delete
return instance;
[978] Fix | Delete
}
[979] Fix | Delete
[980] Fix | Delete
// Internal function to execute `sourceFunc` bound to `context` with optional
[981] Fix | Delete
// `args`. Determines whether to execute a function as a constructor or as a
[982] Fix | Delete
// normal function.
[983] Fix | Delete
function executeBound(sourceFunc, boundFunc, context, callingContext, args) {
[984] Fix | Delete
if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);
[985] Fix | Delete
var self = baseCreate(sourceFunc.prototype);
[986] Fix | Delete
var result = sourceFunc.apply(self, args);
[987] Fix | Delete
if (isObject(result)) return result;
[988] Fix | Delete
return self;
[989] Fix | Delete
}
[990] Fix | Delete
[991] Fix | Delete
// Partially apply a function by creating a version that has had some of its
[992] Fix | Delete
// arguments pre-filled, without changing its dynamic `this` context. `_` acts
[993] Fix | Delete
// as a placeholder by default, allowing any combination of arguments to be
[994] Fix | Delete
// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.
[995] Fix | Delete
var partial = restArguments(function(func, boundArgs) {
[996] Fix | Delete
var placeholder = partial.placeholder;
[997] Fix | Delete
var bound = function() {
[998] Fix | Delete
var position = 0, length = boundArgs.length;
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function