diff --git a/build/global/react-hotkeys.js b/build/global/react-hotkeys.js index 249ae7b0..f37e3e6f 100644 --- a/build/global/react-hotkeys.js +++ b/build/global/react-hotkeys.js @@ -7,7 +7,7 @@ exports["ReactHotkeys"] = factory(require("react"), require("ReactDOM")); else root["ReactHotkeys"] = factory(root["React"], root["ReactDOM"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_3__, __WEBPACK_EXTERNAL_MODULE_4__) { +})(this, function(__WEBPACK_EXTERNAL_MODULE_7__, __WEBPACK_EXTERNAL_MODULE_13__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; @@ -52,15 +52,15 @@ return /******/ (function(modules) { // webpackBootstrap /************************************************************************/ /******/ ([ /* 0 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { __webpack_require__(1); module.exports = __webpack_require__(1); -/***/ }, +/***/ }), /* 1 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -77,7 +77,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var _FocusTrap = __webpack_require__(5); + var _FocusTrap = __webpack_require__(14); Object.defineProperty(exports, 'FocusTrap', { enumerable: true, @@ -86,7 +86,7 @@ return /******/ (function(modules) { // webpackBootstrap } }); - var _HotKeyMapMixin = __webpack_require__(6); + var _HotKeyMapMixin = __webpack_require__(15); Object.defineProperty(exports, 'HotKeyMapMixin', { enumerable: true, @@ -97,9 +97,9 @@ return /******/ (function(modules) { // webpackBootstrap function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/***/ }, +/***/ }), /* 2 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -109,39 +109,47 @@ return /******/ (function(modules) { // webpackBootstrap var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var _react = __webpack_require__(3); + var _propTypes = __webpack_require__(3); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _react = __webpack_require__(7); var _react2 = _interopRequireDefault(_react); - var _reactDom = __webpack_require__(4); + var _createReactClass = __webpack_require__(8); + + var _createReactClass2 = _interopRequireDefault(_createReactClass); + + var _reactDom = __webpack_require__(13); var _reactDom2 = _interopRequireDefault(_reactDom); - var _FocusTrap = __webpack_require__(5); + var _FocusTrap = __webpack_require__(14); var _FocusTrap2 = _interopRequireDefault(_FocusTrap); - var _HotKeyMapMixin = __webpack_require__(6); + var _HotKeyMapMixin = __webpack_require__(15); var _HotKeyMapMixin2 = _interopRequireDefault(_HotKeyMapMixin); - var _isBoolean = __webpack_require__(96); + var _isBoolean = __webpack_require__(121); var _isBoolean2 = _interopRequireDefault(_isBoolean); - var _isArray = __webpack_require__(36); + var _isArray = __webpack_require__(56); var _isArray2 = _interopRequireDefault(_isArray); - var _isObject = __webpack_require__(17); + var _isObject = __webpack_require__(29); var _isObject2 = _interopRequireDefault(_isObject); - var _forEach = __webpack_require__(97); + var _forEach = __webpack_require__(122); var _forEach2 = _interopRequireDefault(_forEach); - var _isEqual = __webpack_require__(38); + var _isEqual = __webpack_require__(67); var _isEqual2 = _interopRequireDefault(_isEqual); @@ -165,28 +173,26 @@ return /******/ (function(modules) { // webpackBootstrap return [sequences]; } - var HotKeys = _react2.default.createClass({ + var HotKeys = (0, _createReactClass2.default)({ displayName: 'HotKeys', - - mixins: [(0, _HotKeyMapMixin2.default)()], propTypes: { - children: _react2.default.PropTypes.node, - onFocus: _react2.default.PropTypes.func, - onBlur: _react2.default.PropTypes.func, - keyMap: _react2.default.PropTypes.object, - handlers: _react2.default.PropTypes.object, - focused: _react2.default.PropTypes.bool, // externally controlled focus - attach: _react2.default.PropTypes.any // dom element to listen for key events + children: _propTypes2.default.node, + onFocus: _propTypes2.default.func, + onBlur: _propTypes2.default.func, + keyMap: _propTypes2.default.object, + handlers: _propTypes2.default.object, + focused: _propTypes2.default.bool, // externally controlled focus + attach: _propTypes2.default.any // dom element to listen for key events }, contextTypes: { - hotKeyParent: _react2.default.PropTypes.any + hotKeyParent: _propTypes2.default.any }, childContextTypes: { - hotKeyParent: _react2.default.PropTypes.any + hotKeyParent: _propTypes2.default.any }, getChildContext: function getChildContext() { @@ -197,7 +203,7 @@ return /******/ (function(modules) { // webpackBootstrap componentDidMount: function componentDidMount() { // import is here to support React's server rendering as Mousetrap immediately // calls itself with window and it fails in Node environment - var Mousetrap = __webpack_require__(126); + var Mousetrap = __webpack_require__(130); // Not optimal - imagine hundreds of this component. We need a top level // delegation point for mousetrap this.__mousetrap__ = new Mousetrap(this.props.attach || _reactDom2.default.findDOMNode(this)); @@ -219,17 +225,17 @@ return /******/ (function(modules) { // webpackBootstrap updateHotKeys: function updateHotKeys() { var _this = this; - var force = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; - var prevProps = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var _props$handlers = this.props.handlers; - var handlers = _props$handlers === undefined ? {} : _props$handlers; - var _prevProps$handlers = prevProps.handlers; - var prevHandlers = _prevProps$handlers === undefined ? handlers : _prevProps$handlers; + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var prevProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _props$handlers = this.props.handlers, + handlers = _props$handlers === undefined ? {} : _props$handlers; + var _prevProps$handlers = prevProps.handlers, + prevHandlers = _prevProps$handlers === undefined ? handlers : _prevProps$handlers; // Ensure map is up-to-date to begin with // We will only bother continuing if the map was actually updated - if (!force && (0, _isEqual2.default)(handlers, prevHandlers) && !this.updateMap()) { + if (!force && !this.updateMap() && (0, _isEqual2.default)(handlers, prevHandlers)) { return; } @@ -275,7 +281,7 @@ return /******/ (function(modules) { // webpackBootstrap }); }, childHandledSequence: function childHandledSequence() { - var sequence = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; + var sequence = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; this.__lastChildSequence__ = sequence; @@ -306,14 +312,13 @@ return /******/ (function(modules) { // webpackBootstrap } }, render: function render() { - var _props3 = this.props; - var children = _props3.children; - var keyMap = _props3.keyMap; - var handlers = _props3.handlers; - var focused = _props3.focused; - var attach = _props3.attach; - - var props = _objectWithoutProperties(_props3, ['children', 'keyMap', 'handlers', 'focused', 'attach']); + var _props3 = this.props, + children = _props3.children, + keyMap = _props3.keyMap, + handlers = _props3.handlers, + focused = _props3.focused, + attach = _props3.attach, + props = _objectWithoutProperties(_props3, ['children', 'keyMap', 'handlers', 'focused', 'attach']); return _react2.default.createElement( _FocusTrap2.default, @@ -325,1072 +330,1642 @@ return /******/ (function(modules) { // webpackBootstrap exports.default = HotKeys; -/***/ }, +/***/ }), /* 3 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_3__; - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_4__; - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - var _react = __webpack_require__(3); - - var _react2 = _interopRequireDefault(_react); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } - - var FocusTrap = _react2.default.createClass({ - displayName: 'FocusTrap', +/***/ (function(module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ - propTypes: { - onFocus: _react2.default.PropTypes.func, - onBlur: _react2.default.PropTypes.func, - component: _react2.default.PropTypes.any, - children: _react2.default.PropTypes.node - }, + if (false) { + var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' && + Symbol.for && + Symbol.for('react.element')) || + 0xeac7; - getDefaultProps: function getDefaultProps() { - return { - component: 'div' - }; - }, - render: function render() { - var _props = this.props; - var Component = _props.component; - var children = _props.children; + var isValidElement = function(object) { + return typeof object === 'object' && + object !== null && + object.$$typeof === REACT_ELEMENT_TYPE; + }; - var props = _objectWithoutProperties(_props, ['component', 'children']); + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess); + } else { + // By explicitly using `prop-types` you are opting into new production behavior. + // http://fb.me/prop-types-in-prod + module.exports = __webpack_require__(4)(); + } - return _react2.default.createElement( - Component, - _extends({ tabIndex: '-1' }, props), - children - ); - } - }); - exports.default = FocusTrap; +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { + /** + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ 'use strict'; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.default = HotKeyMapMixin; + var emptyFunction = __webpack_require__(5); + var invariant = __webpack_require__(6); + + module.exports = function() { + // Important! + // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`. + function shim() { + invariant( + false, + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use PropTypes.checkPropTypes() to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + }; + shim.isRequired = shim; + function getShim() { + return shim; + }; + var ReactPropTypes = { + array: shim, + bool: shim, + func: shim, + number: shim, + object: shim, + string: shim, + symbol: shim, + + any: shim, + arrayOf: getShim, + element: shim, + instanceOf: getShim, + node: shim, + objectOf: getShim, + oneOf: getShim, + oneOfType: getShim, + shape: getShim + }; - var _react = __webpack_require__(3); + ReactPropTypes.checkPropTypes = emptyFunction; + ReactPropTypes.PropTypes = ReactPropTypes; - var _react2 = _interopRequireDefault(_react); + return ReactPropTypes; + }; - var _assign = __webpack_require__(7); - var _assign2 = _interopRequireDefault(_assign); +/***/ }), +/* 5 */ +/***/ (function(module, exports) { - var _isEqual = __webpack_require__(38); + "use strict"; - var _isEqual2 = _interopRequireDefault(_isEqual); + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * + */ - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + function makeEmptyFunction(arg) { + return function () { + return arg; + }; + } - function HotKeyMapMixin() { - var hotKeyMap = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + var emptyFunction = function emptyFunction() {}; + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function () { + return this; + }; + emptyFunction.thatReturnsArgument = function (arg) { + return arg; + }; - return { + module.exports = emptyFunction; - contextTypes: { - hotKeyMap: _react2.default.PropTypes.object - }, +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { - childContextTypes: { - hotKeyMap: _react2.default.PropTypes.object - }, + /** + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ - getChildContext: function getChildContext() { - return { - hotKeyMap: this.__hotKeyMap__ - }; - }, - componentWillMount: function componentWillMount() { - this.updateMap(); - }, - updateMap: function updateMap() { - var newMap = this.buildMap(); + 'use strict'; - if (!(0, _isEqual2.default)(newMap, this.__hotKeyMap__)) { - this.__hotKeyMap__ = newMap; - return true; - } + /** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ - return false; - }, - buildMap: function buildMap() { - var parentMap = this.context.hotKeyMap || {}; - var thisMap = this.props.keyMap || {}; + var validateFormat = function validateFormat(format) {}; - return (0, _assign2.default)({}, parentMap, hotKeyMap, thisMap); - }, - getMap: function getMap() { - return this.__hotKeyMap__; + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); } }; - }; + } -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); - var assignValue = __webpack_require__(8), - copyObject = __webpack_require__(10), - createAssigner = __webpack_require__(11), - isArrayLike = __webpack_require__(13), - isPrototype = __webpack_require__(27), - keys = __webpack_require__(28); + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } - /** Used for built-in method references. */ - var objectProto = Object.prototype; + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + module.exports = invariant; - /** Built-in value references. */ - var propertyIsEnumerable = objectProto.propertyIsEnumerable; +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + + module.exports = __WEBPACK_EXTERNAL_MODULE_7__; - /** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */ - var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf'); +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). - * - * @static - * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn - * @example - * - * function Foo() { - * this.c = 3; - * } - * - * function Bar() { - * this.e = 5; - * } + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. * - * Foo.prototype.d = 4; - * Bar.prototype.f = 6; + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * _.assign({ 'a': 1 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3, 'e': 5 } */ - var assign = createAssigner(function(object, source) { - if (nonEnumShadows || isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; - } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); - } - } - }); - module.exports = assign; + 'use strict'; + var React = __webpack_require__(7); + var factory = __webpack_require__(9); -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { + // Hack to grab NoopUpdateQueue from isomorphic React + var ReactNoopUpdateQueue = new React.Component().updater; - var eq = __webpack_require__(9); + module.exports = factory( + React.Component, + React.isValidElement, + ReactNoopUpdateQueue + ); - /** Used for built-in method references. */ - var objectProto = Object.prototype; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. + * Copyright 2013-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - object[key] = value; - } - } - module.exports = assignValue; + 'use strict'; + var _assign = __webpack_require__(10); -/***/ }, -/* 9 */ -/***/ function(module, exports) { + var emptyObject = __webpack_require__(11); + var _invariant = __webpack_require__(12); - /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.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 = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * _.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); + if (false) { + var warning = require('fbjs/lib/warning'); } - module.exports = eq; + var MIXINS_KEY = 'mixins'; + // Helper function to allow the creation of anonymous functions which do not + // have .name set to the name of the variable being assigned to. + function identity(fn) { + return fn; + } -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { + var ReactPropTypeLocationNames; + if (false) { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context', + }; + } else { + ReactPropTypeLocationNames = {}; + } - var assignValue = __webpack_require__(8); + function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { + /** + * Policies that describe methods in `ReactClassInterface`. + */ + + + var injectedMixins = []; + + /** + * Composite components are higher-level components that compose other composite + * or host components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return
Hello World
; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will be available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ + var ReactClassInterface = { - /** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. - */ - function copyObject(source, props, object, customizer) { - object || (object = {}); + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: 'DEFINE_MANY', - var index = -1, - length = props.length; + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: 'DEFINE_MANY', - while (++index < length) { - var key = props[index]; + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: 'DEFINE_MANY', - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : source[key]; + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: 'DEFINE_MANY', - assignValue(object, key, newValue); + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: 'DEFINE_MANY', + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: 'DEFINE_MANY_MERGED', + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: 'DEFINE_MANY_MERGED', + + /** + * @return {object} + * @optional + */ + getChildContext: 'DEFINE_MANY_MERGED', + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return
Hello, {name}!
; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: 'DEFINE_ONCE', + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: 'DEFINE_MANY', + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: 'DEFINE_MANY', + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: 'DEFINE_MANY', + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: 'DEFINE_ONCE', + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: 'DEFINE_MANY', + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: 'DEFINE_MANY', + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: 'OVERRIDE_BASE' + + }; + + /** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ + var RESERVED_SPEC_KEYS = { + displayName: function (Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function (Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function (Constructor, childContextTypes) { + if (false) { + validateTypeDef(Constructor, childContextTypes, 'childContext'); + } + Constructor.childContextTypes = _assign({}, Constructor.childContextTypes, childContextTypes); + }, + contextTypes: function (Constructor, contextTypes) { + if (false) { + validateTypeDef(Constructor, contextTypes, 'context'); + } + Constructor.contextTypes = _assign({}, Constructor.contextTypes, contextTypes); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function (Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction(Constructor.getDefaultProps, getDefaultProps); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function (Constructor, propTypes) { + if (false) { + validateTypeDef(Constructor, propTypes, 'prop'); + } + Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); + }, + statics: function (Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + }, + autobind: function () {} }; + + function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an _invariant so components + // don't show up in prod but only in __DEV__ + false ? warning(typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName) : void 0; + } + } } - return object; - } - module.exports = copyObject; + function validateMethodOverride(isAlreadyDefined, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + _invariant(specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name); + } -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { + // Disallow defining methods more than once unless explicitly allowed. + if (isAlreadyDefined) { + _invariant(specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name); + } + } - var isIterateeCall = __webpack_require__(12), - rest = __webpack_require__(20); + /** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classes. + */ + function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + if (false) { + var typeofSpec = typeof spec; + var isMixinValid = typeofSpec === 'object' && spec !== null; + + process.env.NODE_ENV !== 'production' ? warning(isMixinValid, '%s: You\'re attempting to include a mixin that is either null ' + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec) : void 0; + } - /** - * Creates a function like `_.assign`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ - function createAssigner(assigner) { - return rest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; + return; + } - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; + _invariant(typeof spec !== 'function', 'ReactClass: You\'re attempting to ' + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.'); + _invariant(!isValidElement(spec), 'ReactClass: You\'re attempting to ' + 'use a component as a mixin. Instead, just use a regular object.'); - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; + var proto = Constructor.prototype; + var autoBindPairs = proto.__reactAutoBindPairs; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above. + continue; + } + + var property = spec[name]; + var isAlreadyDefined = proto.hasOwnProperty(name); + validateMethodOverride(isAlreadyDefined, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); + var isFunction = typeof property === 'function'; + var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; + + if (shouldAutoBind) { + autoBindPairs.push(name, property); + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride. + _invariant(isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === 'DEFINE_MANY_MERGED') { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === 'DEFINE_MANY') { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if (false) { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } } } - return object; - }); - } + } - module.exports = createAssigner; + function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + var isReserved = name in RESERVED_SPEC_KEYS; + _invariant(!isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name); -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { + var isInherited = name in Constructor; + _invariant(!isInherited, 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name); + Constructor[name] = property; + } + } - var eq = __webpack_require__(9), - isArrayLike = __webpack_require__(13), - isIndex = __webpack_require__(19), - isObject = __webpack_require__(17); + /** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ + function mergeIntoWithNoDuplicateKeys(one, two) { + _invariant(one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.'); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + _invariant(one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key); + one[key] = two[key]; + } + } + return one; + } - /** - * Checks if the given arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; + /** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); + + /** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ + function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; } - return false; + + /** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ + function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if (false) { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + boundMethod.bind = function (newThis) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } + + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName) : void 0; + } else if (!args.length) { + process.env.NODE_ENV !== 'production' ? warning(false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName) : void 0; + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + }; + } + return boundMethod; + } + + /** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ + function bindAutoBindMethods(component) { + var pairs = component.__reactAutoBindPairs; + for (var i = 0; i < pairs.length; i += 2) { + var autoBindKey = pairs[i]; + var method = pairs[i + 1]; + component[autoBindKey] = bindAutoBindMethod(component, method); + } + } + + var IsMountedMixin = { + componentDidMount: function () { + this.__isMounted = true; + }, + componentWillUnmount: function () { + this.__isMounted = false; + } + }; + + /** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ + var ReactClassMixin = { + + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function (newState, callback) { + this.updater.enqueueReplaceState(this, newState, callback); + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function () { + if (false) { + process.env.NODE_ENV !== 'production' ? warning(this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', this.constructor && this.constructor.displayName || this.name || 'Component') : void 0; + this.__didWarnIsMounted = true; + } + return !!this.__isMounted; + } + }; + + var ReactClassComponent = function () {}; + _assign(ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin); + + /** + * Creates a composite component class given a class specification. + * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + function createClass(spec) { + // To keep our warnings more understandable, we'll use a little hack here to + // ensure that Constructor.name !== 'Constructor'. This makes sure we don't + // unnecessarily identify a class without displayName as 'Constructor'. + var Constructor = identity(function (props, context, updater) { + // This constructor gets overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory') : void 0; + } + + // Wire up auto-binding + if (this.__reactAutoBindPairs.length) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.refs = emptyObject; + this.updater = updater || ReactNoopUpdateQueue; + + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if (false) { + // We allow auto-mocks to proceed as if they're returning null. + if (initialState === undefined && this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + _invariant(typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent'); + + this.state = initialState; + }); + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + Constructor.prototype.__reactAutoBindPairs = []; + + injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); + + mixSpecIntoComponent(Constructor, IsMountedMixin); + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged. + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if (false) { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + _invariant(Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.'); + + if (false) { + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component') : void 0; + process.env.NODE_ENV !== 'production' ? warning(!Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component') : void 0; + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + return Constructor; + } + + return createClass; } - module.exports = isIterateeCall; + module.exports = factory; -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + + /* + object-assign + (c) Sindre Sorhus + @license MIT + */ - var getLength = __webpack_require__(14), - isFunction = __webpack_require__(16), - isLength = __webpack_require__(18); + 'use strict'; + /* eslint-disable no-unused-vars */ + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var propIsEnumerable = Object.prototype.propertyIsEnumerable; + + function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); + } + + function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } + } + + module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; + }; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { /** - * 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`. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. * - * @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 + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * _.isArrayLike(_.noop); - * // => false */ - function isArrayLike(value) { - return value != null && isLength(getLength(value)) && !isFunction(value); - } - module.exports = isArrayLike; + 'use strict'; + var emptyObject = {}; -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { + if (false) { + Object.freeze(emptyObject); + } - var baseProperty = __webpack_require__(15); + module.exports = emptyObject; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { /** - * Gets the "length" property value of `object`. + * Copyright (c) 2013-present, Facebook, Inc. + * All rights reserved. * - * **Note:** This function is used to avoid a - * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects - * Safari on at least iOS 8.1-8.3 ARM64. + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. */ - var getLength = baseProperty('length'); - module.exports = getLength; - - -/***/ }, -/* 15 */ -/***/ function(module, exports) { + 'use strict'; /** - * The base implementation of `_.property` without support for deep paths. + * Use invariant() to assert state which your program assumes to be true. * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; + + var validateFormat = function validateFormat(format) {}; + + if (false) { + validateFormat = function validateFormat(format) { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } }; } - module.exports = baseProperty; + function invariant(condition, format, a, b, c, d, e, f) { + validateFormat(format); + if (!condition) { + var error; + if (format === undefined) { + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); + error.name = 'Invariant Violation'; + } -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } + } - var isObject = __webpack_require__(17); + module.exports = invariant; - /** `Object#toString` result references. */ - var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; +/***/ }), +/* 13 */ +/***/ (function(module, exports) { - /** Used for built-in method references. */ - var objectProto = Object.prototype; + module.exports = __WEBPACK_EXTERNAL_MODULE_13__; - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * 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 correctly classified, - * else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ - function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array and weak map constructors, - // and PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; - } + 'use strict'; - module.exports = isFunction; + Object.defineProperty(exports, "__esModule", { + value: true + }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + + var _propTypes = __webpack_require__(3); + + var _propTypes2 = _interopRequireDefault(_propTypes); + + var _react = __webpack_require__(7); + + var _react2 = _interopRequireDefault(_react); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + + var FocusTrap = function (_React$Component) { + _inherits(FocusTrap, _React$Component); + + function FocusTrap() { + _classCallCheck(this, FocusTrap); + + return _possibleConstructorReturn(this, (FocusTrap.__proto__ || Object.getPrototypeOf(FocusTrap)).apply(this, arguments)); + } + + _createClass(FocusTrap, [{ + key: 'render', + value: function render() { + var _props = this.props, + Component = _props.component, + children = _props.children, + props = _objectWithoutProperties(_props, ['component', 'children']); + + return _react2.default.createElement( + Component, + _extends({ tabIndex: '-1' }, props), + children + ); + } + }]); + + return FocusTrap; + }(_react2.default.Component); + + FocusTrap.propTypes = { + onFocus: _propTypes2.default.func, + onBlur: _propTypes2.default.func, + component: _propTypes2.default.any, + children: _propTypes2.default.node + }; + FocusTrap.defaultProps = { + component: 'div' + }; + exports.default = FocusTrap; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + + 'use strict'; + + Object.defineProperty(exports, "__esModule", { + value: true + }); + exports.default = HotKeyMapMixin; + + var _propTypes = __webpack_require__(3); + + var _propTypes2 = _interopRequireDefault(_propTypes); + var _react = __webpack_require__(7); -/***/ }, -/* 17 */ -/***/ function(module, exports) { + var _react2 = _interopRequireDefault(_react); - /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/6.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 && (type == 'object' || type == 'function'); - } + var _assign = __webpack_require__(16); - module.exports = isObject; + var _assign2 = _interopRequireDefault(_assign); + var _isEqual = __webpack_require__(67); -/***/ }, -/* 18 */ -/***/ function(module, exports) { + var _isEqual2 = _interopRequireDefault(_isEqual); - /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.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; - } + function HotKeyMapMixin() { + var hotKeyMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - module.exports = isLength; + return { -/***/ }, -/* 19 */ -/***/ function(module, exports) { + contextTypes: { + hotKeyMap: _propTypes2.default.object + }, - /** Used as references for various `Number` constants. */ - var MAX_SAFE_INTEGER = 9007199254740991; + childContextTypes: { + hotKeyMap: _propTypes2.default.object + }, - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + getChildContext: function getChildContext() { + return { + hotKeyMap: this.__hotKeyMap__ + }; + }, + componentWillMount: function componentWillMount() { + this.updateMap(); + }, + updateMap: function updateMap() { + var newMap = this.buildMap(); - /** - * 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); - } + if (!(0, _isEqual2.default)(newMap, this.__hotKeyMap__)) { + this.__hotKeyMap__ = newMap; + return true; + } - module.exports = isIndex; + return false; + }, + buildMap: function buildMap() { + var parentMap = this.context.hotKeyMap || {}; + var thisMap = this.props.keyMap || {}; + return (0, _assign2.default)({}, parentMap, hotKeyMap, thisMap); + }, + getMap: function getMap() { + return this.__hotKeyMap__; + } + }; + } -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { - var apply = __webpack_require__(21), - toInteger = __webpack_require__(22); + var assignValue = __webpack_require__(17), + copyObject = __webpack_require__(35), + createAssigner = __webpack_require__(36), + isArrayLike = __webpack_require__(46), + isPrototype = __webpack_require__(49), + keys = __webpack_require__(50); - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; + /** Used for built-in method references. */ + var objectProto = Object.prototype; - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeMax = Math.max; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). * * @static * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn * @example * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); + * function Foo() { + * this.a = 1; + * } * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' + * function Bar() { + * this.c = 3; + * } + * + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; } - start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, array); - case 1: return func.call(this, args[0], array); - case 2: return func.call(this, args[0], args[1], array); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); } - otherArgs[start] = array; - return apply(func, this, otherArgs); - }; - } + } + }); - module.exports = rest; + module.exports = assign; -/***/ }, -/* 21 */ -/***/ function(module, exports) { +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + + var baseAssignValue = __webpack_require__(18), + eq = __webpack_require__(34); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function apply(func, thisArg, args) { - var length = args.length; - switch (length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); } - return func.apply(thisArg, args); } - module.exports = apply; + module.exports = assignValue; -/***/ }, -/* 22 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { - var toFinite = __webpack_require__(23); + var defineProperty = __webpack_require__(19); /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } } - module.exports = toInteger; + module.exports = baseAssignValue; -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { - var toNumber = __webpack_require__(24); + var getNative = __webpack_require__(20); + + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); + + module.exports = defineProperty; - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + + var baseIsNative = __webpack_require__(21), + getValue = __webpack_require__(33); /** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 + * Gets the native function at `key` of `object`. * - * _.toFinite('3.2'); - * // => 3.2 + * @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 toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } - module.exports = toFinite; + module.exports = getNative; -/***/ }, -/* 24 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { - var isFunction = __webpack_require__(16), - isObject = __webpack_require__(17), - isSymbol = __webpack_require__(25); + var isFunction = __webpack_require__(22), + isMasked = __webpack_require__(30), + isObject = __webpack_require__(29), + toSource = __webpack_require__(32); - /** Used as references for various `Number` constants. */ - var NAN = 0 / 0; + /** + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). + */ + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g; + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + /** Used for built-in method references. */ + var funcProto = Function.prototype, + objectProto = Object.prototype; - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - /** Built-in method references without a dependency on `root`. */ - var freeParseInt = parseInt; + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); /** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity + * The base implementation of `_.isNative` without bad shim checks. * - * _.toNumber('3.2'); - * // => 3.2 + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); } - module.exports = toNumber; + module.exports = baseIsNative; -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { - var isObjectLike = __webpack_require__(26); + var baseGetTag = __webpack_require__(23), + isObject = __webpack_require__(29); /** `Object#toString` result references. */ - var symbolTag = '[object Symbol]'; - - /** Used for built-in method references. */ - var objectProto = Object.prototype; - - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; + var asyncTag = '[object AsyncFunction]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + proxyTag = '[object Proxy]'; /** - * Checks if `value` is classified as a `Symbol` primitive or object. + * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ - * @since 4.0.0 + * @since 0.1.0 * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * - * _.isSymbol(Symbol.iterator); + * _.isFunction(_); * // => true * - * _.isSymbol('abc'); + * _.isFunction(/abc/); * // => false */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); + 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 = isSymbol; + module.exports = isFunction; -/***/ }, -/* 26 */ -/***/ function(module, exports) { +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + + var Symbol = __webpack_require__(24), + getRawTag = __webpack_require__(27), + objectToString = __webpack_require__(28); + + /** `Object#toString` result references. */ + var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; + + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** - * 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 + * The base implementation of `getTag` without fallbacks for buggy environments. * - * _.isObjectLike(null); - * // => false + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ - function isObjectLike(value) { - return !!value && typeof value == 'object'; + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; + } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } - module.exports = isObjectLike; + module.exports = baseGetTag; -/***/ }, -/* 27 */ -/***/ function(module, exports) { +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used for built-in method references. */ - var objectProto = Object.prototype; + var root = __webpack_require__(25); - /** - * 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; + /** Built-in value references. */ + var Symbol = root.Symbol; - return value === proto; - } + module.exports = Symbol; - module.exports = isPrototype; +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { + var freeGlobal = __webpack_require__(26); - var baseHas = __webpack_require__(29), - baseKeys = __webpack_require__(31), - indexKeys = __webpack_require__(32), - isArrayLike = __webpack_require__(13), - isIndex = __webpack_require__(19), - isPrototype = __webpack_require__(27); + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - /** - * 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/6.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) { - var isProto = isPrototype(object); - if (!(isProto || isArrayLike(object))) { - return baseKeys(object); - } - var indexes = indexKeys(object), - skipIndexes = !!indexes, - result = indexes || [], - length = result.length; + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); - for (var key in object) { - if (baseHas(object, key) && - !(skipIndexes && (key == 'length' || isIndex(key, length))) && - !(isProto && key == 'constructor')) { - result.push(key); - } - } - return result; - } + module.exports = root; - module.exports = keys; +/***/ }), +/* 26 */ +/***/ (function(module, exports) { -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { + /* 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; }()))) + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { - var getPrototype = __webpack_require__(30); + var Symbol = __webpack_require__(24); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -1399,1197 +1974,1395 @@ return /******/ (function(modules) { // webpackBootstrap var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.has` 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`. + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. */ - function baseHas(object, key) { - // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`, - // that are composed entirely of index properties, return `false` for - // `hasOwnProperty` checks of them. - return object != null && - (hasOwnProperty.call(object, key) || - (typeof object == 'object' && key in object && getPrototype(object) === null)); - } - - module.exports = baseHas; + var nativeObjectToString = objectProto.toString; - -/***/ }, -/* 30 */ -/***/ function(module, exports) { - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeGetPrototype = Object.getPrototypeOf; + /** Built-in value references. */ + var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** - * Gets the `[[Prototype]]` of `value`. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. - * @returns {null|Object} Returns the `[[Prototype]]`. + * @returns {string} Returns the raw `toStringTag`. */ - function getPrototype(value) { - return nativeGetPrototype(Object(value)); + 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 = getPrototype; + module.exports = getRawTag; -/***/ }, -/* 31 */ -/***/ function(module, exports) { +/***/ }), +/* 28 */ +/***/ (function(module, exports) { - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeKeys = Object.keys; + /** 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; /** - * The base implementation of `_.keys` which doesn't skip the constructor - * property of prototypes or treat sparse arrays as dense. + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - function baseKeys(object) { - return nativeKeys(Object(object)); + function objectToString(value) { + return nativeObjectToString.call(value); } - module.exports = baseKeys; - + module.exports = objectToString; -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - var baseTimes = __webpack_require__(33), - isArguments = __webpack_require__(34), - isArray = __webpack_require__(36), - isLength = __webpack_require__(18), - isString = __webpack_require__(37); +/***/ }), +/* 29 */ +/***/ (function(module, exports) { /** - * Creates an array of index keys for `object` values of arrays, - * `arguments` objects, and strings, otherwise `null` is returned. + * 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('')`) * - * @private - * @param {Object} object The object to query. - * @returns {Array|null} Returns index keys, else `null`. + * @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 indexKeys(object) { - var length = object ? object.length : undefined; - if (isLength(length) && - (isArray(object) || isString(object) || isArguments(object))) { - return baseTimes(length, String); - } - return null; + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } - module.exports = indexKeys; + module.exports = isObject; -/***/ }, -/* 33 */ -/***/ function(module, exports) { +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + + var coreJsData = __webpack_require__(31); + + /** 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) : ''; + }()); /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. + * Checks if `func` has its source masked. * * @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. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); - } - return result; + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } - module.exports = baseTimes; + module.exports = isMasked; -/***/ }, -/* 34 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { - var isArrayLikeObject = __webpack_require__(35); + var root = __webpack_require__(25); + + /** Used to detect overreaching core-js shims. */ + var coreJsData = root['__core-js_shared__']; + + module.exports = coreJsData; - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]'; + +/***/ }), +/* 32 */ +/***/ (function(module, exports) { /** Used for built-in method references. */ - var objectProto = Object.prototype; + var funcProto = Function.prototype; - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. + * Converts `func` to its source code. + * + * @private + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ - var objectToString = objectProto.toString; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} + } + return ''; + } - /** Built-in value references. */ - var propertyIsEnumerable = objectProto.propertyIsEnumerable; + module.exports = toSource; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { /** - * 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 correctly classified, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true + * Gets the value at `key` of `object`. * - * _.isArguments([1, 2, 3]); - * // => false + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ - function isArguments(value) { - // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); + function getValue(object, key) { + return object == null ? undefined : object[key]; } - module.exports = isArguments; - + module.exports = getValue; -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - var isArrayLike = __webpack_require__(13), - isObjectLike = __webpack_require__(26); +/***/ }), +/* 34 */ +/***/ (function(module, exports) { /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. + * 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 check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. + * @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 * - * _.isArrayLikeObject([1, 2, 3]); - * // => true + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * - * _.isArrayLikeObject(document.body.children); + * _.eq(object, object); * // => true * - * _.isArrayLikeObject('abc'); + * _.eq(object, other); * // => false * - * _.isArrayLikeObject(_.noop); + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); * // => false + * + * _.eq(NaN, NaN); + * // => true */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + function eq(value, other) { + return value === other || (value !== value && other !== other); } - module.exports = isArrayLikeObject; + module.exports = eq; -/***/ }, -/* 36 */ -/***/ function(module, exports) { +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + + var assignValue = __webpack_require__(17), + baseAssignValue = __webpack_require__(18); /** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @type {Function} - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false + * Copies properties of `source` to `object`. * - * _.isArray(_.noop); - * // => false + * @private + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. */ - var isArray = Array.isArray; + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - module.exports = isArray; + var index = -1, + length = props.length; + while (++index < length) { + var key = props[index]; -/***/ }, -/* 37 */ -/***/ function(module, exports, __webpack_require__) { + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - var isArray = __webpack_require__(36), - isObjectLike = __webpack_require__(26); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); + } + } + return object; + } - /** `Object#toString` result references. */ - var stringTag = '[object String]'; + module.exports = copyObject; - /** Used for built-in method references. */ - var objectProto = Object.prototype; + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + + var baseRest = __webpack_require__(37), + isIterateeCall = __webpack_require__(45); /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. + * Creates a function like `_.assign`. + * + * @private + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ - var objectToString = objectProto.toString; + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + + module.exports = createAssigner; + + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + + var identity = __webpack_require__(38), + overRest = __webpack_require__(39), + setToString = __webpack_require__(41); /** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isString('abc'); - * // => true + * The base implementation of `_.rest` which doesn't validate or coerce arguments. * - * _.isString(1); - * // => false + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag); + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); } - module.exports = isString; + module.exports = baseRest; -/***/ }, +/***/ }), /* 38 */ -/***/ function(module, exports, __webpack_require__) { - - var baseIsEqual = __webpack_require__(39); +/***/ (function(module, exports) { /** - * 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 **not** supported. + * This method returns the first argument it receives. * * @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`. + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. * @example * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; + * var object = { 'a': 1 }; * - * _.isEqual(object, other); + * console.log(_.identity(object) === object); * // => true - * - * object === other; - * // => false */ - function isEqual(value, other) { - return baseIsEqual(value, other); + function identity(value) { + return value; } - module.exports = isEqual; + module.exports = identity; -/***/ }, +/***/ }), /* 39 */ -/***/ function(module, exports, __webpack_require__) { - - var baseIsEqualDeep = __webpack_require__(40), - isObject = __webpack_require__(17), - isObjectLike = __webpack_require__(26); - - /** - * 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 {Function} [customizer] The function to customize comparisons. - * @param {boolean} [bitmask] The bitmask of comparison flags. - * The bitmask may be composed of the following flags: - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, customizer, bitmask, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); - } - - module.exports = baseIsEqual; - - -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { - - var Stack = __webpack_require__(41), - equalArrays = __webpack_require__(79), - equalByTag = __webpack_require__(84), - equalObjects = __webpack_require__(89), - getTag = __webpack_require__(90), - isArray = __webpack_require__(36), - isHostObject = __webpack_require__(61), - isTypedArray = __webpack_require__(95); - - /** Used to compose bitmasks for comparison styles. */ - var PARTIAL_COMPARE_FLAG = 2; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object Object]'; - - /** Used for built-in method references. */ - var objectProto = Object.prototype; +/***/ (function(module, exports, __webpack_require__) { - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + var apply = __webpack_require__(40); + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeMax = Math.max; /** - * 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. + * A specialized version of `baseRest` which transforms the rest array. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparisons. - * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. */ - function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); - if (!objIsArr) { - objTag = getTag(object); - objTag = objTag == argsTag ? objectTag : objTag; - } - if (!othIsArr) { - othTag = getTag(other); - othTag = othTag == argsTag ? objectTag : othTag; - } - var objIsObj = objTag == objectTag && !isHostObject(object), - othIsObj = othTag == objectTag && !isHostObject(other), - isSameTag = objTag == othTag; + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; + } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) - : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); - } - if (!(bitmask & PARTIAL_COMPARE_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + module.exports = overRest; - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); - } - } - if (!isSameTag) { - return false; +/***/ }), +/* 40 */ +/***/ (function(module, exports) { + + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); } - stack || (stack = new Stack); - return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + return func.apply(thisArg, args); } - module.exports = baseIsEqualDeep; + module.exports = apply; -/***/ }, +/***/ }), /* 41 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var ListCache = __webpack_require__(42), - stackClear = __webpack_require__(49), - stackDelete = __webpack_require__(50), - stackGet = __webpack_require__(51), - stackHas = __webpack_require__(52), - stackSet = __webpack_require__(53); + var baseSetToString = __webpack_require__(42), + shortOut = __webpack_require__(44); /** - * Creates a stack cache object to store key-value pairs. + * Sets the `toString` method of `func` to return `string`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - function Stack(entries) { - this.__data__ = new ListCache(entries); - } - - // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; + var setToString = shortOut(baseSetToString); - module.exports = Stack; + module.exports = setToString; -/***/ }, +/***/ }), /* 42 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var listCacheClear = __webpack_require__(43), - listCacheDelete = __webpack_require__(44), - listCacheGet = __webpack_require__(46), - listCacheHas = __webpack_require__(47), - listCacheSet = __webpack_require__(48); + var constant = __webpack_require__(43), + defineProperty = __webpack_require__(19), + identity = __webpack_require__(38); /** - * Creates an list cache object. + * The base implementation of `setToString` without support for hot loop shorting. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - function ListCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - 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; + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; - module.exports = ListCache; + module.exports = baseSetToString; -/***/ }, +/***/ }), /* 43 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { /** - * Removes all key-value entries from the list cache. + * Creates a function that returns `value`. * - * @private - * @name clear - * @memberOf ListCache + * @static + * @memberOf _ + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. + * @example + * + * var objects = _.times(2, _.constant({ 'a': 1 })); + * + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] + * + * console.log(objects[0] === objects[1]); + * // => true */ - function listCacheClear() { - this.__data__ = []; + function constant(value) { + return function() { + return value; + }; } - module.exports = listCacheClear; + module.exports = constant; -/***/ }, +/***/ }), /* 44 */ -/***/ function(module, exports, __webpack_require__) { - - var assocIndexOf = __webpack_require__(45); +/***/ (function(module, exports) { - /** Used for built-in method references. */ - var arrayProto = Array.prototype; + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; - /** Built-in value references. */ - var splice = arrayProto.splice; + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeNow = Date.now; /** - * Removes `key` and its value from the list cache. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @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`. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); + function shortOut(func) { + var count = 0, + lastCalled = 0; - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - return true; + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); + + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; + } + } else { + count = 0; + } + return func.apply(undefined, arguments); + }; } - module.exports = listCacheDelete; + module.exports = shortOut; -/***/ }, +/***/ }), /* 45 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var eq = __webpack_require__(9); + var eq = __webpack_require__(34), + isArrayLike = __webpack_require__(46), + isIndex = __webpack_require__(48), + isObject = __webpack_require__(29); /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * Checks if the given arguments are from an iteratee call. * * @private - * @param {Array} array The array to search. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; - } + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; } - return -1; + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } - module.exports = assocIndexOf; + module.exports = isIterateeCall; -/***/ }, +/***/ }), /* 46 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var assocIndexOf = __webpack_require__(45); + var isFunction = __webpack_require__(22), + isLength = __webpack_require__(47); /** - * Gets the list cache value for `key`. + * 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`. * - * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @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 listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); } - module.exports = listCacheGet; + module.exports = isArrayLike; -/***/ }, +/***/ }), /* 47 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { - var assocIndexOf = __webpack_require__(45); + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; /** - * Checks if a list cache value for `key` exists. + * Checks if `value` is a valid array-like length. * - * @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`. + * **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 listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } - module.exports = listCacheHas; + module.exports = isLength; -/***/ }, +/***/ }), /* 48 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { + + /** Used as references for various `Number` constants. */ + var MAX_SAFE_INTEGER = 9007199254740991; - var assocIndexOf = __webpack_require__(45); + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; /** - * Sets the list cache `key` to `value`. + * Checks if `value` is a valid array-like index. * * @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. + * @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 listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; + 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 = listCacheSet; + module.exports = isIndex; -/***/ }, +/***/ }), /* 49 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { - var ListCache = __webpack_require__(42); + /** Used for built-in method references. */ + var objectProto = Object.prototype; /** - * Removes all key-value entries from the stack. + * Checks if `value` is likely a prototype object. * * @private - * @name clear - * @memberOf Stack + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - function stackClear() { - this.__data__ = new ListCache; + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; } - module.exports = stackClear; + module.exports = isPrototype; -/***/ }, +/***/ }), /* 50 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var arrayLikeKeys = __webpack_require__(51), + baseKeys = __webpack_require__(64), + isArrayLike = __webpack_require__(46); /** - * Removes `key` and its value from the stack. + * Creates an array of the own enumerable property names of `object`. * - * @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`. + * **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 stackDelete(key) { - return this.__data__['delete'](key); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } - module.exports = stackDelete; + module.exports = keys; -/***/ }, +/***/ }), /* 51 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var baseTimes = __webpack_require__(52), + isArguments = __webpack_require__(53), + isArray = __webpack_require__(56), + isBuffer = __webpack_require__(57), + isIndex = __webpack_require__(48), + isTypedArray = __webpack_require__(60); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; + + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * Gets the stack value for `key`. + * Creates an array of the enumerable property names of the array-like `value`. * * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. */ - function stackGet(key) { - return this.__data__.get(key); + 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 = stackGet; + module.exports = arrayLikeKeys; -/***/ }, +/***/ }), /* 52 */ -/***/ function(module, exports) { +/***/ (function(module, exports) { /** - * Checks if a stack value for `key` exists. + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. * * @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`. + * @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 stackHas(key) { - return this.__data__.has(key); + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); + + while (++index < n) { + result[index] = iteratee(index); + } + return result; } - module.exports = stackHas; + module.exports = baseTimes; -/***/ }, +/***/ }), /* 53 */ -/***/ function(module, exports, __webpack_require__) { - - var ListCache = __webpack_require__(42), - MapCache = __webpack_require__(54); - - /** 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 cache = this.__data__; - if (cache instanceof ListCache && cache.__data__.length == LARGE_ARRAY_SIZE) { - cache = this.__data__ = new MapCache(cache.__data__); - } - cache.set(key, value); - return this; - } +/***/ (function(module, exports, __webpack_require__) { - module.exports = stackSet; + var baseIsArguments = __webpack_require__(54), + isObjectLike = __webpack_require__(55); + /** Used for built-in method references. */ + var objectProto = Object.prototype; -/***/ }, -/* 54 */ -/***/ function(module, exports, __webpack_require__) { + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; - var mapCacheClear = __webpack_require__(55), - mapCacheDelete = __webpack_require__(73), - mapCacheGet = __webpack_require__(76), - mapCacheHas = __webpack_require__(77), - mapCacheSet = __webpack_require__(78); + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** - * Creates a map cache object to store key-value pairs. + * Checks if `value` is likely an `arguments` object. * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @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 */ - function MapCache(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; - // 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 = isArguments; - module.exports = MapCache; +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 55 */ -/***/ function(module, exports, __webpack_require__) { + var baseGetTag = __webpack_require__(23), + isObjectLike = __webpack_require__(55); - var Hash = __webpack_require__(56), - ListCache = __webpack_require__(42), - Map = __webpack_require__(72); + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]'; /** - * Removes all key-value entries from the map. + * The base implementation of `_.isArguments`. * * @private - * @name clear - * @memberOf MapCache + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ - function mapCacheClear() { - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } - module.exports = mapCacheClear; - + module.exports = baseIsArguments; -/***/ }, -/* 56 */ -/***/ function(module, exports, __webpack_require__) { - var hashClear = __webpack_require__(57), - hashDelete = __webpack_require__(68), - hashGet = __webpack_require__(69), - hashHas = __webpack_require__(70), - hashSet = __webpack_require__(71); +/***/ }), +/* 55 */ +/***/ (function(module, exports) { /** - * Creates a hash object. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @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 Hash(entries) { - var index = -1, - length = entries ? entries.length : 0; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } + function isObjectLike(value) { + return value != null && typeof value == 'object'; } - // 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; - + module.exports = isObjectLike; -/***/ }, -/* 57 */ -/***/ function(module, exports, __webpack_require__) { - var nativeCreate = __webpack_require__(58); +/***/ }), +/* 56 */ +/***/ (function(module, exports) { /** - * Removes all key-value entries from the hash. + * Checks if `value` is classified as an `Array` object. * - * @private - * @name clear - * @memberOf Hash + * @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 */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - } + var isArray = Array.isArray; - module.exports = hashClear; + module.exports = isArray; -/***/ }, -/* 58 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { - var getNative = __webpack_require__(59); + /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(25), + stubFalse = __webpack_require__(59); - /* Built-in method references that are verified to be native. */ - var nativeCreate = getNative(Object, 'create'); + /** Detect free variable `exports`. */ + var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; - module.exports = nativeCreate; + /** 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; -/***/ }, -/* 59 */ -/***/ function(module, exports, __webpack_require__) { + /** Built-in value references. */ + var Buffer = moduleExports ? root.Buffer : undefined; - var baseIsNative = __webpack_require__(60), - getValue = __webpack_require__(67); + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** - * Gets the native function at `key` of `object`. + * Checks if `value` is a buffer. * - * @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`. + * @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 */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; - } + var isBuffer = nativeIsBuffer || stubFalse; - module.exports = getNative; + module.exports = isBuffer; + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module))) -/***/ }, -/* 60 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 58 */ +/***/ (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; + } - var isFunction = __webpack_require__(16), - isHostObject = __webpack_require__(61), - isMasked = __webpack_require__(62), - isObject = __webpack_require__(17), - toSource = __webpack_require__(66); + +/***/ }), +/* 59 */ +/***/ (function(module, exports) { /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). + * This method returns `false`. + * + * @static + * @memberOf _ + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. + * @example + * + * _.times(2, _.stubFalse); + * // => [false, false] */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + function stubFalse() { + return false; + } - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + module.exports = stubFalse; - /** Used for built-in method references. */ - var objectProto = Object.prototype; - /** Used to resolve the decompiled source of functions. */ - var funcToString = Function.prototype.toString; +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + var baseIsTypedArray = __webpack_require__(61), + baseUnary = __webpack_require__(62), + nodeUtil = __webpack_require__(63); - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); + /* Node.js helper references. */ + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** - * The base implementation of `_.isNative` without bad shim checks. + * Checks if `value` is classified as a typed array. * - * @private + * @static + * @memberOf _ + * @since 3.0.0 + * @category Lang * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @example + * + * _.isTypedArray(new Uint8Array); + * // => true + * + * _.isTypedArray([]); + * // => false */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); - } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; - module.exports = baseIsNative; + module.exports = isTypedArray; -/***/ }, +/***/ }), /* 61 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var baseGetTag = __webpack_require__(23), + isLength = __webpack_require__(47), + isObjectLike = __webpack_require__(55); + + /** `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; /** - * Checks if `value` is a host object in IE < 9. + * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a host object, else `false`. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ - function isHostObject(value) { - // Many host objects are `Object` objects that can coerce to strings - // despite having improperly defined `toString` methods. - var result = false; - if (value != null && typeof value.toString != 'function') { - try { - result = !!(value + ''); - } catch (e) {} - } - return result; + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } - module.exports = isHostObject; + module.exports = baseIsTypedArray; -/***/ }, +/***/ }), /* 62 */ -/***/ function(module, exports, __webpack_require__) { - - var coreJsData = __webpack_require__(63); - - /** 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) : ''; - }()); +/***/ (function(module, exports) { /** - * Checks if `func` has its source masked. + * The base implementation of `_.unary` without support for storing metadata. * * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); + function baseUnary(func) { + return function(value) { + return func(value); + }; } - module.exports = isMasked; + module.exports = baseUnary; -/***/ }, +/***/ }), /* 63 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var root = __webpack_require__(64); - - /** Used to detect overreaching core-js shims. */ - var coreJsData = root['__core-js_shared__']; + /* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(26); - module.exports = coreJsData; + /** 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; -/***/ }, -/* 64 */ -/***/ function(module, exports, __webpack_require__) { + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; - /* WEBPACK VAR INJECTION */(function(global) {var checkGlobal = __webpack_require__(65); + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; - /** Detect free variable `global` from Node.js. */ - var freeGlobal = checkGlobal(typeof global == 'object' && global); + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); - /** Detect free variable `self`. */ - var freeSelf = checkGlobal(typeof self == 'object' && self); + module.exports = nodeUtil; - /** Detect `this` as the global object. */ - var thisGlobal = checkGlobal(typeof this == 'object' && this); + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(58)(module))) - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || thisGlobal || Function('return this')(); +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { - module.exports = root; + var isPrototype = __webpack_require__(49), + nativeKeys = __webpack_require__(65); - /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) + /** Used for built-in method references. */ + var objectProto = Object.prototype; -/***/ }, -/* 65 */ -/***/ function(module, exports) { + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * Checks if `value` is a global object. + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ - function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; + 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 = checkGlobal; + module.exports = baseKeys; -/***/ }, -/* 66 */ -/***/ function(module, exports) { +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + + var overArg = __webpack_require__(66); + + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeKeys = overArg(Object.keys, Object); + + module.exports = nativeKeys; - /** Used to resolve the decompiled source of functions. */ - var funcToString = Function.prototype.toString; + +/***/ }), +/* 66 */ +/***/ (function(module, exports) { /** - * Converts `func` to its source code. + * Creates a unary function that invokes `func` with its argument transformed. * * @private - * @param {Function} func The function to process. - * @returns {string} Returns the source code. + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; } - module.exports = toSource; + module.exports = overArg; -/***/ }, +/***/ }), /* 67 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var baseIsEqual = __webpack_require__(68); /** - * Gets the value at `key` of `object`. + * Performs a deep comparison between two values to determine if they are + * equivalent. * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * **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 getValue(object, key) { - return object == null ? undefined : object[key]; + function isEqual(value, other) { + return baseIsEqual(value, other); } - module.exports = getValue; + module.exports = isEqual; -/***/ }, +/***/ }), /* 68 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var baseIsEqualDeep = __webpack_require__(69), + isObjectLike = __webpack_require__(55); /** - * Removes `key` and its value from the hash. + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. * * @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`. + * @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 hashDelete(key) { - return this.has(key) && delete this.__data__[key]; + 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 = hashDelete; + module.exports = baseIsEqual; -/***/ }, +/***/ }), /* 69 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var nativeCreate = __webpack_require__(58); + var Stack = __webpack_require__(70), + equalArrays = __webpack_require__(99), + equalByTag = __webpack_require__(105), + equalObjects = __webpack_require__(109), + getTag = __webpack_require__(116), + isArray = __webpack_require__(56), + isBuffer = __webpack_require__(57), + isTypedArray = __webpack_require__(60); - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** 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; @@ -2598,1956 +3371,1880 @@ return /******/ (function(modules) { // webpackBootstrap var hasOwnProperty = objectProto.hasOwnProperty; /** - * Gets the hash value for `key`. + * 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 - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @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 hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; + 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; } - return hasOwnProperty.call(data, key) ? data[key] : undefined; - } + 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__'); - module.exports = hashGet; + 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); + } -/***/ }, -/* 70 */ -/***/ function(module, exports, __webpack_require__) { + module.exports = baseIsEqualDeep; - var nativeCreate = __webpack_require__(58); - /** Used for built-in method references. */ - var objectProto = Object.prototype; +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + var ListCache = __webpack_require__(71), + stackClear = __webpack_require__(78), + stackDelete = __webpack_require__(79), + stackGet = __webpack_require__(80), + stackHas = __webpack_require__(81), + stackSet = __webpack_require__(82); /** - * Checks if a hash value for `key` exists. + * Creates a stack cache object to store key-value pairs. * * @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`. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key); + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; } - module.exports = hashHas; + // 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; -/***/ }, -/* 71 */ -/***/ function(module, exports, __webpack_require__) { - var nativeCreate = __webpack_require__(58); +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + var listCacheClear = __webpack_require__(72), + listCacheDelete = __webpack_require__(73), + listCacheGet = __webpack_require__(75), + listCacheHas = __webpack_require__(76), + listCacheSet = __webpack_require__(77); /** - * Sets the hash `key` to `value`. + * Creates an list cache object. * * @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. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ - function hashSet(key, value) { - var data = this.__data__; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; + 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]); + } } - module.exports = hashSet; + // 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; -/***/ }, +/***/ }), /* 72 */ -/***/ function(module, exports, __webpack_require__) { - - var getNative = __webpack_require__(59), - root = __webpack_require__(64); +/***/ (function(module, exports) { - /* Built-in method references that are verified to be native. */ - var Map = getNative(root, 'Map'); + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } - module.exports = Map; + module.exports = listCacheClear; -/***/ }, +/***/ }), /* 73 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(74); + + /** Used for built-in method references. */ + var arrayProto = Array.prototype; - var getMapData = __webpack_require__(74); + /** Built-in value references. */ + var splice = arrayProto.splice; /** - * Removes `key` and its value from the map. + * Removes `key` and its value from the list cache. * * @private * @name delete - * @memberOf MapCache + * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - function mapCacheDelete(key) { - return getMapData(this, key)['delete'](key); + 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 = mapCacheDelete; + module.exports = listCacheDelete; -/***/ }, +/***/ }), /* 74 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var isKeyable = __webpack_require__(75); + var eq = __webpack_require__(34); /** - * Gets the data for `map`. + * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @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 getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; } - module.exports = getMapData; + module.exports = assocIndexOf; -/***/ }, +/***/ }), /* 75 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var assocIndexOf = __webpack_require__(74); /** - * Checks if `value` is suitable for use as unique object key. + * Gets the list cache value for `key`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); + + return index < 0 ? undefined : data[index][1]; } - module.exports = isKeyable; + module.exports = listCacheGet; -/***/ }, +/***/ }), /* 76 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var getMapData = __webpack_require__(74); + var assocIndexOf = __webpack_require__(74); /** - * Gets the map value for `key`. + * Checks if a list cache value for `key` exists. * * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @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 mapCacheGet(key) { - return getMapData(this, key).get(key); + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; } - module.exports = mapCacheGet; + module.exports = listCacheHas; -/***/ }, +/***/ }), /* 77 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var getMapData = __webpack_require__(74); + var assocIndexOf = __webpack_require__(74); /** - * Checks if a map value for `key` exists. + * Sets the list cache `key` to `value`. * * @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`. + * @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 mapCacheHas(key) { - return getMapData(this, key).has(key); + 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 = mapCacheHas; + module.exports = listCacheSet; -/***/ }, +/***/ }), /* 78 */ -/***/ function(module, exports, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { - var getMapData = __webpack_require__(74); + var ListCache = __webpack_require__(71); /** - * Sets the map `key` to `value`. + * Removes all key-value entries from the stack. * * @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. + * @name clear + * @memberOf Stack */ - function mapCacheSet(key, value) { - getMapData(this, key).set(key, value); - return this; + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; } - module.exports = mapCacheSet; + module.exports = stackClear; -/***/ }, +/***/ }), /* 79 */ -/***/ function(module, exports, __webpack_require__) { - - var SetCache = __webpack_require__(80), - arraySome = __webpack_require__(83); - - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; +/***/ (function(module, exports) { /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. + * Removes `key` and its value from the stack. * * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * @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 equalArrays(array, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_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) { - return stacked == other; - } - var index = -1, - result = true, - seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - 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 (!seen.has(othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { - return seen.add(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, customizer, bitmask, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); + this.size = data.size; return result; } - module.exports = equalArrays; + module.exports = stackDelete; -/***/ }, +/***/ }), /* 80 */ -/***/ function(module, exports, __webpack_require__) { - - var MapCache = __webpack_require__(54), - setCacheAdd = __webpack_require__(81), - setCacheHas = __webpack_require__(82); +/***/ (function(module, exports) { /** - * - * Creates an array cache object to store unique values. + * Gets the stack value for `key`. * * @private - * @constructor - * @param {Array} [values] The values to cache. + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function SetCache(values) { - var index = -1, - length = values ? values.length : 0; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } + function stackGet(key) { + return this.__data__.get(key); } - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - - module.exports = SetCache; + module.exports = stackGet; -/***/ }, +/***/ }), /* 81 */ -/***/ function(module, exports) { - - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/***/ (function(module, exports) { /** - * Adds `value` to the array cache. + * Checks if a stack value for `key` exists. * * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. + * @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 setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; + function stackHas(key) { + return this.__data__.has(key); } - module.exports = setCacheAdd; + module.exports = stackHas; -/***/ }, +/***/ }), /* 82 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var ListCache = __webpack_require__(71), + Map = __webpack_require__(83), + MapCache = __webpack_require__(84); + + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; /** - * Checks if `value` is in the array cache. + * Sets the stack `key` to `value`. * * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @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 setCacheHas(value) { - return this.__data__.has(value); + 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 = setCacheHas; + module.exports = stackSet; -/***/ }, +/***/ }), /* 83 */ -/***/ function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(20), + root = __webpack_require__(25); + + /* Built-in method references that are verified to be native. */ + var Map = getNative(root, 'Map'); + + module.exports = Map; + + +/***/ }), +/* 84 */ +/***/ (function(module, exports, __webpack_require__) { + + var mapCacheClear = __webpack_require__(85), + mapCacheDelete = __webpack_require__(93), + mapCacheGet = __webpack_require__(96), + mapCacheHas = __webpack_require__(97), + mapCacheSet = __webpack_require__(98); /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. + * Creates a map cache object to store key-value pairs. * * @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`. + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ - function arraySome(array, predicate) { + function MapCache(entries) { var index = -1, - length = array ? array.length : 0; + length = entries == null ? 0 : entries.length; + this.clear(); while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } + var entry = entries[index]; + this.set(entry[0], entry[1]); } - return false; } - module.exports = arraySome; - - -/***/ }, -/* 84 */ -/***/ function(module, exports, __webpack_require__) { - - var Symbol = __webpack_require__(85), - Uint8Array = __webpack_require__(86), - equalArrays = __webpack_require__(79), - mapToArray = __webpack_require__(87), - setToArray = __webpack_require__(88); + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; + module.exports = MapCache; - /** `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]'; +/***/ }), +/* 85 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + var Hash = __webpack_require__(86), + ListCache = __webpack_require__(71), + Map = __webpack_require__(83); /** - * 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`. + * Removes all key-value entries from the map. * * @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 {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @name clear + * @memberOf MapCache */ - function equalByTag(object, other, tag, equalFunc, customizer, bitmask, 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: - // Coerce dates and booleans to numbers, dates to milliseconds and - // booleans to `1` or `0` treating invalid dates coerced to `NaN` as - // not equal. - return +object == +other; - - case errorTag: - return object.name == other.name && object.message == other.message; - - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) ? other != +other : object == +other; + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/6.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); + module.exports = mapCacheClear; - case mapTag: - var convert = mapToArray; - case setTag: - var isPartial = bitmask & PARTIAL_COMPARE_FLAG; - convert || (convert = setToArray); +/***/ }), +/* 86 */ +/***/ (function(module, exports, __webpack_require__) { - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= UNORDERED_COMPARE_FLAG; - stack.set(object, other); + var hashClear = __webpack_require__(87), + hashDelete = __webpack_require__(89), + hashGet = __webpack_require__(90), + hashHas = __webpack_require__(91), + hashSet = __webpack_require__(92); - // Recursively compare objects (susceptible to call stack limits). - return equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + /** + * 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; - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } - return false; } - module.exports = equalByTag; + // 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; -/***/ }, -/* 85 */ -/***/ function(module, exports, __webpack_require__) { - var root = __webpack_require__(64); +/***/ }), +/* 87 */ +/***/ (function(module, exports, __webpack_require__) { - /** Built-in value references. */ - var Symbol = root.Symbol; + var nativeCreate = __webpack_require__(88); - module.exports = Symbol; + /** + * 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; -/***/ }, -/* 86 */ -/***/ function(module, exports, __webpack_require__) { - var root = __webpack_require__(64); +/***/ }), +/* 88 */ +/***/ (function(module, exports, __webpack_require__) { - /** Built-in value references. */ - var Uint8Array = root.Uint8Array; + var getNative = __webpack_require__(20); - module.exports = Uint8Array; + /* Built-in method references that are verified to be native. */ + var nativeCreate = getNative(Object, 'create'); + + module.exports = nativeCreate; -/***/ }, -/* 87 */ -/***/ function(module, exports) { +/***/ }), +/* 89 */ +/***/ (function(module, exports) { /** - * Converts `map` to its key-value pairs. + * Removes `key` and its value from the hash. * * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. + * @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 mapToArray(map) { - var index = -1, - result = Array(map.size); - - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; return result; } - module.exports = mapToArray; + module.exports = hashDelete; -/***/ }, -/* 88 */ -/***/ function(module, exports) { +/***/ }), +/* 90 */ +/***/ (function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(88); + + /** 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; /** - * Converts `set` to an array of its values. + * Gets the hash value for `key`. * * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; + 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 = setToArray; + module.exports = hashGet; -/***/ }, -/* 89 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 91 */ +/***/ (function(module, exports, __webpack_require__) { + + var nativeCreate = __webpack_require__(88); - var baseHas = __webpack_require__(29), - keys = __webpack_require__(28); + /** Used for built-in method references. */ + var objectProto = Object.prototype; - /** Used to compose bitmasks for comparison styles. */ - var PARTIAL_COMPARE_FLAG = 2; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * Checks if a hash value for `key` exists. * * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} customizer The function to customize comparisons. - * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual` - * for more details. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @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 equalObjects(object, other, equalFunc, customizer, bitmask, stack) { - var isPartial = bitmask & PARTIAL_COMPARE_FLAG, - objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : baseHas(other, key))) { - return false; - } - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - var result = true; - stack.set(object, other); + module.exports = hashHas; - 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, customizer, bitmask, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; +/***/ }), +/* 92 */ +/***/ (function(module, exports, __webpack_require__) { - // 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); - return result; + var nativeCreate = __webpack_require__(88); + + /** 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 = equalObjects; + module.exports = hashSet; -/***/ }, -/* 90 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 93 */ +/***/ (function(module, exports, __webpack_require__) { - var DataView = __webpack_require__(91), - Map = __webpack_require__(72), - Promise = __webpack_require__(92), - Set = __webpack_require__(93), - WeakMap = __webpack_require__(94), - toSource = __webpack_require__(66); + var getMapData = __webpack_require__(94); - /** `Object#toString` result references. */ - var mapTag = '[object Map]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - setTag = '[object Set]', - weakMapTag = '[object WeakMap]'; + /** + * 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; + } - var dataViewTag = '[object DataView]'; + module.exports = mapCacheDelete; - /** Used for built-in method references. */ - var objectProto = Object.prototype; + +/***/ }), +/* 94 */ +/***/ (function(module, exports, __webpack_require__) { + + var isKeyable = __webpack_require__(95); /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. + * Gets the data for `map`. + * + * @private + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ - var objectToString = objectProto.toString; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; + } - /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); + module.exports = getMapData; + + +/***/ }), +/* 95 */ +/***/ (function(module, exports) { /** - * Gets the `toStringTag` of `value`. + * Checks if `value` is suitable for use as unique object key. * * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function getTag(value) { - return objectToString.call(value); + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } - // Fallback for data views, maps, sets, and weak maps in IE 11, - // for data views in Edge, and promises in Node.js. - 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 = objectToString.call(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : undefined; - - 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 = isKeyable; - module.exports = getTag; +/***/ }), +/* 96 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 91 */ -/***/ function(module, exports, __webpack_require__) { + var getMapData = __webpack_require__(94); - var getNative = __webpack_require__(59), - root = __webpack_require__(64); + /** + * 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); + } - /* Built-in method references that are verified to be native. */ - var DataView = getNative(root, 'DataView'); + module.exports = mapCacheGet; - module.exports = DataView; +/***/ }), +/* 97 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 92 */ -/***/ function(module, exports, __webpack_require__) { + var getMapData = __webpack_require__(94); - var getNative = __webpack_require__(59), - root = __webpack_require__(64); + /** + * 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); + } - /* Built-in method references that are verified to be native. */ - var Promise = getNative(root, 'Promise'); + module.exports = mapCacheHas; - module.exports = Promise; +/***/ }), +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 93 */ -/***/ function(module, exports, __webpack_require__) { + var getMapData = __webpack_require__(94); - var getNative = __webpack_require__(59), - root = __webpack_require__(64); + /** + * 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; - /* Built-in method references that are verified to be native. */ - var Set = getNative(root, 'Set'); + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } - module.exports = Set; + module.exports = mapCacheSet; -/***/ }, -/* 94 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 99 */ +/***/ (function(module, exports, __webpack_require__) { - var getNative = __webpack_require__(59), - root = __webpack_require__(64); + var SetCache = __webpack_require__(100), + arraySome = __webpack_require__(103), + cacheHas = __webpack_require__(104); - /* Built-in method references that are verified to be native. */ - var WeakMap = getNative(root, 'WeakMap'); + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - module.exports = WeakMap; + /** + * 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; -/***/ }, -/* 95 */ -/***/ function(module, exports, __webpack_require__) { + stack.set(array, other); + stack.set(other, array); - var isLength = __webpack_require__(18), - isObjectLike = __webpack_require__(26); + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; - /** `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]'; + 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; + } - 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]'; + module.exports = equalArrays; - /** 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; - /** Used for built-in method references. */ - var objectProto = Object.prototype; +/***/ }), +/* 100 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; + var MapCache = __webpack_require__(84), + setCacheAdd = __webpack_require__(101), + setCacheHas = __webpack_require__(102); /** - * 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 correctly classified, - * else `false`. - * @example * - * _.isTypedArray(new Uint8Array); - * // => true + * Creates an array cache object to store unique values. * - * _.isTypedArray([]); - * // => false + * @private + * @constructor + * @param {Array} [values] The values to cache. */ - function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; - } - - module.exports = isTypedArray; + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } -/***/ }, -/* 96 */ -/***/ function(module, exports, __webpack_require__) { + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; - var isObjectLike = __webpack_require__(26); + module.exports = SetCache; - /** `Object#toString` result references. */ - var boolTag = '[object Boolean]'; - /** Used for built-in method references. */ - var objectProto = Object.prototype; +/***/ }), +/* 101 */ +/***/ (function(module, exports) { - /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ - var objectToString = objectProto.toString; + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** - * Checks if `value` is classified as a boolean primitive or object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isBoolean(false); - * // => true + * Adds `value` to the array cache. * - * _.isBoolean(null); - * // => false + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && objectToString.call(value) == boolTag); + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; } - module.exports = isBoolean; - + module.exports = setCacheAdd; -/***/ }, -/* 97 */ -/***/ function(module, exports, __webpack_require__) { - var arrayEach = __webpack_require__(98), - baseEach = __webpack_require__(99), - baseIteratee = __webpack_require__(104), - isArray = __webpack_require__(36); +/***/ }), +/* 102 */ +/***/ (function(module, exports) { /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight - * @example - * - * _([1, 2]).forEach(function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. + * Checks if `value` is in the array cache. * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. */ - function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, baseIteratee(iteratee, 3)); + function setCacheHas(value) { + return this.__data__.has(value); } - module.exports = forEach; + module.exports = setCacheHas; -/***/ }, -/* 98 */ -/***/ function(module, exports) { +/***/ }), +/* 103 */ +/***/ (function(module, exports) { /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. + * A specialized version of `_.some` 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 `array`. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ - function arrayEach(array, iteratee) { + function arraySome(array, predicate) { var index = -1, - length = array ? array.length : 0; + length = array == null ? 0 : array.length; while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; + if (predicate(array[index], index, array)) { + return true; } } - return array; + return false; } - module.exports = arrayEach; - - -/***/ }, -/* 99 */ -/***/ function(module, exports, __webpack_require__) { - - var baseForOwn = __webpack_require__(100), - createBaseEach = __webpack_require__(103); - - /** - * 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; - + module.exports = arraySome; -/***/ }, -/* 100 */ -/***/ function(module, exports, __webpack_require__) { - var baseFor = __webpack_require__(101), - keys = __webpack_require__(28); +/***/ }), +/* 104 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * Checks if a `cache` value for `key` exists. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @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 baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); + function cacheHas(cache, key) { + return cache.has(key); } - module.exports = baseForOwn; + module.exports = cacheHas; -/***/ }, -/* 101 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 105 */ +/***/ (function(module, exports, __webpack_require__) { - var createBaseFor = __webpack_require__(102); + var Symbol = __webpack_require__(24), + Uint8Array = __webpack_require__(106), + eq = __webpack_require__(34), + equalArrays = __webpack_require__(99), + mapToArray = __webpack_require__(107), + setToArray = __webpack_require__(108); - /** - * 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(); + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; - module.exports = baseFor; + /** `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]'; -/***/ }, -/* 102 */ -/***/ function(module, exports) { + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * 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 {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @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 createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; + 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; - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; } - } - return object; - }; - } + return true; - module.exports = createBaseFor; + 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; -/***/ }, -/* 103 */ -/***/ function(module, exports, __webpack_require__) { + 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 + ''); - var isArrayLike = __webpack_require__(13); + case mapTag: + var convert = mapToArray; - /** - * 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); + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; + 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 collection; - }; + } + return false; } - module.exports = createBaseEach; + module.exports = equalByTag; -/***/ }, -/* 104 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 106 */ +/***/ (function(module, exports, __webpack_require__) { + + var root = __webpack_require__(25); + + /** Built-in value references. */ + var Uint8Array = root.Uint8Array; + + module.exports = Uint8Array; + - var baseMatches = __webpack_require__(105), - baseMatchesProperty = __webpack_require__(110), - identity = __webpack_require__(123), - isArray = __webpack_require__(36), - property = __webpack_require__(124); +/***/ }), +/* 107 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.iteratee`. + * Converts `map` to its key-value pairs. * * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. */ - 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); - } + function mapToArray(map) { + var index = -1, + result = Array(map.size); - module.exports = baseIteratee; + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + module.exports = mapToArray; -/***/ }, -/* 105 */ -/***/ function(module, exports, __webpack_require__) { - var baseIsMatch = __webpack_require__(106), - getMatchData = __webpack_require__(107), - matchesStrictComparable = __webpack_require__(109); +/***/ }), +/* 108 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.matches` which doesn't clone `source`. + * Converts `set` to an array of its values. * * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. */ - 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); - }; + function setToArray(set) { + var index = -1, + result = Array(set.size); + + set.forEach(function(value) { + result[++index] = value; + }); + return result; } - module.exports = baseMatches; + module.exports = setToArray; -/***/ }, -/* 106 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + + var getAllKeys = __webpack_require__(110); - var Stack = __webpack_require__(41), - baseIsEqual = __webpack_require__(39); + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1; + + /** Used for built-in method references. */ + var objectProto = Object.prototype; - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * * @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`. + * @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 baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; + 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 (object == null) { - return !length; + if (objLength != othLength && !isPartial) { + return false; } - object = Object(object); + var index = objLength; while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; + // 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); - 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, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) - : result - )) { - return false; - } + 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'); } - return true; + 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 = baseIsMatch; + module.exports = equalObjects; -/***/ }, -/* 107 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 110 */ +/***/ (function(module, exports, __webpack_require__) { - var isStrictComparable = __webpack_require__(108), - keys = __webpack_require__(28); + var baseGetAllKeys = __webpack_require__(111), + getSymbols = __webpack_require__(113), + keys = __webpack_require__(50); /** - * Gets the property names, values, and compare flags of `object`. + * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @returns {Array} Returns the array of property names and symbols. */ - 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; + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } - module.exports = getMatchData; + module.exports = getAllKeys; -/***/ }, -/* 108 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 111 */ +/***/ (function(module, exports, __webpack_require__) { - var isObject = __webpack_require__(17); + var arrayPush = __webpack_require__(112), + isArray = __webpack_require__(56); /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. + * @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 isStrictComparable(value) { - return value === value && !isObject(value); + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } - module.exports = isStrictComparable; + module.exports = baseGetAllKeys; -/***/ }, -/* 109 */ -/***/ function(module, exports) { +/***/ }), +/* 112 */ +/***/ (function(module, exports) { /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. + * Appends the elements of `values` to `array`. * * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. */ - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; + 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 = matchesStrictComparable; + module.exports = arrayPush; -/***/ }, -/* 110 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 113 */ +/***/ (function(module, exports, __webpack_require__) { + + var arrayFilter = __webpack_require__(114), + stubArray = __webpack_require__(115); + + /** Used for built-in method references. */ + var objectProto = Object.prototype; - var baseIsEqual = __webpack_require__(39), - get = __webpack_require__(111), - hasIn = __webpack_require__(120), - isKey = __webpack_require__(118), - isStrictComparable = __webpack_require__(108), - matchesStrictComparable = __webpack_require__(109), - toKey = __webpack_require__(119); + /** Built-in value references. */ + var propertyIsEnumerable = objectProto.propertyIsEnumerable; - /** Used to compose bitmasks for comparison styles. */ - var UNORDERED_COMPARE_FLAG = 1, - PARTIAL_COMPARE_FLAG = 2; + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeGetSymbols = Object.getOwnPropertySymbols; /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * Creates an array of the own enumerable symbols of `object`. * * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); - }; - } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; - module.exports = baseMatchesProperty; + module.exports = getSymbols; -/***/ }, -/* 111 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 114 */ +/***/ (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; - var baseGet = __webpack_require__(112); + +/***/ }), +/* 115 */ +/***/ (function(module, exports) { /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is used in its place. + * This method returns a new empty array. * * @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. + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; - * - * _.get(object, 'a[0].b.c'); - * // => 3 + * var arrays = _.times(2, _.stubArray); * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 + * console.log(arrays); + * // => [[], []] * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' + * console.log(arrays[0] === arrays[1]); + * // => false */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; + function stubArray() { + return []; } - module.exports = get; + module.exports = stubArray; -/***/ }, -/* 112 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 116 */ +/***/ (function(module, exports, __webpack_require__) { + + var DataView = __webpack_require__(117), + Map = __webpack_require__(83), + Promise = __webpack_require__(118), + Set = __webpack_require__(119), + WeakMap = __webpack_require__(120), + baseGetTag = __webpack_require__(23), + toSource = __webpack_require__(32); - var castPath = __webpack_require__(113), - isKey = __webpack_require__(118), - toKey = __webpack_require__(119); + /** `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); /** - * The base implementation of `_.get` without support for default values. + * Gets the `toStringTag` of `value`. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ - function baseGet(object, path) { - path = isKey(path, object) ? [path] : castPath(path); + var getTag = baseGetTag; - var index = 0, - length = path.length; + // 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) : ''; - while (object != null && index < length) { - object = object[toKey(path[index++])]; - } - return (index && index == length) ? object : undefined; + 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 = baseGet; + module.exports = getTag; -/***/ }, -/* 113 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(36), - stringToPath = __webpack_require__(114); + var getNative = __webpack_require__(20), + root = __webpack_require__(25); - /** - * Casts `value` to a path array if it's not one. - * - * @private - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast property path array. - */ - function castPath(value) { - return isArray(value) ? value : stringToPath(value); - } + /* Built-in method references that are verified to be native. */ + var DataView = getNative(root, 'DataView'); + + module.exports = DataView; + + +/***/ }), +/* 118 */ +/***/ (function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(20), + root = __webpack_require__(25); + + /* Built-in method references that are verified to be native. */ + var Promise = getNative(root, 'Promise'); + + module.exports = Promise; - module.exports = castPath; +/***/ }), +/* 119 */ +/***/ (function(module, exports, __webpack_require__) { + + var getNative = __webpack_require__(20), + root = __webpack_require__(25); + + /* Built-in method references that are verified to be native. */ + var Set = getNative(root, 'Set'); -/***/ }, -/* 114 */ -/***/ function(module, exports, __webpack_require__) { + module.exports = Set; - var memoize = __webpack_require__(115), - toString = __webpack_require__(116); - /** Used to match property names within property paths. */ - var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g; +/***/ }), +/* 120 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; + var getNative = __webpack_require__(20), + root = __webpack_require__(25); - /** - * Converts `string` to a property path array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoize(function(string) { - var result = []; - toString(string).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - }); + /* Built-in method references that are verified to be native. */ + var WeakMap = getNative(root, 'WeakMap'); - module.exports = stringToPath; + module.exports = WeakMap; -/***/ }, -/* 115 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 121 */ +/***/ (function(module, exports, __webpack_require__) { - var MapCache = __webpack_require__(54); + var baseGetTag = __webpack_require__(23), + isObjectLike = __webpack_require__(55); - /** Used as the `TypeError` message for "Functions" methods. */ - var FUNC_ERROR_TEXT = 'Expected a function'; + /** `Object#toString` result references. */ + var boolTag = '[object Boolean]'; /** - * 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/6.0/#sec-properties-of-the-map-prototype-object) - * method interface of `delete`, `get`, `has`, and `set`. + * Checks if `value` is classified as a boolean primitive or object. * * @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. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @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'] + * _.isBoolean(false); + * // => true * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; + * _.isBoolean(null); + * // => false */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver && 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); - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); } - // Assign cache to `_.memoize`. - memoize.Cache = MapCache; - - module.exports = memoize; + module.exports = isBoolean; -/***/ }, -/* 116 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { - var baseToString = __webpack_require__(117); + var arrayEach = __webpack_require__(123), + baseEach = __webpack_require__(124), + castFunction = __webpack_require__(129), + isArray = __webpack_require__(56); /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. * - * _.toString([1, 2, 3]); - * // => '1,2,3' + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ - function toString(value) { - return value == null ? '' : baseToString(value); + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, castFunction(iteratee)); } - module.exports = toString; - - -/***/ }, -/* 117 */ -/***/ function(module, exports, __webpack_require__) { - - var Symbol = __webpack_require__(85), - isSymbol = __webpack_require__(25); + module.exports = forEach; - /** 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; +/***/ }), +/* 123 */ +/***/ (function(module, exports) { /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. * * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; + + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return array; } - module.exports = baseToString; - + module.exports = arrayEach; -/***/ }, -/* 118 */ -/***/ function(module, exports, __webpack_require__) { - var isArray = __webpack_require__(36), - isSymbol = __webpack_require__(25); +/***/ }), +/* 124 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; + var baseForOwn = __webpack_require__(125), + createBaseEach = __webpack_require__(128); /** - * Checks if `value` is a property name and not a property path. + * The base implementation of `_.forEach` without support for iteratee shorthands. * * @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`. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. */ - 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; + var baseEach = createBaseEach(baseForOwn); + module.exports = baseEach; -/***/ }, -/* 119 */ -/***/ function(module, exports, __webpack_require__) { - var isSymbol = __webpack_require__(25); +/***/ }), +/* 125 */ +/***/ (function(module, exports, __webpack_require__) { - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0; + var baseFor = __webpack_require__(126), + keys = __webpack_require__(50); /** - * Converts `value` to a string key if it's not a string or symbol. + * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } - module.exports = toKey; - - -/***/ }, -/* 120 */ -/***/ function(module, exports, __webpack_require__) { - - var baseHasIn = __webpack_require__(121), - hasPath = __webpack_require__(122); - - /** - * 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 = baseForOwn; - module.exports = hasIn; +/***/ }), +/* 126 */ +/***/ (function(module, exports, __webpack_require__) { -/***/ }, -/* 121 */ -/***/ function(module, exports) { + var createBaseFor = __webpack_require__(127); /** - * The base implementation of `_.hasIn` without support for deep paths. + * 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 query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @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`. */ - function baseHasIn(object, key) { - return object != null && key in Object(object); - } - - module.exports = baseHasIn; + var baseFor = createBaseFor(); + module.exports = baseFor; -/***/ }, -/* 122 */ -/***/ function(module, exports, __webpack_require__) { - var castPath = __webpack_require__(113), - isArguments = __webpack_require__(34), - isArray = __webpack_require__(36), - isIndex = __webpack_require__(19), - isKey = __webpack_require__(118), - isLength = __webpack_require__(18), - isString = __webpack_require__(37), - toKey = __webpack_require__(119); +/***/ }), +/* 127 */ +/***/ (function(module, exports) { /** - * Checks if `path` exists on `object`. + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @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`. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ - function hasPath(object, path, hasFunc) { - path = isKey(path, object) ? [path] : castPath(path); - - var result, - index = -1, - length = path.length; + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } } - object = object[key]; - } - if (result) { - return result; - } - var length = object ? object.length : 0; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isString(object) || isArguments(object)); - } - - module.exports = hasPath; - - -/***/ }, -/* 123 */ -/***/ function(module, exports) { - - /** - * This method returns the first argument given to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; + return object; + }; } - module.exports = identity; + module.exports = createBaseFor; -/***/ }, -/* 124 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 128 */ +/***/ (function(module, exports, __webpack_require__) { - var baseProperty = __webpack_require__(15), - basePropertyDeep = __webpack_require__(125), - isKey = __webpack_require__(118), - toKey = __webpack_require__(119); + var isArrayLike = __webpack_require__(46); /** - * 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] + * Creates a `baseEach` or `baseEachRight` function. * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] + * @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 property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + 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 = property; + module.exports = createBaseEach; -/***/ }, -/* 125 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 129 */ +/***/ (function(module, exports, __webpack_require__) { - var baseGet = __webpack_require__(112); + var identity = __webpack_require__(38); /** - * A specialized version of `baseProperty` which supports deep paths. + * Casts `value` to `identity` if it's not a function. * * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. */ - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; + function castFunction(value) { + return typeof value == 'function' ? value : identity; } - module.exports = basePropertyDeep; + module.exports = castFunction; -/***/ }, -/* 126 */ -/***/ function(module, exports, __webpack_require__) { +/***/ }), +/* 130 */ +/***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__;/*global define:false */ /** - * Copyright 2015 Craig Campbell + * Copyright 2012-2017 Craig Campbell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -4564,11 +5261,16 @@ return /******/ (function(modules) { // webpackBootstrap * Mousetrap is a simple keyboard shortcut library for Javascript with * no external dependencies * - * @version 1.5.3 + * @version 1.6.1 * @url craig.is/killing/mice */ (function(window, document, undefined) { + // Check if mousetrap is used inside browser, if not, return + if (!window) { + return; + } + /** * mapping of special keycodes to their corresponding keys * @@ -4698,7 +5400,13 @@ return /******/ (function(modules) { // webpackBootstrap * loop through to map numbers on the numeric keypad */ for (i = 0; i <= 9; ++i) { - _MAP[i + 96] = i; + + // This needs to use a string cause otherwise since 0 is falsey + // mousetrap will never fire for numpad 0 pressed as part of a keydown + // event. + // + // @see https://github.com/ccampbell/mousetrap/pull/258 + _MAP[i + 96] = i.toString(); } /** @@ -5530,6 +6238,18 @@ return /******/ (function(modules) { // webpackBootstrap return self._handleKey.apply(self, arguments); }; + /** + * allow custom key mappings + */ + Mousetrap.addKeycodes = function(object) { + for (var key in object) { + if (object.hasOwnProperty(key)) { + _MAP[key] = object[key]; + } + } + _REVERSE_MAP = null; + }; + /** * Init the global mousetrap functions * @@ -5565,10 +6285,10 @@ return /******/ (function(modules) { // webpackBootstrap return Mousetrap; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } - }) (window, document); + }) (typeof window !== 'undefined' ? window : null, typeof window !== 'undefined' ? document : null); -/***/ } +/***/ }) /******/ ]) }); ; \ No newline at end of file diff --git a/build/global/react-hotkeys.min.js b/build/global/react-hotkeys.min.js index 83f9277a..447d2f8d 100644 --- a/build/global/react-hotkeys.min.js +++ b/build/global/react-hotkeys.min.js @@ -1 +1,6 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["react","ReactDOM"],e):"object"==typeof exports?exports.ReactHotkeys=e(require("react"),require("ReactDOM")):t.ReactHotkeys=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2);Object.defineProperty(e,"HotKeys",{enumerable:!0,get:function(){return r(o)["default"]}});var u=n(5);Object.defineProperty(e,"FocusTrap",{enumerable:!0,get:function(){return r(u)["default"]}});var a=n(6);Object.defineProperty(e,"HotKeyMapMixin",{enumerable:!0,get:function(){return r(a)["default"]}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function u(t,e){var n=t[e];return n?(0,b["default"])(n)?n:[n]:[e]}Object.defineProperty(e,"__esModule",{value:!0});var a=Object.assign||function(t){for(var e=1;e=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}Object.defineProperty(e,"__esModule",{value:!0});var u=Object.assign||function(t){for(var e=1;e1?n[u-1]:void 0,i=u>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(u--,a):void 0,i&&o(n[0],n[1],i)&&(a=3>u?void 0:a,u=1),e=Object(e);++r-1&&t%1==0&&r>=t}var r=9007199254740991;t.exports=n},function(t,e){function n(t,e){return e=null==e?r:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&e>t}var r=9007199254740991,o=/^(?:0|[1-9]\d*)$/;t.exports=n},function(t,e,n){function r(t,e){if("function"!=typeof t)throw new TypeError(a);return e=i(void 0===e?t.length-1:u(e),0),function(){for(var n=arguments,r=-1,u=i(n.length-e,0),a=Array(u);++rt?-1:1;return e*a}return t===t?t:0}var o=n(24),u=1/0,a=1.7976931348623157e308;t.exports=r},function(t,e,n){function r(t){if("number"==typeof t)return t;if(a(t))return i;if(u(t)){var e=o(t.valueOf)?t.valueOf():t;t=u(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(c,"");var n=s.test(t);return n||p.test(t)?l(t.slice(2),n?2:8):f.test(t)?i:+t}var o=n(16),u=n(17),a=n(25),i=NaN,c=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,p=/^0o[0-7]+$/i,l=parseInt;t.exports=r},function(t,e,n){function r(t){return"symbol"==typeof t||o(t)&&i.call(t)==u}var o=n(26),u="[object Symbol]",a=Object.prototype,i=a.toString;t.exports=r},function(t,e){function n(t){return!!t&&"object"==typeof t}t.exports=n},function(t,e){function n(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||r;return t===n}var r=Object.prototype;t.exports=n},function(t,e,n){function r(t){var e=f(t);if(!e&&!i(t))return u(t);var n=a(t),r=!!n,s=n||[],p=s.length;for(var l in t)!o(t,l)||r&&("length"==l||c(l,p))||e&&"constructor"==l||s.push(l);return s}var o=n(29),u=n(31),a=n(32),i=n(13),c=n(19),f=n(27);t.exports=r},function(t,e,n){function r(t,e){return null!=t&&(a.call(t,e)||"object"==typeof t&&e in t&&null===o(t))}var o=n(30),u=Object.prototype,a=u.hasOwnProperty;t.exports=r},function(t,e){function n(t){return r(Object(t))}var r=Object.getPrototypeOf;t.exports=n},function(t,e){function n(t){return r(Object(t))}var r=Object.keys;t.exports=n},function(t,e,n){function r(t){var e=t?t.length:void 0;return i(e)&&(a(t)||c(t)||u(t))?o(e,String):null}var o=n(33),u=n(34),a=n(36),i=n(18),c=n(37);t.exports=r},function(t,e){function n(t,e){for(var n=-1,r=Array(t);++nn)return!1;var r=e.length-1;return n==r?e.pop():a.call(e,n,1),!0}var o=n(45),u=Array.prototype,a=u.splice;t.exports=r},function(t,e,n){function r(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}var o=n(9);t.exports=r},function(t,e,n){function r(t){var e=this.__data__,n=o(e,t);return 0>n?void 0:e[n][1]}var o=n(45);t.exports=r},function(t,e,n){function r(t){return o(this.__data__,t)>-1}var o=n(45);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return 0>r?n.push([t,e]):n[r][1]=e,this}var o=n(45);t.exports=r},function(t,e,n){function r(){this.__data__=new o}var o=n(42);t.exports=r},function(t,e){function n(t){return this.__data__["delete"](t)}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;return n instanceof o&&n.__data__.length==a&&(n=this.__data__=new u(n.__data__)),n.set(t,e),this}var o=n(42),u=n(54),a=200;t.exports=r},function(t,e,n){function r(t){var e=-1,n=t?t.length:0;for(this.clear();++ep))return!1;var v=f.get(t);if(v)return v==e;var h=-1,d=!0,y=c&a?new o:void 0;for(f.set(t,e);++hn;)t=t[a(e[n++])];return n&&n==r?t:void 0}var o=n(113),u=n(118),a=n(119);t.exports=r},function(t,e,n){function r(t){return o(t)?t:u(t)}var o=n(36),u=n(114);t.exports=r},function(t,e,n){var r=n(115),o=n(116),u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(\.|\[\])(?:\4|$))/g,a=/\\(\\)?/g,i=r(function(t){var e=[];return o(t).replace(u,function(t,n,r,o){e.push(r?o.replace(a,"$1"):n||t)}),e});t.exports=i},function(t,e,n){function r(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError(u);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],u=n.cache;if(u.has(o))return u.get(o);var a=t.apply(this,r);return n.cache=u.set(o,a),a};return n.cache=new(r.Cache||o),n}var o=n(54),u="Expected a function";r.Cache=o,t.exports=r},function(t,e,n){function r(t){return null==t?"":o(t)}var o=n(117);t.exports=r},function(t,e,n){function r(t){if("string"==typeof t)return t;if(u(t))return c?c.call(t):"";var e=t+"";return"0"==e&&1/t==-a?"-0":e}var o=n(85),u=n(25),a=1/0,i=o?o.prototype:void 0,c=i?i.toString:void 0;t.exports=r},function(t,e,n){function r(t,e){if(o(t))return!1;var n=typeof t;return"number"==n||"symbol"==n||"boolean"==n||null==t||u(t)?!0:i.test(t)||!a.test(t)||null!=e&&t in Object(e)}var o=n(36),u=n(25),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;t.exports=r},function(t,e,n){function r(t){if("string"==typeof t||o(t))return t;var e=t+"";return"0"==e&&1/t==-u?"-0":e}var o=n(25),u=1/0;t.exports=r},function(t,e,n){function r(t,e){return null!=t&&u(t,e,o)}var o=n(121),u=n(122);t.exports=r},function(t,e){function n(t,e){return null!=t&&e in Object(t)}t.exports=n},function(t,e,n){function r(t,e,n){e=c(e,t)?[e]:o(e);for(var r,l=-1,v=e.length;++l95&&112>t||j.hasOwnProperty(t)&&(g[j[t]]=t)}return g}function d(t,e,n){return n||(n=h()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function y(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function _(t,e){var n,r,o,u=[];for(n=y(t),o=0;o1?void h(t,i,e,r):(a=_(t,r),y._callbacks[a.key]=y._callbacks[a.key]||[],n(a.key,a.modifiers,{type:a.action},o,t,u),void y._callbacks[a.key][o?"unshift":"push"]({callback:e,modifiers:a.modifiers,action:a.action,seq:o,level:u,combo:t}))}var y=this;if(t=t||u,!(y instanceof x))return new x(t);y.target=t,y._callbacks={},y._directMap={};var b,g={},j=!1,m=!1,O=!1;y._handleKey=function(t,o,u){var a,i=n(t,o,u),c={},f=0,s=!1;for(a=0;a":".","?":"/","|":"\\"},w={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},P=1;20>P;++P)j[111+P]="f"+P;for(P=0;9>=P;++P)j[P+96]=P;x.prototype.bind=function(t,e,n){var r=this;return t=t instanceof Array?t:[t],r._bindMultiple.call(r,t,e,n),r},x.prototype.unbind=function(t,e){var n=this;return n.bind.call(n,t,function(){},e)},x.prototype.trigger=function(t,e){var n=this;return n._directMap[t+":"+e]&&n._directMap[t+":"+e]({},t),n},x.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},x.prototype.stopCallback=function(t,e){var n=this;return(" "+e.className+" ").indexOf(" mousetrap ")>-1?!1:b(e,n.target)?!1:"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},x.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},x.init=function(){var t=x(u);for(var e in t)"_"!==e.charAt(0)&&(x[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},x.init(),o.Mousetrap=x,"undefined"!=typeof t&&t.exports&&(t.exports=x),r=function(){return x}.call(e,n,e,t),!(r!==a&&(t.exports=r))}(window,document)}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["react","ReactDOM"],e):"object"==typeof exports?exports.ReactHotkeys=e(require("react"),require("ReactDOM")):t.ReactHotkeys=e(t.React,t.ReactDOM)}(this,function(t,e){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(2);Object.defineProperty(e,"HotKeys",{enumerable:!0,get:function(){return r(o).default}});var i=n(14);Object.defineProperty(e,"FocusTrap",{enumerable:!0,get:function(){return r(i).default}});var a=n(15);Object.defineProperty(e,"HotKeyMapMixin",{enumerable:!0,get:function(){return r(a).default}})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){var n=t[e];return n?(0,j.default)(n)?n:[n]:[e]}Object.defineProperty(e,"__esModule",{value:!0});var a=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.props.handlers,o=void 0===r?{}:r,a=n.handlers,u=void 0===a?o:a;if(e||this.updateMap()||!(0,k.default)(o,u)){var c=this.getMap(),s=[],f=this.__mousetrap__;(0,P.default)(o,function(e,n){var r=i(c,n);(0,P.default)(r,function(n){var r=void 0,o=function(n,r){var o=(0,m.default)(t.props.focused)?t.props.focused:t.__isFocused__;if(o&&r!==t.__lastChildSequence__)return t.context.hotKeyParent&&t.context.hotKeyParent.childHandledSequence(r),e(n,r)};(0,w.default)(n)&&(r=n.action,n=n.sequence),s.push({callback:o,action:r,sequence:n})})}),f.reset(),(0,P.default)(s,function(t){return f.bind(t.sequence,t.callback,t.action)})}},childHandledSequence:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.__lastChildSequence__=t,this.context.hotKeyParent&&this.context.hotKeyParent.childHandledSequence(t)},onFocus:function(){if(this.__isFocused__=!0,this.props.onFocus){var t;(t=this.props).onFocus.apply(t,arguments)}},onBlur:function(){if(this.__isFocused__=!1,this.props.onBlur){var t;(t=this.props).onBlur.apply(t,arguments)}this.context.hotKeyParent&&this.context.hotKeyParent.childHandledSequence(null)},render:function(){var t=this.props,e=t.children,n=(t.keyMap,t.handlers,t.focused,t.attach,o(t,["children","keyMap","handlers","focused","attach"]));return f.default.createElement(y.default,a({},n,{onFocus:this.onFocus,onBlur:this.onBlur}),e)}});e.default=N},function(t,e,n){t.exports=n(4)()},function(t,e,n){"use strict";var r=n(5),o=n(6);t.exports=function(){function t(){o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e};return n.checkPropTypes=r,n.PropTypes=n,n}},function(t,e){"use strict";function n(t){return function(){return t}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(t){return t},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i,a,u,c){if(o(e),!t){var s;if(void 0===e)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,r,i,a,u,c],p=0;s=new Error(e.replace(/%s/g,function(){return f[p++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}}var o=function(t){};t.exports=r},function(e,n){e.exports=t},function(t,e,n){"use strict";var r=n(7),o=n(9),i=(new r.Component).updater;t.exports=o(r.Component,r.isValidElement,i)},function(t,e,n){"use strict";function r(t){return t}function o(t,e,n){function o(t,e){var n=b.hasOwnProperty(e)?b[e]:null;g.hasOwnProperty(e)&&c("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",e),t&&c("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",e)}function i(t,n){if(n){c("function"!=typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),c(!e(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=t.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(s)&&x.mixins(t,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==s){var u=n[a],f=r.hasOwnProperty(a);if(o(f,a),x.hasOwnProperty(a))x[a](t,u);else{var p=b.hasOwnProperty(a),d="function"==typeof u,v=d&&!p&&!f&&n.autobind!==!1;if(v)i.push(a,u),r[a]=u;else if(f){var y=b[a];c(p&&("DEFINE_MANY_MERGED"===y||"DEFINE_MANY"===y),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",y,a),"DEFINE_MANY_MERGED"===y?r[a]=l(r[a],u):"DEFINE_MANY"===y&&(r[a]=h(r[a],u))}else r[a]=u}}}else;}function f(t,e){if(e)for(var n in e){var r=e[n];if(e.hasOwnProperty(n)){var o=n in x;c(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in t;c(!i,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),t[n]=r}}}function p(t,e){c(t&&e&&"object"==typeof t&&"object"==typeof e,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in e)e.hasOwnProperty(n)&&(c(void 0===t[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),t[n]=e[n]);return t}function l(t,e){return function(){var n=t.apply(this,arguments),r=e.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return p(o,n),p(o,r),o}}function h(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}}function d(t,e){var n=e.bind(t);return n}function v(t){for(var e=t.__reactAutoBindPairs,n=0;n=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var c=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};return{contextTypes:{hotKeyMap:a.default.object},childContextTypes:{hotKeyMap:a.default.object},getChildContext:function(){return{hotKeyMap:this.__hotKeyMap__}},componentWillMount:function(){this.updateMap()},updateMap:function(){var t=this.buildMap();return!(0,p.default)(t,this.__hotKeyMap__)&&(this.__hotKeyMap__=t,!0)},buildMap:function(){var e=this.context.hotKeyMap||{},n=this.props.keyMap||{};return(0,s.default)({},e,t,n)},getMap:function(){return this.__hotKeyMap__}}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var i=n(3),a=r(i),u=n(7),c=(r(u),n(16)),s=r(c),f=n(67),p=r(f)},function(t,e,n){var r=n(17),o=n(35),i=n(36),a=n(46),u=n(49),c=n(50),s=Object.prototype,f=s.hasOwnProperty,p=i(function(t,e){if(u(e)||a(e))return void o(e,c(e),t);for(var n in e)f.call(e,n)&&r(t,n,e[n])});t.exports=p},function(t,e,n){function r(t,e,n){var r=t[e];u.call(t,e)&&i(r,n)&&(void 0!==n||e in t)||o(t,e,n)}var o=n(18),i=n(34),a=Object.prototype,u=a.hasOwnProperty;t.exports=r},function(t,e,n){function r(t,e,n){"__proto__"==e&&o?o(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var o=n(19);t.exports=r},function(t,e,n){var r=n(20),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e,n){function r(t,e){var n=i(t,e);return o(n)?n:void 0}var o=n(21),i=n(33);t.exports=r},function(t,e,n){function r(t){if(!a(t)||i(t))return!1;var e=o(t)?d:s;return e.test(u(t))}var o=n(22),i=n(30),a=n(29),u=n(32),c=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,f=Function.prototype,p=Object.prototype,l=f.toString,h=p.hasOwnProperty,d=RegExp("^"+l.call(h).replace(c,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=r},function(t,e,n){function r(t){if(!i(t))return!1;var e=o(t);return e==u||e==c||e==a||e==s}var o=n(23),i=n(29),a="[object AsyncFunction]",u="[object Function]",c="[object GeneratorFunction]",s="[object Proxy]";t.exports=r},function(t,e,n){function r(t){return null==t?void 0===t?c:u:s&&s in Object(t)?i(t):a(t)}var o=n(24),i=n(27),a=n(28),u="[object Null]",c="[object Undefined]",s=o?o.toStringTag:void 0;t.exports=r},function(t,e,n){var r=n(25),o=r.Symbol;t.exports=o},function(t,e,n){var r=n(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(e,function(){return this}())},function(t,e,n){function r(t){var e=a.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}var o=n(24),i=Object.prototype,a=i.hasOwnProperty,u=i.toString,c=o?o.toStringTag:void 0;t.exports=r},function(t,e){function n(t){return o.call(t)}var r=Object.prototype,o=r.toString;t.exports=n},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){function r(t){return!!i&&i in t}var o=n(31),i=function(){var t=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=r},function(t,e,n){var r=n(25),o=r["__core-js_shared__"];t.exports=o},function(t,e){function n(t){if(null!=t){try{return o.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var r=Function.prototype,o=r.toString;t.exports=n},function(t,e){function n(t,e){return null==t?void 0:t[e]}t.exports=n},function(t,e){function n(t,e){return t===e||t!==t&&e!==e}t.exports=n},function(t,e,n){function r(t,e,n,r){var a=!n;n||(n={});for(var u=-1,c=e.length;++u1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,u&&i(n[0],n[1],u)&&(a=o<3?void 0:a,o=1),e=Object(e);++r0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var r=800,o=16,i=Date.now;t.exports=n},function(t,e,n){function r(t,e,n){if(!u(n))return!1;var r=typeof e;return!!("number"==r?i(n)&&a(e,n.length):"string"==r&&e in n)&&o(n[e],t)}var o=n(34),i=n(46),a=n(48),u=n(29);t.exports=r},function(t,e,n){function r(t){return null!=t&&i(t.length)&&!o(t)}var o=n(22),i=n(47);t.exports=r},function(t,e){function n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}var r=9007199254740991;t.exports=n},function(t,e){function n(t,e){return e=null==e?r:e,!!e&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t-1}var o=n(74);t.exports=r},function(t,e,n){function r(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var o=n(74);t.exports=r},function(t,e,n){function r(){this.__data__=new o,this.size=0}var o=n(71);t.exports=r},function(t,e){function n(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}t.exports=n},function(t,e){function n(t){return this.__data__.get(t)}t.exports=n},function(t,e){function n(t){return this.__data__.has(t)}t.exports=n},function(t,e,n){function r(t,e){var n=this.__data__;if(n instanceof o){var r=n.__data__;if(!i||r.lengthl))return!1;var d=f.get(t);if(d&&f.get(e))return d==e;var v=-1,y=!0,_=n&c?new o:void 0;for(f.set(t,e),f.set(e,t);++v95&&t<112||g.hasOwnProperty(t)&&(m[g[t]]=t)}return m}function v(t,e,n){return n||(n=d()[t]?"keydown":"keypress"),"keypress"==n&&e.length&&(n="keydown"),n}function y(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus"),t.split("+"))}function _(t,e){var n,r,o,i=[];for(n=y(t),o=0;o1?void d(t,u,e,r):(a=_(t,r),y._callbacks[a.key]=y._callbacks[a.key]||[],n(a.key,a.modifiers,{type:a.action},o,t,i),void y._callbacks[a.key][o?"unshift":"push"]({callback:e,modifiers:a.modifiers,action:a.action,seq:o,level:i,combo:t}))}var y=this;if(t=t||i,!(y instanceof x))return new x(t);y.target=t,y._callbacks={},y._directMap={};var b,m={},g=!1,j=!1,O=!1;y._handleKey=function(t,o,i){var a,u=n(t,o,i),c={},s=0,f=!1;for(a=0;a":".","?":"/","|":"\\"},w={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},E=1;E<20;++E)g[111+E]="f"+E;for(E=0;E<=9;++E)g[E+96]=E.toString();x.prototype.bind=function(t,e,n){var r=this;return t=t instanceof Array?t:[t],r._bindMultiple.call(r,t,e,n),r},x.prototype.unbind=function(t,e){var n=this;return n.bind.call(n,t,function(){},e)},x.prototype.trigger=function(t,e){var n=this;return n._directMap[t+":"+e]&&n._directMap[t+":"+e]({},t),n},x.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},x.prototype.stopCallback=function(t,e){var n=this;return!((" "+e.className+" ").indexOf(" mousetrap ")>-1)&&(!b(e,n.target)&&("INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable))},x.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},x.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(g[e]=t[e]);m=null},x.init=function(){var t=x(i);for(var e in t)"_"!==e.charAt(0)&&(x[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},x.init(),o.Mousetrap=x,"undefined"!=typeof t&&t.exports&&(t.exports=x),r=function(){return x}.call(e,n,e,t),!(r!==a&&(t.exports=r))}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)}])}); \ No newline at end of file diff --git a/build/npm/lib/FocusTrap.js b/build/npm/lib/FocusTrap.js index 637fcd7e..1ce1a57b 100644 --- a/build/npm/lib/FocusTrap.js +++ b/build/npm/lib/FocusTrap.js @@ -6,6 +6,12 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _react = require('react'); var _react2 = _interopRequireDefault(_react); @@ -14,35 +20,47 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } -var FocusTrap = _react2.default.createClass({ - displayName: 'FocusTrap', - - - propTypes: { - onFocus: _react2.default.PropTypes.func, - onBlur: _react2.default.PropTypes.func, - component: _react2.default.PropTypes.any, - children: _react2.default.PropTypes.node - }, - - getDefaultProps: function getDefaultProps() { - return { - component: 'div' - }; - }, - render: function render() { - var _props = this.props; - var Component = _props.component; - var children = _props.children; - - var props = _objectWithoutProperties(_props, ['component', 'children']); - - return _react2.default.createElement( - Component, - _extends({ tabIndex: '-1' }, props), - children - ); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var FocusTrap = function (_React$Component) { + _inherits(FocusTrap, _React$Component); + + function FocusTrap() { + _classCallCheck(this, FocusTrap); + + return _possibleConstructorReturn(this, (FocusTrap.__proto__ || Object.getPrototypeOf(FocusTrap)).apply(this, arguments)); } -}); + _createClass(FocusTrap, [{ + key: 'render', + value: function render() { + var _props = this.props, + Component = _props.component, + children = _props.children, + props = _objectWithoutProperties(_props, ['component', 'children']); + + return _react2.default.createElement( + Component, + _extends({ tabIndex: '-1' }, props), + children + ); + } + }]); + + return FocusTrap; +}(_react2.default.Component); + +FocusTrap.propTypes = { + onFocus: _propTypes2.default.func, + onBlur: _propTypes2.default.func, + component: _propTypes2.default.any, + children: _propTypes2.default.node +}; +FocusTrap.defaultProps = { + component: 'div' +}; exports.default = FocusTrap; \ No newline at end of file diff --git a/build/npm/lib/HotKeyMapMixin.js b/build/npm/lib/HotKeyMapMixin.js index 8d871a3b..10d65c16 100644 --- a/build/npm/lib/HotKeyMapMixin.js +++ b/build/npm/lib/HotKeyMapMixin.js @@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = HotKeyMapMixin; +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _react = require('react'); var _react2 = _interopRequireDefault(_react); @@ -20,17 +24,17 @@ var _isEqual2 = _interopRequireDefault(_isEqual); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function HotKeyMapMixin() { - var hotKeyMap = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var hotKeyMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; return { contextTypes: { - hotKeyMap: _react2.default.PropTypes.object + hotKeyMap: _propTypes2.default.object }, childContextTypes: { - hotKeyMap: _react2.default.PropTypes.object + hotKeyMap: _propTypes2.default.object }, getChildContext: function getChildContext() { @@ -61,4 +65,4 @@ function HotKeyMapMixin() { return this.__hotKeyMap__; } }; -}; \ No newline at end of file +} \ No newline at end of file diff --git a/build/npm/lib/HotKeys.js b/build/npm/lib/HotKeys.js index a4893aa4..397049fe 100644 --- a/build/npm/lib/HotKeys.js +++ b/build/npm/lib/HotKeys.js @@ -6,10 +6,18 @@ Object.defineProperty(exports, "__esModule", { var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; +var _propTypes = require('prop-types'); + +var _propTypes2 = _interopRequireDefault(_propTypes); + var _react = require('react'); var _react2 = _interopRequireDefault(_react); +var _createReactClass = require('create-react-class'); + +var _createReactClass2 = _interopRequireDefault(_createReactClass); + var _reactDom = require('react-dom'); var _reactDom2 = _interopRequireDefault(_reactDom); @@ -62,28 +70,26 @@ function getSequencesFromMap(hotKeyMap, hotKeyName) { return [sequences]; } -var HotKeys = _react2.default.createClass({ +var HotKeys = (0, _createReactClass2.default)({ displayName: 'HotKeys', - - mixins: [(0, _HotKeyMapMixin2.default)()], propTypes: { - children: _react2.default.PropTypes.node, - onFocus: _react2.default.PropTypes.func, - onBlur: _react2.default.PropTypes.func, - keyMap: _react2.default.PropTypes.object, - handlers: _react2.default.PropTypes.object, - focused: _react2.default.PropTypes.bool, // externally controlled focus - attach: _react2.default.PropTypes.any // dom element to listen for key events + children: _propTypes2.default.node, + onFocus: _propTypes2.default.func, + onBlur: _propTypes2.default.func, + keyMap: _propTypes2.default.object, + handlers: _propTypes2.default.object, + focused: _propTypes2.default.bool, // externally controlled focus + attach: _propTypes2.default.any // dom element to listen for key events }, contextTypes: { - hotKeyParent: _react2.default.PropTypes.any + hotKeyParent: _propTypes2.default.any }, childContextTypes: { - hotKeyParent: _react2.default.PropTypes.any + hotKeyParent: _propTypes2.default.any }, getChildContext: function getChildContext() { @@ -116,17 +122,17 @@ var HotKeys = _react2.default.createClass({ updateHotKeys: function updateHotKeys() { var _this = this; - var force = arguments.length <= 0 || arguments[0] === undefined ? false : arguments[0]; - var prevProps = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var _props$handlers = this.props.handlers; - var handlers = _props$handlers === undefined ? {} : _props$handlers; - var _prevProps$handlers = prevProps.handlers; - var prevHandlers = _prevProps$handlers === undefined ? handlers : _prevProps$handlers; + var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var prevProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var _props$handlers = this.props.handlers, + handlers = _props$handlers === undefined ? {} : _props$handlers; + var _prevProps$handlers = prevProps.handlers, + prevHandlers = _prevProps$handlers === undefined ? handlers : _prevProps$handlers; // Ensure map is up-to-date to begin with // We will only bother continuing if the map was actually updated - if (!force && (0, _isEqual2.default)(handlers, prevHandlers) && !this.updateMap()) { + if (!force && !this.updateMap() && (0, _isEqual2.default)(handlers, prevHandlers)) { return; } @@ -172,7 +178,7 @@ var HotKeys = _react2.default.createClass({ }); }, childHandledSequence: function childHandledSequence() { - var sequence = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; + var sequence = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; this.__lastChildSequence__ = sequence; @@ -203,14 +209,13 @@ var HotKeys = _react2.default.createClass({ } }, render: function render() { - var _props3 = this.props; - var children = _props3.children; - var keyMap = _props3.keyMap; - var handlers = _props3.handlers; - var focused = _props3.focused; - var attach = _props3.attach; - - var props = _objectWithoutProperties(_props3, ['children', 'keyMap', 'handlers', 'focused', 'attach']); + var _props3 = this.props, + children = _props3.children, + keyMap = _props3.keyMap, + handlers = _props3.handlers, + focused = _props3.focused, + attach = _props3.attach, + props = _objectWithoutProperties(_props3, ['children', 'keyMap', 'handlers', 'focused', 'attach']); return _react2.default.createElement( _FocusTrap2.default, diff --git a/build/npm/package.json b/build/npm/package.json index 754c3eed..8ce1cfb1 100644 --- a/build/npm/package.json +++ b/build/npm/package.json @@ -8,7 +8,9 @@ }, "dependencies": { "lodash": "^4.13.1", - "mousetrap": "^1.5.2" + "mousetrap": "^1.5.2", + "prop-types": "^15.5.8", + "create-react-class": "^15.5.2" }, "peerDependencies": { "react": ">= 0.14.0", diff --git a/lib/FocusTrap.js b/lib/FocusTrap.js index c8cdd593..115bb9ba 100644 --- a/lib/FocusTrap.js +++ b/lib/FocusTrap.js @@ -1,19 +1,17 @@ +import PropTypes from 'prop-types'; import React from 'react'; -const FocusTrap = React.createClass({ +class FocusTrap extends React.Component { + static propTypes = { + onFocus: PropTypes.func, + onBlur: PropTypes.func, + component: PropTypes.any, + children: PropTypes.node + }; - propTypes: { - onFocus: React.PropTypes.func, - onBlur: React.PropTypes.func, - component: React.PropTypes.any, - children: React.PropTypes.node - }, - - getDefaultProps() { - return { - component: 'div' - }; - }, + static defaultProps = { + component: 'div' + }; render() { const { @@ -28,7 +26,6 @@ const FocusTrap = React.createClass({ ); } - -}); +} export default FocusTrap; diff --git a/lib/HotKeyMapMixin.js b/lib/HotKeyMapMixin.js index 608153fa..8c41e9e9 100644 --- a/lib/HotKeyMapMixin.js +++ b/lib/HotKeyMapMixin.js @@ -1,3 +1,4 @@ +import PropTypes from 'prop-types'; import React from 'react'; import assign from 'lodash/assign'; import isEqual from 'lodash/isEqual'; @@ -7,11 +8,11 @@ export default function HotKeyMapMixin(hotKeyMap = {}) { return { contextTypes: { - hotKeyMap: React.PropTypes.object + hotKeyMap: PropTypes.object }, childContextTypes: { - hotKeyMap: React.PropTypes.object + hotKeyMap: PropTypes.object }, getChildContext() { @@ -48,4 +49,4 @@ export default function HotKeyMapMixin(hotKeyMap = {}) { }; -}; +} diff --git a/lib/HotKeys.js b/lib/HotKeys.js index 38b85fb2..b6b54c36 100644 --- a/lib/HotKeys.js +++ b/lib/HotKeys.js @@ -1,4 +1,6 @@ +import PropTypes from 'prop-types'; import React from 'react'; +import createReactClass from 'create-react-class'; import ReactDOM from 'react-dom'; import FocusTrap from './FocusTrap'; import HotKeyMapMixin from './HotKeyMapMixin'; @@ -24,26 +26,26 @@ function getSequencesFromMap(hotKeyMap, hotKeyName) { return [sequences]; } -const HotKeys = React.createClass({ - +const HotKeys = createReactClass({ + displayName: 'HotKeys', mixins: [HotKeyMapMixin()], propTypes: { - children: React.PropTypes.node, - onFocus: React.PropTypes.func, - onBlur: React.PropTypes.func, - keyMap: React.PropTypes.object, - handlers: React.PropTypes.object, - focused: React.PropTypes.bool, // externally controlled focus - attach: React.PropTypes.any // dom element to listen for key events + children: PropTypes.node, + onFocus: PropTypes.func, + onBlur: PropTypes.func, + keyMap: PropTypes.object, + handlers: PropTypes.object, + focused: PropTypes.bool, // externally controlled focus + attach: PropTypes.any // dom element to listen for key events }, contextTypes: { - hotKeyParent: React.PropTypes.any + hotKeyParent: PropTypes.any }, childContextTypes: { - hotKeyParent: React.PropTypes.any + hotKeyParent: PropTypes.any }, getChildContext() { @@ -168,8 +170,7 @@ const HotKeys = React.createClass({ {children} ); - } - + }, }); export default HotKeys; diff --git a/package.json b/package.json index 80cdc692..267ba8a3 100644 --- a/package.json +++ b/package.json @@ -15,21 +15,24 @@ "babel-preset-es2015": "^6.9.0", "babel-preset-react": "^6.11.1", "babel-preset-stage-2": "^6.11.0", + "babel-register": "^6.24.1", "css-loader": "^0.9.1", "eslint": "^1.10.3", "eslint-plugin-react": "^3.16.1", "estraverse": "^4.2.0", "mocha": "^2.4.5", "prompt": "^0.2.14", - "react": "^15.0.1", + "react": "^15.5.4", "react-addons-test-utils": "^15.0.1", - "react-dom": "^15.0.1", + "react-dom": "^15.5.4", "style-loader": "^0.9.0", "webpack": "^1.7.3" }, "dependencies": { "lodash": "^4.13.1", - "mousetrap": "^1.5.2" + "mousetrap": "^1.5.2", + "prop-types": "^15.5.8", + "create-react-class": "^15.5.2" }, "peerDependencies": { "react": ">= 0.14.0",