Skip to content
Snippets Groups Projects
index.js 8.75 MiB
Newer Older
  • Learn to ignore specific revisions
  • Romain CREY's avatar
    Romain CREY committed
     */
    
    function last(array) {
      var length = array == null ? 0 : array.length;
      return length ? array[length - 1] : undefined;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = last;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseGet = __webpack_require__(1514),
        baseSlice = __webpack_require__(1516);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Gets the parent value at `path` of `object`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} object The object to query.
     * @param {Array} path The path to get the parent value of.
     * @returns {*} Returns the parent value.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function parent(object, path) {
      return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = parent;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var castPath = __webpack_require__(1504),
        toKey = __webpack_require__(1515);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * The base implementation of `_.get` without support for default values.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} object The object to query.
     * @param {Array|string} path The path of the property to get.
     * @returns {*} Returns the resolved value.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function baseGet(object, path) {
      path = castPath(path, object);
    
      var index = 0,
          length = path.length;
    
      while (object != null && index < length) {
        object = object[toKey(path[index++])];
      }
      return (index && index == length) ? object : undefined;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = baseGet;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var isSymbol = __webpack_require__(1506);
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /** Used as references for various `Number` constants. */
    var INFINITY = 1 / 0;
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Converts `value` to a string key if it's not a string or symbol.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {*} value The value to inspect.
     * @returns {string|symbol} Returns the key.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function toKey(value) {
      if (typeof value == 'string' || isSymbol(value)) {
        return value;
      }
      var result = (value + '');
      return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
    }
    
    module.exports = toKey;
    
    
    /***/ }),
    /* 1516 */
    /***/ (function(module, exports) {
    
    /**
     * The base implementation of `_.slice` without an iteratee call guard.
     *
     * @private
     * @param {Array} array The array to slice.
     * @param {number} [start=0] The start position.
     * @param {number} [end=array.length] The end position.
     * @returns {Array} Returns the slice of `array`.
     */
    function baseSlice(array, start, end) {
      var index = -1,
          length = array.length;
    
      if (start < 0) {
        start = -start > length ? 0 : (length + start);
      }
      end = end > length ? length : end;
      if (end < 0) {
        end += length;
      }
      length = start > end ? 0 : ((end - start) >>> 0);
      start >>>= 0;
    
      var result = Array(length);
      while (++index < length) {
        result[index] = array[index + start];
    
    Romain CREY's avatar
    Romain CREY committed
      }
      return result;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = baseSlice;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var isPlainObject = __webpack_require__(1518);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
     * objects.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {*} value The value to inspect.
     * @param {string} key The key of the property to inspect.
     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function customOmitClone(value) {
      return isPlainObject(value) ? undefined : value;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = customOmitClone;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    /* 1518 */
    /***/ (function(module, exports, __webpack_require__) {
    
    var baseGetTag = __webpack_require__(1415),
        getPrototype = __webpack_require__(1480),
        isObjectLike = __webpack_require__(1452);
    
    /** `Object#toString` result references. */
    var objectTag = '[object Object]';
    
    Romain CREY's avatar
    Romain CREY committed
    
    /** Used for built-in method references. */
    
    var funcProto = Function.prototype,
        objectProto = Object.prototype;
    
    /** Used to resolve the decompiled source of functions. */
    var funcToString = funcProto.toString;
    
    Romain CREY's avatar
    Romain CREY committed
    
    /** Used to check objects for own properties. */
    var hasOwnProperty = objectProto.hasOwnProperty;
    
    
    /** Used to infer the `Object` constructor. */
    var objectCtorString = funcToString.call(Object);
    
    
    Romain CREY's avatar
    Romain CREY committed
    /**
    
     * Checks if `value` is a plain object, that is, an object created by the
     * `Object` constructor or one with a `[[Prototype]]` of `null`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * @static
     * @memberOf _
     * @since 0.8.0
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
     * @example
     *
     * function Foo() {
     *   this.a = 1;
     * }
     *
     * _.isPlainObject(new Foo);
     * // => false
     *
     * _.isPlainObject([1, 2, 3]);
     * // => false
     *
     * _.isPlainObject({ 'x': 0, 'y': 0 });
     * // => true
     *
     * _.isPlainObject(Object.create(null));
     * // => true
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function isPlainObject(value) {
      if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
        return false;
    
    Romain CREY's avatar
    Romain CREY committed
      }
    
      var proto = getPrototype(value);
      if (proto === null) {
        return true;
      }
      var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
      return typeof Ctor == 'function' && Ctor instanceof Ctor &&
        funcToString.call(Ctor) == objectCtorString;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = isPlainObject;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var flatten = __webpack_require__(1520),
        overRest = __webpack_require__(1523),
        setToString = __webpack_require__(1525);
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /**
     * A specialized version of `baseRest` which flattens the rest array.
     *
     * @private
     * @param {Function} func The function to apply a rest parameter to.
     * @returns {Function} Returns the new function.
     */
    function flatRest(func) {
      return setToString(overRest(func, undefined, flatten), func + '');
    }
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = flatRest;
    
    
    /***/ }),
    /* 1520 */
    /***/ (function(module, exports, __webpack_require__) {
    
    var baseFlatten = __webpack_require__(1521);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Flattens `array` a single level deep.
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Array
     * @param {Array} array The array to flatten.
     * @returns {Array} Returns the new flattened array.
     * @example
     *
     * _.flatten([1, [2, [3, [4]], 5]]);
     * // => [1, 2, [3, [4]], 5]
     */
    function flatten(array) {
      var length = array == null ? 0 : array.length;
      return length ? baseFlatten(array, 1) : [];
    }
    
    module.exports = flatten;
    
    
    /***/ }),
    /* 1521 */
    /***/ (function(module, exports, __webpack_require__) {
    
    var arrayPush = __webpack_require__(1479),
        isFlattenable = __webpack_require__(1522);
    
    /**
     * The base implementation of `_.flatten` with support for restricting flattening.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Array} array The array to flatten.
     * @param {number} depth The maximum recursion depth.
     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
     * @param {Array} [result=[]] The initial result value.
     * @returns {Array} Returns the new flattened array.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function baseFlatten(array, depth, predicate, isStrict, result) {
      var index = -1,
          length = array.length;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
      predicate || (predicate = isFlattenable);
      result || (result = []);
    
    Romain CREY's avatar
    Romain CREY committed
    
    
      while (++index < length) {
        var value = array[index];
        if (depth > 0 && predicate(value)) {
          if (depth > 1) {
            // Recursively flatten arrays (susceptible to call stack limits).
            baseFlatten(value, depth - 1, predicate, isStrict, result);
          } else {
            arrayPush(result, value);
          }
        } else if (!isStrict) {
          result[result.length] = value;
        }
      }
      return result;
    }
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = baseFlatten;
    
    /***/ }),
    /* 1522 */
    /***/ (function(module, exports, __webpack_require__) {
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    var Symbol = __webpack_require__(1416),
        isArguments = __webpack_require__(1450),
        isArray = __webpack_require__(1453);
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /** Built-in value references. */
    var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /**
     * Checks if `value` is a flattenable `arguments` object or array.
     *
     * @private
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
     */
    function isFlattenable(value) {
      return isArray(value) || isArguments(value) ||
        !!(spreadableSymbol && value && value[spreadableSymbol]);
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = isFlattenable;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var apply = __webpack_require__(1524);
    
    /* Built-in method references for those with the same name as other `lodash` methods. */
    var nativeMax = Math.max;
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * A specialized version of `baseRest` which transforms the rest array.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Function} func The function to apply a rest parameter to.
     * @param {number} [start=func.length-1] The start position of the rest parameter.
     * @param {Function} transform The rest array transform.
     * @returns {Function} Returns the new function.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function overRest(func, start, transform) {
      start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
      return function() {
        var args = arguments,
            index = -1,
            length = nativeMax(args.length - start, 0),
            array = Array(length);
    
        while (++index < length) {
          array[index] = args[start + index];
        }
        index = -1;
        var otherArgs = Array(start + 1);
        while (++index < start) {
          otherArgs[index] = args[index];
        }
        otherArgs[start] = transform(array);
        return apply(func, this, otherArgs);
      };
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = overRest;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports) {
    
    /**
    
     * A faster alternative to `Function#apply`, this function invokes `func`
     * with the `this` binding of `thisArg` and the arguments of `args`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Function} func The function to invoke.
     * @param {*} thisArg The `this` binding of `func`.
     * @param {Array} args The arguments to invoke `func` with.
     * @returns {*} Returns the result of `func`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function apply(func, thisArg, args) {
      switch (args.length) {
        case 0: return func.call(thisArg);
        case 1: return func.call(thisArg, args[0]);
        case 2: return func.call(thisArg, args[0], args[1]);
        case 3: return func.call(thisArg, args[0], args[1], args[2]);
      }
      return func.apply(thisArg, args);
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = apply;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseSetToString = __webpack_require__(1526),
        shortOut = __webpack_require__(1529);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Sets the `toString` method of `func` to return `string`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    var setToString = shortOut(baseSetToString);
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = setToString;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var constant = __webpack_require__(1527),
        defineProperty = __webpack_require__(1444),
        identity = __webpack_require__(1528);
    
    /**
     * The base implementation of `setToString` without support for hot loop shorting.
     *
     * @private
     * @param {Function} func The function to modify.
     * @param {Function} string The `toString` result.
     * @returns {Function} Returns `func`.
     */
    var baseSetToString = !defineProperty ? identity : function(func, string) {
      return defineProperty(func, 'toString', {
        'configurable': true,
        'enumerable': false,
        'value': constant(string),
        'writable': true
      });
    };
    
    module.exports = baseSetToString;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    
    /***/ }),
    /* 1527 */
    /***/ (function(module, exports) {
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Creates a function that returns `value`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @static
     * @memberOf _
    
     * @since 2.4.0
     * @category Util
     * @param {*} value The value to return from the new function.
     * @returns {Function} Returns the new constant function.
    
    Romain CREY's avatar
    Romain CREY committed
     * @example
     *
    
     * var objects = _.times(2, _.constant({ 'a': 1 }));
     *
     * console.log(objects);
     * // => [{ 'a': 1 }, { 'a': 1 }]
     *
     * console.log(objects[0] === objects[1]);
    
    Romain CREY's avatar
    Romain CREY committed
     * // => true
    
     */
    function constant(value) {
      return function() {
        return value;
      };
    }
    
    module.exports = constant;
    
    
    /***/ }),
    /* 1528 */
    /***/ (function(module, exports) {
    
    /**
     * This method returns the first argument it receives.
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Util
     * @param {*} value Any value.
     * @returns {*} Returns `value`.
     * @example
     *
     * var object = { 'a': 1 };
     *
     * console.log(_.identity(object) === object);
     * // => true
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function identity(value) {
      return value;
    }
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = identity;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    /* 1529 */
    /***/ (function(module, exports) {
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /** Used to detect hot functions by number of calls within a span of milliseconds. */
    var HOT_COUNT = 800,
        HOT_SPAN = 16;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /* Built-in method references for those with the same name as other `lodash` methods. */
    var nativeNow = Date.now;
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Creates a function that'll short out and invoke `identity` instead
     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
     * milliseconds.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Function} func The function to restrict.
     * @returns {Function} Returns the new shortable function.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function shortOut(func) {
      var count = 0,
          lastCalled = 0;
    
      return function() {
        var stamp = nativeNow(),
            remaining = HOT_SPAN - (stamp - lastCalled);
    
        lastCalled = stamp;
        if (remaining > 0) {
          if (++count >= HOT_COUNT) {
            return arguments[0];
          }
        } else {
          count = 0;
        }
        return func.apply(undefined, arguments);
      };
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = shortOut;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var basePick = __webpack_require__(1531),
        flatRest = __webpack_require__(1519);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Creates an object composed of the picked `object` properties.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @static
    
    Romain CREY's avatar
    Romain CREY committed
     * @memberOf _
    
     * @category Object
     * @param {Object} object The source object.
     * @param {...(string|string[])} [paths] The property paths to pick.
     * @returns {Object} Returns the new object.
    
    Romain CREY's avatar
    Romain CREY committed
     * @example
     *
    
     * var object = { 'a': 1, 'b': '2', 'c': 3 };
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * _.pick(object, ['a', 'c']);
     * // => { 'a': 1, 'c': 3 }
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    var pick = flatRest(function(object, paths) {
      return object == null ? {} : basePick(object, paths);
    });
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    module.exports = pick;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var basePickBy = __webpack_require__(1532),
        hasIn = __webpack_require__(1534);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * The base implementation of `_.pick` without support for individual
     * property identifiers.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @returns {Object} Returns the new object.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function basePick(object, paths) {
      return basePickBy(object, paths, function(value, path) {
        return hasIn(object, path);
      });
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = basePick;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseGet = __webpack_require__(1514),
        baseSet = __webpack_require__(1533),
        castPath = __webpack_require__(1504);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} object The source object.
     * @param {string[]} paths The property paths to pick.
     * @param {Function} predicate The function invoked per property.
     * @returns {Object} Returns the new object.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function basePickBy(object, paths, predicate) {
      var index = -1,
          length = paths.length,
          result = {};
    
      while (++index < length) {
        var path = paths[index],
            value = baseGet(object, path);
    
        if (predicate(value, path)) {
          baseSet(result, castPath(path, object), value);
        }
      }
      return result;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = basePickBy;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    /* 1533 */
    /***/ (function(module, exports, __webpack_require__) {
    
    var assignValue = __webpack_require__(1442),
        castPath = __webpack_require__(1504),
        isIndex = __webpack_require__(1456),
        isObject = __webpack_require__(1421),
        toKey = __webpack_require__(1515);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * The base implementation of `_.set`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * @private
     * @param {Object} object The object to modify.
     * @param {Array|string} path The path of the property to set.
     * @param {*} value The value to set.
     * @param {Function} [customizer] The function to customize path creation.
     * @returns {Object} Returns `object`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function baseSet(object, path, value, customizer) {
      if (!isObject(object)) {
        return object;
      }
      path = castPath(path, object);
    
      var index = -1,
          length = path.length,
          lastIndex = length - 1,
          nested = object;
    
      while (nested != null && ++index < length) {
        var key = toKey(path[index]),
            newValue = value;
    
        if (index != lastIndex) {
          var objValue = nested[key];
          newValue = customizer ? customizer(objValue, key, nested) : undefined;
          if (newValue === undefined) {
            newValue = isObject(objValue)
              ? objValue
              : (isIndex(path[index + 1]) ? [] : {});
          }
        }
        assignValue(nested, key, newValue);
        nested = nested[key];
      }
      return object;
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = baseSet;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseHasIn = __webpack_require__(1535),
        hasPath = __webpack_require__(1536);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Checks if `path` is a direct or inherited property of `object`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
    
     * @static
     * @memberOf _
     * @since 4.0.0
     * @category Object
    
    Romain CREY's avatar
    Romain CREY committed
     * @param {Object} object The object to query.
    
     * @param {Array|string} path The path to check.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
     * @example
     *
     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
     *
     * _.hasIn(object, 'a');
     * // => true
     *
     * _.hasIn(object, 'a.b');
     * // => true
     *
     * _.hasIn(object, ['a', 'b']);
     * // => true
     *
     * _.hasIn(object, 'b');
     * // => false
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function hasIn(object, path) {
      return object != null && hasPath(object, path, baseHasIn);
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = hasIn;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports) {
    
    /**
    
     * The base implementation of `_.hasIn` without support for deep paths.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} [object] The object to query.
     * @param {Array|string} key The key to check.
     * @returns {boolean} Returns `true` if `key` exists, else `false`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function baseHasIn(object, key) {
      return object != null && key in Object(object);
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = baseHasIn;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var castPath = __webpack_require__(1504),
        isArguments = __webpack_require__(1450),
        isArray = __webpack_require__(1453),
        isIndex = __webpack_require__(1456),
        isLength = __webpack_require__(1459),
        toKey = __webpack_require__(1515);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
    
     * Checks if `path` exists on `object`.
    
    Romain CREY's avatar
    Romain CREY committed
     *
     * @private
    
     * @param {Object} object The object to query.
     * @param {Array|string} path The path to check.
     * @param {Function} hasFunc The function to check properties.
     * @returns {boolean} Returns `true` if `path` exists, else `false`.
    
    Romain CREY's avatar
    Romain CREY committed
     */
    
    function hasPath(object, path, hasFunc) {
      path = castPath(path, object);
    
      var index = -1,
          length = path.length,
          result = false;
    
      while (++index < length) {
        var key = toKey(path[index]);
        if (!(result = object != null && hasFunc(object, key))) {
          break;
        }
        object = object[key];
      }
      if (result || ++index != length) {
        return result;
      }
      length = object == null ? 0 : object.length;
      return !!length && isLength(length) && isIndex(key, length) &&
        (isArray(object) || isArguments(object));
    
    Romain CREY's avatar
    Romain CREY committed
    }
    
    
    module.exports = hasPath;
    
    Romain CREY's avatar
    Romain CREY committed
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseKeys = __webpack_require__(1462),
        getTag = __webpack_require__(1484),
        isArrayLike = __webpack_require__(1466),
        isString = __webpack_require__(1538),
        stringSize = __webpack_require__(1539);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /** `Object#toString` result references. */
    var mapTag = '[object Map]',
        setTag = '[object Set]';
    
    /**
     * Gets the size of `collection` by returning its length for array-like
     * values or the number of own enumerable string keyed properties for objects.
     *
     * @static
     * @memberOf _
     * @since 0.1.0
     * @category Collection
     * @param {Array|Object|string} collection The collection to inspect.
     * @returns {number} Returns the collection size.
     * @example
     *
     * _.size([1, 2, 3]);
     * // => 3
     *
     * _.size({ 'a': 1, 'b': 2 });
     * // => 2
     *
     * _.size('pebbles');
     * // => 7
     */
    function size(collection) {
      if (collection == null) {
        return 0;
      }
      if (isArrayLike(collection)) {
        return isString(collection) ? stringSize(collection) : collection.length;
      }
      var tag = getTag(collection);
      if (tag == mapTag || tag == setTag) {
        return collection.size;
      }
      return baseKeys(collection).length;
    }
    
    module.exports = size;
    
    
    /***/ }),
    
    /* 1538 */
    /***/ (function(module, exports, __webpack_require__) {
    
    var baseGetTag = __webpack_require__(1415),
        isArray = __webpack_require__(1453),
        isObjectLike = __webpack_require__(1452);
    
    /** `Object#toString` result references. */
    var stringTag = '[object String]';
    
    /**
     * Checks if `value` is classified as a `String` primitive or object.
     *
     * @static
     * @since 0.1.0
     * @memberOf _
     * @category Lang
     * @param {*} value The value to check.
     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
     * @example
     *
     * _.isString('abc');
     * // => true
     *
     * _.isString(1);
     * // => false
     */
    function isString(value) {
      return typeof value == 'string' ||
        (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
    }
    
    module.exports = isString;
    
    
    /***/ }),
    /* 1539 */
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var asciiSize = __webpack_require__(1540),
        hasUnicode = __webpack_require__(1542),
        unicodeSize = __webpack_require__(1543);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
     * Gets the number of symbols in `string`.
     *
     * @private
     * @param {string} string The string to inspect.
     * @returns {number} Returns the string size.
     */
    function stringSize(string) {
      return hasUnicode(string)
        ? unicodeSize(string)
        : asciiSize(string);
    }
    
    module.exports = stringSize;
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports, __webpack_require__) {
    
    
    var baseProperty = __webpack_require__(1541);
    
    Romain CREY's avatar
    Romain CREY committed
    
    /**
     * Gets the size of an ASCII `string`.
     *
     * @private
     * @param {string} string The string inspect.
     * @returns {number} Returns the string size.
     */
    var asciiSize = baseProperty('length');
    
    module.exports = asciiSize;
    
    
    /***/ }),
    
    /* 1541 */
    /***/ (function(module, exports) {
    
    /**
     * The base implementation of `_.property` without support for deep paths.
     *
     * @private
     * @param {string} key The key of the property to get.
     * @returns {Function} Returns the new accessor function.
     */
    function baseProperty(key) {
      return function(object) {
        return object == null ? undefined : object[key];
      };
    }
    
    module.exports = baseProperty;
    
    
    /***/ }),
    /* 1542 */
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports) {
    
    /** Used to compose unicode character classes. */
    var rsAstralRange = '\\ud800-\\udfff',
        rsComboMarksRange = '\\u0300-\\u036f',
        reComboHalfMarksRange = '\\ufe20-\\ufe2f',
        rsComboSymbolsRange = '\\u20d0-\\u20ff',
        rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
        rsVarRange = '\\ufe0e\\ufe0f';
    
    /** Used to compose unicode capture groups. */
    var rsZWJ = '\\u200d';
    
    /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
    var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
    
    /**
     * Checks if `string` contains Unicode symbols.
     *
     * @private
     * @param {string} string The string to inspect.
     * @returns {boolean} Returns `true` if a symbol is found, else `false`.
     */
    function hasUnicode(string) {
      return reHasUnicode.test(string);
    }
    
    module.exports = hasUnicode;
    
    
    /***/ }),
    
    Romain CREY's avatar
    Romain CREY committed
    /***/ (function(module, exports) {
    
    /** Used to compose unicode character classes. */
    var rsAstralRange = '\\ud800-\\udfff',
        rsComboMarksRange = '\\u0300-\\u036f',
        reComboHalfMarksRange = '\\ufe20-\\ufe2f',
        rsComboSymbolsRange = '\\u20d0-\\u20ff',
        rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
        rsVarRange = '\\ufe0e\\ufe0f';
    
    /** Used to compose unicode capture groups. */
    var rsAstral = '[' + rsAstralRange + ']',