Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
index.js2631 linesDownload Raw Back to lodash.sortby
1/**2 * lodash (Custom Build) <https://lodash.com/>3 * Build: `lodash modularize exports="npm" -o ./`4 * Copyright jQuery Foundation and other contributors <https://jquery.org/>5 * Released under MIT license <https://lodash.com/license>6 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>7 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors8 */9 10/** Used as the size to enable large array optimizations. */11var LARGE_ARRAY_SIZE = 200;12 13/** Used as the `TypeError` message for "Functions" methods. */14var FUNC_ERROR_TEXT = 'Expected a function';15 16/** Used to stand-in for `undefined` hash values. */17var HASH_UNDEFINED = '__lodash_hash_undefined__';18 19/** Used to compose bitmasks for comparison styles. */20var UNORDERED_COMPARE_FLAG = 1,21    PARTIAL_COMPARE_FLAG = 2;22 23/** Used as references for various `Number` constants. */24var INFINITY = 1 / 0,25    MAX_SAFE_INTEGER = 9007199254740991;26 27/** `Object#toString` result references. */28var argsTag = '[object Arguments]',29    arrayTag = '[object Array]',30    boolTag = '[object Boolean]',31    dateTag = '[object Date]',32    errorTag = '[object Error]',33    funcTag = '[object Function]',34    genTag = '[object GeneratorFunction]',35    mapTag = '[object Map]',36    numberTag = '[object Number]',37    objectTag = '[object Object]',38    promiseTag = '[object Promise]',39    regexpTag = '[object RegExp]',40    setTag = '[object Set]',41    stringTag = '[object String]',42    symbolTag = '[object Symbol]',43    weakMapTag = '[object WeakMap]';44 45var arrayBufferTag = '[object ArrayBuffer]',46    dataViewTag = '[object DataView]',47    float32Tag = '[object Float32Array]',48    float64Tag = '[object Float64Array]',49    int8Tag = '[object Int8Array]',50    int16Tag = '[object Int16Array]',51    int32Tag = '[object Int32Array]',52    uint8Tag = '[object Uint8Array]',53    uint8ClampedTag = '[object Uint8ClampedArray]',54    uint16Tag = '[object Uint16Array]',55    uint32Tag = '[object Uint32Array]';56 57/** Used to match property names within property paths. */58var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,59    reIsPlainProp = /^\w*$/,60    reLeadingDot = /^\./,61    rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;62 63/**64 * Used to match `RegExp`65 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).66 */67var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;68 69/** Used to match backslashes in property paths. */70var reEscapeChar = /\\(\\)?/g;71 72/** Used to detect host constructors (Safari). */73var reIsHostCtor = /^\[object .+?Constructor\]$/;74 75/** Used to detect unsigned integer values. */76var reIsUint = /^(?:0|[1-9]\d*)$/;77 78/** Used to identify `toStringTag` values of typed arrays. */79var typedArrayTags = {};80typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =81typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =82typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =83typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =84typedArrayTags[uint32Tag] = true;85typedArrayTags[argsTag] = typedArrayTags[arrayTag] =86typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =87typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =88typedArrayTags[errorTag] = typedArrayTags[funcTag] =89typedArrayTags[mapTag] = typedArrayTags[numberTag] =90typedArrayTags[objectTag] = typedArrayTags[regexpTag] =91typedArrayTags[setTag] = typedArrayTags[stringTag] =92typedArrayTags[weakMapTag] = false;93 94/** Detect free variable `global` from Node.js. */95var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;96 97/** Detect free variable `self`. */98var freeSelf = typeof self == 'object' && self && self.Object === Object && self;99 100/** Used as a reference to the global object. */101var root = freeGlobal || freeSelf || Function('return this')();102 103/** Detect free variable `exports`. */104var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;105 106/** Detect free variable `module`. */107var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;108 109/** Detect the popular CommonJS extension `module.exports`. */110var moduleExports = freeModule && freeModule.exports === freeExports;111 112/** Detect free variable `process` from Node.js. */113var freeProcess = moduleExports && freeGlobal.process;114 115/** Used to access faster Node.js helpers. */116var nodeUtil = (function() {117  try {118    return freeProcess && freeProcess.binding('util');119  } catch (e) {}120}());121 122/* Node.js helper references. */123var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;124 125/**126 * A faster alternative to `Function#apply`, this function invokes `func`127 * with the `this` binding of `thisArg` and the arguments of `args`.128 *129 * @private130 * @param {Function} func The function to invoke.131 * @param {*} thisArg The `this` binding of `func`.132 * @param {Array} args The arguments to invoke `func` with.133 * @returns {*} Returns the result of `func`.134 */135function apply(func, thisArg, args) {136  switch (args.length) {137    case 0: return func.call(thisArg);138    case 1: return func.call(thisArg, args[0]);139    case 2: return func.call(thisArg, args[0], args[1]);140    case 3: return func.call(thisArg, args[0], args[1], args[2]);141  }142  return func.apply(thisArg, args);143}144 145/**146 * A specialized version of `_.map` for arrays without support for iteratee147 * shorthands.148 *149 * @private150 * @param {Array} [array] The array to iterate over.151 * @param {Function} iteratee The function invoked per iteration.152 * @returns {Array} Returns the new mapped array.153 */154function arrayMap(array, iteratee) {155  var index = -1,156      length = array ? array.length : 0,157      result = Array(length);158 159  while (++index < length) {160    result[index] = iteratee(array[index], index, array);161  }162  return result;163}164 165/**166 * Appends the elements of `values` to `array`.167 *168 * @private169 * @param {Array} array The array to modify.170 * @param {Array} values The values to append.171 * @returns {Array} Returns `array`.172 */173function arrayPush(array, values) {174  var index = -1,175      length = values.length,176      offset = array.length;177 178  while (++index < length) {179    array[offset + index] = values[index];180  }181  return array;182}183 184/**185 * A specialized version of `_.some` for arrays without support for iteratee186 * shorthands.187 *188 * @private189 * @param {Array} [array] The array to iterate over.190 * @param {Function} predicate The function invoked per iteration.191 * @returns {boolean} Returns `true` if any element passes the predicate check,192 *  else `false`.193 */194function arraySome(array, predicate) {195  var index = -1,196      length = array ? array.length : 0;197 198  while (++index < length) {199    if (predicate(array[index], index, array)) {200      return true;201    }202  }203  return false;204}205 206/**207 * The base implementation of `_.property` without support for deep paths.208 *209 * @private210 * @param {string} key The key of the property to get.211 * @returns {Function} Returns the new accessor function.212 */213function baseProperty(key) {214  return function(object) {215    return object == null ? undefined : object[key];216  };217}218 219/**220 * The base implementation of `_.sortBy` which uses `comparer` to define the221 * sort order of `array` and replaces criteria objects with their corresponding222 * values.223 *224 * @private225 * @param {Array} array The array to sort.226 * @param {Function} comparer The function to define sort order.227 * @returns {Array} Returns `array`.228 */229function baseSortBy(array, comparer) {230  var length = array.length;231 232  array.sort(comparer);233  while (length--) {234    array[length] = array[length].value;235  }236  return array;237}238 239/**240 * The base implementation of `_.times` without support for iteratee shorthands241 * or max array length checks.242 *243 * @private244 * @param {number} n The number of times to invoke `iteratee`.245 * @param {Function} iteratee The function invoked per iteration.246 * @returns {Array} Returns the array of results.247 */248function baseTimes(n, iteratee) {249  var index = -1,250      result = Array(n);251 252  while (++index < n) {253    result[index] = iteratee(index);254  }255  return result;256}257 258/**259 * The base implementation of `_.unary` without support for storing metadata.260 *261 * @private262 * @param {Function} func The function to cap arguments for.263 * @returns {Function} Returns the new capped function.264 */265function baseUnary(func) {266  return function(value) {267    return func(value);268  };269}270 271/**272 * Gets the value at `key` of `object`.273 *274 * @private275 * @param {Object} [object] The object to query.276 * @param {string} key The key of the property to get.277 * @returns {*} Returns the property value.278 */279function getValue(object, key) {280  return object == null ? undefined : object[key];281}282 283/**284 * Checks if `value` is a host object in IE < 9.285 *286 * @private287 * @param {*} value The value to check.288 * @returns {boolean} Returns `true` if `value` is a host object, else `false`.289 */290function isHostObject(value) {291  // Many host objects are `Object` objects that can coerce to strings292  // despite having improperly defined `toString` methods.293  var result = false;294  if (value != null && typeof value.toString != 'function') {295    try {296      result = !!(value + '');297    } catch (e) {}298  }299  return result;300}301 302/**303 * Converts `map` to its key-value pairs.304 *305 * @private306 * @param {Object} map The map to convert.307 * @returns {Array} Returns the key-value pairs.308 */309function mapToArray(map) {310  var index = -1,311      result = Array(map.size);312 313  map.forEach(function(value, key) {314    result[++index] = [key, value];315  });316  return result;317}318 319/**320 * Creates a unary function that invokes `func` with its argument transformed.321 *322 * @private323 * @param {Function} func The function to wrap.324 * @param {Function} transform The argument transform.325 * @returns {Function} Returns the new function.326 */327function overArg(func, transform) {328  return function(arg) {329    return func(transform(arg));330  };331}332 333/**334 * Converts `set` to an array of its values.335 *336 * @private337 * @param {Object} set The set to convert.338 * @returns {Array} Returns the values.339 */340function setToArray(set) {341  var index = -1,342      result = Array(set.size);343 344  set.forEach(function(value) {345    result[++index] = value;346  });347  return result;348}349 350/** Used for built-in method references. */351var arrayProto = Array.prototype,352    funcProto = Function.prototype,353    objectProto = Object.prototype;354 355/** Used to detect overreaching core-js shims. */356var coreJsData = root['__core-js_shared__'];357 358/** Used to detect methods masquerading as native. */359var maskSrcKey = (function() {360  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');361  return uid ? ('Symbol(src)_1.' + uid) : '';362}());363 364/** Used to resolve the decompiled source of functions. */365var funcToString = funcProto.toString;366 367/** Used to check objects for own properties. */368var hasOwnProperty = objectProto.hasOwnProperty;369 370/**371 * Used to resolve the372 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)373 * of values.374 */375var objectToString = objectProto.toString;376 377/** Used to detect if a method is native. */378var reIsNative = RegExp('^' +379  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')380  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'381);382 383/** Built-in value references. */384var Symbol = root.Symbol,385    Uint8Array = root.Uint8Array,386    propertyIsEnumerable = objectProto.propertyIsEnumerable,387    splice = arrayProto.splice,388    spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;389 390/* Built-in method references for those with the same name as other `lodash` methods. */391var nativeKeys = overArg(Object.keys, Object),392    nativeMax = Math.max;393 394/* Built-in method references that are verified to be native. */395var DataView = getNative(root, 'DataView'),396    Map = getNative(root, 'Map'),397    Promise = getNative(root, 'Promise'),398    Set = getNative(root, 'Set'),399    WeakMap = getNative(root, 'WeakMap'),400    nativeCreate = getNative(Object, 'create');401 402/** Used to detect maps, sets, and weakmaps. */403var dataViewCtorString = toSource(DataView),404    mapCtorString = toSource(Map),405    promiseCtorString = toSource(Promise),406    setCtorString = toSource(Set),407    weakMapCtorString = toSource(WeakMap);408 409/** Used to convert symbols to primitives and strings. */410var symbolProto = Symbol ? Symbol.prototype : undefined,411    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,412    symbolToString = symbolProto ? symbolProto.toString : undefined;413 414/**415 * Creates a hash object.416 *417 * @private418 * @constructor419 * @param {Array} [entries] The key-value pairs to cache.420 */421function Hash(entries) {422  var index = -1,423      length = entries ? entries.length : 0;424 425  this.clear();426  while (++index < length) {427    var entry = entries[index];428    this.set(entry[0], entry[1]);429  }430}431 432/**433 * Removes all key-value entries from the hash.434 *435 * @private436 * @name clear437 * @memberOf Hash438 */439function hashClear() {440  this.__data__ = nativeCreate ? nativeCreate(null) : {};441}442 443/**444 * Removes `key` and its value from the hash.445 *446 * @private447 * @name delete448 * @memberOf Hash449 * @param {Object} hash The hash to modify.450 * @param {string} key The key of the value to remove.451 * @returns {boolean} Returns `true` if the entry was removed, else `false`.452 */453function hashDelete(key) {454  return this.has(key) && delete this.__data__[key];455}456 457/**458 * Gets the hash value for `key`.459 *460 * @private461 * @name get462 * @memberOf Hash463 * @param {string} key The key of the value to get.464 * @returns {*} Returns the entry value.465 */466function hashGet(key) {467  var data = this.__data__;468  if (nativeCreate) {469    var result = data[key];470    return result === HASH_UNDEFINED ? undefined : result;471  }472  return hasOwnProperty.call(data, key) ? data[key] : undefined;473}474 475/**476 * Checks if a hash value for `key` exists.477 *478 * @private479 * @name has480 * @memberOf Hash481 * @param {string} key The key of the entry to check.482 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.483 */484function hashHas(key) {485  var data = this.__data__;486  return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);487}488 489/**490 * Sets the hash `key` to `value`.491 *492 * @private493 * @name set494 * @memberOf Hash495 * @param {string} key The key of the value to set.496 * @param {*} value The value to set.497 * @returns {Object} Returns the hash instance.498 */499function hashSet(key, value) {500  var data = this.__data__;501  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;502  return this;503}504 505// Add methods to `Hash`.506Hash.prototype.clear = hashClear;507Hash.prototype['delete'] = hashDelete;508Hash.prototype.get = hashGet;509Hash.prototype.has = hashHas;510Hash.prototype.set = hashSet;511 512/**513 * Creates an list cache object.514 *515 * @private516 * @constructor517 * @param {Array} [entries] The key-value pairs to cache.518 */519function ListCache(entries) {520  var index = -1,521      length = entries ? entries.length : 0;522 523  this.clear();524  while (++index < length) {525    var entry = entries[index];526    this.set(entry[0], entry[1]);527  }528}529 530/**531 * Removes all key-value entries from the list cache.532 *533 * @private534 * @name clear535 * @memberOf ListCache536 */537function listCacheClear() {538  this.__data__ = [];539}540 541/**542 * Removes `key` and its value from the list cache.543 *544 * @private545 * @name delete546 * @memberOf ListCache547 * @param {string} key The key of the value to remove.548 * @returns {boolean} Returns `true` if the entry was removed, else `false`.549 */550function listCacheDelete(key) {551  var data = this.__data__,552      index = assocIndexOf(data, key);553 554  if (index < 0) {555    return false;556  }557  var lastIndex = data.length - 1;558  if (index == lastIndex) {559    data.pop();560  } else {561    splice.call(data, index, 1);562  }563  return true;564}565 566/**567 * Gets the list cache value for `key`.568 *569 * @private570 * @name get571 * @memberOf ListCache572 * @param {string} key The key of the value to get.573 * @returns {*} Returns the entry value.574 */575function listCacheGet(key) {576  var data = this.__data__,577      index = assocIndexOf(data, key);578 579  return index < 0 ? undefined : data[index][1];580}581 582/**583 * Checks if a list cache value for `key` exists.584 *585 * @private586 * @name has587 * @memberOf ListCache588 * @param {string} key The key of the entry to check.589 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.590 */591function listCacheHas(key) {592  return assocIndexOf(this.__data__, key) > -1;593}594 595/**596 * Sets the list cache `key` to `value`.597 *598 * @private599 * @name set600 * @memberOf ListCache601 * @param {string} key The key of the value to set.602 * @param {*} value The value to set.603 * @returns {Object} Returns the list cache instance.604 */605function listCacheSet(key, value) {606  var data = this.__data__,607      index = assocIndexOf(data, key);608 609  if (index < 0) {610    data.push([key, value]);611  } else {612    data[index][1] = value;613  }614  return this;615}616 617// Add methods to `ListCache`.618ListCache.prototype.clear = listCacheClear;619ListCache.prototype['delete'] = listCacheDelete;620ListCache.prototype.get = listCacheGet;621ListCache.prototype.has = listCacheHas;622ListCache.prototype.set = listCacheSet;623 624/**625 * Creates a map cache object to store key-value pairs.626 *627 * @private628 * @constructor629 * @param {Array} [entries] The key-value pairs to cache.630 */631function MapCache(entries) {632  var index = -1,633      length = entries ? entries.length : 0;634 635  this.clear();636  while (++index < length) {637    var entry = entries[index];638    this.set(entry[0], entry[1]);639  }640}641 642/**643 * Removes all key-value entries from the map.644 *645 * @private646 * @name clear647 * @memberOf MapCache648 */649function mapCacheClear() {650  this.__data__ = {651    'hash': new Hash,652    'map': new (Map || ListCache),653    'string': new Hash654  };655}656 657/**658 * Removes `key` and its value from the map.659 *660 * @private661 * @name delete662 * @memberOf MapCache663 * @param {string} key The key of the value to remove.664 * @returns {boolean} Returns `true` if the entry was removed, else `false`.665 */666function mapCacheDelete(key) {667  return getMapData(this, key)['delete'](key);668}669 670/**671 * Gets the map value for `key`.672 *673 * @private674 * @name get675 * @memberOf MapCache676 * @param {string} key The key of the value to get.677 * @returns {*} Returns the entry value.678 */679function mapCacheGet(key) {680  return getMapData(this, key).get(key);681}682 683/**684 * Checks if a map value for `key` exists.685 *686 * @private687 * @name has688 * @memberOf MapCache689 * @param {string} key The key of the entry to check.690 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.691 */692function mapCacheHas(key) {693  return getMapData(this, key).has(key);694}695 696/**697 * Sets the map `key` to `value`.698 *699 * @private700 * @name set701 * @memberOf MapCache702 * @param {string} key The key of the value to set.703 * @param {*} value The value to set.704 * @returns {Object} Returns the map cache instance.705 */706function mapCacheSet(key, value) {707  getMapData(this, key).set(key, value);708  return this;709}710 711// Add methods to `MapCache`.712MapCache.prototype.clear = mapCacheClear;713MapCache.prototype['delete'] = mapCacheDelete;714MapCache.prototype.get = mapCacheGet;715MapCache.prototype.has = mapCacheHas;716MapCache.prototype.set = mapCacheSet;717 718/**719 *720 * Creates an array cache object to store unique values.721 *722 * @private723 * @constructor724 * @param {Array} [values] The values to cache.725 */726function SetCache(values) {727  var index = -1,728      length = values ? values.length : 0;729 730  this.__data__ = new MapCache;731  while (++index < length) {732    this.add(values[index]);733  }734}735 736/**737 * Adds `value` to the array cache.738 *739 * @private740 * @name add741 * @memberOf SetCache742 * @alias push743 * @param {*} value The value to cache.744 * @returns {Object} Returns the cache instance.745 */746function setCacheAdd(value) {747  this.__data__.set(value, HASH_UNDEFINED);748  return this;749}750 751/**752 * Checks if `value` is in the array cache.753 *754 * @private755 * @name has756 * @memberOf SetCache757 * @param {*} value The value to search for.758 * @returns {number} Returns `true` if `value` is found, else `false`.759 */760function setCacheHas(value) {761  return this.__data__.has(value);762}763 764// Add methods to `SetCache`.765SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;766SetCache.prototype.has = setCacheHas;767 768/**769 * Creates a stack cache object to store key-value pairs.770 *771 * @private772 * @constructor773 * @param {Array} [entries] The key-value pairs to cache.774 */775function Stack(entries) {776  this.__data__ = new ListCache(entries);777}778 779/**780 * Removes all key-value entries from the stack.781 *782 * @private783 * @name clear784 * @memberOf Stack785 */786function stackClear() {787  this.__data__ = new ListCache;788}789 790/**791 * Removes `key` and its value from the stack.792 *793 * @private794 * @name delete795 * @memberOf Stack796 * @param {string} key The key of the value to remove.797 * @returns {boolean} Returns `true` if the entry was removed, else `false`.798 */799function stackDelete(key) {800  return this.__data__['delete'](key);801}802 803/**804 * Gets the stack value for `key`.805 *806 * @private807 * @name get808 * @memberOf Stack809 * @param {string} key The key of the value to get.810 * @returns {*} Returns the entry value.811 */812function stackGet(key) {813  return this.__data__.get(key);814}815 816/**817 * Checks if a stack value for `key` exists.818 *819 * @private820 * @name has821 * @memberOf Stack822 * @param {string} key The key of the entry to check.823 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.824 */825function stackHas(key) {826  return this.__data__.has(key);827}828 829/**830 * Sets the stack `key` to `value`.831 *832 * @private833 * @name set834 * @memberOf Stack835 * @param {string} key The key of the value to set.836 * @param {*} value The value to set.837 * @returns {Object} Returns the stack cache instance.838 */839function stackSet(key, value) {840  var cache = this.__data__;841  if (cache instanceof ListCache) {842    var pairs = cache.__data__;843    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {844      pairs.push([key, value]);845      return this;846    }847    cache = this.__data__ = new MapCache(pairs);848  }849  cache.set(key, value);850  return this;851}852 853// Add methods to `Stack`.854Stack.prototype.clear = stackClear;855Stack.prototype['delete'] = stackDelete;856Stack.prototype.get = stackGet;857Stack.prototype.has = stackHas;858Stack.prototype.set = stackSet;859 860/**861 * Creates an array of the enumerable property names of the array-like `value`.862 *863 * @private864 * @param {*} value The value to query.865 * @param {boolean} inherited Specify returning inherited property names.866 * @returns {Array} Returns the array of property names.867 */868function arrayLikeKeys(value, inherited) {869  // Safari 8.1 makes `arguments.callee` enumerable in strict mode.870  // Safari 9 makes `arguments.length` enumerable in strict mode.871  var result = (isArray(value) || isArguments(value))872    ? baseTimes(value.length, String)873    : [];874 875  var length = result.length,876      skipIndexes = !!length;877 878  for (var key in value) {879    if ((inherited || hasOwnProperty.call(value, key)) &&880        !(skipIndexes && (key == 'length' || isIndex(key, length)))) {881      result.push(key);882    }883  }884  return result;885}886 887/**888 * Gets the index at which the `key` is found in `array` of key-value pairs.889 *890 * @private891 * @param {Array} array The array to inspect.892 * @param {*} key The key to search for.893 * @returns {number} Returns the index of the matched value, else `-1`.894 */895function assocIndexOf(array, key) {896  var length = array.length;897  while (length--) {898    if (eq(array[length][0], key)) {899      return length;900    }901  }902  return -1;903}904 905/**906 * The base implementation of `_.forEach` without support for iteratee shorthands.907 *908 * @private909 * @param {Array|Object} collection The collection to iterate over.910 * @param {Function} iteratee The function invoked per iteration.911 * @returns {Array|Object} Returns `collection`.912 */913var baseEach = createBaseEach(baseForOwn);914 915/**916 * The base implementation of `_.flatten` with support for restricting flattening.917 *918 * @private919 * @param {Array} array The array to flatten.920 * @param {number} depth The maximum recursion depth.921 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.922 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.923 * @param {Array} [result=[]] The initial result value.924 * @returns {Array} Returns the new flattened array.925 */926function baseFlatten(array, depth, predicate, isStrict, result) {927  var index = -1,928      length = array.length;929 930  predicate || (predicate = isFlattenable);931  result || (result = []);932 933  while (++index < length) {934    var value = array[index];935    if (depth > 0 && predicate(value)) {936      if (depth > 1) {937        // Recursively flatten arrays (susceptible to call stack limits).938        baseFlatten(value, depth - 1, predicate, isStrict, result);939      } else {940        arrayPush(result, value);941      }942    } else if (!isStrict) {943      result[result.length] = value;944    }945  }946  return result;947}948 949/**950 * The base implementation of `baseForOwn` which iterates over `object`951 * properties returned by `keysFunc` and invokes `iteratee` for each property.952 * Iteratee functions may exit iteration early by explicitly returning `false`.953 *954 * @private955 * @param {Object} object The object to iterate over.956 * @param {Function} iteratee The function invoked per iteration.957 * @param {Function} keysFunc The function to get the keys of `object`.958 * @returns {Object} Returns `object`.959 */960var baseFor = createBaseFor();961 962/**963 * The base implementation of `_.forOwn` without support for iteratee shorthands.964 *965 * @private966 * @param {Object} object The object to iterate over.967 * @param {Function} iteratee The function invoked per iteration.968 * @returns {Object} Returns `object`.969 */970function baseForOwn(object, iteratee) {971  return object && baseFor(object, iteratee, keys);972}973 974/**975 * The base implementation of `_.get` without support for default values.976 *977 * @private978 * @param {Object} object The object to query.979 * @param {Array|string} path The path of the property to get.980 * @returns {*} Returns the resolved value.981 */982function baseGet(object, path) {983  path = isKey(path, object) ? [path] : castPath(path);984 985  var index = 0,986      length = path.length;987 988  while (object != null && index < length) {989    object = object[toKey(path[index++])];990  }991  return (index && index == length) ? object : undefined;992}993 994/**995 * The base implementation of `getTag`.996 *997 * @private998 * @param {*} value The value to query.999 * @returns {string} Returns the `toStringTag`.1000 */1001function baseGetTag(value) {1002  return objectToString.call(value);1003}1004 1005/**1006 * The base implementation of `_.hasIn` without support for deep paths.1007 *1008 * @private1009 * @param {Object} [object] The object to query.1010 * @param {Array|string} key The key to check.1011 * @returns {boolean} Returns `true` if `key` exists, else `false`.1012 */1013function baseHasIn(object, key) {1014  return object != null && key in Object(object);1015}1016 1017/**1018 * The base implementation of `_.isEqual` which supports partial comparisons1019 * and tracks traversed objects.1020 *1021 * @private1022 * @param {*} value The value to compare.1023 * @param {*} other The other value to compare.1024 * @param {Function} [customizer] The function to customize comparisons.1025 * @param {boolean} [bitmask] The bitmask of comparison flags.1026 *  The bitmask may be composed of the following flags:1027 *     1 - Unordered comparison1028 *     2 - Partial comparison1029 * @param {Object} [stack] Tracks traversed `value` and `other` objects.1030 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.1031 */1032function baseIsEqual(value, other, customizer, bitmask, stack) {1033  if (value === other) {1034    return true;1035  }1036  if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {1037    return value !== value && other !== other;1038  }1039  return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);1040}1041 1042/**1043 * A specialized version of `baseIsEqual` for arrays and objects which performs1044 * deep comparisons and tracks traversed objects enabling objects with circular1045 * references to be compared.1046 *1047 * @private1048 * @param {Object} object The object to compare.1049 * @param {Object} other The other object to compare.1050 * @param {Function} equalFunc The function to determine equivalents of values.1051 * @param {Function} [customizer] The function to customize comparisons.1052 * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`1053 *  for more details.1054 * @param {Object} [stack] Tracks traversed `object` and `other` objects.1055 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.1056 */1057function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {1058  var objIsArr = isArray(object),1059      othIsArr = isArray(other),1060      objTag = arrayTag,1061      othTag = arrayTag;1062 1063  if (!objIsArr) {1064    objTag = getTag(object);1065    objTag = objTag == argsTag ? objectTag : objTag;1066  }1067  if (!othIsArr) {1068    othTag = getTag(other);1069    othTag = othTag == argsTag ? objectTag : othTag;1070  }1071  var objIsObj = objTag == objectTag && !isHostObject(object),1072      othIsObj = othTag == objectTag && !isHostObject(other),1073      isSameTag = objTag == othTag;1074 1075  if (isSameTag && !objIsObj) {1076    stack || (stack = new Stack);1077    return (objIsArr || isTypedArray(object))1078      ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)1079      : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);1080  }1081  if (!(bitmask & PARTIAL_COMPARE_FLAG)) {1082    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),1083        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');1084 1085    if (objIsWrapped || othIsWrapped) {1086      var objUnwrapped = objIsWrapped ? object.value() : object,1087          othUnwrapped = othIsWrapped ? other.value() : other;1088 1089      stack || (stack = new Stack);1090      return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);1091    }1092  }1093  if (!isSameTag) {1094    return false;1095  }1096  stack || (stack = new Stack);1097  return equalObjects(object, other, equalFunc, customizer, bitmask, stack);1098}1099 1100/**1101 * The base implementation of `_.isMatch` without support for iteratee shorthands.1102 *1103 * @private1104 * @param {Object} object The object to inspect.1105 * @param {Object} source The object of property values to match.1106 * @param {Array} matchData The property names, values, and compare flags to match.1107 * @param {Function} [customizer] The function to customize comparisons.1108 * @returns {boolean} Returns `true` if `object` is a match, else `false`.1109 */1110function baseIsMatch(object, source, matchData, customizer) {1111  var index = matchData.length,1112      length = index,1113      noCustomizer = !customizer;1114 1115  if (object == null) {1116    return !length;1117  }1118  object = Object(object);1119  while (index--) {1120    var data = matchData[index];1121    if ((noCustomizer && data[2])1122          ? data[1] !== object[data[0]]1123          : !(data[0] in object)1124        ) {1125      return false;1126    }1127  }1128  while (++index < length) {1129    data = matchData[index];1130    var key = data[0],1131        objValue = object[key],1132        srcValue = data[1];1133 1134    if (noCustomizer && data[2]) {1135      if (objValue === undefined && !(key in object)) {1136        return false;1137      }1138    } else {1139      var stack = new Stack;1140      if (customizer) {1141        var result = customizer(objValue, srcValue, key, object, source, stack);1142      }1143      if (!(result === undefined1144            ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)1145            : result1146          )) {1147        return false;1148      }1149    }1150  }1151  return true;1152}1153 1154/**1155 * The base implementation of `_.isNative` without bad shim checks.1156 *1157 * @private1158 * @param {*} value The value to check.1159 * @returns {boolean} Returns `true` if `value` is a native function,1160 *  else `false`.1161 */1162function baseIsNative(value) {1163  if (!isObject(value) || isMasked(value)) {1164    return false;1165  }1166  var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;1167  return pattern.test(toSource(value));1168}1169 1170/**1171 * The base implementation of `_.isTypedArray` without Node.js optimizations.1172 *1173 * @private1174 * @param {*} value The value to check.1175 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.1176 */1177function baseIsTypedArray(value) {1178  return isObjectLike(value) &&1179    isLength(value.length) && !!typedArrayTags[objectToString.call(value)];1180}1181 1182/**1183 * The base implementation of `_.iteratee`.1184 *1185 * @private1186 * @param {*} [value=_.identity] The value to convert to an iteratee.1187 * @returns {Function} Returns the iteratee.1188 */1189function baseIteratee(value) {1190  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.1191  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.1192  if (typeof value == 'function') {1193    return value;1194  }1195  if (value == null) {1196    return identity;1197  }1198  if (typeof value == 'object') {1199    return isArray(value)1200      ? baseMatchesProperty(value[0], value[1])

Showing the first 1,200 of 2631 lines. Download the file for the rest.

Brunobkr/llama.cpp_AlgMor24_github · Team Ai