Socket
Socket
Sign inDemoInstall

react-router-dom

Package Overview
Dependencies
Maintainers
2
Versions
412
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-dom - npm Package Compare versions

Comparing version 4.4.0-alpha.1 to 4.4.0-beta.0

33

BrowserRouter.js

@@ -5,6 +5,2 @@ "use strict";

var _warning = require("warning");
var _warning2 = _interopRequireDefault(_warning);
var _react = require("react");

@@ -20,2 +16,6 @@

var _warning = require("warning");
var _warning2 = _interopRequireDefault(_warning);
var _Router = require("./Router");

@@ -51,6 +51,2 @@

BrowserRouter.prototype.componentWillMount = function componentWillMount() {
(0, _warning2.default)(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.");
};
BrowserRouter.prototype.render = function render() {

@@ -63,9 +59,16 @@ return _react2.default.createElement(_Router2.default, { history: this.history, children: this.props.children });

BrowserRouter.propTypes = {
basename: _propTypes2.default.string,
forceRefresh: _propTypes2.default.bool,
getUserConfirmation: _propTypes2.default.func,
keyLength: _propTypes2.default.number,
children: _propTypes2.default.node
};
if (process.env.NODE_ENV !== "production") {
BrowserRouter.propTypes = {
basename: _propTypes2.default.string,
children: _propTypes2.default.node,
forceRefresh: _propTypes2.default.bool,
getUserConfirmation: _propTypes2.default.func,
keyLength: _propTypes2.default.number
};
BrowserRouter.prototype.componentDidMount = function () {
process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.") : void 0;
};
}
exports.default = BrowserRouter;

@@ -7,6 +7,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import warning from "warning";
import React from "react";
import PropTypes from "prop-types";
import { createBrowserHistory as createHistory } from "history";
import warning from "warning";
import Router from "./Router";

@@ -33,6 +34,2 @@

BrowserRouter.prototype.componentWillMount = function componentWillMount() {
warning(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.");
};
BrowserRouter.prototype.render = function render() {

@@ -45,11 +42,16 @@ return React.createElement(Router, { history: this.history, children: this.props.children });

BrowserRouter.propTypes = {
basename: PropTypes.string,
forceRefresh: PropTypes.bool,
getUserConfirmation: PropTypes.func,
keyLength: PropTypes.number,
children: PropTypes.node
};
if (process.env.NODE_ENV !== "production") {
BrowserRouter.propTypes = {
basename: PropTypes.string,
children: PropTypes.node,
forceRefresh: PropTypes.bool,
getUserConfirmation: PropTypes.func,
keyLength: PropTypes.number
};
BrowserRouter.prototype.componentDidMount = function () {
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<BrowserRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { BrowserRouter as Router }`.") : void 0;
};
}
export default BrowserRouter;

@@ -7,6 +7,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

import warning from "warning";
import React from "react";
import PropTypes from "prop-types";
import { createHashHistory as createHistory } from "history";
import warning from "warning";
import Router from "./Router";

@@ -33,6 +34,2 @@

HashRouter.prototype.componentWillMount = function componentWillMount() {
warning(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.");
};
HashRouter.prototype.render = function render() {

@@ -45,10 +42,15 @@ return React.createElement(Router, { history: this.history, children: this.props.children });

HashRouter.propTypes = {
basename: PropTypes.string,
getUserConfirmation: PropTypes.func,
hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"]),
children: PropTypes.node
};
if (process.env.NODE_ENV !== "production") {
HashRouter.propTypes = {
basename: PropTypes.string,
children: PropTypes.node,
getUserConfirmation: PropTypes.func,
hashType: PropTypes.oneOf(["hashbang", "noslash", "slash"])
};
HashRouter.prototype.componentDidMount = function () {
process.env.NODE_ENV !== "production" ? warning(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.") : void 0;
};
}
export default HashRouter;

@@ -19,4 +19,2 @@ import _BrowserRouter from "./BrowserRouter";

export { _Router as Router };
import _RouterContext from "./RouterContext";
export { _RouterContext as RouterContext };
import _StaticRouter from "./StaticRouter";

@@ -23,0 +21,0 @@ export { _StaticRouter as StaticRouter };

@@ -13,9 +13,10 @@ 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; };

import PropTypes from "prop-types";
import { createLocation } from "history";
import invariant from "invariant";
import { createLocation } from "history";
import RouterContext from "./RouterContext";
var isModifiedEvent = function isModifiedEvent(event) {
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
};
}

@@ -30,36 +31,23 @@ /**

function Link() {
var _temp, _this, _ret;
_classCallCheck(this, Link);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (history) {
return function (event) {
if (_this.props.onClick) _this.props.onClick(event);
Link.prototype.handleClick = function handleClick(event, context) {
if (this.props.onClick) this.props.onClick(event);
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
var method = this.props.replace ? context.history.replace : context.history.push;
method(this.props.to);
}
};
if (replace) {
history.replace(to);
} else {
history.push(to);
}
}
};
}, _temp), _possibleConstructorReturn(_this, _ret);
}
Link.prototype.render = function render() {

@@ -69,24 +57,20 @@ var _this2 = this;

var _props = this.props,
innerRef = _props.innerRef,
replace = _props.replace,
to = _props.to,
innerRef = _props.innerRef,
props = _objectWithoutProperties(_props, ["replace", "to", "innerRef"]); // eslint-disable-line no-unused-vars
props = _objectWithoutProperties(_props, ["innerRef", "replace", "to"]); // eslint-disable-line no-unused-vars
invariant(to !== undefined, 'You must specify the "to" property');
return React.createElement(
RouterContext.Consumer,
null,
function (_ref) {
var router = _ref.router;
function (context) {
!context ? process.env.NODE_ENV !== "production" ? invariant(false, "You should not use <Link> outside a <Router>") : invariant(false) : void 0;
invariant(router, "You should not use <Link> outside a <Router>");
var location = typeof to === "string" ? createLocation(to, null, null, context.location) : to;
var href = location ? context.history.createHref(location) : "";
var history = router.history;
var location = typeof to === "string" ? createLocation(to, null, null, history.location) : to;
var href = history.createHref(location);
return React.createElement("a", _extends({}, props, {
onClick: _this2.handleClick(history),
onClick: function onClick(event) {
return _this2.handleClick(event, context);
},
href: href,

@@ -102,9 +86,2 @@ ref: innerRef

Link.propTypes = {
onClick: PropTypes.func,
target: PropTypes.string,
replace: PropTypes.bool,
to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])
};
Link.defaultProps = {

@@ -115,2 +92,14 @@ replace: false

if (process.env.NODE_ENV !== "production") {
var toType = PropTypes.oneOfType([PropTypes.string, PropTypes.object]);
Link.propTypes = {
innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
onClick: PropTypes.func,
replace: PropTypes.bool,
target: PropTypes.string,
to: toType.isRequired
};
}
export default Link;

@@ -9,20 +9,31 @@ 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; };

import PropTypes from "prop-types";
import Route from "./Route";
import Link from "./Link";
function joinClassnames() {
for (var _len = arguments.length, classnames = Array(_len), _key = 0; _key < _len; _key++) {
classnames[_key] = arguments[_key];
}
return classnames.filter(function (i) {
return i;
}).join(" ");
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
var NavLink = function NavLink(_ref) {
var to = _ref.to,
function NavLink(_ref) {
var ariaCurrent = _ref["aria-current"],
activeClassName = _ref.activeClassName,
activeStyle = _ref.activeStyle,
classNameProp = _ref.className,
exact = _ref.exact,
isActiveProp = _ref.isActive,
location = _ref.location,
strict = _ref.strict,
location = _ref.location,
activeClassName = _ref.activeClassName,
className = _ref.className,
activeStyle = _ref.activeStyle,
style = _ref.style,
getIsActive = _ref.isActive,
ariaCurrent = _ref["aria-current"],
rest = _objectWithoutProperties(_ref, ["to", "exact", "strict", "location", "activeClassName", "className", "activeStyle", "style", "isActive", "aria-current"]);
styleProp = _ref.style,
to = _ref.to,
rest = _objectWithoutProperties(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "strict", "style", "to"]);

@@ -43,34 +54,39 @@ var path = (typeof to === "undefined" ? "undefined" : _typeof(to)) === "object" ? to.pathname : to;

var isActive = !!(getIsActive ? getIsActive(match, location) : match);
var isActive = !!(isActiveProp ? isActiveProp(match, location) : match);
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
var style = isActive ? Object.assign({}, styleProp, activeStyle) : styleProp;
return React.createElement(Link, _extends({
to: to,
className: isActive ? [className, activeClassName].filter(function (i) {
return i;
}).join(" ") : className,
style: isActive ? _extends({}, style, activeStyle) : style,
"aria-current": isActive && ariaCurrent || null
"aria-current": isActive && ariaCurrent || null,
className: className,
style: style,
to: to
}, rest));
}
});
};
}
NavLink.propTypes = {
to: Link.propTypes.to,
exact: PropTypes.bool,
strict: PropTypes.bool,
location: PropTypes.object,
activeClassName: PropTypes.string,
className: PropTypes.string,
activeStyle: PropTypes.object,
style: PropTypes.object,
isActive: PropTypes.func,
"aria-current": PropTypes.oneOf(["page", "step", "location", "date", "time", "true"])
};
NavLink.defaultProps = {
activeClassName: "active",
"aria-current": "page"
"aria-current": "page",
activeClassName: "active"
};
if (process.env.NODE_ENV !== "production") {
var ariaCurrentType = PropTypes.oneOf(["page", "step", "location", "date", "time", "true"]);
NavLink.propTypes = {
"aria-current": ariaCurrentType,
activeClassName: PropTypes.string,
activeStyle: PropTypes.object,
className: PropTypes.string,
exact: Route.propTypes.exact,
isActive: PropTypes.func,
location: PropTypes.object,
strict: Route.propTypes.strict,
style: PropTypes.object,
to: Link.propTypes.to
};
}
export default NavLink;

@@ -5,6 +5,2 @@ "use strict";

var _warning = require("warning");
var _warning2 = _interopRequireDefault(_warning);
var _react = require("react");

@@ -20,2 +16,6 @@

var _warning = require("warning");
var _warning2 = _interopRequireDefault(_warning);
var _Router = require("./Router");

@@ -51,6 +51,2 @@

HashRouter.prototype.componentWillMount = function componentWillMount() {
(0, _warning2.default)(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.");
};
HashRouter.prototype.render = function render() {

@@ -63,8 +59,15 @@ return _react2.default.createElement(_Router2.default, { history: this.history, children: this.props.children });

HashRouter.propTypes = {
basename: _propTypes2.default.string,
getUserConfirmation: _propTypes2.default.func,
hashType: _propTypes2.default.oneOf(["hashbang", "noslash", "slash"]),
children: _propTypes2.default.node
};
if (process.env.NODE_ENV !== "production") {
HashRouter.propTypes = {
basename: _propTypes2.default.string,
children: _propTypes2.default.node,
getUserConfirmation: _propTypes2.default.func,
hashType: _propTypes2.default.oneOf(["hashbang", "noslash", "slash"])
};
HashRouter.prototype.componentDidMount = function () {
process.env.NODE_ENV !== "production" ? (0, _warning2.default)(!this.props.history, "<HashRouter> ignores the history prop. To use a custom history, " + "use `import { Router }` instead of `import { HashRouter as Router }`.") : void 0;
};
}
exports.default = HashRouter;
"use strict";
exports.__esModule = true;
exports.withRouter = exports.matchPath = exports.generatePath = exports.Switch = exports.StaticRouter = exports.RouterContext = exports.Router = exports.Route = exports.Redirect = exports.Prompt = exports.NavLink = exports.MemoryRouter = exports.Link = exports.HashRouter = exports.BrowserRouter = undefined;
exports.withRouter = exports.matchPath = exports.generatePath = exports.Switch = exports.StaticRouter = exports.Router = exports.Route = exports.Redirect = exports.Prompt = exports.NavLink = exports.MemoryRouter = exports.Link = exports.HashRouter = exports.BrowserRouter = undefined;

@@ -42,6 +42,2 @@ var _BrowserRouter2 = require("./BrowserRouter");

var _RouterContext2 = require("./RouterContext");
var _RouterContext3 = _interopRequireDefault(_RouterContext2);
var _StaticRouter2 = require("./StaticRouter");

@@ -78,3 +74,2 @@

exports.Router = _Router3.default;
exports.RouterContext = _RouterContext3.default;
exports.StaticRouter = _StaticRouter3.default;

@@ -81,0 +76,0 @@ exports.Switch = _Switch3.default;

@@ -15,2 +15,4 @@ "use strict";

var _history = require("history");
var _invariant = require("invariant");

@@ -20,4 +22,2 @@

var _history = require("history");
var _RouterContext = require("./RouterContext");

@@ -37,5 +37,5 @@

var isModifiedEvent = function isModifiedEvent(event) {
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
};
}

@@ -50,36 +50,23 @@ /**

function Link() {
var _temp, _this, _ret;
_classCallCheck(this, Link);
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (history) {
return function (event) {
if (_this.props.onClick) _this.props.onClick(event);
Link.prototype.handleClick = function handleClick(event, context) {
if (this.props.onClick) this.props.onClick(event);
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!_this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && // ignore everything but left clicks
!this.props.target && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
var _this$props = _this.props,
replace = _this$props.replace,
to = _this$props.to;
var method = this.props.replace ? context.history.replace : context.history.push;
method(this.props.to);
}
};
if (replace) {
history.replace(to);
} else {
history.push(to);
}
}
};
}, _temp), _possibleConstructorReturn(_this, _ret);
}
Link.prototype.render = function render() {

@@ -89,24 +76,20 @@ var _this2 = this;

var _props = this.props,
innerRef = _props.innerRef,
replace = _props.replace,
to = _props.to,
innerRef = _props.innerRef,
props = _objectWithoutProperties(_props, ["replace", "to", "innerRef"]); // eslint-disable-line no-unused-vars
props = _objectWithoutProperties(_props, ["innerRef", "replace", "to"]); // eslint-disable-line no-unused-vars
(0, _invariant2.default)(to !== undefined, 'You must specify the "to" property');
return _react2.default.createElement(
_RouterContext2.default.Consumer,
null,
function (_ref) {
var router = _ref.router;
function (context) {
!context ? process.env.NODE_ENV !== "production" ? (0, _invariant2.default)(false, "You should not use <Link> outside a <Router>") : (0, _invariant2.default)(false) : void 0;
(0, _invariant2.default)(router, "You should not use <Link> outside a <Router>");
var location = typeof to === "string" ? (0, _history.createLocation)(to, null, null, context.location) : to;
var href = location ? context.history.createHref(location) : "";
var history = router.history;
var location = typeof to === "string" ? (0, _history.createLocation)(to, null, null, history.location) : to;
var href = history.createHref(location);
return _react2.default.createElement("a", _extends({}, props, {
onClick: _this2.handleClick(history),
onClick: function onClick(event) {
return _this2.handleClick(event, context);
},
href: href,

@@ -122,12 +105,19 @@ ref: innerRef

Link.propTypes = {
onClick: _propTypes2.default.func,
target: _propTypes2.default.string,
replace: _propTypes2.default.bool,
to: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]).isRequired,
innerRef: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func])
};
Link.defaultProps = {
replace: false
};
if (process.env.NODE_ENV !== "production") {
var toType = _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.object]);
Link.propTypes = {
innerRef: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),
onClick: _propTypes2.default.func,
replace: _propTypes2.default.bool,
target: _propTypes2.default.string,
to: toType.isRequired
};
}
exports.default = Link;

@@ -29,17 +29,27 @@ "use strict";

function joinClassnames() {
for (var _len = arguments.length, classnames = Array(_len), _key = 0; _key < _len; _key++) {
classnames[_key] = arguments[_key];
}
return classnames.filter(function (i) {
return i;
}).join(" ");
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
var NavLink = function NavLink(_ref) {
var to = _ref.to,
function NavLink(_ref) {
var ariaCurrent = _ref["aria-current"],
activeClassName = _ref.activeClassName,
activeStyle = _ref.activeStyle,
classNameProp = _ref.className,
exact = _ref.exact,
isActiveProp = _ref.isActive,
location = _ref.location,
strict = _ref.strict,
location = _ref.location,
activeClassName = _ref.activeClassName,
className = _ref.className,
activeStyle = _ref.activeStyle,
style = _ref.style,
getIsActive = _ref.isActive,
ariaCurrent = _ref["aria-current"],
rest = _objectWithoutProperties(_ref, ["to", "exact", "strict", "location", "activeClassName", "className", "activeStyle", "style", "isActive", "aria-current"]);
styleProp = _ref.style,
to = _ref.to,
rest = _objectWithoutProperties(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "strict", "style", "to"]);

@@ -60,34 +70,39 @@ var path = (typeof to === "undefined" ? "undefined" : _typeof(to)) === "object" ? to.pathname : to;

var isActive = !!(getIsActive ? getIsActive(match, location) : match);
var isActive = !!(isActiveProp ? isActiveProp(match, location) : match);
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
var style = isActive ? Object.assign({}, styleProp, activeStyle) : styleProp;
return _react2.default.createElement(_Link2.default, _extends({
to: to,
className: isActive ? [className, activeClassName].filter(function (i) {
return i;
}).join(" ") : className,
style: isActive ? _extends({}, style, activeStyle) : style,
"aria-current": isActive && ariaCurrent || null
"aria-current": isActive && ariaCurrent || null,
className: className,
style: style,
to: to
}, rest));
}
});
};
}
NavLink.propTypes = {
to: _Link2.default.propTypes.to,
exact: _propTypes2.default.bool,
strict: _propTypes2.default.bool,
location: _propTypes2.default.object,
activeClassName: _propTypes2.default.string,
className: _propTypes2.default.string,
activeStyle: _propTypes2.default.object,
style: _propTypes2.default.object,
isActive: _propTypes2.default.func,
"aria-current": _propTypes2.default.oneOf(["page", "step", "location", "date", "time", "true"])
};
NavLink.defaultProps = {
activeClassName: "active",
"aria-current": "page"
"aria-current": "page",
activeClassName: "active"
};
if (process.env.NODE_ENV !== "production") {
var ariaCurrentType = _propTypes2.default.oneOf(["page", "step", "location", "date", "time", "true"]);
NavLink.propTypes = {
"aria-current": ariaCurrentType,
activeClassName: _propTypes2.default.string,
activeStyle: _propTypes2.default.object,
className: _propTypes2.default.string,
exact: _Route2.default.propTypes.exact,
isActive: _propTypes2.default.func,
location: _propTypes2.default.object,
strict: _Route2.default.propTypes.strict,
style: _propTypes2.default.object,
to: _Link2.default.propTypes.to
};
}
exports.default = NavLink;
{
"name": "react-router-dom",
"version": "4.4.0-alpha.1",
"version": "4.4.0-beta.0",
"description": "DOM bindings for React Router",

@@ -35,5 +35,5 @@ "repository": "ReactTraining/react-router",

"scripts": {
"build": "node ./tools/build.js",
"build": "node ./scripts/build.js",
"watch": "babel ./modules -d . --ignore __tests__ --watch",
"prepublishOnly": "node ./tools/build.js",
"prepublishOnly": "node ./scripts/build.js",
"clean": "git clean -fdX .",

@@ -51,3 +51,4 @@ "lint": "eslint modules",

"prop-types": "^15.6.1",
"react-router": "^4.4.0-alpha.1"
"react-router": "^4.3.1",
"warning": "^4.0.1"
},

@@ -61,3 +62,2 @@ "devDependencies": {

"babel-plugin-transform-imports": "^1.5.0",
"babel-plugin-transform-react-remove-prop-types": "^0.4.13",
"babel-preset-es2015": "^6.14.0",

@@ -81,4 +81,3 @@ "babel-preset-react": "^6.5.0",

"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^3.0.0",
"warning": "^4.0.1"
"rollup-plugin-uglify": "^3.0.0"
},

@@ -91,5 +90,9 @@ "browserify": {

"jest": {
"globals": {
"__DEV__": true
},
"setupFiles": [
"raf/polyfill"
]
],
"testURL": "http://localhost/"
},

@@ -96,0 +99,0 @@ "keywords": [

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouterDOM={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n=function(){},o="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function i(t,e){return t(e={exports:{}},e.exports),e.exports}function a(t){return function(){return t}}var c=function(){};c.thatReturns=a,c.thatReturnsFalse=a(!1),c.thatReturnsTrue=a(!0),c.thatReturnsNull=a(null),c.thatReturnsThis=function(){return this},c.thatReturnsArgument=function(t){return t};var u=c,s=function(t){};var p=function(t,e,n,o,r,i,a,c){if(s(e),!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,o,r,i,a,c],l=0;(u=new Error(e.replace(/%s/g,function(){return p[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}},l=u,f=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}})()&&Object.assign;var y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",v=i(function(t){t.exports=function(){function t(t,e,n,o,r,i){i!==y&&p(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=u,n.PropTypes=n,n}()}),m=function(t,e,n,o,r,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,o,r,i,a,c],p=0;(u=new Error(e.replace(/%s/g,function(){return s[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}};function b(t){return"/"===t.charAt(0)}function g(t,e){for(var n=e,o=n+1,r=t.length;o<r;n+=1,o+=1)t[n]=t[o];t.pop()}var w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var O=function(t){return"/"===t.charAt(0)?t:"/"+t},x=function(t){return"/"===t.charAt(0)?t.substr(1):t},P=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},j=function(t,e){return P(t,e)?t.substr(e.length):t},R=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},E=function(t){var e=t.pathname,n=t.search,o=t.hash,r=e||"/";return n&&"?"!==n&&(r+="?"===n.charAt(0)?n:"?"+n),o&&"#"!==o&&(r+="#"===o.charAt(0)?o:"#"+o),r},C=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},T=function(t,e,n,o){var r=void 0;"string"==typeof t?(r=function(t){var e=t||"/",n="",o="",r=e.indexOf("#");-1!==r&&(o=e.substr(r),e=e.substr(0,r));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===o?"":o}}(t)).state=e:(void 0===(r=C({},t)).pathname&&(r.pathname=""),r.search?"?"!==r.search.charAt(0)&&(r.search="?"+r.search):r.search="",r.hash?"#"!==r.hash.charAt(0)&&(r.hash="#"+r.hash):r.hash="",void 0!==e&&void 0===r.state&&(r.state=e));try{r.pathname=decodeURI(r.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+r.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(r.key=n),o?r.pathname?"/"!==r.pathname.charAt(0)&&(r.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],o=e&&e.split("/")||[],r=t&&b(t),i=e&&b(e),a=r||i;if(t&&b(t)?o=n:n.length&&(o.pop(),o=o.concat(n)),!o.length)return"/";var c=void 0;if(o.length){var u=o[o.length-1];c="."===u||".."===u||""===u}else c=!1;for(var s=0,p=o.length;p>=0;p--){var l=o[p];"."===l?g(o,p):".."===l?(g(o,p),s++):s&&(g(o,p),s--)}if(!a)for(;s--;s)o.unshift("..");!a||""===o[0]||o[0]&&b(o[0])||o.unshift("");var f=o.join("/");return c&&"/"!==f.substr(-1)&&(f+="/"),f}(r.pathname,o.pathname)):r.pathname=o.pathname:r.pathname||(r.pathname="/"),r},S=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,o){return t(e,n[o])});var o=void 0===e?"undefined":w(e);if(o!==(void 0===n?"undefined":w(n)))return!1;if("object"===o){var r=e.valueOf(),i=n.valueOf();if(r!==e||i!==n)return t(r,i);var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(o){return t(e[o],n[o])})}return!1}(t.state,e.state)},k=function(){var t=null,e=[];return{setPrompt:function(e){return n(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,o,r,i){if(null!=t){var a="function"==typeof t?t(e,o):t;"string"==typeof a?"function"==typeof r?r(a,i):(n(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),i(!0)):i(!1!==a)}else i(!0)},appendListener:function(t){var n=!0,o=function(){n&&t.apply(void 0,arguments)};return e.push(o),function(){n=!1,e=e.filter(function(t){return t!==o})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),o=0;o<t;o++)n[o]=arguments[o];e.forEach(function(t){return t.apply(void 0,n)})}}},_=!("undefined"==typeof window||!window.document||!window.document.createElement),A=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},M=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},L=function(t,e){return e(window.confirm(t))},U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},H=function(){try{return window.history.state||{}}catch(t){return{}}},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(_,"Browser history needs a DOM");var e,o=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=t.forceRefresh,c=void 0!==a&&a,u=t.getUserConfirmation,s=void 0===u?L:u,p=t.keyLength,l=void 0===p?6:p,f=t.basename?R(O(t.basename)):"",h=function(t){var e=t||{},o=e.key,r=e.state,i=window.location,a=i.pathname+i.search+i.hash;return n(!f||P(a,f),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+a+'" to begin with "'+f+'".'),f&&(a=j(a,f)),T(a,r,o)},d=function(){return Math.random().toString(36).substr(2,l)},y=k(),v=function(t){q($,t),$.length=o.length,y.notifyListeners($.location,$.action)},b=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(h(t.state))},g=function(){x(h(H()))},w=!1,x=function(t){if(w)w=!1,v();else{y.confirmTransitionTo(t,"POP",s,function(e){e?v({action:"POP",location:t}):C(t)})}},C=function(t){var e=$.location,n=W.indexOf(e.key);-1===n&&(n=0);var o=W.indexOf(t.key);-1===o&&(o=0);var r=n-o;r&&(w=!0,B(r))},S=h(H()),W=[S.key],Y=function(t){return f+E(t)},B=function(t){o.go(t)},I=0,N=function(t){1===(I+=t)?(A(window,"popstate",b),i&&A(window,"hashchange",g)):0===I&&(M(window,"popstate",b),i&&M(window,"hashchange",g))},D=!1,$={length:o.length,action:"POP",location:S,createHref:Y,push:function(t,e){n(!("object"===(void 0===t?"undefined":U(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var i=T(t,e,d(),$.location);y.confirmTransitionTo(i,"PUSH",s,function(t){if(t){var e=Y(i),a=i.key,u=i.state;if(r)if(o.pushState({key:a,state:u},null,e),c)window.location.href=e;else{var s=W.indexOf($.location.key),p=W.slice(0,-1===s?0:s+1);p.push(i.key),W=p,v({action:"PUSH",location:i})}else n(void 0===u,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){n(!("object"===(void 0===t?"undefined":U(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var i=T(t,e,d(),$.location);y.confirmTransitionTo(i,"REPLACE",s,function(t){if(t){var e=Y(i),a=i.key,u=i.state;if(r)if(o.replaceState({key:a,state:u},null,e),c)window.location.replace(e);else{var s=W.indexOf($.location.key);-1!==s&&(W[s]=i.key),v({action:"REPLACE",location:i})}else n(void 0===u,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:B,goBack:function(){return B(-1)},goForward:function(){return B(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=y.setPrompt(t);return D||(N(1),D=!0),function(){return D&&(D=!1,N(-1)),e()}},listen:function(t){var e=y.appendListener(t);return N(1),function(){N(-1),e()}}};return $},Y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},B={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+x(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:x,decodePath:O},slash:{encodePath:O,decodePath:O}},I=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},N=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},D=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(_,"Hash history needs a DOM");var e=window.history,o=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,i=void 0===r?L:r,a=t.hashType,c=void 0===a?"slash":a,u=t.basename?R(O(t.basename)):"",s=B[c],p=s.encodePath,l=s.decodePath,f=function(){var t=l(I());return n(!u||P(t,u),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+u+'".'),u&&(t=j(t,u)),T(t)},h=k(),d=function(t){Y(F,t),F.length=e.length,h.notifyListeners(F.location,F.action)},y=!1,v=null,b=function(){var t=I(),e=p(t);if(t!==e)N(e);else{var n=f(),o=F.location;if(!y&&S(o,n))return;if(v===E(n))return;v=null,g(n)}},g=function(t){if(y)y=!1,d();else{h.confirmTransitionTo(t,"POP",i,function(e){e?d({action:"POP",location:t}):w(t)})}},w=function(t){var e=F.location,n=q.lastIndexOf(E(e));-1===n&&(n=0);var o=q.lastIndexOf(E(t));-1===o&&(o=0);var r=n-o;r&&(y=!0,H(r))},x=I(),C=p(x);x!==C&&N(C);var U=f(),q=[E(U)],H=function(t){n(o,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},W=0,D=function(t){1===(W+=t)?A(window,"hashchange",b):0===W&&M(window,"hashchange",b)},$=!1,F={length:e.length,action:"POP",location:U,createHref:function(t){return"#"+p(u+E(t))},push:function(t,e){n(void 0===e,"Hash history cannot push state; it is ignored");var o=T(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"PUSH",i,function(t){if(t){var e=E(o),r=p(u+e);if(I()!==r){v=e,function(t){window.location.hash=t}(r);var i=q.lastIndexOf(E(F.location)),a=q.slice(0,-1===i?0:i+1);a.push(e),q=a,d({action:"PUSH",location:o})}else n(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),d()}})},replace:function(t,e){n(void 0===e,"Hash history cannot replace state; it is ignored");var o=T(t,void 0,void 0,F.location);h.confirmTransitionTo(o,"REPLACE",i,function(t){if(t){var e=E(o),n=p(u+e);I()!==n&&(v=e,N(n));var r=q.indexOf(E(F.location));-1!==r&&(q[r]=e),d({action:"REPLACE",location:o})}})},go:H,goBack:function(){return H(-1)},goForward:function(){return H(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=h.setPrompt(t);return $||(D(1),$=!0),function(){return $&&($=!1,D(-1)),e()}},listen:function(t){var e=h.appendListener(t);return D(1),function(){D(-1),e()}}};return F},$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},V=function(t,e,n){return Math.min(Math.max(t,e),n)},K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,o=t.initialEntries,r=void 0===o?["/"]:o,i=t.initialIndex,a=void 0===i?0:i,c=t.keyLength,u=void 0===c?6:c,s=k(),p=function(t){F(v,t),v.length=v.entries.length,s.notifyListeners(v.location,v.action)},l=function(){return Math.random().toString(36).substr(2,u)},f=V(a,0,r.length-1),h=r.map(function(t){return T(t,void 0,"string"==typeof t?l():t.key||l())}),d=E,y=function(t){var n=V(v.index+t,0,v.entries.length-1),o=v.entries[n];s.confirmTransitionTo(o,"POP",e,function(t){t?p({action:"POP",location:o,index:n}):p()})},v={length:h.length,action:"POP",location:h[f],index:f,entries:h,createHref:d,push:function(t,o){n(!("object"===(void 0===t?"undefined":$(t))&&void 0!==t.state&&void 0!==o),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=T(t,o,l(),v.location);s.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),p({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,o){n(!("object"===(void 0===t?"undefined":$(t))&&void 0!==t.state&&void 0!==o),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=T(t,o,l(),v.location);s.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(v.entries[v.index]=r,p({action:"REPLACE",location:r}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return s.setPrompt(t)},listen:function(t){return s.appendListener(t)}};return v},J="__global_unique_id__",G=function(){return o[J]=(o[J]||0)+1},z=i(function(t,n){n.__esModule=!0;i(e);var o=i(v),r=i(G);i(l);function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=1073741823;n.default=function(t,n){var i,p,l="__create-react-context-"+(0,r.default)()+"__",f=function(t){function e(){var n,o,r,i;a(this,e);for(var u=arguments.length,s=Array(u),p=0;p<u;p++)s[p]=arguments[p];return n=o=c(this,t.call.apply(t,[this].concat(s))),o.emitter=(r=o.props.value,i=[],{on:function(t){i.push(t)},off:function(t){i=i.filter(function(e){return e!==t})},get:function(){return r},set:function(t,e){r=t,i.forEach(function(t){return t(r,e)})}}),c(o,n)}return u(e,t),e.prototype.getChildContext=function(){var t;return(t={})[l]=this.emitter,t},e.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e=this.props.value,o=t.value,r=void 0;((i=e)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?r=0:(r="function"==typeof n?n(e,o):s,0!=(r|=0)&&this.emitter.set(t.value,r))}var i,a},e.prototype.render=function(){return this.props.children},e}(e.Component);f.childContextTypes=((i={})[l]=o.default.object.isRequired,i);var h=function(e){function n(){var t,o;a(this,n);for(var r=arguments.length,i=Array(r),u=0;u<r;u++)i[u]=arguments[u];return t=o=c(this,e.call.apply(e,[this].concat(i))),o.state={value:o.getValue()},o.onUpdate=function(t,e){0!=((0|o.observedBits)&e)&&o.setState({value:o.getValue()})},c(o,t)}return u(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?s:e},n.prototype.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?s:t},n.prototype.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[l]?this.context[l].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return h.contextTypes=((p={})[l]=o.default.object,p),{Provider:f,Consumer:h}},t.exports=n.default});r(z);var Q=r(i(function(t,n){n.__esModule=!0;var o=i(e),r=i(z);function i(t){return t&&t.__esModule?t:{default:t}}n.default=o.default.createContext||r.default,t.exports=n.default}))({}),X=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Z(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var tt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Z(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props.history.location.pathname)},Z(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:X({},this.props.router,{history:this.props.history,route:{location:this.props.history.location,match:this.state.match}})}},o.prototype.computeMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},o.prototype.componentWillMount=function(){var t=this,n=this.props,o=n.children,r=n.history;m(null==o||1===e.Children.count(o),"A <Router> may have only one child element"),this.unlisten=r.listen(function(){t.setState({match:t.computeMatch(r.location.pathname)})})},o.prototype.componentWillReceiveProps=function(t){n(this.props.history===t.history,"You cannot change <Router history>")},o.prototype.componentWillUnmount=function(){this.unlisten()},o.prototype.render=function(){var t=this.props.children;return e.createElement(Q.Provider,{value:this.getChildContext()},t?e.Children.only(t):null)},o}(e.Component);tt.propTypes={history:v.object.isRequired,children:v.node,router:v.object},tt.childContextTypes={router:v.object.isRequired};var et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ot=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},rt=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},it=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n},at=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ct=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.history=W(o.props),at(o,e)}return rt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},n}(e.Component),ut=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.history=D(o.props),at(o,e)}return rt(n,t),n.prototype.componentWillMount=function(){},n.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},n}(e.Component),st=function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)},pt=function(t){function n(){var e,o;nt(this,n);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=o=at(this,t.call.apply(t,[this].concat(i))),o.handleClick=function(t){return function(e){if(o.props.onClick&&o.props.onClick(e),!e.defaultPrevented&&0===e.button&&!o.props.target&&!st(e)){e.preventDefault();var n=o.props,r=n.replace,i=n.to;r?t.replace(i):t.push(i)}}},at(o,e)}return rt(n,t),n.prototype.render=function(){var t=this,n=this.props,o=(n.replace,n.to),r=n.innerRef,i=it(n,["replace","to","innerRef"]);return void 0===o&&m(!1),e.createElement(Q.Consumer,null,function(n){var a=n.router;a||m(!1);var c=a.history,u="string"==typeof o?T(o,null,null,c.location):o,s=c.createHref(u);return e.createElement("a",ot({},i,{onClick:t.handleClick(c),href:s,ref:r}))})},n}(e.Component);function lt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}pt.defaultProps={replace:!1};var ft=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=lt(this,t.call.apply(t,[this].concat(i))),n.history=K(n.props),lt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){n(!this.props.history,"<MemoryRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { MemoryRouter as Router }`.")},o.prototype.render=function(){return e.createElement(tt,{history:this.history,children:this.props.children})},o}(e.Component);ft.propTypes={initialEntries:v.array,initialIndex:v.number,getUserConfirmation:v.func,keyLength:v.number,children:v.node};var ht={}.toString,dt=Array.isArray||function(t){return"[object Array]"==ht.call(t)},yt=St,vt=Ot,mt=function(t,e){return Pt(Ot(t,e))},bt=Pt,gt=Tt,wt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function Ot(t,e){for(var n,o=[],r=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=wt.exec(t));){var u=n[0],s=n[1],p=n.index;if(a+=t.slice(i,p),i=p+u.length,s)a+=s[1];else{var l=t[i],f=n[2],h=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(o.push(a),a="");var b=null!=f&&null!=l&&l!==f,g="+"===v||"*"===v,w="?"===v||"*"===v,O=n[2]||c,x=d||y;o.push({name:h||r++,prefix:f||"",delimiter:O,optional:w,repeat:g,partial:b,asterisk:!!m,pattern:x?Rt(x):m?".*":"[^"+jt(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&o.push(a),o}function xt(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function Pt(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,o){for(var r="",i=n||{},a=(o||{}).pretty?xt:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var s,p=i[u.name];if(null==p){if(u.optional){u.partial&&(r+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(dt(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var l=0;l<p.length;l++){if(s=a(p[l]),!e[c].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");r+=(0===l?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(p).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(p),!e[c].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');r+=u.prefix+s}}else r+=u}return r}}function jt(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function Rt(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function Et(t,e){return t.keys=e,t}function Ct(t){return t.sensitive?"":"i"}function Tt(t,e,n){dt(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,r=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=jt(c);else{var u=jt(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var p=jt(n.delimiter||"/"),l=i.slice(-p.length)===p;return o||(i=(l?i.slice(0,-p.length):i)+"(?:"+p+"(?=$))?"),i+=r?"$":o&&l?"":"(?="+p+"|$)",Et(new RegExp("^"+i,Ct(n)),e)}function St(t,e,n){return dt(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var o=0;o<n.length;o++)e.push({name:o,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return Et(t,e)}(t,e):dt(t)?function(t,e,n){for(var o=[],r=0;r<t.length;r++)o.push(St(t[r],e,n).source);return Et(new RegExp("(?:"+o.join("|")+")",Ct(n)),e)}(t,e,n):function(t,e,n){return Tt(Ot(t,n),e,n)}(t,e,n)}yt.parse=vt,yt.compile=mt,yt.tokensToFunction=bt,yt.tokensToRegExp=gt;var kt={},_t=0,At=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];"string"==typeof e&&(e={path:e});var o=e,r=o.path,i=o.exact,a=void 0!==i&&i,c=o.strict,u=void 0!==c&&c,s=o.sensitive,p=void 0!==s&&s;if(null==r)return n;var l=function(t,e){var n=""+e.end+e.strict+e.sensitive,o=kt[n]||(kt[n]={});if(o[t])return o[t];var r=[],i={re:yt(t,r,e),keys:r};return _t<1e4&&(o[t]=i,_t++),i}(r,{end:a,strict:u,sensitive:p}),f=l.re,h=l.keys,d=f.exec(t);if(!d)return null;var y=d[0],v=d.slice(1),m=t===y;return a&&!m?null:{path:r,url:"/"===r&&""===y?"/":y,isExact:m,params:h.reduce(function(t,e,n){return t[e.name]=v[n],t},{})}},Mt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Lt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Ut=function(t){return 0===e.Children.count(t)},qt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Lt(this,t.call.apply(t,[this].concat(i))),n.state={match:n.computeMatch(n.props)},Lt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:Mt({},this.props.router,{route:{location:this.props.location||this.props.router.route.location,match:this.state.match}})}},o.prototype.computeMatch=function(t){var e=t.computedMatch,n=t.router,o=t.location,r=t.path,i=t.strict,a=t.exact,c=t.sensitive;if(e)return e;m(n,"You should not use <Route> or withRouter() outside a <Router>");var u=n.route,s=(o||u.location).pathname;return At(s,{path:r,strict:i,exact:a,sensitive:c},u.match)},o.prototype.componentWillMount=function(){n(!(this.props.component&&this.props.render),"You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored"),n(!(this.props.component&&this.props.children&&!Ut(this.props.children)),"You should not use <Route component> and <Route children> in the same route; <Route children> will be ignored"),n(!(this.props.render&&this.props.children&&!Ut(this.props.children)),"You should not use <Route render> and <Route children> in the same route; <Route children> will be ignored")},o.prototype.componentWillReceiveProps=function(t){n(!(t.location&&!this.props.location),'<Route> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),n(!(!t.location&&this.props.location),'<Route> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.'),this.setState({match:this.computeMatch(t)})},o.prototype.renderChildren=function(){var t=this.state.match,n=this.props,o=n.children,r=n.component,i=n.render,a=n.router,c=a.history,u=a.route,s=a.staticContext,p={match:t,location:this.props.location||u.location,history:c,staticContext:s};return r?t?e.createElement(r,p):null:i?t?i(p):null:"function"==typeof o?o(p):o&&!Ut(o)?e.Children.only(o):null},o.prototype.render=function(){return e.createElement(Q.Provider,{value:this.getChildContext()},this.renderChildren())},o}(e.Component);qt.propTypes={computedMatch:v.object,path:v.string,exact:v.bool,strict:v.bool,sensitive:v.bool,component:v.func,render:v.func,children:v.oneOfType([v.func,v.node]),location:v.object,router:v.shape({history:v.object.isRequired,route:v.object.isRequired,staticContext:v.object})},qt.childContextTypes={router:v.object.isRequired};var Ht=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(qt,Mt({},t,{router:o}))})},Wt=function(t){var n=t.to,o=t.exact,r=t.strict,i=t.location,a=t.activeClassName,c=t.className,u=t.activeStyle,s=t.style,p=t.isActive,l=t["aria-current"],f=it(t,["to","exact","strict","location","activeClassName","className","activeStyle","style","isActive","aria-current"]),h="object"===(void 0===n?"undefined":et(n))?n.pathname:n,d=h&&h.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return e.createElement(Ht,{path:d,exact:o,strict:r,location:i,children:function(t){var o=t.location,r=t.match,i=!!(p?p(r,o):r);return e.createElement(pt,ot({to:n,className:i?[c,a].filter(function(t){return t}).join(" "):c,style:i?ot({},s,u):s,"aria-current":i&&l||null},f))}})};Wt.defaultProps={activeClassName:"active","aria-current":"page"};var Yt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var Bt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.props.router.history.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Prompt> outside a <Router>"),this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(e.Component);Bt.propTypes={when:v.bool,message:v.oneOfType([v.func,v.string]).isRequired,router:v.shape({history:v.shape({block:v.func.isRequired}).isRequired}).isRequired},Bt.defaultProps={when:!0};var It={},Nt=0,Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){var e=t,n=It[e]||(It[e]={});if(n[t])return n[t];var o=yt.compile(t);return Nt<1e4&&(n[t]=o,Nt++),o}(t)(e,{pretty:!0})},$t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var Ft=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.isStatic=function(){return this.props.router&&this.props.router.staticContext},e.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Redirect> outside a <Router>"),this.isStatic()&&this.perform()},e.prototype.componentDidMount=function(){this.isStatic()||this.perform()},e.prototype.componentDidUpdate=function(t){var e=T(t.to),o=T(this.props.to);S(e,o)?n(!1,"You tried to redirect to the same route you're currently on: \""+o.pathname+o.search+'"'):this.perform()},e.prototype.computeTo=function(t){var e=t.computedMatch,n=t.to;return e?"string"==typeof n?Dt(n,e.params):$t({},n,{pathname:Dt(n.pathname,e.params)}):n},e.prototype.perform=function(){var t=this.props,e=t.push,n=t.router.history,o=this.computeTo(this.props);e?n.push(o):n.replace(o)},e.prototype.render=function(){return null},e}(e.Component);Ft.propTypes={computedMatch:v.object,push:v.bool,from:v.string,to:v.oneOfType([v.string,v.object]).isRequired,router:v.shape({history:v.shape({push:v.func.isRequired,replace:v.func.isRequired}).isRequired,staticContext:v.object}).isRequired},Ft.defaultProps={push:!1};var Vt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};function Kt(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var Jt=function(t){return"/"===t.charAt(0)?t:"/"+t},Gt=function(t,e){return t?Vt({},e,{pathname:Jt(t)+e.pathname}):e},zt=function(t){return"string"==typeof t?t:E(t)},Qt=function(t){return function(){m(!1,"You cannot %s with <StaticRouter>",t)}},Xt=function(){},Zt=function(t){function o(){var e,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o);for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e=n=Kt(this,t.call.apply(t,[this].concat(i))),n.createHref=function(t){return Jt(n.props.basename+zt(t))},n.handlePush=function(t){var e=n.props,o=e.basename,r=e.context;r.action="PUSH",r.location=Gt(o,T(t)),r.url=zt(r.location)},n.handleReplace=function(t){var e=n.props,o=e.basename,r=e.context;r.action="REPLACE",r.location=Gt(o,T(t)),r.url=zt(r.location)},n.handleListen=function(){return Xt},n.handleBlock=function(){return Xt},Kt(n,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.getChildContext=function(){return{router:{staticContext:this.props.context}}},o.prototype.componentWillMount=function(){n(!this.props.history,"<StaticRouter> ignores the history prop. To use a custom history, use `import { Router }` instead of `import { StaticRouter as Router }`.")},o.prototype.render=function(){var t=this.props,n=t.basename,o=(t.context,t.location),r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=Jt(t);return 0!==e.pathname.indexOf(n)?e:Vt({},e,{pathname:e.pathname.substr(n.length)})}(n,T(o)),push:this.handlePush,replace:this.handleReplace,go:Qt("go"),goBack:Qt("goBack"),goForward:Qt("goForward"),listen:this.handleListen,block:this.handleBlock};return e.createElement(tt,Vt({},r,{history:i,router:this.getChildContext().router}))},o}(e.Component);Zt.propTypes={basename:v.string,context:v.object.isRequired,location:v.oneOfType([v.string,v.object])},Zt.defaultProps={basename:"",location:"/"},Zt.childContextTypes={router:v.object.isRequired};var te=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};var ee=function(t){function o(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(o,t),o.prototype.componentWillMount=function(){m(this.props.router,"You should not use <Switch> outside a <Router>")},o.prototype.componentWillReceiveProps=function(t){n(!(t.location&&!this.props.location),'<Switch> elements should not change from uncontrolled to controlled (or vice versa). You initially used no "location" prop and then provided one on a subsequent render.'),n(!(!t.location&&this.props.location),'<Switch> elements should not change from controlled to uncontrolled (or vice versa). You provided a "location" prop initially but omitted it on a subsequent render.')},o.prototype.render=function(){var t=this.props.router.route,n=this.props.children,o=this.props.location||t.location,r=void 0,i=void 0;return e.Children.forEach(n,function(n){if(null==r&&e.isValidElement(n)){var a=n.props,c=a.path,u=a.exact,s=a.strict,p=a.sensitive,l=a.from,f=c||l;i=n,r=At(o.pathname,{path:f,exact:u,strict:s,sensitive:p},t.match)}}),r?e.cloneElement(i,{location:o,computedMatch:r}):null},o}(e.Component);ee.propTypes={children:v.node,location:v.object,router:v.shape({route:v.object.isRequired}).isRequired};var ne=i(function(t,e){var n,o,r,i,a,c,u,s;t.exports=(n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r=Object.defineProperty,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,s=u&&u(Object),function t(e,p,l){if("string"!=typeof p){if(s){var f=u(p);f&&f!==s&&t(e,f,l)}var h=i(p);a&&(h=h.concat(a(p)));for(var d=0;d<h.length;++d){var y=h[d];if(!(n[y]||o[y]||l&&l[y])){var v=c(p,y);try{r(e,y,v)}catch(t){}}}return e}return e})}),oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t};t.BrowserRouter=ct,t.HashRouter=ut,t.Link=pt,t.MemoryRouter=ft,t.NavLink=Wt,t.Prompt=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(Bt,Yt({},t,{router:o}))})},t.Redirect=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(Ft,$t({},t,{router:o}))})},t.Route=Ht,t.Router=tt,t.RouterContext=Q,t.StaticRouter=Zt,t.Switch=function(t){return e.createElement(Q.Consumer,null,function(n){var o=n.router;return e.createElement(ee,te({},t,{router:o}))})},t.generatePath=Dt,t.matchPath=At,t.withRouter=function(t){var n=function(n){var o=n.wrappedComponentRef,r=function(t,e){var n={};for(var o in t)e.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=t[o]);return n}(n,["wrappedComponentRef"]);return e.createElement(Ht,{children:function(n){return e.createElement(t,oe({},r,n,{ref:o}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,n.propTypes={wrappedComponentRef:v.func},ne(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e(t.ReactRouterDOM={},t.React)}(this,function(t,e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function o(t,e){return t(e={exports:{}},e.exports),e.exports}var i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(t){r[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}})()&&Object.assign;var u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function s(){}var l=o(function(t){t.exports=function(){function t(t,e,n,r,o,i){if(i!==u){var a=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");throw a.name="Invariant Violation",a}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=s,n.PropTypes=n,n}()}),f=function(){},p=function(t,e,n,r,o,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],l=0;(u=new Error(e.replace(/%s/g,function(){return s[l++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}};function h(t){return"/"===t.charAt(0)}function d(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}var y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var v=function(t){return"/"===t.charAt(0)?t:"/"+t},m=function(t){return"/"===t.charAt(0)?t.substr(1):t},b=function(t,e){return new RegExp("^"+e+"(\\/|\\?|#|$)","i").test(t)},g=function(t,e){return b(t,e)?t.substr(e.length):t},w=function(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t},O=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o},P=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},x=function(t,e,n,r){var o=void 0;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=P({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],r=e&&e.split("/")||[],o=t&&h(t),i=e&&h(e),a=o||i;if(t&&h(t)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var c=void 0;if(r.length){var u=r[r.length-1];c="."===u||".."===u||""===u}else c=!1;for(var s=0,l=r.length;l>=0;l--){var f=r[l];"."===f?d(r,l):".."===f?(d(r,l),s++):s&&(d(r,l),s--)}if(!a)for(;s--;s)r.unshift("..");!a||""===r[0]||r[0]&&h(r[0])||r.unshift("");var p=r.join("/");return c&&"/"!==p.substr(-1)&&(p+="/"),p}(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o},j=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every(function(e,r){return t(e,n[r])});var r=void 0===e?"undefined":y(e);if(r!==(void 0===n?"undefined":y(n)))return!1;if("object"===r){var o=e.valueOf(),i=n.valueOf();if(o!==e||i!==n)return t(o,i);var a=Object.keys(e),c=Object.keys(n);return a.length===c.length&&a.every(function(r){return t(e[r],n[r])})}return!1}(t.state,e.state)},E=function(){var t=null,e=[];return{setPrompt:function(e){return f(null==t,"A history supports only one prompt at a time"),t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):(f(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),o(!0)):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0,r=function(){n&&t.apply(void 0,arguments)};return e.push(r),function(){n=!1,e=e.filter(function(t){return t!==r})}},notifyListeners:function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach(function(t){return t.apply(void 0,n)})}}},C=!("undefined"==typeof window||!window.document||!window.document.createElement),R=function(t,e,n){return t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},T=function(t,e,n){return t.removeEventListener?t.removeEventListener(e,n,!1):t.detachEvent("on"+e,n)},_=function(t,e){return e(window.confirm(t))},S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},A=function(){try{return window.history.state||{}}catch(t){return{}}},U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(C,"Browser history needs a DOM");var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t.forceRefresh,a=void 0!==i&&i,c=t.getUserConfirmation,u=void 0===c?_:c,s=t.keyLength,l=void 0===s?6:s,h=t.basename?w(v(t.basename)):"",d=function(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname+o.search+o.hash;return f(!h||b(i,h),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+i+'" to begin with "'+h+'".'),h&&(i=g(i,h)),x(i,r,n)},y=function(){return Math.random().toString(36).substr(2,l)},m=E(),P=function(t){k(W,t),W.length=n.length,m.notifyListeners(W.location,W.action)},j=function(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||M(d(t.state))},U=function(){M(d(A()))},L=!1,M=function(t){if(L)L=!1,P();else{m.confirmTransitionTo(t,"POP",u,function(e){e?P({action:"POP",location:t}):H(t)})}},H=function(t){var e=W.location,n=B.indexOf(e.key);-1===n&&(n=0);var r=B.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(L=!0,D(o))},N=d(A()),B=[N.key],I=function(t){return h+O(t)},D=function(t){n.go(t)},$=0,q=function(t){1===($+=t)?(R(window,"popstate",j),o&&R(window,"hashchange",U)):0===$&&(T(window,"popstate",j),o&&T(window,"hashchange",U))},F=!1,W={length:n.length,action:"POP",location:N,createHref:I,push:function(t,e){f(!("object"===(void 0===t?"undefined":S(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var o=x(t,e,y(),W.location);m.confirmTransitionTo(o,"PUSH",u,function(t){if(t){var e=I(o),i=o.key,c=o.state;if(r)if(n.pushState({key:i,state:c},null,e),a)window.location.href=e;else{var u=B.indexOf(W.location.key),s=B.slice(0,-1===u?0:u+1);s.push(o.key),B=s,P({action:"PUSH",location:o})}else f(void 0===c,"Browser history cannot push state in browsers that do not support HTML5 history"),window.location.href=e}})},replace:function(t,e){f(!("object"===(void 0===t?"undefined":S(t))&&void 0!==t.state&&void 0!==e),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var o=x(t,e,y(),W.location);m.confirmTransitionTo(o,"REPLACE",u,function(t){if(t){var e=I(o),i=o.key,c=o.state;if(r)if(n.replaceState({key:i,state:c},null,e),a)window.location.replace(e);else{var u=B.indexOf(W.location.key);-1!==u&&(B[u]=o.key),P({action:"REPLACE",location:o})}else f(void 0===c,"Browser history cannot replace state in browsers that do not support HTML5 history"),window.location.replace(e)}})},go:D,goBack:function(){return D(-1)},goForward:function(){return D(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=m.setPrompt(t);return F||(q(1),F=!0),function(){return F&&(F=!1,q(-1)),e()}},listen:function(t){var e=m.appendListener(t);return q(1),function(){q(-1),e()}}};return W},L=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},M={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+m(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:m,decodePath:v},slash:{encodePath:v,decodePath:v}},H=function(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)},N=function(t){var e=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,e>=0?e:0)+"#"+t)},B=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};p(C,"Hash history needs a DOM");var e=window.history,n=-1===window.navigator.userAgent.indexOf("Firefox"),r=t.getUserConfirmation,o=void 0===r?_:r,i=t.hashType,a=void 0===i?"slash":i,c=t.basename?w(v(t.basename)):"",u=M[a],s=u.encodePath,l=u.decodePath,h=function(){var t=l(H());return f(!c||b(t,c),'You are attempting to use a basename on a page whose URL path does not begin with the basename. Expected path "'+t+'" to begin with "'+c+'".'),c&&(t=g(t,c)),x(t)},d=E(),y=function(t){L(Y,t),Y.length=e.length,d.notifyListeners(Y.location,Y.action)},m=!1,P=null,S=function(){var t=H(),e=s(t);if(t!==e)N(e);else{var n=h(),r=Y.location;if(!m&&j(r,n))return;if(P===O(n))return;P=null,k(n)}},k=function(t){if(m)m=!1,y();else{d.confirmTransitionTo(t,"POP",o,function(e){e?y({action:"POP",location:t}):A(t)})}},A=function(t){var e=Y.location,n=D.lastIndexOf(O(e));-1===n&&(n=0);var r=D.lastIndexOf(O(t));-1===r&&(r=0);var o=n-r;o&&(m=!0,$(o))},U=H(),B=s(U);U!==B&&N(B);var I=h(),D=[O(I)],$=function(t){f(n,"Hash history go(n) causes a full page reload in this browser"),e.go(t)},q=0,F=function(t){1===(q+=t)?R(window,"hashchange",S):0===q&&T(window,"hashchange",S)},W=!1,Y={length:e.length,action:"POP",location:I,createHref:function(t){return"#"+s(c+O(t))},push:function(t,e){f(void 0===e,"Hash history cannot push state; it is ignored");var n=x(t,void 0,void 0,Y.location);d.confirmTransitionTo(n,"PUSH",o,function(t){if(t){var e=O(n),r=s(c+e);if(H()!==r){P=e,function(t){window.location.hash=t}(r);var o=D.lastIndexOf(O(Y.location)),i=D.slice(0,-1===o?0:o+1);i.push(e),D=i,y({action:"PUSH",location:n})}else f(!1,"Hash history cannot PUSH the same path; a new entry will not be added to the history stack"),y()}})},replace:function(t,e){f(void 0===e,"Hash history cannot replace state; it is ignored");var n=x(t,void 0,void 0,Y.location);d.confirmTransitionTo(n,"REPLACE",o,function(t){if(t){var e=O(n),r=s(c+e);H()!==r&&(P=e,N(r));var o=D.indexOf(O(Y.location));-1!==o&&(D[o]=e),y({action:"REPLACE",location:n})}})},go:$,goBack:function(){return $(-1)},goForward:function(){return $(1)},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=d.setPrompt(t);return W||(F(1),W=!0),function(){return W&&(W=!1,F(-1)),e()}},listen:function(t){var e=d.appendListener(t);return F(1),function(){F(-1),e()}}};return Y},I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$=function(t,e,n){return Math.min(Math.max(t,e),n)},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,o=t.initialIndex,i=void 0===o?0:o,a=t.keyLength,c=void 0===a?6:a,u=E(),s=function(t){D(v,t),v.length=v.entries.length,u.notifyListeners(v.location,v.action)},l=function(){return Math.random().toString(36).substr(2,c)},p=$(i,0,r.length-1),h=r.map(function(t){return x(t,void 0,"string"==typeof t?l():t.key||l())}),d=O,y=function(t){var n=$(v.index+t,0,v.entries.length-1),r=v.entries[n];u.confirmTransitionTo(r,"POP",e,function(t){t?s({action:"POP",location:r,index:n}):s()})},v={length:h.length,action:"POP",location:h[p],index:p,entries:h,createHref:d,push:function(t,n){f(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to push when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,l(),v.location);u.confirmTransitionTo(r,"PUSH",e,function(t){if(t){var e=v.index+1,n=v.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),s({action:"PUSH",location:r,index:e,entries:n})}})},replace:function(t,n){f(!("object"===(void 0===t?"undefined":I(t))&&void 0!==t.state&&void 0!==n),"You should avoid providing a 2nd state argument to replace when the 1st argument is a location-like object that already has state; it is ignored");var r=x(t,n,l(),v.location);u.confirmTransitionTo(r,"REPLACE",e,function(t){t&&(v.entries[v.index]=r,s({action:"REPLACE",location:r}))})},go:y,goBack:function(){return y(-1)},goForward:function(){return y(1)},canGo:function(t){var e=v.index+t;return e>=0&&e<v.entries.length},block:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return u.setPrompt(t)},listen:function(t){return u.appendListener(t)}};return v},F="__global_unique_id__",W=function(){return n[F]=(n[F]||0)+1};function Y(t){return function(){return t}}var V=function(){};V.thatReturns=Y,V.thatReturnsFalse=Y(!1),V.thatReturnsTrue=Y(!0),V.thatReturnsNull=Y(null),V.thatReturnsThis=function(){return this},V.thatReturnsArgument=function(t){return t};var K=V,J=o(function(t,n){n.__esModule=!0;i(e);var r=i(l),o=i(W);i(K);function i(t){return t&&t.__esModule?t:{default:t}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var s=1073741823;n.default=function(t,n){var i,l,f="__create-react-context-"+(0,o.default)()+"__",p=function(t){function e(){var n,r,o,i;a(this,e);for(var u=arguments.length,s=Array(u),l=0;l<u;l++)s[l]=arguments[l];return n=r=c(this,t.call.apply(t,[this].concat(s))),r.emitter=(o=r.props.value,i=[],{on:function(t){i.push(t)},off:function(t){i=i.filter(function(e){return e!==t})},get:function(){return o},set:function(t,e){o=t,i.forEach(function(t){return t(o,e)})}}),c(r,n)}return u(e,t),e.prototype.getChildContext=function(){var t;return(t={})[f]=this.emitter,t},e.prototype.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var e=this.props.value,r=t.value,o=void 0;((i=e)===(a=r)?0!==i||1/i==1/a:i!=i&&a!=a)?o=0:(o="function"==typeof n?n(e,r):s,0!=(o|=0)&&this.emitter.set(t.value,o))}var i,a},e.prototype.render=function(){return this.props.children},e}(e.Component);p.childContextTypes=((i={})[f]=r.default.object.isRequired,i);var h=function(e){function n(){var t,r;a(this,n);for(var o=arguments.length,i=Array(o),u=0;u<o;u++)i[u]=arguments[u];return t=r=c(this,e.call.apply(e,[this].concat(i))),r.state={value:r.getValue()},r.onUpdate=function(t,e){0!=((0|r.observedBits)&e)&&r.setState({value:r.getValue()})},c(r,t)}return u(n,e),n.prototype.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=void 0===e||null===e?s:e},n.prototype.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=void 0===t||null===t?s:t},n.prototype.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[f]?this.context[f].get():t},n.prototype.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(e.Component);return h.contextTypes=((l={})[f]=r.default.object,l),{Provider:p,Consumer:h}},t.exports=n.default});r(J);var G=r(o(function(t,n){n.__esModule=!0;var r=i(e),o=i(J);function i(t){return t&&t.__esModule?t:{default:t}}n.default=r.default.createContext||o.default,t.exports=n.default}))();function z(t,e){return{history:t.history,location:e.location,match:Q.computeRootMatch(e.location.pathname),staticContext:t.staticContext}}G.Provider.displayName="Router.Provider",G.Consumer.displayName="Router.Consumer";var Q=function(t){function n(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,e));return r.state={location:e.history.location},r.unlisten=e.history.listen(function(t){r.setState({location:t})}),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}},n.prototype.getChildContext=function(){return{router:z(this.props,this.state)}},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){var t=z(this.props,this.state);return e.createElement(G.Provider,{children:this.props.children||null,value:t})},n}(e.Component);Q.childContextTypes={router:l.object.isRequired};var X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},tt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},et=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},nt=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n},rt=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},ot=function(t){function n(){var e,r;Z(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=rt(this,t.call.apply(t,[this].concat(i))),r.history=U(r.props),rt(r,e)}return et(n,t),n.prototype.render=function(){return e.createElement(Q,{history:this.history,children:this.props.children})},n}(e.Component),it=function(t){function n(){var e,r;Z(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=rt(this,t.call.apply(t,[this].concat(i))),r.history=B(r.props),rt(r,e)}return et(n,t),n.prototype.render=function(){return e.createElement(Q,{history:this.history,children:this.props.children})},n}(e.Component);var at=function(t){function n(){return Z(this,n),rt(this,t.apply(this,arguments))}return et(n,t),n.prototype.handleClick=function(t,e){(this.props.onClick&&this.props.onClick(t),t.defaultPrevented||0!==t.button||this.props.target||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t))||(t.preventDefault(),(this.props.replace?e.history.replace:e.history.push)(this.props.to))},n.prototype.render=function(){var t=this,n=this.props,r=n.innerRef,o=(n.replace,n.to),i=nt(n,["innerRef","replace","to"]);return e.createElement(G.Consumer,null,function(n){n||p(!1);var a="string"==typeof o?x(o,null,null,n.location):o,c=a?n.history.createHref(a):"";return e.createElement("a",tt({},i,{onClick:function(e){return t.handleClick(e,n)},href:c,ref:r}))})},n}(e.Component);function ct(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}at.defaultProps={replace:!1};var ut=function(t){function n(){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=ct(this,t.call.apply(t,[this].concat(i))),r.history=q(r.props),ct(r,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n.prototype.render=function(){return e.createElement(Q,{history:this.history,children:this.props.children})},n}(e.Component),st=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},lt=jt,ft=vt,pt=function(t,e){return bt(vt(t,e))},ht=bt,dt=xt,yt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function vt(t,e){for(var n,r=[],o=0,i=0,a="",c=e&&e.delimiter||"/";null!=(n=yt.exec(t));){var u=n[0],s=n[1],l=n.index;if(a+=t.slice(i,l),i=l+u.length,s)a+=s[1];else{var f=t[i],p=n[2],h=n[3],d=n[4],y=n[5],v=n[6],m=n[7];a&&(r.push(a),a="");var b=null!=p&&null!=f&&f!==p,g="+"===v||"*"===v,w="?"===v||"*"===v,O=n[2]||c,P=d||y;r.push({name:h||o++,prefix:p||"",delimiter:O,optional:w,repeat:g,partial:b,asterisk:!!m,pattern:P?wt(P):m?".*":"[^"+gt(O)+"]+?"})}}return i<t.length&&(a+=t.substr(i)),a&&r.push(a),r}function mt(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function bt(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",i=n||{},a=(r||{}).pretty?mt:encodeURIComponent,c=0;c<t.length;c++){var u=t[c];if("string"!=typeof u){var s,l=i[u.name];if(null==l){if(u.optional){u.partial&&(o+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(st(l)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(l)+"`");if(0===l.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var f=0;f<l.length;f++){if(s=a(l[f]),!e[c].test(s))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(s)+"`");o+=(0===f?u.prefix:u.delimiter)+s}}else{if(s=u.asterisk?encodeURI(l).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}):a(l),!e[c].test(s))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+s+'"');o+=u.prefix+s}}else o+=u}return o}}function gt(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function wt(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function Ot(t,e){return t.keys=e,t}function Pt(t){return t.sensitive?"":"i"}function xt(t,e,n){st(e)||(n=e||n,e=[]);for(var r=(n=n||{}).strict,o=!1!==n.end,i="",a=0;a<t.length;a++){var c=t[a];if("string"==typeof c)i+=gt(c);else{var u=gt(c.prefix),s="(?:"+c.pattern+")";e.push(c),c.repeat&&(s+="(?:"+u+s+")*"),i+=s=c.optional?c.partial?u+"("+s+")?":"(?:"+u+"("+s+"))?":u+"("+s+")"}}var l=gt(n.delimiter||"/"),f=i.slice(-l.length)===l;return r||(i=(f?i.slice(0,-l.length):i)+"(?:"+l+"(?=$))?"),i+=o?"$":r&&f?"":"(?="+l+"|$)",Ot(new RegExp("^"+i,Pt(n)),e)}function jt(t,e,n){return st(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return Ot(t,e)}(t,e):st(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(jt(t[o],e,n).source);return Ot(new RegExp("(?:"+r.join("|")+")",Pt(n)),e)}(t,e,n):function(t,e,n){return xt(vt(t,n),e,n)}(t,e,n)}lt.parse=ft,lt.compile=pt,lt.tokensToFunction=ht,lt.tokensToRegExp=dt;var Et={},Ct=1e4,Rt=0;function Tt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"==typeof e&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=Et[n]||(Et[n]={});if(r[t])return r[t];var o=[],i={regexp:lt(t,o,e),keys:o};return Rt<Ct&&(r[t]=i,Rt++),i}(r,{end:i,strict:c,sensitive:void 0!==u&&u}),l=s.regexp,f=s.keys,p=l.exec(t);if(!p)return null;var h=p[0],d=p.slice(1),y=t===h;return i&&!y?null:{path:r,url:"/"===r&&""===h?"/":h,isExact:y,params:f.reduce(function(t,e,n){return t[e.name]=d[n],t},{})}}function _t(t,e){var n=t.location||e.location,r=t.computedMatch?t.computedMatch:t.path?Tt(n.pathname,t):e.match;return Object.assign({},e,{location:n,match:r})}var St=function(t){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n.prototype.getChildContext=function(){this.context.router||p(!1);var t=this.context.router;return{router:_t(this.props,t)}},n.prototype.render=function(){var t=this;return e.createElement(G.Consumer,null,function(n){n||p(!1);var r=_t(t.props,n),o=t.props,i=o.children,a=o.component,c=o.render;return Array.isArray(i)&&0===i.length&&(i=null),"function"==typeof i&&void 0===(i=i(r))&&(i=null),e.createElement(G.Provider,{value:r},i&&!function(t){return 0===e.Children.count(t)}(i)?i:r.match?a?e.createElement(a,r):c?c(r):null:null)})},n}(e.Component);function kt(t){var n=t["aria-current"],r=t.activeClassName,o=t.activeStyle,i=t.className,a=t.exact,c=t.isActive,u=t.location,s=t.strict,l=t.style,f=t.to,p=nt(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","strict","style","to"]),h="object"===(void 0===f?"undefined":X(f))?f.pathname:f,d=h&&h.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1");return e.createElement(St,{path:d,exact:a,strict:s,location:u,children:function(t){var a=t.location,u=t.match,s=!!(c?c(u,a):u),h=s?function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter(function(t){return t}).join(" ")}(i,r):i,d=s?Object.assign({},l,o):l;return e.createElement(at,tt({"aria-current":s&&n||null,className:h,style:d,to:f},p))}})}St.contextTypes={router:l.object.isRequired},St.childContextTypes={router:l.object.isRequired},kt.defaultProps={"aria-current":"page",activeClassName:"active"};var At=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return r.release=n.method(n.message),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidUpdate=function(t){t.message!==this.props.message&&(this.release(),this.release=this.props.method(this.props.message))},e.prototype.componentWillUnmount=function(){this.release()},e.prototype.render=function(){return null},e}(e.Component);function Ut(t){return e.createElement(G.Consumer,null,function(n){return n||p(!1),t.when?e.createElement(At,{method:n.history.block,message:t.message}):null})}Ut.defaultProps={when:!0};var Lt={},Mt=1e4,Ht=0;function Nt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"/"===t?t:function(t){if(Lt[t])return Lt[t];var e=lt.compile(t);return Ht<Mt&&(Lt[t]=e,Ht++),e}(t)(e,{pretty:!0})}var Bt=function(t){function e(n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.call(this,n));return n.method(n.to),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.componentDidUpdate=function(t){j(t.to,this.props.to)||this.props.method(this.props.to)},e.prototype.render=function(){return null},e}(e.Component);function It(t){return e.createElement(G.Consumer,null,function(n){n||p(!1);var r=t.push?n.history.push:n.history.replace,o=x(t.computedMatch?"string"==typeof t.to?Nt(t.to,t.computedMatch.params):Object.assign({},t.to,{pathname:Nt(t.to.pathname,t.computedMatch.params)}):t.to);return e.createElement(Bt,{method:r,to:o})})}It.defaultProps={push:!1};var Dt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};function $t(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function qt(t){return"/"===t.charAt(0)?t:"/"+t}function Ft(t,e){return t?Object.assign({},e,{pathname:qt(t)+e.pathname}):e}function Wt(t){return"string"==typeof t?t:O(t)}function Yt(t){return function(){p(!1)}}function Vt(){}var Kt=function(t){function n(){var e,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=r=$t(this,t.call.apply(t,[this].concat(i))),r.createHref=function(t){return qt(r.props.basename+Wt(t))},r.handlePush=function(t){var e=r.props,n=e.basename,o=e.context;o.action="PUSH",o.location=Ft(n,x(t)),o.url=Wt(o.location)},r.handleReplace=function(t){var e=r.props,n=e.basename,o=e.context;o.action="REPLACE",o.location=Ft(n,x(t)),o.url=Wt(o.location)},r.handleListen=function(){return Vt},r.handleBlock=function(){return Vt},$t(r,e)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n.prototype.render=function(){var t=this.props,n=t.basename,r=(t.context,t.location),o=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(t,["basename","context","location"]),i={createHref:this.createHref,action:"POP",location:function(t,e){if(!t)return e;var n=qt(t);return 0!==e.pathname.indexOf(n)?e:Object.assign({},e,{pathname:e.pathname.substr(n.length)})}(n,x(r)),push:this.handlePush,replace:this.handleReplace,go:Yt(),goBack:Yt(),goForward:Yt(),listen:this.handleListen,block:this.handleBlock};return e.createElement(Q,Dt({},o,{history:i,staticContext:this.props.context||{}}))},n}(e.Component);Kt.defaultProps={basename:"",location:"/"};var Jt=function(t){function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(n,t),n.prototype.render=function(){var t=this;return e.createElement(G.Consumer,null,function(n){n||p(!1);var r=t.props.location||n.location,o=void 0,i=void 0;return e.Children.forEach(t.props.children,function(t){if(null==i&&e.isValidElement(t)){o=t;var a=t.props.path||t.props.from;i=a?Tt(r.pathname,Object.assign({},t.props,{path:a})):n.match}}),i?e.cloneElement(o,{location:r,computedMatch:i}):null})},n}(e.Component),Gt={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},zt={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Qt=Object.defineProperty,Xt=Object.getOwnPropertyNames,Zt=Object.getOwnPropertySymbols,te=Object.getOwnPropertyDescriptor,ee=Object.getPrototypeOf,ne=ee&&ee(Object);var re=function t(e,n,r){if("string"!=typeof n){if(ne){var o=ee(n);o&&o!==ne&&t(e,o,r)}var i=Xt(n);Zt&&(i=i.concat(Zt(n)));for(var a=0;a<i.length;++a){var c=i[a];if(!(Gt[c]||zt[c]||r&&r[c])){var u=te(n,c);try{Qt(e,c,u)}catch(t){}}}return e}return e},oe=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};t.BrowserRouter=ot,t.HashRouter=it,t.Link=at,t.MemoryRouter=ut,t.NavLink=kt,t.Prompt=Ut,t.Redirect=It,t.Route=St,t.Router=Q,t.StaticRouter=Kt,t.Switch=Jt,t.generatePath=Nt,t.matchPath=Tt,t.withRouter=function(t){var n=function(n){var r=n.wrappedComponentRef,o=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}(n,["wrappedComponentRef"]);return e.createElement(St,{children:function(n){return e.createElement(t,oe({},o,n,{ref:r}))}})};return n.displayName="withRouter("+(t.displayName||t.name)+")",n.WrappedComponent=t,re(n,t)},Object.defineProperty(t,"__esModule",{value:!0})});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc