text: (function (global, factory) {
  	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
  	typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
  	(factory((global.ReachRouter = {}),global.React));
  }(this, (function (exports,React) { 'use strict';
  
  var React__default = 'default' in React ? React['default'] : React;
  
  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 reactIs_production_min = createCommonjsModule(function (module, exports) {
  Object.defineProperty(exports,"__esModule",{value:!0});
  var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
  60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type, a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof, a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function z(a){return y(a)===m}
  exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
  exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
  exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
  });
  
  unwrapExports(reactIs_production_min);
  var reactIs_production_min_1 = reactIs_production_min.typeOf;
  var reactIs_production_min_2 = reactIs_production_min.AsyncMode;
  var reactIs_production_min_3 = reactIs_production_min.ConcurrentMode;
  var reactIs_production_min_4 = reactIs_production_min.ContextConsumer;
  var reactIs_production_min_5 = reactIs_production_min.ContextProvider;
  var reactIs_production_min_6 = reactIs_production_min.Element;
  var reactIs_production_min_7 = reactIs_production_min.ForwardRef;
  var reactIs_production_min_8 = reactIs_production_min.Fragment;
  var reactIs_production_min_9 = reactIs_production_min.Lazy;
  var reactIs_production_min_10 = reactIs_production_min.Memo;
  var reactIs_production_min_11 = reactIs_production_min.Portal;
  var reactIs_production_min_12 = reactIs_production_min.Profiler;
  var reactIs_production_min_13 = reactIs_production_min.StrictMode;
  var reactIs_production_min_14 = reactIs_production_min.Suspense;
  var reactIs_production_min_15 = reactIs_production_min.isValidElementType;
  var reactIs_production_min_16 = reactIs_production_min.isAsyncMode;
  var reactIs_production_min_17 = reactIs_production_min.isConcurrentMode;
  var reactIs_production_min_18 = reactIs_production_min.isContextConsumer;
  var reactIs_production_min_19 = reactIs_production_min.isContextProvider;
  var reactIs_production_min_20 = reactIs_production_min.isElement;
  var reactIs_production_min_21 = reactIs_production_min.isForwardRef;
  var reactIs_production_min_22 = reactIs_production_min.isFragment;
  var reactIs_production_min_23 = reactIs_production_min.isLazy;
  var reactIs_production_min_24 = reactIs_production_min.isMemo;
  var reactIs_production_min_25 = reactIs_production_min.isPortal;
  var reactIs_production_min_26 = reactIs_production_min.isProfiler;
  var reactIs_production_min_27 = reactIs_production_min.isStrictMode;
  var reactIs_production_min_28 = reactIs_production_min.isSuspense;
  
  var reactIs_development = createCommonjsModule(function (module, exports) {
  
  
  
  {
    (function() {
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
  // nor polyfill, then a plain number is used for performance.
  var hasSymbol = typeof Symbol === 'function' && Symbol.for;
  var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
  var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
  var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
  var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
  // (unstable) APIs that have been removed. Can we remove the symbols?
  
  var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
  var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
  var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
  var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
  var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
  
  function isValidElementType(type) {
    return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
    type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE);
  }
  
  /**
   * Forked from fbjs/warning:
   * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
   *
   * Only change is we use console.warn instead of console.error,
   * and do nothing when 'console' is not supported.
   * This really simplifies the code.
   * ---
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */
  var lowPriorityWarningWithoutStack = function () {};
  
  {
    var printWarning = function (format) {
      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
        args[_key - 1] = arguments[_key];
      }
  
      var argIndex = 0;
      var message = 'Warning: ' + format.replace(/%s/g, function () {
        return args[argIndex++];
      });
  
      if (typeof console !== 'undefined') {
        console.warn(message);
      }
  
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  
    lowPriorityWarningWithoutStack = function (condition, format) {
      if (format === undefined) {
        throw new Error('`lowPriorityWarningWithoutStack(condition, format, ...args)` requires a warning ' + 'message argument');
      }
  
      if (!condition) {
        for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
          args[_key2 - 2] = arguments[_key2];
        }
  
        printWarning.apply(void 0, [format].concat(args));
      }
    };
  }
  
  var lowPriorityWarningWithoutStack$1 = lowPriorityWarningWithoutStack;
  
  function typeOf(object) {
    if (typeof object === 'object' && object !== null) {
      var $$typeof = object.$$typeof;
  
      switch ($$typeof) {
        case REACT_ELEMENT_TYPE:
          var type = object.type;
  
          switch (type) {
            case REACT_ASYNC_MODE_TYPE:
            case REACT_CONCURRENT_MODE_TYPE:
            case REACT_FRAGMENT_TYPE:
            case REACT_PROFILER_TYPE:
            case REACT_STRICT_MODE_TYPE:
            case REACT_SUSPENSE_TYPE:
              return type;
  
            default:
              var $$typeofType = type && type.$$typeof;
  
              switch ($$typeofType) {
                case REACT_CONTEXT_TYPE:
                case REACT_FORWARD_REF_TYPE:
                case REACT_LAZY_TYPE:
                case REACT_MEMO_TYPE:
                case REACT_PROVIDER_TYPE:
                  return $$typeofType;
  
                default:
                  return $$typeof;
              }
  
          }
  
        case REACT_PORTAL_TYPE:
          return $$typeof;
      }
    }
  
    return undefined;
  } // AsyncMode is deprecated along with isAsyncMode
  
  var AsyncMode = REACT_ASYNC_MODE_TYPE;
  var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
  var ContextConsumer = REACT_CONTEXT_TYPE;
  var ContextProvider = REACT_PROVIDER_TYPE;
  var Element = REACT_ELEMENT_TYPE;
  var ForwardRef = REACT_FORWARD_REF_TYPE;
  var Fragment = REACT_FRAGMENT_TYPE;
  var Lazy = REACT_LAZY_TYPE;
  var Memo = REACT_MEMO_TYPE;
  var Portal = REACT_PORTAL_TYPE;
  var Profiler = REACT_PROFILER_TYPE;
  var StrictMode = REACT_STRICT_MODE_TYPE;
  var Suspense = REACT_SUSPENSE_TYPE;
  var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
  
  function isAsyncMode(object) {
    {
      if (!hasWarnedAboutDeprecatedIsAsyncMode) {
        hasWarnedAboutDeprecatedIsAsyncMode = true;
        lowPriorityWarningWithoutStack$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
      }
    }
  
    return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
  }
  function isConcurrentMode(object) {
    return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
  }
  function isContextConsumer(object) {
    return typeOf(object) === REACT_CONTEXT_TYPE;
  }
  function isContextProvider(object) {
    return typeOf(object) === REACT_PROVIDER_TYPE;
  }
  function isElement(object) {
    return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
  }
  function isForwardRef(object) {
    return typeOf(object) === REACT_FORWARD_REF_TYPE;
  }
  function isFragment(object) {
    return typeOf(object) === REACT_FRAGMENT_TYPE;
  }
  function isLazy(object) {
    return typeOf(object) === REACT_LAZY_TYPE;
  }
  function isMemo(object) {
    return typeOf(object) === REACT_MEMO_TYPE;
  }
  function isPortal(object) {
    return typeOf(object) === REACT_PORTAL_TYPE;
  }
  function isProfiler(object) {
    return typeOf(object) === REACT_PROFILER_TYPE;
  }
  function isStrictMode(object) {
    return typeOf(object) === REACT_STRICT_MODE_TYPE;
  }
  function isSuspense(object) {
    return typeOf(object) === REACT_SUSPENSE_TYPE;
  }
  
  exports.typeOf = typeOf;
  exports.AsyncMode = AsyncMode;
  exports.ConcurrentMode = ConcurrentMode;
  exports.ContextConsumer = ContextConsumer;
  exports.ContextProvider = ContextProvider;
  exports.Element = Element;
  exports.ForwardRef = ForwardRef;
  exports.Fragment = Fragment;
  exports.Lazy = Lazy;
  exports.Memo = Memo;
  exports.Portal = Portal;
  exports.Profiler = Profiler;
  exports.StrictMode = StrictMode;
  exports.Suspense = Suspense;
  exports.isValidElementType = isValidElementType;
  exports.isAsyncMode = isAsyncMode;
  exports.isConcurrentMode = isConcurrentMode;
  exports.isContextConsumer = isContextConsumer;
  exports.isContextProvider = isContextProvider;
  exports.isElement = isElement;
  exports.isForwardRef = isForwardRef;
  exports.isFragment = isFragment;
  exports.isLazy = isLazy;
  exports.isMemo = isMemo;
  exports.isPortal = isPortal;
  exports.isProfiler = isProfiler;
  exports.isStrictMode = isStrictMode;
  exports.isSuspense = isSuspense;
    })();
  }
  });
  
  unwrapExports(reactIs_development);
  var reactIs_development_1 = reactIs_development.typeOf;
  var reactIs_development_2 = reactIs_development.AsyncMode;
  var reactIs_development_3 = reactIs_development.ConcurrentMode;
  var reactIs_development_4 = reactIs_development.ContextConsumer;
  var reactIs_development_5 = reactIs_development.ContextProvider;
  var reactIs_development_6 = reactIs_development.Element;
  var reactIs_development_7 = reactIs_development.ForwardRef;
  var reactIs_development_8 = reactIs_development.Fragment;
  var reactIs_development_9 = reactIs_development.Lazy;
  var reactIs_development_10 = reactIs_development.Memo;
  var reactIs_development_11 = reactIs_development.Portal;
  var reactIs_development_12 = reactIs_development.Profiler;
  var reactIs_development_13 = reactIs_development.StrictMode;
  var reactIs_development_14 = reactIs_development.Suspense;
  var reactIs_development_15 = reactIs_development.isValidElementType;
  var reactIs_development_16 = reactIs_development.isAsyncMode;
  var reactIs_development_17 = reactIs_development.isConcurrentMode;
  var reactIs_development_18 = reactIs_development.isContextConsumer;
  var reactIs_development_19 = reactIs_development.isContextProvider;
  var reactIs_development_20 = reactIs_development.isElement;
  var reactIs_development_21 = reactIs_development.isForwardRef;
  var reactIs_development_22 = reactIs_development.isFragment;
  var reactIs_development_23 = reactIs_development.isLazy;
  var reactIs_development_24 = reactIs_development.isMemo;
  var reactIs_development_25 = reactIs_development.isPortal;
  var reactIs_development_26 = reactIs_development.isProfiler;
  var reactIs_development_27 = reactIs_development.isStrictMode;
  var reactIs_development_28 = reactIs_development.isSuspense;
  
  var reactIs = createCommonjsModule(function (module) {
  
  {
    module.exports = reactIs_development;
  }
  });
  
  /*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  */
  /* eslint-disable no-unused-vars */
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  var hasOwnProperty = Object.prototype.hasOwnProperty;
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
  
  function toObject(val) {
  	if (val === null || val === undefined) {
  		throw new TypeError('Object.assign cannot be called with null or undefined');
  	}
  
  	return Object(val);
  }
  
  function shouldUseNative() {
  	try {
  		if (!Object.assign) {
  			return false;
  		}
  
  		// Detect buggy property enumeration order in older V8 versions.
  
  		// https://bugs.chromium.org/p/v8/issues/detail?id=4118
  		var test1 = new String('abc');  // eslint-disable-line no-new-wrappers
  		test1[5] = 'de';
  		if (Object.getOwnPropertyNames(test1)[0] === '5') {
  			return false;
  		}
  
  		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
  		var test2 = {};
  		for (var i = 0; i < 10; i++) {
  			test2['_' + String.fromCharCode(i)] = i;
  		}
  		var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
  			return test2[n];
  		});
  		if (order2.join('') !== '0123456789') {
  			return false;
  		}
  
  		// https://bugs.chromium.org/p/v8/issues/detail?id=3056
  		var test3 = {};
  		'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
  			test3[letter] = letter;
  		});
  		if (Object.keys(Object.assign({}, test3)).join('') !==
  				'abcdefghijklmnopqrst') {
  			return false;
  		}
  
  		return true;
  	} catch (err) {
  		// We don't expect any of the above to throw, but better to be safe.
  		return false;
  	}
  }
  
  var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
  	var from;
  	var to = toObject(target);
  	var symbols;
  
  	for (var s = 1; s < arguments.length; s++) {
  		from = Object(arguments[s]);
  
  		for (var key in from) {
  			if (hasOwnProperty.call(from, key)) {
  				to[key] = from[key];
  			}
  		}
  
  		if (getOwnPropertySymbols) {
  			symbols = getOwnPropertySymbols(from);
  			for (var i = 0; i < symbols.length; i++) {
  				if (propIsEnumerable.call(from, symbols[i])) {
  					to[symbols[i]] = from[symbols[i]];
  				}
  			}
  		}
  	}
  
  	return to;
  };
  
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
  
  var ReactPropTypesSecret_1 = ReactPropTypesSecret;
  
  var printWarning = function() {};
  
  {
    var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
    var loggedTypeFailures = {};
    var has = Function.call.bind(Object.prototype.hasOwnProperty);
  
    printWarning = function(text) {
      var message = 'Warning: ' + text;
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  }
  
  /**
   * Assert that the values match with the type specs.
   * Error messages are memorized and will only be shown once.
   *
   * @param {object} typeSpecs Map of name to a ReactPropType
   * @param {object} values Runtime values that need to be type-checked
   * @param {string} location e.g. "prop", "context", "child context"
   * @param {string} componentName Name of the component for error messages.
   * @param {?Function} getStack Returns the component stack.
   * @private
   */
  function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
    {
      for (var typeSpecName in typeSpecs) {
        if (has(typeSpecs, typeSpecName)) {
          var error;
          // Prop type validation may throw. In case they do, we don't want to
          // fail the render phase where it didn't fail before. So we log it.
          // After these have been cleaned up, we'll let them throw.
          try {
            // This is intentionally an invariant that gets caught. It's the same
            // behavior as without this statement except with a better message.
            if (typeof typeSpecs[typeSpecName] !== 'function') {
              var err = Error(
                (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
                'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'
              );
              err.name = 'Invariant Violation';
              throw err;
            }
            error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
          } catch (ex) {
            error = ex;
          }
          if (error && !(error instanceof Error)) {
            printWarning(
              (componentName || 'React class') + ': type specification of ' +
              location + ' `' + typeSpecName + '` is invalid; the type checker ' +
              'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
              'You may have forgotten to pass an argument to the type checker ' +
              'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
              'shape all require an argument).'
            );
          }
          if (error instanceof Error && !(error.message in loggedTypeFailures)) {
            // Only monitor this failure once because there tends to be a lot of the
            // same error.
            loggedTypeFailures[error.message] = true;
  
            var stack = getStack ? getStack() : '';
  
            printWarning(
              'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
            );
          }
        }
      }
    }
  }
  
  /**
   * Resets warning cache when testing.
   *
   * @private
   */
  checkPropTypes.resetWarningCache = function() {
    {
      loggedTypeFailures = {};
    }
  };
  
  var checkPropTypes_1 = checkPropTypes;
  
  var has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
  var printWarning$1 = function() {};
  
  {
    printWarning$1 = function(text) {
      var message = 'Warning: ' + text;
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  }
  
  function emptyFunctionThatReturnsNull() {
    return null;
  }
  
  var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
    /* global Symbol */
    var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
    var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
  
    /**
     * Returns the iterator method function contained on the iterable object.
     *
     * Be sure to invoke the function with the iterable as context:
     *
     *     var iteratorFn = getIteratorFn(myIterable);
     *     if (iteratorFn) {
     *       var iterator = iteratorFn.call(myIterable);
     *       ...
     *     }
     *
     * @param {?object} maybeIterable
     * @return {?function}
     */
    function getIteratorFn(maybeIterable) {
      var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
      if (typeof iteratorFn === 'function') {
        return iteratorFn;
      }
    }
  
    /**
     * Collection of methods that allow declaration and validation of props that are
     * supplied to React components. Example usage:
     *
     *   var Props = require('ReactPropTypes');
     *   var MyArticle = React.createClass({
     *     propTypes: {
     *       // An optional string prop named "description".
     *       description: Props.string,
     *
     *       // A required enum prop named "category".
     *       category: Props.oneOf(['News','Photos']).isRequired,
     *
     *       // A prop named "dialog" that requires an instance of Dialog.
     *       dialog: Props.instanceOf(Dialog).isRequired
     *     },
     *     render: function() { ... }
     *   });
     *
     * A more formal specification of how these methods are used:
     *
     *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
     *   decl := ReactPropTypes.{type}(.isRequired)?
     *
     * Each and every declaration produces a function with the same signature. This
     * allows the creation of custom validation functions. For example:
     *
     *  var MyLink = React.createClass({
     *    propTypes: {
     *      // An optional string or URI prop named "href".
     *      href: function(props, propName, componentName) {
     *        var propValue = props[propName];
     *        if (propValue != null && typeof propValue !== 'string' &&
     *            !(propValue instanceof URI)) {
     *          return new Error(
     *            'Expected a string or an URI for ' + propName + ' in ' +
     *            componentName
     *          );
     *        }
     *      }
     *    },
     *    render: function() {...}
     *  });
     *
     * @internal
     */
  
    var ANONYMOUS = '<<anonymous>>';
  
    // Important!
    // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
    var ReactPropTypes = {
      array: createPrimitiveTypeChecker('array'),
      bool: createPrimitiveTypeChecker('boolean'),
      func: createPrimitiveTypeChecker('function'),
      number: createPrimitiveTypeChecker('number'),
      object: createPrimitiveTypeChecker('object'),
      string: createPrimitiveTypeChecker('string'),
      symbol: createPrimitiveTypeChecker('symbol'),
  
      any: createAnyTypeChecker(),
      arrayOf: createArrayOfTypeChecker,
      element: createElementTypeChecker(),
      elementType: createElementTypeTypeChecker(),
      instanceOf: createInstanceTypeChecker,
      node: createNodeChecker(),
      objectOf: createObjectOfTypeChecker,
      oneOf: createEnumTypeChecker,
      oneOfType: createUnionTypeChecker,
      shape: createShapeTypeChecker,
      exact: createStrictShapeTypeChecker,
    };
  
    /**
     * inlined Object.is polyfill to avoid requiring consumers ship their own
     * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
     */
    /*eslint-disable no-self-compare*/
    function is(x, y) {
      // SameValue algorithm
      if (x === y) {
        // Steps 1-5, 7-10
        // Steps 6.b-6.e: +0 != -0
        return x !== 0 || 1 / x === 1 / y;
      } else {
        // Step 6.a: NaN == NaN
        return x !== x && y !== y;
      }
    }
    /*eslint-enable no-self-compare*/
  
    /**
     * We use an Error-like object for backward compatibility as people may call
     * PropTypes directly and inspect their output. However, we don't use real
     * Errors anymore. We don't inspect their stack anyway, and creating them
     * is prohibitively expensive if they are created too often, such as what
     * happens in oneOfType() for any type before the one that matched.
     */
    function PropTypeError(message) {
      this.message = message;
      this.stack = '';
    }
    // Make `instanceof Error` still work for returned errors.
    PropTypeError.prototype = Error.prototype;
  
    function createChainableTypeChecker(validate) {
      {
        var manualPropTypeCallCache = {};
        var manualPropTypeWarningCount = 0;
      }
      function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
        componentName = componentName || ANONYMOUS;
        propFullName = propFullName || propName;
  
        if (secret !== ReactPropTypesSecret_1) {
          if (throwOnDirectAccess) {
            // New behavior only for users of `prop-types` package
            var err = new Error(
              'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
              'Use `PropTypes.checkPropTypes()` to call them. ' +
              'Read more at http://fb.me/use-check-prop-types'
            );
            err.name = 'Invariant Violation';
            throw err;
          } else if ("development" !== 'production' && typeof console !== 'undefined') {
            // Old behavior for people using React.PropTypes
            var cacheKey = componentName + ':' + propName;
            if (
              !manualPropTypeCallCache[cacheKey] &&
              // Avoid spamming the console because they are often not actionable except for lib authors
              manualPropTypeWarningCount < 3
            ) {
              printWarning$1(
                'You are manually calling a React.PropTypes validation ' +
                'function for the `' + propFullName + '` prop on `' + componentName  + '`. This is deprecated ' +
                'and will throw in the standalone `prop-types` package. ' +
                'You may be seeing this warning due to a third-party PropTypes ' +
                'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
              );
              manualPropTypeCallCache[cacheKey] = true;
              manualPropTypeWarningCount++;
            }
          }
        }
        if (props[propName] == null) {
          if (isRequired) {
            if (props[propName] === null) {
              return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
            }
            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
          }
          return null;
        } else {
          return validate(props, propName, componentName, location, propFullName);
        }
      }
  
      var chainedCheckType = checkType.bind(null, false);
      chainedCheckType.isRequired = checkType.bind(null, true);
  
      return chainedCheckType;
    }
  
    function createPrimitiveTypeChecker(expectedType) {
      function validate(props, propName, componentName, location, propFullName, secret) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== expectedType) {
          // `propValue` being instance of, say, date/regexp, pass the 'object'
          // check, but we can offer a more precise error message here rather than
          // 'of type `object`'.
          var preciseType = getPreciseType(propValue);
  
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createAnyTypeChecker() {
      return createChainableTypeChecker(emptyFunctionThatReturnsNull);
    }
  
    function createArrayOfTypeChecker(typeChecker) {
      function validate(props, propName, componentName, location, propFullName) {
        if (typeof typeChecker !== 'function') {
          return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
        }
        var propValue = props[propName];
        if (!Array.isArray(propValue)) {
          var propType = getPropType(propValue);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
        }
        for (var i = 0; i < propValue.length; i++) {
          var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
          if (error instanceof Error) {
            return error;
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createElementTypeChecker() {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        if (!isValidElement(propValue)) {
          var propType = getPropType(propValue);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createElementTypeTypeChecker() {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        if (!reactIs.isValidElementType(propValue)) {
          var propType = getPropType(propValue);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createInstanceTypeChecker(expectedClass) {
      function validate(props, propName, componentName, location, propFullName) {
        if (!(props[propName] instanceof expectedClass)) {
          var expectedClassName = expectedClass.name || ANONYMOUS;
          var actualClassName = getClassName(props[propName]);
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createEnumTypeChecker(expectedValues) {
      if (!Array.isArray(expectedValues)) {
        {
          if (arguments.length > 1) {
            printWarning$1(
              'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
              'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
            );
          } else {
            printWarning$1('Invalid argument supplied to oneOf, expected an array.');
          }
        }
        return emptyFunctionThatReturnsNull;
      }
  
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        for (var i = 0; i < expectedValues.length; i++) {
          if (is(propValue, expectedValues[i])) {
            return null;
          }
        }
  
        var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
          var type = getPreciseType(value);
          if (type === 'symbol') {
            return String(value);
          }
          return value;
        });
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
      }
      return createChainableTypeChecker(validate);
    }
  
    function createObjectOfTypeChecker(typeChecker) {
      function validate(props, propName, componentName, location, propFullName) {
        if (typeof typeChecker !== 'function') {
          return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
        }
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
        }
        for (var key in propValue) {
          if (has$1(propValue, key)) {
            var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
            if (error instanceof Error) {
              return error;
            }
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createUnionTypeChecker(arrayOfTypeCheckers) {
      if (!Array.isArray(arrayOfTypeCheckers)) {
        printWarning$1('Invalid argument supplied to oneOfType, expected an instance of array.');
        return emptyFunctionThatReturnsNull;
      }
  
      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
        var checker = arrayOfTypeCheckers[i];
        if (typeof checker !== 'function') {
          printWarning$1(
            'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
            'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
          );
          return emptyFunctionThatReturnsNull;
        }
      }
  
      function validate(props, propName, componentName, location, propFullName) {
        for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
          var checker = arrayOfTypeCheckers[i];
          if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
            return null;
          }
        }
  
        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
      }
      return createChainableTypeChecker(validate);
    }
  
    function createNodeChecker() {
      function validate(props, propName, componentName, location, propFullName) {
        if (!isNode(props[propName])) {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createShapeTypeChecker(shapeTypes) {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
        }
        for (var key in shapeTypes) {
          var checker = shapeTypes[key];
          if (!checker) {
            continue;
          }
          var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
          if (error) {
            return error;
          }
        }
        return null;
      }
      return createChainableTypeChecker(validate);
    }
  
    function createStrictShapeTypeChecker(shapeTypes) {
      function validate(props, propName, componentName, location, propFullName) {
        var propValue = props[propName];
        var propType = getPropType(propValue);
        if (propType !== 'object') {
          return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
        }
        // We need to check all keys in case some are required but missing from
        // props.
        var allKeys = objectAssign({}, props[propName], shapeTypes);
        for (var key in allKeys) {
          var checker = shapeTypes[key];
          if (!checker) {
            return new PropTypeError(
              'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
              '\nBad object: ' + JSON.stringify(props[propName], null, '  ') +
              '\nValid keys: ' +  JSON.stringify(Object.keys(shapeTypes), null, '  ')
            );
          }
          var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
          if (error) {
            return error;
          }
        }
        return null;
      }
  
      return createChainableTypeChecker(validate);
    }
  
    function isNode(propValue) {
      switch (typeof propValue) {
        case 'number':
        case 'string':
        case 'undefined':
          return true;
        case 'boolean':
          return !propValue;
        case 'object':
          if (Array.isArray(propValue)) {
            return propValue.every(isNode);
          }
          if (propValue === null || isValidElement(propValue)) {
            return true;
          }
  
          var iteratorFn = getIteratorFn(propValue);
          if (iteratorFn) {
            var iterator = iteratorFn.call(propValue);
            var step;
            if (iteratorFn !== propValue.entries) {
              while (!(step = iterator.next()).done) {
                if (!isNode(step.value)) {
                  return false;
                }
              }
            } else {
              // Iterator will provide entry [k,v] tuples rather than values.
              while (!(step = iterator.next()).done) {
                var entry = step.value;
                if (entry) {
                  if (!isNode(entry[1])) {
                    return false;
                  }
                }
              }
            }
          } else {
            return false;
          }
  
          return true;
        default:
          return false;
      }
    }
  
    function isSymbol(propType, propValue) {
      // Native Symbol.
      if (propType === 'symbol') {
        return true;
      }
  
      // falsy value can't be a Symbol
      if (!propValue) {
        return false;
      }
  
      // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
      if (propValue['@@toStringTag'] === 'Symbol') {
        return true;
      }
  
      // Fallback for non-spec compliant Symbols which are polyfilled.
      if (typeof Symbol === 'function' && propValue instanceof Symbol) {
        return true;
      }
  
      return false;
    }
  
    // Equivalent of `typeof` but with special handling for array and regexp.
    function getPropType(propValue) {
      var propType = typeof propValue;
      if (Array.isArray(propValue)) {
        return 'array';
      }
      if (propValue instanceof RegExp) {
        // Old webkits (at least until Android 4.0) return 'function' rather than
        // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
        // passes PropTypes.object.
        return 'object';
      }
      if (isSymbol(propType, propValue)) {
        return 'symbol';
      }
      return propType;
    }
  
    // This handles more types than `getPropType`. Only used for error messages.
    // See `createPrimitiveTypeChecker`.
    function getPreciseType(propValue) {
      if (typeof propValue === 'undefined' || propValue === null) {
        return '' + propValue;
      }
      var propType = getPropType(propValue);
      if (propType === 'object') {
        if (propValue instanceof Date) {
          return 'date';
        } else if (propValue instanceof RegExp) {
          return 'regexp';
        }
      }
      return propType;
    }
  
    // Returns a string that is postfixed to a warning about an invalid type.
    // For example, "undefined" or "of type array"
    function getPostfixForTypeWarning(value) {
      var type = getPreciseType(value);
      switch (type) {
        case 'array':
        case 'object':
          return 'an ' + type;
        case 'boolean':
        case 'date':
        case 'regexp':
          return 'a ' + type;
        default:
          return type;
      }
    }
  
    // Returns class name of the object, if any.
    function getClassName(propValue) {
      if (!propValue.constructor || !propValue.constructor.name) {
        return ANONYMOUS;
      }
      return propValue.constructor.name;
    }
  
    ReactPropTypes.checkPropTypes = checkPropTypes_1;
    ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
    ReactPropTypes.PropTypes = ReactPropTypes;
  
    return ReactPropTypes;
  };
  
  var propTypes = createCommonjsModule(function (module) {
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  {
    var ReactIs = reactIs;
  
    // By explicitly using `prop-types` you are opting into new development behavior.
    // http://fb.me/prop-types-in-prod
    var throwOnDirectAccess = true;
    module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
  }
  });
  
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  /**
   * Use invariant() to assert state which your program assumes to be true.
   *
   * Provide sprintf-style format (only %s is supported) and arguments
   * to provide information about what broke and what you were
   * expecting.
   *
   * The invariant message will be stripped in production, but the invariant
   * will remain to ensure logic does not differ in production.
   */
  
  var NODE_ENV = "development";
  
  var invariant = function(condition, format, a, b, c, d, e, f) {
    if (NODE_ENV !== 'production') {
      if (format === undefined) {
        throw new Error('invariant requires an error message argument');
      }
    }
  
    if (!condition) {
      var error;
      if (format === undefined) {
        error = new Error(
          'Minified exception occurred; use the non-minified dev environment ' +
          'for the full error message and additional helpful warnings.'
        );
      } else {
        var args = [a, b, c, d, e, f];
        var argIndex = 0;
        error = new Error(
          format.replace(/%s/g, function() { return args[argIndex++]; })
        );
        error.name = 'Invariant Violation';
      }
  
      error.framesToPop = 1; // we don't care about invariant's own frame
      throw error;
    }
  };
  
  var invariant_1 = invariant;
  
  var key = '__global_unique_id__';
  
  var gud = function() {
    return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
  };
  
  /**
   * Copyright (c) 2014-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  /**
   * Similar to invariant but only logs a warning if the condition is not met.
   * This can be used to log issues in development environments in critical
   * paths. Removing the logging code for production environments will keep the
   * same logic and follow the same code paths.
   */
  
  var __DEV__ = "development" !== 'production';
  
  var warning = function() {};
  
  if (__DEV__) {
    var printWarning$2 = function printWarning(format, args) {
      var len = arguments.length;
      args = new Array(len > 1 ? len - 1 : 0);
      for (var key = 1; key < len; key++) {
        args[key - 1] = arguments[key];
      }
      var argIndex = 0;
      var message = 'Warning: ' +
        format.replace(/%s/g, function() {
          return args[argIndex++];
        });
      if (typeof console !== 'undefined') {
        console.error(message);
      }
      try {
        // --- Welcome to debugging React ---
        // This error was thrown as a convenience so that you can use this stack
        // to find the callsite that caused this warning to fire.
        throw new Error(message);
      } catch (x) {}
    };
  
    warning = function(condition, format, args) {
      var len = arguments.length;
      args = new Array(len > 2 ? len - 2 : 0);
      for (var key = 2; key < len; key++) {
        args[key - 2] = arguments[key];
      }
      if (format === undefined) {
        throw new Error(
            '`warning(condition, format, ...args)` requires a warning ' +
            'message argument'
        );
      }
      if (!condition) {
        printWarning$2.apply(null, [format].concat(args));
      }
    };
  }
  
  var warning_1 = warning;
  
  var implementation = createCommonjsModule(function (module, exports) {
  
  exports.__esModule = true;
  
  
  
  var _react2 = _interopRequireDefault(React__default);
  
  
  
  var _propTypes2 = _interopRequireDefault(propTypes);
  
  
  
  var _gud2 = _interopRequireDefault(gud);
  
  
  
  var _warning2 = _interopRequireDefault(warning_1);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  
  var MAX_SIGNED_31_BIT_INT = 1073741823;
  
  // Inlined Object.is polyfill.
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
  function objectIs(x, y) {
    if (x === y) {
      return x !== 0 || 1 / x === 1 / y;
    } else {
      return x !== x && y !== y;
    }
  }
  
  function createEventEmitter(value) {
    var handlers = [];
    return {
      on: function on(handler) {
        handlers.push(handler);
      },
      off: function off(handler) {
        handlers = handlers.filter(function (h) {
          return h !== handler;
        });
      },
      get: function get() {
        return value;
      },
      set: function set(newValue, changedBits) {
        value = newValue;
        handlers.forEach(function (handler) {
          return handler(value, changedBits);
        });
      }
    };
  }
  
  function onlyChild(children) {
    return Array.isArray(children) ? children[0] : children;
  }
  
  function createReactContext(defaultValue, calculateChangedBits) {
    var _Provider$childContex, _Consumer$contextType;
  
    var contextProp = '__create-react-context-' + (0, _gud2.default)() + '__';
  
    var Provider = function (_Component) {
      _inherits(Provider, _Component);
  
      function Provider() {
        var _temp, _this, _ret;
  
        _classCallCheck(this, Provider);
  
        for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
          args[_key] = arguments[_key];
        }
  
        return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.emitter = createEventEmitter(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret);
      }
  
      Provider.prototype.getChildContext = function getChildContext() {
        var _ref;
  
        return _ref = {}, _ref[contextProp] = this.emitter, _ref;
      };
  
      Provider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
        if (this.props.value !== nextProps.value) {
          var oldValue = this.props.value;
          var newValue = nextProps.value;
          var changedBits = void 0;
  
          if (objectIs(oldValue, newValue)) {
            changedBits = 0; // No change
          } else {
            changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
            {
              (0, _warning2.default)((changedBits & MAX_SIGNED_31_BIT_INT) === changedBits, 'calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
            }
  
            changedBits |= 0;
  
            if (changedBits !== 0) {
              this.emitter.set(nextProps.value, changedBits);
            }
          }
        }
      };
  
      Provider.prototype.render = function render() {
        return this.props.children;
      };
  
      return Provider;
    }(React__default.Component);
  
    Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = _propTypes2.default.object.isRequired, _Provider$childContex);
  
    var Consumer = function (_Component2) {
      _inherits(Consumer, _Component2);
  
      function Consumer() {
        var _temp2, _this2, _ret2;
  
        _classCallCheck(this, Consumer);
  
        for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
          args[_key2] = arguments[_key2];
        }
  
        return _ret2 = (_temp2 = (_this2 = _possibleConstructorReturn(this, _Component2.call.apply(_Component2, [this].concat(args))), _this2), _this2.state = {
          value: _this2.getValue()
        }, _this2.onUpdate = function (newValue, changedBits) {
          var observedBits = _this2.observedBits | 0;
          if ((observedBits & changedBits) !== 0) {
            _this2.setState({ value: _this2.getValue() });
          }
        }, _temp2), _possibleConstructorReturn(_this2, _ret2);
      }
  
      Consumer.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
        var observedBits = nextProps.observedBits;
  
        this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
        : observedBits;
      };
  
      Consumer.prototype.componentDidMount = function componentDidMount() {
        if (this.context[contextProp]) {
          this.context[contextProp].on(this.onUpdate);
        }
        var observedBits = this.props.observedBits;
  
        this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT // Subscribe to all changes by default
        : observedBits;
      };
  
      Consumer.prototype.componentWillUnmount = function componentWillUnmount() {
        if (this.context[contextProp]) {
          this.context[contextProp].off(this.onUpdate);
        }
      };
  
      Consumer.prototype.getValue = function getValue() {
        if (this.context[contextProp]) {
          return this.context[contextProp].get();
        } else {
          return defaultValue;
        }
      };
  
      Consumer.prototype.render = function render() {
        return onlyChild(this.props.children)(this.state.value);
      };
  
      return Consumer;
    }(React__default.Component);
  
    Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = _propTypes2.default.object, _Consumer$contextType);
  
  
    return {
      Provider: Provider,
      Consumer: Consumer
    };
  }
  
  exports.default = createReactContext;
  module.exports = exports['default'];
  });
  
  unwrapExports(implementation);
  
  var lib = createCommonjsModule(function (module, exports) {
  
  exports.__esModule = true;
  
  
  
  var _react2 = _interopRequireDefault(React__default);
  
  
  
  var _implementation2 = _interopRequireDefault(implementation);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  exports.default = _react2.default.createContext || _implementation2.default;
  module.exports = exports['default'];
  });
  
  var createContext = unwrapExports(lib);
  
  /**
   * Copyright (c) 2013-present, Facebook, Inc.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   */
  
  function componentWillMount() {
    // Call this.constructor.gDSFP to support sub-classes.
    var state = this.constructor.getDerivedStateFromProps(this.props, this.state);
    if (state !== null && state !== undefined) {
      this.setState(state);
    }
  }
  
  function componentWillReceiveProps(nextProps) {
    // Call this.constructor.gDSFP to support sub-classes.
    // Use the setState() updater to ensure state isn't stale in certain edge cases.
    function updater(prevState) {
      var state = this.constructor.getDerivedStateFromProps(nextProps, prevState);
      return state !== null && state !== undefined ? state : null;
    }
    // Binding "this" is important for shallow renderer support.
    this.setState(updater.bind(this));
  }
  
  function componentWillUpdate(nextProps, nextState) {
    try {
      var prevProps = this.props;
      var prevState = this.state;
      this.props = nextProps;
      this.state = nextState;
      this.__reactInternalSnapshotFlag = true;
      this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
        prevProps,
        prevState
      );
    } finally {
      this.props = prevProps;
      this.state = prevState;
    }
  }
  
  // React may warn about cWM/cWRP/cWU methods being deprecated.
  // Add a flag to suppress these warnings for this special case.
  componentWillMount.__suppressDeprecationWarning = true;
  componentWillReceiveProps.__suppressDeprecationWarning = true;
  componentWillUpdate.__suppressDeprecationWarning = true;
  
  function polyfill(Component) {
    var prototype = Component.prototype;
  
    if (!prototype || !prototype.isReactComponent) {
      throw new Error('Can only polyfill class components');
    }
  
    if (
      typeof Component.getDerivedStateFromProps !== 'function' &&
      typeof prototype.getSnapshotBeforeUpdate !== 'function'
    ) {
      return Component;
    }
  
    // If new component APIs are defined, "unsafe" lifecycles won't be called.
    // Error if any of these lifecycles are present,
    // Because they would work differently between older and newer (16.3+) versions of React.
    var foundWillMountName = null;
    var foundWillReceivePropsName = null;
    var foundWillUpdateName = null;
    if (typeof prototype.componentWillMount === 'function') {
      foundWillMountName = 'componentWillMount';
    } else if (typeof prototype.UNSAFE_componentWillMount === 'function') {
      foundWillMountName = 'UNSAFE_componentWillMount';
    }
    if (typeof prototype.componentWillReceiveProps === 'function') {
      foundWillReceivePropsName = 'componentWillReceiveProps';
    } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') {
      foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
    }
    if (typeof prototype.componentWillUpdate === 'function') {
      foundWillUpdateName = 'componentWillUpdate';
    } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') {
      foundWillUpdateName = 'UNSAFE_componentWillUpdate';
    }
    if (
      foundWillMountName !== null ||
      foundWillReceivePropsName !== null ||
      foundWillUpdateName !== null
    ) {
      var componentName = Component.displayName || Component.name;
      var newApiName =
        typeof Component.getDerivedStateFromProps === 'function'
          ? 'getDerivedStateFromProps()'
          : 'getSnapshotBeforeUpdate()';
  
      throw Error(
        'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' +
          componentName +
          ' uses ' +
          newApiName +
          ' but also contains the following legacy lifecycles:' +
          (foundWillMountName !== null ? '\n  ' + foundWillMountName : '') +
          (foundWillReceivePropsName !== null
            ? '\n  ' + foundWillReceivePropsName
            : '') +
          (foundWillUpdateName !== null ? '\n  ' + foundWillUpdateName : '') +
          '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' +
          'https://fb.me/react-async-component-lifecycle-hooks'
      );
    }
  
    // React <= 16.2 does not support static getDerivedStateFromProps.
    // As a workaround, use cWM and cWRP to invoke the new static lifecycle.
    // Newer versions of React will ignore these lifecycles if gDSFP exists.
    if (typeof Component.getDerivedStateFromProps === 'function') {
      prototype.componentWillMount = componentWillMount;
      prototype.componentWillReceiveProps = componentWillReceiveProps;
    }
  
    // React <= 16.2 does not support getSnapshotBeforeUpdate.
    // As a workaround, use cWU to invoke the new lifecycle.
    // Newer versions of React will ignore that lifecycle if gSBU exists.
    if (typeof prototype.getSnapshotBeforeUpdate === 'function') {
      if (typeof prototype.componentDidUpdate !== 'function') {
        throw new Error(
          'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype'
        );
      }
  
      prototype.componentWillUpdate = componentWillUpdate;
  
      var componentDidUpdate = prototype.componentDidUpdate;
  
      prototype.componentDidUpdate = function componentDidUpdatePolyfill(
        prevProps,
        prevState,
        maybeSnapshot
      ) {
        // 16.3+ will not execute our will-update method;
        // It will pass a snapshot value to did-update though.
        // Older versions will require our polyfilled will-update value.
        // We need to handle both cases, but can't just check for the presence of "maybeSnapshot",
        // Because for <= 15.x versions this might be a "prevContext" object.
        // We also can't just check "__reactInternalSnapshot",
        // Because get-snapshot might return a falsy value.
        // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior.
        var snapshot = this.__reactInternalSnapshotFlag
          ? this.__reactInternalSnapshot
          : maybeSnapshot;
  
        componentDidUpdate.call(this, prevProps, prevState, snapshot);
      };
    }
  
    return Component;
  }
  
  ////////////////////////////////////////////////////////////////////////////////
  // startsWith(string, search) - Check if `string` starts with `search`
  var startsWith = function startsWith(string, search) {
    return string.substr(0, search.length) === search;
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // pick(routes, uri)
  //
  // Ranks and picks the best route to match. Each segment gets the highest
  // amount of points, then the type of segment gets an additional amount of
  // points where
  //
  //     static > dynamic > splat > root
  //
  // This way we don't have to worry about the order of our routes, let the
  // computers do it.
  //
  // A route looks like this
  //
  //     { path, default, value }
  //
  // And a returned match looks like:
  //
  //     { route, params, uri }
  //
  // I know, I should use TypeScript not comments for these types.
  var pick = function pick(routes, uri) {
    var match = void 0;
    var default_ = void 0;
  
    var _uri$split = uri.split("?"),
        uriPathname = _uri$split[0];
  
    var uriSegments = segmentize(uriPathname);
    var isRootUri = uriSegments[0] === "";
    var ranked = rankRoutes(routes);
  
    for (var i = 0, l = ranked.length; i < l; i++) {
      var missed = false;
      var route = ranked[i].route;
  
      if (route.default) {
        default_ = {
          route: route,
          params: {},
          uri: uri
        };
        continue;
      }
  
      var routeSegments = segmentize(route.path);
      var params = {};
      var max = Math.max(uriSegments.length, routeSegments.length);
      var index = 0;
  
      for (; index < max; index++) {
        var routeSegment = routeSegments[index];
        var uriSegment = uriSegments[index];
  
        if (isSplat(routeSegment)) {
          // Hit a splat, just grab the rest, and return a match
          // uri:   /files/documents/work
          // route: /files/*
          var param = routeSegment.slice(1) || "*";
          params[param] = uriSegments.slice(index).map(decodeURIComponent).join("/");
          break;
        }
  
        if (uriSegment === undefined) {
          // URI is shorter than the route, no match
          // uri:   /users
          // route: /users/:userId
          missed = true;
          break;
        }
  
        var dynamicMatch = paramRe.exec(routeSegment);
  
        if (dynamicMatch && !isRootUri) {
          var matchIsNotReserved = reservedNames.indexOf(dynamicMatch[1]) === -1;
          !matchIsNotReserved ? invariant_1(false, "<Router> dynamic segment \"" + dynamicMatch[1] + "\" is a reserved name. Please use a different name in path \"" + route.path + "\".") : void 0;
          var value = decodeURIComponent(uriSegment);
          params[dynamicMatch[1]] = value;
        } else if (routeSegment !== uriSegment) {
          // Current segments don't match, not dynamic, not splat, so no match
          // uri:   /users/123/settings
          // route: /users/:id/profile
          missed = true;
          break;
        }
      }
  
      if (!missed) {
        match = {
          route: route,
          params: params,
          uri: "/" + uriSegments.slice(0, index).join("/")
        };
        break;
      }
    }
  
    return match || default_ || null;
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // match(path, uri) - Matches just one path to a uri, also lol
  var match = function match(path, uri) {
    return pick([{ path: path }], uri);
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // resolve(to, basepath)
  //
  // Resolves URIs as though every path is a directory, no files.  Relative URIs
  // in the browser can feel awkward because not only can you be "in a directory"
  // you can be "at a file", too. For example
  //
  //     browserSpecResolve('foo', '/bar/') => /bar/foo
  //     browserSpecResolve('foo', '/bar') => /foo
  //
  // But on the command line of a file system, it's not as complicated, you can't
  // `cd` from a file, only directories.  This way, links have to know less about
  // their current path. To go deeper you can do this:
  //
  //     <Link to="deeper"/>
  //     // instead of
  //     <Link to=`{${props.uri}/deeper}`/>
  //
  // Just like `cd`, if you want to go deeper from the command line, you do this:
  //
  //     cd deeper
  //     # not
  //     cd $(pwd)/deeper
  //
  // By treating every path as a directory, linking to relative paths should
  // require less contextual information and (fingers crossed) be more intuitive.
  var resolve = function resolve(to, base) {
    // /foo/bar, /baz/qux => /foo/bar
    if (startsWith(to, "/")) {
      return to;
    }
  
    var _to$split = to.split("?"),
        toPathname = _to$split[0],
        toQuery = _to$split[1];
  
    var _base$split = base.split("?"),
        basePathname = _base$split[0];
  
    var toSegments = segmentize(toPathname);
    var baseSegments = segmentize(basePathname);
  
    // ?a=b, /users?b=c => /users?a=b
    if (toSegments[0] === "") {
      return addQuery(basePathname, toQuery);
    }
  
    // profile, /users/789 => /users/789/profile
    if (!startsWith(toSegments[0], ".")) {
      var pathname = baseSegments.concat(toSegments).join("/");
      return addQuery((basePathname === "/" ? "" : "/") + pathname, toQuery);
    }
  
    // ./         /users/123  =>  /users/123
    // ../        /users/123  =>  /users
    // ../..      /users/123  =>  /
    // ../../one  /a/b/c/d    =>  /a/b/one
    // .././one   /a/b/c/d    =>  /a/b/c/one
    var allSegments = baseSegments.concat(toSegments);
    var segments = [];
    for (var i = 0, l = allSegments.length; i < l; i++) {
      var segment = allSegments[i];
      if (segment === "..") segments.pop();else if (segment !== ".") segments.push(segment);
    }
  
    return addQuery("/" + segments.join("/"), toQuery);
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // insertParams(path, params)
  var insertParams = function insertParams(path, params) {
    var segments = segmentize(path);
    return "/" + segments.map(function (segment) {
      var match = paramRe.exec(segment);
      return match ? params[match[1]] : segment;
    }).join("/");
  };
  
  var validateRedirect = function validateRedirect(from, to) {
    var filter = function filter(segment) {
      return isDynamic(segment);
    };
    var fromString = segmentize(from).filter(filter).sort().join("/");
    var toString = segmentize(to).filter(filter).sort().join("/");
    return fromString === toString;
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // Junk
  var paramRe = /^:(.+)/;
  
  var SEGMENT_POINTS = 4;
  var STATIC_POINTS = 3;
  var DYNAMIC_POINTS = 2;
  var SPLAT_PENALTY = 1;
  var ROOT_POINTS = 1;
  
  var isRootSegment = function isRootSegment(segment) {
    return segment === "";
  };
  var isDynamic = function isDynamic(segment) {
    return paramRe.test(segment);
  };
  var isSplat = function isSplat(segment) {
    return segment && segment[0] === "*";
  };
  
  var rankRoute = function rankRoute(route, index) {
    var score = route.default ? 0 : segmentize(route.path).reduce(function (score, segment) {
      score += SEGMENT_POINTS;
      if (isRootSegment(segment)) score += ROOT_POINTS;else if (isDynamic(segment)) score += DYNAMIC_POINTS;else if (isSplat(segment)) score -= SEGMENT_POINTS + SPLAT_PENALTY;else score += STATIC_POINTS;
      return score;
    }, 0);
    return { route: route, score: score, index: index };
  };
  
  var rankRoutes = function rankRoutes(routes) {
    return routes.map(rankRoute).sort(function (a, b) {
      return a.score < b.score ? 1 : a.score > b.score ? -1 : a.index - b.index;
    });
  };
  
  var segmentize = function segmentize(uri) {
    return uri
    // strip starting/ending slashes
    .replace(/(^\/+|\/+$)/g, "").split("/");
  };
  
  var addQuery = function addQuery(pathname, query) {
    return pathname + (query ? "?" + query : "");
  };
  
  var reservedNames = ["uri", "path"];
  
  /**
   * Shallow compares two objects.
   * @param {Object} obj1 The first object to compare.
   * @param {Object} obj2 The second object to compare.
   */
  var shallowCompare = function shallowCompare(obj1, obj2) {
    var obj1Keys = Object.keys(obj1);
    return obj1Keys.length === Object.keys(obj2).length && obj1Keys.every(function (key) {
      return obj2.hasOwnProperty(key) && obj1[key] === obj2[key];
    });
  };
  
  var classCallCheck = function (instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  };
  
  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 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 objectWithoutProperties = function (obj, keys) {
    var target = {};
  
    for (var i in obj) {
      if (keys.indexOf(i) >= 0) continue;
      if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
      target[i] = obj[i];
    }
  
    return target;
  };
  
  var 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 getLocation = function getLocation(source) {
    var _source$location = source.location,
        pathname = _source$location.pathname,
        search = _source$location.search,
        hash = _source$location.hash,
        href = _source$location.href,
        origin = _source$location.origin,
        protocol = _source$location.protocol,
        host = _source$location.host,
        hostname = _source$location.hostname,
        port = _source$location.port;
  
  
    return {
      pathname: encodeURI(decodeURI(pathname)),
      search: search,
      hash: hash,
      href: href,
      origin: origin,
      protocol: protocol,
      host: host,
      hostname: hostname,
      port: port,
      state: source.history.state,
      key: source.history.state && source.history.state.key || "initial"
    };
  };
  
  var createHistory = function createHistory(source, options) {
    var listeners = [];
    var location = getLocation(source);
    var transitioning = false;
    var resolveTransition = function resolveTransition() {};
  
    return {
      get location() {
        return location;
      },
  
      get transitioning() {
        return transitioning;
      },
  
      _onTransitionComplete: function _onTransitionComplete() {
        transitioning = false;
        resolveTransition();
      },
      listen: function listen(listener) {
        listeners.push(listener);
  
        var popstateListener = function popstateListener() {
          location = getLocation(source);
          listener({ location: location, action: "POP" });
        };
  
        source.addEventListener("popstate", popstateListener);
  
        return function () {
          source.removeEventListener("popstate", popstateListener);
          listeners = listeners.filter(function (fn) {
            return fn !== listener;
          });
        };
      },
      navigate: function navigate(to) {
        var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
            state = _ref.state,
            _ref$replace = _ref.replace,
            replace = _ref$replace === undefined ? false : _ref$replace;
  
        if (typeof to === "number") {
          source.history.go(to);
        } else {
          state = _extends({}, state, { key: Date.now() + "" });
          // try...catch iOS Safari limits to 100 pushState calls
          try {
            if (transitioning || replace) {
              source.history.replaceState(state, null, to);
            } else {
              source.history.pushState(state, null, to);
            }
          } catch (e) {
            source.location[replace ? "replace" : "assign"](to);
          }
        }
  
        location = getLocation(source);
        transitioning = true;
        var transition = new Promise(function (res) {
          return resolveTransition = res;
        });
        listeners.forEach(function (listener) {
          return listener({ location: location, action: "PUSH" });
        });
        return transition;
      }
    };
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // Stores history entries in memory for testing or other platforms like Native
  var createMemorySource = function createMemorySource() {
    var initialPath = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "/";
  
    var searchIndex = initialPath.indexOf("?");
    var initialLocation = {
      pathname: searchIndex > -1 ? initialPath.substr(0, searchIndex) : initialPath,
      search: searchIndex > -1 ? initialPath.substr(searchIndex) : ""
    };
    var index = 0;
    var stack = [initialLocation];
    var states = [null];
  
    return {
      get location() {
        return stack[index];
      },
      addEventListener: function addEventListener(name, fn) {},
      removeEventListener: function removeEventListener(name, fn) {},
  
      history: {
        get entries() {
          return stack;
        },
        get index() {
          return index;
        },
        get state() {
          return states[index];
        },
        pushState: function pushState(state, _, uri) {
          var _uri$split = uri.split("?"),
              pathname = _uri$split[0],
              _uri$split$ = _uri$split[1],
              search = _uri$split$ === undefined ? "" : _uri$split$;
  
          index++;
          stack.push({ pathname: pathname, search: search.length ? "?" + search : search });
          states.push(state);
        },
        replaceState: function replaceState(state, _, uri) {
          var _uri$split2 = uri.split("?"),
              pathname = _uri$split2[0],
              _uri$split2$ = _uri$split2[1],
              search = _uri$split2$ === undefined ? "" : _uri$split2$;
  
          stack[index] = { pathname: pathname, search: search };
          states[index] = state;
        }
      }
    };
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // global history - uses window.history as the source if available, otherwise a
  // memory history
  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
  var getSource = function getSource() {
    return canUseDOM ? window : createMemorySource();
  };
  
  var globalHistory = createHistory(getSource());
  var navigate = globalHistory.navigate;
  
  /* eslint-disable jsx-a11y/anchor-has-content */
  
  ////////////////////////////////////////////////////////////////////////////////
  
  var createNamedContext = function createNamedContext(name, defaultValue) {
    var Ctx = createContext(defaultValue);
    Ctx.displayName = name;
    return Ctx;
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // Location Context/Provider
  var LocationContext = createNamedContext("Location");
  
  // sets up a listener if there isn't one already so apps don't need to be
  // wrapped in some top level provider
  var Location = function Location(_ref) {
    var children = _ref.children;
    return React__default.createElement(
      LocationContext.Consumer,
      null,
      function (context) {
        return context ? children(context) : React__default.createElement(
          LocationProvider,
          null,
          children
        );
      }
    );
  };
  
  var LocationProvider = function (_React$Component) {
    inherits(LocationProvider, _React$Component);
  
    function LocationProvider() {
      var _temp, _this, _ret;
  
      classCallCheck(this, LocationProvider);
  
      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 = {
        context: _this.getContext(),
        refs: { unlisten: null }
      }, _temp), possibleConstructorReturn(_this, _ret);
    }
  
    LocationProvider.prototype.getContext = function getContext() {
      var _props$history = this.props.history,
          navigate$$1 = _props$history.navigate,
          location = _props$history.location;
  
      return { navigate: navigate$$1, location: location };
    };
  
    LocationProvider.prototype.componentDidCatch = function componentDidCatch(error, info) {
      if (isRedirect(error)) {
        var _navigate = this.props.history.navigate;
  
        _navigate(error.uri, { replace: true });
      } else {
        throw error;
      }
    };
  
    LocationProvider.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
      if (prevState.context.location !== this.state.context.location) {
        this.props.history._onTransitionComplete();
      }
    };
  
    LocationProvider.prototype.componentDidMount = function componentDidMount() {
      var _this2 = this;
  
      var refs = this.state.refs,
          history = this.props.history;
  
      history._onTransitionComplete();
      refs.unlisten = history.listen(function () {
        Promise.resolve().then(function () {
          // TODO: replace rAF with react deferred update API when it's ready https://github.com/facebook/react/issues/13306
          requestAnimationFrame(function () {
            if (!_this2.unmounted) {
              _this2.setState(function () {
                return { context: _this2.getContext() };
              });
            }
          });
        });
      });
    };
  
    LocationProvider.prototype.componentWillUnmount = function componentWillUnmount() {
      var refs = this.state.refs;
  
      this.unmounted = true;
      refs.unlisten();
    };
  
    LocationProvider.prototype.render = function render() {
      var context = this.state.context,
          children = this.props.children;
  
      return React__default.createElement(
        LocationContext.Provider,
        { value: context },
        typeof children === "function" ? children(context) : children || null
      );
    };
  
    return LocationProvider;
  }(React__default.Component);
  
  ////////////////////////////////////////////////////////////////////////////////
  
  
  LocationProvider.defaultProps = {
    history: globalHistory
  };
  LocationProvider.propTypes = {
    history: propTypes.object.isRequired
  };
  var ServerLocation = function ServerLocation(_ref2) {
    var url = _ref2.url,
        children = _ref2.children;
  
    var searchIndex = url.indexOf("?");
    var searchExists = searchIndex > -1;
    var pathname = void 0;
    var search = "";
    var hash = "";
  
    if (searchExists) {
      pathname = url.substring(0, searchIndex);
      search = url.substring(searchIndex);
    } else {
      pathname = url;
    }
  
    return React__default.createElement(
      LocationContext.Provider,
      {
        value: {
          location: {
            pathname: pathname,
            search: search,
            hash: hash
          },
          navigate: function navigate$$1() {
            throw new Error("You can't call navigate on the server.");
          }
        }
      },
      children
    );
  };
  ////////////////////////////////////////////////////////////////////////////////
  // Sets baseuri and basepath for nested routers and links
  var BaseContext = createNamedContext("Base", { baseuri: "/", basepath: "/" });
  
  ////////////////////////////////////////////////////////////////////////////////
  // The main event, welcome to the show everybody.
  var Router = function Router(props) {
    return React__default.createElement(
      BaseContext.Consumer,
      null,
      function (baseContext) {
        return React__default.createElement(
          Location,
          null,
          function (locationContext) {
            return React__default.createElement(RouterImpl, _extends({}, baseContext, locationContext, props));
          }
        );
      }
    );
  };
  
  var RouterImpl = function (_React$PureComponent) {
    inherits(RouterImpl, _React$PureComponent);
  
    function RouterImpl() {
      classCallCheck(this, RouterImpl);
      return possibleConstructorReturn(this, _React$PureComponent.apply(this, arguments));
    }
  
    RouterImpl.prototype.render = function render() {
      var _props = this.props,
          location = _props.location,
          _navigate2 = _props.navigate,
          basepath = _props.basepath,
          primary = _props.primary,
          children = _props.children,
          baseuri = _props.baseuri,
          _props$component = _props.component,
          component = _props$component === undefined ? "div" : _props$component,
          domProps = objectWithoutProperties(_props, ["location", "navigate", "basepath", "primary", "children", "baseuri", "component"]);
  
      var routes = React__default.Children.toArray(children).reduce(function (array, child) {
        var routes = createRoute(basepath)(child);
        return array.concat(routes);
      }, []);
      var pathname = location.pathname;
  
  
      var match$$1 = pick(routes, pathname);
  
      if (match$$1) {
        var params = match$$1.params,
            uri = match$$1.uri,
            route = match$$1.route,
            element = match$$1.route.value;
  
        // remove the /* from the end for child routes relative paths
  
        basepath = route.default ? basepath : route.path.replace(/\*$/, "");
  
        var props = _extends({}, params, {
          uri: uri,
          location: location,
          navigate: function navigate$$1(to, options) {
            return _navigate2(resolve(to, uri), options);
          }
        });
  
        var clone = React__default.cloneElement(element, props, element.props.children ? React__default.createElement(
          Router,
          { location: location, primary: primary },
          element.props.children
        ) : undefined);
  
        // using 'div' for < 16.3 support
        var FocusWrapper = primary ? FocusHandler : component;
        // don't pass any props to 'div'
        var wrapperProps = primary ? _extends({ uri: uri, location: location, component: component }, domProps) : domProps;
  
        return React__default.createElement(
          BaseContext.Provider,
          { value: { baseuri: uri, basepath: basepath } },
          React__default.createElement(
            FocusWrapper,
            wrapperProps,
            clone
          )
        );
      } else {
        // Not sure if we want this, would require index routes at every level
        // warning(
        //   false,
        //   `<Router basepath="${basepath}">\n\nNothing matched:\n\t${
        //     location.pathname
        //   }\n\nPaths checked: \n\t${routes
        //     .map(route => route.path)
        //     .join(
        //       "\n\t"
        //     )}\n\nTo get rid of this warning, add a default NotFound component as child of Router:
        //   \n\tlet NotFound = () => <div>Not Found!</div>
        //   \n\t<Router>\n\t  <NotFound default/>\n\t  {/* ... */}\n\t</Router>`
        // );
        return null;
      }
    };
  
    return RouterImpl;
  }(React__default.PureComponent);
  
  RouterImpl.defaultProps = {
    primary: true
  };
  
  
  var FocusContext = createNamedContext("Focus");
  
  var FocusHandler = function FocusHandler(_ref3) {
    var uri = _ref3.uri,
        location = _ref3.location,
        component = _ref3.component,
        domProps = objectWithoutProperties(_ref3, ["uri", "location", "component"]);
    return React__default.createElement(
      FocusContext.Consumer,
      null,
      function (requestFocus) {
        return React__default.createElement(FocusHandlerImpl, _extends({}, domProps, {
          component: component,
          requestFocus: requestFocus,
          uri: uri,
          location: location
        }));
      }
    );
  };
  
  // don't focus on initial render
  var initialRender = true;
  var focusHandlerCount = 0;
  
  var FocusHandlerImpl = function (_React$Component2) {
    inherits(FocusHandlerImpl, _React$Component2);
  
    function FocusHandlerImpl() {
      var _temp2, _this4, _ret2;
  
      classCallCheck(this, FocusHandlerImpl);
  
      for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
        args[_key2] = arguments[_key2];
      }
  
      return _ret2 = (_temp2 = (_this4 = possibleConstructorReturn(this, _React$Component2.call.apply(_React$Component2, [this].concat(args))), _this4), _this4.state = {}, _this4.requestFocus = function (node) {
        if (!_this4.state.shouldFocus && node) {
          node.focus();
        }
      }, _temp2), possibleConstructorReturn(_this4, _ret2);
    }
  
    FocusHandlerImpl.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
      var initial = prevState.uri == null;
      if (initial) {
        return _extends({
          shouldFocus: true
        }, nextProps);
      } else {
        var myURIChanged = nextProps.uri !== prevState.uri;
        var navigatedUpToMe = prevState.location.pathname !== nextProps.location.pathname && nextProps.location.pathname === nextProps.uri;
        return _extends({
          shouldFocus: myURIChanged || navigatedUpToMe
        }, nextProps);
      }
    };
  
    FocusHandlerImpl.prototype.componentDidMount = function componentDidMount() {
      focusHandlerCount++;
      this.focus();
    };
  
    FocusHandlerImpl.prototype.componentWillUnmount = function componentWillUnmount() {
      focusHandlerCount--;
      if (focusHandlerCount === 0) {
        initialRender = true;
      }
    };
  
    FocusHandlerImpl.prototype.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {
      if (prevProps.location !== this.props.location && this.state.shouldFocus) {
        this.focus();
      }
    };
  
    FocusHandlerImpl.prototype.focus = function focus() {
  
      var requestFocus = this.props.requestFocus;
  
  
      if (requestFocus) {
        requestFocus(this.node);
      } else {
        if (initialRender) {
          initialRender = false;
        } else if (this.node) {
          // React polyfills [autofocus] and it fires earlier than cDM,
          // so we were stealing focus away, this line prevents that.
          if (!this.node.contains(document.activeElement)) {
            this.node.focus();
          }
        }
      }
    };
  
    FocusHandlerImpl.prototype.render = function render() {
      var _this5 = this;
  
      var _props2 = this.props,
          children = _props2.children,
          style = _props2.style,
          requestFocus = _props2.requestFocus,
          _props2$component = _props2.component,
          Comp = _props2$component === undefined ? "div" : _props2$component,
          uri = _props2.uri,
          location = _props2.location,
          domProps = objectWithoutProperties(_props2, ["children", "style", "requestFocus", "component", "uri", "location"]);
  
  
      return React__default.createElement(
        Comp,
        _extends({
          style: _extends({ outline: "none" }, style),
          tabIndex: "-1",
          ref: function ref(n) {
            return _this5.node = n;
          }
        }, domProps),
        React__default.createElement(
          FocusContext.Provider,
          { value: this.requestFocus },
          this.props.children
        )
      );
    };
  
    return FocusHandlerImpl;
  }(React__default.Component);
  
  polyfill(FocusHandlerImpl);
  
  var k = function k() {};
  
  ////////////////////////////////////////////////////////////////////////////////
  var forwardRef = React__default.forwardRef;
  
  if (typeof forwardRef === "undefined") {
    forwardRef = function forwardRef(C) {
      return C;
    };
  }
  
  var Link = forwardRef(function (_ref4, ref) {
    var innerRef = _ref4.innerRef,
        props = objectWithoutProperties(_ref4, ["innerRef"]);
    return React__default.createElement(
      BaseContext.Consumer,
      null,
      function (_ref5) {
        var basepath = _ref5.basepath,
            baseuri = _ref5.baseuri;
        return React__default.createElement(
          Location,
          null,
          function (_ref6) {
            var location = _ref6.location,
                navigate$$1 = _ref6.navigate;
            var to = props.to,
                state = props.state,
                replace = props.replace,
                _props$getProps = props.getProps,
                getProps = _props$getProps === undefined ? k : _props$getProps,
                anchorProps = objectWithoutProperties(props, ["to", "state", "replace", "getProps"]);
  
            var href = resolve(to, baseuri);
            var encodedHref = encodeURI(href);
            var isCurrent = location.pathname === encodedHref;
            var isPartiallyCurrent = startsWith(location.pathname, encodedHref);
  
            return React__default.createElement("a", _extends({
              ref: ref || innerRef,
              "aria-current": isCurrent ? "page" : undefined
            }, anchorProps, getProps({ isCurrent: isCurrent, isPartiallyCurrent: isPartiallyCurrent, href: href, location: location }), {
              href: href,
              onClick: function onClick(event) {
                if (anchorProps.onClick) anchorProps.onClick(event);
                if (shouldNavigate(event)) {
                  event.preventDefault();
                  var shouldReplace = replace;
                  if (typeof replace !== "boolean" && isCurrent) {
                    var _location$state = _extends({}, location.state),
                        key = _location$state.key,
                        restState = objectWithoutProperties(_location$state, ["key"]);
  
                    shouldReplace = shallowCompare(_extends({}, state), restState);
                  }
                  navigate$$1(href, {
                    state: state,
                    replace: shouldReplace
                  });
                }
              }
            }));
          }
        );
      }
    );
  });
  
  Link.displayName = "Link";
  
  Link.propTypes = {
    to: propTypes.string.isRequired
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  function RedirectRequest(uri) {
    this.uri = uri;
  }
  
  var isRedirect = function isRedirect(o) {
    return o instanceof RedirectRequest;
  };
  
  var redirectTo = function redirectTo(to) {
    throw new RedirectRequest(to);
  };
  
  var RedirectImpl = function (_React$Component3) {
    inherits(RedirectImpl, _React$Component3);
  
    function RedirectImpl() {
      classCallCheck(this, RedirectImpl);
      return possibleConstructorReturn(this, _React$Component3.apply(this, arguments));
    }
  
    // Support React < 16 with this hook
    RedirectImpl.prototype.componentDidMount = function componentDidMount() {
      var _props3 = this.props,
          navigate$$1 = _props3.navigate,
          to = _props3.to,
          from = _props3.from,
          _props3$replace = _props3.replace,
          replace = _props3$replace === undefined ? true : _props3$replace,
          state = _props3.state,
          noThrow = _props3.noThrow,
          baseuri = _props3.baseuri,
          props = objectWithoutProperties(_props3, ["navigate", "to", "from", "replace", "state", "noThrow", "baseuri"]);
  
      Promise.resolve().then(function () {
        var resolvedTo = resolve(to, baseuri);
        navigate$$1(insertParams(resolvedTo, props), { replace: replace, state: state });
      });
    };
  
    RedirectImpl.prototype.render = function render() {
      var _props4 = this.props,
          navigate$$1 = _props4.navigate,
          to = _props4.to,
          from = _props4.from,
          replace = _props4.replace,
          state = _props4.state,
          noThrow = _props4.noThrow,
          baseuri = _props4.baseuri,
          props = objectWithoutProperties(_props4, ["navigate", "to", "from", "replace", "state", "noThrow", "baseuri"]);
  
      var resolvedTo = resolve(to, baseuri);
      if (!noThrow) redirectTo(insertParams(resolvedTo, props));
      return null;
    };
  
    return RedirectImpl;
  }(React__default.Component);
  
  var Redirect = function Redirect(props) {
    return React__default.createElement(
      BaseContext.Consumer,
      null,
      function (_ref7) {
        var baseuri = _ref7.baseuri;
        return React__default.createElement(
          Location,
          null,
          function (locationContext) {
            return React__default.createElement(RedirectImpl, _extends({}, locationContext, { baseuri: baseuri }, props));
          }
        );
      }
    );
  };
  
  Redirect.propTypes = {
    from: propTypes.string,
    to: propTypes.string.isRequired
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  var Match = function Match(_ref8) {
    var path = _ref8.path,
        children = _ref8.children;
    return React__default.createElement(
      BaseContext.Consumer,
      null,
      function (_ref9) {
        var baseuri = _ref9.baseuri;
        return React__default.createElement(
          Location,
          null,
          function (_ref10) {
            var navigate$$1 = _ref10.navigate,
                location = _ref10.location;
  
            var resolvedPath = resolve(path, baseuri);
            var result = match(resolvedPath, location.pathname);
            return children({
              navigate: navigate$$1,
              location: location,
              match: result ? _extends({}, result.params, {
                uri: result.uri,
                path: path
              }) : null
            });
          }
        );
      }
    );
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // Hooks
  
  var useLocation = function useLocation() {
    var context = React.useContext(LocationContext);
  
    if (!context) {
      throw new Error("useLocation hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
    }
  
    return context.location;
  };
  
  var useNavigate = function useNavigate() {
    var context = React.useContext(LocationContext);
  
    if (!context) {
      throw new Error("useNavigate hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
    }
  
    return context.navigate;
  };
  
  var useParams = function useParams() {
    var context = React.useContext(BaseContext);
  
    if (!context) {
      throw new Error("useParams hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
    }
  
    var location = useLocation();
  
    var results = match(context.basepath, location.pathname);
  
    return results ? results.params : null;
  };
  
  var useMatch = function useMatch(path) {
    if (!path) {
      throw new Error("useMatch(path: string) requires an argument of a string to match against");
    }
    var context = React.useContext(BaseContext);
  
    if (!context) {
      throw new Error("useMatch hook was used but a LocationContext.Provider was not found in the parent tree. Make sure this is used in a component that is a child of Router");
    }
  
    var location = useLocation();
  
    var resolvedPath = resolve(path, context.baseuri);
    var result = match(resolvedPath, location.pathname);
    return result ? _extends({}, result.params, {
      uri: result.uri,
      path: path
    }) : null;
  };
  
  ////////////////////////////////////////////////////////////////////////////////
  // Junk
  var stripSlashes = function stripSlashes(str) {
    return str.replace(/(^\/+|\/+$)/g, "");
  };
  
  var createRoute = function createRoute(basepath) {
    return function (element) {
      if (!element) {
        return null;
      }
  
      if (element.type === React__default.Fragment && element.props.children) {
        return React__default.Children.map(element.props.children, createRoute(basepath));
      }
      !(element.props.path || element.props.default || element.type === Redirect) ? invariant_1(false, "<Router>: Children of <Router> must have a `path` or `default` prop, or be a `<Redirect>`. None found on element type `" + element.type + "`") : void 0;
  
      !!(element.type === Redirect && (!element.props.from || !element.props.to)) ? invariant_1(false, "<Redirect from=\"" + element.props.from + "\" to=\"" + element.props.to + "\"/> requires both \"from\" and \"to\" props when inside a <Router>.") : void 0;
  
      !!(element.type === Redirect && !validateRedirect(element.props.from, element.props.to)) ? invariant_1(false, "<Redirect from=\"" + element.props.from + " to=\"" + element.props.to + "\"/> has mismatched dynamic segments, ensure both paths have the exact same dynamic segments.") : void 0;
  
      if (element.props.default) {
        return { value: element, default: true };
      }
  
      var elementPath = element.type === Redirect ? element.props.from : element.props.path;
  
      var path = elementPath === "/" ? basepath : stripSlashes(basepath) + "/" + stripSlashes(elementPath);
  
      return {
        value: element,
        default: element.props.default,
        path: element.props.children ? stripSlashes(path) + "/*" : path
      };
    };
  };
  
  var shouldNavigate = function shouldNavigate(event) {
    return !event.defaultPrevented && event.button === 0 && !(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
  };
  
  exports.Link = Link;
  exports.Location = Location;
  exports.LocationProvider = LocationProvider;
  exports.Match = Match;
  exports.Redirect = Redirect;
  exports.Router = Router;
  exports.ServerLocation = ServerLocation;
  exports.createHistory = createHistory;
  exports.createMemorySource = createMemorySource;
  exports.isRedirect = isRedirect;
  exports.navigate = navigate;
  exports.redirectTo = redirectTo;
  exports.globalHistory = globalHistory;
  exports.matchPath = match;
  exports.useLocation = useLocation;
  exports.useNavigate = useNavigate;
  exports.useParams = useParams;
  exports.useMatch = useMatch;
  
  Object.defineProperty(exports, '__esModule', { value: true });
  
  })));
  