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.js1978 linesDownload Raw Back to lodash.merge
1/**2 * Lodash (Custom Build) <https://lodash.com/>3 * Build: `lodash modularize exports="npm" -o ./`4 * Copyright OpenJS Foundation and other contributors <https://openjsf.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 to stand-in for `undefined` hash values. */14var HASH_UNDEFINED = '__lodash_hash_undefined__';15 16/** Used to detect hot functions by number of calls within a span of milliseconds. */17var HOT_COUNT = 800,18    HOT_SPAN = 16;19 20/** Used as references for various `Number` constants. */21var MAX_SAFE_INTEGER = 9007199254740991;22 23/** `Object#toString` result references. */24var argsTag = '[object Arguments]',25    arrayTag = '[object Array]',26    asyncTag = '[object AsyncFunction]',27    boolTag = '[object Boolean]',28    dateTag = '[object Date]',29    errorTag = '[object Error]',30    funcTag = '[object Function]',31    genTag = '[object GeneratorFunction]',32    mapTag = '[object Map]',33    numberTag = '[object Number]',34    nullTag = '[object Null]',35    objectTag = '[object Object]',36    proxyTag = '[object Proxy]',37    regexpTag = '[object RegExp]',38    setTag = '[object Set]',39    stringTag = '[object String]',40    undefinedTag = '[object Undefined]',41    weakMapTag = '[object WeakMap]';42 43var arrayBufferTag = '[object ArrayBuffer]',44    dataViewTag = '[object DataView]',45    float32Tag = '[object Float32Array]',46    float64Tag = '[object Float64Array]',47    int8Tag = '[object Int8Array]',48    int16Tag = '[object Int16Array]',49    int32Tag = '[object Int32Array]',50    uint8Tag = '[object Uint8Array]',51    uint8ClampedTag = '[object Uint8ClampedArray]',52    uint16Tag = '[object Uint16Array]',53    uint32Tag = '[object Uint32Array]';54 55/**56 * Used to match `RegExp`57 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).58 */59var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;60 61/** Used to detect host constructors (Safari). */62var reIsHostCtor = /^\[object .+?Constructor\]$/;63 64/** Used to detect unsigned integer values. */65var reIsUint = /^(?:0|[1-9]\d*)$/;66 67/** Used to identify `toStringTag` values of typed arrays. */68var typedArrayTags = {};69typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =70typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =71typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =72typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =73typedArrayTags[uint32Tag] = true;74typedArrayTags[argsTag] = typedArrayTags[arrayTag] =75typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =76typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =77typedArrayTags[errorTag] = typedArrayTags[funcTag] =78typedArrayTags[mapTag] = typedArrayTags[numberTag] =79typedArrayTags[objectTag] = typedArrayTags[regexpTag] =80typedArrayTags[setTag] = typedArrayTags[stringTag] =81typedArrayTags[weakMapTag] = false;82 83/** Detect free variable `global` from Node.js. */84var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;85 86/** Detect free variable `self`. */87var freeSelf = typeof self == 'object' && self && self.Object === Object && self;88 89/** Used as a reference to the global object. */90var root = freeGlobal || freeSelf || Function('return this')();91 92/** Detect free variable `exports`. */93var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;94 95/** Detect free variable `module`. */96var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;97 98/** Detect the popular CommonJS extension `module.exports`. */99var moduleExports = freeModule && freeModule.exports === freeExports;100 101/** Detect free variable `process` from Node.js. */102var freeProcess = moduleExports && freeGlobal.process;103 104/** Used to access faster Node.js helpers. */105var nodeUtil = (function() {106  try {107    // Use `util.types` for Node.js 10+.108    var types = freeModule && freeModule.require && freeModule.require('util').types;109 110    if (types) {111      return types;112    }113 114    // Legacy `process.binding('util')` for Node.js < 10.115    return freeProcess && freeProcess.binding && freeProcess.binding('util');116  } catch (e) {}117}());118 119/* Node.js helper references. */120var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;121 122/**123 * A faster alternative to `Function#apply`, this function invokes `func`124 * with the `this` binding of `thisArg` and the arguments of `args`.125 *126 * @private127 * @param {Function} func The function to invoke.128 * @param {*} thisArg The `this` binding of `func`.129 * @param {Array} args The arguments to invoke `func` with.130 * @returns {*} Returns the result of `func`.131 */132function apply(func, thisArg, args) {133  switch (args.length) {134    case 0: return func.call(thisArg);135    case 1: return func.call(thisArg, args[0]);136    case 2: return func.call(thisArg, args[0], args[1]);137    case 3: return func.call(thisArg, args[0], args[1], args[2]);138  }139  return func.apply(thisArg, args);140}141 142/**143 * The base implementation of `_.times` without support for iteratee shorthands144 * or max array length checks.145 *146 * @private147 * @param {number} n The number of times to invoke `iteratee`.148 * @param {Function} iteratee The function invoked per iteration.149 * @returns {Array} Returns the array of results.150 */151function baseTimes(n, iteratee) {152  var index = -1,153      result = Array(n);154 155  while (++index < n) {156    result[index] = iteratee(index);157  }158  return result;159}160 161/**162 * The base implementation of `_.unary` without support for storing metadata.163 *164 * @private165 * @param {Function} func The function to cap arguments for.166 * @returns {Function} Returns the new capped function.167 */168function baseUnary(func) {169  return function(value) {170    return func(value);171  };172}173 174/**175 * Gets the value at `key` of `object`.176 *177 * @private178 * @param {Object} [object] The object to query.179 * @param {string} key The key of the property to get.180 * @returns {*} Returns the property value.181 */182function getValue(object, key) {183  return object == null ? undefined : object[key];184}185 186/**187 * Creates a unary function that invokes `func` with its argument transformed.188 *189 * @private190 * @param {Function} func The function to wrap.191 * @param {Function} transform The argument transform.192 * @returns {Function} Returns the new function.193 */194function overArg(func, transform) {195  return function(arg) {196    return func(transform(arg));197  };198}199 200/** Used for built-in method references. */201var arrayProto = Array.prototype,202    funcProto = Function.prototype,203    objectProto = Object.prototype;204 205/** Used to detect overreaching core-js shims. */206var coreJsData = root['__core-js_shared__'];207 208/** Used to resolve the decompiled source of functions. */209var funcToString = funcProto.toString;210 211/** Used to check objects for own properties. */212var hasOwnProperty = objectProto.hasOwnProperty;213 214/** Used to detect methods masquerading as native. */215var maskSrcKey = (function() {216  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');217  return uid ? ('Symbol(src)_1.' + uid) : '';218}());219 220/**221 * Used to resolve the222 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)223 * of values.224 */225var nativeObjectToString = objectProto.toString;226 227/** Used to infer the `Object` constructor. */228var objectCtorString = funcToString.call(Object);229 230/** Used to detect if a method is native. */231var reIsNative = RegExp('^' +232  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')233  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'234);235 236/** Built-in value references. */237var Buffer = moduleExports ? root.Buffer : undefined,238    Symbol = root.Symbol,239    Uint8Array = root.Uint8Array,240    allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,241    getPrototype = overArg(Object.getPrototypeOf, Object),242    objectCreate = Object.create,243    propertyIsEnumerable = objectProto.propertyIsEnumerable,244    splice = arrayProto.splice,245    symToStringTag = Symbol ? Symbol.toStringTag : undefined;246 247var defineProperty = (function() {248  try {249    var func = getNative(Object, 'defineProperty');250    func({}, '', {});251    return func;252  } catch (e) {}253}());254 255/* Built-in method references for those with the same name as other `lodash` methods. */256var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,257    nativeMax = Math.max,258    nativeNow = Date.now;259 260/* Built-in method references that are verified to be native. */261var Map = getNative(root, 'Map'),262    nativeCreate = getNative(Object, 'create');263 264/**265 * The base implementation of `_.create` without support for assigning266 * properties to the created object.267 *268 * @private269 * @param {Object} proto The object to inherit from.270 * @returns {Object} Returns the new object.271 */272var baseCreate = (function() {273  function object() {}274  return function(proto) {275    if (!isObject(proto)) {276      return {};277    }278    if (objectCreate) {279      return objectCreate(proto);280    }281    object.prototype = proto;282    var result = new object;283    object.prototype = undefined;284    return result;285  };286}());287 288/**289 * Creates a hash object.290 *291 * @private292 * @constructor293 * @param {Array} [entries] The key-value pairs to cache.294 */295function Hash(entries) {296  var index = -1,297      length = entries == null ? 0 : entries.length;298 299  this.clear();300  while (++index < length) {301    var entry = entries[index];302    this.set(entry[0], entry[1]);303  }304}305 306/**307 * Removes all key-value entries from the hash.308 *309 * @private310 * @name clear311 * @memberOf Hash312 */313function hashClear() {314  this.__data__ = nativeCreate ? nativeCreate(null) : {};315  this.size = 0;316}317 318/**319 * Removes `key` and its value from the hash.320 *321 * @private322 * @name delete323 * @memberOf Hash324 * @param {Object} hash The hash to modify.325 * @param {string} key The key of the value to remove.326 * @returns {boolean} Returns `true` if the entry was removed, else `false`.327 */328function hashDelete(key) {329  var result = this.has(key) && delete this.__data__[key];330  this.size -= result ? 1 : 0;331  return result;332}333 334/**335 * Gets the hash value for `key`.336 *337 * @private338 * @name get339 * @memberOf Hash340 * @param {string} key The key of the value to get.341 * @returns {*} Returns the entry value.342 */343function hashGet(key) {344  var data = this.__data__;345  if (nativeCreate) {346    var result = data[key];347    return result === HASH_UNDEFINED ? undefined : result;348  }349  return hasOwnProperty.call(data, key) ? data[key] : undefined;350}351 352/**353 * Checks if a hash value for `key` exists.354 *355 * @private356 * @name has357 * @memberOf Hash358 * @param {string} key The key of the entry to check.359 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.360 */361function hashHas(key) {362  var data = this.__data__;363  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);364}365 366/**367 * Sets the hash `key` to `value`.368 *369 * @private370 * @name set371 * @memberOf Hash372 * @param {string} key The key of the value to set.373 * @param {*} value The value to set.374 * @returns {Object} Returns the hash instance.375 */376function hashSet(key, value) {377  var data = this.__data__;378  this.size += this.has(key) ? 0 : 1;379  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;380  return this;381}382 383// Add methods to `Hash`.384Hash.prototype.clear = hashClear;385Hash.prototype['delete'] = hashDelete;386Hash.prototype.get = hashGet;387Hash.prototype.has = hashHas;388Hash.prototype.set = hashSet;389 390/**391 * Creates an list cache object.392 *393 * @private394 * @constructor395 * @param {Array} [entries] The key-value pairs to cache.396 */397function ListCache(entries) {398  var index = -1,399      length = entries == null ? 0 : entries.length;400 401  this.clear();402  while (++index < length) {403    var entry = entries[index];404    this.set(entry[0], entry[1]);405  }406}407 408/**409 * Removes all key-value entries from the list cache.410 *411 * @private412 * @name clear413 * @memberOf ListCache414 */415function listCacheClear() {416  this.__data__ = [];417  this.size = 0;418}419 420/**421 * Removes `key` and its value from the list cache.422 *423 * @private424 * @name delete425 * @memberOf ListCache426 * @param {string} key The key of the value to remove.427 * @returns {boolean} Returns `true` if the entry was removed, else `false`.428 */429function listCacheDelete(key) {430  var data = this.__data__,431      index = assocIndexOf(data, key);432 433  if (index < 0) {434    return false;435  }436  var lastIndex = data.length - 1;437  if (index == lastIndex) {438    data.pop();439  } else {440    splice.call(data, index, 1);441  }442  --this.size;443  return true;444}445 446/**447 * Gets the list cache value for `key`.448 *449 * @private450 * @name get451 * @memberOf ListCache452 * @param {string} key The key of the value to get.453 * @returns {*} Returns the entry value.454 */455function listCacheGet(key) {456  var data = this.__data__,457      index = assocIndexOf(data, key);458 459  return index < 0 ? undefined : data[index][1];460}461 462/**463 * Checks if a list cache value for `key` exists.464 *465 * @private466 * @name has467 * @memberOf ListCache468 * @param {string} key The key of the entry to check.469 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.470 */471function listCacheHas(key) {472  return assocIndexOf(this.__data__, key) > -1;473}474 475/**476 * Sets the list cache `key` to `value`.477 *478 * @private479 * @name set480 * @memberOf ListCache481 * @param {string} key The key of the value to set.482 * @param {*} value The value to set.483 * @returns {Object} Returns the list cache instance.484 */485function listCacheSet(key, value) {486  var data = this.__data__,487      index = assocIndexOf(data, key);488 489  if (index < 0) {490    ++this.size;491    data.push([key, value]);492  } else {493    data[index][1] = value;494  }495  return this;496}497 498// Add methods to `ListCache`.499ListCache.prototype.clear = listCacheClear;500ListCache.prototype['delete'] = listCacheDelete;501ListCache.prototype.get = listCacheGet;502ListCache.prototype.has = listCacheHas;503ListCache.prototype.set = listCacheSet;504 505/**506 * Creates a map cache object to store key-value pairs.507 *508 * @private509 * @constructor510 * @param {Array} [entries] The key-value pairs to cache.511 */512function MapCache(entries) {513  var index = -1,514      length = entries == null ? 0 : entries.length;515 516  this.clear();517  while (++index < length) {518    var entry = entries[index];519    this.set(entry[0], entry[1]);520  }521}522 523/**524 * Removes all key-value entries from the map.525 *526 * @private527 * @name clear528 * @memberOf MapCache529 */530function mapCacheClear() {531  this.size = 0;532  this.__data__ = {533    'hash': new Hash,534    'map': new (Map || ListCache),535    'string': new Hash536  };537}538 539/**540 * Removes `key` and its value from the map.541 *542 * @private543 * @name delete544 * @memberOf MapCache545 * @param {string} key The key of the value to remove.546 * @returns {boolean} Returns `true` if the entry was removed, else `false`.547 */548function mapCacheDelete(key) {549  var result = getMapData(this, key)['delete'](key);550  this.size -= result ? 1 : 0;551  return result;552}553 554/**555 * Gets the map value for `key`.556 *557 * @private558 * @name get559 * @memberOf MapCache560 * @param {string} key The key of the value to get.561 * @returns {*} Returns the entry value.562 */563function mapCacheGet(key) {564  return getMapData(this, key).get(key);565}566 567/**568 * Checks if a map value for `key` exists.569 *570 * @private571 * @name has572 * @memberOf MapCache573 * @param {string} key The key of the entry to check.574 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.575 */576function mapCacheHas(key) {577  return getMapData(this, key).has(key);578}579 580/**581 * Sets the map `key` to `value`.582 *583 * @private584 * @name set585 * @memberOf MapCache586 * @param {string} key The key of the value to set.587 * @param {*} value The value to set.588 * @returns {Object} Returns the map cache instance.589 */590function mapCacheSet(key, value) {591  var data = getMapData(this, key),592      size = data.size;593 594  data.set(key, value);595  this.size += data.size == size ? 0 : 1;596  return this;597}598 599// Add methods to `MapCache`.600MapCache.prototype.clear = mapCacheClear;601MapCache.prototype['delete'] = mapCacheDelete;602MapCache.prototype.get = mapCacheGet;603MapCache.prototype.has = mapCacheHas;604MapCache.prototype.set = mapCacheSet;605 606/**607 * Creates a stack cache object to store key-value pairs.608 *609 * @private610 * @constructor611 * @param {Array} [entries] The key-value pairs to cache.612 */613function Stack(entries) {614  var data = this.__data__ = new ListCache(entries);615  this.size = data.size;616}617 618/**619 * Removes all key-value entries from the stack.620 *621 * @private622 * @name clear623 * @memberOf Stack624 */625function stackClear() {626  this.__data__ = new ListCache;627  this.size = 0;628}629 630/**631 * Removes `key` and its value from the stack.632 *633 * @private634 * @name delete635 * @memberOf Stack636 * @param {string} key The key of the value to remove.637 * @returns {boolean} Returns `true` if the entry was removed, else `false`.638 */639function stackDelete(key) {640  var data = this.__data__,641      result = data['delete'](key);642 643  this.size = data.size;644  return result;645}646 647/**648 * Gets the stack value for `key`.649 *650 * @private651 * @name get652 * @memberOf Stack653 * @param {string} key The key of the value to get.654 * @returns {*} Returns the entry value.655 */656function stackGet(key) {657  return this.__data__.get(key);658}659 660/**661 * Checks if a stack value for `key` exists.662 *663 * @private664 * @name has665 * @memberOf Stack666 * @param {string} key The key of the entry to check.667 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.668 */669function stackHas(key) {670  return this.__data__.has(key);671}672 673/**674 * Sets the stack `key` to `value`.675 *676 * @private677 * @name set678 * @memberOf Stack679 * @param {string} key The key of the value to set.680 * @param {*} value The value to set.681 * @returns {Object} Returns the stack cache instance.682 */683function stackSet(key, value) {684  var data = this.__data__;685  if (data instanceof ListCache) {686    var pairs = data.__data__;687    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {688      pairs.push([key, value]);689      this.size = ++data.size;690      return this;691    }692    data = this.__data__ = new MapCache(pairs);693  }694  data.set(key, value);695  this.size = data.size;696  return this;697}698 699// Add methods to `Stack`.700Stack.prototype.clear = stackClear;701Stack.prototype['delete'] = stackDelete;702Stack.prototype.get = stackGet;703Stack.prototype.has = stackHas;704Stack.prototype.set = stackSet;705 706/**707 * Creates an array of the enumerable property names of the array-like `value`.708 *709 * @private710 * @param {*} value The value to query.711 * @param {boolean} inherited Specify returning inherited property names.712 * @returns {Array} Returns the array of property names.713 */714function arrayLikeKeys(value, inherited) {715  var isArr = isArray(value),716      isArg = !isArr && isArguments(value),717      isBuff = !isArr && !isArg && isBuffer(value),718      isType = !isArr && !isArg && !isBuff && isTypedArray(value),719      skipIndexes = isArr || isArg || isBuff || isType,720      result = skipIndexes ? baseTimes(value.length, String) : [],721      length = result.length;722 723  for (var key in value) {724    if ((inherited || hasOwnProperty.call(value, key)) &&725        !(skipIndexes && (726           // Safari 9 has enumerable `arguments.length` in strict mode.727           key == 'length' ||728           // Node.js 0.10 has enumerable non-index properties on buffers.729           (isBuff && (key == 'offset' || key == 'parent')) ||730           // PhantomJS 2 has enumerable non-index properties on typed arrays.731           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||732           // Skip index properties.733           isIndex(key, length)734        ))) {735      result.push(key);736    }737  }738  return result;739}740 741/**742 * This function is like `assignValue` except that it doesn't assign743 * `undefined` values.744 *745 * @private746 * @param {Object} object The object to modify.747 * @param {string} key The key of the property to assign.748 * @param {*} value The value to assign.749 */750function assignMergeValue(object, key, value) {751  if ((value !== undefined && !eq(object[key], value)) ||752      (value === undefined && !(key in object))) {753    baseAssignValue(object, key, value);754  }755}756 757/**758 * Assigns `value` to `key` of `object` if the existing value is not equivalent759 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)760 * for equality comparisons.761 *762 * @private763 * @param {Object} object The object to modify.764 * @param {string} key The key of the property to assign.765 * @param {*} value The value to assign.766 */767function assignValue(object, key, value) {768  var objValue = object[key];769  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||770      (value === undefined && !(key in object))) {771    baseAssignValue(object, key, value);772  }773}774 775/**776 * Gets the index at which the `key` is found in `array` of key-value pairs.777 *778 * @private779 * @param {Array} array The array to inspect.780 * @param {*} key The key to search for.781 * @returns {number} Returns the index of the matched value, else `-1`.782 */783function assocIndexOf(array, key) {784  var length = array.length;785  while (length--) {786    if (eq(array[length][0], key)) {787      return length;788    }789  }790  return -1;791}792 793/**794 * The base implementation of `assignValue` and `assignMergeValue` without795 * value checks.796 *797 * @private798 * @param {Object} object The object to modify.799 * @param {string} key The key of the property to assign.800 * @param {*} value The value to assign.801 */802function baseAssignValue(object, key, value) {803  if (key == '__proto__' && defineProperty) {804    defineProperty(object, key, {805      'configurable': true,806      'enumerable': true,807      'value': value,808      'writable': true809    });810  } else {811    object[key] = value;812  }813}814 815/**816 * The base implementation of `baseForOwn` which iterates over `object`817 * properties returned by `keysFunc` and invokes `iteratee` for each property.818 * Iteratee functions may exit iteration early by explicitly returning `false`.819 *820 * @private821 * @param {Object} object The object to iterate over.822 * @param {Function} iteratee The function invoked per iteration.823 * @param {Function} keysFunc The function to get the keys of `object`.824 * @returns {Object} Returns `object`.825 */826var baseFor = createBaseFor();827 828/**829 * The base implementation of `getTag` without fallbacks for buggy environments.830 *831 * @private832 * @param {*} value The value to query.833 * @returns {string} Returns the `toStringTag`.834 */835function baseGetTag(value) {836  if (value == null) {837    return value === undefined ? undefinedTag : nullTag;838  }839  return (symToStringTag && symToStringTag in Object(value))840    ? getRawTag(value)841    : objectToString(value);842}843 844/**845 * The base implementation of `_.isArguments`.846 *847 * @private848 * @param {*} value The value to check.849 * @returns {boolean} Returns `true` if `value` is an `arguments` object,850 */851function baseIsArguments(value) {852  return isObjectLike(value) && baseGetTag(value) == argsTag;853}854 855/**856 * The base implementation of `_.isNative` without bad shim checks.857 *858 * @private859 * @param {*} value The value to check.860 * @returns {boolean} Returns `true` if `value` is a native function,861 *  else `false`.862 */863function baseIsNative(value) {864  if (!isObject(value) || isMasked(value)) {865    return false;866  }867  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;868  return pattern.test(toSource(value));869}870 871/**872 * The base implementation of `_.isTypedArray` without Node.js optimizations.873 *874 * @private875 * @param {*} value The value to check.876 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.877 */878function baseIsTypedArray(value) {879  return isObjectLike(value) &&880    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];881}882 883/**884 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.885 *886 * @private887 * @param {Object} object The object to query.888 * @returns {Array} Returns the array of property names.889 */890function baseKeysIn(object) {891  if (!isObject(object)) {892    return nativeKeysIn(object);893  }894  var isProto = isPrototype(object),895      result = [];896 897  for (var key in object) {898    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {899      result.push(key);900    }901  }902  return result;903}904 905/**906 * The base implementation of `_.merge` without support for multiple sources.907 *908 * @private909 * @param {Object} object The destination object.910 * @param {Object} source The source object.911 * @param {number} srcIndex The index of `source`.912 * @param {Function} [customizer] The function to customize merged values.913 * @param {Object} [stack] Tracks traversed source values and their merged914 *  counterparts.915 */916function baseMerge(object, source, srcIndex, customizer, stack) {917  if (object === source) {918    return;919  }920  baseFor(source, function(srcValue, key) {921    stack || (stack = new Stack);922    if (isObject(srcValue)) {923      baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);924    }925    else {926      var newValue = customizer927        ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)928        : undefined;929 930      if (newValue === undefined) {931        newValue = srcValue;932      }933      assignMergeValue(object, key, newValue);934    }935  }, keysIn);936}937 938/**939 * A specialized version of `baseMerge` for arrays and objects which performs940 * deep merges and tracks traversed objects enabling objects with circular941 * references to be merged.942 *943 * @private944 * @param {Object} object The destination object.945 * @param {Object} source The source object.946 * @param {string} key The key of the value to merge.947 * @param {number} srcIndex The index of `source`.948 * @param {Function} mergeFunc The function to merge values.949 * @param {Function} [customizer] The function to customize assigned values.950 * @param {Object} [stack] Tracks traversed source values and their merged951 *  counterparts.952 */953function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {954  var objValue = safeGet(object, key),955      srcValue = safeGet(source, key),956      stacked = stack.get(srcValue);957 958  if (stacked) {959    assignMergeValue(object, key, stacked);960    return;961  }962  var newValue = customizer963    ? customizer(objValue, srcValue, (key + ''), object, source, stack)964    : undefined;965 966  var isCommon = newValue === undefined;967 968  if (isCommon) {969    var isArr = isArray(srcValue),970        isBuff = !isArr && isBuffer(srcValue),971        isTyped = !isArr && !isBuff && isTypedArray(srcValue);972 973    newValue = srcValue;974    if (isArr || isBuff || isTyped) {975      if (isArray(objValue)) {976        newValue = objValue;977      }978      else if (isArrayLikeObject(objValue)) {979        newValue = copyArray(objValue);980      }981      else if (isBuff) {982        isCommon = false;983        newValue = cloneBuffer(srcValue, true);984      }985      else if (isTyped) {986        isCommon = false;987        newValue = cloneTypedArray(srcValue, true);988      }989      else {990        newValue = [];991      }992    }993    else if (isPlainObject(srcValue) || isArguments(srcValue)) {994      newValue = objValue;995      if (isArguments(objValue)) {996        newValue = toPlainObject(objValue);997      }998      else if (!isObject(objValue) || isFunction(objValue)) {999        newValue = initCloneObject(srcValue);1000      }1001    }1002    else {1003      isCommon = false;1004    }1005  }1006  if (isCommon) {1007    // Recursively merge objects and arrays (susceptible to call stack limits).1008    stack.set(srcValue, newValue);1009    mergeFunc(newValue, srcValue, srcIndex, customizer, stack);1010    stack['delete'](srcValue);1011  }1012  assignMergeValue(object, key, newValue);1013}1014 1015/**1016 * The base implementation of `_.rest` which doesn't validate or coerce arguments.1017 *1018 * @private1019 * @param {Function} func The function to apply a rest parameter to.1020 * @param {number} [start=func.length-1] The start position of the rest parameter.1021 * @returns {Function} Returns the new function.1022 */1023function baseRest(func, start) {1024  return setToString(overRest(func, start, identity), func + '');1025}1026 1027/**1028 * The base implementation of `setToString` without support for hot loop shorting.1029 *1030 * @private1031 * @param {Function} func The function to modify.1032 * @param {Function} string The `toString` result.1033 * @returns {Function} Returns `func`.1034 */1035var baseSetToString = !defineProperty ? identity : function(func, string) {1036  return defineProperty(func, 'toString', {1037    'configurable': true,1038    'enumerable': false,1039    'value': constant(string),1040    'writable': true1041  });1042};1043 1044/**1045 * Creates a clone of  `buffer`.1046 *1047 * @private1048 * @param {Buffer} buffer The buffer to clone.1049 * @param {boolean} [isDeep] Specify a deep clone.1050 * @returns {Buffer} Returns the cloned buffer.1051 */1052function cloneBuffer(buffer, isDeep) {1053  if (isDeep) {1054    return buffer.slice();1055  }1056  var length = buffer.length,1057      result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);1058 1059  buffer.copy(result);1060  return result;1061}1062 1063/**1064 * Creates a clone of `arrayBuffer`.1065 *1066 * @private1067 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.1068 * @returns {ArrayBuffer} Returns the cloned array buffer.1069 */1070function cloneArrayBuffer(arrayBuffer) {1071  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);1072  new Uint8Array(result).set(new Uint8Array(arrayBuffer));1073  return result;1074}1075 1076/**1077 * Creates a clone of `typedArray`.1078 *1079 * @private1080 * @param {Object} typedArray The typed array to clone.1081 * @param {boolean} [isDeep] Specify a deep clone.1082 * @returns {Object} Returns the cloned typed array.1083 */1084function cloneTypedArray(typedArray, isDeep) {1085  var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;1086  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);1087}1088 1089/**1090 * Copies the values of `source` to `array`.1091 *1092 * @private1093 * @param {Array} source The array to copy values from.1094 * @param {Array} [array=[]] The array to copy values to.1095 * @returns {Array} Returns `array`.1096 */1097function copyArray(source, array) {1098  var index = -1,1099      length = source.length;1100 1101  array || (array = Array(length));1102  while (++index < length) {1103    array[index] = source[index];1104  }1105  return array;1106}1107 1108/**1109 * Copies properties of `source` to `object`.1110 *1111 * @private1112 * @param {Object} source The object to copy properties from.1113 * @param {Array} props The property identifiers to copy.1114 * @param {Object} [object={}] The object to copy properties to.1115 * @param {Function} [customizer] The function to customize copied values.1116 * @returns {Object} Returns `object`.1117 */1118function copyObject(source, props, object, customizer) {1119  var isNew = !object;1120  object || (object = {});1121 1122  var index = -1,1123      length = props.length;1124 1125  while (++index < length) {1126    var key = props[index];1127 1128    var newValue = customizer1129      ? customizer(object[key], source[key], key, object, source)1130      : undefined;1131 1132    if (newValue === undefined) {1133      newValue = source[key];1134    }1135    if (isNew) {1136      baseAssignValue(object, key, newValue);1137    } else {1138      assignValue(object, key, newValue);1139    }1140  }1141  return object;1142}1143 1144/**1145 * Creates a function like `_.assign`.1146 *1147 * @private1148 * @param {Function} assigner The function to assign values.1149 * @returns {Function} Returns the new assigner function.1150 */1151function createAssigner(assigner) {1152  return baseRest(function(object, sources) {1153    var index = -1,1154        length = sources.length,1155        customizer = length > 1 ? sources[length - 1] : undefined,1156        guard = length > 2 ? sources[2] : undefined;1157 1158    customizer = (assigner.length > 3 && typeof customizer == 'function')1159      ? (length--, customizer)1160      : undefined;1161 1162    if (guard && isIterateeCall(sources[0], sources[1], guard)) {1163      customizer = length < 3 ? undefined : customizer;1164      length = 1;1165    }1166    object = Object(object);1167    while (++index < length) {1168      var source = sources[index];1169      if (source) {1170        assigner(object, source, index, customizer);1171      }1172    }1173    return object;1174  });1175}1176 1177/**1178 * Creates a base function for methods like `_.forIn` and `_.forOwn`.1179 *1180 * @private1181 * @param {boolean} [fromRight] Specify iterating from right to left.1182 * @returns {Function} Returns the new base function.1183 */1184function createBaseFor(fromRight) {1185  return function(object, iteratee, keysFunc) {1186    var index = -1,1187        iterable = Object(object),1188        props = keysFunc(object),1189        length = props.length;1190 1191    while (length--) {1192      var key = props[fromRight ? length : ++index];1193      if (iteratee(iterable[key], key, iterable) === false) {1194        break;1195      }1196    }1197    return object;1198  };1199}1200 

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

Brunobkr/llama.cpp_AlgMor24_github · Team Ai