(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react"), require("react-dom")); else if(typeof define === 'function' && define.amd) define(["react", "react-dom"], factory); else if(typeof exports === 'object') exports["ReactContainerQuery"] = factory(require("react"), require("react-dom")); else root["ReactContainerQuery"] = factory(root["React"], root["ReactDOM"]); })(this, function(__WEBPACK_EXTERNAL_MODULE_144__, __WEBPACK_EXTERNAL_MODULE_145__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var __extends = undefined && undefined.__extends || function () { var extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; } || function (d, b) { for (var p in b) { if (b.hasOwnProperty(p)) d[p] = b[p]; } }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; }(); var __assign = undefined && undefined.__assign || Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) { if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } } return t; }; Object.defineProperty(exports, "__esModule", { value: true }); var React = __webpack_require__(144); var ReactDOM = __webpack_require__(145); var matchQueries_1 = __webpack_require__(22); var ContainerQueryCore_1 = __webpack_require__(42); /** * * {(params) => { *
* }} *
*/ var ContainerQuery = function (_super) { __extends(ContainerQuery, _super); function ContainerQuery(props) { var _this = _super.call(this, props) || this; _this.cqCore = null; _this.state = { params: props.initialSize ? matchQueries_1.default(props.query)(props.initialSize) : {} }; return _this; } ContainerQuery.prototype.componentDidMount = function () { var _this = this; this.cqCore = new ContainerQueryCore_1.default(this.props.query, function (params) { _this.setState({ params: params }); }); this.cqCore.observe(ReactDOM.findDOMNode(this)); }; ContainerQuery.prototype.componentDidUpdate = function () { this.cqCore.observe(ReactDOM.findDOMNode(this)); }; ContainerQuery.prototype.componentWillUnmount = function () { this.cqCore.disconnect(); this.cqCore = null; }; ContainerQuery.prototype.render = function () { return this.props.children(this.state.params); }; return ContainerQuery; }(React.Component); exports.ContainerQuery = ContainerQuery; ; function applyContainerQuery(Component, query, initialSize) { return _a = function (_super) { __extends(ContainerQuery, _super); function ContainerQuery(props) { var _this = _super.call(this, props) || this; _this.cqCore = null; _this.state = { params: initialSize ? matchQueries_1.default(query)(initialSize) : {} }; return _this; } ContainerQuery.prototype.componentDidMount = function () { var _this = this; this.cqCore = new ContainerQueryCore_1.default(query, function (params) { _this.setState({ params: params }); }); this.cqCore.observe(ReactDOM.findDOMNode(this)); }; ContainerQuery.prototype.componentDidUpdate = function () { this.cqCore.observe(ReactDOM.findDOMNode(this)); }; ContainerQuery.prototype.componentWillUnmount = function () { this.cqCore.disconnect(); this.cqCore = null; }; ContainerQuery.prototype.render = function () { return React.createElement(Component, __assign({}, this.props, { containerQuery: this.state.params })); }; return ContainerQuery; }(React.Component), _a.displayName = Component.displayName ? "ContainerQuery(" + Component.displayName + ")" : 'ContainerQuery', _a; var _a; } exports.applyContainerQuery = applyContainerQuery; //# sourceMappingURL=index.js.map /***/ }, /* 1 */ /***/ function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(27); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }, /* 2 */ /***/ function(module, exports) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }, /* 3 */ /***/ function(module, exports, __webpack_require__) { var baseIsNative = __webpack_require__(64), getValue = __webpack_require__(88); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }, /* 4 */ /***/ function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(7), getRawTag = __webpack_require__(86), objectToString = __webpack_require__(111); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }, /* 5 */ /***/ function(module, exports) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }, /* 6 */ /***/ function(module, exports, __webpack_require__) { var listCacheClear = __webpack_require__(98), listCacheDelete = __webpack_require__(99), listCacheGet = __webpack_require__(100), listCacheHas = __webpack_require__(101), listCacheSet = __webpack_require__(102); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }, /* 7 */ /***/ function(module, exports, __webpack_require__) { var root = __webpack_require__(1); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }, /* 8 */ /***/ function(module, exports, __webpack_require__) { var eq = __webpack_require__(34); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }, /* 9 */ /***/ function(module, exports, __webpack_require__) { var isKeyable = __webpack_require__(95); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }, /* 10 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }, /* 11 */ /***/ function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(21); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ 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; /***/ }, /* 12 */ /***/ function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(53), baseKeys = __webpack_require__(67), isArrayLike = __webpack_require__(18); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }, /* 13 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3), root = __webpack_require__(1); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }, /* 14 */ /***/ function(module, exports, __webpack_require__) { var mapCacheClear = __webpack_require__(103), mapCacheDelete = __webpack_require__(104), mapCacheGet = __webpack_require__(105), mapCacheHas = __webpack_require__(106), mapCacheSet = __webpack_require__(107); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }, /* 15 */ /***/ function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }, /* 16 */ /***/ function(module, exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(62), isObjectLike = __webpack_require__(5); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }, /* 17 */ /***/ function(module, exports, __webpack_require__) { var isArray = __webpack_require__(2), isSymbol = __webpack_require__(21); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }, /* 18 */ /***/ function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(37), isLength = __webpack_require__(19); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }, /* 19 */ /***/ function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }, /* 20 */ /***/ function(module, exports) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }, /* 21 */ /***/ function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(4), isObjectLike = __webpack_require__(5); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }, /* 22 */ /***/ function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var map = __webpack_require__(127); var toPairs = __webpack_require__(132); function matchQueries(rules) { var entries = map(toPairs(rules), function (_a) { var className = _a[0], rule = _a[1]; return ({ minWidth: rule.minWidth != null ? rule.minWidth : 0, maxWidth: rule.maxWidth != null ? rule.maxWidth : Infinity, minHeight: rule.minHeight != null ? rule.minHeight : 0, maxHeight: rule.maxHeight != null ? rule.maxHeight : Infinity, className: className }); }); return function (_a) { var height = _a.height, width = _a.width; var classNameMap = {}; for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { var _b = entries_1[_i], className = _b.className, minWidth = _b.minWidth, maxWidth = _b.maxWidth, minHeight = _b.minHeight, maxHeight = _b.maxHeight; if (height != null && width != null) { classNameMap[className] = (minWidth <= width && width <= maxWidth && minHeight <= height && height <= maxHeight); } else if (height == null && width != null) { classNameMap[className] = minWidth <= width && width <= maxWidth; } else if (height != null && width == null) { classNameMap[className] = minHeight <= height && height <= maxHeight; } else { classNameMap[className] = true; } } return classNameMap; }; } exports.default = matchQueries; //# sourceMappingURL=matchQueries.js.map /***/ }, /* 23 */ /***/ function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(6), stackClear = __webpack_require__(117), stackDelete = __webpack_require__(118), stackGet = __webpack_require__(119), stackHas = __webpack_require__(120), stackSet = __webpack_require__(121); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }, /* 24 */ /***/ function(module, exports, __webpack_require__) { var castPath = __webpack_require__(25), toKey = __webpack_require__(11); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ 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; } module.exports = baseGet; /***/ }, /* 25 */ /***/ function(module, exports, __webpack_require__) { var isArray = __webpack_require__(2), isKey = __webpack_require__(17), stringToPath = __webpack_require__(122), toString = __webpack_require__(133); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }, /* 26 */ /***/ function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(49), arraySome = __webpack_require__(55), cacheHas = __webpack_require__(77); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Assume cyclic values are equal. var stacked = stack.get(array); if (stacked && stack.get(other)) { return stacked == other; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }, /* 27 */ /***/ function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }, /* 28 */ /***/ function(module, exports, __webpack_require__) { var DataView = __webpack_require__(45), Map = __webpack_require__(13), Promise = __webpack_require__(47), Set = __webpack_require__(48), WeakMap = __webpack_require__(51), baseGetTag = __webpack_require__(4), toSource = __webpack_require__(33); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }, /* 29 */ /***/ function(module, exports) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }, /* 30 */ /***/ function(module, exports, __webpack_require__) { var isObject = __webpack_require__(20); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }, /* 31 */ /***/ function(module, exports) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }, /* 32 */ /***/ function(module, exports) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }, /* 33 */ /***/ function(module, exports) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }, /* 34 */ /***/ function(module, exports) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }, /* 35 */ /***/ function(module, exports, __webpack_require__) { var baseIsArguments = __webpack_require__(61), isObjectLike = __webpack_require__(5); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }, /* 36 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(1), stubFalse = __webpack_require__(131); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(41)(module))) /***/ }, /* 37 */ /***/ function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(4), isObject = __webpack_require__(20); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }, /* 38 */ /***/ function(module, exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(65), baseUnary = __webpack_require__(76), nodeUtil = __webpack_require__(110); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }, /* 39 */ /***/ function(module, exports) { "use strict"; var detector = module.exports = {}; detector.isIE = function(version) { function isAnyIeVersion() { var agent = navigator.userAgent.toLowerCase(); return agent.indexOf("msie") !== -1 || agent.indexOf("trident") !== -1 || agent.indexOf(" edge/") !== -1; } if(!isAnyIeVersion()) { return false; } if(!version) { return true; } //Shamelessly stolen from https://gist.github.com/padolsey/527683 var ieVersion = (function(){ var undef, v = 3, div = document.createElement("div"), all = div.getElementsByTagName("i"); do { div.innerHTML = ""; } while (all[0]); return v > 4 ? v : undef; }()); return version === ieVersion; }; detector.isLegacyOpera = function() { return !!window.opera; }; /***/ }, /* 40 */ /***/ function(module, exports) { "use strict"; var utils = module.exports = {}; /** * Loops through the collection and calls the callback for each element. if the callback returns truthy, the loop is broken and returns the same value. * @public * @param {*} collection The collection to loop through. Needs to have a length property set and have indices set from 0 to length - 1. * @param {function} callback The callback to be called for each element. The element will be given as a parameter to the callback. If this callback returns truthy, the loop is broken and the same value is returned. * @returns {*} The value that a callback has returned (if truthy). Otherwise nothing. */ utils.forEach = function(collection, callback) { for(var i = 0; i < collection.length; i++) { var result = callback(collection[i]); if(result) { return result; } } }; /***/ }, /* 41 */ /***/ function(module, exports) { module.exports = function(module) { if(!module.webpackPolyfill) { module.deprecate = function() {}; module.paths = []; // module.parent = undefined by default module.children = []; module.webpackPolyfill = 1; } return module; } /***/ }, /* 42 */ /***/ function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var isEqual = __webpack_require__(126); var resize_observer_lite_1 = __webpack_require__(134); var matchQueries_1 = __webpack_require__(22); var ContainerQueryCore = function () { function ContainerQueryCore(query, callback) { var _this = this; this.result = {}; this.rol = new resize_observer_lite_1.default(function (size) { var result = matchQueries_1.default(query)(size); if (!isEqual(_this.result, result)) { callback(result); _this.result = result; } }); } ContainerQueryCore.prototype.observe = function (element) { this.rol.observe(element); }; ContainerQueryCore.prototype.disconnect = function () { this.rol.disconnect(); }; return ContainerQueryCore; }(); exports.default = ContainerQueryCore; //# sourceMappingURL=ContainerQueryCore.js.map /***/ }, /* 43 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(44); module.exports = function batchProcessorMaker(options) { options = options || {}; var reporter = options.reporter; var asyncProcess = utils.getOption(options, "async", true); var autoProcess = utils.getOption(options, "auto", true); if(autoProcess && !asyncProcess) { reporter && reporter.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."); asyncProcess = true; } var batch = Batch(); var asyncFrameHandler; var isProcessing = false; function addFunction(level, fn) { if(!isProcessing && autoProcess && asyncProcess && batch.size() === 0) { // Since this is async, it is guaranteed to be executed after that the fn is added to the batch. // This needs to be done before, since we're checking the size of the batch to be 0. processBatchAsync(); } batch.add(level, fn); } function processBatch() { // Save the current batch, and create a new batch so that incoming functions are not added into the currently processing batch. // Continue processing until the top-level batch is empty (functions may be added to the new batch while processing, and so on). isProcessing = true; while (batch.size()) { var processingBatch = batch; batch = Batch(); processingBatch.process(); } isProcessing = false; } function forceProcessBatch(localAsyncProcess) { if (isProcessing) { return; } if(localAsyncProcess === undefined) { localAsyncProcess = asyncProcess; } if(asyncFrameHandler) { cancelFrame(asyncFrameHandler); asyncFrameHandler = null; } if(localAsyncProcess) { processBatchAsync(); } else { processBatch(); } } function processBatchAsync() { asyncFrameHandler = requestFrame(processBatch); } function clearBatch() { batch = {}; batchSize = 0; topLevel = 0; bottomLevel = 0; } function cancelFrame(listener) { // var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.clearTimeout; var cancel = clearTimeout; return cancel(listener); } function requestFrame(callback) { // var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function(fn) { return window.setTimeout(fn, 20); }; var raf = function(fn) { return setTimeout(fn, 0); }; return raf(callback); } return { add: addFunction, force: forceProcessBatch }; }; function Batch() { var batch = {}; var size = 0; var topLevel = 0; var bottomLevel = 0; function add(level, fn) { if(!fn) { fn = level; level = 0; } if(level > topLevel) { topLevel = level; } else if(level < bottomLevel) { bottomLevel = level; } if(!batch[level]) { batch[level] = []; } batch[level].push(fn); size++; } function process() { for(var level = bottomLevel; level <= topLevel; level++) { var fns = batch[level]; for(var i = 0; i < fns.length; i++) { var fn = fns[i]; fn(); } } } function getSize() { return size; } return { add: add, process: process, size: getSize }; } /***/ }, /* 44 */ /***/ function(module, exports) { "use strict"; var utils = module.exports = {}; utils.getOption = getOption; function getOption(options, name, defaultValue) { var value = options[name]; if((value === undefined || value === null) && defaultValue !== undefined) { return defaultValue; } return value; } /***/ }, /* 45 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3), root = __webpack_require__(1); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }, /* 46 */ /***/ function(module, exports, __webpack_require__) { var hashClear = __webpack_require__(90), hashDelete = __webpack_require__(91), hashGet = __webpack_require__(92), hashHas = __webpack_require__(93), hashSet = __webpack_require__(94); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }, /* 47 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3), root = __webpack_require__(1); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }, /* 48 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3), root = __webpack_require__(1); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }, /* 49 */ /***/ function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(14), setCacheAdd = __webpack_require__(113), setCacheHas = __webpack_require__(114); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }, /* 50 */ /***/ function(module, exports, __webpack_require__) { var root = __webpack_require__(1); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }, /* 51 */ /***/ function(module, exports, __webpack_require__) { var getNative = __webpack_require__(3), root = __webpack_require__(1); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }, /* 52 */ /***/ function(module, exports) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }, /* 53 */ /***/ function(module, exports, __webpack_require__) { var baseTimes = __webpack_require__(73), isArguments = __webpack_require__(35), isArray = __webpack_require__(2), isBuffer = __webpack_require__(36), isIndex = __webpack_require__(29), isTypedArray = __webpack_require__(38); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }, /* 54 */ /***/ function(module, exports) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }, /* 55 */ /***/ function(module, exports) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }, /* 56 */ /***/ function(module, exports, __webpack_require__) { var baseForOwn = __webpack_require__(58), createBaseEach = __webpack_require__(79); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }, /* 57 */ /***/ function(module, exports, __webpack_require__) { var createBaseFor = __webpack_require__(80); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }, /* 58 */ /***/ function(module, exports, __webpack_require__) { var baseFor = __webpack_require__(57), keys = __webpack_require__(12); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }, /* 59 */ /***/ function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(54), isArray = __webpack_require__(2); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }, /* 60 */ /***/ function(module, exports) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @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`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }, /* 61 */ /***/ function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(4), isObjectLike = __webpack_require__(5); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }, /* 62 */ /***/ function(module, exports, __webpack_require__) { var Stack = __webpack_require__(23), equalArrays = __webpack_require__(26), equalByTag = __webpack_require__(82), equalObjects = __webpack_require__(83), getTag = __webpack_require__(28), isArray = __webpack_require__(2), isBuffer = __webpack_require__(36), isTypedArray = __webpack_require__(38); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }, /* 63 */ /***/ function(module, exports, __webpack_require__) { var Stack = __webpack_require__(23), baseIsEqual = __webpack_require__(16); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }, /* 64 */ /***/ function(module, exports, __webpack_require__) { var isFunction = __webpack_require__(37), isMasked = __webpack_require__(96), isObject = __webpack_require__(20), toSource = __webpack_require__(33); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** 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; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }, /* 65 */ /***/ function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(4), isLength = __webpack_require__(19), isObjectLike = __webpack_require__(5); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }, /* 66 */ /***/ function(module, exports, __webpack_require__) { var baseMatches = __webpack_require__(69), baseMatchesProperty = __webpack_require__(70), identity = __webpack_require__(125), isArray = __webpack_require__(2), property = __webpack_require__(129); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }, /* 67 */ /***/ function(module, exports, __webpack_require__) { var isPrototype = __webpack_require__(97), nativeKeys = __webpack_require__(109); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }, /* 68 */ /***/ function(module, exports, __webpack_require__) { var baseEach = __webpack_require__(56), isArrayLike = __webpack_require__(18); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }, /* 69 */ /***/ function(module, exports, __webpack_require__) { var baseIsMatch = __webpack_require__(63), getMatchData = __webpack_require__(85), matchesStrictComparable = __webpack_require__(32); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }, /* 70 */ /***/ function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(16), get = __webpack_require__(123), hasIn = __webpack_require__(124), isKey = __webpack_require__(17), isStrictComparable = __webpack_require__(30), matchesStrictComparable = __webpack_require__(32), toKey = __webpack_require__(11); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }, /* 71 */ /***/ 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; /***/ }, /* 72 */ /***/ function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(24); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }, /* 73 */ /***/ function(module, exports) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }, /* 74 */ /***/ function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(15); /** * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array * of key-value pairs for `object` corresponding to the property names of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the key-value pairs. */ function baseToPairs(object, props) { return arrayMap(props, function(key) { return [key, object[key]]; }); } module.exports = baseToPairs; /***/ }, /* 75 */ /***/ function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(7), arrayMap = __webpack_require__(15), isArray = __webpack_require__(2), isSymbol = __webpack_require__(21); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }, /* 76 */ /***/ function(module, exports) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }, /* 77 */ /***/ function(module, exports) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }, /* 78 */ /***/ function(module, exports, __webpack_require__) { var root = __webpack_require__(1); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }, /* 79 */ /***/ function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(18); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }, /* 80 */ /***/ function(module, exports) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }, /* 81 */ /***/ function(module, exports, __webpack_require__) { var baseToPairs = __webpack_require__(74), getTag = __webpack_require__(28), mapToArray = __webpack_require__(31), setToPairs = __webpack_require__(116); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** * Creates a `_.toPairs` or `_.toPairsIn` function. * * @private * @param {Function} keysFunc The function to get the keys of a given object. * @returns {Function} Returns the new pairs function. */ function createToPairs(keysFunc) { return function(object) { var tag = getTag(object); if (tag == mapTag) { return mapToArray(object); } if (tag == setTag) { return setToPairs(object); } return baseToPairs(object, keysFunc(object)); }; } module.exports = createToPairs; /***/ }, /* 82 */ /***/ function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(7), Uint8Array = __webpack_require__(50), eq = __webpack_require__(34), equalArrays = __webpack_require__(26), mapToArray = __webpack_require__(31), setToArray = __webpack_require__(115); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }, /* 83 */ /***/ function(module, exports, __webpack_require__) { var getAllKeys = __webpack_require__(84); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked && stack.get(other)) { return stacked == other; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }, /* 84 */ /***/ function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(59), getSymbols = __webpack_require__(87), keys = __webpack_require__(12); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }, /* 85 */ /***/ function(module, exports, __webpack_require__) { var isStrictComparable = __webpack_require__(30), keys = __webpack_require__(12); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }, /* 86 */ /***/ function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(7); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }, /* 87 */ /***/ function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(52), stubArray = __webpack_require__(130); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }, /* 88 */ /***/ function(module, exports) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }, /* 89 */ /***/ function(module, exports, __webpack_require__) { var castPath = __webpack_require__(25), isArguments = __webpack_require__(35), isArray = __webpack_require__(2), isIndex = __webpack_require__(29), isLength = __webpack_require__(19), toKey = __webpack_require__(11); /** * Checks if `path` exists on `object`. * * @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`. */ 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)); } module.exports = hasPath; /***/ }, /* 90 */ /***/ function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(10); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }, /* 91 */ /***/ function(module, exports) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }, /* 92 */ /***/ function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(10); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }, /* 93 */ /***/ function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(10); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }, /* 94 */ /***/ function(module, exports, __webpack_require__) { var nativeCreate = __webpack_require__(10); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }, /* 95 */ /***/ function(module, exports) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }, /* 96 */ /***/ function(module, exports, __webpack_require__) { var coreJsData = __webpack_require__(78); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }, /* 97 */ /***/ function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }, /* 98 */ /***/ function(module, exports) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }, /* 99 */ /***/ function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }, /* 100 */ /***/ function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }, /* 101 */ /***/ function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }, /* 102 */ /***/ function(module, exports, __webpack_require__) { var assocIndexOf = __webpack_require__(8); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }, /* 103 */ /***/ function(module, exports, __webpack_require__) { var Hash = __webpack_require__(46), ListCache = __webpack_require__(6), Map = __webpack_require__(13); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }, /* 104 */ /***/ function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(9); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }, /* 105 */ /***/ function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(9); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }, /* 106 */ /***/ function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(9); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }, /* 107 */ /***/ function(module, exports, __webpack_require__) { var getMapData = __webpack_require__(9); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }, /* 108 */ /***/ function(module, exports, __webpack_require__) { var memoize = __webpack_require__(128); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }, /* 109 */ /***/ function(module, exports, __webpack_require__) { var overArg = __webpack_require__(112); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }, /* 110 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(27); /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(41)(module))) /***/ }, /* 111 */ /***/ function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }, /* 112 */ /***/ function(module, exports) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }, /* 113 */ /***/ function(module, exports) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }, /* 114 */ /***/ function(module, exports) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }, /* 115 */ /***/ function(module, exports) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }, /* 116 */ /***/ function(module, exports) { /** * Converts `set` to its value-value pairs. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the value-value pairs. */ function setToPairs(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = [value, value]; }); return result; } module.exports = setToPairs; /***/ }, /* 117 */ /***/ function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(6); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }, /* 118 */ /***/ function(module, exports) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }, /* 119 */ /***/ function(module, exports) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }, /* 120 */ /***/ function(module, exports) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }, /* 121 */ /***/ function(module, exports, __webpack_require__) { var ListCache = __webpack_require__(6), Map = __webpack_require__(13), MapCache = __webpack_require__(14); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }, /* 122 */ /***/ function(module, exports, __webpack_require__) { var memoizeCapped = __webpack_require__(108); /** Used to match property names within property paths. */ var reLeadingDot = /^\./, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (reLeadingDot.test(string)) { result.push(''); } string.replace(rePropName, function(match, number, quote, string) { result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }, /* 123 */ /***/ function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(24); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }, /* 124 */ /***/ function(module, exports, __webpack_require__) { var baseHasIn = __webpack_require__(60), hasPath = __webpack_require__(89); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @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 */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }, /* 125 */ /***/ function(module, exports) { /** * This method returns the first argument it receives. * * @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 */ function identity(value) { return value; } module.exports = identity; /***/ }, /* 126 */ /***/ function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(16); /** * Performs a deep comparison between two values to determine if they are * equivalent. * * **Note:** This method supports comparing arrays, array buffers, booleans, * date objects, error objects, maps, numbers, `Object` objects, regexes, * sets, strings, symbols, and typed arrays. `Object` objects are compared * by their own, not inherited, enumerable properties. Functions and DOM * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.isEqual(object, other); * // => true * * object === other; * // => false */ function isEqual(value, other) { return baseIsEqual(value, other); } module.exports = isEqual; /***/ }, /* 127 */ /***/ function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(15), baseIteratee = __webpack_require__(66), baseMap = __webpack_require__(68), isArray = __webpack_require__(2); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }, /* 128 */ /***/ function(module, exports, __webpack_require__) { var MapCache = __webpack_require__(14); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }, /* 129 */ /***/ function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(71), basePropertyDeep = __webpack_require__(72), isKey = __webpack_require__(17), toKey = __webpack_require__(11); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }, /* 130 */ /***/ function(module, exports) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }, /* 131 */ /***/ function(module, exports) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }, /* 132 */ /***/ function(module, exports, __webpack_require__) { var createToPairs = __webpack_require__(81), keys = __webpack_require__(12); /** * Creates an array of own enumerable string keyed-value pairs for `object` * which can be consumed by `_.fromPairs`. If `object` is a map or set, its * entries are returned. * * @static * @memberOf _ * @since 4.0.0 * @alias entries * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the key-value pairs. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.toPairs(new Foo); * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ var toPairs = createToPairs(keys); module.exports = toPairs; /***/ }, /* 133 */ /***/ function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(75); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }, /* 134 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var elementResizeDetectorMaker = __webpack_require__(137); var ResizeObserverLite = (function () { function ResizeObserverLite(handler) { var _this = this; this.handler = handler; this.listenedElement = null; this.hasResizeObserver = typeof window.ResizeObserver !== 'undefined'; if (this.hasResizeObserver) { this.rz = new ResizeObserver(function (entries) { _this.handler(getSize(entries[0].target)); }); } else { this.erd = elementResizeDetectorMaker({ strategy: 'scroll' }); } } ResizeObserverLite.prototype.observe = function (element) { var _this = this; if (this.listenedElement !== element) { if (this.listenedElement) { this.disconnect(); } if (element) { if (this.hasResizeObserver) { this.rz.observe(element); } else { this.erd.listenTo(element, function (element) { _this.handler(getSize(element)); }); } } this.listenedElement = element; } }; ResizeObserverLite.prototype.disconnect = function () { if (this.listenedElement) { if (this.hasResizeObserver) { this.rz.disconnect(); } else { this.erd.uninstall(this.listenedElement); } this.listenedElement = null; } }; return ResizeObserverLite; }()); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = ResizeObserverLite; function getSize(element) { return { width: getNumber(window.getComputedStyle(element)['width']), height: getNumber(window.getComputedStyle(element)['height']) }; } function getNumber(str) { var m = /^([0-9\.]+)px$/.exec(str); return m ? parseFloat(m[1]) : 0; } //# sourceMappingURL=index.js.map /***/ }, /* 135 */ /***/ function(module, exports, __webpack_require__) { /** * Resize detection strategy that injects objects to elements in order to detect resize events. * Heavily inspired by: http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/ */ "use strict"; var browserDetector = __webpack_require__(39); module.exports = function(options) { options = options || {}; var reporter = options.reporter; var batchProcessor = options.batchProcessor; var getState = options.stateHandler.getState; if(!reporter) { throw new Error("Missing required dependency: reporter."); } /** * Adds a resize event listener to the element. * @public * @param {element} element The element that should have the listener added. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. */ function addListener(element, listener) { if(!getObject(element)) { throw new Error("Element is not detectable by this strategy."); } function listenerProxy() { listener(element); } if(browserDetector.isIE(8)) { //IE 8 does not support object, but supports the resize event directly on elements. getState(element).object = { proxy: listenerProxy }; element.attachEvent("onresize", listenerProxy); } else { var object = getObject(element); object.contentDocument.defaultView.addEventListener("resize", listenerProxy); } } /** * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. * @private * @param {object} options Optional options object. * @param {element} element The element to make detectable * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. */ function makeDetectable(options, element, callback) { if (!callback) { callback = element; element = options; options = null; } options = options || {}; var debug = options.debug; function injectObject(element, callback) { var OBJECT_STYLE = "display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;"; //The target element needs to be positioned (everything except static) so the absolute positioned object will be positioned relative to the target element. // Position altering may be performed directly or on object load, depending on if style resolution is possible directly or not. var positionCheckPerformed = false; // The element may not yet be attached to the DOM, and therefore the style object may be empty in some browsers. // Since the style object is a reference, it will be updated as soon as the element is attached to the DOM. var style = window.getComputedStyle(element); var width = element.offsetWidth; var height = element.offsetHeight; getState(element).startSize = { width: width, height: height }; function mutateDom() { function alterPositionStyles() { if(style.position === "static") { element.style.position = "relative"; var removeRelativeStyles = function(reporter, element, style, property) { function getNumericalValue(value) { return value.replace(/[^-\d\.]/g, ""); } var value = style[property]; if(value !== "auto" && getNumericalValue(value) !== "0") { reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); element.style[property] = 0; } }; //Check so that there are no accidental styles that will make the element styled differently now that is is relative. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). removeRelativeStyles(reporter, element, style, "top"); removeRelativeStyles(reporter, element, style, "right"); removeRelativeStyles(reporter, element, style, "bottom"); removeRelativeStyles(reporter, element, style, "left"); } } function onObjectLoad() { // The object has been loaded, which means that the element now is guaranteed to be attached to the DOM. if (!positionCheckPerformed) { alterPositionStyles(); } /*jshint validthis: true */ function getDocument(element, callback) { //Opera 12 seem to call the object.onload before the actual document has been created. //So if it is not present, poll it with an timeout until it is present. //TODO: Could maybe be handled better with object.onreadystatechange or similar. if(!element.contentDocument) { setTimeout(function checkForObjectDocument() { getDocument(element, callback); }, 100); return; } callback(element.contentDocument); } //Mutating the object element here seems to fire another load event. //Mutating the inner document of the object element is fine though. var objectElement = this; //Create the style element to be added to the object. getDocument(objectElement, function onObjectDocumentReady(objectDocument) { //Notify that the element is ready to be listened to. callback(element); }); } // The element may be detached from the DOM, and some browsers does not support style resolving of detached elements. // The alterPositionStyles needs to be delayed until we know the element has been attached to the DOM (which we are sure of when the onObjectLoad has been fired), if style resolution is not possible. if (style.position !== "") { alterPositionStyles(style); positionCheckPerformed = true; } //Add an object element as a child to the target element that will be listened to for resize events. var object = document.createElement("object"); object.style.cssText = OBJECT_STYLE; object.tabIndex = -1; object.type = "text/html"; object.onload = onObjectLoad; //Safari: This must occur before adding the object to the DOM. //IE: Does not like that this happens before, even if it is also added after. if(!browserDetector.isIE()) { object.data = "about:blank"; } element.appendChild(object); getState(element).object = object; //IE: This must occur after adding the object to the DOM. if(browserDetector.isIE()) { object.data = "about:blank"; } } if(batchProcessor) { batchProcessor.add(mutateDom); } else { mutateDom(); } } if(browserDetector.isIE(8)) { //IE 8 does not support objects properly. Luckily they do support the resize event. //So do not inject the object and notify that the element is already ready to be listened to. //The event handler for the resize event is attached in the utils.addListener instead. callback(element); } else { injectObject(element, callback); } } /** * Returns the child object of the target element. * @private * @param {element} element The target element. * @returns The object element of the target. */ function getObject(element) { return getState(element).object; } function uninstall(element) { if(browserDetector.isIE(8)) { element.detachEvent("onresize", getState(element).object.proxy); } else { element.removeChild(getObject(element)); } delete getState(element).object; } return { makeDetectable: makeDetectable, addListener: addListener, uninstall: uninstall }; }; /***/ }, /* 136 */ /***/ function(module, exports, __webpack_require__) { /** * Resize detection strategy that injects divs to elements in order to detect resize events on scroll events. * Heavily inspired by: https://github.com/marcj/css-element-queries/blob/master/src/ResizeSensor.js */ "use strict"; var forEach = __webpack_require__(40).forEach; module.exports = function(options) { options = options || {}; var reporter = options.reporter; var batchProcessor = options.batchProcessor; var getState = options.stateHandler.getState; var hasState = options.stateHandler.hasState; var idHandler = options.idHandler; if (!batchProcessor) { throw new Error("Missing required dependency: batchProcessor"); } if (!reporter) { throw new Error("Missing required dependency: reporter."); } //TODO: Could this perhaps be done at installation time? var scrollbarSizes = getScrollbarSizes(); // Inject the scrollbar styling that prevents them from appearing sometimes in Chrome. // The injected container needs to have a class, so that it may be styled with CSS (pseudo elements). var styleId = "erd_scroll_detection_scrollbar_style"; var detectionContainerClass = "erd_scroll_detection_container"; injectScrollStyle(styleId, detectionContainerClass); function getScrollbarSizes() { var width = 500; var height = 500; var child = document.createElement("div"); child.style.cssText = "position: absolute; width: " + width*2 + "px; height: " + height*2 + "px; visibility: hidden; margin: 0; padding: 0;"; var container = document.createElement("div"); container.style.cssText = "position: absolute; width: " + width + "px; height: " + height + "px; overflow: scroll; visibility: none; top: " + -width*3 + "px; left: " + -height*3 + "px; visibility: hidden; margin: 0; padding: 0;"; container.appendChild(child); document.body.insertBefore(container, document.body.firstChild); var widthSize = width - container.clientWidth; var heightSize = height - container.clientHeight; document.body.removeChild(container); return { width: widthSize, height: heightSize }; } function injectScrollStyle(styleId, containerClass) { function injectStyle(style, method) { method = method || function (element) { document.head.appendChild(element); }; var styleElement = document.createElement("style"); styleElement.innerHTML = style; styleElement.id = styleId; method(styleElement); return styleElement; } if (!document.getElementById(styleId)) { var containerAnimationClass = containerClass + "_animation"; var containerAnimationActiveClass = containerClass + "_animation_active"; var style = "/* Created by the element-resize-detector library. */\n"; style += "." + containerClass + " > div::-webkit-scrollbar { display: none; }\n\n"; style += "." + containerAnimationActiveClass + " { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: " + containerAnimationClass + "; animation-name: " + containerAnimationClass + "; }\n"; style += "@-webkit-keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n"; style += "@keyframes " + containerAnimationClass + " { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }"; injectStyle(style); } } function addAnimationClass(element) { element.className += " " + detectionContainerClass + "_animation_active"; } function addEvent(el, name, cb) { if (el.addEventListener) { el.addEventListener(name, cb); } else if(el.attachEvent) { el.attachEvent("on" + name, cb); } else { return reporter.error("[scroll] Don't know how to add event listeners."); } } function removeEvent(el, name, cb) { if (el.removeEventListener) { el.removeEventListener(name, cb); } else if(el.detachEvent) { el.detachEvent("on" + name, cb); } else { return reporter.error("[scroll] Don't know how to remove event listeners."); } } function getExpandElement(element) { return getState(element).container.childNodes[0].childNodes[0].childNodes[0]; } function getShrinkElement(element) { return getState(element).container.childNodes[0].childNodes[0].childNodes[1]; } /** * Adds a resize event listener to the element. * @public * @param {element} element The element that should have the listener added. * @param {function} listener The listener callback to be called for each resize event of the element. The element will be given as a parameter to the listener callback. */ function addListener(element, listener) { var listeners = getState(element).listeners; if (!listeners.push) { throw new Error("Cannot add listener to an element that is not detectable."); } getState(element).listeners.push(listener); } /** * Makes an element detectable and ready to be listened for resize events. Will call the callback when the element is ready to be listened for resize changes. * @private * @param {object} options Optional options object. * @param {element} element The element to make detectable * @param {function} callback The callback to be called when the element is ready to be listened for resize changes. Will be called with the element as first parameter. */ function makeDetectable(options, element, callback) { if (!callback) { callback = element; element = options; options = null; } options = options || {}; function debug() { if (options.debug) { var args = Array.prototype.slice.call(arguments); args.unshift(idHandler.get(element), "Scroll: "); if (reporter.log.apply) { reporter.log.apply(null, args); } else { for (var i = 0; i < args.length; i++) { reporter.log(args[i]); } } } } function isDetached(element) { function isInDocument(element) { return element === element.ownerDocument.body || element.ownerDocument.body.contains(element); } return !isInDocument(element); } function isUnrendered(element) { // Check the absolute positioned container since the top level container is display: inline. var container = getState(element).container.childNodes[0]; return getComputedStyle(container).width.indexOf("px") === -1; //Can only compute pixel value when rendered. } function getStyle() { // Some browsers only force layouts when actually reading the style properties of the style object, so make sure that they are all read here, // so that the user of the function can be sure that it will perform the layout here, instead of later (important for batching). var elementStyle = getComputedStyle(element); var style = {}; style.position = elementStyle.position; style.width = element.offsetWidth; style.height = element.offsetHeight; style.top = elementStyle.top; style.right = elementStyle.right; style.bottom = elementStyle.bottom; style.left = elementStyle.left; style.widthCSS = elementStyle.width; style.heightCSS = elementStyle.height; return style; } function storeStartSize() { var style = getStyle(); getState(element).startSize = { width: style.width, height: style.height }; debug("Element start size", getState(element).startSize); } function initListeners() { getState(element).listeners = []; } function storeStyle() { debug("storeStyle invoked."); if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } var style = getStyle(); getState(element).style = style; } function storeCurrentSize(element, width, height) { getState(element).lastWidth = width; getState(element).lastHeight = height; } function getExpandChildElement(element) { return getExpandElement(element).childNodes[0]; } function getWidthOffset() { return 2 * scrollbarSizes.width + 1; } function getHeightOffset() { return 2 * scrollbarSizes.height + 1; } function getExpandWidth(width) { return width + 10 + getWidthOffset(); } function getExpandHeight(height) { return height + 10 + getHeightOffset(); } function getShrinkWidth(width) { return width * 2 + getWidthOffset(); } function getShrinkHeight(height) { return height * 2 + getHeightOffset(); } function positionScrollbars(element, width, height) { var expand = getExpandElement(element); var shrink = getShrinkElement(element); var expandWidth = getExpandWidth(width); var expandHeight = getExpandHeight(height); var shrinkWidth = getShrinkWidth(width); var shrinkHeight = getShrinkHeight(height); expand.scrollLeft = expandWidth; expand.scrollTop = expandHeight; shrink.scrollLeft = shrinkWidth; shrink.scrollTop = shrinkHeight; } function injectContainerElement() { var container = getState(element).container; if (!container) { container = document.createElement("div"); container.className = detectionContainerClass; container.style.cssText = "visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;"; getState(element).container = container; addAnimationClass(container); element.appendChild(container); var onAnimationStart = function () { getState(element).onRendered && getState(element).onRendered(); }; addEvent(container, "animationstart", onAnimationStart); // Store the event handler here so that they may be removed when uninstall is called. // See uninstall function for an explanation why it is needed. getState(element).onAnimationStart = onAnimationStart; } return container; } function injectScrollElements() { function alterPositionStyles() { var style = getState(element).style; if(style.position === "static") { element.style.position = "relative"; var removeRelativeStyles = function(reporter, element, style, property) { function getNumericalValue(value) { return value.replace(/[^-\d\.]/g, ""); } var value = style[property]; if(value !== "auto" && getNumericalValue(value) !== "0") { reporter.warn("An element that is positioned static has style." + property + "=" + value + " which is ignored due to the static positioning. The element will need to be positioned relative, so the style." + property + " will be set to 0. Element: ", element); element.style[property] = 0; } }; //Check so that there are no accidental styles that will make the element styled differently now that is is relative. //If there are any, set them to 0 (this should be okay with the user since the style properties did nothing before [since the element was positioned static] anyway). removeRelativeStyles(reporter, element, style, "top"); removeRelativeStyles(reporter, element, style, "right"); removeRelativeStyles(reporter, element, style, "bottom"); removeRelativeStyles(reporter, element, style, "left"); } } function getLeftTopBottomRightCssText(left, top, bottom, right) { left = (!left ? "0" : (left + "px")); top = (!top ? "0" : (top + "px")); bottom = (!bottom ? "0" : (bottom + "px")); right = (!right ? "0" : (right + "px")); return "left: " + left + "; top: " + top + "; right: " + right + "; bottom: " + bottom + ";"; } debug("Injecting elements"); if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } alterPositionStyles(); var rootContainer = getState(element).container; if (!rootContainer) { rootContainer = injectContainerElement(); } // Due to this WebKit bug https://bugs.webkit.org/show_bug.cgi?id=80808 (currently fixed in Blink, but still present in WebKit browsers such as Safari), // we need to inject two containers, one that is width/height 100% and another that is left/top -1px so that the final container always is 1x1 pixels bigger than // the targeted element. // When the bug is resolved, "containerContainer" may be removed. // The outer container can occasionally be less wide than the targeted when inside inline elements element in WebKit (see https://bugs.webkit.org/show_bug.cgi?id=152980). // This should be no problem since the inner container either way makes sure the injected scroll elements are at least 1x1 px. var scrollbarWidth = scrollbarSizes.width; var scrollbarHeight = scrollbarSizes.height; var containerContainerStyle = "position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;"; var containerStyle = "position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; " + getLeftTopBottomRightCssText(-(1 + scrollbarWidth), -(1 + scrollbarHeight), -scrollbarHeight, -scrollbarWidth); var expandStyle = "position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;"; var shrinkStyle = "position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;"; var expandChildStyle = "position: absolute; left: 0; top: 0;"; var shrinkChildStyle = "position: absolute; width: 200%; height: 200%;"; var containerContainer = document.createElement("div"); var container = document.createElement("div"); var expand = document.createElement("div"); var expandChild = document.createElement("div"); var shrink = document.createElement("div"); var shrinkChild = document.createElement("div"); // Some browsers choke on the resize system being rtl, so force it to ltr. https://github.com/wnr/element-resize-detector/issues/56 // However, dir should not be set on the top level container as it alters the dimensions of the target element in some browsers. containerContainer.dir = "ltr"; containerContainer.style.cssText = containerContainerStyle; containerContainer.className = detectionContainerClass; container.className = detectionContainerClass; container.style.cssText = containerStyle; expand.style.cssText = expandStyle; expandChild.style.cssText = expandChildStyle; shrink.style.cssText = shrinkStyle; shrinkChild.style.cssText = shrinkChildStyle; expand.appendChild(expandChild); shrink.appendChild(shrinkChild); container.appendChild(expand); container.appendChild(shrink); containerContainer.appendChild(container); rootContainer.appendChild(containerContainer); function onExpandScroll() { getState(element).onExpand && getState(element).onExpand(); } function onShrinkScroll() { getState(element).onShrink && getState(element).onShrink(); } addEvent(expand, "scroll", onExpandScroll); addEvent(shrink, "scroll", onShrinkScroll); // Store the event handlers here so that they may be removed when uninstall is called. // See uninstall function for an explanation why it is needed. getState(element).onExpandScroll = onExpandScroll; getState(element).onShrinkScroll = onShrinkScroll; } function registerListenersAndPositionElements() { function updateChildSizes(element, width, height) { var expandChild = getExpandChildElement(element); var expandWidth = getExpandWidth(width); var expandHeight = getExpandHeight(height); expandChild.style.width = expandWidth + "px"; expandChild.style.height = expandHeight + "px"; } function updateDetectorElements(done) { var width = element.offsetWidth; var height = element.offsetHeight; debug("Storing current size", width, height); // Store the size of the element sync here, so that multiple scroll events may be ignored in the event listeners. // Otherwise the if-check in handleScroll is useless. storeCurrentSize(element, width, height); // Since we delay the processing of the batch, there is a risk that uninstall has been called before the batch gets to execute. // Since there is no way to cancel the fn executions, we need to add an uninstall guard to all fns of the batch. batchProcessor.add(0, function performUpdateChildSizes() { if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } if (!areElementsInjected()) { debug("Aborting because element container has not been initialized"); return; } if (options.debug) { var w = element.offsetWidth; var h = element.offsetHeight; if (w !== width || h !== height) { reporter.warn(idHandler.get(element), "Scroll: Size changed before updating detector elements."); } } updateChildSizes(element, width, height); }); batchProcessor.add(1, function updateScrollbars() { if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } if (!areElementsInjected()) { debug("Aborting because element container has not been initialized"); return; } positionScrollbars(element, width, height); }); if (done) { batchProcessor.add(2, function () { if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } if (!areElementsInjected()) { debug("Aborting because element container has not been initialized"); return; } done(); }); } } function areElementsInjected() { return !!getState(element).container; } function notifyListenersIfNeeded() { function isFirstNotify() { return getState(element).lastNotifiedWidth === undefined; } debug("notifyListenersIfNeeded invoked"); var state = getState(element); // Don't notify the if the current size is the start size, and this is the first notification. if (isFirstNotify() && state.lastWidth === state.startSize.width && state.lastHeight === state.startSize.height) { return debug("Not notifying: Size is the same as the start size, and there has been no notification yet."); } // Don't notify if the size already has been notified. if (state.lastWidth === state.lastNotifiedWidth && state.lastHeight === state.lastNotifiedHeight) { return debug("Not notifying: Size already notified"); } debug("Current size not notified, notifying..."); state.lastNotifiedWidth = state.lastWidth; state.lastNotifiedHeight = state.lastHeight; forEach(getState(element).listeners, function (listener) { listener(element); }); } function handleRender() { debug("startanimation triggered."); if (isUnrendered(element)) { debug("Ignoring since element is still unrendered..."); return; } debug("Element rendered."); var expand = getExpandElement(element); var shrink = getShrinkElement(element); if (expand.scrollLeft === 0 || expand.scrollTop === 0 || shrink.scrollLeft === 0 || shrink.scrollTop === 0) { debug("Scrollbars out of sync. Updating detector elements..."); updateDetectorElements(notifyListenersIfNeeded); } } function handleScroll() { debug("Scroll detected."); if (isUnrendered(element)) { // Element is still unrendered. Skip this scroll event. debug("Scroll event fired while unrendered. Ignoring..."); return; } var width = element.offsetWidth; var height = element.offsetHeight; if (width !== element.lastWidth || height !== element.lastHeight) { debug("Element size changed."); updateDetectorElements(notifyListenersIfNeeded); } else { debug("Element size has not changed (" + width + "x" + height + ")."); } } debug("registerListenersAndPositionElements invoked."); if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } getState(element).onRendered = handleRender; getState(element).onExpand = handleScroll; getState(element).onShrink = handleScroll; var style = getState(element).style; updateChildSizes(element, style.width, style.height); } function finalizeDomMutation() { debug("finalizeDomMutation invoked."); if (!getState(element)) { debug("Aborting because element has been uninstalled"); return; } var style = getState(element).style; storeCurrentSize(element, style.width, style.height); positionScrollbars(element, style.width, style.height); } function ready() { callback(element); } function install() { debug("Installing..."); initListeners(); storeStartSize(); batchProcessor.add(0, storeStyle); batchProcessor.add(1, injectScrollElements); batchProcessor.add(2, registerListenersAndPositionElements); batchProcessor.add(3, finalizeDomMutation); batchProcessor.add(4, ready); } debug("Making detectable..."); if (isDetached(element)) { debug("Element is detached"); injectContainerElement(); debug("Waiting until element is attached..."); getState(element).onRendered = function () { debug("Element is now attached"); install(); }; } else { install(); } } function uninstall(element) { var state = getState(element); if (!state) { // Uninstall has been called on a non-erd element. return; } // Uninstall may have been called in the following scenarios: // (1) Right between the sync code and async batch (here state.busy = true, but nothing have been registered or injected). // (2) In the ready callback of the last level of the batch by another element (here, state.busy = true, but all the stuff has been injected). // (3) After the installation process (here, state.busy = false and all the stuff has been injected). // So to be on the safe side, let's check for each thing before removing. // We need to remove the event listeners, because otherwise the event might fire on an uninstall element which results in an error when trying to get the state of the element. state.onExpandScroll && removeEvent(getExpandElement(element), "scroll", state.onExpandScroll); state.onShrinkScroll && removeEvent(getShrinkElement(element), "scroll", state.onShrinkScroll); state.onAnimationStart && removeEvent(state.container, "animationstart", state.onAnimationStart); state.container && element.removeChild(state.container); } return { makeDetectable: makeDetectable, addListener: addListener, uninstall: uninstall }; }; /***/ }, /* 137 */ /***/ function(module, exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(40).forEach; var elementUtilsMaker = __webpack_require__(138); var listenerHandlerMaker = __webpack_require__(141); var idGeneratorMaker = __webpack_require__(139); var idHandlerMaker = __webpack_require__(140); var reporterMaker = __webpack_require__(142); var browserDetector = __webpack_require__(39); var batchProcessorMaker = __webpack_require__(43); var stateHandler = __webpack_require__(143); //Detection strategies. var objectStrategyMaker = __webpack_require__(135); var scrollStrategyMaker = __webpack_require__(136); function isCollection(obj) { return Array.isArray(obj) || obj.length !== undefined; } function toArray(collection) { if (!Array.isArray(collection)) { var array = []; forEach(collection, function (obj) { array.push(obj); }); return array; } else { return collection; } } function isElement(obj) { return obj && obj.nodeType === 1; } /** * @typedef idHandler * @type {object} * @property {function} get Gets the resize detector id of the element. * @property {function} set Generate and sets the resize detector id of the element. */ /** * @typedef Options * @type {object} * @property {boolean} callOnAdd Determines if listeners should be called when they are getting added. Default is true. If true, the listener is guaranteed to be called when it has been added. If false, the listener will not be guarenteed to be called when it has been added (does not prevent it from being called). * @property {idHandler} idHandler A custom id handler that is responsible for generating, setting and retrieving id's for elements. If not provided, a default id handler will be used. * @property {reporter} reporter A custom reporter that handles reporting logs, warnings and errors. If not provided, a default id handler will be used. If set to false, then nothing will be reported. * @property {boolean} debug If set to true, the the system will report debug messages as default for the listenTo method. */ /** * Creates an element resize detector instance. * @public * @param {Options?} options Optional global options object that will decide how this instance will work. */ module.exports = function(options) { options = options || {}; //idHandler is currently not an option to the listenTo function, so it should not be added to globalOptions. var idHandler; if (options.idHandler) { // To maintain compatability with idHandler.get(element, readonly), make sure to wrap the given idHandler // so that readonly flag always is true when it's used here. This may be removed next major version bump. idHandler = { get: function (element) { return options.idHandler.get(element, true); }, set: options.idHandler.set }; } else { var idGenerator = idGeneratorMaker(); var defaultIdHandler = idHandlerMaker({ idGenerator: idGenerator, stateHandler: stateHandler }); idHandler = defaultIdHandler; } //reporter is currently not an option to the listenTo function, so it should not be added to globalOptions. var reporter = options.reporter; if(!reporter) { //If options.reporter is false, then the reporter should be quiet. var quiet = reporter === false; reporter = reporterMaker(quiet); } //batchProcessor is currently not an option to the listenTo function, so it should not be added to globalOptions. var batchProcessor = getOption(options, "batchProcessor", batchProcessorMaker({ reporter: reporter })); //Options to be used as default for the listenTo function. var globalOptions = {}; globalOptions.callOnAdd = !!getOption(options, "callOnAdd", true); globalOptions.debug = !!getOption(options, "debug", false); var eventListenerHandler = listenerHandlerMaker(idHandler); var elementUtils = elementUtilsMaker({ stateHandler: stateHandler }); //The detection strategy to be used. var detectionStrategy; var desiredStrategy = getOption(options, "strategy", "object"); var strategyOptions = { reporter: reporter, batchProcessor: batchProcessor, stateHandler: stateHandler, idHandler: idHandler }; if(desiredStrategy === "scroll") { if (browserDetector.isLegacyOpera()) { reporter.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."); desiredStrategy = "object"; } else if (browserDetector.isIE(9)) { reporter.warn("Scroll strategy is not supported on IE9. Changing to object strategy."); desiredStrategy = "object"; } } if(desiredStrategy === "scroll") { detectionStrategy = scrollStrategyMaker(strategyOptions); } else if(desiredStrategy === "object") { detectionStrategy = objectStrategyMaker(strategyOptions); } else { throw new Error("Invalid strategy name: " + desiredStrategy); } //Calls can be made to listenTo with elements that are still being installed. //Also, same elements can occur in the elements list in the listenTo function. //With this map, the ready callbacks can be synchronized between the calls //so that the ready callback can always be called when an element is ready - even if //it wasn't installed from the function itself. var onReadyCallbacks = {}; /** * Makes the given elements resize-detectable and starts listening to resize events on the elements. Calls the event callback for each event for each element. * @public * @param {Options?} options Optional options object. These options will override the global options. Some options may not be overriden, such as idHandler. * @param {element[]|element} elements The given array of elements to detect resize events of. Single element is also valid. * @param {function} listener The callback to be executed for each resize event for each element. */ function listenTo(options, elements, listener) { function onResizeCallback(element) { var listeners = eventListenerHandler.get(element); forEach(listeners, function callListenerProxy(listener) { listener(element); }); } function addListener(callOnAdd, element, listener) { eventListenerHandler.add(element, listener); if(callOnAdd) { listener(element); } } //Options object may be omitted. if(!listener) { listener = elements; elements = options; options = {}; } if(!elements) { throw new Error("At least one element required."); } if(!listener) { throw new Error("Listener required."); } if (isElement(elements)) { // A single element has been passed in. elements = [elements]; } else if (isCollection(elements)) { // Convert collection to array for plugins. // TODO: May want to check so that all the elements in the collection are valid elements. elements = toArray(elements); } else { return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); } var elementsReady = 0; var callOnAdd = getOption(options, "callOnAdd", globalOptions.callOnAdd); var onReadyCallback = getOption(options, "onReady", function noop() {}); var debug = getOption(options, "debug", globalOptions.debug); forEach(elements, function attachListenerToElement(element) { if (!stateHandler.getState(element)) { stateHandler.initState(element); idHandler.set(element); } var id = idHandler.get(element); debug && reporter.log("Attaching listener to element", id, element); if(!elementUtils.isDetectable(element)) { debug && reporter.log(id, "Not detectable."); if(elementUtils.isBusy(element)) { debug && reporter.log(id, "System busy making it detectable"); //The element is being prepared to be detectable. Do not make it detectable. //Just add the listener, because the element will soon be detectable. addListener(callOnAdd, element, listener); onReadyCallbacks[id] = onReadyCallbacks[id] || []; onReadyCallbacks[id].push(function onReady() { elementsReady++; if(elementsReady === elements.length) { onReadyCallback(); } }); return; } debug && reporter.log(id, "Making detectable..."); //The element is not prepared to be detectable, so do prepare it and add a listener to it. elementUtils.markBusy(element, true); return detectionStrategy.makeDetectable({ debug: debug }, element, function onElementDetectable(element) { debug && reporter.log(id, "onElementDetectable"); if (stateHandler.getState(element)) { elementUtils.markAsDetectable(element); elementUtils.markBusy(element, false); detectionStrategy.addListener(element, onResizeCallback); addListener(callOnAdd, element, listener); // Since the element size might have changed since the call to "listenTo", we need to check for this change, // so that a resize event may be emitted. // Having the startSize object is optional (since it does not make sense in some cases such as unrendered elements), so check for its existance before. // Also, check the state existance before since the element may have been uninstalled in the installation process. var state = stateHandler.getState(element); if (state && state.startSize) { var width = element.offsetWidth; var height = element.offsetHeight; if (state.startSize.width !== width || state.startSize.height !== height) { onResizeCallback(element); } } if(onReadyCallbacks[id]) { forEach(onReadyCallbacks[id], function(callback) { callback(); }); } } else { // The element has been unisntalled before being detectable. debug && reporter.log(id, "Element uninstalled before being detectable."); } delete onReadyCallbacks[id]; elementsReady++; if(elementsReady === elements.length) { onReadyCallback(); } }); } debug && reporter.log(id, "Already detecable, adding listener."); //The element has been prepared to be detectable and is ready to be listened to. addListener(callOnAdd, element, listener); elementsReady++; }); if(elementsReady === elements.length) { onReadyCallback(); } } function uninstall(elements) { if(!elements) { return reporter.error("At least one element is required."); } if (isElement(elements)) { // A single element has been passed in. elements = [elements]; } else if (isCollection(elements)) { // Convert collection to array for plugins. // TODO: May want to check so that all the elements in the collection are valid elements. elements = toArray(elements); } else { return reporter.error("Invalid arguments. Must be a DOM element or a collection of DOM elements."); } forEach(elements, function (element) { eventListenerHandler.removeAllListeners(element); detectionStrategy.uninstall(element); stateHandler.cleanState(element); }); } return { listenTo: listenTo, removeListener: eventListenerHandler.removeListener, removeAllListeners: eventListenerHandler.removeAllListeners, uninstall: uninstall }; }; function getOption(options, name, defaultValue) { var value = options[name]; if((value === undefined || value === null) && defaultValue !== undefined) { return defaultValue; } return value; } /***/ }, /* 138 */ /***/ function(module, exports) { "use strict"; module.exports = function(options) { var getState = options.stateHandler.getState; /** * Tells if the element has been made detectable and ready to be listened for resize events. * @public * @param {element} The element to check. * @returns {boolean} True or false depending on if the element is detectable or not. */ function isDetectable(element) { var state = getState(element); return state && !!state.isDetectable; } /** * Marks the element that it has been made detectable and ready to be listened for resize events. * @public * @param {element} The element to mark. */ function markAsDetectable(element) { getState(element).isDetectable = true; } /** * Tells if the element is busy or not. * @public * @param {element} The element to check. * @returns {boolean} True or false depending on if the element is busy or not. */ function isBusy(element) { return !!getState(element).busy; } /** * Marks the object is busy and should not be made detectable. * @public * @param {element} element The element to mark. * @param {boolean} busy If the element is busy or not. */ function markBusy(element, busy) { getState(element).busy = !!busy; } return { isDetectable: isDetectable, markAsDetectable: markAsDetectable, isBusy: isBusy, markBusy: markBusy }; }; /***/ }, /* 139 */ /***/ function(module, exports) { "use strict"; module.exports = function() { var idCount = 1; /** * Generates a new unique id in the context. * @public * @returns {number} A unique id in the context. */ function generate() { return idCount++; } return { generate: generate }; }; /***/ }, /* 140 */ /***/ function(module, exports) { "use strict"; module.exports = function(options) { var idGenerator = options.idGenerator; var getState = options.stateHandler.getState; /** * Gets the resize detector id of the element. * @public * @param {element} element The target element to get the id of. * @returns {string|number|null} The id of the element. Null if it has no id. */ function getId(element) { var state = getState(element); if (state && state.id !== undefined) { return state.id; } return null; } /** * Sets the resize detector id of the element. Requires the element to have a resize detector state initialized. * @public * @param {element} element The target element to set the id of. * @returns {string|number|null} The id of the element. */ function setId(element) { var state = getState(element); if (!state) { throw new Error("setId required the element to have a resize detection state."); } var id = idGenerator.generate(); state.id = id; return id; } return { get: getId, set: setId }; }; /***/ }, /* 141 */ /***/ function(module, exports) { "use strict"; module.exports = function(idHandler) { var eventListeners = {}; /** * Gets all listeners for the given element. * @public * @param {element} element The element to get all listeners for. * @returns All listeners for the given element. */ function getListeners(element) { var id = idHandler.get(element); if (id === undefined) { return []; } return eventListeners[id] || []; } /** * Stores the given listener for the given element. Will not actually add the listener to the element. * @public * @param {element} element The element that should have the listener added. * @param {function} listener The callback that the element has added. */ function addListener(element, listener) { var id = idHandler.get(element); if(!eventListeners[id]) { eventListeners[id] = []; } eventListeners[id].push(listener); } function removeListener(element, listener) { var listeners = getListeners(element); for (var i = 0, len = listeners.length; i < len; ++i) { if (listeners[i] === listener) { listeners.splice(i, 1); break; } } } function removeAllListeners(element) { var listeners = getListeners(element); if (!listeners) { return; } listeners.length = 0; } return { get: getListeners, add: addListener, removeListener: removeListener, removeAllListeners: removeAllListeners }; }; /***/ }, /* 142 */ /***/ function(module, exports) { "use strict"; /* global console: false */ /** * Reporter that handles the reporting of logs, warnings and errors. * @public * @param {boolean} quiet Tells if the reporter should be quiet or not. */ module.exports = function(quiet) { function noop() { //Does nothing. } var reporter = { log: noop, warn: noop, error: noop }; if(!quiet && window.console) { var attachFunction = function(reporter, name) { //The proxy is needed to be able to call the method with the console context, //since we cannot use bind. reporter[name] = function reporterProxy() { var f = console[name]; if (f.apply) { //IE9 does not support console.log.apply :) f.apply(console, arguments); } else { for (var i = 0; i < arguments.length; i++) { f(arguments[i]); } } }; }; attachFunction(reporter, "log"); attachFunction(reporter, "warn"); attachFunction(reporter, "error"); } return reporter; }; /***/ }, /* 143 */ /***/ function(module, exports) { "use strict"; var prop = "_erd"; function initState(element) { element[prop] = {}; return getState(element); } function getState(element) { return element[prop]; } function cleanState(element) { delete element[prop]; } module.exports = { initState: initState, getState: getState, cleanState: cleanState }; /***/ }, /* 144 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_144__; /***/ }, /* 145 */ /***/ function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE_145__; /***/ } /******/ ]) }); ; //# sourceMappingURL=react-container-query.js.map