text: (function (global, factory) {
  	typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('react'), require('prop-types'), require('classnames'), require('react-onclickoutside'), require('moment'), require('react-popper')) :
  	typeof define === 'function' && define.amd ? define(['react', 'prop-types', 'classnames', 'react-onclickoutside', 'moment', 'react-popper'], factory) :
  	(global.DatePicker = factory(global.React,global.PropTypes,global.classNames,global.onClickOutside,global.moment,global.ReactPopper));
  }(this, (function (React,PropTypes,classnames,onClickOutside,moment,reactPopper) { 'use strict';
  
  React = React && React.hasOwnProperty('default') ? React['default'] : React;
  PropTypes = PropTypes && PropTypes.hasOwnProperty('default') ? PropTypes['default'] : PropTypes;
  classnames = classnames && classnames.hasOwnProperty('default') ? classnames['default'] : classnames;
  onClickOutside = onClickOutside && onClickOutside.hasOwnProperty('default') ? onClickOutside['default'] : onClickOutside;
  moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
  
  var commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  
  
  
  function unwrapExports (x) {
  	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  }
  
  function createCommonjsModule(fn, module) {
  	return module = { exports: {} }, fn(module, module.exports), module.exports;
  }
  
  var supportsProtoAssignment_1 = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = supportsProtoAssignment;
  var x = {};
  var y = { supports: true };
  try {
    x.__proto__ = y;
  } catch (err) {}
  
  function supportsProtoAssignment() {
    return x.supports || false;
  }
  });
  
  unwrapExports(supportsProtoAssignment_1);
  
  /**
   * Removes all key-value entries from the list cache.
   *
   * @private
   * @name clear
   * @memberOf ListCache
   */
  function listCacheClear() {
    this.__data__ = [];
    this.size = 0;
  }
  
  var _listCacheClear = listCacheClear;
  
  /**
   * Performs a
   * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
   * comparison between two values to determine if they are equivalent.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
   * @example
   *
   * var object = { 'a': 1 };
   * var other = { 'a': 1 };
   *
   * _.eq(object, object);
   * // => true
   *
   * _.eq(object, other);
   * // => false
   *
   * _.eq('a', 'a');
   * // => true
   *
   * _.eq('a', Object('a'));
   * // => false
   *
   * _.eq(NaN, NaN);
   * // => true
   */
  function eq(value, other) {
    return value === other || (value !== value && other !== other);
  }
  
  var eq_1 = eq;
  
  /**
   * Gets the index at which the `key` is found in `array` of key-value pairs.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} key The key to search for.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function assocIndexOf(array, key) {
    var length = array.length;
    while (length--) {
      if (eq_1(array[length][0], key)) {
        return length;
      }
    }
    return -1;
  }
  
  var _assocIndexOf = assocIndexOf;
  
  /** Used for built-in method references. */
  var arrayProto = Array.prototype;
  
  /** Built-in value references. */
  var splice = arrayProto.splice;
  
  /**
   * Removes `key` and its value from the list cache.
   *
   * @private
   * @name delete
   * @memberOf ListCache
   * @param {string} key The key of the value to remove.
   * @returns {boolean} Returns `true` if the entry was removed, else `false`.
   */
  function listCacheDelete(key) {
    var data = this.__data__,
        index = _assocIndexOf(data, key);
  
    if (index < 0) {
      return false;
    }
    var lastIndex = data.length - 1;
    if (index == lastIndex) {
      data.pop();
    } else {
      splice.call(data, index, 1);
    }
    --this.size;
    return true;
  }
  
  var _listCacheDelete = listCacheDelete;
  
  /**
   * Gets the list cache value for `key`.
   *
   * @private
   * @name get
   * @memberOf ListCache
   * @param {string} key The key of the value to get.
   * @returns {*} Returns the entry value.
   */
  function listCacheGet(key) {
    var data = this.__data__,
        index = _assocIndexOf(data, key);
  
    return index < 0 ? undefined : data[index][1];
  }
  
  var _listCacheGet = listCacheGet;
  
  /**
   * Checks if a list cache value for `key` exists.
   *
   * @private
   * @name has
   * @memberOf ListCache
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function listCacheHas(key) {
    return _assocIndexOf(this.__data__, key) > -1;
  }
  
  var _listCacheHas = listCacheHas;
  
  /**
   * Sets the list cache `key` to `value`.
   *
   * @private
   * @name set
   * @memberOf ListCache
   * @param {string} key The key of the value to set.
   * @param {*} value The value to set.
   * @returns {Object} Returns the list cache instance.
   */
  function listCacheSet(key, value) {
    var data = this.__data__,
        index = _assocIndexOf(data, key);
  
    if (index < 0) {
      ++this.size;
      data.push([key, value]);
    } else {
      data[index][1] = value;
    }
    return this;
  }
  
  var _listCacheSet = listCacheSet;
  
  /**
   * Creates an list cache object.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function ListCache(entries) {
    var index = -1,
        length = entries == null ? 0 : entries.length;
  
    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }
  
  // Add methods to `ListCache`.
  ListCache.prototype.clear = _listCacheClear;
  ListCache.prototype['delete'] = _listCacheDelete;
  ListCache.prototype.get = _listCacheGet;
  ListCache.prototype.has = _listCacheHas;
  ListCache.prototype.set = _listCacheSet;
  
  var _ListCache = ListCache;
  
  /**
   * Removes all key-value entries from the stack.
   *
   * @private
   * @name clear
   * @memberOf Stack
   */
  function stackClear() {
    this.__data__ = new _ListCache;
    this.size = 0;
  }
  
  var _stackClear = stackClear;
  
  /**
   * Removes `key` and its value from the stack.
   *
   * @private
   * @name delete
   * @memberOf Stack
   * @param {string} key The key of the value to remove.
   * @returns {boolean} Returns `true` if the entry was removed, else `false`.
   */
  function stackDelete(key) {
    var data = this.__data__,
        result = data['delete'](key);
  
    this.size = data.size;
    return result;
  }
  
  var _stackDelete = stackDelete;
  
  /**
   * Gets the stack value for `key`.
   *
   * @private
   * @name get
   * @memberOf Stack
   * @param {string} key The key of the value to get.
   * @returns {*} Returns the entry value.
   */
  function stackGet(key) {
    return this.__data__.get(key);
  }
  
  var _stackGet = stackGet;
  
  /**
   * Checks if a stack value for `key` exists.
   *
   * @private
   * @name has
   * @memberOf Stack
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function stackHas(key) {
    return this.__data__.has(key);
  }
  
  var _stackHas = stackHas;
  
  /** Detect free variable `global` from Node.js. */
  var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
  
  var _freeGlobal = freeGlobal;
  
  /** Detect free variable `self`. */
  var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  
  /** Used as a reference to the global object. */
  var root = _freeGlobal || freeSelf || Function('return this')();
  
  var _root = root;
  
  /** Built-in value references. */
  var Symbol$1 = _root.Symbol;
  
  var _Symbol = Symbol$1;
  
  /** Used for built-in method references. */
  var objectProto$1 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
  
  /**
   * Used to resolve the
   * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
   * of values.
   */
  var nativeObjectToString = objectProto$1.toString;
  
  /** Built-in value references. */
  var symToStringTag$1 = _Symbol ? _Symbol.toStringTag : undefined;
  
  /**
   * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
   *
   * @private
   * @param {*} value The value to query.
   * @returns {string} Returns the raw `toStringTag`.
   */
  function getRawTag(value) {
    var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
        tag = value[symToStringTag$1];
  
    try {
      value[symToStringTag$1] = undefined;
      var unmasked = true;
    } catch (e) {}
  
    var result = nativeObjectToString.call(value);
    if (unmasked) {
      if (isOwn) {
        value[symToStringTag$1] = tag;
      } else {
        delete value[symToStringTag$1];
      }
    }
    return result;
  }
  
  var _getRawTag = getRawTag;
  
  /** Used for built-in method references. */
  var objectProto$2 = Object.prototype;
  
  /**
   * Used to resolve the
   * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
   * of values.
   */
  var nativeObjectToString$1 = objectProto$2.toString;
  
  /**
   * Converts `value` to a string using `Object.prototype.toString`.
   *
   * @private
   * @param {*} value The value to convert.
   * @returns {string} Returns the converted string.
   */
  function objectToString(value) {
    return nativeObjectToString$1.call(value);
  }
  
  var _objectToString = objectToString;
  
  /** `Object#toString` result references. */
  var nullTag = '[object Null]';
  var undefinedTag = '[object Undefined]';
  
  /** Built-in value references. */
  var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;
  
  /**
   * The base implementation of `getTag` without fallbacks for buggy environments.
   *
   * @private
   * @param {*} value The value to query.
   * @returns {string} Returns the `toStringTag`.
   */
  function baseGetTag(value) {
    if (value == null) {
      return value === undefined ? undefinedTag : nullTag;
    }
    return (symToStringTag && symToStringTag in Object(value))
      ? _getRawTag(value)
      : _objectToString(value);
  }
  
  var _baseGetTag = baseGetTag;
  
  /**
   * Checks if `value` is the
   * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
   * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an object, else `false`.
   * @example
   *
   * _.isObject({});
   * // => true
   *
   * _.isObject([1, 2, 3]);
   * // => true
   *
   * _.isObject(_.noop);
   * // => true
   *
   * _.isObject(null);
   * // => false
   */
  function isObject(value) {
    var type = typeof value;
    return value != null && (type == 'object' || type == 'function');
  }
  
  var isObject_1 = isObject;
  
  /** `Object#toString` result references. */
  var asyncTag = '[object AsyncFunction]';
  var funcTag = '[object Function]';
  var genTag = '[object GeneratorFunction]';
  var proxyTag = '[object Proxy]';
  
  /**
   * Checks if `value` is classified as a `Function` object.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a function, else `false`.
   * @example
   *
   * _.isFunction(_);
   * // => true
   *
   * _.isFunction(/abc/);
   * // => false
   */
  function isFunction(value) {
    if (!isObject_1(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;
  }
  
  var isFunction_1 = isFunction;
  
  /** Used to detect overreaching core-js shims. */
  var coreJsData = _root['__core-js_shared__'];
  
  var _coreJsData = coreJsData;
  
  /** Used to detect methods masquerading as native. */
  var maskSrcKey = (function() {
    var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || '');
    return uid ? ('Symbol(src)_1.' + uid) : '';
  }());
  
  /**
   * Checks if `func` has its source masked.
   *
   * @private
   * @param {Function} func The function to check.
   * @returns {boolean} Returns `true` if `func` is masked, else `false`.
   */
  function isMasked(func) {
    return !!maskSrcKey && (maskSrcKey in func);
  }
  
  var _isMasked = isMasked;
  
  /** Used for built-in method references. */
  var funcProto$1 = Function.prototype;
  
  /** Used to resolve the decompiled source of functions. */
  var funcToString$1 = funcProto$1.toString;
  
  /**
   * Converts `func` to its source code.
   *
   * @private
   * @param {Function} func The function to convert.
   * @returns {string} Returns the source code.
   */
  function toSource(func) {
    if (func != null) {
      try {
        return funcToString$1.call(func);
      } catch (e) {}
      try {
        return (func + '');
      } catch (e) {}
    }
    return '';
  }
  
  var _toSource = toSource;
  
  /**
   * Used to match `RegExp`
   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
   */
  var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  
  /** Used to detect host constructors (Safari). */
  var reIsHostCtor = /^\[object .+?Constructor\]$/;
  
  /** Used for built-in method references. */
  var funcProto = Function.prototype;
  var objectProto = Object.prototype;
  
  /** Used to resolve the decompiled source of functions. */
  var funcToString = funcProto.toString;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty = objectProto.hasOwnProperty;
  
  /** Used to detect if a method is native. */
  var reIsNative = RegExp('^' +
    funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
    .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  );
  
  /**
   * The base implementation of `_.isNative` without bad shim checks.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a native function,
   *  else `false`.
   */
  function baseIsNative(value) {
    if (!isObject_1(value) || _isMasked(value)) {
      return false;
    }
    var pattern = isFunction_1(value) ? reIsNative : reIsHostCtor;
    return pattern.test(_toSource(value));
  }
  
  var _baseIsNative = baseIsNative;
  
  /**
   * Gets the value at `key` of `object`.
   *
   * @private
   * @param {Object} [object] The object to query.
   * @param {string} key The key of the property to get.
   * @returns {*} Returns the property value.
   */
  function getValue(object, key) {
    return object == null ? undefined : object[key];
  }
  
  var _getValue = getValue;
  
  /**
   * Gets the native function at `key` of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {string} key The key of the method to get.
   * @returns {*} Returns the function if it's native, else `undefined`.
   */
  function getNative(object, key) {
    var value = _getValue(object, key);
    return _baseIsNative(value) ? value : undefined;
  }
  
  var _getNative = getNative;
  
  /* Built-in method references that are verified to be native. */
  var Map$1 = _getNative(_root, 'Map');
  
  var _Map = Map$1;
  
  /* Built-in method references that are verified to be native. */
  var nativeCreate = _getNative(Object, 'create');
  
  var _nativeCreate = nativeCreate;
  
  /**
   * Removes all key-value entries from the hash.
   *
   * @private
   * @name clear
   * @memberOf Hash
   */
  function hashClear() {
    this.__data__ = _nativeCreate ? _nativeCreate(null) : {};
    this.size = 0;
  }
  
  var _hashClear = hashClear;
  
  /**
   * Removes `key` and its value from the hash.
   *
   * @private
   * @name delete
   * @memberOf Hash
   * @param {Object} hash The hash to modify.
   * @param {string} key The key of the value to remove.
   * @returns {boolean} Returns `true` if the entry was removed, else `false`.
   */
  function hashDelete(key) {
    var result = this.has(key) && delete this.__data__[key];
    this.size -= result ? 1 : 0;
    return result;
  }
  
  var _hashDelete = hashDelete;
  
  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED = '__lodash_hash_undefined__';
  
  /** Used for built-in method references. */
  var objectProto$3 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
  
  /**
   * Gets the hash value for `key`.
   *
   * @private
   * @name get
   * @memberOf Hash
   * @param {string} key The key of the value to get.
   * @returns {*} Returns the entry value.
   */
  function hashGet(key) {
    var data = this.__data__;
    if (_nativeCreate) {
      var result = data[key];
      return result === HASH_UNDEFINED ? undefined : result;
    }
    return hasOwnProperty$2.call(data, key) ? data[key] : undefined;
  }
  
  var _hashGet = hashGet;
  
  /** Used for built-in method references. */
  var objectProto$4 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
  
  /**
   * Checks if a hash value for `key` exists.
   *
   * @private
   * @name has
   * @memberOf Hash
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function hashHas(key) {
    var data = this.__data__;
    return _nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
  }
  
  var _hashHas = hashHas;
  
  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED$1 = '__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$1 : value;
    return this;
  }
  
  var _hashSet = hashSet;
  
  /**
   * Creates a hash object.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function Hash(entries) {
    var index = -1,
        length = entries == null ? 0 : entries.length;
  
    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }
  
  // Add methods to `Hash`.
  Hash.prototype.clear = _hashClear;
  Hash.prototype['delete'] = _hashDelete;
  Hash.prototype.get = _hashGet;
  Hash.prototype.has = _hashHas;
  Hash.prototype.set = _hashSet;
  
  var _Hash = Hash;
  
  /**
   * Removes all key-value entries from the map.
   *
   * @private
   * @name clear
   * @memberOf MapCache
   */
  function mapCacheClear() {
    this.size = 0;
    this.__data__ = {
      'hash': new _Hash,
      'map': new (_Map || _ListCache),
      'string': new _Hash
    };
  }
  
  var _mapCacheClear = mapCacheClear;
  
  /**
   * Checks if `value` is suitable for use as unique object key.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
   */
  function isKeyable(value) {
    var type = typeof value;
    return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
      ? (value !== '__proto__')
      : (value === null);
  }
  
  var _isKeyable = isKeyable;
  
  /**
   * Gets the data for `map`.
   *
   * @private
   * @param {Object} map The map to query.
   * @param {string} key The reference key.
   * @returns {*} Returns the map data.
   */
  function getMapData(map, key) {
    var data = map.__data__;
    return _isKeyable(key)
      ? data[typeof key == 'string' ? 'string' : 'hash']
      : data.map;
  }
  
  var _getMapData = getMapData;
  
  /**
   * 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 _mapCacheDelete = mapCacheDelete;
  
  /**
   * 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);
  }
  
  var _mapCacheGet = mapCacheGet;
  
  /**
   * 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);
  }
  
  var _mapCacheHas = mapCacheHas;
  
  /**
   * Sets the map `key` to `value`.
   *
   * @private
   * @name set
   * @memberOf MapCache
   * @param {string} key The key of the value to set.
   * @param {*} value The value to set.
   * @returns {Object} Returns the map cache instance.
   */
  function mapCacheSet(key, value) {
    var data = _getMapData(this, key),
        size = data.size;
  
    data.set(key, value);
    this.size += data.size == size ? 0 : 1;
    return this;
  }
  
  var _mapCacheSet = mapCacheSet;
  
  /**
   * Creates a map cache object to store key-value pairs.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function MapCache(entries) {
    var index = -1,
        length = entries == null ? 0 : entries.length;
  
    this.clear();
    while (++index < length) {
      var entry = entries[index];
      this.set(entry[0], entry[1]);
    }
  }
  
  // Add methods to `MapCache`.
  MapCache.prototype.clear = _mapCacheClear;
  MapCache.prototype['delete'] = _mapCacheDelete;
  MapCache.prototype.get = _mapCacheGet;
  MapCache.prototype.has = _mapCacheHas;
  MapCache.prototype.set = _mapCacheSet;
  
  var _MapCache = MapCache;
  
  /** Used as the size to enable large array optimizations. */
  var LARGE_ARRAY_SIZE = 200;
  
  /**
   * Sets the stack `key` to `value`.
   *
   * @private
   * @name set
   * @memberOf Stack
   * @param {string} key The key of the value to set.
   * @param {*} value The value to set.
   * @returns {Object} Returns the stack cache instance.
   */
  function stackSet(key, value) {
    var data = this.__data__;
    if (data instanceof _ListCache) {
      var pairs = data.__data__;
      if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
        pairs.push([key, value]);
        this.size = ++data.size;
        return this;
      }
      data = this.__data__ = new _MapCache(pairs);
    }
    data.set(key, value);
    this.size = data.size;
    return this;
  }
  
  var _stackSet = stackSet;
  
  /**
   * Creates a stack cache object to store key-value pairs.
   *
   * @private
   * @constructor
   * @param {Array} [entries] The key-value pairs to cache.
   */
  function Stack(entries) {
    var data = this.__data__ = new _ListCache(entries);
    this.size = data.size;
  }
  
  // Add methods to `Stack`.
  Stack.prototype.clear = _stackClear;
  Stack.prototype['delete'] = _stackDelete;
  Stack.prototype.get = _stackGet;
  Stack.prototype.has = _stackHas;
  Stack.prototype.set = _stackSet;
  
  var _Stack = Stack;
  
  /** Used to stand-in for `undefined` hash values. */
  var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
  
  /**
   * Adds `value` to the array cache.
   *
   * @private
   * @name add
   * @memberOf SetCache
   * @alias push
   * @param {*} value The value to cache.
   * @returns {Object} Returns the cache instance.
   */
  function setCacheAdd(value) {
    this.__data__.set(value, HASH_UNDEFINED$2);
    return this;
  }
  
  var _setCacheAdd = setCacheAdd;
  
  /**
   * Checks if `value` is in the array cache.
   *
   * @private
   * @name has
   * @memberOf SetCache
   * @param {*} value The value to search for.
   * @returns {number} Returns `true` if `value` is found, else `false`.
   */
  function setCacheHas(value) {
    return this.__data__.has(value);
  }
  
  var _setCacheHas = setCacheHas;
  
  /**
   *
   * Creates an array cache object to store unique values.
   *
   * @private
   * @constructor
   * @param {Array} [values] The values to cache.
   */
  function SetCache(values) {
    var index = -1,
        length = values == null ? 0 : values.length;
  
    this.__data__ = new _MapCache;
    while (++index < length) {
      this.add(values[index]);
    }
  }
  
  // Add methods to `SetCache`.
  SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd;
  SetCache.prototype.has = _setCacheHas;
  
  var _SetCache = SetCache;
  
  /**
   * A specialized version of `_.some` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} predicate The function invoked per iteration.
   * @returns {boolean} Returns `true` if any element passes the predicate check,
   *  else `false`.
   */
  function arraySome(array, predicate) {
    var index = -1,
        length = array == null ? 0 : array.length;
  
    while (++index < length) {
      if (predicate(array[index], index, array)) {
        return true;
      }
    }
    return false;
  }
  
  var _arraySome = arraySome;
  
  /**
   * Checks if a `cache` value for `key` exists.
   *
   * @private
   * @param {Object} cache The cache to query.
   * @param {string} key The key of the entry to check.
   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
   */
  function cacheHas(cache, key) {
    return cache.has(key);
  }
  
  var _cacheHas = cacheHas;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG$2 = 1;
  var COMPARE_UNORDERED_FLAG$1 = 2;
  
  /**
   * A specialized version of `baseIsEqualDeep` for arrays with support for
   * partial deep comparisons.
   *
   * @private
   * @param {Array} array The array to compare.
   * @param {Array} other The other array to compare.
   * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
   * @param {Function} customizer The function to customize comparisons.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Object} stack Tracks traversed `array` and `other` objects.
   * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
   */
  function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
    var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2,
        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$1) ? new _SetCache : undefined;
  
    stack.set(array, other);
    stack.set(other, array);
  
    // Ignore non-index properties.
    while (++index < arrLength) {
      var arrValue = array[index],
          othValue = other[index];
  
      if (customizer) {
        var compared = isPartial
          ? customizer(othValue, arrValue, index, other, array, stack)
          : customizer(arrValue, othValue, index, array, other, stack);
      }
      if (compared !== undefined) {
        if (compared) {
          continue;
        }
        result = false;
        break;
      }
      // Recursively compare arrays (susceptible to call stack limits).
      if (seen) {
        if (!_arraySome(other, function(othValue, othIndex) {
              if (!_cacheHas(seen, othIndex) &&
                  (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
                return seen.push(othIndex);
              }
            })) {
          result = false;
          break;
        }
      } else if (!(
            arrValue === othValue ||
              equalFunc(arrValue, othValue, bitmask, customizer, stack)
          )) {
        result = false;
        break;
      }
    }
    stack['delete'](array);
    stack['delete'](other);
    return result;
  }
  
  var _equalArrays = equalArrays;
  
  /** Built-in value references. */
  var Uint8Array = _root.Uint8Array;
  
  var _Uint8Array = Uint8Array;
  
  /**
   * Converts `map` to its key-value pairs.
   *
   * @private
   * @param {Object} map The map to convert.
   * @returns {Array} Returns the key-value pairs.
   */
  function mapToArray(map) {
    var index = -1,
        result = Array(map.size);
  
    map.forEach(function(value, key) {
      result[++index] = [key, value];
    });
    return result;
  }
  
  var _mapToArray = mapToArray;
  
  /**
   * Converts `set` to an array of its values.
   *
   * @private
   * @param {Object} set The set to convert.
   * @returns {Array} Returns the values.
   */
  function setToArray(set) {
    var index = -1,
        result = Array(set.size);
  
    set.forEach(function(value) {
      result[++index] = value;
    });
    return result;
  }
  
  var _setToArray = setToArray;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG$3 = 1;
  var COMPARE_UNORDERED_FLAG$2 = 2;
  
  /** `Object#toString` result references. */
  var boolTag = '[object Boolean]';
  var dateTag = '[object Date]';
  var errorTag = '[object Error]';
  var mapTag = '[object Map]';
  var numberTag = '[object Number]';
  var regexpTag = '[object RegExp]';
  var setTag = '[object Set]';
  var stringTag = '[object String]';
  var symbolTag = '[object Symbol]';
  
  var arrayBufferTag = '[object ArrayBuffer]';
  var dataViewTag = '[object DataView]';
  
  /** Used to convert symbols to primitives and strings. */
  var symbolProto = _Symbol ? _Symbol.prototype : undefined;
  var symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  
  /**
   * A specialized version of `baseIsEqualDeep` for comparing objects of
   * the same `toStringTag`.
   *
   * **Note:** This function only supports comparing values with tags of
   * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {string} tag The `toStringTag` of the objects to compare.
   * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
   * @param {Function} customizer The function to customize comparisons.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Object} stack Tracks traversed `object` and `other` objects.
   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
   */
  function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
    switch (tag) {
      case dataViewTag:
        if ((object.byteLength != other.byteLength) ||
            (object.byteOffset != other.byteOffset)) {
          return false;
        }
        object = object.buffer;
        other = other.buffer;
  
      case arrayBufferTag:
        if ((object.byteLength != other.byteLength) ||
            !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) {
          return false;
        }
        return true;
  
      case boolTag:
      case dateTag:
      case numberTag:
        // Coerce booleans to `1` or `0` and dates to milliseconds.
        // Invalid dates are coerced to `NaN`.
        return eq_1(+object, +other);
  
      case errorTag:
        return object.name == other.name && object.message == other.message;
  
      case regexpTag:
      case stringTag:
        // Coerce regexes to strings and treat strings, primitives and objects,
        // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
        // for more details.
        return object == (other + '');
  
      case mapTag:
        var convert = _mapToArray;
  
      case setTag:
        var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3;
        convert || (convert = _setToArray);
  
        if (object.size != other.size && !isPartial) {
          return false;
        }
        // Assume cyclic values are equal.
        var stacked = stack.get(object);
        if (stacked) {
          return stacked == other;
        }
        bitmask |= COMPARE_UNORDERED_FLAG$2;
  
        // Recursively compare objects (susceptible to call stack limits).
        stack.set(object, other);
        var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
        stack['delete'](object);
        return result;
  
      case symbolTag:
        if (symbolValueOf) {
          return symbolValueOf.call(object) == symbolValueOf.call(other);
        }
    }
    return false;
  }
  
  var _equalByTag = equalByTag;
  
  /**
   * Appends the elements of `values` to `array`.
   *
   * @private
   * @param {Array} array The array to modify.
   * @param {Array} values The values to append.
   * @returns {Array} Returns `array`.
   */
  function arrayPush(array, values) {
    var index = -1,
        length = values.length,
        offset = array.length;
  
    while (++index < length) {
      array[offset + index] = values[index];
    }
    return array;
  }
  
  var _arrayPush = arrayPush;
  
  /**
   * Checks if `value` is classified as an `Array` object.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an array, else `false`.
   * @example
   *
   * _.isArray([1, 2, 3]);
   * // => true
   *
   * _.isArray(document.body.children);
   * // => false
   *
   * _.isArray('abc');
   * // => false
   *
   * _.isArray(_.noop);
   * // => false
   */
  var isArray = Array.isArray;
  
  var isArray_1 = isArray;
  
  /**
   * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
   * `keysFunc` and `symbolsFunc` to get the enumerable property names and
   * symbols of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Function} keysFunc The function to get the keys of `object`.
   * @param {Function} symbolsFunc The function to get the symbols of `object`.
   * @returns {Array} Returns the array of property names and symbols.
   */
  function baseGetAllKeys(object, keysFunc, symbolsFunc) {
    var result = keysFunc(object);
    return isArray_1(object) ? result : _arrayPush(result, symbolsFunc(object));
  }
  
  var _baseGetAllKeys = baseGetAllKeys;
  
  /**
   * 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;
  }
  
  var _arrayFilter = arrayFilter;
  
  /**
   * This method returns a new empty array.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {Array} Returns the new empty array.
   * @example
   *
   * var arrays = _.times(2, _.stubArray);
   *
   * console.log(arrays);
   * // => [[], []]
   *
   * console.log(arrays[0] === arrays[1]);
   * // => false
   */
  function stubArray() {
    return [];
  }
  
  var stubArray_1 = stubArray;
  
  /** Used for built-in method references. */
  var objectProto$7 = Object.prototype;
  
  /** Built-in value references. */
  var propertyIsEnumerable = objectProto$7.propertyIsEnumerable;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeGetSymbols = Object.getOwnPropertySymbols;
  
  /**
   * Creates an array of the own enumerable symbols of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of symbols.
   */
  var getSymbols = !nativeGetSymbols ? stubArray_1 : function(object) {
    if (object == null) {
      return [];
    }
    object = Object(object);
    return _arrayFilter(nativeGetSymbols(object), function(symbol) {
      return propertyIsEnumerable.call(object, symbol);
    });
  };
  
  var _getSymbols = getSymbols;
  
  /**
   * The base implementation of `_.times` without support for iteratee shorthands
   * or max array length checks.
   *
   * @private
   * @param {number} n The number of times to invoke `iteratee`.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the array of results.
   */
  function baseTimes(n, iteratee) {
    var index = -1,
        result = Array(n);
  
    while (++index < n) {
      result[index] = iteratee(index);
    }
    return result;
  }
  
  var _baseTimes = baseTimes;
  
  /**
   * Checks if `value` is object-like. A value is object-like if it's not `null`
   * and has a `typeof` result of "object".
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
   * @example
   *
   * _.isObjectLike({});
   * // => true
   *
   * _.isObjectLike([1, 2, 3]);
   * // => true
   *
   * _.isObjectLike(_.noop);
   * // => false
   *
   * _.isObjectLike(null);
   * // => false
   */
  function isObjectLike(value) {
    return value != null && typeof value == 'object';
  }
  
  var isObjectLike_1 = isObjectLike;
  
  /** `Object#toString` result references. */
  var argsTag$1 = '[object Arguments]';
  
  /**
   * The base implementation of `_.isArguments`.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an `arguments` object,
   */
  function baseIsArguments(value) {
    return isObjectLike_1(value) && _baseGetTag(value) == argsTag$1;
  }
  
  var _baseIsArguments = baseIsArguments;
  
  /** Used for built-in method references. */
  var objectProto$9 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
  
  /** Built-in value references. */
  var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
  
  /**
   * Checks if `value` is likely an `arguments` object.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is an `arguments` object,
   *  else `false`.
   * @example
   *
   * _.isArguments(function() { return arguments; }());
   * // => true
   *
   * _.isArguments([1, 2, 3]);
   * // => false
   */
  var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) {
    return isObjectLike_1(value) && hasOwnProperty$7.call(value, 'callee') &&
      !propertyIsEnumerable$1.call(value, 'callee');
  };
  
  var isArguments_1 = isArguments;
  
  /**
   * This method returns `false`.
   *
   * @static
   * @memberOf _
   * @since 4.13.0
   * @category Util
   * @returns {boolean} Returns `false`.
   * @example
   *
   * _.times(2, _.stubFalse);
   * // => [false, false]
   */
  function stubFalse() {
    return false;
  }
  
  var stubFalse_1 = stubFalse;
  
  var isBuffer_1 = createCommonjsModule(function (module, exports) {
  /** Detect free variable `exports`. */
  var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;
  
  /** Detect free variable `module`. */
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
  
  /** Detect the popular CommonJS extension `module.exports`. */
  var moduleExports = freeModule && freeModule.exports === freeExports;
  
  /** Built-in value references. */
  var Buffer = moduleExports ? _root.Buffer : undefined;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
  
  /**
   * Checks if `value` is a buffer.
   *
   * @static
   * @memberOf _
   * @since 4.3.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
   * @example
   *
   * _.isBuffer(new Buffer(2));
   * // => true
   *
   * _.isBuffer(new Uint8Array(2));
   * // => false
   */
  var isBuffer = nativeIsBuffer || stubFalse_1;
  
  module.exports = isBuffer;
  });
  
  /** Used as references for various `Number` constants. */
  var MAX_SAFE_INTEGER = 9007199254740991;
  
  /** Used to detect unsigned integer values. */
  var reIsUint = /^(?:0|[1-9]\d*)$/;
  
  /**
   * Checks if `value` is a valid array-like index.
   *
   * @private
   * @param {*} value The value to check.
   * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
   * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
   */
  function isIndex(value, length) {
    length = length == null ? MAX_SAFE_INTEGER : length;
    return !!length &&
      (typeof value == 'number' || reIsUint.test(value)) &&
      (value > -1 && value % 1 == 0 && value < length);
  }
  
  var _isIndex = isIndex;
  
  /** Used as references for various `Number` constants. */
  var MAX_SAFE_INTEGER$1 = 9007199254740991;
  
  /**
   * Checks if `value` is a valid array-like length.
   *
   * **Note:** This method is loosely based on
   * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
   * @example
   *
   * _.isLength(3);
   * // => true
   *
   * _.isLength(Number.MIN_VALUE);
   * // => false
   *
   * _.isLength(Infinity);
   * // => false
   *
   * _.isLength('3');
   * // => false
   */
  function isLength(value) {
    return typeof value == 'number' &&
      value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1;
  }
  
  var isLength_1 = isLength;
  
  /** `Object#toString` result references. */
  var argsTag$2 = '[object Arguments]';
  var arrayTag$1 = '[object Array]';
  var boolTag$1 = '[object Boolean]';
  var dateTag$1 = '[object Date]';
  var errorTag$1 = '[object Error]';
  var funcTag$1 = '[object Function]';
  var mapTag$1 = '[object Map]';
  var numberTag$1 = '[object Number]';
  var objectTag$1 = '[object Object]';
  var regexpTag$1 = '[object RegExp]';
  var setTag$1 = '[object Set]';
  var stringTag$1 = '[object String]';
  var weakMapTag = '[object WeakMap]';
  
  var arrayBufferTag$1 = '[object ArrayBuffer]';
  var dataViewTag$1 = '[object DataView]';
  var float32Tag = '[object Float32Array]';
  var float64Tag = '[object Float64Array]';
  var int8Tag = '[object Int8Array]';
  var int16Tag = '[object Int16Array]';
  var int32Tag = '[object Int32Array]';
  var uint8Tag = '[object Uint8Array]';
  var uint8ClampedTag = '[object Uint8ClampedArray]';
  var uint16Tag = '[object Uint16Array]';
  var 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$2] = typedArrayTags[arrayTag$1] =
  typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] =
  typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag$1] =
  typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
  typedArrayTags[mapTag$1] = typedArrayTags[numberTag$1] =
  typedArrayTags[objectTag$1] = typedArrayTags[regexpTag$1] =
  typedArrayTags[setTag$1] = typedArrayTags[stringTag$1] =
  typedArrayTags[weakMapTag] = false;
  
  /**
   * The base implementation of `_.isTypedArray` without Node.js optimizations.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
   */
  function baseIsTypedArray(value) {
    return isObjectLike_1(value) &&
      isLength_1(value.length) && !!typedArrayTags[_baseGetTag(value)];
  }
  
  var _baseIsTypedArray = baseIsTypedArray;
  
  /**
   * The base implementation of `_.unary` without support for storing metadata.
   *
   * @private
   * @param {Function} func The function to cap arguments for.
   * @returns {Function} Returns the new capped function.
   */
  function baseUnary(func) {
    return function(value) {
      return func(value);
    };
  }
  
  var _baseUnary = baseUnary;
  
  var _nodeUtil = createCommonjsModule(function (module, exports) {
  /** Detect free variable `exports`. */
  var freeExports = 'object' == 'object' && exports && !exports.nodeType && exports;
  
  /** Detect free variable `module`. */
  var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
  
  /** Detect the popular CommonJS extension `module.exports`. */
  var moduleExports = freeModule && freeModule.exports === freeExports;
  
  /** Detect free variable `process` from Node.js. */
  var freeProcess = moduleExports && _freeGlobal.process;
  
  /** Used to access faster Node.js helpers. */
  var nodeUtil = (function() {
    try {
      return freeProcess && freeProcess.binding && freeProcess.binding('util');
    } catch (e) {}
  }());
  
  module.exports = nodeUtil;
  });
  
  /* Node.js helper references. */
  var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray;
  
  /**
   * Checks if `value` is classified as a typed array.
   *
   * @static
   * @memberOf _
   * @since 3.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
   * @example
   *
   * _.isTypedArray(new Uint8Array);
   * // => true
   *
   * _.isTypedArray([]);
   * // => false
   */
  var isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray;
  
  var isTypedArray_1 = isTypedArray;
  
  /** Used for built-in method references. */
  var objectProto$8 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
  
  /**
   * Creates an array of the enumerable property names of the array-like `value`.
   *
   * @private
   * @param {*} value The value to query.
   * @param {boolean} inherited Specify returning inherited property names.
   * @returns {Array} Returns the array of property names.
   */
  function arrayLikeKeys(value, inherited) {
    var isArr = isArray_1(value),
        isArg = !isArr && isArguments_1(value),
        isBuff = !isArr && !isArg && isBuffer_1(value),
        isType = !isArr && !isArg && !isBuff && isTypedArray_1(value),
        skipIndexes = isArr || isArg || isBuff || isType,
        result = skipIndexes ? _baseTimes(value.length, String) : [],
        length = result.length;
  
    for (var key in value) {
      if ((inherited || hasOwnProperty$6.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;
  }
  
  var _arrayLikeKeys = arrayLikeKeys;
  
  /** Used for built-in method references. */
  var objectProto$11 = Object.prototype;
  
  /**
   * Checks if `value` is likely a prototype object.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
   */
  function isPrototype(value) {
    var Ctor = value && value.constructor,
        proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$11;
  
    return value === proto;
  }
  
  var _isPrototype = isPrototype;
  
  /**
   * Creates a unary function that invokes `func` with its argument transformed.
   *
   * @private
   * @param {Function} func The function to wrap.
   * @param {Function} transform The argument transform.
   * @returns {Function} Returns the new function.
   */
  function overArg(func, transform) {
    return function(arg) {
      return func(transform(arg));
    };
  }
  
  var _overArg = overArg;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeKeys = _overArg(Object.keys, Object);
  
  var _nativeKeys = nativeKeys;
  
  /** Used for built-in method references. */
  var objectProto$10 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$8 = objectProto$10.hasOwnProperty;
  
  /**
   * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of property names.
   */
  function baseKeys(object) {
    if (!_isPrototype(object)) {
      return _nativeKeys(object);
    }
    var result = [];
    for (var key in Object(object)) {
      if (hasOwnProperty$8.call(object, key) && key != 'constructor') {
        result.push(key);
      }
    }
    return result;
  }
  
  var _baseKeys = baseKeys;
  
  /**
   * Checks if `value` is array-like. A value is considered array-like if it's
   * not a function and has a `value.length` that's an integer greater than or
   * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
   * @example
   *
   * _.isArrayLike([1, 2, 3]);
   * // => true
   *
   * _.isArrayLike(document.body.children);
   * // => true
   *
   * _.isArrayLike('abc');
   * // => true
   *
   * _.isArrayLike(_.noop);
   * // => false
   */
  function isArrayLike(value) {
    return value != null && isLength_1(value.length) && !isFunction_1(value);
  }
  
  var isArrayLike_1 = isArrayLike;
  
  /**
   * Creates an array of the own enumerable property names of `object`.
   *
   * **Note:** Non-object values are coerced to objects. See the
   * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
   * for more details.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Object
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of property names.
   * @example
   *
   * function Foo() {
   *   this.a = 1;
   *   this.b = 2;
   * }
   *
   * Foo.prototype.c = 3;
   *
   * _.keys(new Foo);
   * // => ['a', 'b'] (iteration order is not guaranteed)
   *
   * _.keys('hi');
   * // => ['0', '1']
   */
  function keys(object) {
    return isArrayLike_1(object) ? _arrayLikeKeys(object) : _baseKeys(object);
  }
  
  var keys_1 = keys;
  
  /**
   * Creates an array of own enumerable property names and symbols of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Array} Returns the array of property names and symbols.
   */
  function getAllKeys(object) {
    return _baseGetAllKeys(object, keys_1, _getSymbols);
  }
  
  var _getAllKeys = getAllKeys;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG$4 = 1;
  
  /** Used for built-in method references. */
  var objectProto$6 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
  
  /**
   * A specialized version of `baseIsEqualDeep` for objects with support for
   * partial deep comparisons.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
   * @param {Function} customizer The function to customize comparisons.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Object} stack Tracks traversed `object` and `other` objects.
   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
   */
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
    var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4,
        objProps = _getAllKeys(object),
        objLength = objProps.length,
        othProps = _getAllKeys(other),
        othLength = othProps.length;
  
    if (objLength != othLength && !isPartial) {
      return false;
    }
    var index = objLength;
    while (index--) {
      var key = objProps[index];
      if (!(isPartial ? key in other : hasOwnProperty$5.call(other, key))) {
        return false;
      }
    }
    // Assume cyclic values are equal.
    var stacked = stack.get(object);
    if (stacked && stack.get(other)) {
      return stacked == other;
    }
    var result = true;
    stack.set(object, other);
    stack.set(other, object);
  
    var skipCtor = isPartial;
    while (++index < objLength) {
      key = objProps[index];
      var objValue = object[key],
          othValue = other[key];
  
      if (customizer) {
        var compared = isPartial
          ? customizer(othValue, objValue, key, other, object, stack)
          : customizer(objValue, othValue, key, object, other, stack);
      }
      // Recursively compare objects (susceptible to call stack limits).
      if (!(compared === undefined
            ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
            : compared
          )) {
        result = false;
        break;
      }
      skipCtor || (skipCtor = key == 'constructor');
    }
    if (result && !skipCtor) {
      var objCtor = object.constructor,
          othCtor = other.constructor;
  
      // Non `Object` object instances with different constructors are not equal.
      if (objCtor != othCtor &&
          ('constructor' in object && 'constructor' in other) &&
          !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
            typeof othCtor == 'function' && othCtor instanceof othCtor)) {
        result = false;
      }
    }
    stack['delete'](object);
    stack['delete'](other);
    return result;
  }
  
  var _equalObjects = equalObjects;
  
  /* Built-in method references that are verified to be native. */
  var DataView = _getNative(_root, 'DataView');
  
  var _DataView = DataView;
  
  /* Built-in method references that are verified to be native. */
  var Promise$1 = _getNative(_root, 'Promise');
  
  var _Promise = Promise$1;
  
  /* Built-in method references that are verified to be native. */
  var Set = _getNative(_root, 'Set');
  
  var _Set = Set;
  
  /* Built-in method references that are verified to be native. */
  var WeakMap = _getNative(_root, 'WeakMap');
  
  var _WeakMap = WeakMap;
  
  /** `Object#toString` result references. */
  var mapTag$2 = '[object Map]';
  var objectTag$2 = '[object Object]';
  var promiseTag = '[object Promise]';
  var setTag$2 = '[object Set]';
  var weakMapTag$1 = '[object WeakMap]';
  
  var dataViewTag$2 = '[object DataView]';
  
  /** Used to detect maps, sets, and weakmaps. */
  var dataViewCtorString = _toSource(_DataView);
  var mapCtorString = _toSource(_Map);
  var promiseCtorString = _toSource(_Promise);
  var setCtorString = _toSource(_Set);
  var weakMapCtorString = _toSource(_WeakMap);
  
  /**
   * Gets the `toStringTag` of `value`.
   *
   * @private
   * @param {*} value The value to query.
   * @returns {string} Returns the `toStringTag`.
   */
  var getTag = _baseGetTag;
  
  // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
      (_Map && getTag(new _Map) != mapTag$2) ||
      (_Promise && getTag(_Promise.resolve()) != promiseTag) ||
      (_Set && getTag(new _Set) != setTag$2) ||
      (_WeakMap && getTag(new _WeakMap) != weakMapTag$1)) {
    getTag = function(value) {
      var result = _baseGetTag(value),
          Ctor = result == objectTag$2 ? value.constructor : undefined,
          ctorString = Ctor ? _toSource(Ctor) : '';
  
      if (ctorString) {
        switch (ctorString) {
          case dataViewCtorString: return dataViewTag$2;
          case mapCtorString: return mapTag$2;
          case promiseCtorString: return promiseTag;
          case setCtorString: return setTag$2;
          case weakMapCtorString: return weakMapTag$1;
        }
      }
      return result;
    };
  }
  
  var _getTag = getTag;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG$1 = 1;
  
  /** `Object#toString` result references. */
  var argsTag = '[object Arguments]';
  var arrayTag = '[object Array]';
  var objectTag = '[object Object]';
  
  /** Used for built-in method references. */
  var objectProto$5 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
  
  /**
   * A specialized version of `baseIsEqual` for arrays and objects which performs
   * deep comparisons and tracks traversed objects enabling objects with circular
   * references to be compared.
   *
   * @private
   * @param {Object} object The object to compare.
   * @param {Object} other The other object to compare.
   * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
   * @param {Function} customizer The function to customize comparisons.
   * @param {Function} equalFunc The function to determine equivalents of values.
   * @param {Object} [stack] Tracks traversed `object` and `other` objects.
   * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
   */
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
    var objIsArr = isArray_1(object),
        othIsArr = isArray_1(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_1(object)) {
      if (!isBuffer_1(other)) {
        return false;
      }
      objIsArr = true;
      objIsObj = false;
    }
    if (isSameTag && !objIsObj) {
      stack || (stack = new _Stack);
      return (objIsArr || isTypedArray_1(object))
        ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack)
        : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
    }
    if (!(bitmask & COMPARE_PARTIAL_FLAG$1)) {
      var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, '__wrapped__'),
          othIsWrapped = othIsObj && hasOwnProperty$4.call(other, '__wrapped__');
  
      if (objIsWrapped || othIsWrapped) {
        var objUnwrapped = objIsWrapped ? object.value() : object,
            othUnwrapped = othIsWrapped ? other.value() : other;
  
        stack || (stack = new _Stack);
        return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
      }
    }
    if (!isSameTag) {
      return false;
    }
    stack || (stack = new _Stack);
    return _equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  }
  
  var _baseIsEqualDeep = baseIsEqualDeep;
  
  /**
   * The base implementation of `_.isEqual` which supports partial comparisons
   * and tracks traversed objects.
   *
   * @private
   * @param {*} value The value to compare.
   * @param {*} other The other value to compare.
   * @param {boolean} bitmask The bitmask flags.
   *  1 - Unordered comparison
   *  2 - Partial comparison
   * @param {Function} [customizer] The function to customize comparisons.
   * @param {Object} [stack] Tracks traversed `value` and `other` objects.
   * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
   */
  function baseIsEqual(value, other, bitmask, customizer, stack) {
    if (value === other) {
      return true;
    }
    if (value == null || other == null || (!isObjectLike_1(value) && !isObjectLike_1(other))) {
      return value !== value && other !== other;
    }
    return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  }
  
  var _baseIsEqual = baseIsEqual;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG = 1;
  var COMPARE_UNORDERED_FLAG = 2;
  
  /**
   * The base implementation of `_.isMatch` without support for iteratee shorthands.
   *
   * @private
   * @param {Object} object The object to inspect.
   * @param {Object} source The object of property values to match.
   * @param {Array} matchData The property names, values, and compare flags to match.
   * @param {Function} [customizer] The function to customize comparisons.
   * @returns {boolean} Returns `true` if `object` is a match, else `false`.
   */
  function baseIsMatch(object, source, matchData, customizer) {
    var index = matchData.length,
        length = index,
        noCustomizer = !customizer;
  
    if (object == null) {
      return !length;
    }
    object = Object(object);
    while (index--) {
      var data = matchData[index];
      if ((noCustomizer && data[2])
            ? data[1] !== object[data[0]]
            : !(data[0] in object)
          ) {
        return false;
      }
    }
    while (++index < length) {
      data = matchData[index];
      var key = data[0],
          objValue = object[key],
          srcValue = data[1];
  
      if (noCustomizer && data[2]) {
        if (objValue === undefined && !(key in object)) {
          return false;
        }
      } else {
        var stack = new _Stack;
        if (customizer) {
          var result = customizer(objValue, srcValue, key, object, source, stack);
        }
        if (!(result === undefined
              ? _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
              : result
            )) {
          return false;
        }
      }
    }
    return true;
  }
  
  var _baseIsMatch = baseIsMatch;
  
  /**
   * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` if suitable for strict
   *  equality comparisons, else `false`.
   */
  function isStrictComparable(value) {
    return value === value && !isObject_1(value);
  }
  
  var _isStrictComparable = isStrictComparable;
  
  /**
   * Gets the property names, values, and compare flags of `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @returns {Array} Returns the match data of `object`.
   */
  function getMatchData(object) {
    var result = keys_1(object),
        length = result.length;
  
    while (length--) {
      var key = result[length],
          value = object[key];
  
      result[length] = [key, value, _isStrictComparable(value)];
    }
    return result;
  }
  
  var _getMatchData = getMatchData;
  
  /**
   * A specialized version of `matchesProperty` for source values suitable
   * for strict equality comparisons, i.e. `===`.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @param {*} srcValue The value to match.
   * @returns {Function} Returns the new spec function.
   */
  function matchesStrictComparable(key, srcValue) {
    return function(object) {
      if (object == null) {
        return false;
      }
      return object[key] === srcValue &&
        (srcValue !== undefined || (key in Object(object)));
    };
  }
  
  var _matchesStrictComparable = matchesStrictComparable;
  
  /**
   * The base implementation of `_.matches` which doesn't clone `source`.
   *
   * @private
   * @param {Object} source The object of property values to match.
   * @returns {Function} Returns the new spec function.
   */
  function baseMatches(source) {
    var matchData = _getMatchData(source);
    if (matchData.length == 1 && matchData[0][2]) {
      return _matchesStrictComparable(matchData[0][0], matchData[0][1]);
    }
    return function(object) {
      return object === source || _baseIsMatch(object, source, matchData);
    };
  }
  
  var _baseMatches = baseMatches;
  
  /** `Object#toString` result references. */
  var symbolTag$1 = '[object Symbol]';
  
  /**
   * Checks if `value` is classified as a `Symbol` primitive or object.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
   * @example
   *
   * _.isSymbol(Symbol.iterator);
   * // => true
   *
   * _.isSymbol('abc');
   * // => false
   */
  function isSymbol(value) {
    return typeof value == 'symbol' ||
      (isObjectLike_1(value) && _baseGetTag(value) == symbolTag$1);
  }
  
  var isSymbol_1 = isSymbol;
  
  /** Used to match property names within property paths. */
  var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
  var reIsPlainProp = /^\w*$/;
  
  /**
   * Checks if `value` is a property name and not a property path.
   *
   * @private
   * @param {*} value The value to check.
   * @param {Object} [object] The object to query keys on.
   * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
   */
  function isKey(value, object) {
    if (isArray_1(value)) {
      return false;
    }
    var type = typeof value;
    if (type == 'number' || type == 'symbol' || type == 'boolean' ||
        value == null || isSymbol_1(value)) {
      return true;
    }
    return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
      (object != null && value in Object(object));
  }
  
  var _isKey = isKey;
  
  /** Error message constants. */
  var FUNC_ERROR_TEXT = 'Expected a function';
  
  /**
   * Creates a function that memoizes the result of `func`. If `resolver` is
   * provided, it determines the cache key for storing the result based on the
   * arguments provided to the memoized function. By default, the first argument
   * provided to the memoized function is used as the map cache key. The `func`
   * is invoked with the `this` binding of the memoized function.
   *
   * **Note:** The cache is exposed as the `cache` property on the memoized
   * function. Its creation may be customized by replacing the `_.memoize.Cache`
   * constructor with one whose instances implement the
   * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
   * method interface of `clear`, `delete`, `get`, `has`, and `set`.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Function
   * @param {Function} func The function to have its output memoized.
   * @param {Function} [resolver] The function to resolve the cache key.
   * @returns {Function} Returns the new memoized function.
   * @example
   *
   * var object = { 'a': 1, 'b': 2 };
   * var other = { 'c': 3, 'd': 4 };
   *
   * var values = _.memoize(_.values);
   * values(object);
   * // => [1, 2]
   *
   * values(other);
   * // => [3, 4]
   *
   * object.a = 2;
   * values(object);
   * // => [1, 2]
   *
   * // Modify the result cache.
   * values.cache.set(object, ['a', 'b']);
   * values(object);
   * // => ['a', 'b']
   *
   * // Replace `_.memoize.Cache`.
   * _.memoize.Cache = WeakMap;
   */
  function memoize(func, resolver) {
    if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
      throw new TypeError(FUNC_ERROR_TEXT);
    }
    var memoized = function() {
      var args = arguments,
          key = resolver ? resolver.apply(this, args) : args[0],
          cache = memoized.cache;
  
      if (cache.has(key)) {
        return cache.get(key);
      }
      var result = func.apply(this, args);
      memoized.cache = cache.set(key, result) || cache;
      return result;
    };
    memoized.cache = new (memoize.Cache || _MapCache);
    return memoized;
  }
  
  // Expose `MapCache`.
  memoize.Cache = _MapCache;
  
  var memoize_1 = memoize;
  
  /** Used as the maximum memoize cache size. */
  var MAX_MEMOIZE_SIZE = 500;
  
  /**
   * A specialized version of `_.memoize` which clears the memoized function's
   * cache when it exceeds `MAX_MEMOIZE_SIZE`.
   *
   * @private
   * @param {Function} func The function to have its output memoized.
   * @returns {Function} Returns the new memoized function.
   */
  function memoizeCapped(func) {
    var result = memoize_1(func, function(key) {
      if (cache.size === MAX_MEMOIZE_SIZE) {
        cache.clear();
      }
      return key;
    });
  
    var cache = result.cache;
    return result;
  }
  
  var _memoizeCapped = memoizeCapped;
  
  /** Used to match property names within property paths. */
  var reLeadingDot = /^\./;
  var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  
  /** Used to match backslashes in property paths. */
  var reEscapeChar = /\\(\\)?/g;
  
  /**
   * Converts `string` to a property path array.
   *
   * @private
   * @param {string} string The string to convert.
   * @returns {Array} Returns the property path array.
   */
  var stringToPath = _memoizeCapped(function(string) {
    var result = [];
    if (reLeadingDot.test(string)) {
      result.push('');
    }
    string.replace(rePropName, function(match, number, quote, string) {
      result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
    });
    return result;
  });
  
  var _stringToPath = stringToPath;
  
  /**
   * A specialized version of `_.map` for arrays without support for iteratee
   * shorthands.
   *
   * @private
   * @param {Array} [array] The array to iterate over.
   * @param {Function} iteratee The function invoked per iteration.
   * @returns {Array} Returns the new mapped array.
   */
  function arrayMap(array, iteratee) {
    var index = -1,
        length = array == null ? 0 : array.length,
        result = Array(length);
  
    while (++index < length) {
      result[index] = iteratee(array[index], index, array);
    }
    return result;
  }
  
  var _arrayMap = arrayMap;
  
  /** Used as references for various `Number` constants. */
  var INFINITY = 1 / 0;
  
  /** Used to convert symbols to primitives and strings. */
  var symbolProto$1 = _Symbol ? _Symbol.prototype : undefined;
  var symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
  
  /**
   * The base implementation of `_.toString` which doesn't convert nullish
   * values to empty strings.
   *
   * @private
   * @param {*} value The value to process.
   * @returns {string} Returns the string.
   */
  function baseToString(value) {
    // Exit early for strings to avoid a performance hit in some environments.
    if (typeof value == 'string') {
      return value;
    }
    if (isArray_1(value)) {
      // Recursively convert values (susceptible to call stack limits).
      return _arrayMap(value, baseToString) + '';
    }
    if (isSymbol_1(value)) {
      return symbolToString ? symbolToString.call(value) : '';
    }
    var result = (value + '');
    return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  }
  
  var _baseToString = baseToString;
  
  /**
   * Converts `value` to a string. An empty string is returned for `null`
   * and `undefined` values. The sign of `-0` is preserved.
   *
   * @static
   * @memberOf _
   * @since 4.0.0
   * @category Lang
   * @param {*} value The value to convert.
   * @returns {string} Returns the converted string.
   * @example
   *
   * _.toString(null);
   * // => ''
   *
   * _.toString(-0);
   * // => '-0'
   *
   * _.toString([1, 2, 3]);
   * // => '1,2,3'
   */
  function toString(value) {
    return value == null ? '' : _baseToString(value);
  }
  
  var toString_1 = toString;
  
  /**
   * Casts `value` to a path array if it's not one.
   *
   * @private
   * @param {*} value The value to inspect.
   * @param {Object} [object] The object to query keys on.
   * @returns {Array} Returns the cast property path array.
   */
  function castPath(value, object) {
    if (isArray_1(value)) {
      return value;
    }
    return _isKey(value, object) ? [value] : _stringToPath(toString_1(value));
  }
  
  var _castPath = castPath;
  
  /** Used as references for various `Number` constants. */
  var INFINITY$1 = 1 / 0;
  
  /**
   * Converts `value` to a string key if it's not a string or symbol.
   *
   * @private
   * @param {*} value The value to inspect.
   * @returns {string|symbol} Returns the key.
   */
  function toKey(value) {
    if (typeof value == 'string' || isSymbol_1(value)) {
      return value;
    }
    var result = (value + '');
    return (result == '0' && (1 / value) == -INFINITY$1) ? '-0' : result;
  }
  
  var _toKey = toKey;
  
  /**
   * The base implementation of `_.get` without support for default values.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to get.
   * @returns {*} Returns the resolved value.
   */
  function baseGet(object, path) {
    path = _castPath(path, object);
  
    var index = 0,
        length = path.length;
  
    while (object != null && index < length) {
      object = object[_toKey(path[index++])];
    }
    return (index && index == length) ? object : undefined;
  }
  
  var _baseGet = baseGet;
  
  /**
   * Gets the value at `path` of `object`. If the resolved value is
   * `undefined`, the `defaultValue` is returned in its place.
   *
   * @static
   * @memberOf _
   * @since 3.7.0
   * @category Object
   * @param {Object} object The object to query.
   * @param {Array|string} path The path of the property to get.
   * @param {*} [defaultValue] The value returned for `undefined` resolved values.
   * @returns {*} Returns the resolved value.
   * @example
   *
   * var object = { 'a': [{ 'b': { 'c': 3 } }] };
   *
   * _.get(object, 'a[0].b.c');
   * // => 3
   *
   * _.get(object, ['a', '0', 'b', 'c']);
   * // => 3
   *
   * _.get(object, 'a.b.c', 'default');
   * // => 'default'
   */
  function get(object, path, defaultValue) {
    var result = object == null ? undefined : _baseGet(object, path);
    return result === undefined ? defaultValue : result;
  }
  
  var get_1 = get;
  
  /**
   * The base implementation of `_.hasIn` without support for deep paths.
   *
   * @private
   * @param {Object} [object] The object to query.
   * @param {Array|string} key The key to check.
   * @returns {boolean} Returns `true` if `key` exists, else `false`.
   */
  function baseHasIn(object, key) {
    return object != null && key in Object(object);
  }
  
  var _baseHasIn = baseHasIn;
  
  /**
   * Checks if `path` exists on `object`.
   *
   * @private
   * @param {Object} object The object to query.
   * @param {Array|string} path The path to check.
   * @param {Function} hasFunc The function to check properties.
   * @returns {boolean} Returns `true` if `path` exists, else `false`.
   */
  function hasPath(object, path, hasFunc) {
    path = _castPath(path, object);
  
    var index = -1,
        length = path.length,
        result = false;
  
    while (++index < length) {
      var key = _toKey(path[index]);
      if (!(result = object != null && hasFunc(object, key))) {
        break;
      }
      object = object[key];
    }
    if (result || ++index != length) {
      return result;
    }
    length = object == null ? 0 : object.length;
    return !!length && isLength_1(length) && _isIndex(key, length) &&
      (isArray_1(object) || isArguments_1(object));
  }
  
  var _hasPath = hasPath;
  
  /**
   * 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);
  }
  
  var hasIn_1 = hasIn;
  
  /** Used to compose bitmasks for value comparisons. */
  var COMPARE_PARTIAL_FLAG$5 = 1;
  var COMPARE_UNORDERED_FLAG$3 = 2;
  
  /**
   * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
   *
   * @private
   * @param {string} path The path of the property to get.
   * @param {*} srcValue The value to match.
   * @returns {Function} Returns the new spec function.
   */
  function baseMatchesProperty(path, srcValue) {
    if (_isKey(path) && _isStrictComparable(srcValue)) {
      return _matchesStrictComparable(_toKey(path), srcValue);
    }
    return function(object) {
      var objValue = get_1(object, path);
      return (objValue === undefined && objValue === srcValue)
        ? hasIn_1(object, path)
        : _baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$5 | COMPARE_UNORDERED_FLAG$3);
    };
  }
  
  var _baseMatchesProperty = baseMatchesProperty;
  
  /**
   * This method returns the first argument it receives.
   *
   * @static
   * @since 0.1.0
   * @memberOf _
   * @category Util
   * @param {*} value Any value.
   * @returns {*} Returns `value`.
   * @example
   *
   * var object = { 'a': 1 };
   *
   * console.log(_.identity(object) === object);
   * // => true
   */
  function identity(value) {
    return value;
  }
  
  var identity_1 = identity;
  
  /**
   * The base implementation of `_.property` without support for deep paths.
   *
   * @private
   * @param {string} key The key of the property to get.
   * @returns {Function} Returns the new accessor function.
   */
  function baseProperty(key) {
    return function(object) {
      return object == null ? undefined : object[key];
    };
  }
  
  var _baseProperty = baseProperty;
  
  /**
   * A specialized version of `baseProperty` which supports deep paths.
   *
   * @private
   * @param {Array|string} path The path of the property to get.
   * @returns {Function} Returns the new accessor function.
   */
  function basePropertyDeep(path) {
    return function(object) {
      return _baseGet(object, path);
    };
  }
  
  var _basePropertyDeep = basePropertyDeep;
  
  /**
   * Creates a function that returns the value at `path` of a given object.
   *
   * @static
   * @memberOf _
   * @since 2.4.0
   * @category Util
   * @param {Array|string} path The path of the property to get.
   * @returns {Function} Returns the new accessor function.
   * @example
   *
   * var objects = [
   *   { 'a': { 'b': 2 } },
   *   { 'a': { 'b': 1 } }
   * ];
   *
   * _.map(objects, _.property('a.b'));
   * // => [2, 1]
   *
   * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
   * // => [1, 2]
   */
  function property(path) {
    return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path);
  }
  
  var property_1 = property;
  
  /**
   * The base implementation of `_.iteratee`.
   *
   * @private
   * @param {*} [value=_.identity] The value to convert to an iteratee.
   * @returns {Function} Returns the iteratee.
   */
  function baseIteratee(value) {
    // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
    // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
    if (typeof value == 'function') {
      return value;
    }
    if (value == null) {
      return identity_1;
    }
    if (typeof value == 'object') {
      return isArray_1(value)
        ? _baseMatchesProperty(value[0], value[1])
        : _baseMatches(value);
    }
    return property_1(value);
  }
  
  var _baseIteratee = baseIteratee;
  
  /**
   * Creates a `_.find` or `_.findLast` function.
   *
   * @private
   * @param {Function} findIndexFunc The function to find the collection index.
   * @returns {Function} Returns the new find function.
   */
  function createFind(findIndexFunc) {
    return function(collection, predicate, fromIndex) {
      var iterable = Object(collection);
      if (!isArrayLike_1(collection)) {
        var iteratee = _baseIteratee(predicate, 3);
        collection = keys_1(collection);
        predicate = function(key) { return iteratee(iterable[key], key, iterable); };
      }
      var index = findIndexFunc(collection, predicate, fromIndex);
      return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
    };
  }
  
  var _createFind = createFind;
  
  /**
   * The base implementation of `_.findIndex` and `_.findLastIndex` without
   * support for iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Function} predicate The function invoked per iteration.
   * @param {number} fromIndex The index to search from.
   * @param {boolean} [fromRight] Specify iterating from right to left.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseFindIndex(array, predicate, fromIndex, fromRight) {
    var length = array.length,
        index = fromIndex + (fromRight ? 1 : -1);
  
    while ((fromRight ? index-- : ++index < length)) {
      if (predicate(array[index], index, array)) {
        return index;
      }
    }
    return -1;
  }
  
  var _baseFindIndex = baseFindIndex;
  
  /** Used as references for various `Number` constants. */
  var NAN = 0 / 0;
  
  /** Used to match leading and trailing whitespace. */
  var reTrim = /^\s+|\s+$/g;
  
  /** Used to detect bad signed hexadecimal string values. */
  var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  
  /** Used to detect binary string values. */
  var reIsBinary = /^0b[01]+$/i;
  
  /** Used to detect octal string values. */
  var reIsOctal = /^0o[0-7]+$/i;
  
  /** Built-in method references without a dependency on `root`. */
  var freeParseInt = parseInt;
  
  /**
   * 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
   *
   * _.toNumber('3.2');
   * // => 3.2
   */
  function toNumber(value) {
    if (typeof value == 'number') {
      return value;
    }
    if (isSymbol_1(value)) {
      return NAN;
    }
    if (isObject_1(value)) {
      var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
      value = isObject_1(other) ? (other + '') : other;
    }
    if (typeof value != 'string') {
      return value === 0 ? value : +value;
    }
    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 toNumber_1 = toNumber;
  
  /** Used as references for various `Number` constants. */
  var INFINITY$2 = 1 / 0;
  var MAX_INTEGER = 1.7976931348623157e+308;
  
  /**
   * 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
   *
   * _.toFinite('3.2');
   * // => 3.2
   */
  function toFinite(value) {
    if (!value) {
      return value === 0 ? value : 0;
    }
    value = toNumber_1(value);
    if (value === INFINITY$2 || value === -INFINITY$2) {
      var sign = (value < 0 ? -1 : 1);
      return sign * MAX_INTEGER;
    }
    return value === value ? value : 0;
  }
  
  var toFinite_1 = toFinite;
  
  /**
   * Converts `value` to an integer.
   *
   * **Note:** This method is loosely based on
   * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.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
   *
   * _.toInteger(Infinity);
   * // => 1.7976931348623157e+308
   *
   * _.toInteger('3.2');
   * // => 3
   */
  function toInteger(value) {
    var result = toFinite_1(value),
        remainder = result % 1;
  
    return result === result ? (remainder ? result - remainder : result) : 0;
  }
  
  var toInteger_1 = toInteger;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeMax = Math.max;
  
  /**
   * This method is like `_.find` except that it returns the index of the first
   * element `predicate` returns truthy for instead of the element itself.
   *
   * @static
   * @memberOf _
   * @since 1.1.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {Function} [predicate=_.identity] The function invoked per iteration.
   * @param {number} [fromIndex=0] The index to search from.
   * @returns {number} Returns the index of the found element, else `-1`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'active': false },
   *   { 'user': 'fred',    'active': false },
   *   { 'user': 'pebbles', 'active': true }
   * ];
   *
   * _.findIndex(users, function(o) { return o.user == 'barney'; });
   * // => 0
   *
   * // The `_.matches` iteratee shorthand.
   * _.findIndex(users, { 'user': 'fred', 'active': false });
   * // => 1
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.findIndex(users, ['active', false]);
   * // => 0
   *
   * // The `_.property` iteratee shorthand.
   * _.findIndex(users, 'active');
   * // => 2
   */
  function findIndex(array, predicate, fromIndex) {
    var length = array == null ? 0 : array.length;
    if (!length) {
      return -1;
    }
    var index = fromIndex == null ? 0 : toInteger_1(fromIndex);
    if (index < 0) {
      index = nativeMax(length + index, 0);
    }
    return _baseFindIndex(array, _baseIteratee(predicate, 3), index);
  }
  
  var findIndex_1 = findIndex;
  
  /**
   * Iterates over elements of `collection`, returning the first element
   * `predicate` returns truthy for. The predicate is invoked with three
   * arguments: (value, index|key, collection).
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Collection
   * @param {Array|Object} collection The collection to inspect.
   * @param {Function} [predicate=_.identity] The function invoked per iteration.
   * @param {number} [fromIndex=0] The index to search from.
   * @returns {*} Returns the matched element, else `undefined`.
   * @example
   *
   * var users = [
   *   { 'user': 'barney',  'age': 36, 'active': true },
   *   { 'user': 'fred',    'age': 40, 'active': false },
   *   { 'user': 'pebbles', 'age': 1,  'active': true }
   * ];
   *
   * _.find(users, function(o) { return o.age < 40; });
   * // => object for 'barney'
   *
   * // The `_.matches` iteratee shorthand.
   * _.find(users, { 'age': 1, 'active': true });
   * // => object for 'pebbles'
   *
   * // The `_.matchesProperty` iteratee shorthand.
   * _.find(users, ['active', false]);
   * // => object for 'fred'
   *
   * // The `_.property` iteratee shorthand.
   * _.find(users, 'active');
   * // => object for 'barney'
   */
  var find = _createFind(findIndex_1);
  
  var find_1 = find;
  
  var defineProperty = (function() {
    try {
      var func = _getNative(Object, 'defineProperty');
      func({}, '', {});
      return func;
    } catch (e) {}
  }());
  
  var _defineProperty = defineProperty;
  
  /**
   * The base implementation of `assignValue` and `assignMergeValue` without
   * value checks.
   *
   * @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 baseAssignValue(object, key, value) {
    if (key == '__proto__' && _defineProperty) {
      _defineProperty(object, key, {
        'configurable': true,
        'enumerable': true,
        'value': value,
        'writable': true
      });
    } else {
      object[key] = value;
    }
  }
  
  var _baseAssignValue = baseAssignValue;
  
  /** Used for built-in method references. */
  var objectProto$13 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$10 = objectProto$13.hasOwnProperty;
  
  /**
   * 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 {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$10.call(object, key) && eq_1(objValue, value)) ||
        (value === undefined && !(key in object))) {
      _baseAssignValue(object, key, value);
    }
  }
  
  var _assignValue = assignValue;
  
  /**
   * 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) {
    var isNew = !object;
    object || (object = {});
  
    var index = -1,
        length = props.length;
  
    while (++index < length) {
      var key = props[index];
  
      var newValue = customizer
        ? customizer(object[key], source[key], key, object, source)
        : undefined;
  
      if (newValue === undefined) {
        newValue = source[key];
      }
      if (isNew) {
        _baseAssignValue(object, key, newValue);
      } else {
        _assignValue(object, key, newValue);
      }
    }
    return object;
  }
  
  var _copyObject = copyObject;
  
  /**
   * 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]);
    }
    return func.apply(thisArg, args);
  }
  
  var _apply = apply;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeMax$1 = Math.max;
  
  /**
   * A specialized version of `baseRest` which transforms the rest array.
   *
   * @private
   * @param {Function} func The function to apply a rest parameter to.
   * @param {number} [start=func.length-1] The start position of the rest parameter.
   * @param {Function} transform The rest array transform.
   * @returns {Function} Returns the new function.
   */
  function overRest(func, start, transform) {
    start = nativeMax$1(start === undefined ? (func.length - 1) : start, 0);
    return function() {
      var args = arguments,
          index = -1,
          length = nativeMax$1(args.length - start, 0),
          array = Array(length);
  
      while (++index < length) {
        array[index] = args[start + index];
      }
      index = -1;
      var otherArgs = Array(start + 1);
      while (++index < start) {
        otherArgs[index] = args[index];
      }
      otherArgs[start] = transform(array);
      return _apply(func, this, otherArgs);
    };
  }
  
  var _overRest = overRest;
  
  /**
   * Creates a function that returns `value`.
   *
   * @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 constant(value) {
    return function() {
      return value;
    };
  }
  
  var constant_1 = constant;
  
  /**
   * The base implementation of `setToString` without support for hot loop shorting.
   *
   * @private
   * @param {Function} func The function to modify.
   * @param {Function} string The `toString` result.
   * @returns {Function} Returns `func`.
   */
  var baseSetToString = !_defineProperty ? identity_1 : function(func, string) {
    return _defineProperty(func, 'toString', {
      'configurable': true,
      'enumerable': false,
      'value': constant_1(string),
      'writable': true
    });
  };
  
  var _baseSetToString = baseSetToString;
  
  /** Used to detect hot functions by number of calls within a span of milliseconds. */
  var HOT_COUNT = 800;
  var HOT_SPAN = 16;
  
  /* Built-in method references for those with the same name as other `lodash` methods. */
  var nativeNow = Date.now;
  
  /**
   * 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
   * @param {Function} func The function to restrict.
   * @returns {Function} Returns the new shortable function.
   */
  function shortOut(func) {
    var count = 0,
        lastCalled = 0;
  
    return function() {
      var stamp = nativeNow(),
          remaining = HOT_SPAN - (stamp - lastCalled);
  
      lastCalled = stamp;
      if (remaining > 0) {
        if (++count >= HOT_COUNT) {
          return arguments[0];
        }
      } else {
        count = 0;
      }
      return func.apply(undefined, arguments);
    };
  }
  
  var _shortOut = shortOut;
  
  /**
   * Sets the `toString` method of `func` to return `string`.
   *
   * @private
   * @param {Function} func The function to modify.
   * @param {Function} string The `toString` result.
   * @returns {Function} Returns `func`.
   */
  var setToString = _shortOut(_baseSetToString);
  
  var _setToString = setToString;
  
  /**
   * The base implementation of `_.rest` which doesn't validate or coerce arguments.
   *
   * @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 baseRest(func, start) {
    return _setToString(_overRest(func, start, identity_1), func + '');
  }
  
  var _baseRest = baseRest;
  
  /**
   * 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_1(object)) {
      return false;
    }
    var type = typeof index;
    if (type == 'number'
          ? (isArrayLike_1(object) && _isIndex(index, object.length))
          : (type == 'string' && index in object)
        ) {
      return eq_1(object[index], value);
    }
    return false;
  }
  
  var _isIterateeCall = isIterateeCall;
  
  /**
   * 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 _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;
    });
  }
  
  var _createAssigner = createAssigner;
  
  /** Used for built-in method references. */
  var objectProto$12 = Object.prototype;
  
  /** Used to check objects for own properties. */
  var hasOwnProperty$9 = objectProto$12.hasOwnProperty;
  
  /**
   * 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.a = 1;
   * }
   *
   * function Bar() {
   *   this.c = 3;
   * }
   *
   * Foo.prototype.b = 2;
   * Bar.prototype.d = 4;
   *
   * _.assign({ 'a': 0 }, new Foo, new Bar);
   * // => { 'a': 1, 'c': 3 }
   */
  var assign = _createAssigner(function(object, source) {
    if (_isPrototype(source) || isArrayLike_1(source)) {
      _copyObject(source, keys_1(source), object);
      return;
    }
    for (var key in source) {
      if (hasOwnProperty$9.call(source, key)) {
        _assignValue(object, key, source[key]);
      }
    }
  });
  
  var assign_1 = assign;
  
  /**
   * The base implementation of `_.isNaN` without support for number objects.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
   */
  function baseIsNaN(value) {
    return value !== value;
  }
  
  var _baseIsNaN = baseIsNaN;
  
  /**
   * A specialized version of `_.indexOf` which performs strict equality
   * comparisons of values, i.e. `===`.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function strictIndexOf(array, value, fromIndex) {
    var index = fromIndex - 1,
        length = array.length;
  
    while (++index < length) {
      if (array[index] === value) {
        return index;
      }
    }
    return -1;
  }
  
  var _strictIndexOf = strictIndexOf;
  
  /**
   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {*} value The value to search for.
   * @param {number} fromIndex The index to search from.
   * @returns {number} Returns the index of the matched value, else `-1`.
   */
  function baseIndexOf(array, value, fromIndex) {
    return value === value
      ? _strictIndexOf(array, value, fromIndex)
      : _baseFindIndex(array, _baseIsNaN, fromIndex);
  }
  
  var _baseIndexOf = baseIndexOf;
  
  /**
   * A specialized version of `_.includes` for arrays without support for
   * specifying an index to search from.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludes(array, value) {
    var length = array == null ? 0 : array.length;
    return !!length && _baseIndexOf(array, value, 0) > -1;
  }
  
  var _arrayIncludes = arrayIncludes;
  
  /**
   * This function is like `arrayIncludes` except that it accepts a comparator.
   *
   * @private
   * @param {Array} [array] The array to inspect.
   * @param {*} target The value to search for.
   * @param {Function} comparator The comparator invoked per element.
   * @returns {boolean} Returns `true` if `target` is found, else `false`.
   */
  function arrayIncludesWith(array, value, comparator) {
    var index = -1,
        length = array == null ? 0 : array.length;
  
    while (++index < length) {
      if (comparator(value, array[index])) {
        return true;
      }
    }
    return false;
  }
  
  var _arrayIncludesWith = arrayIncludesWith;
  
  /** Used as the size to enable large array optimizations. */
  var LARGE_ARRAY_SIZE$1 = 200;
  
  /**
   * The base implementation of methods like `_.difference` without support
   * for excluding multiple arrays or iteratee shorthands.
   *
   * @private
   * @param {Array} array The array to inspect.
   * @param {Array} values The values to exclude.
   * @param {Function} [iteratee] The iteratee invoked per element.
   * @param {Function} [comparator] The comparator invoked per element.
   * @returns {Array} Returns the new array of filtered values.
   */
  function baseDifference(array, values, iteratee, comparator) {
    var index = -1,
        includes = _arrayIncludes,
        isCommon = true,
        length = array.length,
        result = [],
        valuesLength = values.length;
  
    if (!length) {
      return result;
    }
    if (iteratee) {
      values = _arrayMap(values, _baseUnary(iteratee));
    }
    if (comparator) {
      includes = _arrayIncludesWith;
      isCommon = false;
    }
    else if (values.length >= LARGE_ARRAY_SIZE$1) {
      includes = _cacheHas;
      isCommon = false;
      values = new _SetCache(values);
    }
    outer:
    while (++index < length) {
      var value = array[index],
          computed = iteratee == null ? value : iteratee(value);
  
      value = (comparator || value !== 0) ? value : 0;
      if (isCommon && computed === computed) {
        var valuesIndex = valuesLength;
        while (valuesIndex--) {
          if (values[valuesIndex] === computed) {
            continue outer;
          }
        }
        result.push(value);
      }
      else if (!includes(values, computed, comparator)) {
        result.push(value);
      }
    }
    return result;
  }
  
  var _baseDifference = baseDifference;
  
  /** Built-in value references. */
  var spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined;
  
  /**
   * Checks if `value` is a flattenable `arguments` object or array.
   *
   * @private
   * @param {*} value The value to check.
   * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
   */
  function isFlattenable(value) {
    return isArray_1(value) || isArguments_1(value) ||
      !!(spreadableSymbol && value && value[spreadableSymbol]);
  }
  
  var _isFlattenable = isFlattenable;
  
  /**
   * The base implementation of `_.flatten` with support for restricting flattening.
   *
   * @private
   * @param {Array} array The array to flatten.
   * @param {number} depth The maximum recursion depth.
   * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
   * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
   * @param {Array} [result=[]] The initial result value.
   * @returns {Array} Returns the new flattened array.
   */
  function baseFlatten(array, depth, predicate, isStrict, result) {
    var index = -1,
        length = array.length;
  
    predicate || (predicate = _isFlattenable);
    result || (result = []);
  
    while (++index < length) {
      var value = array[index];
      if (depth > 0 && predicate(value)) {
        if (depth > 1) {
          // Recursively flatten arrays (susceptible to call stack limits).
          baseFlatten(value, depth - 1, predicate, isStrict, result);
        } else {
          _arrayPush(result, value);
        }
      } else if (!isStrict) {
        result[result.length] = value;
      }
    }
    return result;
  }
  
  var _baseFlatten = baseFlatten;
  
  /**
   * This method is like `_.isArrayLike` except that it also checks if `value`
   * is an object.
   *
   * @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`.
   * @example
   *
   * _.isArrayLikeObject([1, 2, 3]);
   * // => true
   *
   * _.isArrayLikeObject(document.body.children);
   * // => true
   *
   * _.isArrayLikeObject('abc');
   * // => false
   *
   * _.isArrayLikeObject(_.noop);
   * // => false
   */
  function isArrayLikeObject(value) {
    return isObjectLike_1(value) && isArrayLike_1(value);
  }
  
  var isArrayLikeObject_1 = isArrayLikeObject;
  
  /**
   * Creates an array of `array` values not included in the other given arrays
   * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
   * for equality comparisons. The order and references of result values are
   * determined by the first array.
   *
   * **Note:** Unlike `_.pullAll`, this method returns a new array.
   *
   * @static
   * @memberOf _
   * @since 0.1.0
   * @category Array
   * @param {Array} array The array to inspect.
   * @param {...Array} [values] The values to exclude.
   * @returns {Array} Returns the new array of filtered values.
   * @see _.without, _.xor
   * @example
   *
   * _.difference([2, 1], [2, 3]);
   * // => [1]
   */
  var difference = _baseRest(function(array, values) {
    return isArrayLikeObject_1(array)
      ? _baseDifference(array, _baseFlatten(values, 1, isArrayLikeObject_1, true))
      : [];
  });
  
  var difference_1 = difference;
  
  var createPrototypeProxy_1 = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = createPrototypeProxy;
  
  
  
  var _assign2 = _interopRequireDefault(assign_1);
  
  
  
  var _difference2 = _interopRequireDefault(difference_1);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function createPrototypeProxy() {
    var proxy = {};
    var current = null;
    var mountedInstances = [];
  
    /**
     * Creates a proxied toString() method pointing to the current version's toString().
     */
    function proxyToString(name) {
      // Wrap to always call the current version
      return function toString() {
        if (typeof current[name] === 'function') {
          return current[name].toString();
        } else {
          return '<method was deleted>';
        }
      };
    }
  
    /**
     * Creates a proxied method that calls the current version, whenever available.
     */
    function proxyMethod(name) {
      // Wrap to always call the current version
      var proxiedMethod = function proxiedMethod() {
        if (typeof current[name] === 'function') {
          return current[name].apply(this, arguments);
        }
      };
  
      // Copy properties of the original function, if any
      (_assign2.default)(proxiedMethod, current[name]);
      proxiedMethod.toString = proxyToString(name);
  
      return proxiedMethod;
    }
  
    /**
     * Augments the original componentDidMount with instance tracking.
     */
    function proxiedComponentDidMount() {
      mountedInstances.push(this);
      if (typeof current.componentDidMount === 'function') {
        return current.componentDidMount.apply(this, arguments);
      }
    }
    proxiedComponentDidMount.toString = proxyToString('componentDidMount');
  
    /**
     * Augments the original componentWillUnmount with instance tracking.
     */
    function proxiedComponentWillUnmount() {
      var index = mountedInstances.indexOf(this);
      // Unless we're in a weird environment without componentDidMount
      if (index !== -1) {
        mountedInstances.splice(index, 1);
      }
      if (typeof current.componentWillUnmount === 'function') {
        return current.componentWillUnmount.apply(this, arguments);
      }
    }
    proxiedComponentWillUnmount.toString = proxyToString('componentWillUnmount');
  
    /**
     * Defines a property on the proxy.
     */
    function defineProxyProperty(name, descriptor) {
      Object.defineProperty(proxy, name, descriptor);
    }
  
    /**
     * Defines a property, attempting to keep the original descriptor configuration.
     */
    function defineProxyPropertyWithValue(name, value) {
      var _ref = Object.getOwnPropertyDescriptor(current, name) || {};
  
      var _ref$enumerable = _ref.enumerable;
      var enumerable = _ref$enumerable === undefined ? false : _ref$enumerable;
      var _ref$writable = _ref.writable;
      var writable = _ref$writable === undefined ? true : _ref$writable;
  
  
      defineProxyProperty(name, {
        configurable: true,
        enumerable: enumerable,
        writable: writable,
        value: value
      });
    }
  
    /**
     * Creates an auto-bind map mimicking the original map, but directed at proxy.
     */
    function createAutoBindMap() {
      if (!current.__reactAutoBindMap) {
        return;
      }
  
      var __reactAutoBindMap = {};
      for (var name in current.__reactAutoBindMap) {
        if (typeof proxy[name] === 'function' && current.__reactAutoBindMap.hasOwnProperty(name)) {
          __reactAutoBindMap[name] = proxy[name];
        }
      }
  
      return __reactAutoBindMap;
    }
  
    /**
     * Creates an auto-bind map mimicking the original map, but directed at proxy.
     */
    function createAutoBindPairs() {
      var __reactAutoBindPairs = [];
  
      for (var i = 0; i < current.__reactAutoBindPairs.length; i += 2) {
        var name = current.__reactAutoBindPairs[i];
        var method = proxy[name];
  
        if (typeof method === 'function') {
          __reactAutoBindPairs.push(name, method);
        }
      }
  
      return __reactAutoBindPairs;
    }
  
    /**
     * Applies the updated prototype.
     */
    function update(next) {
      // Save current source of truth
      current = next;
  
      // Find changed property names
      var currentNames = Object.getOwnPropertyNames(current);
      var previousName = Object.getOwnPropertyNames(proxy);
      var removedNames = (_difference2.default)(previousName, currentNames);
  
      // Remove properties and methods that are no longer there
      removedNames.forEach(function (name) {
        delete proxy[name];
      });
  
      // Copy every descriptor
      currentNames.forEach(function (name) {
        var descriptor = Object.getOwnPropertyDescriptor(current, name);
        if (typeof descriptor.value === 'function') {
          // Functions require additional wrapping so they can be bound later
          defineProxyPropertyWithValue(name, proxyMethod(name));
        } else {
          // Other values can be copied directly
          defineProxyProperty(name, descriptor);
        }
      });
  
      // Track mounting and unmounting
      defineProxyPropertyWithValue('componentDidMount', proxiedComponentDidMount);
      defineProxyPropertyWithValue('componentWillUnmount', proxiedComponentWillUnmount);
  
      if (current.hasOwnProperty('__reactAutoBindMap')) {
        defineProxyPropertyWithValue('__reactAutoBindMap', createAutoBindMap());
      }
  
      if (current.hasOwnProperty('__reactAutoBindPairs')) {
        defineProxyPropertyWithValue('__reactAutoBindPairs', createAutoBindPairs());
      }
  
      // Set up the prototype chain
      proxy.__proto__ = next;
  
      return mountedInstances;
    }
  
    /**
     * Returns the up-to-date proxy prototype.
     */
    function get() {
      return proxy;
    }
  
    return {
      update: update,
      get: get
    };
  }
  });
  
  unwrapExports(createPrototypeProxy_1);
  
  var bindAutoBindMethods_1 = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = bindAutoBindMethods;
  /**
   * Copyright 2013-2015, 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 React source tree. An additional grant
   * of patent rights can be found in the PATENTS file in the same directory.
   *
   * Original:
   * https://github.com/facebook/react/blob/6508b1ad273a6f371e8d90ae676e5390199461b4/src/isomorphic/classic/class/ReactClass.js#L650-L713
   */
  
  function bindAutoBindMethod(component, method) {
    var boundMethod = method.bind(component);
  
    boundMethod.__reactBoundContext = component;
    boundMethod.__reactBoundMethod = method;
    boundMethod.__reactBoundArguments = null;
  
    var componentName = component.constructor.displayName,
        _bind = boundMethod.bind;
  
    boundMethod.bind = function (newThis) {
      var args = Array.prototype.slice.call(arguments, 1);
      if (newThis !== component && newThis !== null) {
        console.warn('bind(): React component methods may only be bound to the ' + 'component instance. See ' + componentName);
      } else if (!args.length) {
        console.warn('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 ' + componentName);
        return boundMethod;
      }
  
      var reboundMethod = _bind.apply(boundMethod, arguments);
      reboundMethod.__reactBoundContext = component;
      reboundMethod.__reactBoundMethod = method;
      reboundMethod.__reactBoundArguments = args;
  
      return reboundMethod;
    };
  
    return boundMethod;
  }
  
  function bindAutoBindMethodsFromMap(component) {
    for (var autoBindKey in component.__reactAutoBindMap) {
      if (!component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) {
        return;
      }
  
      // Tweak: skip methods that are already bound.
      // This is to preserve method reference in case it is used
      // as a subscription handler that needs to be detached later.
      if (component.hasOwnProperty(autoBindKey) && component[autoBindKey].__reactBoundContext === component) {
        continue;
      }
  
      var method = component.__reactAutoBindMap[autoBindKey];
      component[autoBindKey] = bindAutoBindMethod(component, method);
    }
  }
  
  function bindAutoBindMethods(component) {
    if (component.__reactAutoBindPairs) {
      bindAutoBindMethodsFromArray(component);
    } else if (component.__reactAutoBindMap) {
      bindAutoBindMethodsFromMap(component);
    }
  }
  
  function bindAutoBindMethodsFromArray(component) {
    var pairs = component.__reactAutoBindPairs;
  
    if (!pairs) {
      return;
    }
  
    for (var i = 0; i < pairs.length; i += 2) {
      var autoBindKey = pairs[i];
  
      if (component.hasOwnProperty(autoBindKey) && component[autoBindKey].__reactBoundContext === component) {
        continue;
      }
  
      var method = pairs[i + 1];
  
      component[autoBindKey] = bindAutoBindMethod(component, method);
    }
  }
  });
  
  unwrapExports(bindAutoBindMethods_1);
  
  var deleteUnknownAutoBindMethods_1 = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = deleteUnknownAutoBindMethods;
  function shouldDeleteClassicInstanceMethod(component, name) {
    if (component.__reactAutoBindMap && component.__reactAutoBindMap.hasOwnProperty(name)) {
      // It's a known autobound function, keep it
      return false;
    }
  
    if (component.__reactAutoBindPairs && component.__reactAutoBindPairs.indexOf(name) >= 0) {
      // It's a known autobound function, keep it
      return false;
    }
  
    if (component[name].__reactBoundArguments !== null) {
      // It's a function bound to specific args, keep it
      return false;
    }
  
    // It's a cached bound method for a function
    // that was deleted by user, so we delete it from component.
    return true;
  }
  
  function shouldDeleteModernInstanceMethod(component, name) {
    var prototype = component.constructor.prototype;
  
    var prototypeDescriptor = Object.getOwnPropertyDescriptor(prototype, name);
  
    if (!prototypeDescriptor || !prototypeDescriptor.get) {
      // This is definitely not an autobinding getter
      return false;
    }
  
    if (prototypeDescriptor.get().length !== component[name].length) {
      // The length doesn't match, bail out
      return false;
    }
  
    // This seems like a method bound using an autobinding getter on the prototype
    // Hopefully we won't run into too many false positives.
    return true;
  }
  
  function shouldDeleteInstanceMethod(component, name) {
    var descriptor = Object.getOwnPropertyDescriptor(component, name);
    if (typeof descriptor.value !== 'function') {
      // Not a function, or something fancy: bail out
      return;
    }
  
    if (component.__reactAutoBindMap || component.__reactAutoBindPairs) {
      // Classic
      return shouldDeleteClassicInstanceMethod(component, name);
    } else {
      // Modern
      return shouldDeleteModernInstanceMethod(component, name);
    }
  }
  
  /**
   * Deletes autobound methods from the instance.
   *
   * For classic React classes, we only delete the methods that no longer exist in map.
   * This means the user actually deleted them in code.
   *
   * For modern classes, we delete methods that exist on prototype with the same length,
   * and which have getters on prototype, but are normal values on the instance.
   * This is usually an indication that an autobinding decorator is being used,
   * and the getter will re-generate the memoized handler on next access.
   */
  function deleteUnknownAutoBindMethods(component) {
    var names = Object.getOwnPropertyNames(component);
  
    names.forEach(function (name) {
      if (shouldDeleteInstanceMethod(component, name)) {
        delete component[name];
      }
    });
  }
  });
  
  unwrapExports(deleteUnknownAutoBindMethods_1);
  
  var createClassProxy_1 = createCommonjsModule(function (module, exports) {
  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 _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
  
  exports.default = proxyClass;
  exports.default = createClassProxy;
  
  
  
  var _find2 = _interopRequireDefault(find_1);
  
  
  
  var _createPrototypeProxy2 = _interopRequireDefault(createPrototypeProxy_1);
  
  
  
  var _bindAutoBindMethods2 = _interopRequireDefault(bindAutoBindMethods_1);
  
  
  
  var _deleteUnknownAutoBindMethods2 = _interopRequireDefault(deleteUnknownAutoBindMethods_1);
  
  
  
  var _supportsProtoAssignment2 = _interopRequireDefault(supportsProtoAssignment_1);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
  
  var RESERVED_STATICS = ['length', 'name', 'arguments', 'caller', 'prototype', 'toString'];
  
  function isEqualDescriptor(a, b) {
    if (!a && !b) {
      return true;
    }
    if (!a || !b) {
      return false;
    }
    for (var key in a) {
      if (a[key] !== b[key]) {
        return false;
      }
    }
    return true;
  }
  
  // This was originally a WeakMap but we had issues with React Native:
  // https://github.com/gaearon/react-proxy/issues/50#issuecomment-192928066
  var allProxies = [];
  function findProxy(Component) {
    var pair = (_find2.default)(allProxies, function (_ref) {
      var _ref2 = _slicedToArray(_ref, 1);
  
      var key = _ref2[0];
      return key === Component;
    });
    return pair ? pair[1] : null;
  }
  function addProxy(Component, proxy) {
    allProxies.push([Component, proxy]);
  }
  
  function proxyClass(InitialComponent) {
    // Prevent double wrapping.
    // Given a proxy class, return the existing proxy managing it.
    var existingProxy = findProxy(InitialComponent);
    if (existingProxy) {
      return existingProxy;
    }
  
    var prototypeProxy = (_createPrototypeProxy2.default)();
    var CurrentComponent = undefined;
    var ProxyComponent = undefined;
  
    var staticDescriptors = {};
    function wasStaticModifiedByUser(key) {
      // Compare the descriptor with the one we previously set ourselves.
      var currentDescriptor = Object.getOwnPropertyDescriptor(ProxyComponent, key);
      return !isEqualDescriptor(staticDescriptors[key], currentDescriptor);
    }
  
    function instantiate(factory, context, params) {
      var component = factory();
  
      try {
        return component.apply(context, params);
      } catch (err) {
        (function () {
          // Native ES6 class instantiation
          var instance = new (Function.prototype.bind.apply(component, [null].concat(_toConsumableArray(params))))();
  
          Object.keys(instance).forEach(function (key) {
            if (RESERVED_STATICS.indexOf(key) > -1) {
              return;
            }
            context[key] = instance[key];
          });
        })();
      }
    }
  
    try {
      // Create a proxy constructor with matching name
      ProxyComponent = new Function('factory', 'instantiate', 'return function ' + (InitialComponent.name || 'ProxyComponent') + '() {\n         return instantiate(factory, this, arguments);\n      }')(function () {
        return CurrentComponent;
      }, instantiate);
    } catch (err) {
      // Some environments may forbid dynamic evaluation
      ProxyComponent = function ProxyComponent() {
        return instantiate(function () {
          return CurrentComponent;
        }, this, arguments);
      };
    }
  
    // Point proxy constructor to the proxy prototype
    ProxyComponent.prototype = prototypeProxy.get();
  
    // Proxy toString() to the current constructor
    ProxyComponent.toString = function toString() {
      return CurrentComponent.toString();
    };
  
    function update(NextComponent) {
      if (typeof NextComponent !== 'function') {
        throw new Error('Expected a constructor.');
      }
  
      // Prevent proxy cycles
      var existingProxy = findProxy(NextComponent);
      if (existingProxy) {
        return update(existingProxy.__getCurrent());
      }
  
      // Save the next constructor so we call it
      CurrentComponent = NextComponent;
  
      // Update the prototype proxy with new methods
      var mountedInstances = prototypeProxy.update(NextComponent.prototype);
  
      // Set up the constructor property so accessing the statics work
      ProxyComponent.prototype.constructor = ProxyComponent;
  
      // Set up the same prototype for inherited statics
      ProxyComponent.__proto__ = NextComponent.__proto__;
  
      // Copy static methods and properties
      Object.getOwnPropertyNames(NextComponent).forEach(function (key) {
        if (RESERVED_STATICS.indexOf(key) > -1) {
          return;
        }
  
        var staticDescriptor = _extends({}, Object.getOwnPropertyDescriptor(NextComponent, key), {
          configurable: true
        });
  
        // Copy static unless user has redefined it at runtime
        if (!wasStaticModifiedByUser(key)) {
          Object.defineProperty(ProxyComponent, key, staticDescriptor);
          staticDescriptors[key] = staticDescriptor;
        }
      });
  
      // Remove old static methods and properties
      Object.getOwnPropertyNames(ProxyComponent).forEach(function (key) {
        if (RESERVED_STATICS.indexOf(key) > -1) {
          return;
        }
  
        // Skip statics that exist on the next class
        if (NextComponent.hasOwnProperty(key)) {
          return;
        }
  
        // Skip non-configurable statics
        var descriptor = Object.getOwnPropertyDescriptor(ProxyComponent, key);
        if (descriptor && !descriptor.configurable) {
          return;
        }
  
        // Delete static unless user has redefined it at runtime
        if (!wasStaticModifiedByUser(key)) {
          delete ProxyComponent[key];
          delete staticDescriptors[key];
        }
      });
  
      // Try to infer displayName
      ProxyComponent.displayName = NextComponent.displayName || NextComponent.name;
  
      // We might have added new methods that need to be auto-bound
      mountedInstances.forEach(_bindAutoBindMethods2.default);
      mountedInstances.forEach(_deleteUnknownAutoBindMethods2.default);
  
      // Let the user take care of redrawing
      return mountedInstances;
    }
  
    function get() {
      return ProxyComponent;
    }
  
    function getCurrent() {
      return CurrentComponent;
    }
  
    update(InitialComponent);
  
    var proxy = { get: get, update: update };
    addProxy(ProxyComponent, proxy);
  
    Object.defineProperty(proxy, '__getCurrent', {
      configurable: false,
      writable: false,
      enumerable: false,
      value: getCurrent
    });
  
    return proxy;
  }
  
  function createFallback(Component) {
    var CurrentComponent = Component;
  
    return {
      get: function get() {
        return CurrentComponent;
      },
      update: function update(NextComponent) {
        CurrentComponent = NextComponent;
      }
    };
  }
  
  function createClassProxy(Component) {
    return Component.__proto__ && (_supportsProtoAssignment2.default)() ? proxyClass(Component) : createFallback(Component);
  }
  });
  
  unwrapExports(createClassProxy_1);
  
  var lib$1 = createCommonjsModule(function (module, exports) {
  // Constant to identify a React Component. It's been extracted from ReactTypeOfWork
  // (https://github.com/facebook/react/blob/master/src/shared/ReactTypeOfWork.js#L20)
  exports.__esModule = true;
  exports['default'] = getForceUpdate;
  var ReactClassComponent = 2;
  
  function traverseRenderedChildren(internalInstance, callback, argument) {
    callback(internalInstance, argument);
  
    if (internalInstance._renderedComponent) {
      traverseRenderedChildren(internalInstance._renderedComponent, callback, argument);
    } else {
      for (var key in internalInstance._renderedChildren) {
        if (internalInstance._renderedChildren.hasOwnProperty(key)) {
          traverseRenderedChildren(internalInstance._renderedChildren[key], callback, argument);
        }
      }
    }
  }
  
  function setPendingForceUpdate(internalInstance) {
    if (internalInstance._pendingForceUpdate === false) {
      internalInstance._pendingForceUpdate = true;
    }
  }
  
  function forceUpdateIfPending(internalInstance, React$$1) {
    if (internalInstance._pendingForceUpdate === true) {
      var publicInstance = internalInstance._instance;
      React$$1.Component.prototype.forceUpdate.call(publicInstance);
    }
  }
  
  function deepForceUpdateStack(instance, React$$1) {
    var internalInstance = instance._reactInternalInstance;
    traverseRenderedChildren(internalInstance, setPendingForceUpdate);
    traverseRenderedChildren(internalInstance, forceUpdateIfPending, React$$1);
  }
  
  function deepForceUpdate(instance, React$$1) {
    var root = instance._reactInternalFiber || instance._reactInternalInstance;
    if (typeof root.tag !== 'number') {
      // Traverse stack-based React tree.
      return deepForceUpdateStack(instance, React$$1);
    }
  
    var node = root;
    while (true) {
      if (node.tag === ReactClassComponent) {
        var publicInstance = node.stateNode;
        var updater = publicInstance.updater;
  
        if (typeof publicInstance.forceUpdate === 'function') {
          publicInstance.forceUpdate();
        } else if (updater && typeof updater.enqueueForceUpdate === 'function') {
          updater.enqueueForceUpdate(publicInstance);
        }
      }
      if (node.child) {
        node.child['return'] = node;
        node = node.child;
        continue;
      }
      if (node === root) {
        return undefined;
      }
      while (!node.sibling) {
        if (!node['return'] || node['return'] === root) {
          return undefined;
        }
        node = node['return'];
      }
      node.sibling['return'] = node['return'];
      node = node.sibling;
    }
  }
  
  function getForceUpdate(React$$1) {
    return function (instance) {
      deepForceUpdate(instance, React$$1);
    };
  }
  
  module.exports = exports['default'];
  });
  
  unwrapExports(lib$1);
  
  var modules = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.getForceUpdate = exports.createProxy = undefined;
  
  
  
  var _supportsProtoAssignment2 = _interopRequireDefault(supportsProtoAssignment_1);
  
  
  
  var _createClassProxy2 = _interopRequireDefault(createClassProxy_1);
  
  
  
  var _reactDeepForceUpdate2 = _interopRequireDefault(lib$1);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  if (!(_supportsProtoAssignment2.default)()) {
    console.warn('This JavaScript environment does not support __proto__. ' + 'This means that react-proxy is unable to proxy React components. ' + 'Features that rely on react-proxy, such as react-transform-hmr, ' + 'will not function as expected.');
  }
  
  exports.createProxy = _createClassProxy2.default;
  exports.getForceUpdate = _reactDeepForceUpdate2.default;
  });
  
  unwrapExports(modules);
  var modules_1 = modules.getForceUpdate;
  var modules_2 = modules.createProxy;
  
  var win;
  
  if (typeof window !== "undefined") {
      win = window;
  } else if (typeof commonjsGlobal !== "undefined") {
      win = commonjsGlobal;
  } else if (typeof self !== "undefined"){
      win = self;
  } else {
      win = {};
  }
  
  var window_1 = win;
  
  var lib = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports, '__esModule', {
    value: true
  });
  
  var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();
  
  exports['default'] = proxyReactComponents;
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
  
  
  
  
  
  var _globalWindow2 = _interopRequireDefault(window_1);
  
  var componentProxies = undefined;
  if (_globalWindow2['default'].__reactComponentProxies) {
    componentProxies = _globalWindow2['default'].__reactComponentProxies;
  } else {
    componentProxies = {};
    Object.defineProperty(_globalWindow2['default'], '__reactComponentProxies', {
      configurable: true,
      enumerable: false,
      writable: false,
      value: componentProxies
    });
  }
  
  function proxyReactComponents(_ref) {
    var filename = _ref.filename;
    var components = _ref.components;
    var imports = _ref.imports;
    var locals = _ref.locals;
  
    var _imports = _slicedToArray(imports, 1);
  
    var React$$1 = _imports[0];
  
    var _locals = _slicedToArray(locals, 1);
  
    var hot = _locals[0].hot;
  
    if (!React$$1.Component) {
      throw new Error('imports[0] for react-transform-hmr does not look like React.');
    }
  
    if (!hot || typeof hot.accept !== 'function') {
      throw new Error('locals[0] does not appear to be a `module` object with Hot Module ' + 'replacement API enabled. You should disable react-transform-hmr in ' + 'production by using `env` section in Babel configuration. See the ' + 'example in README: https://github.com/gaearon/react-transform-hmr');
    }
  
    if (Object.keys(components).some(function (key) {
      return !components[key].isInFunction;
    })) {
      hot.accept(function (err) {
        if (err) {
          console.warn('[React Transform HMR] There was an error updating ' + filename + ':');
          console.error(err);
        }
      });
    }
  
    var forceUpdate = (modules.getForceUpdate)(React$$1);
  
    return function wrapWithProxy(ReactClass, uniqueId) {
      var _components$uniqueId = components[uniqueId];
      var _components$uniqueId$isInFunction = _components$uniqueId.isInFunction;
      var isInFunction = _components$uniqueId$isInFunction === undefined ? false : _components$uniqueId$isInFunction;
      var _components$uniqueId$displayName = _components$uniqueId.displayName;
      var displayName = _components$uniqueId$displayName === undefined ? uniqueId : _components$uniqueId$displayName;
  
      if (isInFunction) {
        return ReactClass;
      }
  
      var globalUniqueId = filename + '$' + uniqueId;
      if (componentProxies[globalUniqueId]) {
        (function () {
          console.info('[React Transform HMR] Patching ' + displayName);
          var instances = componentProxies[globalUniqueId].update(ReactClass);
          setTimeout(function () {
            return instances.forEach(forceUpdate);
          });
        })();
      } else {
        componentProxies[globalUniqueId] = (modules.createProxy)(ReactClass);
      }
  
      return componentProxies[globalUniqueId].get();
    };
  }
  
  module.exports = exports['default'];
  });
  
  var _reactTransformHmr = unwrapExports(lib);
  
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
    return typeof obj;
  } : function (obj) {
    return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  };
  
  
  
  
  
  
  
  
  
  var classCallCheck = function (instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  };
  
  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 inherits = function (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 possibleConstructorReturn = function (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;
  };
  
  var _class$3;
  var _temp$2;
  
  var _components$3 = {
    YearDropdownOptions: {
      displayName: "YearDropdownOptions"
    }
  };
  
  var _reactTransformHmr2$3 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/year_dropdown_options.jsx",
    components: _components$3,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$3(id) {
    return function (Component) {
      return _reactTransformHmr2$3(Component, id);
    };
  }
  
  function generateYears(year, noOfYear, minDate, maxDate) {
    var list = [];
    for (var i = 0; i < 2 * noOfYear + 1; i++) {
      var newYear = year + noOfYear - i;
      var isInRange = true;
  
      if (minDate) {
        isInRange = minDate.year() <= newYear;
      }
  
      if (maxDate && isInRange) {
        isInRange = maxDate.year() >= newYear;
      }
  
      if (isInRange) {
        list.push(newYear);
      }
    }
  
    return list;
  }
  
  var YearDropdownOptions = _wrapComponent$3("YearDropdownOptions")((_temp$2 = _class$3 = function (_React$Component) {
    inherits(YearDropdownOptions, _React$Component);
  
    function YearDropdownOptions(props) {
      classCallCheck(this, YearDropdownOptions);
  
      var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
  
      _this.renderOptions = function () {
        var selectedYear = _this.props.year;
        var options = _this.state.yearsList.map(function (year) {
          return React.createElement(
            "div",
            { className: selectedYear === year ? 'react-datepicker__year-option --selected_year' : 'react-datepicker__year-option',
              key: year,
              ref: year,
              onClick: _this.onChange.bind(_this, year) },
            selectedYear === year ? React.createElement(
              "span",
              { className: "react-datepicker__year-option--selected" },
              "\u2713"
            ) : "",
            year
          );
        });
  
        var minYear = _this.props.minDate ? _this.props.minDate.year() : null;
        var maxYear = _this.props.maxDate ? _this.props.maxDate.year() : null;
  
        if (!maxYear || !_this.state.yearsList.find(function (year) {
          return year === maxYear;
        })) {
          options.unshift(React.createElement(
            "div",
            {
              className: "react-datepicker__year-option",
              ref: "upcoming",
              key: "upcoming",
              onClick: _this.incrementYears },
            React.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming" })
          ));
        }
  
        if (!minYear || !_this.state.yearsList.find(function (year) {
          return year === minYear;
        })) {
          options.push(React.createElement(
            "div",
            {
              className: "react-datepicker__year-option",
              ref: "previous",
              key: "previous",
              onClick: _this.decrementYears },
            React.createElement("a", { className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous" })
          ));
        }
  
        return options;
      };
  
      _this.onChange = function (year) {
        _this.props.onChange(year);
      };
  
      _this.handleClickOutside = function () {
        _this.props.onCancel();
      };
  
      _this.shiftYears = function (amount) {
        var years = _this.state.yearsList.map(function (year) {
          return year + amount;
        });
  
        _this.setState({
          yearsList: years
        });
      };
  
      _this.incrementYears = function () {
        return _this.shiftYears(1);
      };
  
      _this.decrementYears = function () {
        return _this.shiftYears(-1);
      };
  
      var yearDropdownItemNumber = props.yearDropdownItemNumber,
          scrollableYearDropdown = props.scrollableYearDropdown;
  
      var noOfYear = yearDropdownItemNumber || (scrollableYearDropdown ? 10 : 5);
  
      _this.state = {
        yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
      };
      return _this;
    }
  
    YearDropdownOptions.prototype.render = function render() {
      var dropdownClass = classnames({
        "react-datepicker__year-dropdown": true,
        "react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
      });
  
      return React.createElement(
        "div",
        { className: dropdownClass },
        this.renderOptions()
      );
    };
  
    return YearDropdownOptions;
  }(React.Component), _class$3.propTypes = {
    minDate: PropTypes.object,
    maxDate: PropTypes.object,
    onCancel: PropTypes.func.isRequired,
    onChange: PropTypes.func.isRequired,
    scrollableYearDropdown: PropTypes.bool,
    year: PropTypes.number.isRequired,
    yearDropdownItemNumber: PropTypes.number
  }, _temp$2));
  
  var dayOfWeekCodes = {
    1: "mon",
    2: "tue",
    3: "wed",
    4: "thu",
    5: "fri",
    6: "sat",
    7: "sun"
  };
  
  // These functions are not exported so
  // that we avoid magic strings like 'days'
  function set$1(date, unit, to) {
    return date.set(unit, to);
  }
  
  function add(date, amount, unit) {
    return date.add(amount, unit);
  }
  
  function subtract(date, amount, unit) {
    return date.subtract(amount, unit);
  }
  
  function get$3(date, unit) {
    return date.get(unit);
  }
  
  function getStartOf(date, unit) {
    return date.startOf(unit);
  }
  
  // ** Date Constructors **
  
  function newDate(point) {
    return moment(point);
  }
  
  function newDateWithOffset(utcOffset) {
    return moment().utc().utcOffset(utcOffset);
  }
  
  function now(maybeFixedUtcOffset) {
    if (maybeFixedUtcOffset == null) {
      return newDate();
    }
    return newDateWithOffset(maybeFixedUtcOffset);
  }
  
  function cloneDate(date) {
    return date.clone();
  }
  
  function parseDate(value, _ref) {
    var dateFormat = _ref.dateFormat,
        locale = _ref.locale;
  
    var m = moment(value, dateFormat, locale || moment.locale(), true);
    return m.isValid() ? m : null;
  }
  
  // ** Date "Reflection" **
  
  function isMoment(date) {
    return moment.isMoment(date);
  }
  
  function isDate(date) {
    return moment.isDate(date);
  }
  
  // ** Date Formatting **
  
  function formatDate(date, format) {
    return date.format(format);
  }
  
  function safeDateFormat(date, _ref2) {
    var dateFormat = _ref2.dateFormat,
        locale = _ref2.locale;
  
    return date && date.clone().locale(locale || moment.locale()).format(Array.isArray(dateFormat) ? dateFormat[0] : dateFormat) || "";
  }
  
  // ** Date Setters **
  
  function setTime(date, _ref3) {
    var hour = _ref3.hour,
        minute = _ref3.minute,
        second = _ref3.second;
  
    date.set({ hour: hour, minute: minute, second: second });
    return date;
  }
  
  function setMonth(date, month) {
    return set$1(date, "month", month);
  }
  
  function setYear(date, year) {
    return set$1(date, "year", year);
  }
  
  
  
  // ** Date Getters **
  
  function getSecond(date) {
    return get$3(date, "second");
  }
  
  function getMinute(date) {
    return get$3(date, "minute");
  }
  
  function getHour(date) {
    return get$3(date, "hour");
  }
  
  // Returns day of week
  function getDay(date) {
    return get$3(date, "day");
  }
  
  function getWeek(date) {
    return get$3(date, "week");
  }
  
  function getMonth(date) {
    return get$3(date, "month");
  }
  
  function getYear(date) {
    return get$3(date, "year");
  }
  
  // Returns day of month
  function getDate(date) {
    return get$3(date, "date");
  }
  
  
  
  function getDayOfWeekCode(day) {
    return dayOfWeekCodes[day.isoWeekday()];
  }
  
  // *** Start of ***
  
  function getStartOfDay(date) {
    return getStartOf(date, "day");
  }
  
  function getStartOfWeek(date) {
    return getStartOf(date, "week");
  }
  function getStartOfMonth(date) {
    return getStartOf(date, "month");
  }
  
  function getStartOfDate(date) {
    return getStartOf(date, "date");
  }
  
  // *** End of ***
  
  
  
  
  
  // ** Date Math **
  
  // *** Addition ***
  
  function addMinutes(date, amount) {
    return add(date, amount, "minutes");
  }
  
  function addDays(date, amount) {
    return add(date, amount, "days");
  }
  
  function addWeeks(date, amount) {
    return add(date, amount, "weeks");
  }
  
  function addMonths(date, amount) {
    return add(date, amount, "months");
  }
  
  function addYears(date, amount) {
    return add(date, amount, "years");
  }
  
  // *** Subtraction ***
  function subtractDays(date, amount) {
    return subtract(date, amount, "days");
  }
  
  function subtractWeeks(date, amount) {
    return subtract(date, amount, "weeks");
  }
  
  function subtractMonths(date, amount) {
    return subtract(date, amount, "months");
  }
  
  function subtractYears(date, amount) {
    return subtract(date, amount, "years");
  }
  
  // ** Date Comparison **
  
  function isBefore(date1, date2) {
    return date1.isBefore(date2);
  }
  
  function isAfter(date1, date2) {
    return date1.isAfter(date2);
  }
  
  
  
  function isSameYear(date1, date2) {
    if (date1 && date2) {
      return date1.isSame(date2, "year");
    } else {
      return !date1 && !date2;
    }
  }
  
  function isSameMonth(date1, date2) {
    if (date1 && date2) {
      return date1.isSame(date2, "month");
    } else {
      return !date1 && !date2;
    }
  }
  
  function isSameDay(moment1, moment2) {
    if (moment1 && moment2) {
      return moment1.isSame(moment2, "day");
    } else {
      return !moment1 && !moment2;
    }
  }
  
  
  
  function isDayInRange(day, startDate, endDate) {
    var before = startDate.clone().startOf("day").subtract(1, "seconds");
    var after = endDate.clone().startOf("day").add(1, "seconds");
    return day.clone().startOf("day").isBetween(before, after);
  }
  
  // *** Diffing ***
  
  
  
  // ** Date Localization **
  
  function localizeDate(date, locale) {
    return date.clone().locale(locale || moment.locale());
  }
  
  
  
  
  
  
  
  function getLocaleData(date) {
    return date.localeData();
  }
  
  function getLocaleDataForLocale(locale) {
    return moment.localeData(locale);
  }
  
  function getWeekdayMinInLocale(locale, date) {
    return locale.weekdaysMin(date);
  }
  
  function getWeekdayShortInLocale(locale, date) {
    return locale.weekdaysShort(date);
  }
  
  // TODO what is this format exactly?
  function getMonthInLocale(locale, date, format) {
    return locale.months(date, format);
  }
  
  function getMonthShortInLocale(locale, date) {
    return locale.monthsShort(date);
  }
  
  // ** Utils for some components **
  
  function isDayDisabled(day) {
    var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        minDate = _ref4.minDate,
        maxDate = _ref4.maxDate,
        excludeDates = _ref4.excludeDates,
        includeDates = _ref4.includeDates,
        filterDate = _ref4.filterDate;
  
    return minDate && day.isBefore(minDate, "day") || maxDate && day.isAfter(maxDate, "day") || excludeDates && excludeDates.some(function (excludeDate) {
      return isSameDay(day, excludeDate);
    }) || includeDates && !includeDates.some(function (includeDate) {
      return isSameDay(day, includeDate);
    }) || filterDate && !filterDate(day.clone()) || false;
  }
  
  function isTimeDisabled(time, disabledTimes) {
    var l = disabledTimes.length;
    for (var i = 0; i < l; i++) {
      if (disabledTimes[i].get("hours") === time.get("hours") && disabledTimes[i].get("minutes") === time.get("minutes")) {
        return true;
      }
    }
  
    return false;
  }
  
  function isTimeInDisabledRange(time, _ref5) {
    var minTime = _ref5.minTime,
        maxTime = _ref5.maxTime;
  
    if (!minTime || !maxTime) {
      throw new Error("Both minTime and maxTime props required");
    }
  
    var base = moment().hours(0).minutes(0).seconds(0);
    var baseTime = base.clone().hours(time.get("hours")).minutes(time.get("minutes"));
    var min = base.clone().hours(minTime.get("hours")).minutes(minTime.get("minutes"));
    var max = base.clone().hours(maxTime.get("hours")).minutes(maxTime.get("minutes"));
  
    return !(baseTime.isSameOrAfter(min) && baseTime.isSameOrBefore(max));
  }
  
  function allDaysDisabledBefore(day, unit) {
    var _ref6 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
        minDate = _ref6.minDate,
        includeDates = _ref6.includeDates;
  
    var dateBefore = day.clone().subtract(1, unit);
    return minDate && dateBefore.isBefore(minDate, unit) || includeDates && includeDates.every(function (includeDate) {
      return dateBefore.isBefore(includeDate, unit);
    }) || false;
  }
  
  function allDaysDisabledAfter(day, unit) {
    var _ref7 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
        maxDate = _ref7.maxDate,
        includeDates = _ref7.includeDates;
  
    var dateAfter = day.clone().add(1, unit);
    return maxDate && dateAfter.isAfter(maxDate, unit) || includeDates && includeDates.every(function (includeDate) {
      return dateAfter.isAfter(includeDate, unit);
    }) || false;
  }
  
  function getEffectiveMinDate(_ref8) {
    var minDate = _ref8.minDate,
        includeDates = _ref8.includeDates;
  
    if (includeDates && minDate) {
      return moment.min(includeDates.filter(function (includeDate) {
        return minDate.isSameOrBefore(includeDate, "day");
      }));
    } else if (includeDates) {
      return moment.min(includeDates);
    } else {
      return minDate;
    }
  }
  
  function getEffectiveMaxDate(_ref9) {
    var maxDate = _ref9.maxDate,
        includeDates = _ref9.includeDates;
  
    if (includeDates && maxDate) {
      return moment.max(includeDates.filter(function (includeDate) {
        return maxDate.isSameOrAfter(includeDate, "day");
      }));
    } else if (includeDates) {
      return moment.max(includeDates);
    } else {
      return maxDate;
    }
  }
  
  function getHightLightDaysMap() {
    var highlightDates = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
    var defaultClassName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "react-datepicker__day--highlighted";
  
    var dateClasses = new Map();
    for (var i = 0, len = highlightDates.length; i < len; i++) {
      var obj = highlightDates[i];
      if (isMoment(obj)) {
        var key = obj.format("MM.DD.YYYY");
        var classNamesArr = dateClasses.get(key) || [];
        if (!classNamesArr.includes(defaultClassName)) {
          classNamesArr.push(defaultClassName);
          dateClasses.set(key, classNamesArr);
        }
      } else if ((typeof obj === "undefined" ? "undefined" : _typeof(obj)) === "object") {
        var keys = Object.keys(obj);
        var className = keys[0];
        var arrOfMoments = obj[keys[0]];
        if (typeof className === "string" && arrOfMoments.constructor === Array) {
          for (var k = 0, _len = arrOfMoments.length; k < _len; k++) {
            var _key = arrOfMoments[k].format("MM.DD.YYYY");
            var _classNamesArr = dateClasses.get(_key) || [];
            if (!_classNamesArr.includes(className)) {
              _classNamesArr.push(className);
              dateClasses.set(_key, _classNamesArr);
            }
          }
        }
      }
    }
  
    return dateClasses;
  }
  
  var _class$2;
  var _temp2;
  
  var _components$2 = {
    YearDropdown: {
      displayName: "YearDropdown"
    }
  };
  
  var _reactTransformHmr2$2 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/year_dropdown.jsx",
    components: _components$2,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$2(id) {
    return function (Component) {
      return _reactTransformHmr2$2(Component, id);
    };
  }
  
  var WrappedYearDropdownOptions = onClickOutside(YearDropdownOptions);
  
  var YearDropdown = _wrapComponent$2("YearDropdown")((_temp2 = _class$2 = function (_React$Component) {
    inherits(YearDropdown, _React$Component);
  
    function YearDropdown() {
      var _temp, _this, _ret;
  
      classCallCheck(this, YearDropdown);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
        dropdownVisible: false
      }, _this.renderSelectOptions = function () {
        var minYear = _this.props.minDate ? getYear(_this.props.minDate) : 1900;
        var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
  
        var options = [];
        for (var i = minYear; i <= maxYear; i++) {
          options.push(React.createElement(
            "option",
            { key: i, value: i },
            i
          ));
        }
        return options;
      }, _this.onSelectChange = function (e) {
        _this.onChange(e.target.value);
      }, _this.renderSelectMode = function () {
        return React.createElement(
          "select",
          {
            value: _this.props.year,
            className: "react-datepicker__year-select",
            onChange: _this.onSelectChange },
          _this.renderSelectOptions()
        );
      }, _this.renderReadView = function (visible) {
        return React.createElement(
          "div",
          {
            key: "read",
            style: { visibility: visible ? "visible" : "hidden" },
            className: "react-datepicker__year-read-view",
            onClick: function onClick(event) {
              return _this.toggleDropdown(event);
            } },
          React.createElement("span", { className: "react-datepicker__year-read-view--down-arrow" }),
          React.createElement(
            "span",
            { className: "react-datepicker__year-read-view--selected-year" },
            _this.props.year
          )
        );
      }, _this.renderDropdown = function () {
        return React.createElement(WrappedYearDropdownOptions, {
          key: "dropdown",
          ref: "options",
          year: _this.props.year,
          onChange: _this.onChange,
          onCancel: _this.toggleDropdown,
          minDate: _this.props.minDate,
          maxDate: _this.props.maxDate,
          scrollableYearDropdown: _this.props.scrollableYearDropdown,
          yearDropdownItemNumber: _this.props.yearDropdownItemNumber });
      }, _this.renderScrollMode = function () {
        var dropdownVisible = _this.state.dropdownVisible;
  
        var result = [_this.renderReadView(!dropdownVisible)];
        if (dropdownVisible) {
          result.unshift(_this.renderDropdown());
        }
        return result;
      }, _this.onChange = function (year) {
        _this.toggleDropdown();
        if (year === _this.props.year) return;
        _this.props.onChange(year);
      }, _this.toggleDropdown = function (event) {
        _this.setState({
          dropdownVisible: !_this.state.dropdownVisible
        }, function () {
          if (_this.props.adjustDateOnChange) {
            _this.handleYearChange(_this.props.date, event);
          }
        });
      }, _this.handleYearChange = function (date, event) {
        _this.onSelect(date, event);
        _this.setOpen();
      }, _this.onSelect = function (date, event) {
        if (_this.props.onSelect) {
          _this.props.onSelect(date, event);
        }
      }, _this.setOpen = function () {
        if (_this.props.setOpen) {
          _this.props.setOpen(true);
        }
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    YearDropdown.prototype.render = function render() {
      var renderedDropdown = void 0;
      switch (this.props.dropdownMode) {
        case "scroll":
          renderedDropdown = this.renderScrollMode();
          break;
        case "select":
          renderedDropdown = this.renderSelectMode();
          break;
      }
  
      return React.createElement(
        "div",
        {
          className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--" + this.props.dropdownMode },
        renderedDropdown
      );
    };
  
    return YearDropdown;
  }(React.Component), _class$2.propTypes = {
    adjustDateOnChange: PropTypes.bool,
    dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired,
    maxDate: PropTypes.object,
    minDate: PropTypes.object,
    onChange: PropTypes.func.isRequired,
    scrollableYearDropdown: PropTypes.bool,
    year: PropTypes.number.isRequired,
    yearDropdownItemNumber: PropTypes.number,
    date: PropTypes.object,
    onSelect: PropTypes.func,
    setOpen: PropTypes.func
  }, _temp2));
  
  var _class$5;
  var _temp2$2;
  
  var _components$5 = {
    MonthDropdownOptions: {
      displayName: "MonthDropdownOptions"
    }
  };
  
  var _reactTransformHmr2$5 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/month_dropdown_options.jsx",
    components: _components$5,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$5(id) {
    return function (Component) {
      return _reactTransformHmr2$5(Component, id);
    };
  }
  
  var MonthDropdownOptions = _wrapComponent$5("MonthDropdownOptions")((_temp2$2 = _class$5 = function (_React$Component) {
    inherits(MonthDropdownOptions, _React$Component);
  
    function MonthDropdownOptions() {
      var _temp, _this, _ret;
  
      classCallCheck(this, MonthDropdownOptions);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.renderOptions = function () {
        return _this.props.monthNames.map(function (month, i) {
          return React.createElement(
            "div",
            { className: _this.props.month === i ? 'react-datepicker__month-option --selected_month' : 'react-datepicker__month-option',
              key: month,
              ref: month,
              onClick: _this.onChange.bind(_this, i) },
            _this.props.month === i ? React.createElement(
              "span",
              { className: "react-datepicker__month-option--selected" },
              "\u2713"
            ) : "",
            month
          );
        });
      }, _this.onChange = function (month) {
        return _this.props.onChange(month);
      }, _this.handleClickOutside = function () {
        return _this.props.onCancel();
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    MonthDropdownOptions.prototype.render = function render() {
      return React.createElement(
        "div",
        { className: "react-datepicker__month-dropdown" },
        this.renderOptions()
      );
    };
  
    return MonthDropdownOptions;
  }(React.Component), _class$5.propTypes = {
    onCancel: PropTypes.func.isRequired,
    onChange: PropTypes.func.isRequired,
    month: PropTypes.number.isRequired,
    monthNames: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired
  }, _temp2$2));
  
  var _class$4;
  var _temp2$1;
  
  var _components$4 = {
    MonthDropdown: {
      displayName: "MonthDropdown"
    }
  };
  
  var _reactTransformHmr2$4 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/month_dropdown.jsx",
    components: _components$4,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$4(id) {
    return function (Component) {
      return _reactTransformHmr2$4(Component, id);
    };
  }
  
  var WrappedMonthDropdownOptions = onClickOutside(MonthDropdownOptions);
  
  var MonthDropdown = _wrapComponent$4("MonthDropdown")((_temp2$1 = _class$4 = function (_React$Component) {
    inherits(MonthDropdown, _React$Component);
  
    function MonthDropdown() {
      var _temp, _this, _ret;
  
      classCallCheck(this, MonthDropdown);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
        dropdownVisible: false
      }, _this.renderSelectOptions = function (monthNames) {
        return monthNames.map(function (M, i) {
          return React.createElement(
            "option",
            { key: i, value: i },
            M
          );
        });
      }, _this.renderSelectMode = function (monthNames) {
        return React.createElement(
          "select",
          {
            value: _this.props.month,
            className: "react-datepicker__month-select",
            onChange: function onChange(e) {
              return _this.onChange(e.target.value);
            } },
          _this.renderSelectOptions(monthNames)
        );
      }, _this.renderReadView = function (visible, monthNames) {
        return React.createElement(
          "div",
          {
            key: "read",
            style: { visibility: visible ? "visible" : "hidden" },
            className: "react-datepicker__month-read-view",
            onClick: _this.toggleDropdown },
          React.createElement("span", { className: "react-datepicker__month-read-view--down-arrow" }),
          React.createElement(
            "span",
            { className: "react-datepicker__month-read-view--selected-month" },
            monthNames[_this.props.month]
          )
        );
      }, _this.renderDropdown = function (monthNames) {
        return React.createElement(WrappedMonthDropdownOptions, {
          key: "dropdown",
          ref: "options",
          month: _this.props.month,
          monthNames: monthNames,
          onChange: _this.onChange,
          onCancel: _this.toggleDropdown });
      }, _this.renderScrollMode = function (monthNames) {
        var dropdownVisible = _this.state.dropdownVisible;
  
        var result = [_this.renderReadView(!dropdownVisible, monthNames)];
        if (dropdownVisible) {
          result.unshift(_this.renderDropdown(monthNames));
        }
        return result;
      }, _this.onChange = function (month) {
        _this.toggleDropdown();
        if (month !== _this.props.month) {
          _this.props.onChange(month);
        }
      }, _this.toggleDropdown = function () {
        return _this.setState({
          dropdownVisible: !_this.state.dropdownVisible
        });
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    MonthDropdown.prototype.render = function render() {
      var _this2 = this;
  
      var localeData = getLocaleDataForLocale(this.props.locale);
      var monthNames = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(this.props.useShortMonthInDropdown ? function (M) {
        return getMonthShortInLocale(localeData, newDate({ M: M }));
      } : function (M) {
        return getMonthInLocale(localeData, newDate({ M: M }), _this2.props.dateFormat);
      });
  
      var renderedDropdown = void 0;
      switch (this.props.dropdownMode) {
        case "scroll":
          renderedDropdown = this.renderScrollMode(monthNames);
          break;
        case "select":
          renderedDropdown = this.renderSelectMode(monthNames);
          break;
      }
  
      return React.createElement(
        "div",
        {
          className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--" + this.props.dropdownMode },
        renderedDropdown
      );
    };
  
    return MonthDropdown;
  }(React.Component), _class$4.propTypes = {
    dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired,
    locale: PropTypes.string,
    dateFormat: PropTypes.string.isRequired,
    month: PropTypes.number.isRequired,
    onChange: PropTypes.func.isRequired,
    useShortMonthInDropdown: PropTypes.bool
  }, _temp2$1));
  
  var _class$7;
  var _temp$3;
  
  var _components$7 = {
    MonthYearDropdownOptions: {
      displayName: 'MonthYearDropdownOptions'
    }
  };
  
  var _reactTransformHmr2$7 = _reactTransformHmr({
    filename: '/Users/mrusschen/development/react-datepicker/src/month_year_dropdown_options.jsx',
    components: _components$7,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$7(id) {
    return function (Component) {
      return _reactTransformHmr2$7(Component, id);
    };
  }
  
  function generateMonthYears(minDate, maxDate) {
    var list = [];
  
    var currDate = getStartOfMonth(cloneDate(minDate));
    var lastDate = getStartOfMonth(cloneDate(maxDate));
  
    while (!isAfter(currDate, lastDate)) {
      list.push(cloneDate(currDate));
  
      addMonths(currDate, 1);
    }
  
    return list;
  }
  
  var MonthYearDropdownOptions = _wrapComponent$7('MonthYearDropdownOptions')((_temp$3 = _class$7 = function (_React$Component) {
    inherits(MonthYearDropdownOptions, _React$Component);
  
    function MonthYearDropdownOptions(props) {
      classCallCheck(this, MonthYearDropdownOptions);
  
      var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
  
      _this.renderOptions = function () {
  
        return _this.state.monthYearsList.map(function (monthYear) {
  
          var monthYearPoint = monthYear.valueOf();
  
          var isSameMonthYear = isSameYear(_this.props.date, monthYear) && isSameMonth(_this.props.date, monthYear);
  
          return React.createElement(
            'div',
            { className: isSameMonthYear ? 'react-datepicker__month-year-option --selected_month-year' : 'react-datepicker__month-year-option',
              key: monthYearPoint,
              ref: monthYearPoint,
              onClick: _this.onChange.bind(_this, monthYearPoint) },
            isSameMonthYear ? React.createElement(
              'span',
              { className: 'react-datepicker__month-year-option--selected' },
              '\u2713'
            ) : "",
            formatDate(monthYear, _this.props.dateFormat)
          );
        });
      };
  
      _this.onChange = function (monthYear) {
        return _this.props.onChange(monthYear);
      };
  
      _this.handleClickOutside = function () {
        _this.props.onCancel();
      };
  
      _this.state = {
        monthYearsList: generateMonthYears(_this.props.minDate, _this.props.maxDate)
      };
      return _this;
    }
  
    MonthYearDropdownOptions.prototype.render = function render() {
      var dropdownClass = classnames({
        'react-datepicker__month-year-dropdown': true,
        'react-datepicker__month-year-dropdown--scrollable': this.props.scrollableMonthYearDropdown
      });
  
      return React.createElement(
        'div',
        { className: dropdownClass },
        this.renderOptions()
      );
    };
  
    return MonthYearDropdownOptions;
  }(React.Component), _class$7.propTypes = {
    minDate: PropTypes.object.isRequired,
    maxDate: PropTypes.object.isRequired,
    onCancel: PropTypes.func.isRequired,
    onChange: PropTypes.func.isRequired,
    scrollableMonthYearDropdown: PropTypes.bool,
    date: PropTypes.object.isRequired,
    dateFormat: PropTypes.string.isRequired
  }, _temp$3));
  
  var _class$6;
  var _temp2$3;
  
  var _components$6 = {
    MonthYearDropdown: {
      displayName: 'MonthYearDropdown'
    }
  };
  
  var _reactTransformHmr2$6 = _reactTransformHmr({
    filename: '/Users/mrusschen/development/react-datepicker/src/month_year_dropdown.jsx',
    components: _components$6,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$6(id) {
    return function (Component) {
      return _reactTransformHmr2$6(Component, id);
    };
  }
  
  var WrappedMonthYearDropdownOptions = onClickOutside(MonthYearDropdownOptions);
  
  var MonthYearDropdown = _wrapComponent$6('MonthYearDropdown')((_temp2$3 = _class$6 = function (_React$Component) {
    inherits(MonthYearDropdown, _React$Component);
  
    function MonthYearDropdown() {
      var _temp, _this, _ret;
  
      classCallCheck(this, MonthYearDropdown);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {
        dropdownVisible: false
      }, _this.renderSelectOptions = function () {
        var currDate = getStartOfMonth(localizeDate(_this.props.minDate, _this.props.locale));
        var lastDate = getStartOfMonth(localizeDate(_this.props.maxDate, _this.props.locale));
  
        var options = [];
  
        while (!isAfter(currDate, lastDate)) {
  
          var timepoint = currDate.valueOf();
          options.push(React.createElement(
            'option',
            { key: timepoint, value: timepoint },
            formatDate(currDate, _this.props.dateFormat)
          ));
  
          addMonths(currDate, 1);
        }
  
        return options;
      }, _this.onSelectChange = function (e) {
        _this.onChange(e.target.value);
      }, _this.renderSelectMode = function () {
        return React.createElement(
          'select',
          {
            value: getStartOfMonth(_this.props.date).valueOf(),
            className: 'react-datepicker__month-year-select',
            onChange: _this.onSelectChange },
          _this.renderSelectOptions()
        );
      }, _this.renderReadView = function (visible) {
  
        var yearMonth = formatDate(localizeDate(newDate(_this.props.date), _this.props.locale), _this.props.dateFormat);
  
        return React.createElement(
          'div',
          { key: 'read',
            style: { visibility: visible ? 'visible' : 'hidden' },
            className: 'react-datepicker__month-year-read-view',
            onClick: function onClick(event) {
              return _this.toggleDropdown(event);
            } },
          React.createElement('span', { className: 'react-datepicker__month-year-read-view--down-arrow' }),
          React.createElement(
            'span',
            { className: 'react-datepicker__month-year-read-view--selected-month-year' },
            yearMonth
          )
        );
      }, _this.renderDropdown = function () {
        return React.createElement(WrappedMonthYearDropdownOptions, {
          key: 'dropdown',
          ref: 'options',
          date: _this.props.date,
          dateFormat: _this.props.dateFormat,
          onChange: _this.onChange,
          onCancel: _this.toggleDropdown,
          minDate: localizeDate(_this.props.minDate, _this.props.locale),
          maxDate: localizeDate(_this.props.maxDate, _this.props.locale),
          scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown });
      }, _this.renderScrollMode = function () {
        var dropdownVisible = _this.state.dropdownVisible;
  
        var result = [_this.renderReadView(!dropdownVisible)];
        if (dropdownVisible) {
          result.unshift(_this.renderDropdown());
        }
        return result;
      }, _this.onChange = function (monthYearPoint) {
        _this.toggleDropdown();
  
        var changedDate = newDate(parseInt(monthYearPoint));
  
        if (isSameYear(_this.props.date, changedDate) && isSameMonth(_this.props.date, changedDate)) {
          return;
        }
  
        _this.props.onChange(changedDate);
      }, _this.toggleDropdown = function () {
        return _this.setState({
          dropdownVisible: !_this.state.dropdownVisible
        });
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    MonthYearDropdown.prototype.render = function render() {
      var renderedDropdown = void 0;
      switch (this.props.dropdownMode) {
        case 'scroll':
          renderedDropdown = this.renderScrollMode();
          break;
        case 'select':
          renderedDropdown = this.renderSelectMode();
          break;
      }
  
      return React.createElement(
        'div',
        {
          className: 'react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--' + this.props.dropdownMode },
        renderedDropdown
      );
    };
  
    return MonthYearDropdown;
  }(React.Component), _class$6.propTypes = {
    dropdownMode: PropTypes.oneOf(['scroll', 'select']).isRequired,
    dateFormat: PropTypes.string.isRequired,
    locale: PropTypes.string,
    maxDate: PropTypes.object.isRequired,
    minDate: PropTypes.object.isRequired,
    date: PropTypes.object.isRequired,
    onChange: PropTypes.func.isRequired,
    scrollableMonthYearDropdown: PropTypes.bool
  }, _temp2$3));
  
  var _class$10;
  var _temp2$6;
  
  var _components$10 = {
    Day: {
      displayName: "Day"
    }
  };
  
  var _reactTransformHmr2$10 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/day.jsx",
    components: _components$10,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$10(id) {
    return function (Component) {
      return _reactTransformHmr2$10(Component, id);
    };
  }
  
  var Day = _wrapComponent$10("Day")((_temp2$6 = _class$10 = function (_React$Component) {
    inherits(Day, _React$Component);
  
    function Day() {
      var _temp, _this, _ret;
  
      classCallCheck(this, Day);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
        if (!_this.isDisabled() && _this.props.onClick) {
          _this.props.onClick(event);
        }
      }, _this.handleMouseEnter = function (event) {
        if (!_this.isDisabled() && _this.props.onMouseEnter) {
          _this.props.onMouseEnter(event);
        }
      }, _this.isSameDay = function (other) {
        return isSameDay(_this.props.day, other);
      }, _this.isKeyboardSelected = function () {
        return !_this.props.inline && !_this.isSameDay(_this.props.selected) && _this.isSameDay(_this.props.preSelection);
      }, _this.isDisabled = function () {
        return isDayDisabled(_this.props.day, _this.props);
      }, _this.getHighLightedClass = function (defaultClassName) {
        var _this$props = _this.props,
            day = _this$props.day,
            highlightDates = _this$props.highlightDates;
  
  
        if (!highlightDates) {
          return false;
        }
  
        // Looking for className in the Map of {'day string, 'className'}
        var dayStr = day.format("MM.DD.YYYY");
        return highlightDates.get(dayStr);
      }, _this.isInRange = function () {
        var _this$props2 = _this.props,
            day = _this$props2.day,
            startDate = _this$props2.startDate,
            endDate = _this$props2.endDate;
  
        if (!startDate || !endDate) {
          return false;
        }
        return isDayInRange(day, startDate, endDate);
      }, _this.isInSelectingRange = function () {
        var _this$props3 = _this.props,
            day = _this$props3.day,
            selectsStart = _this$props3.selectsStart,
            selectsEnd = _this$props3.selectsEnd,
            selectingDate = _this$props3.selectingDate,
            startDate = _this$props3.startDate,
            endDate = _this$props3.endDate;
  
  
        if (!(selectsStart || selectsEnd) || !selectingDate || _this.isDisabled()) {
          return false;
        }
  
        if (selectsStart && endDate && selectingDate.isSameOrBefore(endDate)) {
          return isDayInRange(day, selectingDate, endDate);
        }
  
        if (selectsEnd && startDate && selectingDate.isSameOrAfter(startDate)) {
          return isDayInRange(day, startDate, selectingDate);
        }
  
        return false;
      }, _this.isSelectingRangeStart = function () {
        if (!_this.isInSelectingRange()) {
          return false;
        }
  
        var _this$props4 = _this.props,
            day = _this$props4.day,
            selectingDate = _this$props4.selectingDate,
            startDate = _this$props4.startDate,
            selectsStart = _this$props4.selectsStart;
  
  
        if (selectsStart) {
          return isSameDay(day, selectingDate);
        } else {
          return isSameDay(day, startDate);
        }
      }, _this.isSelectingRangeEnd = function () {
        if (!_this.isInSelectingRange()) {
          return false;
        }
  
        var _this$props5 = _this.props,
            day = _this$props5.day,
            selectingDate = _this$props5.selectingDate,
            endDate = _this$props5.endDate,
            selectsEnd = _this$props5.selectsEnd;
  
  
        if (selectsEnd) {
          return isSameDay(day, selectingDate);
        } else {
          return isSameDay(day, endDate);
        }
      }, _this.isRangeStart = function () {
        var _this$props6 = _this.props,
            day = _this$props6.day,
            startDate = _this$props6.startDate,
            endDate = _this$props6.endDate;
  
        if (!startDate || !endDate) {
          return false;
        }
        return isSameDay(startDate, day);
      }, _this.isRangeEnd = function () {
        var _this$props7 = _this.props,
            day = _this$props7.day,
            startDate = _this$props7.startDate,
            endDate = _this$props7.endDate;
  
        if (!startDate || !endDate) {
          return false;
        }
        return isSameDay(endDate, day);
      }, _this.isWeekend = function () {
        var weekday = getDay(_this.props.day);
        return weekday === 0 || weekday === 6;
      }, _this.isOutsideMonth = function () {
        return _this.props.month !== undefined && _this.props.month !== getMonth(_this.props.day);
      }, _this.getClassNames = function (date) {
        var dayClassName = _this.props.dayClassName ? _this.props.dayClassName(date) : undefined;
        return classnames("react-datepicker__day", dayClassName, "react-datepicker__day--" + getDayOfWeekCode(_this.props.day), {
          "react-datepicker__day--disabled": _this.isDisabled(),
          "react-datepicker__day--selected": _this.isSameDay(_this.props.selected),
          "react-datepicker__day--keyboard-selected": _this.isKeyboardSelected(),
          "react-datepicker__day--range-start": _this.isRangeStart(),
          "react-datepicker__day--range-end": _this.isRangeEnd(),
          "react-datepicker__day--in-range": _this.isInRange(),
          "react-datepicker__day--in-selecting-range": _this.isInSelectingRange(),
          "react-datepicker__day--selecting-range-start": _this.isSelectingRangeStart(),
          "react-datepicker__day--selecting-range-end": _this.isSelectingRangeEnd(),
          "react-datepicker__day--today": _this.isSameDay(now(_this.props.utcOffset)),
          "react-datepicker__day--weekend": _this.isWeekend(),
          "react-datepicker__day--outside-month": _this.isOutsideMonth()
        }, _this.getHighLightedClass("react-datepicker__day--highlighted"));
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    Day.prototype.render = function render() {
      return React.createElement(
        "div",
        {
          className: this.getClassNames(this.props.day),
          onClick: this.handleClick,
          onMouseEnter: this.handleMouseEnter,
          "aria-label": "day-" + getDate(this.props.day),
          role: "option" },
        getDate(this.props.day)
      );
    };
  
    return Day;
  }(React.Component), _class$10.propTypes = {
    day: PropTypes.object.isRequired,
    dayClassName: PropTypes.func,
    endDate: PropTypes.object,
    highlightDates: PropTypes.instanceOf(Map),
    inline: PropTypes.bool,
    month: PropTypes.number,
    onClick: PropTypes.func,
    onMouseEnter: PropTypes.func,
    preSelection: PropTypes.object,
    selected: PropTypes.object,
    selectingDate: PropTypes.object,
    selectsEnd: PropTypes.bool,
    selectsStart: PropTypes.bool,
    startDate: PropTypes.object,
    utcOffset: PropTypes.number
  }, _temp2$6));
  
  var _class$11;
  var _temp2$7;
  
  var _components$11 = {
    WeekNumber: {
      displayName: "WeekNumber"
    }
  };
  
  var _reactTransformHmr2$11 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/week_number.jsx",
    components: _components$11,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$11(id) {
    return function (Component) {
      return _reactTransformHmr2$11(Component, id);
    };
  }
  
  var WeekNumber = _wrapComponent$11("WeekNumber")((_temp2$7 = _class$11 = function (_React$Component) {
    inherits(WeekNumber, _React$Component);
  
    function WeekNumber() {
      var _temp, _this, _ret;
  
      classCallCheck(this, WeekNumber);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {
        if (_this.props.onClick) {
          _this.props.onClick(event);
        }
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    WeekNumber.prototype.render = function render() {
      var weekNumberClasses = {
        "react-datepicker__week-number": true,
        "react-datepicker__week-number--clickable": !!this.props.onClick
      };
      return React.createElement(
        "div",
        {
          className: classnames(weekNumberClasses),
          "aria-label": "week-" + this.props.weekNumber,
          onClick: this.handleClick },
        this.props.weekNumber
      );
    };
  
    return WeekNumber;
  }(React.Component), _class$11.propTypes = {
    weekNumber: PropTypes.number.isRequired,
    onClick: PropTypes.func
  }, _temp2$7));
  
  var _class$9;
  var _temp2$5;
  
  var _components$9 = {
    Week: {
      displayName: "Week"
    }
  };
  
  var _reactTransformHmr2$9 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/week.jsx",
    components: _components$9,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$9(id) {
    return function (Component) {
      return _reactTransformHmr2$9(Component, id);
    };
  }
  
  var Week = _wrapComponent$9("Week")((_temp2$5 = _class$9 = function (_React$Component) {
    inherits(Week, _React$Component);
  
    function Week() {
      var _temp, _this, _ret;
  
      classCallCheck(this, Week);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleDayClick = function (day, event) {
        if (_this.props.onDayClick) {
          _this.props.onDayClick(day, event);
        }
      }, _this.handleDayMouseEnter = function (day) {
        if (_this.props.onDayMouseEnter) {
          _this.props.onDayMouseEnter(day);
        }
      }, _this.handleWeekClick = function (day, weekNumber, event) {
        if (typeof _this.props.onWeekSelect === "function") {
          _this.props.onWeekSelect(day, weekNumber, event);
        }
      }, _this.formatWeekNumber = function (startOfWeek) {
        if (_this.props.formatWeekNumber) {
          return _this.props.formatWeekNumber(startOfWeek);
        }
        return getWeek(startOfWeek);
      }, _this.renderDays = function () {
        var startOfWeek = getStartOfWeek(cloneDate(_this.props.day));
        var days = [];
        var weekNumber = _this.formatWeekNumber(startOfWeek);
        if (_this.props.showWeekNumber) {
          var onClickAction = _this.props.onWeekSelect ? _this.handleWeekClick.bind(_this, startOfWeek, weekNumber) : undefined;
          days.push(React.createElement(WeekNumber, { key: "W", weekNumber: weekNumber, onClick: onClickAction }));
        }
        return days.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) {
          var day = addDays(cloneDate(startOfWeek), offset);
          return React.createElement(Day, {
            key: offset,
            day: day,
            month: _this.props.month,
            onClick: _this.handleDayClick.bind(_this, day),
            onMouseEnter: _this.handleDayMouseEnter.bind(_this, day),
            minDate: _this.props.minDate,
            maxDate: _this.props.maxDate,
            excludeDates: _this.props.excludeDates,
            includeDates: _this.props.includeDates,
            inline: _this.props.inline,
            highlightDates: _this.props.highlightDates,
            selectingDate: _this.props.selectingDate,
            filterDate: _this.props.filterDate,
            preSelection: _this.props.preSelection,
            selected: _this.props.selected,
            selectsStart: _this.props.selectsStart,
            selectsEnd: _this.props.selectsEnd,
            startDate: _this.props.startDate,
            endDate: _this.props.endDate,
            dayClassName: _this.props.dayClassName,
            utcOffset: _this.props.utcOffset });
        }));
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    Week.prototype.render = function render() {
      return React.createElement(
        "div",
        { className: "react-datepicker__week" },
        this.renderDays()
      );
    };
  
    return Week;
  }(React.Component), _class$9.propTypes = {
    day: PropTypes.object.isRequired,
    dayClassName: PropTypes.func,
    endDate: PropTypes.object,
    excludeDates: PropTypes.array,
    filterDate: PropTypes.func,
    formatWeekNumber: PropTypes.func,
    highlightDates: PropTypes.instanceOf(Map),
    includeDates: PropTypes.array,
    inline: PropTypes.bool,
    maxDate: PropTypes.object,
    minDate: PropTypes.object,
    month: PropTypes.number,
    onDayClick: PropTypes.func,
    onDayMouseEnter: PropTypes.func,
    onWeekSelect: PropTypes.func,
    preSelection: PropTypes.object,
    selected: PropTypes.object,
    selectingDate: PropTypes.object,
    selectsEnd: PropTypes.bool,
    selectsStart: PropTypes.bool,
    showWeekNumber: PropTypes.bool,
    startDate: PropTypes.object,
    utcOffset: PropTypes.number
  }, _temp2$5));
  
  var _class$8;
  var _temp2$4;
  
  var _components$8 = {
    Month: {
      displayName: "Month"
    }
  };
  
  var _reactTransformHmr2$8 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/month.jsx",
    components: _components$8,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$8(id) {
    return function (Component) {
      return _reactTransformHmr2$8(Component, id);
    };
  }
  
  var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
  
  var Month = _wrapComponent$8("Month")((_temp2$4 = _class$8 = function (_React$Component) {
    inherits(Month, _React$Component);
  
    function Month() {
      var _temp, _this, _ret;
  
      classCallCheck(this, Month);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleDayClick = function (day, event) {
        if (_this.props.onDayClick) {
          _this.props.onDayClick(day, event);
        }
      }, _this.handleDayMouseEnter = function (day) {
        if (_this.props.onDayMouseEnter) {
          _this.props.onDayMouseEnter(day);
        }
      }, _this.handleMouseLeave = function () {
        if (_this.props.onMouseLeave) {
          _this.props.onMouseLeave();
        }
      }, _this.isWeekInMonth = function (startOfWeek) {
        var day = _this.props.day;
        var endOfWeek = addDays(cloneDate(startOfWeek), 6);
        return isSameMonth(startOfWeek, day) || isSameMonth(endOfWeek, day);
      }, _this.renderWeeks = function () {
        var weeks = [];
        var isFixedHeight = _this.props.fixedHeight;
        var currentWeekStart = getStartOfWeek(getStartOfMonth(cloneDate(_this.props.day)));
        var i = 0;
        var breakAfterNextPush = false;
  
        while (true) {
          weeks.push(React.createElement(Week, {
            key: i,
            day: currentWeekStart,
            month: getMonth(_this.props.day),
            onDayClick: _this.handleDayClick,
            onDayMouseEnter: _this.handleDayMouseEnter,
            onWeekSelect: _this.props.onWeekSelect,
            formatWeekNumber: _this.props.formatWeekNumber,
            minDate: _this.props.minDate,
            maxDate: _this.props.maxDate,
            excludeDates: _this.props.excludeDates,
            includeDates: _this.props.includeDates,
            inline: _this.props.inline,
            highlightDates: _this.props.highlightDates,
            selectingDate: _this.props.selectingDate,
            filterDate: _this.props.filterDate,
            preSelection: _this.props.preSelection,
            selected: _this.props.selected,
            selectsStart: _this.props.selectsStart,
            selectsEnd: _this.props.selectsEnd,
            showWeekNumber: _this.props.showWeekNumbers,
            startDate: _this.props.startDate,
            endDate: _this.props.endDate,
            dayClassName: _this.props.dayClassName,
            utcOffset: _this.props.utcOffset }));
  
          if (breakAfterNextPush) break;
  
          i++;
          currentWeekStart = addWeeks(cloneDate(currentWeekStart), 1);
  
          // If one of these conditions is true, we will either break on this week
          // or break on the next week
          var isFixedAndFinalWeek = isFixedHeight && i >= FIXED_HEIGHT_STANDARD_WEEK_COUNT;
          var isNonFixedAndOutOfMonth = !isFixedHeight && !_this.isWeekInMonth(currentWeekStart);
  
          if (isFixedAndFinalWeek || isNonFixedAndOutOfMonth) {
            if (_this.props.peekNextMonth) {
              breakAfterNextPush = true;
            } else {
              break;
            }
          }
        }
  
        return weeks;
      }, _this.getClassNames = function () {
        var _this$props = _this.props,
            selectingDate = _this$props.selectingDate,
            selectsStart = _this$props.selectsStart,
            selectsEnd = _this$props.selectsEnd;
  
        return classnames("react-datepicker__month", {
          "react-datepicker__month--selecting-range": selectingDate && (selectsStart || selectsEnd)
        });
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    Month.prototype.render = function render() {
      return React.createElement(
        "div",
        {
          className: this.getClassNames(),
          onMouseLeave: this.handleMouseLeave,
          role: "listbox" },
        this.renderWeeks()
      );
    };
  
    return Month;
  }(React.Component), _class$8.propTypes = {
    day: PropTypes.object.isRequired,
    dayClassName: PropTypes.func,
    endDate: PropTypes.object,
    excludeDates: PropTypes.array,
    filterDate: PropTypes.func,
    fixedHeight: PropTypes.bool,
    formatWeekNumber: PropTypes.func,
    highlightDates: PropTypes.instanceOf(Map),
    includeDates: PropTypes.array,
    inline: PropTypes.bool,
    maxDate: PropTypes.object,
    minDate: PropTypes.object,
    onDayClick: PropTypes.func,
    onDayMouseEnter: PropTypes.func,
    onMouseLeave: PropTypes.func,
    onWeekSelect: PropTypes.func,
    peekNextMonth: PropTypes.bool,
    preSelection: PropTypes.object,
    selected: PropTypes.object,
    selectingDate: PropTypes.object,
    selectsEnd: PropTypes.bool,
    selectsStart: PropTypes.bool,
    showWeekNumbers: PropTypes.bool,
    startDate: PropTypes.object,
    utcOffset: PropTypes.number
  }, _temp2$4));
  
  var _class$12;
  var _temp2$8;
  
  var _components$12 = {
    Time: {
      displayName: "Time"
    }
  };
  
  var _reactTransformHmr2$12 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/time.jsx",
    components: _components$12,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$12(id) {
    return function (Component) {
      return _reactTransformHmr2$12(Component, id);
    };
  }
  
  var Time = _wrapComponent$12("Time")((_temp2$8 = _class$12 = function (_React$Component) {
    inherits(Time, _React$Component);
  
    function Time() {
      var _temp, _this, _ret;
  
      classCallCheck(this, Time);
  
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (time) {
        if ((_this.props.minTime || _this.props.maxTime) && isTimeInDisabledRange(time, _this.props) || _this.props.excludeTimes && isTimeDisabled(time, _this.props.excludeTimes) || _this.props.includeTimes && !isTimeDisabled(time, _this.props.includeTimes)) {
          return;
        }
  
        _this.props.onChange(time);
      }, _this.liClasses = function (time, currH, currM) {
        var classes = ["react-datepicker__time-list-item"];
  
        if (currH === getHour(time) && currM === getMinute(time)) {
          classes.push("react-datepicker__time-list-item--selected");
        }
        if ((_this.props.minTime || _this.props.maxTime) && isTimeInDisabledRange(time, _this.props) || _this.props.excludeTimes && isTimeDisabled(time, _this.props.excludeTimes) || _this.props.includeTimes && !isTimeDisabled(time, _this.props.includeTimes)) {
          classes.push("react-datepicker__time-list-item--disabled");
        }
  
        return classes.join(" ");
      }, _this.renderTimes = function () {
        var times = [];
        var format = _this.props.format ? _this.props.format : "hh:mm A";
        var intervals = _this.props.intervals;
        var activeTime = _this.props.selected ? _this.props.selected : newDate();
        var currH = getHour(activeTime);
        var currM = getMinute(activeTime);
        var base = getStartOfDay(newDate());
        var multiplier = 1440 / intervals;
        for (var i = 0; i < multiplier; i++) {
          times.push(addMinutes(cloneDate(base), i * intervals));
        }
  
        return times.map(function (time, i) {
          return React.createElement(
            "li",
            {
              key: i,
              onClick: _this.handleClick.bind(_this, time),
              className: _this.liClasses(time, currH, currM) },
            formatDate(time, format)
          );
        });
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    Time.prototype.componentDidMount = function componentDidMount() {
      // code to ensure selected time will always be in focus within time window when it first appears
      var multiplier = 60 / this.props.intervals;
      var currH = this.props.selected ? getHour(this.props.selected) : getHour(newDate());
      this.list.scrollTop = 30 * (multiplier * currH);
    };
  
    Time.prototype.render = function render() {
      var _this2 = this;
  
      var height = null;
      if (this.props.monthRef) {
        height = this.props.monthRef.clientHeight - 39;
      }
  
      return React.createElement(
        "div",
        {
          className: "react-datepicker__time-container " + (this.props.todayButton ? "react-datepicker__time-container--with-today-button" : "") },
        React.createElement(
          "div",
          { className: "react-datepicker__header react-datepicker__header--time" },
          React.createElement(
            "div",
            { className: "react-datepicker-time__header" },
            this.props.timeCaption
          )
        ),
        React.createElement(
          "div",
          { className: "react-datepicker__time" },
          React.createElement(
            "div",
            { className: "react-datepicker__time-box" },
            React.createElement(
              "ul",
              {
                className: "react-datepicker__time-list",
                ref: function ref(list) {
                  _this2.list = list;
                },
                style: height ? { height: height } : {} },
              this.renderTimes.bind(this)()
            )
          )
        )
      );
    };
  
    createClass(Time, null, [{
      key: "defaultProps",
      get: function get() {
        return {
          intervals: 30,
          onTimeChange: function onTimeChange() {},
          todayButton: null,
          timeCaption: "Time"
        };
      }
    }]);
    return Time;
  }(React.Component), _class$12.propTypes = {
    format: PropTypes.string,
    includeTimes: PropTypes.array,
    intervals: PropTypes.number,
    selected: PropTypes.object,
    onChange: PropTypes.func,
    todayButton: PropTypes.string,
    minTime: PropTypes.object,
    maxTime: PropTypes.object,
    excludeTimes: PropTypes.array,
    monthRef: PropTypes.object,
    timeCaption: PropTypes.string
  }, _temp2$8));
  
  var _class$1;
  var _temp$1;
  
  var _components$1 = {
    Calendar: {
      displayName: "Calendar"
    }
  };
  
  var _reactTransformHmr2$1 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/calendar.jsx",
    components: _components$1,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$1(id) {
    return function (Component) {
      return _reactTransformHmr2$1(Component, id);
    };
  }
  
  var DROPDOWN_FOCUS_CLASSNAMES = ["react-datepicker__year-select", "react-datepicker__month-select", "react-datepicker__month-year-select"];
  
  var isDropdownSelect = function isDropdownSelect() {
    var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  
    var classNames = (element.className || "").split(/\s+/);
    return DROPDOWN_FOCUS_CLASSNAMES.some(function (testClassname) {
      return classNames.indexOf(testClassname) >= 0;
    });
  };
  
  var Calendar = _wrapComponent$1("Calendar")((_temp$1 = _class$1 = function (_React$Component) {
    inherits(Calendar, _React$Component);
    createClass(Calendar, null, [{
      key: "defaultProps",
      get: function get() {
        return {
          onDropdownFocus: function onDropdownFocus() {},
          monthsShown: 1,
          forceShowMonthNavigation: false,
          timeCaption: "Time"
        };
      }
    }]);
  
    function Calendar(props) {
      classCallCheck(this, Calendar);
  
      var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
  
      _this.handleClickOutside = function (event) {
        _this.props.onClickOutside(event);
      };
  
      _this.handleDropdownFocus = function (event) {
        if (isDropdownSelect(event.target)) {
          _this.props.onDropdownFocus();
        }
      };
  
      _this.getDateInView = function () {
        var _this$props = _this.props,
            preSelection = _this$props.preSelection,
            selected = _this$props.selected,
            openToDate = _this$props.openToDate,
            utcOffset = _this$props.utcOffset;
  
        var minDate = getEffectiveMinDate(_this.props);
        var maxDate = getEffectiveMaxDate(_this.props);
        var current = now(utcOffset);
        var initialDate = openToDate || selected || preSelection;
        if (initialDate) {
          return initialDate;
        } else {
          if (minDate && isBefore(current, minDate)) {
            return minDate;
          } else if (maxDate && isAfter(current, maxDate)) {
            return maxDate;
          }
        }
        return current;
      };
  
      _this.localizeDate = function (date) {
        return localizeDate(date, _this.props.locale);
      };
  
      _this.increaseMonth = function () {
        _this.setState({
          date: addMonths(cloneDate(_this.state.date), 1)
        }, function () {
          return _this.handleMonthChange(_this.state.date);
        });
      };
  
      _this.decreaseMonth = function () {
        _this.setState({
          date: subtractMonths(cloneDate(_this.state.date), 1)
        }, function () {
          return _this.handleMonthChange(_this.state.date);
        });
      };
  
      _this.handleDayClick = function (day, event) {
        return _this.props.onSelect(day, event);
      };
  
      _this.handleDayMouseEnter = function (day) {
        return _this.setState({ selectingDate: day });
      };
  
      _this.handleMonthMouseLeave = function () {
        return _this.setState({ selectingDate: null });
      };
  
      _this.handleYearChange = function (date) {
        if (_this.props.onYearChange) {
          _this.props.onYearChange(date);
        }
      };
  
      _this.handleMonthChange = function (date) {
        if (_this.props.onMonthChange) {
          _this.props.onMonthChange(date);
        }
        if (_this.props.adjustDateOnChange) {
          if (_this.props.onSelect) {
            _this.props.onSelect(date);
          }
          if (_this.props.setOpen) {
            _this.props.setOpen(true);
          }
        }
      };
  
      _this.handleMonthYearChange = function (date) {
        _this.handleYearChange(date);
        _this.handleMonthChange(date);
      };
  
      _this.changeYear = function (year) {
        _this.setState({
          date: setYear(cloneDate(_this.state.date), year)
        }, function () {
          return _this.handleYearChange(_this.state.date);
        });
      };
  
      _this.changeMonth = function (month) {
        _this.setState({
          date: setMonth(cloneDate(_this.state.date), month)
        }, function () {
          return _this.handleMonthChange(_this.state.date);
        });
      };
  
      _this.changeMonthYear = function (monthYear) {
        _this.setState({
          date: setYear(setMonth(cloneDate(_this.state.date), getMonth(monthYear)), getYear(monthYear))
        }, function () {
          return _this.handleMonthYearChange(_this.state.date);
        });
      };
  
      _this.header = function () {
        var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.date;
  
        var startOfWeek = getStartOfWeek(cloneDate(date));
        var dayNames = [];
        if (_this.props.showWeekNumbers) {
          dayNames.push(React.createElement(
            "div",
            { key: "W", className: "react-datepicker__day-name" },
            _this.props.weekLabel || "#"
          ));
        }
        return dayNames.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) {
          var day = addDays(cloneDate(startOfWeek), offset);
          var localeData = getLocaleData(day);
          var weekDayName = _this.props.useWeekdaysShort ? getWeekdayShortInLocale(localeData, day) : getWeekdayMinInLocale(localeData, day);
          return React.createElement(
            "div",
            { key: offset, className: "react-datepicker__day-name" },
            weekDayName
          );
        }));
      };
  
      _this.renderPreviousMonthButton = function () {
  
        var allPrevDaysDisabled = allDaysDisabledBefore(_this.state.date, "month", _this.props);
  
        if (!_this.props.forceShowMonthNavigation && !_this.props.showDisabledMonthNavigation && allPrevDaysDisabled) {
          return;
        }
  
        var classes = ["react-datepicker__navigation", "react-datepicker__navigation--previous"];
  
        var clickHandler = _this.decreaseMonth;
  
        if (allPrevDaysDisabled && _this.props.showDisabledMonthNavigation) {
          classes.push("react-datepicker__navigation--previous--disabled");
          clickHandler = null;
        }
  
        return React.createElement("button", { type: "button",
          className: classes.join(" "),
          onClick: clickHandler });
      };
  
      _this.renderNextMonthButton = function () {
  
        var allNextDaysDisabled = allDaysDisabledAfter(_this.state.date, "month", _this.props);
  
        if (!_this.props.forceShowMonthNavigation && !_this.props.showDisabledMonthNavigation && allNextDaysDisabled) {
          return;
        }
  
        var classes = ["react-datepicker__navigation", "react-datepicker__navigation--next"];
        if (_this.props.showTimeSelect) {
          classes.push("react-datepicker__navigation--next--with-time");
        }
        if (_this.props.todayButton) {
          classes.push("react-datepicker__navigation--next--with-today-button");
        }
  
        var clickHandler = _this.increaseMonth;
  
        if (allNextDaysDisabled && _this.props.showDisabledMonthNavigation) {
          classes.push("react-datepicker__navigation--next--disabled");
          clickHandler = null;
        }
  
        return React.createElement("button", { type: "button", className: classes.join(" "), onClick: clickHandler });
      };
  
      _this.renderCurrentMonth = function () {
        var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.date;
  
        var classes = ["react-datepicker__current-month"];
  
        if (_this.props.showYearDropdown) {
          classes.push("react-datepicker__current-month--hasYearDropdown");
        }
        if (_this.props.showMonthDropdown) {
          classes.push("react-datepicker__current-month--hasMonthDropdown");
        }
        if (_this.props.showMonthYearDropdown) {
          classes.push("react-datepicker__current-month--hasMonthYearDropdown");
        }
        return React.createElement(
          "div",
          { className: classes.join(" ") },
          formatDate(date, _this.props.dateFormat)
        );
      };
  
      _this.renderYearDropdown = function () {
        var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  
        if (!_this.props.showYearDropdown || overrideHide) {
          return;
        }
        return React.createElement(YearDropdown, {
          adjustDateOnChange: _this.props.adjustDateOnChange,
          date: _this.state.date,
          onSelect: _this.props.onSelect,
          setOpen: _this.props.setOpen,
          dropdownMode: _this.props.dropdownMode,
          onChange: _this.changeYear,
          minDate: _this.props.minDate,
          maxDate: _this.props.maxDate,
          year: getYear(_this.state.date),
          scrollableYearDropdown: _this.props.scrollableYearDropdown,
          yearDropdownItemNumber: _this.props.yearDropdownItemNumber });
      };
  
      _this.renderMonthDropdown = function () {
        var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  
        if (!_this.props.showMonthDropdown || overrideHide) {
          return;
        }
        return React.createElement(MonthDropdown, {
          dropdownMode: _this.props.dropdownMode,
          locale: _this.props.locale,
          dateFormat: _this.props.dateFormat,
          onChange: _this.changeMonth,
          month: getMonth(_this.state.date),
          useShortMonthInDropdown: _this.props.useShortMonthInDropdown });
      };
  
      _this.renderMonthYearDropdown = function () {
        var overrideHide = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  
        if (!_this.props.showMonthYearDropdown || overrideHide) {
          return;
        }
        return React.createElement(MonthYearDropdown, {
          dropdownMode: _this.props.dropdownMode,
          locale: _this.props.locale,
          dateFormat: _this.props.dateFormat,
          onChange: _this.changeMonthYear,
          minDate: _this.props.minDate,
          maxDate: _this.props.maxDate,
          date: _this.state.date,
          scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown
        });
      };
  
      _this.renderTodayButton = function () {
        if (!_this.props.todayButton) {
          return;
        }
        return React.createElement(
          "div",
          {
            className: "react-datepicker__today-button",
            onClick: function onClick(e) {
              return _this.props.onSelect(getStartOfDate(now(_this.props.utcOffset)), e);
            } },
          _this.props.todayButton
        );
      };
  
      _this.renderMonths = function () {
        var monthList = [];
        for (var i = 0; i < _this.props.monthsShown; ++i) {
          var monthDate = addMonths(cloneDate(_this.state.date), i);
          var monthKey = "month-" + i;
          monthList.push(React.createElement(
            "div",
            {
              key: monthKey,
              ref: function ref(div) {
                _this.monthContainer = div;
              },
              className: "react-datepicker__month-container" },
            React.createElement(
              "div",
              { className: "react-datepicker__header" },
              _this.renderCurrentMonth(monthDate),
              React.createElement(
                "div",
                {
                  className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--" + _this.props.dropdownMode,
                  onFocus: _this.handleDropdownFocus },
                _this.renderMonthDropdown(i !== 0),
                _this.renderMonthYearDropdown(i !== 0),
                _this.renderYearDropdown(i !== 0)
              ),
              React.createElement(
                "div",
                { className: "react-datepicker__day-names" },
                _this.header(monthDate)
              )
            ),
            React.createElement(Month, {
              day: monthDate,
              dayClassName: _this.props.dayClassName,
              onDayClick: _this.handleDayClick,
              onDayMouseEnter: _this.handleDayMouseEnter,
              onMouseLeave: _this.handleMonthMouseLeave,
              onWeekSelect: _this.props.onWeekSelect,
              formatWeekNumber: _this.props.formatWeekNumber,
              minDate: _this.props.minDate,
              maxDate: _this.props.maxDate,
              excludeDates: _this.props.excludeDates,
              highlightDates: _this.props.highlightDates,
              selectingDate: _this.state.selectingDate,
              includeDates: _this.props.includeDates,
              inline: _this.props.inline,
              fixedHeight: _this.props.fixedHeight,
              filterDate: _this.props.filterDate,
              preSelection: _this.props.preSelection,
              selected: _this.props.selected,
              selectsStart: _this.props.selectsStart,
              selectsEnd: _this.props.selectsEnd,
              showWeekNumbers: _this.props.showWeekNumbers,
              startDate: _this.props.startDate,
              endDate: _this.props.endDate,
              peekNextMonth: _this.props.peekNextMonth,
              utcOffset: _this.props.utcOffset })
          ));
        }
        return monthList;
      };
  
      _this.renderTimeSection = function () {
        if (_this.props.showTimeSelect) {
          return React.createElement(Time, {
            selected: _this.props.selected,
            onChange: _this.props.onTimeChange,
            format: _this.props.timeFormat,
            includeTimes: _this.props.includeTimes,
            intervals: _this.props.timeIntervals,
            minTime: _this.props.minTime,
            maxTime: _this.props.maxTime,
            excludeTimes: _this.props.excludeTimes,
            timeCaption: _this.props.timeCaption,
            todayButton: _this.props.todayButton,
            showMonthDropdown: _this.props.showMonthDropdown,
            showMonthYearDropdown: _this.props.showMonthYearDropdown,
            showYearDropdown: _this.props.showYearDropdown,
            withPortal: _this.props.withPortal,
            monthRef: _this.state.monthContainer });
        }
      };
  
      _this.state = {
        date: _this.localizeDate(_this.getDateInView()),
        selectingDate: null,
        monthContainer: _this.monthContainer
      };
      return _this;
    }
  
    Calendar.prototype.componentDidMount = function componentDidMount() {
      var _this2 = this;
  
      // monthContainer height is needed in time component
      // to determine the height for the ul in the time component
      // setState here so height is given after final component
      // layout is rendered
      if (this.props.showTimeSelect) {
        this.assignMonthContainer = function () {
          _this2.setState({ monthContainer: _this2.monthContainer });
        }();
      }
    };
  
    Calendar.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
      if (nextProps.preSelection && !isSameDay(nextProps.preSelection, this.props.preSelection)) {
        this.setState({
          date: this.localizeDate(nextProps.preSelection)
        });
      } else if (nextProps.openToDate && !isSameDay(nextProps.openToDate, this.props.openToDate)) {
        this.setState({
          date: this.localizeDate(nextProps.openToDate)
        });
      }
    };
  
    Calendar.prototype.render = function render() {
      return React.createElement(
        "div",
        { className: classnames("react-datepicker", this.props.className) },
        React.createElement("div", { className: "react-datepicker__triangle" }),
        this.renderPreviousMonthButton(),
        this.renderNextMonthButton(),
        this.renderMonths(),
        this.renderTodayButton(),
        this.renderTimeSection(),
        this.props.children
      );
    };
  
    return Calendar;
  }(React.Component), _class$1.propTypes = {
    adjustDateOnChange: PropTypes.bool,
    className: PropTypes.string,
    children: PropTypes.node,
    dateFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.array]).isRequired,
    dayClassName: PropTypes.func,
    dropdownMode: PropTypes.oneOf(["scroll", "select"]),
    endDate: PropTypes.object,
    excludeDates: PropTypes.array,
    filterDate: PropTypes.func,
    fixedHeight: PropTypes.bool,
    formatWeekNumber: PropTypes.func,
    highlightDates: PropTypes.instanceOf(Map),
    includeDates: PropTypes.array,
    includeTimes: PropTypes.array,
    inline: PropTypes.bool,
    locale: PropTypes.string,
    maxDate: PropTypes.object,
    minDate: PropTypes.object,
    monthsShown: PropTypes.number,
    onClickOutside: PropTypes.func.isRequired,
    onMonthChange: PropTypes.func,
    onYearChange: PropTypes.func,
    forceShowMonthNavigation: PropTypes.bool,
    onDropdownFocus: PropTypes.func,
    onSelect: PropTypes.func.isRequired,
    onWeekSelect: PropTypes.func,
    showTimeSelect: PropTypes.bool,
    timeFormat: PropTypes.string,
    timeIntervals: PropTypes.number,
    onTimeChange: PropTypes.func,
    minTime: PropTypes.object,
    maxTime: PropTypes.object,
    excludeTimes: PropTypes.array,
    timeCaption: PropTypes.string,
    openToDate: PropTypes.object,
    peekNextMonth: PropTypes.bool,
    scrollableYearDropdown: PropTypes.bool,
    scrollableMonthYearDropdown: PropTypes.bool,
    preSelection: PropTypes.object,
    selected: PropTypes.object,
    selectsEnd: PropTypes.bool,
    selectsStart: PropTypes.bool,
    showMonthDropdown: PropTypes.bool,
    showMonthYearDropdown: PropTypes.bool,
    showWeekNumbers: PropTypes.bool,
    showYearDropdown: PropTypes.bool,
    startDate: PropTypes.object,
    todayButton: PropTypes.string,
    useWeekdaysShort: PropTypes.bool,
    withPortal: PropTypes.bool,
    utcOffset: PropTypes.number,
    weekLabel: PropTypes.string,
    yearDropdownItemNumber: PropTypes.number,
    setOpen: PropTypes.func,
    useShortMonthInDropdown: PropTypes.bool,
    showDisabledMonthNavigation: PropTypes.bool
  }, _temp$1));
  
  var _class$13;
  var _temp$4;
  
  var _components$13 = {
    PopperComponent: {
      displayName: "PopperComponent"
    }
  };
  
  var _reactTransformHmr2$13 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/popper_component.jsx",
    components: _components$13,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent$13(id) {
    return function (Component) {
      return _reactTransformHmr2$13(Component, id);
    };
  }
  
  var popperPlacementPositions = ["auto", "auto-left", "auto-right", "bottom", "bottom-end", "bottom-start", "left", "left-end", "left-start", "right", "right-end", "right-start", "top", "top-end", "top-start"];
  
  var PopperComponent = _wrapComponent$13("PopperComponent")((_temp$4 = _class$13 = function (_React$Component) {
    inherits(PopperComponent, _React$Component);
  
    function PopperComponent() {
      classCallCheck(this, PopperComponent);
      return possibleConstructorReturn(this, _React$Component.apply(this, arguments));
    }
  
    PopperComponent.prototype.render = function render() {
      var _props = this.props,
          className = _props.className,
          hidePopper = _props.hidePopper,
          popperComponent = _props.popperComponent,
          popperModifiers = _props.popperModifiers,
          popperPlacement = _props.popperPlacement,
          targetComponent = _props.targetComponent;
  
  
      var popper = void 0;
  
      if (!hidePopper) {
        var classes = classnames("react-datepicker-popper", className);
        popper = React.createElement(
          reactPopper.Popper,
          {
            className: classes,
            modifiers: popperModifiers,
            placement: popperPlacement },
          popperComponent
        );
      }
  
      if (this.props.popperContainer) {
        popper = React.createElement(this.props.popperContainer, {}, popper);
      }
  
      return React.createElement(
        reactPopper.Manager,
        null,
        React.createElement(
          reactPopper.Target,
          { className: "react-datepicker-wrapper" },
          targetComponent
        ),
        popper
      );
    };
  
    createClass(PopperComponent, null, [{
      key: "defaultProps",
      get: function get() {
        return {
          hidePopper: true,
          popperModifiers: {
            preventOverflow: {
              enabled: true,
              escapeWithReference: true,
              boundariesElement: "viewport"
            }
          },
          popperPlacement: "bottom-start"
        };
      }
    }]);
    return PopperComponent;
  }(React.Component), _class$13.propTypes = {
    className: PropTypes.string,
    hidePopper: PropTypes.bool,
    popperComponent: PropTypes.element,
    popperModifiers: PropTypes.object, // <datepicker/> props
    popperPlacement: PropTypes.oneOf(popperPlacementPositions), // <datepicker/> props
    popperContainer: PropTypes.func,
    targetComponent: PropTypes.element
  }, _temp$4));
  
  var _class;
  var _temp;
  
  var _components = {
    DatePicker: {
      displayName: "DatePicker"
    }
  };
  
  var _reactTransformHmr2 = _reactTransformHmr({
    filename: "/Users/mrusschen/development/react-datepicker/src/index.jsx",
    components: _components,
    locals: [module],
    imports: [React]
  });
  
  function _wrapComponent(id) {
    return function (Component) {
      return _reactTransformHmr2(Component, id);
    };
  }
  
  var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
  var WrappedCalendar = onClickOutside(Calendar);
  
  /**
   * General datepicker component.
   */
  
  var DatePicker = _wrapComponent("DatePicker")((_temp = _class = function (_React$Component) {
    inherits(DatePicker, _React$Component);
    createClass(DatePicker, null, [{
      key: "defaultProps",
      get: function get() {
        return {
          allowSameDay: false,
          dateFormat: "L",
          dateFormatCalendar: "MMMM YYYY",
          onChange: function onChange() {},
  
          disabled: false,
          disabledKeyboardNavigation: false,
          dropdownMode: "scroll",
          onFocus: function onFocus() {},
          onBlur: function onBlur() {},
          onKeyDown: function onKeyDown() {},
          onSelect: function onSelect() {},
          onClickOutside: function onClickOutside$$1() {},
          onMonthChange: function onMonthChange() {},
  
          preventOpenOnFocus: false,
          onYearChange: function onYearChange() {},
  
          monthsShown: 1,
          withPortal: false,
          shouldCloseOnSelect: true,
          showTimeSelect: false,
          timeIntervals: 30,
          timeCaption: "Time"
        };
      }
    }]);
  
    function DatePicker(props) {
      classCallCheck(this, DatePicker);
  
      var _this = possibleConstructorReturn(this, _React$Component.call(this, props));
  
      _this.getPreSelection = function () {
        return _this.props.openToDate ? newDate(_this.props.openToDate) : _this.props.selectsEnd && _this.props.startDate ? newDate(_this.props.startDate) : _this.props.selectsStart && _this.props.endDate ? newDate(_this.props.endDate) : now(_this.props.utcOffset);
      };
  
      _this.calcInitialState = function () {
        var defaultPreSelection = _this.getPreSelection();
        var minDate = getEffectiveMinDate(_this.props);
        var maxDate = getEffectiveMaxDate(_this.props);
        var boundedPreSelection = minDate && isBefore(defaultPreSelection, minDate) ? minDate : maxDate && isAfter(defaultPreSelection, maxDate) ? maxDate : defaultPreSelection;
        return {
          open: _this.props.startOpen || false,
          preventFocus: false,
          preSelection: _this.props.selected ? newDate(_this.props.selected) : boundedPreSelection,
          // transforming highlighted days (perhaps nested array)
          // to flat Map for faster access in day.jsx
          highlightDates: getHightLightDaysMap(_this.props.highlightDates)
        };
      };
  
      _this.clearPreventFocusTimeout = function () {
        if (_this.preventFocusTimeout) {
          clearTimeout(_this.preventFocusTimeout);
        }
      };
  
      _this.setFocus = function () {
        if (_this.input.focus) {
          _this.input.focus();
        }
      };
  
      _this.setOpen = function (open) {
        _this.setState({
          open: open,
          preSelection: open && _this.state.open ? _this.state.preSelection : _this.calcInitialState().preSelection
        });
      };
  
      _this.handleFocus = function (event) {
        if (!_this.state.preventFocus) {
          _this.props.onFocus(event);
          if (!_this.props.preventOpenOnFocus) {
            _this.setOpen(true);
          }
        }
      };
  
      _this.cancelFocusInput = function () {
        clearTimeout(_this.inputFocusTimeout);
        _this.inputFocusTimeout = null;
      };
  
      _this.deferFocusInput = function () {
        _this.cancelFocusInput();
        _this.inputFocusTimeout = setTimeout(function () {
          return _this.setFocus();
        }, 1);
      };
  
      _this.handleDropdownFocus = function () {
        _this.cancelFocusInput();
      };
  
      _this.handleBlur = function (event) {
        if (_this.state.open) {
          _this.deferFocusInput();
        } else {
          _this.props.onBlur(event);
        }
      };
  
      _this.handleCalendarClickOutside = function (event) {
        if (!_this.props.inline) {
          _this.setOpen(false);
        }
        _this.props.onClickOutside(event);
        if (_this.props.withPortal) {
          event.preventDefault();
        }
      };
  
      _this.handleChange = function () {
        for (var _len = arguments.length, allArgs = Array(_len), _key = 0; _key < _len; _key++) {
          allArgs[_key] = arguments[_key];
        }
  
        var event = allArgs[0];
        if (_this.props.onChangeRaw) {
          _this.props.onChangeRaw.apply(_this, allArgs);
          if (typeof event.isDefaultPrevented !== "function" || event.isDefaultPrevented()) {
            return;
          }
        }
        _this.setState({ inputValue: event.target.value });
        var date = parseDate(event.target.value, _this.props);
        if (date || !event.target.value) {
          _this.setSelected(date, event, true);
        }
      };
  
      _this.handleSelect = function (date, event) {
        // Preventing onFocus event to fix issue
        // https://github.com/Hacker0x01/react-datepicker/issues/628
        _this.setState({ preventFocus: true }, function () {
          _this.preventFocusTimeout = setTimeout(function () {
            return _this.setState({ preventFocus: false });
          }, 50);
          return _this.preventFocusTimeout;
        });
        _this.setSelected(date, event);
        if (!_this.props.shouldCloseOnSelect || _this.props.showTimeSelect) {
          _this.setPreSelection(date);
        } else if (!_this.props.inline) {
          _this.setOpen(false);
        }
      };
  
      _this.setSelected = function (date, event, keepInput) {
        var changedDate = date;
  
        if (changedDate !== null && isDayDisabled(changedDate, _this.props)) {
          return;
        }
  
        if (!isSameDay(_this.props.selected, changedDate) || _this.props.allowSameDay) {
          if (changedDate !== null) {
            if (_this.props.selected) {
              changedDate = setTime(newDate(changedDate), {
                hour: getHour(_this.props.selected),
                minute: getMinute(_this.props.selected),
                second: getSecond(_this.props.selected)
              });
            }
            _this.setState({
              preSelection: changedDate
            });
          }
          _this.props.onChange(changedDate, event);
        }
  
        _this.props.onSelect(changedDate, event);
  
        if (!keepInput) {
          _this.setState({ inputValue: null });
        }
      };
  
      _this.setPreSelection = function (date) {
        var isDateRangePresent = typeof _this.props.minDate !== "undefined" && typeof _this.props.maxDate !== "undefined";
        var isValidDateSelection = isDateRangePresent && date ? isDayInRange(date, _this.props.minDate, _this.props.maxDate) : true;
        if (isValidDateSelection) {
          _this.setState({
            preSelection: date
          });
        }
      };
  
      _this.handleTimeChange = function (time) {
        var selected = _this.props.selected ? _this.props.selected : _this.getPreSelection();
        var changedDate = setTime(cloneDate(selected), {
          hour: getHour(time),
          minute: getMinute(time)
        });
  
        _this.setState({
          preSelection: changedDate
        });
  
        _this.props.onChange(changedDate);
        _this.setOpen(false);
      };
  
      _this.onInputClick = function () {
        if (!_this.props.disabled) {
          _this.setOpen(true);
        }
      };
  
      _this.onInputKeyDown = function (event) {
        _this.props.onKeyDown(event);
        var eventKey = event.key;
        if (!_this.state.open && !_this.props.inline && !_this.props.preventOpenOnFocus) {
          if (eventKey !== "Enter" && eventKey !== "Escape" && eventKey !== "Tab") {
            _this.onInputClick();
          }
          return;
        }
        var copy = newDate(_this.state.preSelection);
        if (eventKey === "Enter") {
          event.preventDefault();
          if (isMoment(_this.state.preSelection) || isDate(_this.state.preSelection)) {
            _this.handleSelect(copy, event);
            !_this.props.shouldCloseOnSelect && _this.setPreSelection(copy);
          } else {
            _this.setOpen(false);
          }
        } else if (eventKey === "Escape") {
          event.preventDefault();
          _this.setOpen(false);
        } else if (eventKey === "Tab") {
          _this.setOpen(false);
        } else if (!_this.props.disabledKeyboardNavigation) {
          var newSelection = void 0;
          switch (eventKey) {
            case "ArrowLeft":
              event.preventDefault();
              newSelection = subtractDays(copy, 1);
              break;
            case "ArrowRight":
              event.preventDefault();
              newSelection = addDays(copy, 1);
              break;
            case "ArrowUp":
              event.preventDefault();
              newSelection = subtractWeeks(copy, 1);
              break;
            case "ArrowDown":
              event.preventDefault();
              newSelection = addWeeks(copy, 1);
              break;
            case "PageUp":
              event.preventDefault();
              newSelection = subtractMonths(copy, 1);
              break;
            case "PageDown":
              event.preventDefault();
              newSelection = addMonths(copy, 1);
              break;
            case "Home":
              event.preventDefault();
              newSelection = subtractYears(copy, 1);
              break;
            case "End":
              event.preventDefault();
              newSelection = addYears(copy, 1);
              break;
          }
          if (_this.props.adjustDateOnChange) {
            _this.setSelected(newSelection);
          }
          _this.setPreSelection(newSelection);
        }
      };
  
      _this.onClearClick = function (event) {
        if (event) {
          if (event.preventDefault) {
            event.preventDefault();
          }
        }
        _this.props.onChange(null, event);
        _this.setState({ inputValue: null });
      };
  
      _this.clear = function () {
        _this.onClearClick();
      };
  
      _this.renderCalendar = function () {
        if (!_this.props.inline && (!_this.state.open || _this.props.disabled)) {
          return null;
        }
        return React.createElement(
          WrappedCalendar,
          {
            ref: function ref(elem) {
              _this.calendar = elem;
            },
            locale: _this.props.locale,
            adjustDateOnChange: _this.props.adjustDateOnChange,
            setOpen: _this.setOpen,
            dateFormat: _this.props.dateFormatCalendar,
            useWeekdaysShort: _this.props.useWeekdaysShort,
            dropdownMode: _this.props.dropdownMode,
            selected: _this.props.selected,
            preSelection: _this.state.preSelection,
            onSelect: _this.handleSelect,
            onWeekSelect: _this.props.onWeekSelect,
            openToDate: _this.props.openToDate,
            minDate: _this.props.minDate,
            maxDate: _this.props.maxDate,
            selectsStart: _this.props.selectsStart,
            selectsEnd: _this.props.selectsEnd,
            startDate: _this.props.startDate,
            endDate: _this.props.endDate,
            excludeDates: _this.props.excludeDates,
            filterDate: _this.props.filterDate,
            onClickOutside: _this.handleCalendarClickOutside,
            formatWeekNumber: _this.props.formatWeekNumber,
            highlightDates: _this.state.highlightDates,
            includeDates: _this.props.includeDates,
            includeTimes: _this.props.includeTimes,
            inline: _this.props.inline,
            peekNextMonth: _this.props.peekNextMonth,
            showMonthDropdown: _this.props.showMonthDropdown,
            useShortMonthInDropdown: _this.props.useShortMonthInDropdown,
            showMonthYearDropdown: _this.props.showMonthYearDropdown,
            showWeekNumbers: _this.props.showWeekNumbers,
            showYearDropdown: _this.props.showYearDropdown,
            withPortal: _this.props.withPortal,
            forceShowMonthNavigation: _this.props.forceShowMonthNavigation,
            showDisabledMonthNavigation: _this.props.showDisabledMonthNavigation,
            scrollableYearDropdown: _this.props.scrollableYearDropdown,
            scrollableMonthYearDropdown: _this.props.scrollableMonthYearDropdown,
            todayButton: _this.props.todayButton,
            weekLabel: _this.props.weekLabel,
            utcOffset: _this.props.utcOffset,
            outsideClickIgnoreClass: outsideClickIgnoreClass,
            fixedHeight: _this.props.fixedHeight,
            monthsShown: _this.props.monthsShown,
            onDropdownFocus: _this.handleDropdownFocus,
            onMonthChange: _this.props.onMonthChange,
            onYearChange: _this.props.onYearChange,
            dayClassName: _this.props.dayClassName,
            showTimeSelect: _this.props.showTimeSelect,
            onTimeChange: _this.handleTimeChange,
            timeFormat: _this.props.timeFormat,
            timeIntervals: _this.props.timeIntervals,
            minTime: _this.props.minTime,
            maxTime: _this.props.maxTime,
            excludeTimes: _this.props.excludeTimes,
            timeCaption: _this.props.timeCaption,
            className: _this.props.calendarClassName,
            yearDropdownItemNumber: _this.props.yearDropdownItemNumber },
          _this.props.children
        );
      };
  
      _this.renderDateInput = function () {
        var _classnames, _React$cloneElement;
  
        var className = classnames(_this.props.className, (_classnames = {}, _classnames[outsideClickIgnoreClass] = _this.state.open, _classnames));
  
        var customInput = _this.props.customInput || React.createElement("input", { type: "text" });
        var customInputRef = _this.props.customInputRef || "ref";
        var inputValue = typeof _this.props.value === "string" ? _this.props.value : typeof _this.state.inputValue === "string" ? _this.state.inputValue : safeDateFormat(_this.props.selected, _this.props);
  
        return React.cloneElement(customInput, (_React$cloneElement = {}, _React$cloneElement[customInputRef] = function (input) {
          _this.input = input;
        }, _React$cloneElement.value = inputValue, _React$cloneElement.onBlur = _this.handleBlur, _React$cloneElement.onChange = _this.handleChange, _React$cloneElement.onClick = _this.onInputClick, _React$cloneElement.onFocus = _this.handleFocus, _React$cloneElement.onKeyDown = _this.onInputKeyDown, _React$cloneElement.id = _this.props.id, _React$cloneElement.name = _this.props.name, _React$cloneElement.autoFocus = _this.props.autoFocus, _React$cloneElement.placeholder = _this.props.placeholderText, _React$cloneElement.disabled = _this.props.disabled, _React$cloneElement.autoComplete = _this.props.autoComplete, _React$cloneElement.className = className, _React$cloneElement.title = _this.props.title, _React$cloneElement.readOnly = _this.props.readOnly, _React$cloneElement.required = _this.props.required, _React$cloneElement.tabIndex = _this.props.tabIndex, _React$cloneElement));
      };
  
      _this.renderClearButton = function () {
        if (_this.props.isClearable && _this.props.selected != null) {
          return React.createElement("a", {
            className: "react-datepicker__close-icon",
            href: "javascript:void(0)",
            onClick: _this.onClearClick });
        } else {
          return null;
        }
      };
  
      _this.state = _this.calcInitialState();
      return _this;
    }
  
    DatePicker.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
      var currentMonth = this.props.selected && getMonth(this.props.selected);
      var nextMonth = nextProps.selected && getMonth(nextProps.selected);
      if (this.props.inline && currentMonth !== nextMonth) {
        this.setPreSelection(nextProps.selected);
      }
      if (this.props.highlightDates !== nextProps.highlightDates) {
        this.setState({
          highlightDates: getHightLightDaysMap(nextProps.highlightDates)
        });
      }
    };
  
    DatePicker.prototype.componentWillUnmount = function componentWillUnmount() {
      this.clearPreventFocusTimeout();
    };
  
    DatePicker.prototype.render = function render() {
      var calendar = this.renderCalendar();
  
      if (this.props.inline && !this.props.withPortal) {
        return calendar;
      }
  
      if (this.props.withPortal) {
        return React.createElement(
          "div",
          null,
          !this.props.inline ? React.createElement(
            "div",
            { className: "react-datepicker__input-container" },
            this.renderDateInput(),
            this.renderClearButton()
          ) : null,
          this.state.open || this.props.inline ? React.createElement(
            "div",
            { className: "react-datepicker__portal" },
            calendar
          ) : null
        );
      }
  
      return React.createElement(PopperComponent, {
        className: this.props.popperClassName,
        hidePopper: !this.state.open || this.props.disabled,
        popperModifiers: this.props.popperModifiers,
        targetComponent: React.createElement(
          "div",
          { className: "react-datepicker__input-container" },
          this.renderDateInput(),
          this.renderClearButton()
        ),
        popperContainer: this.props.popperContainer,
        popperComponent: calendar,
        popperPlacement: this.props.popperPlacement });
    };
  
    return DatePicker;
  }(React.Component), _class.propTypes = {
    adjustDateOnChange: PropTypes.bool,
    allowSameDay: PropTypes.bool,
    autoComplete: PropTypes.string,
    autoFocus: PropTypes.bool,
    calendarClassName: PropTypes.string,
    children: PropTypes.node,
    className: PropTypes.string,
    customInput: PropTypes.element,
    customInputRef: PropTypes.string,
    dateFormat: PropTypes.oneOfType([// eslint-disable-line react/no-unused-prop-types
    PropTypes.string, PropTypes.array]),
    dateFormatCalendar: PropTypes.string,
    dayClassName: PropTypes.func,
    disabled: PropTypes.bool,
    disabledKeyboardNavigation: PropTypes.bool,
    dropdownMode: PropTypes.oneOf(["scroll", "select"]).isRequired,
    endDate: PropTypes.object,
    excludeDates: PropTypes.array,
    filterDate: PropTypes.func,
    fixedHeight: PropTypes.bool,
    formatWeekNumber: PropTypes.func,
    highlightDates: PropTypes.array,
    id: PropTypes.string,
    includeDates: PropTypes.array,
    includeTimes: PropTypes.array,
    inline: PropTypes.bool,
    isClearable: PropTypes.bool,
    locale: PropTypes.string,
    maxDate: PropTypes.object,
    minDate: PropTypes.object,
    monthsShown: PropTypes.number,
    name: PropTypes.string,
    onBlur: PropTypes.func,
    onChange: PropTypes.func.isRequired,
    onSelect: PropTypes.func,
    onWeekSelect: PropTypes.func,
    onClickOutside: PropTypes.func,
    onChangeRaw: PropTypes.func,
    onFocus: PropTypes.func,
    onKeyDown: PropTypes.func,
    onMonthChange: PropTypes.func,
    onYearChange: PropTypes.func,
    openToDate: PropTypes.object,
    peekNextMonth: PropTypes.bool,
    placeholderText: PropTypes.string,
    popperContainer: PropTypes.func,
    popperClassName: PropTypes.string, // <PopperComponent/> props
    popperModifiers: PropTypes.object, // <PopperComponent/> props
    popperPlacement: PropTypes.oneOf(popperPlacementPositions), // <PopperComponent/> props
    preventOpenOnFocus: PropTypes.bool,
    readOnly: PropTypes.bool,
    required: PropTypes.bool,
    scrollableYearDropdown: PropTypes.bool,
    scrollableMonthYearDropdown: PropTypes.bool,
    selected: PropTypes.object,
    selectsEnd: PropTypes.bool,
    selectsStart: PropTypes.bool,
    showMonthDropdown: PropTypes.bool,
    showMonthYearDropdown: PropTypes.bool,
    showWeekNumbers: PropTypes.bool,
    showYearDropdown: PropTypes.bool,
    forceShowMonthNavigation: PropTypes.bool,
    showDisabledMonthNavigation: PropTypes.bool,
    startDate: PropTypes.object,
    startOpen: PropTypes.bool,
    tabIndex: PropTypes.number,
    timeCaption: PropTypes.string,
    title: PropTypes.string,
    todayButton: PropTypes.string,
    useWeekdaysShort: PropTypes.bool,
    utcOffset: PropTypes.number,
    value: PropTypes.string,
    weekLabel: PropTypes.string,
    withPortal: PropTypes.bool,
    yearDropdownItemNumber: PropTypes.number,
    shouldCloseOnSelect: PropTypes.bool,
    showTimeSelect: PropTypes.bool,
    timeFormat: PropTypes.string,
    timeIntervals: PropTypes.number,
    minTime: PropTypes.object,
    maxTime: PropTypes.object,
    excludeTimes: PropTypes.array,
    useShortMonthInDropdown: PropTypes.bool
  }, _temp));
  
  return DatePicker;
  
  })));
  