Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
Maintainers
2
Versions
539
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Compare versions

Comparing version 1.0.0-rc3 to 1.0.0-rc4

coverage/html/base.css

40

CHANGELOG.md

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

v1.0.0-rc4 - Tue, 03 Nov 2015 06:34:46 GMT
------------------------------------------
- [ec3f3eb](../../commit/ec3f3eb) [wip][added] Support custom RoutingContext on Router
- [4b8e994](../../commit/4b8e994) [fixed] Index routes with extraneous slashes
- [c68f9f1](../../commit/c68f9f1) [removed] Remove deprecated handler prop on Route
- [9e449f5](../../commit/9e449f5) [fixed] Match routes piece-by-piece
- [fbc109c](../../commit/fbc109c) [fixed] Use %20 instead of + in URL pathnames
- [8dd8ceb](../../commit/8dd8ceb) [fixed] Mark dynamic index routes as active
- [fae04bc](../../commit/fae04bc) [added] Greedy splat (**)
- [24ad58c](../../commit/24ad58c) [changed] Query changes aren't route changes
- [19c7086](../../commit/19c7086) [added] Handle undefined query values in isActive
- [3545ab2](../../commit/3545ab2) [removed] params from RoutingContext child context
- [9d346fc](../../commit/9d346fc) [added] params on RoutingContext child context
- [52cca98](../../commit/52cca98) [changed] Preventing transition from onClick
- [4e48b6b](../../commit/4e48b6b) [changed] Pass named children as props
- [3cc7d6d](../../commit/3cc7d6d) [added] Peer dependency on history package
- [751ca25](../../commit/751ca25) [fixed] Don't match empty routes for isActive
- [8459755](../../commit/8459755) [fixed] Include the hash prop on Links
- [ac7dd4a](../../commit/ac7dd4a) [fixed] Postinstall script on Windows
- [d905382](../../commit/d905382) [added] Test for IndexLink to deeply nested IndexRoute
- [6f8ceac](../../commit/6f8ceac) [fixed] Transitions example
- [e42a4ad](../../commit/e42a4ad) [changed] Stop using npm prepublish script
- [3be6a2d](../../commit/3be6a2d) [fixed] Workaround for nasty npm bug
- [bdab3d8](../../commit/bdab3d8) [fixed] Compare query by string value
- [c43fb61](../../commit/c43fb61) [added] <Link hash> prop
- [24e7b4f](../../commit/24e7b4f) [fixed] isActive on nested IndexLink
- [160c5ba](../../commit/160c5ba) [fixed] Removed <Link> warning about no history in context
- [ca9e3b7](../../commit/ca9e3b7) [added] IndexRedirect
- [428da54](../../commit/428da54) [added] Support <Redirect to="relative/path">
- [ebb8d20](../../commit/ebb8d20) [fixed] Remove direct calls to createLocation.
- [fc8a7a4](../../commit/fc8a7a4) [changed] Run examples using HTML5 history
- [37d9bac](../../commit/37d9bac) [fixed] isActive on <Link onlyActiveOnIndex>
- [be37196](../../commit/be37196) [fixed] Actually update state when there are transition hooks
- [b8f1abe](../../commit/b8f1abe) [changed] Removed (un)registerRouteHook
- [69a9240](../../commit/69a9240) [fixed] Added missing IndexLink to exports
- [5fbe933](../../commit/5fbe933) [changed] Do not add "active" class by default
- [85c699c](../../commit/85c699c) [changed] State -> IsActive
v1.0.0-rc3 - Thu, 08 Oct 2015 18:06:49 GMT

@@ -2,0 +42,0 @@ ------------------------------------------

47

docs/API.md

@@ -7,3 +7,3 @@ # API Reference

- [IndexLink](#indexlink)
- [RoutingContext](#routingcontext)
- [RoutingContext](#routingcontext)

@@ -22,3 +22,3 @@ * [Configuration Components](#configuration-components)

- [History](#history-mixin)
- [RouteContext](#routecontext-mixin)
- [RouteContext](#routecontext-mixin)

@@ -47,3 +47,3 @@ * [Utilities](#utilities)

##### `createElement(Component, props)`
When the router is ready to render a branch of route components, it will use this function to create the elements. You may want to take control of creating the elements when you're using some sort of data abstraction, like setting up subscriptions to stores, or passing in some sort of application module to each component via props.
When the router is ready to render a branch of route components, it will use this function to create the elements. You may want to take control of creating the elements when you're using some sort of data abstraction, like setting up subscriptions to stores, or passing in some sort of application module to each component via props.

@@ -74,3 +74,3 @@ ```js

##### `onError(error)`
While the router is matching, errors may bubble up, here is your opportunity to catch and deal with them. Typically these will come from async features like [`route.getComponents`](#getcomponentscallback) and [`route.getChildRoutes`](#getchildrouteslocation-callback).
While the router is matching, errors may bubble up, here is your opportunity to catch and deal with them. Typically these will come from async features like [`route.getComponents`](#getcomponentscallback), [`route.getIndexRoute`](#getindexroutecallback), and [`route.getChildRoutes`](#getchildrouteslocation-callback).

@@ -110,3 +110,3 @@ ##### `onUpdate()`

##### `onClick(e)`
A custom handler for the click event. Works just like a handler on an `<a>` tag - calling `e.preventDefault()` or returning `false` will prevent the transition from firing, while `e.stopPropagation()` will prevent the event from bubbling.
A custom handler for the click event. Works just like a handler on an `<a>` tag - calling `e.preventDefault()` will prevent the transition from firing, while `e.stopPropagation()` will prevent the event from bubbling.

@@ -263,5 +263,7 @@ ##### *others*

##### `onEnter(nextState, replaceState)`
##### `onEnter(nextState, replaceState, callback?)`
Called when a route is about to be entered. It provides the next router state and a function to redirect to another path.
If `callback` is listed as a 3rd argument, this hook will run asynchronously, and the transition will block until `callback` is called.
##### `onLeave()`

@@ -369,4 +371,17 @@ Called when a route is about to be exited.

##### `getIndexRoute(location, callback)`
Same as `IndexRoute` but asynchronous, useful for
code-splitting.
###### `callback` signature
`cb(err, component)`
```js
<Route path="courses/:courseId" getIndexRoute={(location, cb) => {
// do asynchronous stuff to find the index route
cb(null, Index)
}}/>
```
## IndexRedirect

@@ -380,3 +395,3 @@ Index Redirects allow you to redirect from the URL of a parent route to another

#### Props
All the same props as [Redirect](./Redirect.md) except for `from`.
All the same props as [Redirect](#redirect) except for `from`.

@@ -408,3 +423,3 @@

```js
React.render((
render((
<Router history={history}>

@@ -435,3 +450,3 @@ <Route path="/" component={App}>

```js
React.render((
render((
<Router>

@@ -536,8 +551,9 @@ <Route path="/" component={App}>

##### `isActive(pathname, query)`
Returns `true` or `false` depending on if the current path is active. Will be true for every route in the route branch matched by the `pathname` (child route is active, therefore parent is too).
##### `isActive(pathname, query, indexOnly)`
Returns `true` or `false` depending on if the current path is active. Will be true for every route in the route branch matched by the `pathname` (child route is active, therefore parent is too), unless `indexOnly` is specified, in which case it will only match the exact path.
###### arguments
- `pathname` - the full URL with or without the query.
- `query` - an object that will be stringified by the router.
- `query` - if specified, an object containing key/value pairs that must be active in the current query - explicit `undefined` values require the corresponding key to be missing or `undefined` in the current query
- `indexOnly` - a boolean (default: `false`).

@@ -648,3 +664,10 @@ #### Examples

## `match(location, cb)`
This function is to be used for server-side rendering. It matches a set of routes to a location, without rendering, and calls a `callback(error, redirectLocation, renderProps)` when it's done.
*Note: You probably don't want to use this in a browser. Use the [`history.listen`](https://github.com/rackt/history/blob/master/docs/GettingStarted.md#getting-started) API instead.*
## `createRoutes(routes)`

@@ -651,0 +674,0 @@

@@ -52,5 +52,5 @@ # Component Lifecycle

|-----------|------------------------|
| App | componentWillReceiveProps, componentDidUpdate |
| App | `componentWillReceiveProps`, `componentDidUpdate` |
| Home | N/A |
| Invoice | componentWillReceiveProps, componentDidUpdate |
| Invoice | `componentWillReceiveProps`, `componentDidUpdate` |
| Account | N/A |

@@ -65,6 +65,6 @@

|-----------|------------------------|
| App | componentWillReceiveProps, componentDidUpdate |
| App | `componentWillReceiveProps`, `componentDidUpdate` |
| Home | N/A |
| Invoice | componentWillUnmount |
| Account | componentDidMount |
| Invoice | `componentWillUnmount` |
| Account | `componentDidMount` |

@@ -71,0 +71,0 @@ ### Fetching Data

@@ -29,2 +29,17 @@ # Confirming Navigation

If you are using ES6 classes for your components, you can use [react-mixin](https://github.com/brigand/react-mixin) to add the `Lifecycle` mixin to your component.
```js
import reactMixin from 'react-mixin'
import { Lifecycle } from 'react-router'
class Foo extends Component { /* ... */ }
reactMixin(Foo.prototype, Lifecycle)
// or
@reactMixin.decorate(Lifecycle)
class Bar extends Component { /* ... */ }
```
If you need a [`routerWillLeave`](/docs/API.md#routerwillleavenextlocation) hook in a deeply nested component, simply use the [`RouteContext`](/docs/API.md#routecontext-mixin) mixin in your [route component](/docs/Glossary.md#routecomponent) to put the `route` in context.

@@ -31,0 +46,0 @@

@@ -13,3 +13,3 @@ # Dynamic Routing

Routes may define [`getChildRoutes`](/docs/API.md#getchildrouteslocation-callback) and [`getComponents`](/docs/API.md#getcomponentslocation-callback) methods. These are asynchronous and only called when needed. We call it "gradual matching". React Router will gradually match the URL and fetch only the amount of route configuration and components it needs to match the URL and render.
Routes may define [`getChildRoutes`](/docs/API.md#getchildrouteslocation-callback), [`getIndexRoute`](/docs/API.md#getindexroutelocation-callback), and [`getComponents`](/docs/API.md#getcomponentslocation-callback) methods. These are asynchronous and only called when needed. We call it "gradual matching". React Router will gradually match the URL and fetch only the amount of route configuration and components it needs to match the URL and render.

@@ -32,2 +32,10 @@ Coupled with a smart code splitting tool like [webpack](http://webpack.github.io/), a once tireless architecture is now simple and declarative.

getIndexRoute(location, callback) {
require.ensure([], function (require) {
callback(null, {
component: require('./components/Index'),
})
})
},
getComponents(location, callback) {

@@ -34,0 +42,0 @@ require.ensure([], function (require) {

@@ -23,3 +23,3 @@ # Navigating Outside of Components

import history from './history'
React.render(<Router history={history}/>, el)
render(<Router history={history}/>, el)
```

@@ -26,0 +26,0 @@

@@ -11,3 +11,3 @@ # Server Rendering

- `match` to match the routes to a location without rendering
- [`match`](https://github.com/rackt/react-router/blob/master/docs/API.md#matchlocation-cb) to match the routes to a location without rendering
- `RoutingContext` for synchronous rendering of route components

@@ -27,9 +27,9 @@

if (error) {
res.send(500, error.message)
res.status(500).send(error.message)
} else if (redirectLocation) {
res.redirect(302, redirectLocation.pathname + redirectLocation.search)
} else if (renderProps) {
res.send(200, renderToString(<RoutingContext {...renderProps} />))
res.status(200).send(renderToString(<RoutingContext {...renderProps} />))
} else {
res.send(404, 'Not found')
res.status(404).send('Not found')
}

@@ -36,0 +36,0 @@ })

@@ -36,2 +36,10 @@ # Histories

You can disable that feature (more [here](http://rackt.org/history/stable/HashHistoryCaveats.html)):
```js
// Opt-out of persistent state, not recommended.
let history = createHistory({
queryKey: false
});
```
### `createBrowserHistory`

@@ -70,3 +78,3 @@ Browser history is the recommended history for browser application with React Router. It uses the [History](https://developer.mozilla.org/en-US/docs/Web/API/History) API built into the browser to manipulate the URL, creating real URLs that look like `example.com/some/path`.

location / {
try_files $uri /index.html
try_files $uri /index.html;
}

@@ -89,2 +97,3 @@ }

import React from 'react'
import { render } from 'react-dom'
import createBrowserHistory from 'history/lib/createBrowserHistory'

@@ -97,3 +106,3 @@ import { Router, Route, IndexRoute } from 'react-router'

React.render(
render(
<Router history={createBrowserHistory()}>

@@ -100,0 +109,0 @@ <Route path='/' component={App}>

@@ -7,2 +7,3 @@ # Route Configuration

import React from 'react'
import { render } from 'react-dom'
import { Router, Route, Link } from 'react-router'

@@ -48,3 +49,3 @@

React.render((
render((
<Router>

@@ -83,3 +84,3 @@ <Route path="/" component={App}>

React.render((
render((
<Router>

@@ -114,3 +115,3 @@ <Route path="/" component={App}>

```js
React.render((
render((
<Router>

@@ -151,3 +152,3 @@ <Route path="/" component={App}>

React.render((
render((
<Router>

@@ -210,3 +211,3 @@ <Route path="/" component={App}>

React.render(<Router routes={routeConfig} />, document.body)
render(<Router routes={routeConfig} />, document.body)
```

@@ -18,2 +18,3 @@ # Route Matching

- `*` – Matches all characters (non-greedy) up to the next character in the pattern, or to the end of the URL if there is none, and creates a `splat` [param](/docs/Glossary.md#params)
- `**` - Matches all characters (greedy) until the next `/`, `?`, or `#` and creates a `splat` [param](/docs/Glossary.md#params)

@@ -23,3 +24,4 @@ ```js

<Route path="/hello(/:name)"> // matches /hello, /hello/michael, and /hello/ryan
<Route path="/files/*.*"> // matches /files/hello.jpg and /files/path/to/hello.jpg
<Route path="/files/*.*"> // matches /files/hello.jpg and /files/hello.html
<Route path="/**/*.jpg"> // matches /files/hello.jpg and /files/path/to/file.jpg
```

@@ -26,0 +28,0 @@

@@ -11,2 +11,3 @@ # Introduction

import React from 'react'
import { render } from 'react-dom'

@@ -53,3 +54,3 @@ const About = React.createClass({/*...*/})

React.render(<App />, document.body)
render(<App />, document.body)
```

@@ -107,2 +108,3 @@

import React from 'react'
import { render } from 'react-dom'

@@ -137,3 +139,3 @@ // First we import some components...

// It does all the fancy routing stuff for us.
React.render((
render((
<Router>

@@ -148,4 +150,6 @@ <Route path="/" component={App}>

React Router knows how to build nested UI for us, so we don't have to manually figure out which `<Child>` component to render. Internally, the router converts your `<Route>` element hierarchy to a [route config](/docs/Glossary.md#routeconfig). But if you're not digging the JSX you can use plain objects instead:
React Router knows how to build nested UI for us, so we don't have to manually figure out which `<Child>` component to render. For example, for a full path `/about` it would build `<App><About /></App>`.
Internally, the router converts your `<Route>` element hierarchy to a [route config](/docs/Glossary.md#routeconfig). But if you're not digging the JSX you can use plain objects instead:
```js

@@ -161,3 +165,3 @@ const routes = {

React.render(<Router routes={routes} />, document.body)
render(<Router routes={routes} />, document.body)
```

@@ -183,3 +187,3 @@

{/* Render the child route component */}
{this.props.children || "Welcome to your Inbox"}
{this.props.children}
</div>

@@ -190,3 +194,3 @@ )

React.render((
render((
<Router>

@@ -196,3 +200,6 @@ <Route path="/" component={App}>

<Route path="inbox" component={Inbox}>
{/* Add the route, nested where we want the UI to nest */}
{/* add some nested routes where we want the UI to nest */}
{/* render the stats page when at `/inbox` */}
<IndexRoute component={InboxStats}/>
{/* render the message component at /inbox/messages/123 */}
<Route path="messages/:id" component={Message} />

@@ -205,4 +212,23 @@ </Route>

Now visits to URLs like `inbox/messages/Jkei3c32` will match the new route and nest the UI branch of `App -> Inbox -> Message`.
Now visits to URLs like `inbox/messages/Jkei3c32` will match the new route and build this for you:
```
<App>
<Inbox>
<Message params={ {id: 'Jkei3c32'} } />
</Inbox>
</App>
```
And visits to `/inbox` will build this:
```
<App>
<Inbox>
<InboxStats />
</Inbox>
</App>
```
### Getting URL Parameters

@@ -209,0 +235,0 @@

@@ -17,6 +17,2 @@ 'use strict';

function routeQueryChanged(prevState, nextState) {
return prevState.location.search !== nextState.location.search;
}
/**

@@ -26,5 +22,3 @@ * Returns an object of { leaveRoutes, enterRoutes } determined by

* 1) they are not in the next state or 2) they are in the next state
* but their params have changed (i.e. /users/123 => /users/456) or
* 3) they are in the next state but the query has changed
* (i.e. /search?query=foo => /search?query=bar)
* but their params have changed (i.e. /users/123 => /users/456).
*

@@ -43,3 +37,3 @@ * leaveRoutes are ordered starting at the leaf route of the tree

leaveRoutes = prevRoutes.filter(function (route) {
return nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState) || routeQueryChanged(prevState, nextState);
return nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState);
});

@@ -46,0 +40,0 @@

@@ -7,5 +7,10 @@ 'use strict';

/**
* A mixin that adds the "history" instance variable to components.
*/
var History = {
contextTypes: { history: _PropTypes.history },
contextTypes: {
history: _PropTypes.history
},

@@ -12,0 +17,0 @@ componentWillMount: function componentWillMount() {

@@ -25,4 +25,4 @@ 'use strict';

var IndexLink = (function (_React$Component) {
_inherits(IndexLink, _React$Component);
var IndexLink = (function (_Component) {
_inherits(IndexLink, _Component);

@@ -32,3 +32,3 @@ function IndexLink() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}

@@ -41,5 +41,5 @@

return IndexLink;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = IndexLink;
module.exports = exports['default'];

@@ -13,5 +13,5 @@ 'use strict';

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

@@ -22,5 +22,5 @@ var _invariant = require('invariant');

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

@@ -41,4 +41,4 @@ var _Redirect = require('./Redirect');

var IndexRedirect = (function (_React$Component) {
_inherits(IndexRedirect, _React$Component);
var IndexRedirect = (function (_Component) {
_inherits(IndexRedirect, _Component);

@@ -48,15 +48,18 @@ function IndexRedirect() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}
IndexRedirect.createRouteFromReactElement = function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
parentRoute.indexRoute = _Redirect2['default'].createRouteFromReactElement(element);
} else {
_warning2['default'](false, 'An <IndexRedirect> does not make sense at the root of your route config');
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'An <IndexRedirect> does not make sense at the root of your route config') : undefined;
}
};
/* istanbul ignore next: sanity check */
IndexRedirect.prototype.render = function render() {
_invariant2['default'](false, '<IndexRedirect> elements are for router configuration only and should not be rendered');
!false ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, '<IndexRedirect> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined;
};

@@ -77,5 +80,5 @@

return IndexRedirect;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = IndexRedirect;
module.exports = exports['default'];

@@ -13,5 +13,5 @@ 'use strict';

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

@@ -22,5 +22,5 @@ var _invariant = require('invariant');

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

@@ -40,4 +40,4 @@ var _RouteUtils = require('./RouteUtils');

var IndexRoute = (function (_React$Component) {
_inherits(IndexRoute, _React$Component);
var IndexRoute = (function (_Component) {
_inherits(IndexRoute, _Component);

@@ -47,15 +47,18 @@ function IndexRoute() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}
IndexRoute.createRouteFromReactElement = function createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {
parentRoute.indexRoute = _RouteUtils.createRouteFromReactElement(element);
} else {
_warning2['default'](false, 'An <IndexRoute> does not make sense at the root of your route config');
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'An <IndexRoute> does not make sense at the root of your route config') : undefined;
}
};
/* istanbul ignore next: sanity check */
IndexRoute.prototype.render = function render() {
_invariant2['default'](false, '<IndexRoute> elements are for router configuration only and should not be rendered');
!false ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, '<IndexRoute> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined;
};

@@ -76,5 +79,5 @@

return IndexRoute;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = IndexRoute;
module.exports = exports['default'];

@@ -20,4 +20,18 @@ 'use strict';

for (var p in a) {
if (a.hasOwnProperty(p) && (!b.hasOwnProperty(p) || !deepEqual(a[p], b[p]))) return false;
}return true;
if (!a.hasOwnProperty(p)) {
continue;
}
if (a[p] === undefined) {
if (b[p] !== undefined) {
return false;
}
} else if (!b.hasOwnProperty(p)) {
return false;
} else if (!deepEqual(a[p], b[p])) {
return false;
}
}
return true;
}

@@ -29,2 +43,3 @@

function paramsAreActive(paramNames, paramValues, activeParams) {
// FIXME: This doesn't work on repeated params in activeParams.
return paramNames.every(function (paramName, index) {

@@ -35,21 +50,25 @@ return String(paramValues[index]) === String(activeParams[paramName]);

function getMatchingRoute(pathname, activeRoutes, activeParams) {
var route = undefined,
pattern = undefined,
basename = '';
function getMatchingRouteIndex(pathname, activeRoutes, activeParams) {
var remainingPathname = pathname,
paramNames = [],
paramValues = [];
for (var i = 0, len = activeRoutes.length; i < len; ++i) {
route = activeRoutes[i];
pattern = route.path || '';
var route = activeRoutes[i];
var pattern = route.path || '';
if (pattern.charAt(0) !== '/') pattern = basename.replace(/\/*$/, '/') + pattern; // Relative paths build on the parent's path.
if (pattern.charAt(0) === '/') {
remainingPathname = pathname;
paramNames = [];
paramValues = [];
}
var _matchPattern = _PatternUtils.matchPattern(pattern, pathname);
if (remainingPathname !== null) {
var matched = _PatternUtils.matchPattern(pattern, remainingPathname);
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
paramValues = [].concat(paramValues, matched.paramValues);
}
var remainingPathname = _matchPattern.remainingPathname;
var paramNames = _matchPattern.paramNames;
var paramValues = _matchPattern.paramValues;
if (remainingPathname === '' && paramsAreActive(paramNames, paramValues, activeParams)) return route;
basename = pattern;
if (remainingPathname === '' && route.path && paramsAreActive(paramNames, paramValues, activeParams)) return i;
}

@@ -64,10 +83,18 @@

*/
function routeIsActive(pathname, activeRoutes, activeParams, indexOnly) {
var route = getMatchingRoute(pathname, activeRoutes, activeParams);
function routeIsActive(pathname, routes, params, indexOnly) {
var i = getMatchingRouteIndex(pathname, routes, params);
if (route == null) return false;
if (i === null) {
// No match.
return false;
} else if (!indexOnly) {
// Any match is good enough.
return true;
}
if (indexOnly) return activeRoutes.length > 1 && activeRoutes[activeRoutes.length - 1] === route.indexRoute;
return true;
// If any remaining routes past the match index have paths, then we can't
// be on the index route.
return routes.slice(i + 1).every(function (route) {
return !route.path;
});
}

@@ -74,0 +101,0 @@

@@ -48,7 +48,7 @@ 'use strict';

componentDidMount: function componentDidMount() {
_invariant2['default'](this.routerWillLeave, 'The Lifecycle mixin requires you to define a routerWillLeave method');
!this.routerWillLeave ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'The Lifecycle mixin requires you to define a routerWillLeave method') : _invariant2['default'](false) : undefined;
var route = this.props.route || this.context.route;
_invariant2['default'](route, 'The Lifecycle mixin must be used on either a) a <Route component> or ' + 'b) a descendant of a <Route component> that uses the RouteContext mixin');
!route ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'The Lifecycle mixin must be used on either a) a <Route component> or ' + 'b) a descendant of a <Route component> that uses the RouteContext mixin') : _invariant2['default'](false) : undefined;

@@ -55,0 +55,0 @@ this._unlistenBeforeLeavingRoute = this.context.history.listenBeforeLeavingRoute(route, this.routerWillLeave);

@@ -60,4 +60,4 @@ 'use strict';

var Link = (function (_React$Component) {
_inherits(Link, _React$Component);
var Link = (function (_Component) {
_inherits(Link, _Component);

@@ -67,18 +67,34 @@ function Link() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}
Link.prototype.handleClick = function handleClick(event) {
var allowTransition = true,
clickResult = undefined;
var allowTransition = true;
if (this.props.onClick) clickResult = this.props.onClick(event);
if (this.props.onClick) this.props.onClick(event);
if (isModifiedEvent(event) || !isLeftClickEvent(event)) return;
if (clickResult === false || event.defaultPrevented === true) allowTransition = false;
if (event.defaultPrevented === true) allowTransition = false;
// If target prop is set (e.g. to "_blank") let browser handle link.
if (this.props.target) {
if (!allowTransition) event.preventDefault();
return;
}
event.preventDefault();
if (allowTransition) this.context.history.pushState(this.props.state, this.props.to, this.props.query);
if (allowTransition) {
var _props = this.props;
var state = _props.state;
var to = _props.to;
var query = _props.query;
var hash = _props.hash;
if (hash) to += hash;
this.context.history.pushState(state, to, query);
}
};

@@ -89,12 +105,12 @@

var _props = this.props;
var to = _props.to;
var query = _props.query;
var hash = _props.hash;
var state = _props.state;
var activeClassName = _props.activeClassName;
var activeStyle = _props.activeStyle;
var onlyActiveOnIndex = _props.onlyActiveOnIndex;
var _props2 = this.props;
var to = _props2.to;
var query = _props2.query;
var hash = _props2.hash;
var state = _props2.state;
var activeClassName = _props2.activeClassName;
var activeStyle = _props2.activeStyle;
var onlyActiveOnIndex = _props2.onlyActiveOnIndex;
var props = _objectWithoutProperties(_props, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']);
var props = _objectWithoutProperties(_props2, ['to', 'query', 'hash', 'state', 'activeClassName', 'activeStyle', 'onlyActiveOnIndex']);

@@ -156,5 +172,5 @@ // Manually override onClick.

return Link;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = Link;
module.exports = exports['default'];

@@ -45,3 +45,3 @@ 'use strict';

_invariant2['default'](location, 'match needs a location');
!location ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'match needs a location') : _invariant2['default'](false) : undefined;

@@ -48,0 +48,0 @@ var history = createHistory({

@@ -5,2 +5,8 @@ 'use strict';

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _AsyncUtils = require('./AsyncUtils');

@@ -31,2 +37,21 @@

});
} else if (route.childRoutes) {
(function () {
var pathless = route.childRoutes.filter(function (obj) {
return !obj.hasOwnProperty('path');
});
_AsyncUtils.loopAsync(pathless.length, function (index, next, done) {
getIndexRoute(pathless[index], location, function (error, indexRoute) {
if (error || indexRoute) {
var routes = [pathless[index]].concat(Array.isArray(indexRoute) ? indexRoute : [indexRoute]);
done(error, routes);
} else {
next();
}
});
}, function (err, routes) {
callback(null, routes);
});
})();
} else {

@@ -38,9 +63,9 @@ callback();

function assignParams(params, paramNames, paramValues) {
return paramNames.reduceRight(function (params, paramName, index) {
return paramNames.reduce(function (params, paramName, index) {
var paramValue = paramValues && paramValues[index];
if (Array.isArray(params[paramName])) {
params[paramName].unshift(paramValue);
params[paramName].push(paramValue);
} else if (paramName in params) {
params[paramName] = [paramValue, params[paramName]];
params[paramName] = [params[paramName], paramValue];
} else {

@@ -58,33 +83,53 @@ params[paramName] = paramValue;

function matchRouteDeep(basename, route, location, callback) {
function matchRouteDeep(route, location, remainingPathname, paramNames, paramValues, callback) {
var pattern = route.path || '';
if (pattern.charAt(0) !== '/') pattern = basename.replace(/\/*$/, '/') + pattern; // Relative paths build on the parent's path.
if (pattern.charAt(0) === '/') {
remainingPathname = location.pathname;
paramNames = [];
paramValues = [];
}
var _matchPattern = _PatternUtils.matchPattern(pattern, location.pathname);
if (remainingPathname !== null) {
var matched = _PatternUtils.matchPattern(pattern, remainingPathname);
remainingPathname = matched.remainingPathname;
paramNames = [].concat(paramNames, matched.paramNames);
paramValues = [].concat(paramValues, matched.paramValues);
var remainingPathname = _matchPattern.remainingPathname;
var paramNames = _matchPattern.paramNames;
var paramValues = _matchPattern.paramValues;
if (remainingPathname === '' && route.path) {
var _ret2 = (function () {
var match = {
routes: [route],
params: createParams(paramNames, paramValues)
};
var isExactMatch = remainingPathname === '';
getIndexRoute(route, location, function (error, indexRoute) {
if (error) {
callback(error);
} else {
if (Array.isArray(indexRoute)) {
var _match$routes;
if (isExactMatch && route.path) {
(function () {
var match = {
routes: [route],
params: createParams(paramNames, paramValues)
};
process.env.NODE_ENV !== 'production' ? _warning2['default'](indexRoute.every(function (route) {
return !route.path;
}), 'Index routes should not have paths') : undefined;
(_match$routes = match.routes).push.apply(_match$routes, indexRoute);
} else if (indexRoute) {
process.env.NODE_ENV !== 'production' ? _warning2['default'](!indexRoute.path, 'Index routes should not have paths') : undefined;
match.routes.push(indexRoute);
}
getIndexRoute(route, location, function (error, indexRoute) {
if (error) {
callback(error);
} else {
if (indexRoute) match.routes.push(indexRoute);
callback(null, match);
}
});
return {
v: undefined
};
})();
callback(null, match);
}
});
})();
} else if (remainingPathname != null || route.childRoutes) {
if (typeof _ret2 === 'object') return _ret2.v;
}
}
if (remainingPathname != null || route.childRoutes) {
// Either a) this route matched at least some of the path or b)

@@ -108,3 +153,3 @@ // we don't have to load this route's children asynchronously. In

}
}, pattern);
}, remainingPathname, paramNames, paramValues);
} else {

@@ -131,13 +176,16 @@ callback();

function matchRoutes(routes, location, callback) {
var basename = arguments.length <= 3 || arguments[3] === undefined ? '' : arguments[3];
_AsyncUtils.loopAsync(routes.length, function (index, next, done) {
matchRouteDeep(basename, routes[index], location, function (error, match) {
if (error || match) {
done(error, match);
} else {
next();
}
});
}, callback);
var remainingPathname = arguments.length <= 3 || arguments[3] === undefined ? location.pathname : arguments[3];
var paramNames = arguments.length <= 4 || arguments[4] === undefined ? [] : arguments[4];
var paramValues = arguments.length <= 5 || arguments[5] === undefined ? [] : arguments[5];
return (function () {
_AsyncUtils.loopAsync(routes.length, function (index, next, done) {
matchRouteDeep(routes[index], location, remainingPathname, paramNames, paramValues, function (error, match) {
if (error || match) {
done(error, match);
} else {
next();
}
});
}, callback);
})();
}

@@ -144,0 +192,0 @@

@@ -31,3 +31,3 @@ 'use strict';

lastIndex = 0,
matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;
matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;
while (match = matcher.exec(pattern)) {

@@ -42,2 +42,5 @@ if (match.index !== lastIndex) {

paramNames.push(match[1]);
} else if (match[0] === '**') {
regexpSource += '([\\s\\S]*)';
paramNames.push('splat');
} else if (match[0] === '*') {

@@ -88,2 +91,4 @@ regexpSource += '([\\s\\S]*?)';

* there is none
* - ** Consumes (greedy) all characters up to the next character
* in the pattern, or to the end of the URL if there is none
*

@@ -98,2 +103,10 @@ * The return value is an object with the following properties:

function matchPattern(pattern, pathname) {
// Make leading slashes consistent between pattern and pathname.
if (pattern.charAt(0) !== '/') {
pattern = '/' + pattern;
}
if (pathname.charAt(0) !== '/') {
pathname = '/' + pathname;
}
var _compilePattern2 = compilePattern(pattern);

@@ -105,7 +118,11 @@

regexpSource += '/*'; // Ignore trailing slashes
regexpSource += '/*'; // Capture path separators
// Special-case patterns like '*' for catch-all routes.
var captureRemaining = tokens[tokens.length - 1] !== '*';
if (captureRemaining) regexpSource += '([\\s\\S]*?)';
if (captureRemaining) {
// This will match newlines in the remaining path.
regexpSource += '([\\s\\S]*?)';
}

@@ -117,11 +134,24 @@ var match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'));

if (match != null) {
paramValues = Array.prototype.slice.call(match, 1).map(function (v) {
return v != null ? decodeURIComponent(v.replace(/\+/g, '%20')) : v;
});
if (captureRemaining) {
remainingPathname = match.pop();
var matchedPath = match[0].substr(0, match[0].length - remainingPathname.length);
if (captureRemaining) {
remainingPathname = paramValues.pop();
// If we didn't match the entire pathname, then make sure that the match
// we did get ends at a path separator (potentially the one we added
// above at the beginning of the path, if the actual match was empty).
if (remainingPathname && matchedPath.charAt(matchedPath.length - 1) !== '/') {
return {
remainingPathname: null,
paramNames: paramNames,
paramValues: null
};
}
} else {
remainingPathname = pathname.replace(match[0], '');
// If this matched at all, then the match was the entire pathname.
remainingPathname = '';
}
paramValues = match.slice(1).map(function (v) {
return v != null ? decodeURIComponent(v) : v;
});
} else {

@@ -180,8 +210,8 @@ remainingPathname = paramValues = null;

if (token === '*') {
if (token === '*' || token === '**') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
_invariant2['default'](paramValue != null || parenCount > 0, 'Missing splat #%s for path "%s"', splatIndex, pattern);
!(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Missing splat #%s for path "%s"', splatIndex, pattern) : _invariant2['default'](false) : undefined;
if (paramValue != null) pathname += encodeURI(paramValue).replace(/%20/g, '+');
if (paramValue != null) pathname += encodeURI(paramValue);
} else if (token === '(') {

@@ -195,5 +225,5 @@ parenCount += 1;

_invariant2['default'](paramValue != null || parenCount > 0, 'Missing "%s" parameter for path "%s"', paramName, pattern);
!(paramValue != null || parenCount > 0) ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'Missing "%s" parameter for path "%s"', paramName, pattern) : _invariant2['default'](false) : undefined;
if (paramValue != null) pathname += encodeURIComponent(paramValue).replace(/%20/g, '+');
if (paramValue != null) pathname += encodeURIComponent(paramValue);
} else {

@@ -200,0 +230,0 @@ pathname += token;

@@ -13,2 +13,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _react = require('react');

@@ -18,6 +22,2 @@

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _RouteUtils = require('./RouteUtils');

@@ -41,4 +41,4 @@

var Redirect = (function (_React$Component) {
_inherits(Redirect, _React$Component);
var Redirect = (function (_Component) {
_inherits(Redirect, _Component);

@@ -48,3 +48,3 @@ function Redirect() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}

@@ -93,4 +93,6 @@

/* istanbul ignore next: sanity check */
Redirect.prototype.render = function render() {
_invariant2['default'](false, '<Redirect> elements are for router configuration only and should not be rendered');
!false ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, '<Redirect> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined;
};

@@ -113,5 +115,5 @@

return Redirect;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = Redirect;
module.exports = exports['default'];

@@ -13,2 +13,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _react = require('react');

@@ -18,10 +22,2 @@

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _RouteUtils = require('./RouteUtils');

@@ -47,4 +43,4 @@

var Route = (function (_React$Component) {
_inherits(Route, _React$Component);
var Route = (function (_Component) {
_inherits(Route, _Component);

@@ -54,23 +50,16 @@ function Route() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}
Route.createRouteFromReactElement = function createRouteFromReactElement(element) {
var route = _RouteUtils.createRouteFromReactElement(element);
/* istanbul ignore next: sanity check */
if (route.handler) {
_warning2['default'](false, '<Route handler> is deprecated, use <Route component> instead');
route.component = route.handler;
delete route.handler;
}
return route;
};
Route.prototype.render = function render() {
_invariant2['default'](false, '<Route> elements are for router configuration only and should not be rendered');
!false ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, '<Route> elements are for router configuration only and should not be rendered') : _invariant2['default'](false) : undefined;
};
_createClass(Route, null, [{
key: 'createRouteFromReactElement',
value: _RouteUtils.createRouteFromReactElement,
enumerable: true
}, {
key: 'propTypes',

@@ -80,4 +69,3 @@ value: {

ignoreScrollBehavior: bool,
handler: // deprecated
_PropTypes.component, component: _PropTypes.component,
component: _PropTypes.component,
components: _PropTypes.components,

@@ -90,5 +78,5 @@ getComponents: func

return Route;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = Route;
module.exports = exports['default'];

@@ -5,2 +5,4 @@ 'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();

@@ -10,2 +12,4 @@

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

@@ -15,2 +19,6 @@

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

@@ -20,6 +28,2 @@

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _historyLibCreateHashHistory = require('history/lib/createHashHistory');

@@ -51,4 +55,4 @@

var Router = (function (_React$Component) {
_inherits(Router, _React$Component);
var Router = (function (_Component) {
_inherits(Router, _Component);

@@ -61,2 +65,3 @@ _createClass(Router, null, [{

routes: _PropTypes.routes, // alias for children
RoutingContext: func.isRequired,
createElement: func,

@@ -69,2 +74,8 @@ onError: func,

enumerable: true
}, {
key: 'defaultProps',
value: {
RoutingContext: _RoutingContext2['default']
},
enumerable: true
}]);

@@ -75,3 +86,3 @@

_React$Component.call(this, props, context);
_Component.call(this, props, context);

@@ -124,4 +135,6 @@ this.state = {

/* istanbul ignore next: sanity check */
Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
_warning2['default'](nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored');
process.env.NODE_ENV !== 'production' ? _warning2['default'](nextProps.history === this.props.history, 'You cannot change <Router history>; it will be ignored') : undefined;
};

@@ -139,7 +152,17 @@

var components = _state.components;
var createElement = this.props.createElement;
var _props2 = this.props;
var RoutingContext = _props2.RoutingContext;
var createElement = _props2.createElement;
var props = _objectWithoutProperties(_props2, ['RoutingContext', 'createElement']);
if (location == null) return null; // Async match
return _react2['default'].createElement(_RoutingContext2['default'], {
// Only forward non-Router-specific props to routing context, as those are
// the only ones that might be custom routing context props.
Object.keys(Router.propTypes).forEach(function (propType) {
return delete props[propType];
});
return _react2['default'].createElement(RoutingContext, _extends({}, props, {
history: this.history,

@@ -151,9 +174,9 @@ createElement: createElement,

components: components
});
}));
};
return Router;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = Router;
module.exports = exports['default'];

@@ -37,3 +37,4 @@ 'use strict';

if (error instanceof Error) _warning2['default'](false, error.message);
/* istanbul ignore if: error logging */
if (error instanceof Error) process.env.NODE_ENV !== 'production' ? _warning2['default'](false, error.message) : undefined;
}

@@ -40,0 +41,0 @@ }

@@ -13,2 +13,6 @@ 'use strict';

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var _react = require('react');

@@ -18,6 +22,4 @@

var _invariant = require('invariant');
var _RouteUtils = require('./RouteUtils');
var _invariant2 = _interopRequireDefault(_invariant);
var _getRouteParams = require('./getRouteParams');

@@ -37,4 +39,4 @@

var RoutingContext = (function (_React$Component) {
_inherits(RoutingContext, _React$Component);
var RoutingContext = (function (_Component) {
_inherits(RoutingContext, _Component);

@@ -44,10 +46,11 @@ function RoutingContext() {

_React$Component.apply(this, arguments);
_Component.apply(this, arguments);
}
RoutingContext.prototype.getChildContext = function getChildContext() {
return {
history: this.props.history,
location: this.props.location
};
var _props = this.props;
var history = _props.history;
var location = _props.location;
return { history: history, location: location };
};

@@ -62,8 +65,8 @@

var _props = this.props;
var history = _props.history;
var location = _props.location;
var routes = _props.routes;
var params = _props.params;
var components = _props.components;
var _props2 = this.props;
var history = _props2.history;
var location = _props2.location;
var routes = _props2.routes;
var params = _props2.params;
var components = _props2.components;

@@ -74,3 +77,3 @@ var element = null;

element = components.reduceRight(function (element, components, index) {
if (components == null) return element; // Don't create new children use the grandchildren.
if (components == null) return element; // Don't create new children; use the grandchildren.

@@ -88,3 +91,9 @@ var route = routes[index];

if (element) props.children = element;
if (_RouteUtils.isReactChildren(element)) {
props.children = element;
} else if (element) {
for (var prop in element) {
if (element.hasOwnProperty(prop)) props[prop] = element[prop];
}
}

@@ -103,3 +112,3 @@ if (typeof components === 'object') {

_invariant2['default'](element === null || element === false || _react2['default'].isValidElement(element), 'The root route must render a single element');
!(element === null || element === false || _react2['default'].isValidElement(element)) ? process.env.NODE_ENV !== 'production' ? _invariant2['default'](false, 'The root route must render a single element') : _invariant2['default'](false) : undefined;

@@ -136,5 +145,5 @@ return element;

return RoutingContext;
})(_react2['default'].Component);
})(_react.Component);
exports['default'] = RoutingContext;
module.exports = exports['default'];

@@ -156,3 +156,3 @@ 'use strict';

var hooks = getRouteHooksForRoutes(_computeChangedRoutes3['default'](state, nextState).leaveRoutes);
var hooks = getRouteHooksForRoutes(_computeChangedRoutes3['default'](state, partialNextState).leaveRoutes);

@@ -275,3 +275,3 @@ var result = undefined;

} else {
_warning2['default'](false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash);
process.env.NODE_ENV !== 'production' ? _warning2['default'](false, 'Location "%s" did not match any routes', location.pathname + location.search + location.hash) : undefined;
}

@@ -278,0 +278,0 @@ });

@@ -14,6 +14,2 @@ import { getParamNames } from './PatternUtils'

function routeQueryChanged(prevState, nextState) {
return prevState.location.search !== nextState.location.search
}
/**

@@ -23,5 +19,3 @@ * Returns an object of { leaveRoutes, enterRoutes } determined by

* 1) they are not in the next state or 2) they are in the next state
* but their params have changed (i.e. /users/123 => /users/456) or
* 3) they are in the next state but the query has changed
* (i.e. /search?query=foo => /search?query=bar)
* but their params have changed (i.e. /users/123 => /users/456).
*

@@ -39,5 +33,3 @@ * leaveRoutes are ordered starting at the leaf route of the tree

leaveRoutes = prevRoutes.filter(function (route) {
return nextRoutes.indexOf(route) === -1
|| routeParamsChanged(route, prevState, nextState)
|| routeQueryChanged(prevState, nextState)
return nextRoutes.indexOf(route) === -1 || routeParamsChanged(route, prevState, nextState)
})

@@ -44,0 +36,0 @@

import { history } from './PropTypes'
/**
* A mixin that adds the "history" instance variable to components.
*/
const History = {
contextTypes: { history },
contextTypes: {
history
},

@@ -7,0 +12,0 @@ componentWillMount() {

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

import React from 'react'
import React, { Component } from 'react'
import Link from './Link'

@@ -7,3 +7,3 @@

*/
class IndexLink extends React.Component {
class IndexLink extends Component {

@@ -10,0 +10,0 @@ render() {

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

import React from 'react'
import warning from 'warning'
import invariant from 'invariant'
import warning from 'warning'
import React, { Component } from 'react'
import Redirect from './Redirect'

@@ -12,5 +12,6 @@ import { falsy } from './PropTypes'

*/
class IndexRedirect extends React.Component {
class IndexRedirect extends Component {
static createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {

@@ -34,2 +35,3 @@ parentRoute.indexRoute = Redirect.createRouteFromReactElement(element)

/* istanbul ignore next: sanity check */
render() {

@@ -36,0 +38,0 @@ invariant(

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

import React from 'react'
import warning from 'warning'
import invariant from 'invariant'
import warning from 'warning'
import React, { Component } from 'react'
import { createRouteFromReactElement } from './RouteUtils'

@@ -13,5 +13,6 @@ import { component, components, falsy } from './PropTypes'

*/
class IndexRoute extends React.Component {
class IndexRoute extends Component {
static createRouteFromReactElement(element, parentRoute) {
/* istanbul ignore else: sanity check */
if (parentRoute) {

@@ -35,2 +36,3 @@ parentRoute.indexRoute = createRouteFromReactElement(element)

/* istanbul ignore next: sanity check */
render() {

@@ -37,0 +39,0 @@ invariant(

@@ -17,5 +17,17 @@ import { matchPattern } from './PatternUtils'

if (typeof a === 'object') {
for (let p in a)
if (a.hasOwnProperty(p) && (!b.hasOwnProperty(p) || !deepEqual(a[p], b[p])))
for (let p in a) {
if (!a.hasOwnProperty(p)) {
continue
}
if (a[p] === undefined) {
if (b[p] !== undefined) {
return false
}
} else if (!b.hasOwnProperty(p)) {
return false
} else if (!deepEqual(a[p], b[p])) {
return false
}
}

@@ -29,2 +41,3 @@ return true

function paramsAreActive(paramNames, paramValues, activeParams) {
// FIXME: This doesn't work on repeated params in activeParams.
return paramNames.every(function (paramName, index) {

@@ -35,17 +48,28 @@ return String(paramValues[index]) === String(activeParams[paramName])

function getMatchingRoute(pathname, activeRoutes, activeParams) {
let route, pattern, basename = ''
function getMatchingRouteIndex(pathname, activeRoutes, activeParams) {
let remainingPathname = pathname, paramNames = [], paramValues = []
for (let i = 0, len = activeRoutes.length; i < len; ++i) {
route = activeRoutes[i]
pattern = route.path || ''
const route = activeRoutes[i]
const pattern = route.path || ''
if (pattern.charAt(0) !== '/')
pattern = basename.replace(/\/*$/, '/') + pattern // Relative paths build on the parent's path.
if (pattern.charAt(0) === '/') {
remainingPathname = pathname
paramNames = []
paramValues = []
}
let { remainingPathname, paramNames, paramValues } = matchPattern(pattern, pathname)
if (remainingPathname !== null) {
const matched = matchPattern(pattern, remainingPathname)
remainingPathname = matched.remainingPathname
paramNames = [ ...paramNames, ...matched.paramNames ]
paramValues = [ ...paramValues, ...matched.paramValues ]
}
if (remainingPathname === '' && paramsAreActive(paramNames, paramValues, activeParams))
return route
basename = pattern
if (
remainingPathname === '' &&
route.path &&
paramsAreActive(paramNames, paramValues, activeParams)
)
return i
}

@@ -60,12 +84,16 @@

*/
function routeIsActive(pathname, activeRoutes, activeParams, indexOnly) {
let route = getMatchingRoute(pathname, activeRoutes, activeParams)
function routeIsActive(pathname, routes, params, indexOnly) {
const i = getMatchingRouteIndex(pathname, routes, params)
if (route == null)
if (i === null) {
// No match.
return false
} else if (!indexOnly) {
// Any match is good enough.
return true
}
if (indexOnly)
return activeRoutes.length > 1 && activeRoutes[activeRoutes.length - 1] === route.indexRoute
return true
// If any remaining routes past the match index have paths, then we can't
// be on the index route.
return routes.slice(i + 1).every(route => !route.path)
}

@@ -72,0 +100,0 @@

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

import React from 'react'
import React, { Component } from 'react'

@@ -39,3 +39,3 @@ const { bool, object, string, func } = React.PropTypes

*/
class Link extends React.Component {
class Link extends Component {

@@ -64,6 +64,6 @@ static contextTypes = {

handleClick(event) {
let allowTransition = true, clickResult
let allowTransition = true
if (this.props.onClick)
clickResult = this.props.onClick(event)
this.props.onClick(event)

@@ -73,9 +73,23 @@ if (isModifiedEvent(event) || !isLeftClickEvent(event))

if (clickResult === false || event.defaultPrevented === true)
if (event.defaultPrevented === true)
allowTransition = false
// If target prop is set (e.g. to "_blank") let browser handle link.
if (this.props.target) {
if (!allowTransition)
event.preventDefault()
return
}
event.preventDefault()
if (allowTransition)
this.context.history.pushState(this.props.state, this.props.to, this.props.query)
if (allowTransition) {
let { state, to, query, hash } = this.props
if (hash)
to += hash
this.context.history.pushState(state, to, query)
}
}

@@ -82,0 +96,0 @@

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

import warning from 'warning'
import { loopAsync } from './AsyncUtils'

@@ -24,2 +25,19 @@ import { matchPattern } from './PatternUtils'

})
} else if (route.childRoutes) {
const pathless = route.childRoutes.filter(function (obj) {
return !obj.hasOwnProperty('path')
})
loopAsync(pathless.length, function (index, next, done) {
getIndexRoute(pathless[index], location, function (error, indexRoute) {
if (error || indexRoute) {
const routes = [ pathless[index] ].concat( Array.isArray(indexRoute) ? indexRoute : [ indexRoute ] )
done(error, routes)
} else {
next()
}
})
}, function (err, routes) {
callback(null, routes)
})
} else {

@@ -31,9 +49,9 @@ callback()

function assignParams(params, paramNames, paramValues) {
return paramNames.reduceRight(function (params, paramName, index) {
return paramNames.reduce(function (params, paramName, index) {
const paramValue = paramValues && paramValues[index]
if (Array.isArray(params[paramName])) {
params[paramName].unshift(paramValue)
params[paramName].push(paramValue)
} else if (paramName in params) {
params[paramName] = [ paramValue, params[paramName] ]
params[paramName] = [ params[paramName], paramValue ]
} else {

@@ -51,28 +69,51 @@ params[paramName] = paramValue

function matchRouteDeep(basename, route, location, callback) {
function matchRouteDeep(
route, location, remainingPathname, paramNames, paramValues, callback
) {
let pattern = route.path || ''
if (pattern.charAt(0) !== '/')
pattern = basename.replace(/\/*$/, '/') + pattern // Relative paths build on the parent's path.
if (pattern.charAt(0) === '/') {
remainingPathname = location.pathname
paramNames = []
paramValues = []
}
const { remainingPathname, paramNames, paramValues } = matchPattern(pattern, location.pathname)
const isExactMatch = remainingPathname === ''
if (remainingPathname !== null) {
const matched = matchPattern(pattern, remainingPathname)
remainingPathname = matched.remainingPathname
paramNames = [ ...paramNames, ...matched.paramNames ]
paramValues = [ ...paramValues, ...matched.paramValues ]
if (isExactMatch && route.path) {
const match = {
routes: [ route ],
params: createParams(paramNames, paramValues)
if (remainingPathname === '' && route.path) {
const match = {
routes: [ route ],
params: createParams(paramNames, paramValues)
}
getIndexRoute(route, location, function (error, indexRoute) {
if (error) {
callback(error)
} else {
if (Array.isArray(indexRoute)) {
warning(
indexRoute.every(route => !route.path),
'Index routes should not have paths'
)
match.routes.push(...indexRoute)
} else if (indexRoute) {
warning(
!indexRoute.path,
'Index routes should not have paths'
)
match.routes.push(indexRoute)
}
callback(null, match)
}
})
return
}
}
getIndexRoute(route, location, function (error, indexRoute) {
if (error) {
callback(error)
} else {
if (indexRoute)
match.routes.push(indexRoute)
callback(null, match)
}
})
} else if (remainingPathname != null || route.childRoutes) {
if (remainingPathname != null || route.childRoutes) {
// Either a) this route matched at least some of the path or b)

@@ -96,3 +137,3 @@ // we don't have to load this route's children asynchronously. In

}
}, pattern)
}, remainingPathname, paramNames, paramValues)
} else {

@@ -118,11 +159,17 @@ callback()

*/
function matchRoutes(routes, location, callback, basename='') {
function matchRoutes(
routes, location, callback,
remainingPathname=location.pathname, paramNames=[], paramValues=[]
) {
loopAsync(routes.length, function (index, next, done) {
matchRouteDeep(basename, routes[index], location, function (error, match) {
if (error || match) {
done(error, match)
} else {
next()
matchRouteDeep(
routes[index], location, remainingPathname, paramNames, paramValues,
function (error, match) {
if (error || match) {
done(error, match)
} else {
next()
}
}
})
)
}, callback)

@@ -129,0 +176,0 @@ }

@@ -16,3 +16,3 @@ import invariant from 'invariant'

let match, lastIndex = 0, matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g
let match, lastIndex = 0, matcher = /:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g
while ((match = matcher.exec(pattern))) {

@@ -27,2 +27,5 @@ if (match.index !== lastIndex) {

paramNames.push(match[1])
} else if (match[0] === '**') {
regexpSource += '([\\s\\S]*)'
paramNames.push('splat')
} else if (match[0] === '*') {

@@ -74,2 +77,4 @@ regexpSource += '([\\s\\S]*?)'

* there is none
* - ** Consumes (greedy) all characters up to the next character
* in the pattern, or to the end of the URL if there is none
*

@@ -83,10 +88,21 @@ * The return value is an object with the following properties:

export function matchPattern(pattern, pathname) {
// Make leading slashes consistent between pattern and pathname.
if (pattern.charAt(0) !== '/') {
pattern = `/${pattern}`
}
if (pathname.charAt(0) !== '/') {
pathname = `/${pathname}`
}
let { regexpSource, paramNames, tokens } = compilePattern(pattern)
regexpSource += '/*' // Ignore trailing slashes
regexpSource += '/*' // Capture path separators
// Special-case patterns like '*' for catch-all routes.
const captureRemaining = tokens[tokens.length - 1] !== '*'
if (captureRemaining)
if (captureRemaining) {
// This will match newlines in the remaining path.
regexpSource += '([\\s\\S]*?)'
}

@@ -97,11 +113,28 @@ const match = pathname.match(new RegExp('^' + regexpSource + '$', 'i'))

if (match != null) {
paramValues = Array.prototype.slice.call(match, 1).map(function (v) {
return v != null ? decodeURIComponent(v.replace(/\+/g, '%20')) : v
})
if (captureRemaining) {
remainingPathname = match.pop()
const matchedPath =
match[0].substr(0, match[0].length - remainingPathname.length)
if (captureRemaining) {
remainingPathname = paramValues.pop()
// If we didn't match the entire pathname, then make sure that the match
// we did get ends at a path separator (potentially the one we added
// above at the beginning of the path, if the actual match was empty).
if (
remainingPathname &&
matchedPath.charAt(matchedPath.length - 1) !== '/'
) {
return {
remainingPathname: null,
paramNames,
paramValues: null
}
}
} else {
remainingPathname = pathname.replace(match[0], '')
// If this matched at all, then the match was the entire pathname.
remainingPathname = ''
}
paramValues = match.slice(1).map(
v => v != null ? decodeURIComponent(v) : v
)
} else {

@@ -149,3 +182,3 @@ remainingPathname = paramValues = null

if (token === '*') {
if (token === '*' || token === '**') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat

@@ -160,3 +193,3 @@

if (paramValue != null)
pathname += encodeURI(paramValue).replace(/%20/g, '+')
pathname += encodeURI(paramValue)
} else if (token === '(') {

@@ -177,3 +210,3 @@ parenCount += 1

if (paramValue != null)
pathname += encodeURIComponent(paramValue).replace(/%20/g, '+')
pathname += encodeURIComponent(paramValue)
} else {

@@ -180,0 +213,0 @@ pathname += token

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

import React from 'react'
import invariant from 'invariant'
import React, { Component } from 'react'
import { createRouteFromReactElement } from './RouteUtils'

@@ -16,3 +16,3 @@ import { formatPattern } from './PatternUtils'

*/
class Redirect extends React.Component {
class Redirect extends Component {

@@ -75,2 +75,3 @@ static createRouteFromReactElement(element) {

/* istanbul ignore next: sanity check */
render() {

@@ -77,0 +78,0 @@ invariant(

@@ -1,4 +0,3 @@

import React from 'react'
import warning from 'warning'
import invariant from 'invariant'
import React, { Component } from 'react'
import { createRouteFromReactElement } from './RouteUtils'

@@ -19,24 +18,9 @@ import { component, components } from './PropTypes'

*/
class Route extends React.Component {
class Route extends Component {
static createRouteFromReactElement(element) {
const route = createRouteFromReactElement(element)
static createRouteFromReactElement = createRouteFromReactElement
if (route.handler) {
warning(
false,
'<Route handler> is deprecated, use <Route component> instead'
)
route.component = route.handler
delete route.handler
}
return route
}
static propTypes = {
path: string,
ignoreScrollBehavior: bool,
handler: component, // deprecated
component,

@@ -47,2 +31,3 @@ components,

/* istanbul ignore next: sanity check */
render() {

@@ -49,0 +34,0 @@ invariant(

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

import React from 'react'
import warning from 'warning'
import React, { Component } from 'react'
import createHashHistory from 'history/lib/createHashHistory'

@@ -16,3 +16,3 @@ import { createRoutes } from './RouteUtils'

*/
class Router extends React.Component {
class Router extends Component {

@@ -23,2 +23,3 @@ static propTypes = {

routes, // alias for children
RoutingContext: func.isRequired,
createElement: func,

@@ -31,2 +32,6 @@ onError: func,

static defaultProps = {
RoutingContext
}
constructor(props, context) {

@@ -71,2 +76,3 @@ super(props, context)

/* istanbul ignore next: sanity check */
componentWillReceiveProps(nextProps) {

@@ -86,3 +92,3 @@ warning(

let { location, routes, params, components } = this.state
let { createElement } = this.props
let { RoutingContext, createElement, ...props } = this.props

@@ -92,3 +98,8 @@ if (location == null)

// Only forward non-Router-specific props to routing context, as those are
// the only ones that might be custom routing context props.
Object.keys(Router.propTypes).forEach(propType => delete props[propType])
return React.createElement(RoutingContext, {
...props,
history: this.history,

@@ -95,0 +106,0 @@ createElement,

@@ -19,2 +19,3 @@ import React from 'react'

/* istanbul ignore if: error logging */
if (error instanceof Error)

@@ -21,0 +22,0 @@ warning(false, error.message)

@@ -1,3 +0,4 @@

import React from 'react'
import invariant from 'invariant'
import React, { Component } from 'react'
import { isReactChildren } from './RouteUtils'
import getRouteParams from './getRouteParams'

@@ -11,3 +12,3 @@

*/
class RoutingContext extends React.Component {
class RoutingContext extends Component {

@@ -33,6 +34,4 @@ static propTypes = {

getChildContext() {
return {
history: this.props.history,
location: this.props.location
}
const { history, location } = this.props
return { history, location }
}

@@ -51,3 +50,3 @@

if (components == null)
return element // Don't create new children use the grandchildren.
return element // Don't create new children; use the grandchildren.

@@ -65,4 +64,9 @@ const route = routes[index]

if (element)
if (isReactChildren(element)) {
props.children = element
} else if (element) {
for (let prop in element)
if (element.hasOwnProperty(prop))
props[prop] = element[prop]
}

@@ -72,3 +76,3 @@ if (typeof components === 'object') {

for (const key in components)
for (let key in components)
if (components.hasOwnProperty(key))

@@ -75,0 +79,0 @@ elements[key] = this.createElement(components[key], props)

@@ -119,3 +119,3 @@ import warning from 'warning'

let hooks = getRouteHooksForRoutes(
computeChangedRoutes(state, nextState).leaveRoutes
computeChangedRoutes(state, partialNextState).leaveRoutes
)

@@ -122,0 +122,0 @@

{
"name": "react-router",
"version": "1.0.0-rc3",
"version": "1.0.0-rc4",
"description": "A complete routing library for React.js",

@@ -19,3 +19,3 @@ "main": "lib/index",

"test": "npm run lint && karma start",
"postinstall": "node -e \"require('fs').stat('lib', function (e, s) { process.exit(e || !s.isDirectory() ? 1 : 0) })\" || npm run build"
"postinstall": "node ./npm-scripts/postinstall.js"
},

@@ -28,8 +28,9 @@ "authors": [

"dependencies": {
"history": "1.12.3",
"invariant": "^2.0.0",
"warning": "^2.0.0"
},
"peerDependencies": {
"history": "^1.12.0"
},
"devDependencies": {
"assert": "1.3.0",
"babel": "^5.4.7",

@@ -39,12 +40,20 @@ "babel-core": "^5.4.7",

"babel-loader": "^5.0.0",
"babel-plugin-dev-expression": "^0.1.0",
"bundle-loader": "^0.5.2",
"codecov.io": "^0.1.6",
"coveralls": "^2.11.4",
"css-loader": "^0.19.0",
"eslint": "1.4.0",
"eslint-plugin-react": "3.3.2",
"expect": "1.10.0",
"eslint": "^1.7.3",
"eslint-config-rackt": "^1.1.0",
"eslint-plugin-react": "^3.6.3",
"expect": "^1.12.0",
"express": "^4.13.3",
"express-urlrewrite": "^1.2.0",
"karma": "^0.13.8",
"gzip-size": "^3.0.0",
"history": "^1.12.5",
"isparta-loader": "^1.0.0",
"karma": "^0.13.13",
"karma-browserstack-launcher": "^0.1.4",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^0.1.6",

@@ -56,4 +65,9 @@ "karma-mocha": "^0.2.0",

"mocha": "^2.0.1",
"pretty-bytes": "^2.0.1",
"qs": "^4.0.0",
"react": "0.13.x",
"react": "^0.14.0",
"react-addons-css-transition-group": "^0.14.0",
"react-addons-test-utils": "0.14.0",
"react-dom": "^0.14.0",
"react-static-container": "^1.0.0",
"rf-changelog": "^0.4.0",

@@ -60,0 +74,0 @@ "style-loader": "^0.12.4",

@@ -0,7 +1,8 @@

<img src="https://rackt.github.io/react-router/img/vertical.png" width="300">
[![npm package](https://img.shields.io/npm/v/react-router.svg?style=flat-square)](https://www.npmjs.org/package/react-router)
[![build status](https://img.shields.io/travis/rackt/react-router/master.svg?style=flat-square)](https://travis-ci.org/rackt/react-router)
[![npm package](https://img.shields.io/npm/v/react-router.svg?style=flat-square)](https://www.npmjs.org/package/react-router)
[![react-router channel on slack](https://img.shields.io/badge/slack-react--router@reactiflux-61DAFB.svg?style=flat-square)](http://www.reactiflux.com)
[![Coverage Status](https://img.shields.io/coveralls/rackt/react-router.svg?style=flat-square)](https://coveralls.io/github/rackt/react-router)
[![#rackt on freenode](https://img.shields.io/badge/irc-rackt_on_freenode-61DAFB.svg?style=flat-square)](https://webchat.freenode.net/)
<img src="https://rackt.github.io/react-router/img/vertical.png" width="300"/>
A complete routing library for React

@@ -19,6 +20,9 @@

- [Changelog](/CHANGELOG.md)
- [#react-router channel on reactiflux](http://www.reactiflux.com/)
- [#react-router @ Reactiflux](https://discord.gg/0ZcbPKXt5bYaNQ46)
- [Stack Overflow](http://stackoverflow.com/questions/tagged/react-router)
**Note:** *If you are still using React Router 0.13.x [the docs](https://github.com/rackt/react-router/tree/0.13.x/docs/guides) can be found on [the 0.13.x branch](https://github.com/rackt/react-router/tree/0.13.x).*
For questions and support, please visit [our channel on Reactiflux](https://discord.gg/0ZcbPKXt5bYaNQ46) or [Stack Overflow](http://stackoverflow.com/questions/tagged/react-router). The issue tracker is *exclusively* for bug reports and feature requests.
### Browser Support

@@ -32,4 +36,8 @@

$ npm install react-router@1.0.0-rc2
Install using [npm](https://www.npmjs.com/):
$ npm install history react-router@latest
Note that you need to also install the [history](https://www.npmjs.com/package/history) package since it is a peer dependency of React Router and won't automatically be installed for you in npm 3+.
Then with a module bundler or webpack, use as you would anything else:

@@ -42,6 +50,5 @@

// not using an ES6 transpiler
var ReactRouter = require('react-router')
var Router = ReactRouter.Router
var Route = ReactRouter.Route
var Link = ReactRouter.Link
var Router = require('react-router').Router
var Route = require('react-router').Route
var Link = require('react-router').Link
```

@@ -52,13 +59,19 @@

```js
import { Router } from 'react-router/lib/Router'
import Router from 'react-router/lib/Router'
```
### UMD
There's also a UMD build in the `umd` directory:
```js
import ReactRouter from 'react-router/umd/ReactRouter'
// using an es6 transpiler, like babel
import { Router, Route, Link } from 'react-router/umd/ReactRouter'
// using globals
var Router = window.ReactRouter.Router;
var Link = window.ReactRouter.Link;
var Route = window.ReactRouter.Route;
```
If you're using globals, you can find the library on `window.ReactRouter`.
#### CDN

@@ -72,2 +85,3 @@

import React from 'react'
import { render } from 'react-dom'
import { Router, Route, Link } from 'react-router'

@@ -121,3 +135,3 @@

// colocate the entire config).
React.render((
render((
<Router>

@@ -135,3 +149,3 @@ <Route path="/" component={App}>

See more in the [Introduction](/docs/Introduction.md) and [Advanced Usage](/docs/guides/advanced/README.md).
See more in the [Introduction](/docs/Introduction.md), [Advanced Usage](/docs/guides/advanced/README.md), and [Examples](/examples).

@@ -138,0 +152,0 @@ ### Thanks

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRouter=t(require("react")):e.ReactRouter=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(25),a=r(o);t.Router=a["default"];var u=n(11),i=r(u);t.Link=i["default"];var s=n(19),c=r(s);t.IndexLink=c["default"];var l=n(20),f=r(l);t.IndexRedirect=f["default"];var p=n(21),d=r(p);t.IndexRoute=d["default"];var y=n(12),h=r(y);t.Redirect=h["default"];var m=n(23),v=r(m);t.Route=v["default"];var g=n(18),b=r(g);t.History=b["default"];var O=n(22),_=r(O);t.Lifecycle=_["default"];var x=n(24),w=r(x);t.RouteContext=w["default"];var P=n(9),R=r(P);t.useRoutes=R["default"];var j=n(5);t.createRoutes=j.createRoutes;var E=n(13),k=r(E);t.RoutingContext=k["default"];var T=n(4),S=r(T);t.PropTypes=S["default"];var A=n(31),M=r(A);t.match=M["default"];var C=r(o);t["default"]=C["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,u,i],l=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var o=n(1),a=o.PropTypes.func,u=o.PropTypes.object,i=o.PropTypes.arrayOf,s=o.PropTypes.oneOfType,c=o.PropTypes.element,l=o.PropTypes.shape,f=o.PropTypes.string,p=l({listen:a.isRequired,pushState:a.isRequired,replaceState:a.isRequired,go:a.isRequired});t.history=p;var d=l({pathname:f.isRequired,search:f.isRequired,state:u,action:f.isRequired,key:f});t.location=d;var y=s([a,f]);t.component=y;var h=s([y,u]);t.components=h;var m=s([u,c]);t.route=m;var v=s([m,i(m)]);t.routes=v,t["default"]={falsy:r,history:p,location:d,component:y,components:h,route:m}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||d["default"].isValidElement(e)}function a(e){return o(e)||Array.isArray(e)&&e.every(o)}function u(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r](n,r,e);o instanceof Error&&h["default"](!1,o.message)}}function i(e,t){return f({},e,t)}function s(e){var t=e.type,n=i(t.defaultProps,e.props);if(t.propTypes&&u(t.displayName||t.name,t.propTypes,n),n.children){var r=c(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function c(e,t){var n=[];return d["default"].Children.forEach(e,function(e){if(d["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(s(e))}),n}function l(e){return a(e)?e=c(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.isReactChildren=a,t.createRouteFromReactElement=s,t.createRoutesFromReactChildren=c,t.createRoutes=l;var p=n(1),d=r(p),y=n(3),h=r(y)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){return o(e).replace(/\/+/g,"/+")}function u(e){for(var t="",n=[],r=[],o=void 0,u=0,i=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;o=i.exec(e);)o.index!==u&&(r.push(e.slice(u,o.index)),t+=a(e.slice(u,o.index))),o[1]?(t+="([^/?#]+)",n.push(o[1])):"*"===o[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===o[0]?t+="(?:":")"===o[0]&&(t+=")?"),r.push(o[0]),u=i.lastIndex;return u!==e.length&&(r.push(e.slice(u,e.length)),t+=a(e.slice(u,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function i(e){return e in y||(y[e]=u(e)),y[e]}function s(e,t){var n=i(e),r=n.regexpSource,o=n.paramNames,a=n.tokens;r+="/*";var u="*"!==a[a.length-1];u&&(r+="([\\s\\S]*?)");var s=t.match(new RegExp("^"+r+"$","i")),c=void 0,l=void 0;return null!=s?(l=Array.prototype.slice.call(s,1).map(function(e){return null!=e?decodeURIComponent(e.replace(/\+/g,"%20")):e}),c=u?l.pop():t.replace(s[0],"")):c=l=null,{remainingPathname:c,paramNames:o,paramValues:l}}function c(e){return i(e).paramNames}function l(e,t){var n=s(e,t),r=n.paramNames,o=n.paramValues;return null!=o?r.reduce(function(e,t,n){return e[t]=o[n],e},{}):null}function f(e,t){t=t||{};for(var n=i(e),r=n.tokens,o=0,a="",u=0,s=void 0,c=void 0,l=void 0,f=0,p=r.length;p>f;++f)s=r[f],"*"===s?(l=Array.isArray(t.splat)?t.splat[u++]:t.splat,d["default"](null!=l||o>0,'Missing splat #%s for path "%s"',u,e),null!=l&&(a+=encodeURI(l).replace(/%20/g,"+"))):"("===s?o+=1:")"===s?o-=1:":"===s.charAt(0)?(c=s.substring(1),l=t[c],d["default"](null!=l||o>0,'Missing "%s" parameter for path "%s"',c,e),null!=l&&(a+=encodeURIComponent(l).replace(/%20/g,"+"))):a+=s;return a.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=i,t.matchPattern=s,t.getParamNames=c,t.getParams=l,t.formatPattern=f;var p=n(2),d=r(p),y={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var o="POP";t.POP=o,t["default"]={PUSH:n,REPLACE:r,POP:o}},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}function r(e,t,n){function r(e,t,r){u||(t?(u=!0,n(t)):(a[e]=r,u=++i===o,u&&n(null,a)))}var o=e.length,a=[];if(0===o)return n(null,a);var u=!1,i=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0,t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function u(e){return function(){function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];return v["default"](e,t,n,j.location,j.routes,j.params)}function n(e){var t=e.pathname,n=e.query,r=e.state;return R.createLocation(R.createPath(t,n),r,l.REPLACE)}function r(e,t){E&&E.location===e?u(E,t):_["default"](w,e,function(n,r){n?t(n):r?u(i({},r,{location:e}),t):t()})}function u(e,t){var r=y["default"](j,e),o=r.leaveRoutes,a=r.enterRoutes;h.runLeaveHooks(o),h.runEnterHooks(a,e,function(r,o){r?t(r):o?t(null,n(o)):b["default"](e,function(n,r){n?t(n):t(null,null,j=i({},e,{components:r}))})})}function s(e){return e.__id__||(e.__id__=k++)}function f(e){return e.reduce(function(e,t){return e.push.apply(e,T[s(t)]),e},[])}function d(e,t){_["default"](w,e,function(n,r){if(null==r)return void t();E=i({},r,{location:e});for(var o=f(y["default"](j,r).leaveRoutes),a=void 0,u=0,s=o.length;null==a&&s>u;++u)a=o[u](e);t(a)})}function m(){if(j.routes){for(var e=f(j.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function g(e,t){var n=s(e),r=T[n];if(null==r){var o=!a(T);r=T[n]=[t],o&&(S=R.listenBefore(d),R.listenBeforeUnload&&(A=R.listenBeforeUnload(m)))}else-1===r.indexOf(t)&&r.push(t);return function(){var e=T[n];if(null!=e){var r=e.filter(function(e){return e!==t});0===r.length?(delete T[n],a(T)||(S&&(S(),S=null),A&&(A(),A=null))):T[n]=r}}}function O(e){return R.listen(function(t){j.location===t?e(null,j):r(t,function(n,r,o){n?e(n):r?R.transitionTo(r):o?e(null,o):c["default"](!1,'Location "%s" did not match any routes',t.pathname+t.search+t.hash)})})}var x=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],w=x.routes,P=o(x,["routes"]),R=p["default"](e)(P),j={},E=void 0,k=1,T={},S=void 0,A=void 0;return i({},R,{isActive:t,match:r,listenBeforeLeavingRoute:g,listen:O})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(3),c=r(s),l=n(7),f=n(40),p=r(f),d=n(27),y=r(d),h=n(26),m=n(30),v=r(m),g=n(28),b=r(g),O=n(32),_=r(O);t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=e(t,n);e.length<2?n(r):u["default"](void 0===r,'You should not "return" in a transition hook with a callback argument; call the callback instead')}t.__esModule=!0;var a=n(3),u=r(a);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return 0===e.button}function s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function c(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),d=r(p),y=d["default"].PropTypes,h=y.bool,m=y.object,v=y.string,g=y.func,b=function(e){function t(){a(this,t),e.apply(this,arguments)}return u(t,e),t.prototype.handleClick=function(e){var t=!0,n=void 0;this.props.onClick&&(n=this.props.onClick(e)),!s(e)&&i(e)&&((n===!1||e.defaultPrevented===!0)&&(t=!1),e.preventDefault(),t&&this.context.history.pushState(this.props.state,this.props.to,this.props.query))},t.prototype.render=function(){var e=this,t=this.props,n=t.to,r=t.query,a=t.hash,u=(t.state,t.activeClassName),i=t.activeStyle,s=t.onlyActiveOnIndex,f=o(t,["to","query","hash","state","activeClassName","activeStyle","onlyActiveOnIndex"]);f.onClick=function(t){return e.handleClick(t)};var p=this.context.history;return p&&(f.href=p.createHref(n,r),a&&(f.href+=a),(u||null!=i&&!c(i))&&p.isActive(n,r,s)&&(u&&(f.className+=""===f.className?u:" "+u),i&&(f.style=l({},f.style,i)))),d["default"].createElement("a",f)},f(t,null,[{key:"contextTypes",value:{history:m},enumerable:!0},{key:"propTypes",value:{to:v.isRequired,query:m,hash:v,state:m,activeStyle:m,activeClassName:v,onlyActiveOnIndex:h.isRequired,onClick:g},enumerable:!0},{key:"defaultProps",value:{onlyActiveOnIndex:!1,className:"",style:{}},enumerable:!0}]),t}(d["default"].Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(2),l=r(c),f=n(5),p=n(6),d=n(4),y=s["default"].PropTypes,h=y.string,m=y.object,v=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e){var n=f.createRouteFromReactElement(e);return n.from&&(n.path=n.from),n.onEnter=function(e,r){var o=e.location,a=e.params,u=void 0;if("/"===n.to.charAt(0))u=p.formatPattern(n.to,a);else if(n.to){var i=e.routes.indexOf(n),s=t.getRoutePattern(e.routes,i-1),c=s.replace(/\/*$/,"/")+n.to;u=p.formatPattern(c,a)}else u=o.pathname;r(n.state||o.state,u,n.query||o.query)},n},t.getRoutePattern=function(e,t){for(var n="",r=t;r>=0;r--){var o=e[r],a=o.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n},t.prototype.render=function(){l["default"](!1,"<Redirect> elements are for router configuration only and should not be rendered")},u(t,null,[{key:"propTypes",value:{path:h,from:h,to:h.isRequired,query:m,state:m,onEnter:d.falsy,children:d.falsy},enumerable:!0}]),t}(s["default"].Component);t["default"]=v,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(2),l=r(c),f=n(29),p=r(f),d=s["default"].PropTypes,y=d.array,h=d.func,m=d.object,v=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.prototype.getChildContext=function(){return{history:this.props.history,location:this.props.location}},t.prototype.createElement=function(e,t){return null==e?null:this.props.createElement(e,t)},t.prototype.render=function(){var e=this,t=this.props,n=t.history,r=t.location,o=t.routes,a=t.params,u=t.components,i=null;return u&&(i=u.reduceRight(function(t,u,i){if(null==u)return t;var s=o[i],c=p["default"](s,a),l={history:n,location:r,params:a,route:s,routeParams:c,routes:o};if(t&&(l.children=t),"object"==typeof u){var f={};for(var d in u)u.hasOwnProperty(d)&&(f[d]=e.createElement(u[d],l));return f}return e.createElement(u,l)},i)),l["default"](null===i||i===!1||s["default"].isValidElement(i),"The root route must render a single element"),i},u(t,null,[{key:"propTypes",value:{history:m.isRequired,createElement:h.isRequired,location:m.isRequired,routes:y.isRequired,params:m.isRequired,components:y.isRequired},enumerable:!0},{key:"defaultProps",value:{createElement:s["default"].createElement},enumerable:!0},{key:"childContextTypes",value:{history:m.isRequired,location:m.isRequired},enumerable:!0}]),t}(s["default"].Component);t["default"]=v,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function o(){return window.location.href.split("#")[1]||""}function a(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function u(){return window.location.pathname+window.location.search+window.location.hash}function i(e){e&&window.history.go(e)}function s(e,t){t(window.confirm(e))}function c(){var e=navigator.userAgent;return-1===e.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:!1}function l(){var e=navigator.userAgent;return-1===e.indexOf("Firefox")}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=o,t.replaceHashPath=a,t.getWindowPath=u,t.go=i,t.getUserConfirmation=s,t.supportsHistory=c,t.supportsGoWithoutReloadUsingHash=l},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return Math.random().toString(36).substr(2,e)}function a(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:(l["default"](!1,'Location path must be pathname + query string only, not a fully qualified URL like "%s"',e),e.substring(t[0].length))}function u(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.key===t.key&&p["default"](e.state,t.state)}function i(){function e(e){return L.push(e),function(){L=L.filter(function(t){return t!==e})}}function t(){return U&&U.action===y.POP?H.indexOf(U.key):N?H.indexOf(N.key):-1}function n(e){var n=t();N=e,N.action===y.PUSH?H=[].concat(H.slice(0,n+1),[N.key]):N.action===y.REPLACE&&(H[n]=N.key),q.forEach(function(e){e(N)})}function r(e){if(q.push(e),N)e(N);else{var t=k();H=[t.key],n(t)}return function(){q=q.filter(function(t){return t!==e})}}function i(e,t){d.loopAsync(L.length,function(t,n,r){m["default"](L[t],e,function(e){null!=e?r(e):n()})},function(e){C&&"string"==typeof e?C(e,function(e){t(e!==!1)}):t(e!==!1)})}function c(e){N&&u(N,e)||(U=e,i(e,function(t){if(U===e)if(t)T(e),n(e);else if(N&&e.action===y.POP){var r=H.indexOf(N.key),o=H.indexOf(e.key);-1!==r&&-1!==o&&A(r-o)}}))}function l(e,t){c(x(t,e,y.PUSH,v()))}function f(e,t){c(x(t,e,y.REPLACE,v()))}function p(){A(-1)}function h(){A(1)}function v(){return o(M)}function O(e){return e}function _(e){return e}function x(){var e=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?y.POP:arguments[2],r=arguments.length<=3||void 0===arguments[3]?v():arguments[3],o=a(e),u="",i="",s=o.indexOf("#");-1!==s&&(i=o.substring(s),o=o.substring(0,s));var c=o.indexOf("?");return-1!==c&&(u=o.substring(c),o=o.substring(0,c)),""===o&&(o="/"),{pathname:o,search:u,hash:i,state:t,action:n,key:r}}function w(e){N?(P(N,e),n(N)):P(k(),e)}function P(e,t){e.state=s({},e.state,t),S(e.key,e.state)}function R(e){-1===L.indexOf(e)&&L.push(e)}function j(e){L=L.filter(function(t){return t!==e})}var E=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],k=E.getCurrentLocation,T=E.finishTransition,S=E.saveState,A=E.go,M=E.keyLength,C=E.getUserConfirmation;"number"!=typeof M&&(M=b);var L=[],H=[],q=[],N=void 0,U=void 0;return{listenBefore:e,listen:r,transitionTo:c,pushState:l,replaceState:f,go:A,goBack:p,goForward:h,createKey:v,createPath:O,createHref:_,createLocation:x,setState:g["default"](w,"setState is deprecated; use location.key to save state instead"),registerTransitionHook:g["default"](R,"registerTransitionHook is deprecated; use listenBefore instead"),unregisterTransitionHook:g["default"](j,"unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead")}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(3),l=r(c),f=n(41),p=r(f),d=n(33),y=n(7),h=n(10),m=r(h),v=n(38),g=r(v),b=6;t["default"]=i,e.exports=t["default"]},function(e,t){var n={};n.hexTable=new Array(256);for(var r=0;256>r;++r)n.hexTable[r]="%"+((16>r?"0":"")+r.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},r=0,o=e.length;o>r;++r)"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,r){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,r));for(var o=Object.keys(n),a=0,u=o.length;u>a;++a){var i=o[a],s=n[i];Object.prototype.hasOwnProperty.call(e,i)?e[i]=t.merge(e[i],s,r):e[i]=s}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",r=0,o=e.length;o>r;++r){var a=e.charCodeAt(r);45===a||46===a||95===a||126===a||a>=48&&57>=a||a>=65&&90>=a||a>=97&&122>=a?t+=e[r]:128>a?t+=n.hexTable[a]:2048>a?t+=n.hexTable[192|a>>6]+n.hexTable[128|63&a]:55296>a||a>=57344?t+=n.hexTable[224|a>>12]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a]:(++r,a=65536+((1023&a)<<10|1023&e.charCodeAt(r)),t+=n.hexTable[240|a>>18]+n.hexTable[128|a>>12&63]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var r=n.indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var o=[],a=0,u=e.length;u>a;++a)"undefined"!=typeof e[a]&&o.push(e[a]);return o}var i=Object.keys(e);for(a=0,u=i.length;u>a;++a){var s=i[a];e[s]=t.compact(e[s],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(4),o={contextTypes:{history:r.history},componentWillMount:function(){this.history=this.context.history}};t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=r(i),c=n(11),l=r(c),f=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.prototype.render=function(){return s["default"].createElement(l["default"],u({},this.props,{onlyActiveOnIndex:!0}))},t}(s["default"].Component);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(2),l=r(c),f=n(3),p=r(f),d=n(12),y=r(d),h=n(4),m=s["default"].PropTypes,v=m.string,g=m.object,b=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e,t){t?t.indexRoute=y["default"].createRouteFromReactElement(e):p["default"](!1,"An <IndexRedirect> does not make sense at the root of your route config")},t.prototype.render=function(){l["default"](!1,"<IndexRedirect> elements are for router configuration only and should not be rendered")},u(t,null,[{key:"propTypes",value:{to:v.isRequired,query:g,state:g,onEnter:h.falsy,children:h.falsy},enumerable:!0}]),t}(s["default"].Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(2),l=r(c),f=n(3),p=r(f),d=n(5),y=n(4),h=s["default"].PropTypes,m=h.bool,v=h.func,g=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e,t){t?t.indexRoute=d.createRouteFromReactElement(e):p["default"](!1,"An <IndexRoute> does not make sense at the root of your route config")},t.prototype.render=function(){l["default"](!1,"<IndexRoute> elements are for router configuration only and should not be rendered")},u(t,null,[{key:"propTypes",value:{path:y.falsy,ignoreScrollBehavior:m,component:y.component,components:y.components,getComponents:v},enumerable:!0}]),t}(s["default"].Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),a=r(o),u=n(2),i=r(u),s=a["default"].PropTypes.object,c={contextTypes:{history:s.isRequired,route:s},propTypes:{route:s},componentDidMount:function(){i["default"](this.routerWillLeave,"The Lifecycle mixin requires you to define a routerWillLeave method");var e=this.props.route||this.context.route;i["default"](e,"The Lifecycle mixin must be used on either a) a <Route component> or b) a descendant of a <Route component> that uses the RouteContext mixin"),this._unlistenBeforeLeavingRoute=this.context.history.listenBeforeLeavingRoute(e,this.routerWillLeave)},componentWillUnmount:function(){this._unlistenBeforeLeavingRoute&&this._unlistenBeforeLeavingRoute()}};t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(3),l=r(c),f=n(2),p=r(f),d=n(5),y=n(4),h=s["default"].PropTypes,m=h.string,v=h.bool,g=h.func,b=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e){var t=d.createRouteFromReactElement(e);return t.handler&&(l["default"](!1,"<Route handler> is deprecated, use <Route component> instead"),t.component=t.handler,delete t.handler),t},t.prototype.render=function(){p["default"](!1,"<Route> elements are for router configuration only and should not be rendered")},u(t,null,[{key:"propTypes",value:{path:m,ignoreScrollBehavior:v,handler:y.component,component:y.component,components:y.components,getComponents:g},enumerable:!0}]),t}(s["default"].Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),a=r(o),u=a["default"].PropTypes.object,i={propTypes:{route:u.isRequired},childContextTypes:{route:u.isRequired},getChildContext:function(){return{route:this.props.route}}};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(1),s=r(i),c=n(3),l=r(c),f=n(36),p=r(f),d=n(5),y=n(13),h=r(y),m=n(9),v=r(m),g=n(4),b=s["default"].PropTypes,O=b.func,_=b.object,x=function(e){function t(n,r){o(this,t),e.call(this,n,r),this.state={location:null,routes:null,params:null,components:null}}return a(t,e),u(t,null,[{key:"propTypes",value:{history:_,children:g.routes,routes:g.routes,createElement:O,onError:O,onUpdate:O,parseQueryString:O,stringifyQuery:O},enumerable:!0}]),t.prototype.handleError=function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.history,r=t.children,o=t.routes,a=t.parseQueryString,u=t.stringifyQuery,i=n?function(){return n}:p["default"];this.history=v["default"](i)({routes:d.createRoutes(o||r),parseQueryString:a,stringifyQuery:u}),this._unlisten=this.history.listen(function(t,n){t?e.handleError(t):e.setState(n,e.props.onUpdate)})},t.prototype.componentWillReceiveProps=function(e){l["default"](e.history===this.props.history,"You cannot change <Router history>; it will be ignored")},t.prototype.componentWillUnmount=function(){this._unlisten&&this._unlisten()},t.prototype.render=function(){var e=this.state,t=e.location,n=e.routes,r=e.params,o=e.components,a=this.props.createElement;return null==t?null:s["default"].createElement(h["default"],{history:this.history,createElement:a,location:t,routes:n,params:r,components:o})},t}(s["default"].Component);t["default"]=x,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return function(n,r,o){e.apply(t,arguments),e.length<3&&o()}}function o(e){return e.reduce(function(e,t){return t.onEnter&&e.push(r(t.onEnter,t)),e},[])}function a(e,t,n){function r(e,t,n){u={pathname:t,query:n,state:e}}var a=o(e);if(!a.length)return void n();var u=void 0;i.loopAsync(a.length,function(e,n,o){a[e](t,r,function(e){e||u?o(e,u):n()})},n)}function u(e){for(var t=0,n=e.length;n>t;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=a,t.runLeaveHooks=u;var i=n(8)},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=u.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function o(e,t){return e.location.search!==t.location.search}function a(e,t){var n=e&&e.routes,a=t.routes,u=void 0,i=void 0;return n?(u=n.filter(function(n){return-1===a.indexOf(n)||r(n,e,t)||o(e,t)}),u.reverse(),i=a.filter(function(e){return-1===n.indexOf(e)||-1!==u.indexOf(e)})):(u=[],i=a),{leaveRoutes:u,enterRoutes:i}}t.__esModule=!0;var u=n(6);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function o(e,t){a.mapAsync(e.routes,function(t,n,o){r(e.location,t,o)},t)}t.__esModule=!0;var a=n(8);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=o.getParamNames(e.path);for(var a in t)t.hasOwnProperty(a)&&-1!==r.indexOf(a)&&(n[a]=t[a]);return n}t.__esModule=!0;
var o=n(6);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||!r(e[n],t[n])))return!1;return!0}return String(e)===String(t)}function o(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function a(e,t,n){for(var r=void 0,a=void 0,u="",i=0,s=t.length;s>i;++i){r=t[i],a=r.path||"","/"!==a.charAt(0)&&(a=u.replace(/\/*$/,"/")+a);var l=c.matchPattern(a,e),f=l.remainingPathname,p=l.paramNames,d=l.paramValues;if(""===f&&o(p,d,n))return r;u=a}return null}function u(e,t,n,r){var o=a(e,t,n);return null==o?!1:r?t.length>1&&t[t.length-1]===o.indexRoute:!0}function i(e,t){return null==t?null==e:null==e?!0:r(e,t)}function s(e,t,n,r,o,a){return null==r?!1:u(e,o,a,n)?i(t,r.query):!1}t.__esModule=!0;var c=n(6);t["default"]=s,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=e.routes,r=e.location,o=e.parseQueryString,u=e.stringifyQuery,s=e.basename;i["default"](r,"match needs a location");var c=h({routes:p.createRoutes(n),parseQueryString:o,stringifyQuery:u,basename:s});"string"==typeof r&&(r=c.createLocation(r)),c.match(r,function(e,n,r){t(e,n,r&&a({},r,{history:c}))})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(2),i=r(u),s=n(37),c=r(s),l=n(39),f=r(l),p=n(5),d=n(9),y=r(d),h=y["default"](f["default"](c["default"]));t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){e.childRoutes?n(null,e.childRoutes):e.getChildRoutes?e.getChildRoutes(t,function(e,t){n(e,!e&&f.createRoutes(t))}):n()}function o(e,t,n){e.indexRoute?n(null,e.indexRoute):e.getIndexRoute?e.getIndexRoute(t,function(e,t){n(e,!e&&f.createRoutes(t)[0])}):n()}function a(e,t,n){return t.reduceRight(function(e,t,r){var o=n&&n[r];return Array.isArray(e[t])?e[t].unshift(o):t in e?e[t]=[o,e[t]]:e[t]=o,e},e)}function u(e,t){return a({},e,t)}function i(e,t,n,a){var i=t.path||"";"/"!==i.charAt(0)&&(i=e.replace(/\/*$/,"/")+i);var c=l.matchPattern(i,n.pathname),f=c.remainingPathname,p=c.paramNames,d=c.paramValues,y=""===f;y&&t.path?!function(){var e={routes:[t],params:u(p,d)};o(t,n,function(t,n){t?a(t):(n&&e.routes.push(n),a(null,e))})}():null!=f||t.childRoutes?r(t,n,function(e,r){e?a(e):r?s(r,n,function(e,n){e?a(e):n?(n.routes.unshift(t),a(null,n)):a()},i):a()}):a()}function s(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?"":arguments[3];c.loopAsync(e.length,function(n,o,a){i(r,e[n],t,function(e,t){e||t?a(e,t):o()})},n)}t.__esModule=!0;var c=n(8),l=n(6),f=n(5);t["default"]=s,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return c+e}function a(e,t){try{window.sessionStorage.setItem(o(e),JSON.stringify(t))}catch(n){if(n.name===l||0===window.sessionStorage.length)return void s["default"](!1,"[history] Unable to save state; sessionStorage is not available in Safari private mode");throw n}}function u(e){var t=window.sessionStorage.getItem(o(e));if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=a,t.readState=u;var i=n(3),s=r(i),c="@@History/",l="QuotaExceededError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(e){return i["default"](s.canUseDOM,"DOM history needs a DOM"),n.listen(e)}var n=f["default"](a({getUserConfirmation:c.getUserConfirmation},e,{go:c.go}));return a({},n,{listen:t})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(2),i=r(u),s=n(15),c=n(14),l=n(16),f=r(l);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return"string"==typeof e&&"/"===e.charAt(0)}function a(){var e=v.getHashPath();return o(e)?!0:(v.replaceHashPath("/"+e),!1)}function u(e,t,n){return e+(-1===e.indexOf("?")?"?":"&")+(t+"="+n)}function i(e,t){return e.replace(new RegExp("[?&]?"+t+"=[a-zA-Z0-9]+"),"")}function s(e,t){var n=e.match(new RegExp("\\?.*?\\b"+t+"=(.+?)\\b"));return n&&n[1]}function c(){function e(){var e=v.getHashPath(),t=void 0,n=void 0;return R?(t=s(e,R),e=i(e,R),t?n=g.readState(t):(n=null,t=j.createKey(),v.replaceHashPath(u(e,R,t)))):t=n=null,j.createLocation(e,n,void 0,t)}function t(t){function n(){a()&&r(e())}var r=t.transitionTo;return a(),v.addEventListener(window,"hashchange",n),function(){v.removeEventListener(window,"hashchange",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,o=e.state,a=e.action,i=e.key;if(a!==h.POP){var s=(t||"")+n+r;R&&(s=u(s,R,i)),s===v.getHashPath()?p["default"](!1,"You cannot %s the same path using hash history",a):(R?g.saveState(i,o):e.key=e.state=null,a===h.PUSH?window.location.hash=s:v.replaceHashPath(s))}}function r(e){1===++E&&(k=t(j));var n=j.listenBefore(e);return function(){n(),0===--E&&k()}}function o(e){1===++E&&(k=t(j));var n=j.listen(e);return function(){n(),0===--E&&k()}}function c(e,t){p["default"](R||null==e,"You cannot use state without a queryKey it will be dropped"),j.pushState(e,t)}function f(e,t){p["default"](R||null==e,"You cannot use state without a queryKey it will be dropped"),j.replaceState(e,t)}function d(e){p["default"](T,"Hash history go(n) causes a full page reload in this browser"),j.go(e)}function b(e){return"#"+j.createHref(e)}function x(e){1===++E&&(k=t(j)),j.registerTransitionHook(e)}function w(e){j.unregisterTransitionHook(e),0===--E&&k()}var P=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];y["default"](m.canUseDOM,"Hash history needs a DOM");var R=P.queryKey;(void 0===R||R)&&(R="string"==typeof R?R:_);var j=O["default"](l({},P,{getCurrentLocation:e,finishTransition:n,saveState:g.saveState})),E=0,k=void 0,T=v.supportsGoWithoutReloadUsingHash();return l({},j,{listenBefore:r,listen:o,pushState:c,replaceState:f,go:d,createHref:b,registerTransitionHook:x,unregisterTransitionHook:w})}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=n(3),p=r(f),d=n(2),y=r(d),h=n(7),m=n(15),v=n(14),g=n(34),b=n(35),O=r(b),_="_k";t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.filter(function(e){return e.state}).reduce(function(e,t){return e[t.key]=t.state,e},{})}function a(){function e(e,t){m[e]=t}function t(e){return m[e]}function n(){var e=y[h],n=e.key,r=e.basename,o=e.pathname,a=e.search,u=(r||"")+o+(a||""),i=void 0;return n?i=t(n):(i=null,n=p.createKey(),e.key=n),p.createLocation(u,i,void 0,n)}function r(e){var t=h+e;return t>=0&&t<y.length}function a(e){if(e){s["default"](r(e),"Cannot go(%s) there is not enough history",e),h+=e;var t=n();p.transitionTo(u({},t,{action:c.POP}))}}function i(t){switch(t.action){case c.PUSH:h+=1,h<y.length&&y.splice(h),y.push(t),e(t.key,t.state);break;case c.REPLACE:y[h]=t,e(t.key,t.state)}}var l=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];Array.isArray(l)?l={entries:l}:"string"==typeof l&&(l={entries:[l]});var p=f["default"](u({},l,{getCurrentLocation:n,finishTransition:i,saveState:e,go:a})),d=l,y=d.entries,h=d.current;"string"==typeof y?y=[y]:Array.isArray(y)||(y=["/"]),y=y.map(function(e){var t=p.createKey();return"string"==typeof e?{pathname:e,key:t}:"object"==typeof e&&e?u({},e,{key:t}):void s["default"](!1,"Unable to create history entry from %s",e)}),null==h?h=y.length-1:s["default"](h>=0&&h<y.length,"Current index must be >= 0 and < %s, was %s",y.length,h);var m=o(y);return p}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(2),s=r(i),c=n(7),l=n(16),f=r(l);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return function(){return u["default"](!1,"[history] "+t),e.apply(this,arguments)}}t.__esModule=!0;var a=n(3),u=r(a);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){function t(e){return y&&null==e.basename&&(0===e.pathname.indexOf(y)?(e.pathname=e.pathname.substring(y.length),e.basename=y,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){return y?y+e:e}function r(e){return m.listenBefore(function(n,r){s["default"](e,t(n),r)})}function a(e){return m.listen(function(n){e(t(n))})}function i(e,t){m.pushState(e,n(t))}function c(e,t){m.replaceState(e,n(t))}function l(e){return m.createPath(n(e))}function f(e){return m.createHref(n(e))}function p(){return t(m.createLocation.apply(m,arguments))}var d=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],y=d.basename,h=o(d,["basename"]),m=e(h);return u({},m,{listenBefore:r,listen:a,pushState:i,replaceState:c,createPath:l,createHref:f,createLocation:p})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(10),s=r(i);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return l["default"].stringify(e,{arrayFormat:"brackets"})}function u(e){return l["default"].parse(e)}function i(e){return function(){function t(e){return null==e.query&&(e.query=v(e.search.substring(1))),e}function n(e,t){var n=void 0;return t&&""!==(n=m(t))?e+(-1===e.indexOf("?")?"?":"&")+n:e}function r(e){return b.listenBefore(function(n,r){p["default"](e,t(n),r)})}function i(e){return b.listen(function(n){e(t(n))})}function c(e,t,r){return b.pushState(e,n(t,r))}function l(e,t,r){return b.replaceState(e,n(t,r))}function f(e,t){return b.createPath(n(e,t))}function d(e,t){return b.createHref(n(e,t))}function y(){return t(b.createLocation.apply(b,arguments))}var h=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],m=h.stringifyQuery,v=h.parseQueryString,g=o(h,["stringifyQuery","parseQueryString"]),b=e(g);return"function"!=typeof m&&(m=a),"function"!=typeof v&&(v=u),s({},b,{listenBefore:r,listen:i,pushState:c,replaceState:l,createPath:f,createHref:d,createLocation:y})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(44),l=r(c),f=n(10),p=r(f);t["default"]=i,e.exports=t["default"]},function(e,t,n){function r(e){return null===e||void 0===e}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function a(e,t,n){var a,l;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),c(e,t,n)):!1;if(o(e)){if(!o(t))return!1;if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}try{var f=i(e),p=i(t)}catch(d){return!1}if(f.length!=p.length)return!1;for(f.sort(),p.sort(),a=f.length-1;a>=0;a--)if(f[a]!=p[a])return!1;for(a=f.length-1;a>=0;a--)if(l=f[a],!c(e[l],t[l],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(43),s=n(42),c=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:a(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=o?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t,n){var r=n(46),o=n(45);e.exports={stringify:r,parse:o}},function(e,t,n){var r=n(17),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1};o.parseValues=function(e,t){for(var n={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),a=0,u=o.length;u>a;++a){var i=o[a],s=-1===i.indexOf("]=")?i.indexOf("="):i.indexOf("]=")+1;if(-1===s)n[r.decode(i)]="",t.strictNullHandling&&(n[r.decode(i)]=null);else{var c=r.decode(i.slice(0,s)),l=r.decode(i.slice(s+1));Object.prototype.hasOwnProperty.call(n,c)?n[c]=[].concat(n[c]).concat(l):n[c]=l}}return n},o.parseObject=function(e,t,n){if(!e.length)return t;var r,a=e.shift();if("[]"===a)r=[],r=r.concat(o.parseObject(e,t,n));else{r=n.plainObjects?Object.create(null):{};var u="["===a[0]&&"]"===a[a.length-1]?a.slice(1,a.length-1):a,i=parseInt(u,10),s=""+i;!isNaN(i)&&a!==u&&s===u&&i>=0&&n.parseArrays&&i<=n.arrayLimit?(r=[],r[i]=o.parseObject(e,t,n)):r[u]=o.parseObject(e,t,n)}return r},o.parseKeys=function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var r=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,u=r.exec(e),i=[];if(u[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(u[1])&&!n.allowPrototypes)return;i.push(u[1])}for(var s=0;null!==(u=a.exec(e))&&s<n.depth;)++s,(n.plainObjects||!Object.prototype.hasOwnProperty(u[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&i.push(u[1]);return u&&i.push("["+e.slice(u.index)+"]"),o.parseObject(i,t,n)}},e.exports=function(e,t){if(t=t||{},t.delimiter="string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,t.depth="number"==typeof t.depth?t.depth:o.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,t.parseArrays=t.parseArrays!==!1,t.allowDots=t.allowDots!==!1,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return t.plainObjects?Object.create(null):{};for(var n="string"==typeof e?o.parseValues(e,t):e,a=t.plainObjects?Object.create(null):{},u=Object.keys(n),i=0,s=u.length;s>i;++i){var c=u[i],l=o.parseKeys(c,n[c],t);a=r.merge(a,l,t)}return r.compact(a)}},function(e,t,n){var r=n(17),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}},strictNullHandling:!1};o.stringify=function(e,t,n,a,u){if("function"==typeof u)e=u(t,e);else if(r.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(a)return r.encode(t);e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[r.encode(t)+"="+r.encode(e)];var i=[];if("undefined"==typeof e)return i;for(var s=Array.isArray(u)?u:Object.keys(e),c=0,l=s.length;l>c;++c){var f=s[c];i=Array.isArray(e)?i.concat(o.stringify(e[f],n(t,f),n,a,u)):i.concat(o.stringify(e[f],t+"["+f+"]",n,a,u))}return i},e.exports=function(e,t){t=t||{};var n,r,a="undefined"==typeof t.delimiter?o.delimiter:t.delimiter,u="boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling;"function"==typeof t.filter?(r=t.filter,e=r("",e)):Array.isArray(t.filter)&&(n=r=t.filter);var i=[];if("object"!=typeof e||null===e)return"";var s;s=t.arrayFormat in o.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var c=o.arrayPrefixGenerators[s];n||(n=Object.keys(e));for(var l=0,f=n.length;f>l;++l){var p=n[l];i=i.concat(o.stringify(e[p],p,c,u,r))}return i.join(a)}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.ReactRouter=t(require("react")):e.ReactRouter=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(26),a=r(o);t.Router=a["default"];var u=n(13),i=r(u);t.Link=i["default"];var s=n(20),c=r(s);t.IndexLink=c["default"];var l=n(21),f=r(l);t.IndexRedirect=f["default"];var p=n(22),d=r(p);t.IndexRoute=d["default"];var y=n(14),h=r(y);t.Redirect=h["default"];var v=n(24),m=r(v);t.Route=m["default"];var g=n(19),b=r(g);t.History=b["default"];var O=n(23),_=r(O);t.Lifecycle=_["default"];var x=n(25),P=r(x);t.RouteContext=P["default"];var w=n(9),j=r(w);t.useRoutes=j["default"];var R=n(4);t.createRoutes=R.createRoutes;var E=n(15),k=r(E);t.RoutingContext=k["default"];var T=n(5),A=r(T);t.PropTypes=A["default"];var S=n(32),M=r(S);t.match=M["default"];var C=r(o);t["default"]=C["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,u,i){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,u,i],l=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||d["default"].isValidElement(e)}function a(e){return o(e)||Array.isArray(e)&&e.every(o)}function u(e,t,n){e=e||"UnknownComponent";for(var r in t)if(t.hasOwnProperty(r)){var o=t[r](n,r,e);o instanceof Error}}function i(e,t){return f({},e,t)}function s(e){var t=e.type,n=i(t.defaultProps,e.props);if(t.propTypes&&u(t.displayName||t.name,t.propTypes,n),n.children){var r=c(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function c(e,t){var n=[];return d["default"].Children.forEach(e,function(e){if(d["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(s(e))}),n}function l(e){return a(e)?e=c(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.isReactChildren=a,t.createRouteFromReactElement=s,t.createRoutesFromReactChildren=c,t.createRoutes=l;var p=n(1),d=r(p),y=n(3);r(y)},function(e,t,n){"use strict";function r(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.falsy=r;var o=n(1),a=o.PropTypes.func,u=o.PropTypes.object,i=o.PropTypes.arrayOf,s=o.PropTypes.oneOfType,c=o.PropTypes.element,l=o.PropTypes.shape,f=o.PropTypes.string,p=l({listen:a.isRequired,pushState:a.isRequired,replaceState:a.isRequired,go:a.isRequired});t.history=p;var d=l({pathname:f.isRequired,search:f.isRequired,state:u,action:f.isRequired,key:f});t.location=d;var y=s([a,f]);t.component=y;var h=s([y,u]);t.components=h;var v=s([u,c]);t.route=v;var m=s([v,i(v)]);t.routes=m,t["default"]={falsy:r,history:p,location:d,component:y,components:h,route:v}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){return o(e).replace(/\/+/g,"/+")}function u(e){for(var t="",n=[],r=[],o=void 0,u=0,i=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;o=i.exec(e);)o.index!==u&&(r.push(e.slice(u,o.index)),t+=a(e.slice(u,o.index))),o[1]?(t+="([^/?#]+)",n.push(o[1])):"**"===o[0]?(t+="([\\s\\S]*)",n.push("splat")):"*"===o[0]?(t+="([\\s\\S]*?)",n.push("splat")):"("===o[0]?t+="(?:":")"===o[0]&&(t+=")?"),r.push(o[0]),u=i.lastIndex;return u!==e.length&&(r.push(e.slice(u,e.length)),t+=a(e.slice(u,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function i(e){return e in y||(y[e]=u(e)),y[e]}function s(e,t){"/"!==e.charAt(0)&&(e="/"+e),"/"!==t.charAt(0)&&(t="/"+t);var n=i(e),r=n.regexpSource,o=n.paramNames,a=n.tokens;r+="/*";var u="*"!==a[a.length-1];u&&(r+="([\\s\\S]*?)");var s=t.match(new RegExp("^"+r+"$","i")),c=void 0,l=void 0;if(null!=s){if(u){c=s.pop();var f=s[0].substr(0,s[0].length-c.length);if(c&&"/"!==f.charAt(f.length-1))return{remainingPathname:null,paramNames:o,paramValues:null}}else c="";l=s.slice(1).map(function(e){return null!=e?decodeURIComponent(e):e})}else c=l=null;return{remainingPathname:c,paramNames:o,paramValues:l}}function c(e){return i(e).paramNames}function l(e,t){var n=s(e,t),r=n.paramNames,o=n.paramValues;return null!=o?r.reduce(function(e,t,n){return e[t]=o[n],e},{}):null}function f(e,t){t=t||{};for(var n=i(e),r=n.tokens,o=0,a="",u=0,s=void 0,c=void 0,l=void 0,f=0,p=r.length;p>f;++f)s=r[f],"*"===s||"**"===s?(l=Array.isArray(t.splat)?t.splat[u++]:t.splat,null!=l||o>0?void 0:d["default"](!1),null!=l&&(a+=encodeURI(l))):"("===s?o+=1:")"===s?o-=1:":"===s.charAt(0)?(c=s.substring(1),l=t[c],null!=l||o>0?void 0:d["default"](!1),null!=l&&(a+=encodeURIComponent(l))):a+=s;return a.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=i,t.matchPattern=s,t.getParamNames=c,t.getParams=l,t.formatPattern=f;var p=n(2),d=r(p),y={}},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var o="POP";t.POP=o,t["default"]={PUSH:n,REPLACE:r,POP:o}},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}function r(e,t,n){function r(e,t,r){u||(t?(u=!0,n(t)):(a[e]=r,u=++i===o,u&&n(null,a)))}var o=e.length,a=[];if(0===o)return n(null,a);var u=!1,i=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0,t.loopAsync=n,t.mapAsync=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){for(var t in e)if(e.hasOwnProperty(t))return!0;return!1}function u(e){return function(){function t(e,t){var n=arguments.length<=2||void 0===arguments[2]?!1:arguments[2];return v["default"](e,t,n,j.location,j.routes,j.params)}function n(e){var t=e.pathname,n=e.query,r=e.state;return w.createLocation(w.createPath(t,n),r,c.REPLACE)}function r(e,t){R&&R.location===e?u(R,t):O["default"](x,e,function(n,r){n?t(n):r?u(i({},r,{location:e}),t):t()})}function u(e,t){var r=d["default"](j,e),o=r.leaveRoutes,a=r.enterRoutes;y.runLeaveHooks(o),y.runEnterHooks(a,e,function(r,o){r?t(r):o?t(null,n(o)):g["default"](e,function(n,r){n?t(n):t(null,null,j=i({},e,{components:r}))})})}function s(e){return e.__id__||(e.__id__=E++)}function l(e){return e.reduce(function(e,t){return e.push.apply(e,k[s(t)]),e},[])}function p(e,t){O["default"](x,e,function(n,r){if(null==r)return void t();R=i({},r,{location:e});for(var o=l(d["default"](j,R).leaveRoutes),a=void 0,u=0,s=o.length;null==a&&s>u;++u)a=o[u](e);t(a)})}function h(){if(j.routes){for(var e=l(j.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function m(e,t){var n=s(e),r=k[n];if(null==r){var o=!a(k);r=k[n]=[t],o&&(T=w.listenBefore(p),w.listenBeforeUnload&&(A=w.listenBeforeUnload(h)))}else-1===r.indexOf(t)&&r.push(t);return function(){var e=k[n];if(null!=e){var r=e.filter(function(e){return e!==t});0===r.length?(delete k[n],a(k)||(T&&(T(),T=null),A&&(A(),A=null))):k[n]=r}}}function b(e){return w.listen(function(t){j.location===t?e(null,j):r(t,function(t,n,r){t?e(t):n?w.transitionTo(n):r&&e(null,r)})})}var _=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],x=_.routes,P=o(_,["routes"]),w=f["default"](e)(P),j={},R=void 0,E=1,k={},T=void 0,A=void 0;return i({},w,{isActive:t,match:r,listenBeforeLeavingRoute:m,listen:b})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(3),c=(r(s),n(7)),l=n(42),f=r(l),p=n(28),d=r(p),y=n(27),h=n(31),v=r(h),m=n(29),g=r(m),b=n(33),O=r(b);t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:(i["default"](!1,'A path must be pathname + search + hash only, not a fully qualified URL like "%s"',e),e.substring(t[0].length))}function a(e){var t=o(e),n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substring(a),t=t.substring(0,a));var u=t.indexOf("?");return-1!==u&&(n=t.substring(u),t=t.substring(0,u)),""===t&&(t="/"),{pathname:t,search:n,hash:r}}t.__esModule=!0;var u=n(3),i=r(u);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){var r=e(t,n);e.length<2?n(r):u["default"](void 0===r,'You should not "return" in a transition hook with a callback argument; call the callback instead')}t.__esModule=!0;var a=n(3),u=r(a);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e){return 0===e.button}function s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function c(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(1),d=r(p),y=d["default"].PropTypes,h=y.bool,v=y.object,m=y.string,g=y.func,b=function(e){function t(){a(this,t),e.apply(this,arguments)}return u(t,e),t.prototype.handleClick=function(e){var t=!0;if(this.props.onClick&&this.props.onClick(e),!s(e)&&i(e)){if(e.defaultPrevented===!0&&(t=!1),this.props.target)return void(t||e.preventDefault());if(e.preventDefault(),t){var n=this.props,r=n.state,o=n.to,a=n.query,u=n.hash;u&&(o+=u),this.context.history.pushState(r,o,a)}}},t.prototype.render=function(){var e=this,t=this.props,n=t.to,r=t.query,a=t.hash,u=(t.state,t.activeClassName),i=t.activeStyle,s=t.onlyActiveOnIndex,f=o(t,["to","query","hash","state","activeClassName","activeStyle","onlyActiveOnIndex"]);f.onClick=function(t){return e.handleClick(t)};var p=this.context.history;return p&&(f.href=p.createHref(n,r),a&&(f.href+=a),(u||null!=i&&!c(i))&&p.isActive(n,r,s)&&(u&&(f.className+=""===f.className?u:" "+u),i&&(f.style=l({},f.style,i)))),d["default"].createElement("a",f)},f(t,null,[{key:"contextTypes",value:{history:v},enumerable:!0},{key:"propTypes",value:{to:m.isRequired,query:v,hash:m,state:v,activeStyle:v,activeClassName:m,onlyActiveOnIndex:h.isRequired,onClick:g},enumerable:!0},{key:"defaultProps",value:{onlyActiveOnIndex:!1,className:"",style:{}},enumerable:!0}]),t}(p.Component);t["default"]=b,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),s=r(i),c=n(1),l=r(c),f=n(4),p=n(6),d=n(5),y=l["default"].PropTypes,h=y.string,v=y.object,m=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e){var n=f.createRouteFromReactElement(e);return n.from&&(n.path=n.from),n.onEnter=function(e,r){var o=e.location,a=e.params,u=void 0;if("/"===n.to.charAt(0))u=p.formatPattern(n.to,a);else if(n.to){var i=e.routes.indexOf(n),s=t.getRoutePattern(e.routes,i-1),c=s.replace(/\/*$/,"/")+n.to;u=p.formatPattern(c,a)}else u=o.pathname;r(n.state||o.state,u,n.query||o.query)},n},t.getRoutePattern=function(e,t){for(var n="",r=t;r>=0;r--){var o=e[r],a=o.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n},t.prototype.render=function(){s["default"](!1)},u(t,null,[{key:"propTypes",value:{path:h,from:h,to:h.isRequired,query:v,state:v,onEnter:d.falsy,children:d.falsy},enumerable:!0}]),t}(c.Component);t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),s=r(i),c=n(1),l=r(c),f=n(4),p=n(30),d=r(p),y=l["default"].PropTypes,h=y.array,v=y.func,m=y.object,g=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.prototype.getChildContext=function(){var e=this.props,t=e.history,n=e.location;return{history:t,location:n}},t.prototype.createElement=function(e,t){return null==e?null:this.props.createElement(e,t)},t.prototype.render=function(){var e=this,t=this.props,n=t.history,r=t.location,o=t.routes,a=t.params,u=t.components,i=null;return u&&(i=u.reduceRight(function(t,u,i){if(null==u)return t;var s=o[i],c=d["default"](s,a),l={history:n,location:r,params:a,route:s,routeParams:c,routes:o};if(f.isReactChildren(t))l.children=t;else if(t)for(var p in t)t.hasOwnProperty(p)&&(l[p]=t[p]);if("object"==typeof u){var y={};for(var h in u)u.hasOwnProperty(h)&&(y[h]=e.createElement(u[h],l));return y}return e.createElement(u,l)},i)),null===i||i===!1||l["default"].isValidElement(i)?void 0:s["default"](!1),i},u(t,null,[{key:"propTypes",value:{history:m.isRequired,createElement:v.isRequired,location:m.isRequired,routes:h.isRequired,params:m.isRequired,components:h.isRequired},enumerable:!0},{key:"defaultProps",value:{createElement:l["default"].createElement},enumerable:!0},{key:"childContextTypes",value:{history:m.isRequired,location:m.isRequired},enumerable:!0}]),t}(c.Component);t["default"]=g,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function o(){return window.location.href.split("#")[1]||""}function a(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function u(){return window.location.pathname+window.location.search+window.location.hash}function i(e){e&&window.history.go(e)}function s(e,t){t(window.confirm(e))}function c(){var e=navigator.userAgent;return-1===e.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:!1}function l(){var e=navigator.userAgent;return-1===e.indexOf("Firefox")}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=o,t.replaceHashPath=a,t.getWindowPath=u,t.go=i,t.getUserConfirmation=s,t.supportsHistory=c,t.supportsGoWithoutReloadUsingHash=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return Math.random().toString(36).substr(2,e)}function a(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.key===t.key&&c["default"](e.state,t.state)}function u(){function e(e){return L.push(e),function(){L=L.filter(function(t){return t!==e})}}function t(){return U&&U.action===f.POP?H.indexOf(U.key):N?H.indexOf(N.key):-1}function n(e){var n=t();N=e,N.action===f.PUSH?H=[].concat(H.slice(0,n+1),[N.key]):N.action===f.REPLACE&&(H[n]=N.key),q.forEach(function(e){e(N)})}function r(e){if(q.push(e),N)e(N);else{var t=k();H=[t.key],n(t)}return function(){q=q.filter(function(t){return t!==e})}}function u(e,t){l.loopAsync(L.length,function(t,n,r){h["default"](L[t],e,function(e){null!=e?r(e):n()})},function(e){C&&"string"==typeof e?C(e,function(e){t(e!==!1)}):t(e!==!1)})}function s(e){N&&a(N,e)||(U=e,u(e,function(t){if(U===e)if(t)T(e)!==!1&&n(e);else if(N&&e.action===f.POP){var r=H.indexOf(N.key),o=H.indexOf(e.key);-1!==r&&-1!==o&&S(r-o)}}))}function c(e,t){s(x(t,e,f.PUSH,b()))}function p(e,t){s(x(t,e,f.REPLACE,b()))}function y(){S(-1)}function v(){S(1)}function b(){return o(M)}function O(e){if(null==e||"string"==typeof e)return e;var t=e.pathname,n=e.search,r=e.hash,o=t;return n&&(o+=n),r&&(o+=r),o}function _(e){return O(e)}function x(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?b():arguments[3];return d["default"](e,t,n,r)}function P(e){N?(w(N,e),n(N)):w(k(),e)}function w(e,t){e.state=i({},e.state,t),A(e.key,e.state)}function j(e){-1===L.indexOf(e)&&L.push(e)}function R(e){L=L.filter(function(t){return t!==e})}var E=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],k=E.getCurrentLocation,T=E.finishTransition,A=E.saveState,S=E.go,M=E.keyLength,C=E.getUserConfirmation;"number"!=typeof M&&(M=g);var L=[],H=[],q=[],N=void 0,U=void 0;return{listenBefore:e,listen:r,transitionTo:s,pushState:c,replaceState:p,go:S,goBack:y,goForward:v,createKey:b,createPath:O,createHref:_,createLocation:x,setState:m["default"](P,"setState is deprecated; use location.key to save state instead"),registerTransitionHook:m["default"](j,"registerTransitionHook is deprecated; use listenBefore instead"),unregisterTransitionHook:m["default"](R,"unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead")}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(43),c=r(s),l=n(34),f=n(7),p=n(38),d=r(p),y=n(12),h=r(y),v=n(40),m=r(v),g=6;t["default"]=u,e.exports=t["default"]},function(e,t){var n={};n.hexTable=new Array(256);for(var r=0;256>r;++r)n.hexTable[r]="%"+((16>r?"0":"")+r.toString(16)).toUpperCase();t.arrayToObject=function(e,t){for(var n=t.plainObjects?Object.create(null):{},r=0,o=e.length;o>r;++r)"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,r){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):"object"==typeof e?e[n]=!0:e=[e,n],e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e,r));for(var o=Object.keys(n),a=0,u=o.length;u>a;++a){var i=o[a],s=n[i];Object.prototype.hasOwnProperty.call(e,i)?e[i]=t.merge(e[i],s,r):e[i]=s}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;"string"!=typeof e&&(e=""+e);for(var t="",r=0,o=e.length;o>r;++r){var a=e.charCodeAt(r);45===a||46===a||95===a||126===a||a>=48&&57>=a||a>=65&&90>=a||a>=97&&122>=a?t+=e[r]:128>a?t+=n.hexTable[a]:2048>a?t+=n.hexTable[192|a>>6]+n.hexTable[128|63&a]:55296>a||a>=57344?t+=n.hexTable[224|a>>12]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a]:(++r,a=65536+((1023&a)<<10|1023&e.charCodeAt(r)),t+=n.hexTable[240|a>>18]+n.hexTable[128|a>>12&63]+n.hexTable[128|a>>6&63]+n.hexTable[128|63&a])}return t},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;n=n||[];var r=n.indexOf(e);if(-1!==r)return n[r];if(n.push(e),Array.isArray(e)){for(var o=[],a=0,u=e.length;u>a;++a)"undefined"!=typeof e[a]&&o.push(e[a]);return o}var i=Object.keys(e);for(a=0,u=i.length;u>a;++a){var s=i[a];e[s]=t.compact(e[s],n)}return e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null===e||"undefined"==typeof e?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){"use strict";t.__esModule=!0;var r=n(5),o={contextTypes:{history:r.history},componentWillMount:function(){this.history=this.context.history}};t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(1),s=r(i),c=n(13),l=r(c),f=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.prototype.render=function(){return s["default"].createElement(l["default"],u({},this.props,{onlyActiveOnIndex:!0}))},t}(i.Component);t["default"]=f,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3),s=(r(i),n(2)),c=r(s),l=n(1),f=r(l),p=n(14),d=r(p),y=n(5),h=f["default"].PropTypes,v=h.string,m=h.object,g=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e,t){t&&(t.indexRoute=d["default"].createRouteFromReactElement(e))},t.prototype.render=function(){c["default"](!1)},u(t,null,[{key:"propTypes",value:{to:v.isRequired,query:m,state:m,onEnter:y.falsy,children:y.falsy},enumerable:!0}]),t}(l.Component);t["default"]=g,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(3),s=(r(i),n(2)),c=r(s),l=n(1),f=r(l),p=n(4),d=n(5),y=f["default"].PropTypes,h=y.bool,v=y.func,m=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.createRouteFromReactElement=function(e,t){t&&(t.indexRoute=p.createRouteFromReactElement(e))},t.prototype.render=function(){c["default"](!1)},u(t,null,[{key:"propTypes",value:{path:d.falsy,ignoreScrollBehavior:h,component:d.component,components:d.components,getComponents:v},enumerable:!0}]),t}(l.Component);t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),a=r(o),u=n(2),i=r(u),s=a["default"].PropTypes.object,c={contextTypes:{history:s.isRequired,route:s},propTypes:{route:s},componentDidMount:function(){this.routerWillLeave?void 0:i["default"](!1);var e=this.props.route||this.context.route;e?void 0:i["default"](!1),this._unlistenBeforeLeavingRoute=this.context.history.listenBeforeLeavingRoute(e,this.routerWillLeave)},componentWillUnmount:function(){this._unlistenBeforeLeavingRoute&&this._unlistenBeforeLeavingRoute()}};t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=n(2),s=r(i),c=n(1),l=r(c),f=n(4),p=n(5),d=l["default"].PropTypes,y=d.string,h=d.bool,v=d.func,m=function(e){function t(){o(this,t),e.apply(this,arguments)}return a(t,e),t.prototype.render=function(){s["default"](!1)},u(t,null,[{key:"createRouteFromReactElement",value:f.createRouteFromReactElement,enumerable:!0},{key:"propTypes",value:{path:y,ignoreScrollBehavior:h,component:p.component,components:p.components,getComponents:v},enumerable:!0}]),t}(c.Component);t["default"]=m,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(1),a=r(o),u=a["default"].PropTypes.object,i={propTypes:{route:u.isRequired},childContextTypes:{route:u.isRequired},getChildContext:function(){return{route:this.props.route}}};t["default"]=i,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(3),l=(r(c),n(1)),f=r(l),p=n(37),d=r(p),y=n(4),h=n(15),v=r(h),m=n(9),g=r(m),b=n(5),O=f["default"].PropTypes,_=O.func,x=O.object,P=function(e){function t(n,r){a(this,t),e.call(this,n,r),this.state={location:null,routes:null,params:null,components:null}}return u(t,e),s(t,null,[{key:"propTypes",value:{history:x,children:b.routes,routes:b.routes,RoutingContext:_.isRequired,createElement:_,onError:_,onUpdate:_,parseQueryString:_,stringifyQuery:_},enumerable:!0},{key:"defaultProps",value:{RoutingContext:v["default"]},enumerable:!0}]),t.prototype.handleError=function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},t.prototype.componentWillMount=function(){var e=this,t=this.props,n=t.history,r=t.children,o=t.routes,a=t.parseQueryString,u=t.stringifyQuery,i=n?function(){return n}:d["default"];this.history=g["default"](i)({routes:y.createRoutes(o||r),parseQueryString:a,stringifyQuery:u}),this._unlisten=this.history.listen(function(t,n){t?e.handleError(t):e.setState(n,e.props.onUpdate)})},t.prototype.componentWillReceiveProps=function(e){},t.prototype.componentWillUnmount=function(){this._unlisten&&this._unlisten()},t.prototype.render=function(){var e=this.state,n=e.location,r=e.routes,a=e.params,u=e.components,s=this.props,c=s.RoutingContext,l=s.createElement,p=o(s,["RoutingContext","createElement"]);return null==n?null:(Object.keys(t.propTypes).forEach(function(e){return delete p[e]}),f["default"].createElement(c,i({},p,{history:this.history,createElement:l,location:n,routes:r,params:a,components:u})))},t}(l.Component);t["default"]=P,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){return function(n,r,o){e.apply(t,arguments),e.length<3&&o()}}function o(e){return e.reduce(function(e,t){return t.onEnter&&e.push(r(t.onEnter,t)),e},[])}function a(e,t,n){function r(e,t,n){u={pathname:t,query:n,state:e}}var a=o(e);if(!a.length)return void n();var u=void 0;i.loopAsync(a.length,function(e,n,o){a[e](t,r,function(e){e||u?o(e,u):n()})},n)}function u(e){for(var t=0,n=e.length;n>t;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=a,t.runLeaveHooks=u;var i=n(8)},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=a.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function o(e,t){var n=e&&e.routes,o=t.routes,a=void 0,u=void 0;return n?(a=n.filter(function(n){return-1===o.indexOf(n)||r(n,e,t)}),a.reverse(),u=o.filter(function(e){return-1===n.indexOf(e)||-1!==a.indexOf(e)})):(a=[],u=o),{leaveRoutes:a,enterRoutes:u}}t.__esModule=!0;var a=n(6);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){t.component||t.components?n(null,t.component||t.components):t.getComponent?t.getComponent(e,n):t.getComponents?t.getComponents(e,n):n()}function o(e,t){a.mapAsync(e.routes,function(t,n,o){r(e.location,t,o)},t)}t.__esModule=!0;var a=n(8);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=o.getParamNames(e.path);for(var a in t)t.hasOwnProperty(a)&&-1!==r.indexOf(a)&&(n[a]=t[a]);return n}t.__esModule=!0;var o=n(6);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"==typeof e){for(var n in e)if(e.hasOwnProperty(n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!t.hasOwnProperty(n))return!1;if(!r(e[n],t[n]))return!1;
}return!0}return String(e)===String(t)}function o(e,t,n){return e.every(function(e,r){return String(t[r])===String(n[e])})}function a(e,t,n){for(var r=e,a=[],u=[],i=0,s=t.length;s>i;++i){var l=t[i],f=l.path||"";if("/"===f.charAt(0)&&(r=e,a=[],u=[]),null!==r){var p=c.matchPattern(f,r);r=p.remainingPathname,a=[].concat(a,p.paramNames),u=[].concat(u,p.paramValues)}if(""===r&&l.path&&o(a,u,n))return i}return null}function u(e,t,n,r){var o=a(e,t,n);return null===o?!1:r?t.slice(o+1).every(function(e){return!e.path}):!0}function i(e,t){return null==t?null==e:null==e?!0:r(e,t)}function s(e,t,n,r,o,a){return null==r?!1:u(e,o,a,n)?i(t,r.query):!1}t.__esModule=!0;var c=n(6);t["default"]=s,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=e.routes,r=e.location,o=e.parseQueryString,u=e.stringifyQuery,s=e.basename;r?void 0:i["default"](!1);var c=h({routes:p.createRoutes(n),parseQueryString:o,stringifyQuery:u,basename:s});"string"==typeof r&&(r=c.createLocation(r)),c.match(r,function(e,n,r){t(e,n,r&&a({},r,{history:c}))})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(2),i=r(u),s=n(39),c=r(s),l=n(41),f=r(l),p=n(4),d=n(9),y=r(d),h=y["default"](f["default"](c["default"]));t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){e.childRoutes?n(null,e.childRoutes):e.getChildRoutes?e.getChildRoutes(t,function(e,t){n(e,!e&&d.createRoutes(t))}):n()}function a(e,t,n){e.indexRoute?n(null,e.indexRoute):e.getIndexRoute?e.getIndexRoute(t,function(e,t){n(e,!e&&d.createRoutes(t)[0])}):e.childRoutes?!function(){var r=e.childRoutes.filter(function(e){return!e.hasOwnProperty("path")});f.loopAsync(r.length,function(e,n,o){a(r[e],t,function(t,a){if(t||a){var u=[r[e]].concat(Array.isArray(a)?a:[a]);o(t,u)}else n()})},function(e,t){n(null,t)})}():n()}function u(e,t,n){return t.reduce(function(e,t,r){var o=n&&n[r];return Array.isArray(e[t])?e[t].push(o):t in e?e[t]=[e[t],o]:e[t]=o,e},e)}function i(e,t){return u({},e,t)}function s(e,t,n,r,u,s){var l=e.path||"";if("/"===l.charAt(0)&&(n=t.pathname,r=[],u=[]),null!==n){var f=p.matchPattern(l,n);if(n=f.remainingPathname,r=[].concat(r,f.paramNames),u=[].concat(u,f.paramValues),""===n&&e.path){var d=function(){var n={routes:[e],params:i(r,u)};return a(e,t,function(e,t){if(e)s(e);else{if(Array.isArray(t)){var r;(r=n.routes).push.apply(r,t)}else t&&n.routes.push(t);s(null,n)}}),{v:void 0}}();if("object"==typeof d)return d.v}}null!=n||e.childRoutes?o(e,t,function(o,a){o?s(o):a?c(a,t,function(t,n){t?s(t):n?(n.routes.unshift(e),s(null,n)):s()},n,r,u):s()}):s()}function c(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?t.pathname:arguments[3],o=arguments.length<=4||void 0===arguments[4]?[]:arguments[4],a=arguments.length<=5||void 0===arguments[5]?[]:arguments[5];return function(){f.loopAsync(e.length,function(n,u,i){s(e[n],t,r,o,a,function(e,t){e||t?i(e,t):u()})},n)}()}t.__esModule=!0;var l=n(3),f=(r(l),n(8)),p=n(6),d=n(4);t["default"]=c,e.exports=t["default"]},function(e,t){"use strict";function n(e,t,n){function r(){u=!0,n.apply(this,arguments)}function o(){u||(e>a?t.call(this,a++,o,r):r.apply(this,arguments))}var a=0,u=!1;o()}t.__esModule=!0,t.loopAsync=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return c+e}function a(e,t){try{window.sessionStorage.setItem(o(e),JSON.stringify(t))}catch(n){if(n.name===l||0===window.sessionStorage.length)return void s["default"](!1,"[history] Unable to save state; sessionStorage is not available in Safari private mode");throw n}}function u(e){var t=window.sessionStorage.getItem(o(e));if(t)try{return JSON.parse(t)}catch(n){}return null}t.__esModule=!0,t.saveState=a,t.readState=u;var i=n(3),s=r(i),c="@@History/",l="QuotaExceededError"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){function t(e){return i["default"](s.canUseDOM,"DOM history needs a DOM"),n.listen(e)}var n=f["default"](a({getUserConfirmation:c.getUserConfirmation},e,{go:c.go}));return a({},n,{listen:t})}t.__esModule=!0;var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(2),i=r(u),s=n(10),c=n(16),l=n(17),f=r(l);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return"string"==typeof e&&"/"===e.charAt(0)}function a(){var e=m.getHashPath();return o(e)?!0:(m.replaceHashPath("/"+e),!1)}function u(e,t,n){return e+(-1===e.indexOf("?")?"?":"&")+(t+"="+n)}function i(e,t){return e.replace(new RegExp("[?&]?"+t+"=[a-zA-Z0-9]+"),"")}function s(e,t){var n=e.match(new RegExp("\\?.*?\\b"+t+"=(.+?)\\b"));return n&&n[1]}function c(){function e(){var e=m.getHashPath(),t=void 0,n=void 0;return j?(t=s(e,j),e=i(e,j),t?n=g.readState(t):(n=null,t=R.createKey(),m.replaceHashPath(u(e,j,t)))):t=n=null,R.createLocation(e,n,void 0,t)}function t(t){function n(){a()&&r(e())}var r=t.transitionTo;return a(),m.addEventListener(window,"hashchange",n),function(){m.removeEventListener(window,"hashchange",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,o=e.state,a=e.action,i=e.key;if(a!==h.POP){var s=(t||"")+n+r;j&&(s=u(s,j,i)),s===m.getHashPath()?p["default"](!1,"You cannot %s the same path using hash history",a):(j?g.saveState(i,o):e.key=e.state=null,a===h.PUSH?window.location.hash=s:m.replaceHashPath(s))}}function r(e){1===++E&&(k=t(R));var n=R.listenBefore(e);return function(){n(),0===--E&&k()}}function o(e){1===++E&&(k=t(R));var n=R.listen(e);return function(){n(),0===--E&&k()}}function c(e,t){p["default"](j||null==e,"You cannot use state without a queryKey it will be dropped"),R.pushState(e,t)}function f(e,t){p["default"](j||null==e,"You cannot use state without a queryKey it will be dropped"),R.replaceState(e,t)}function d(e){p["default"](T,"Hash history go(n) causes a full page reload in this browser"),R.go(e)}function b(e){return"#"+R.createHref(e)}function x(e){1===++E&&(k=t(R)),R.registerTransitionHook(e)}function P(e){R.unregisterTransitionHook(e),0===--E&&k()}var w=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];y["default"](v.canUseDOM,"Hash history needs a DOM");var j=w.queryKey;(void 0===j||j)&&(j="string"==typeof j?j:_);var R=O["default"](l({},w,{getCurrentLocation:e,finishTransition:n,saveState:g.saveState})),E=0,k=void 0,T=m.supportsGoWithoutReloadUsingHash();return l({},R,{listenBefore:r,listen:o,pushState:c,replaceState:f,go:d,createHref:b,registerTransitionHook:x,unregisterTransitionHook:P})}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=n(3),p=r(f),d=n(2),y=r(d),h=n(7),v=n(10),m=n(16),g=n(35),b=n(36),O=r(b),_="_k";t["default"]=c,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){var e=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],t=arguments.length<=1||void 0===arguments[1]?null:arguments[1],n=arguments.length<=2||void 0===arguments[2]?a.POP:arguments[2],r=arguments.length<=3||void 0===arguments[3]?null:arguments[3];"string"==typeof e&&(e=i["default"](e));var o=e.pathname||"/",u=e.search||"",s=e.hash||"";return{pathname:o,search:u,hash:s,state:t,action:n,key:r}}t.__esModule=!0;var a=n(7),u=n(11),i=r(u);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.filter(function(e){return e.state}).reduce(function(e,t){return e[t.key]=t.state,e},{})}function a(){function e(e,t){v[e]=t}function t(e){return v[e]}function n(){var e=y[h],n=e.key,r=e.basename,o=e.pathname,a=e.search,u=(r||"")+o+(a||""),i=void 0;return n?i=t(n):(i=null,n=p.createKey(),e.key=n),p.createLocation(u,i,void 0,n)}function r(e){var t=h+e;return t>=0&&t<y.length}function a(e){if(e){s["default"](r(e),"Cannot go(%s) there is not enough history",e),h+=e;var t=n();p.transitionTo(u({},t,{action:c.POP}))}}function i(t){switch(t.action){case c.PUSH:h+=1,h<y.length&&y.splice(h),y.push(t),e(t.key,t.state);break;case c.REPLACE:y[h]=t,e(t.key,t.state)}}var l=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];Array.isArray(l)?l={entries:l}:"string"==typeof l&&(l={entries:[l]});var p=f["default"](u({},l,{getCurrentLocation:n,finishTransition:i,saveState:e,go:a})),d=l,y=d.entries,h=d.current;"string"==typeof y?y=[y]:Array.isArray(y)||(y=["/"]),y=y.map(function(e){var t=p.createKey();return"string"==typeof e?{pathname:e,key:t}:"object"==typeof e&&e?u({},e,{key:t}):void s["default"](!1,"Unable to create history entry from %s",e)}),null==h?h=y.length-1:s["default"](h>=0&&h<y.length,"Current index must be >= 0 and < %s, was %s",y.length,h);var v=o(y);return p}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(2),s=r(i),c=n(7),l=n(17),f=r(l);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return function(){return u["default"](!1,"[history] "+t),e.apply(this,arguments)}}t.__esModule=!0;var a=n(3),u=r(a);t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return function(){function t(e){return v&&null==e.basename&&(0===e.pathname.indexOf(v)?(e.pathname=e.pathname.substring(v.length),e.basename=v,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function n(e){if(!v)return e;"string"==typeof e&&(e=f["default"](e));var t=e.pathname,n="/"===v.slice(-1)?v:v+"/",r="/"===t.charAt(0)?t.slice(1):t,o=n+r;return u({},e,{pathname:o})}function r(e){return g.listenBefore(function(n,r){c["default"](e,t(n),r)})}function a(e){return g.listen(function(n){e(t(n))})}function s(e,t){g.pushState(e,n(t))}function l(e,t){g.replaceState(e,n(t))}function p(e){return g.createPath(n(e))}function d(e){return g.createHref(n(e))}function y(){return t(g.createLocation.apply(g,arguments))}var h=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],v=h.basename,m=o(h,["basename"]),g=e(m);if(null==v&&i.canUseDOM){var b=document.getElementsByTagName("base")[0];b&&(v=b.href)}return u({},g,{listenBefore:r,listen:a,pushState:s,replaceState:l,createPath:p,createHref:d,createLocation:y})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i=n(10),s=n(12),c=r(s),l=n(11),f=r(l);t["default"]=a,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return l["default"].stringify(e,{arrayFormat:"brackets"})}function u(e){return l["default"].parse(e)}function i(e){return function(){function t(e){return null==e.query&&(e.query=g(e.search.substring(1))),e}function n(e,t){var n=void 0;if(!t||""===(n=m(t)))return e;"string"==typeof e&&(e=y["default"](e));var r=e.search+(e.search?"&":"?")+n;return s({},e,{search:r})}function r(e){return O.listenBefore(function(n,r){p["default"](e,t(n),r)})}function i(e){return O.listen(function(n){e(t(n))})}function c(e,t,r){return O.pushState(e,n(t,r))}function l(e,t,r){return O.replaceState(e,n(t,r))}function f(e,t){return O.createPath(n(e,t))}function d(e,t){return O.createHref(n(e,t))}function h(){return t(O.createLocation.apply(O,arguments))}var v=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],m=v.stringifyQuery,g=v.parseQueryString,b=o(v,["stringifyQuery","parseQueryString"]),O=e(b);return"function"!=typeof m&&(m=a),"function"!=typeof g&&(g=u),s({},O,{listenBefore:r,listen:i,pushState:c,replaceState:l,createPath:f,createHref:d,createLocation:h})}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c=n(46),l=r(c),f=n(12),p=r(f),d=n(11),y=r(d);t["default"]=i,e.exports=t["default"]},function(e,t,n){function r(e){return null===e||void 0===e}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:e.length>0&&"number"!=typeof e[0]?!1:!0:!1}function a(e,t,n){var a,l;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(s(e))return s(t)?(e=u.call(e),t=u.call(t),c(e,t,n)):!1;if(o(e)){if(!o(t))return!1;if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}try{var f=i(e),p=i(t)}catch(d){return!1}if(f.length!=p.length)return!1;for(f.sort(),p.sort(),a=f.length-1;a>=0;a--)if(f[a]!=p[a])return!1;for(a=f.length-1;a>=0;a--)if(l=f[a],!c(e[l],t[l],n))return!1;return typeof e==typeof t}var u=Array.prototype.slice,i=n(45),s=n(44),c=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:a(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=o?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t,n){var r=n(48),o=n(47);e.exports={stringify:r,parse:o}},function(e,t,n){var r=n(18),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3,strictNullHandling:!1,plainObjects:!1,allowPrototypes:!1};o.parseValues=function(e,t){for(var n={},o=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),a=0,u=o.length;u>a;++a){var i=o[a],s=-1===i.indexOf("]=")?i.indexOf("="):i.indexOf("]=")+1;if(-1===s)n[r.decode(i)]="",t.strictNullHandling&&(n[r.decode(i)]=null);else{var c=r.decode(i.slice(0,s)),l=r.decode(i.slice(s+1));Object.prototype.hasOwnProperty.call(n,c)?n[c]=[].concat(n[c]).concat(l):n[c]=l}}return n},o.parseObject=function(e,t,n){if(!e.length)return t;var r,a=e.shift();if("[]"===a)r=[],r=r.concat(o.parseObject(e,t,n));else{r=n.plainObjects?Object.create(null):{};var u="["===a[0]&&"]"===a[a.length-1]?a.slice(1,a.length-1):a,i=parseInt(u,10),s=""+i;!isNaN(i)&&a!==u&&s===u&&i>=0&&n.parseArrays&&i<=n.arrayLimit?(r=[],r[i]=o.parseObject(e,t,n)):r[u]=o.parseObject(e,t,n)}return r},o.parseKeys=function(e,t,n){if(e){n.allowDots&&(e=e.replace(/\.([^\.\[]+)/g,"[$1]"));var r=/^([^\[\]]*)/,a=/(\[[^\[\]]*\])/g,u=r.exec(e),i=[];if(u[1]){if(!n.plainObjects&&Object.prototype.hasOwnProperty(u[1])&&!n.allowPrototypes)return;i.push(u[1])}for(var s=0;null!==(u=a.exec(e))&&s<n.depth;)++s,(n.plainObjects||!Object.prototype.hasOwnProperty(u[1].replace(/\[|\]/g,""))||n.allowPrototypes)&&i.push(u[1]);return u&&i.push("["+e.slice(u.index)+"]"),o.parseObject(i,t,n)}},e.exports=function(e,t){if(t=t||{},t.delimiter="string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:o.delimiter,t.depth="number"==typeof t.depth?t.depth:o.depth,t.arrayLimit="number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,t.parseArrays=t.parseArrays!==!1,t.allowDots=t.allowDots!==!1,t.plainObjects="boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,t.allowPrototypes="boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,t.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,t.strictNullHandling="boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling,""===e||null===e||"undefined"==typeof e)return t.plainObjects?Object.create(null):{};for(var n="string"==typeof e?o.parseValues(e,t):e,a=t.plainObjects?Object.create(null):{},u=Object.keys(n),i=0,s=u.length;s>i;++i){var c=u[i],l=o.parseKeys(c,n[c],t);a=r.merge(a,l,t)}return r.compact(a)}},function(e,t,n){var r=n(18),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e,t){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e,t){return e}},strictNullHandling:!1};o.stringify=function(e,t,n,a,u){if("function"==typeof u)e=u(t,e);else if(r.isBuffer(e))e=e.toString();else if(e instanceof Date)e=e.toISOString();else if(null===e){if(a)return r.encode(t);e=""}if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[r.encode(t)+"="+r.encode(e)];var i=[];if("undefined"==typeof e)return i;for(var s=Array.isArray(u)?u:Object.keys(e),c=0,l=s.length;l>c;++c){var f=s[c];i=Array.isArray(e)?i.concat(o.stringify(e[f],n(t,f),n,a,u)):i.concat(o.stringify(e[f],t+"["+f+"]",n,a,u))}return i},e.exports=function(e,t){t=t||{};var n,r,a="undefined"==typeof t.delimiter?o.delimiter:t.delimiter,u="boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling;"function"==typeof t.filter?(r=t.filter,e=r("",e)):Array.isArray(t.filter)&&(n=r=t.filter);var i=[];if("object"!=typeof e||null===e)return"";var s;s=t.arrayFormat in o.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";var c=o.arrayPrefixGenerators[s];n||(n=Object.keys(e));for(var l=0,f=n.length;f>l;++l){var p=n[l];i=i.concat(o.stringify(e[p],p,c,u,r))}return i.join(a)}}])});

@@ -19,2 +19,20 @@ Upgrade Guide

### Importing
The new `Router` component is a property of the top-level module.
```js
// v0.13.x
var Router = require('react-router');
var Route = Router.Route;
// v1.0
var ReactRouter = require('react-router');
var Router = ReactRouter.Router;
var Route = ReactRouter.Route;
// or using object destructuring
var { Router, Route } = require('react-router');
```
### Rendering

@@ -25,10 +43,10 @@

Router.run(routes, (Handler) => {
React.render(<Handler/>, el);
render(<Handler/>, el);
})
// v1.0
React.render(<Router>{routes}</Router>, el)
render(<Router>{routes}</Router>, el)
// looks more like this:
React.render((
render((
<Router>

@@ -40,3 +58,3 @@ <Route path="/" component={App}/>

// or if you'd rather
React.render(<Router routes={routes}/>, el)
render(<Router routes={routes}/>, el)
```

@@ -52,3 +70,3 @@

Router.run(routes, Router.BrowserHistory, (Handler) => {
React.render(<Handler/>, el);
render(<Handler/>, el);
})

@@ -59,3 +77,3 @@

let history = createBrowserHistory()
React.render(<Router history={history}>{routes}</Router>, el)
render(<Router history={history}>{routes}</Router>, el)
```

@@ -147,6 +165,4 @@

will always be active. So we've introduced `IndexLink` that is only
active when the index route is active.
active when on exactly that path.
**Note:** `DefaultRoute` is gone.
```js

@@ -173,2 +189,8 @@ // v0.13.x

#### onClick handler
For consistency with React v0.14, returning `false` from a `Link`'s `onClick`
handler no longer prevents the transition. To prevent the transition, call
`e.preventDefault()` instead.
### RouteHandler

@@ -186,5 +208,7 @@

{this.props.children}
{React.cloneElement(this.props.children, {someExtraProp: something })}
{React.cloneElement(this.props.children, {someExtraProp: something})}
```
**Note:** React does not validate `propTypes` that are specified via `cloneElement` (see: [facebook/react#4494](https://github.com/facebook/react/issues/4494#issuecomment-125068868)). It is recommended to make such `propTypes` optional.
### Navigation Mixin

@@ -272,9 +296,10 @@

| v0.13 (this) | v1.0 (this.props) |
|-----------------|------------------------------------|
| `getPath()` | `location.pathname+location.search` |
| `getPathname()` | `location.pathname` |
| `getParams()` | `params` |
| `getQuery()` | `location.search` |
| `getRoutes()` | `routes` |
| v0.13 (this) | v1.0 (this.props) |
|-------------------|------------------------------------|
| `getPath()` | `location.pathname+location.search`|
| `getPathname()` | `location.pathname` |
| `getParams()` | `params` |
| `getQuery()` | `location.search` |
| `getQueryParams()`| `location.query` |
| `getRoutes()` | `routes` |
| `isActive(to, params, query)` | `history.isActive(pathname, query, onlyActiveOnIndex)` |

@@ -285,7 +310,8 @@

| v0.13 (this) | v1.0 (this.context) |
|-----------------|------------------------------------|
| `getPath()` | `location.pathname+location.search`|
| `getPathname()` | `location.pathname` |
| `getQuery()` | `location.search` |
| v0.13 (this) | v1.0 (this.context) |
|-------------------|------------------------------------|
| `getPath()` | `location.pathname+location.search`|
| `getPathname()` | `location.pathname` |
| `getQuery()` | `location.search` |
| `getQueryParams()`| `location.query` |
| `isActive(to, params, query)` | `history.isActive(pathname, query, onlyActiveOnIndex)` |

@@ -292,0 +318,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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