Socket
Socket
Sign inDemoInstall

react-router

Package Overview
Dependencies
5
Maintainers
2
Versions
433
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0-beta1 to 1.0.0-beta2

4

doc/02 Components/Route Component.md

@@ -17,4 +17,4 @@ A user-defined component given to a `Route` as the `component` prop. The

<Route path="/" component={App}>
<Route path="groups" components={Groups}}/>
<Route path="users" components={Users}}/>
<Route path="groups" components={Groups}/>
<Route path="users" components={Users}/>
</Route>

@@ -21,0 +21,0 @@ </Router>

@@ -46,6 +46,6 @@ `BrowserHistory` is a [history][Histories] implementation for DOM environments that

import { Router } from 'react-router';
import History from 'react-router/lib/BrowserHistory';
import BrowserHistory from 'react-router/lib/BrowserHistory';
React.render((
<Router history={History}>
<Router history={new BrowserHistory}>
{/* ... */}

@@ -52,0 +52,0 @@ </Router>

@@ -36,6 +36,6 @@ `HashHistory` is a [history][Histories] implementation for DOM environments that

import { Router } from 'react-router';
import History from 'react-router/lib/HashHistory';
import HashHistory from 'react-router/lib/HashHistory';
React.render((
<Router history={History}>
<Router history={new HashHistory}>
{/* ... */}

@@ -49,3 +49,3 @@ </Router>

```js
import { HashHistory } from 'react-router/lib/HashHistory';
import HashHistory from 'react-router/lib/HashHistory';

@@ -52,0 +52,0 @@ // use the default key which is `_key`

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.__esModule = true;
exports.loopAsync = loopAsync;

@@ -7,0 +5,0 @@ exports.mapAsync = mapAsync;

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
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; };

@@ -50,3 +44,3 @@

_get(Object.getPrototypeOf(BrowserHistory.prototype), 'constructor', this).call(this, options);
_DOMHistory.call(this, options);
this.handlePopState = this.handlePopState.bind(this);

@@ -58,93 +52,84 @@ this.isSupported = (0, _DOMUtils.supportsHistory)();

_createClass(BrowserHistory, [{
key: '_updateLocation',
value: function _updateLocation(navigationType) {
var state = null;
BrowserHistory.prototype._updateLocation = function _updateLocation(navigationType) {
var state = null;
if (this.isSupported) {
var historyState = window.history.state;
state = this._createState(historyState);
if (this.isSupported) {
var historyState = window.history.state;
state = this._createState(historyState);
if (!historyState || !historyState.key) window.history.replaceState(state, '');
}
this.location = this.createLocation((0, _DOMUtils.getWindowPath)(), state, navigationType);
if (!historyState || !historyState.key) window.history.replaceState(state, '');
}
}, {
key: 'setup',
value: function setup() {
if (this.location == null) this._updateLocation();
}
}, {
key: 'handlePopState',
value: function handlePopState(event) {
if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.
this._updateLocation(_NavigationTypes2['default'].POP);
this._notifyChange();
}
}, {
key: 'addChangeListener',
value: function addChangeListener(listener) {
_get(Object.getPrototypeOf(BrowserHistory.prototype), 'addChangeListener', this).call(this, listener);
this.location = this.createLocation((0, _DOMUtils.getWindowPath)(), state, navigationType);
};
if (this.changeListeners.length === 1) {
if (window.addEventListener) {
window.addEventListener('popstate', this.handlePopState, false);
} else {
window.attachEvent('onpopstate', this.handlePopState);
}
}
}
}, {
key: 'removeChangeListener',
value: function removeChangeListener(listener) {
_get(Object.getPrototypeOf(BrowserHistory.prototype), 'removeChangeListener', this).call(this, listener);
BrowserHistory.prototype.setup = function setup() {
if (this.location == null) this._updateLocation();
};
if (this.changeListeners.length === 0) {
if (window.removeEventListener) {
window.removeEventListener('popstate', this.handlePopState, false);
} else {
window.removeEvent('onpopstate', this.handlePopState);
}
}
}
}, {
key: 'pushState',
BrowserHistory.prototype.handlePopState = function handlePopState(event) {
if (event.state === undefined) return; // Ignore extraneous popstate events in WebKit.
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-pushstate
value: function pushState(state, path) {
if (this.isSupported) {
updateCurrentState(this.getScrollPosition());
this._updateLocation(_NavigationTypes2['default'].POP);
this._notifyChange();
};
state = this._createState(state);
BrowserHistory.prototype.addChangeListener = function addChangeListener(listener) {
_DOMHistory.prototype.addChangeListener.call(this, listener);
window.history.pushState(state, '', path);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
this._notifyChange();
if (this.changeListeners.length === 1) {
if (window.addEventListener) {
window.addEventListener('popstate', this.handlePopState, false);
} else {
window.location = path;
window.attachEvent('onpopstate', this.handlePopState);
}
}
}, {
key: 'replaceState',
};
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-replacestate
value: function replaceState(state, path) {
if (this.isSupported) {
state = this._createState(state);
BrowserHistory.prototype.removeChangeListener = function removeChangeListener(listener) {
_DOMHistory.prototype.removeChangeListener.call(this, listener);
window.history.replaceState(state, '', path);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
this._notifyChange();
if (this.changeListeners.length === 0) {
if (window.removeEventListener) {
window.removeEventListener('popstate', this.handlePopState, false);
} else {
window.location.replace(path);
window.removeEvent('onpopstate', this.handlePopState);
}
}
}]);
};
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-pushstate
BrowserHistory.prototype.pushState = function pushState(state, path) {
if (this.isSupported) {
updateCurrentState(this.getScrollPosition());
state = this._createState(state);
window.history.pushState(state, '', path);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
this._notifyChange();
} else {
window.location = path;
}
};
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-replacestate
BrowserHistory.prototype.replaceState = function replaceState(state, path) {
if (this.isSupported) {
state = this._createState(state);
window.history.replaceState(state, '', path);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
this._notifyChange();
} else {
window.location.replace(path);
}
};
return BrowserHistory;
})(_DOMHistory3['default']);
exports.BrowserHistory = BrowserHistory;
exports['default'] = new BrowserHistory();
exports['default'] = BrowserHistory;
module.exports = exports['default'];
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -33,3 +27,3 @@

_get(Object.getPrototypeOf(DOMHistory.prototype), 'constructor', this).call(this, options);
_History.call(this, options);
this.getScrollPosition = options.getScrollPosition || _DOMUtils.getWindowScrollPosition;

@@ -40,10 +34,7 @@ }

_createClass(DOMHistory, [{
key: 'go',
value: function go(n) {
if (n === 0) return;
DOMHistory.prototype.go = function go(n) {
if (n === 0) return;
window.history.go(n);
}
}]);
window.history.go(n);
};

@@ -50,0 +41,0 @@ return DOMHistory;

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.getHashPath = getHashPath;

@@ -7,0 +5,0 @@ exports.replaceHashPath = replaceHashPath;

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ 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; };

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
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; };

@@ -89,5 +83,5 @@

* support is not enabled by default. In order to use it, create your own
* HashHistory, like this:
* HashHistory.
*
* import { HashHistory } from 'react-router/lib/HashHistory';
* import HashHistory from 'react-router/lib/HashHistory';
* var StatefulHashHistory = new HashHistory({ queryKey: '_key' });

@@ -103,3 +97,3 @@ * React.render(<Router history={StatefulHashHistory} .../>, ...);

_get(Object.getPrototypeOf(HashHistory.prototype), 'constructor', this).call(this, options);
_DOMHistory.call(this, options);
this.handleHashChange = this.handleHashChange.bind(this);

@@ -113,100 +107,90 @@ this.queryKey = options.queryKey;

_createClass(HashHistory, [{
key: '_updateLocation',
value: function _updateLocation(navigationType) {
var path = (0, _DOMUtils.getHashPath)();
var state = this.queryKey ? readState(path, this.queryKey) : null;
this.location = this.createLocation(path, state, navigationType);
HashHistory.prototype._updateLocation = function _updateLocation(navigationType) {
var path = (0, _DOMUtils.getHashPath)();
var state = this.queryKey ? readState(path, this.queryKey) : null;
this.location = this.createLocation(path, state, navigationType);
};
HashHistory.prototype.setup = function setup() {
if (this.location == null) {
ensureSlash();
this._updateLocation();
}
}, {
key: 'setup',
value: function setup() {
if (this.location == null) {
ensureSlash();
this._updateLocation();
}
};
HashHistory.prototype.handleHashChange = function handleHashChange() {
if (!ensureSlash()) return;
if (this._ignoreNextHashChange) {
this._ignoreNextHashChange = false;
} else {
this._updateLocation(_NavigationTypes2['default'].POP);
this._notifyChange();
}
}, {
key: 'handleHashChange',
value: function handleHashChange() {
if (!ensureSlash()) return;
};
if (this._ignoreNextHashChange) {
this._ignoreNextHashChange = false;
HashHistory.prototype.addChangeListener = function addChangeListener(listener) {
_DOMHistory.prototype.addChangeListener.call(this, listener);
if (this.changeListeners.length === 1) {
if (window.addEventListener) {
window.addEventListener('hashchange', this.handleHashChange, false);
} else {
this._updateLocation(_NavigationTypes2['default'].POP);
this._notifyChange();
window.attachEvent('onhashchange', this.handleHashChange);
}
}
}, {
key: 'addChangeListener',
value: function addChangeListener(listener) {
_get(Object.getPrototypeOf(HashHistory.prototype), 'addChangeListener', this).call(this, listener);
};
if (this.changeListeners.length === 1) {
if (window.addEventListener) {
window.addEventListener('hashchange', this.handleHashChange, false);
} else {
window.attachEvent('onhashchange', this.handleHashChange);
}
}
}
}, {
key: 'removeChangeListener',
value: function removeChangeListener(listener) {
_get(Object.getPrototypeOf(HashHistory.prototype), 'removeChangeListener', this).call(this, listener);
HashHistory.prototype.removeChangeListener = function removeChangeListener(listener) {
_DOMHistory.prototype.removeChangeListener.call(this, listener);
if (this.changeListeners.length === 0) {
if (window.removeEventListener) {
window.removeEventListener('hashchange', this.handleHashChange, false);
} else {
window.removeEvent('onhashchange', this.handleHashChange);
}
if (this.changeListeners.length === 0) {
if (window.removeEventListener) {
window.removeEventListener('hashchange', this.handleHashChange, false);
} else {
window.removeEvent('onhashchange', this.handleHashChange);
}
}
}, {
key: 'pushState',
value: function pushState(state, path) {
(0, _warning2['default'])(this.queryKey || state == null, 'HashHistory needs a queryKey in order to persist state');
};
if (this.queryKey) updateCurrentState(this.queryKey, this.getScrollPosition());
HashHistory.prototype.pushState = function pushState(state, path) {
(0, _warning2['default'])(this.queryKey || state == null, 'HashHistory needs a queryKey in order to persist state');
state = this._createState(state);
if (this.queryKey) updateCurrentState(this.queryKey, this.getScrollPosition());
if (this.queryKey) path = saveState(path, this.queryKey, state);
state = this._createState(state);
this._ignoreNextHashChange = true;
window.location.hash = path;
if (this.queryKey) path = saveState(path, this.queryKey, state);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
this._ignoreNextHashChange = true;
window.location.hash = path;
this._notifyChange();
}
}, {
key: 'replaceState',
value: function replaceState(state, path) {
state = this._createState(state);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
if (this.queryKey) path = saveState(path, this.queryKey, state);
this._notifyChange();
};
this._ignoreNextHashChange = true;
(0, _DOMUtils.replaceHashPath)(path);
HashHistory.prototype.replaceState = function replaceState(state, path) {
state = this._createState(state);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
if (this.queryKey) path = saveState(path, this.queryKey, state);
this._notifyChange();
}
}, {
key: 'makeHref',
value: function makeHref(pathname, query) {
return '#' + _get(Object.getPrototypeOf(HashHistory.prototype), 'makeHref', this).call(this, pathname, query);
}
}]);
this._ignoreNextHashChange = true;
(0, _DOMUtils.replaceHashPath)(path);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
this._notifyChange();
};
HashHistory.prototype.makeHref = function makeHref(pathname, query) {
return '#' + _DOMHistory.prototype.makeHref.call(this, pathname, query);
};
return HashHistory;
})(_DOMHistory3['default']);
exports.HashHistory = HashHistory;
exports['default'] = new HashHistory();
exports['default'] = HashHistory;
module.exports = exports['default'];
// Ignore invalid JSON in session storage.
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
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; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -54,48 +50,39 @@

_createClass(History, [{
key: '_notifyChange',
value: function _notifyChange() {
for (var i = 0, len = this.changeListeners.length; i < len; ++i) this.changeListeners[i].call(this);
}
}, {
key: 'addChangeListener',
value: function addChangeListener(listener) {
this.changeListeners.push(listener);
}
}, {
key: 'removeChangeListener',
value: function removeChangeListener(listener) {
this.changeListeners = this.changeListeners.filter(function (li) {
return li !== listener;
});
}
}, {
key: 'back',
value: function back() {
this.go(-1);
}
}, {
key: 'forward',
value: function forward() {
this.go(1);
}
}, {
key: '_createState',
value: function _createState(state) {
state = state || {};
History.prototype._notifyChange = function _notifyChange() {
for (var i = 0, len = this.changeListeners.length; i < len; ++i) this.changeListeners[i].call(this);
};
if (!state.key) state.key = createRandomKey();
History.prototype.addChangeListener = function addChangeListener(listener) {
this.changeListeners.push(listener);
};
return state;
}
}, {
key: 'createLocation',
value: function createLocation(path, state, navigationType) {
var pathname = (0, _URLUtils.getPathname)(path);
var queryString = (0, _URLUtils.getQueryString)(path);
var query = queryString ? this.parseQueryString(queryString) : null;
return new _Location2['default'](pathname, query, state, navigationType);
}
}]);
History.prototype.removeChangeListener = function removeChangeListener(listener) {
this.changeListeners = this.changeListeners.filter(function (li) {
return li !== listener;
});
};
History.prototype.back = function back() {
this.go(-1);
};
History.prototype.forward = function forward() {
this.go(1);
};
History.prototype._createState = function _createState(state) {
state = state || {};
if (!state.key) state.key = createRandomKey();
return state;
};
History.prototype.createLocation = function createLocation(path, state, navigationType) {
var pathname = (0, _URLUtils.getPathname)(path);
var queryString = (0, _URLUtils.getQueryString)(path);
var query = queryString ? this.parseQueryString(queryString) : null;
return new _Location2['default'](pathname, query, state, navigationType);
};
return History;

@@ -102,0 +89,0 @@ })();

/* components */
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -60,8 +58,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

Object.defineProperty(exports, 'createRoutesFromReactChildren', {
enumerable: true,
get: function get() {
return _RouteUtils.createRoutesFromReactChildren;
}
});
exports.createRoutesFromReactChildren = _RouteUtils.createRoutesFromReactChildren;

@@ -68,0 +61,0 @@ var _PropTypes2 = require('./PropTypes');

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ 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; };

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
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; }; })();
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -39,8 +35,5 @@

_createClass(Location, null, [{
key: 'isLocation',
value: function isLocation(object) {
return object instanceof Location;
}
}]);
Location.isLocation = function isLocation(object) {
return object instanceof Location;
};

@@ -47,0 +40,0 @@ return Location;

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

@@ -47,3 +41,3 @@

_get(Object.getPrototypeOf(MemoryHistory.prototype), 'constructor', this).call(this);
_History.call(this);

@@ -76,59 +70,51 @@ if (entries == null) {

_createClass(MemoryHistory, [{
key: 'pushState',
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-pushstate
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-pushstate
value: function pushState(state, path) {
state = this._createState(state);
MemoryHistory.prototype.pushState = function pushState(state, path) {
state = this._createState(state);
this.current += 1;
this.entries = this.entries.slice(0, this.current).concat([{ state: state, path: path }]);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
this.current += 1;
this.entries = this.entries.slice(0, this.current).concat([{ state: state, path: path }]);
this.location = this.createLocation(path, state, _NavigationTypes2['default'].PUSH);
this._notifyChange();
}
}, {
key: 'replaceState',
this._notifyChange();
};
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-replacestate
value: function replaceState(state, path) {
state = this._createState(state);
// http://www.w3.org/TR/2011/WD-html5-20110113/history.html#dom-history-replacestate
this.entries[this.current] = { state: state, path: path };
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
MemoryHistory.prototype.replaceState = function replaceState(state, path) {
state = this._createState(state);
this._notifyChange();
}
}, {
key: 'go',
value: function go(n) {
if (n === 0) return;
this.entries[this.current] = { state: state, path: path };
this.location = this.createLocation(path, state, _NavigationTypes2['default'].REPLACE);
(0, _invariant2['default'])(this.canGo(n), '%s cannot go(%s) because there is not enough history', this.constructor.name, n);
this._notifyChange();
};
this.current += n;
var currentEntry = this.entries[this.current];
MemoryHistory.prototype.go = function go(n) {
if (n === 0) return;
this.location = this.createLocation(currentEntry.path, currentEntry.state, _NavigationTypes2['default'].POP);
(0, _invariant2['default'])(this.canGo(n), '%s cannot go(%s) because there is not enough history', this.constructor.name, n);
this._notifyChange();
}
}, {
key: 'canGo',
value: function canGo(n) {
var index = this.current + n;
return index >= 0 && index < this.entries.length;
}
}, {
key: 'canGoBack',
value: function canGoBack() {
return this.canGo(-1);
}
}, {
key: 'canGoForward',
value: function canGoForward() {
return this.canGo(1);
}
}]);
this.current += n;
var currentEntry = this.entries[this.current];
this.location = this.createLocation(currentEntry.path, currentEntry.state, _NavigationTypes2['default'].POP);
this._notifyChange();
};
MemoryHistory.prototype.canGo = function canGo(n) {
var index = this.current + n;
return index >= 0 && index < this.entries.length;
};
MemoryHistory.prototype.canGoBack = function canGoBack() {
return this.canGo(-1);
};
MemoryHistory.prototype.canGoForward = function canGoForward() {
return this.canGo(1);
};
return MemoryHistory;

@@ -135,0 +121,0 @@ })(_History3['default']);

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -19,5 +17,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _URLUtils = require('./URLUtils');
var _PropTypes = require('./PropTypes');
var string = _react2['default'].PropTypes.string;
var _React$PropTypes = _react2['default'].PropTypes;
var string = _React$PropTypes.string;
var object = _React$PropTypes.object;
var Redirect = _react2['default'].createClass({

@@ -33,4 +35,9 @@ displayName: 'Redirect',

route.onEnter = function (nextState, router) {
router.replaceWith(route.to, nextState.query);
route.onEnter = function (nextState, transition) {
var location = nextState.location;
var params = nextState.params;
var pathname = route.to ? (0, _URLUtils.formatPattern)(route.to, params) : location.pathname;
transition.to(pathname, route.query || location.query, route.state || location.state);
};

@@ -44,4 +51,7 @@

propTypes: {
from: string,
path: string,
from: string, // Alias for path
to: string.isRequired,
query: object,
state: object,
onEnter: _PropTypes.falsy,

@@ -48,0 +58,0 @@ children: _PropTypes.falsy

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -21,2 +19,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _warning = require('warning');
var _warning2 = _interopRequireDefault(_warning);
var _React$PropTypes = _react2['default'].PropTypes;

@@ -46,3 +48,3 @@ var string = _React$PropTypes.string;

if (route.handler) {
warning(false, '<Route handler> is deprecated, use <Route component> instead');
(0, _warning2['default'])(false, '<Route handler> is deprecated, use <Route component> instead');
route.component = route.handler;

@@ -49,0 +51,0 @@ delete route.handler;

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ 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; };

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ 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; };

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.getState = getState;

@@ -14,4 +12,2 @@ exports.createTransitionHook = createTransitionHook;

function _slicedToArray(arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }
var _invariant = require('invariant');

@@ -228,7 +224,5 @@

var _computeDiff2 = _slicedToArray(_computeDiff, 2);
var leavingRoutes = _computeDiff[0];
var enteringRoutes = _computeDiff[1];
var leavingRoutes = _computeDiff2[0];
var enteringRoutes = _computeDiff2[1];
var hooks = getTransitionHooksFromRoutes(leavingRoutes, 'onLeave');

@@ -235,0 +229,0 @@

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.__esModule = true;
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; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

@@ -20,16 +16,12 @@

_createClass(Transition, [{
key: "to",
value: function to(pathname, query, state) {
this.redirectInfo = { pathname: pathname, query: query, state: state };
this.isCancelled = true;
}
}, {
key: "abort",
value: function abort(reason) {
this.abortReason = reason;
this.isCancelled = true;
}
}]);
Transition.prototype.to = function to(pathname, query, state) {
this.redirectInfo = { pathname: pathname, query: query, state: state };
this.isCancelled = true;
};
Transition.prototype.abort = function abort(reason) {
this.abortReason = reason;
this.isCancelled = true;
};
return Transition;

@@ -36,0 +28,0 @@ })();

'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;

@@ -7,0 +5,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

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

!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}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(17),i=r(o);t.Router=i["default"];var a=n(13),u=r(a);t.Link=u["default"];var s=n(15),c=r(s);t.Redirect=c["default"];var l=n(16),f=r(l);t.Route=f["default"];var p=n(14),d=r(p);t.Navigation=d["default"];var h=n(23),y=r(h);t.TransitionHook=y["default"];var m=n(21),v=r(m);t.State=v["default"];var g=n(3);Object.defineProperty(t,"createRoutesFromReactChildren",{enumerable:!0,get:function(){return g.createRoutesFromReactChildren}});var b=n(4),P=r(b);t.PropTypes=P["default"];var R=r(o);t["default"]=R["default"]},function(t){t.exports=e},function(e){"use strict";var t=function(e,t,n,r,o,i,a,u){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,i,a,u],l=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return c[l++]}))}throw s.framesToPop=1,s}};e.exports=t},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||f.isValidElement(e)}function i(e){return o(e)||Array.isArray(e)&&e.every(o)}function a(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 u(e){var t=e.type,n=l({},t.defaultProps,e.props);return t.propTypes&&a(t.displayName||t.name,t.propTypes,n),n.children&&(n.childRoutes=s(n.children),delete n.children),n}function s(e){var t=[];return p["default"].Children.forEach(e,function(e){f.isValidElement(e)&&t.push(e.type.createRouteFromReactElement?e.type.createRouteFromReactElement(e):u(e))}),t}function c(e){return i(e)?e=s(e):Array.isArray(e)||(e=[e]),e}Object.defineProperty(t,"__esModule",{value:!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};t.isReactChildren=i,t.createRouteFromReactElement=u,t.createRoutesFromReactChildren=s,t.createRoutes=c;var f=n(1),p=r(f),d=n(7),h=r(d)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}var i=n(1),a=r(i),u=n(5),s=r(u),c=n(12),l=r(c),f=a["default"].PropTypes,p=f.func,d=f.object,h=f.arrayOf,y=f.instanceOf,m=f.oneOfType,v=f.element,g=p,b=m([g,d]),P=y(l["default"]),R=y(s["default"]),O=m([d,v]),_=m([O,h(O)]);e.exports={falsy:o,component:g,components:b,history:P,location:R,route:O,routes:_}},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")}Object.defineProperty(t,"__esModule",{value:!0});var i=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}}(),a=n(9),u=r(a),s=function(){function e(){var t=void 0===arguments[0]?"/":arguments[0],n=void 0===arguments[1]?null:arguments[1],r=void 0===arguments[2]?null:arguments[2],i=void 0===arguments[3]?u["default"].POP:arguments[3];o(this,e),this.pathname=t,this.query=n,this.state=r,this.navigationType=i}return i(e,null,[{key:"isLocation",value:function(t){return t instanceof e}}]),e}();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){return m["default"].stringify(e,{arrayFormat:"brackets"})}function i(e){return e.replace(g,"")}function a(e){var t=e.match(g);return t?t[1]:""}function u(e){return e?e.replace(/^\/+/,""):""}function s(e){return"string"==typeof e&&"/"===e.charAt(0)}function c(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){return c(e).replace(/\/+/g,"/+")}function f(e){for(var t,n="",r=[],o=[],i=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;t=a.exec(e);)t.index!==i&&(o.push(e.slice(i,t.index)),n+=l(e.slice(i,t.index))),t[1]?(n+="([^/?#]+)",r.push(t[1])):"*"===t[0]?(n+="(.*?)",r.push("splat")):"("===t[0]?n+="(?:":")"===t[0]&&(n+=")?"),o.push(t[0]),i=a.lastIndex;return i!==e.length&&(o.push(e.slice(i,e.length)),n+=l(e.slice(i,e.length))),{pattern:e,regexpSource:n,paramNames:r,tokens:o}}function p(e){return e in b||(b[e]=f(e)),b[e]}function d(e,t){var n=p(u(e)),r=n.regexpSource,o=n.paramNames,i=n.tokens;r+="/*";var a="*"!==i[i.length-1];a&&(r+="(.*?)");var s,c,l=t.match(new RegExp("^"+r+"$","i"));return null!=l&&(c=Array.prototype.slice.call(l,1),s=a?c.pop():t.replace(l[0],"")),{remainingPathname:s,paramNames:o,paramValues:c}}function h(e){return p(e).paramNames}Object.defineProperty(t,"__esModule",{value:!0}),t.stringifyQuery=o,t.getPathname=i,t.getQueryString=a,t.stripLeadingSlashes=u,t.isAbsolutePath=s,t.compilePattern=p,t.matchPattern=d,t.getParamNames=h;var y=n(25),m=r(y),v=m["default"].parse;t.parseQueryString=v;var g=/\?(.*)$/,b={}},function(e){"use strict";var t=!1,n=function(){};t&&(n=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;r>o;o++)n[o-2]=arguments[o];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(t.length<10||/^[s\W]*$/.test(t))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+t);if(!e){var i=0,a="Warning: "+t.replace(/%s/g,function(){n[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(u){}}}),e.exports=n},function(e,t){"use strict";function n(e,t,n){function r(){a=!0,n.apply(this,arguments)}function o(){a||(e>i?(i+=1,t.call(this,i-1,o,r)):r.apply(this,arguments))}var i=0,a=!1;o()}function r(e,t,n){function r(e,t,r){a||(t?(a=!0,n(t)):(i[e]=r,a=++u===o,a&&n(null,i)))}var o=e.length,i=[];if(0===o)return n(null,i);var a=!1,u=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}function o(e,t,n){var o=Object.keys(e);r(o,function(n,r,o){t(e[n],o)},function(e,t){if(e)n(e);else{var r=t.reduce(function(e,t,n){return e[o[n]]=t,e},{});n(null,r)}})}Object.defineProperty(t,"__esModule",{value:!0}),t.loopAsync=n,t.mapAsync=r,t.hashAsync=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(24),i=r(o),a=i["default"]({PUSH:null,REPLACE:null,POP:null});t["default"]=a,e.exports=t["default"]},function(e,t){t.arrayToObject=function(e){for(var t={},n=0,r=e.length;r>n;++n)"undefined"!=typeof e[n]&&(t[n]=e[n]);return t},t.merge=function(e,n){if(!n)return e;if("object"!=typeof n)return Array.isArray(e)?e.push(n):e[n]=!0,e;if("object"!=typeof e)return e=[e].concat(n);Array.isArray(e)&&!Array.isArray(n)&&(e=t.arrayToObject(e));for(var r=Object.keys(n),o=0,i=r.length;i>o;++o){var a=r[o],u=n[a];e[a]=e[a]?t.merge(e[a],u):u}return e},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},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=[],i=0,a=e.length;a>i;++i)"undefined"!=typeof e[i]&&o.push(e[i]);return o}var u=Object.keys(e);for(i=0,a=u.length;a>i;++i){var s=u[i];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){"use strict";function n(){return decodeURI(window.location.href.split("#")[1]||"")}function r(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function o(){return decodeURI(window.location.pathname+window.location.search)}function i(){return{scrollX:window.pageXOffset||document.documentElement.scrollLeft,scrollY:window.pageYOffset||document.documentElement.scrollTop}}function a(e,t){window.scrollTo(e,t)}function u(){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}Object.defineProperty(t,"__esModule",{value:!0}),t.getHashPath=n,t.replaceHashPath=r,t.getWindowPath=o,t.getWindowScrollPosition=i,t.setWindowScrollPosition=a,t.supportsHistory=u;var s=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=s},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 i(){return Math.random().toString(36).substr(2)}Object.defineProperty(t,"__esModule",{value:!0});var a=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}}(),u=n(2),s=r(u),c=n(6),l=n(5),f=r(l),p=["pushState","replaceState","go"],d=function(){function e(){var t=void 0===arguments[0]?{}:arguments[0];o(this,e),p.forEach(function(e){s["default"]("function"==typeof this[e],'%s needs a "%s" method',this.constructor.name,e)},this),this.parseQueryString=t.parseQueryString||c.parseQueryString,this.changeListeners=[],this.location=null}return a(e,[{key:"_notifyChange",value:function(){for(var e=0,t=this.changeListeners.length;t>e;++e)this.changeListeners[e].call(this)}},{key:"addChangeListener",value:function(e){this.changeListeners.push(e)}},{key:"removeChangeListener",value:function(e){this.changeListeners=this.changeListeners.filter(function(t){return t!==e})}},{key:"back",value:function(){this.go(-1)}},{key:"forward",value:function(){this.go(1)}},{key:"_createState",value:function(e){return e=e||{},e.key||(e.key=i()),e}},{key:"createLocation",value:function(e,t,n){var r=c.getPathname(e),o=c.getQueryString(e),i=o?this.parseQueryString(o):null;return new f["default"](r,i,t,n)}}]),e}();t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return 0===e.button}function i(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}Object.defineProperty(t,"__esModule",{value:!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(1),s=r(u),c=s["default"].PropTypes,l=c.object,f=c.string,p=c.func,d=s["default"].createClass({displayName:"Link",contextTypes:{router:l},propTypes:{activeStyle:l,activeClassName:f,to:f.isRequired,query:l,state:l,onClick:p},getDefaultProps:function(){return{className:"",activeClassName:"active",style:{}}},handleClick:function(e){var t,n=!0;this.props.onClick&&(t=this.props.onClick(e)),!i(e)&&o(e)&&((t===!1||e.defaultPrevented===!0)&&(n=!1),e.preventDefault(),n&&this.context.router.transitionTo(this.props.to,this.props.query,this.props.state))},render:function(){var e=this.context.router,t=this.props,n=t.to,r=t.query,o=a({},this.props,{href:e.makeHref(n,r),onClick:this.handleClick});return e&&e.isActive(n,r)&&(o.activeClassName&&(o.className+=" "+o.activeClassName),o.activeStyle&&a(o.style,o.activeStyle)),s["default"].createElement("a",o)}});t.Link=d,t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=i["default"].PropTypes.object,u={contextTypes:{router:a.isRequired}},s=["makePath","makeHref","transitionTo","replaceWith","go","goBack","goForward"];s.forEach(function(e){u[e]=function(){var t=this.context.router;return t[e].apply(t,arguments)}}),t["default"]=u,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(2),u=r(a),s=n(3),c=n(4),l=i["default"].PropTypes.string,f=i["default"].createClass({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=s.createRouteFromReactElement(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){n.replaceWith(t.to,e.query)},t}},propTypes:{from:l,to:l.isRequired,onEnter:c.falsy,children:c.falsy},render:function(){u["default"](!1,"<Redirect> elements are for router configuration only and should not be rendered")}});t.Redirect=f,t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(2),u=r(a),s=n(3),c=n(4),l=i["default"].PropTypes,f=l.string,p=l.bool,d=l.func,h=i["default"].createClass({displayName:"Route",statics:{createRouteFromReactElement:function(e){var t=s.createRouteFromReactElement(e);return t.handler&&(warning(!1,"<Route handler> is deprecated, use <Route component> instead"),t.component=t.handler,delete t.handler),t}},propTypes:{path:f,ignoreScrollBehavior:p,handler:c.component,component:c.component,components:c.components,getComponents:d},render:function(){u["default"](!1,"<Route> elements are for router configuration only and should not be rendered")}});t.Route=h,t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n,r,o){var i=new O["default"];h.getState(t,n,function(t,a){if(t||null==a||i.isCancelled)o(t,null,i);else{a.location=n;var u=h.getTransitionHooks(e,a);Array.isArray(r)&&u.unshift.apply(u,r),p.loopAsync(u.length,function(e,t,n){u[e](a,i,function(e){e||i.isCancelled?n(e):t()})},function(e){e||i.isCancelled?o(e,null,i):h.getComponents(a.branch,function(e,t){e||i.isCancelled?o(e,null,i):(a.components=t,o(null,a,i))})})}})}Object.defineProperty(t,"__esModule",{value:!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},a=n(1),u=r(a),s=n(7),c=r(s),l=n(2),f=r(l),p=n(8),d=n(3),h=n(19),y=n(4),m=n(18),v=r(m),g=n(20),b=r(g),P=n(5),R=n(22),O=r(R),_=u["default"].PropTypes,w=_.arrayOf,x=_.func,k=_.object,j=u["default"].createClass({displayName:"Router",mixins:[v["default"],b["default"]],statics:{run:function(e,t,n,r){"function"==typeof n&&(r=n,n=null),f["default"]("function"==typeof r,"Router.run needs a callback"),o(null,e,t,n,r)}},propTypes:{createElement:x.isRequired,onAbort:x,onError:x,onUpdate:x,history:y.history,routes:y.routes,children:y.routes,location:y.location,branch:y.routes,params:k,components:w(y.components)},getDefaultProps:function(){return{createElement:a.createElement}},getInitialState:function(){return{isTransitioning:!1,location:null,branch:null,params:null,components:null}},_updateState:function(e){var t=this;f["default"](P.isLocation(e),"A <Router> needs a valid Location");var n=this.transitionHooks;n&&(n=n.map(function(e){return h.createTransitionHook(e,t)})),this.setState({isTransitioning:!0}),o(this.state,this.routes,e,n,function(n,r,o){if(n)t.handleError(n);else if(o.isCancelled)if(o.redirectInfo){var i=o.redirectInfo,a=i.pathname,u=i.query,r=i.state;t.replaceWith(a,u,r)}else f["default"](t.state.location,"You may not abort the initial transition"),t.handleAbort(reason);else null==r?c["default"](!1,'Location "%s" did not match any routes',e.pathname):t.setState(r,t.props.onUpdate);t.setState({isTransitioning:!1})})},addTransitionHook:function(e){this.transitionHooks||(this.transitionHooks=[]),this.transitionHooks.push(e)},removeTransitionHook:function(e){this.transitionHooks&&(this.transitionHooks=this.transitionHooks.filter(function(t){return t!==e}))},handleAbort:function(e){this.props.onAbort?this.props.onAbort.call(this,e):(this._ignoreNextHistoryChange=!0,this.goBack())},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},handleHistoryChange:function(){this._ignoreNextHistoryChange?this._ignoreNextHistoryChange=!1:this._updateState(this.props.history.location)},componentWillMount:function(){var e=this.props,t=e.history,n=e.routes,r=e.children,o=e.location,i=e.branch,a=e.params,u=e.components;t?(f["default"](n||r,"Client-side <Router>s need routes. Try using <Router routes> or passing your routes as nested <Route> children"),this.routes=d.createRoutes(n||r),"function"==typeof t.setup&&t.setup(),t.addChangeListener&&t.addChangeListener(this.handleHistoryChange),this._updateState(t.location)):(f["default"](o&&i&&a&&u,"Server-side <Router>s need location, branch, params, and components props. Try using Router.run to get all the props you need"),this.setState({location:o,branch:i,params:a,components:u}))},componentWillReceiveProps:function(e){if(f["default"](this.props.history===e.history,"<Router history> may not be changed"),e.history){var t=this.props.routes||this.props.children,n=e.routes||e.children;t!==n&&(this.routes=d.createRoutes(n),e.history.location&&this._updateState(e.history.location))}},componentWillUnmount:function(){var e=this.props.history;e&&e.removeChangeListener&&e.removeChangeListener(this.handleHistoryChange)},_createElement:function(e,t){return"function"==typeof e?this.props.createElement(e,t):null},render:function(){var e=this,t=this.state,n=t.location,r=t.branch,o=t.params,u=t.components,s=t.isTransitioning,c=null;return u&&(c=u.reduceRight(function(t,u,c){if(null==u)return t;var l=r[c],f=h.getRouteParams(l,o),p={location:n,params:o,route:l,routeParams:f,isTransitioning:s};if(a.isValidElement(t)?p.children=t:t&&i(p,t),"object"==typeof u){var d={};for(var y in u)u.hasOwnProperty(y)&&(d[y]=e._createElement(u[y],p));return d}return e._createElement(u,p)},c)),f["default"](null===c||c===!1||a.isValidElement(c),"The root route must render a single element"),c}});t["default"]=j,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 0===l.stripLeadingSlashes(t).indexOf(l.stripLeadingSlashes(e))?!0:!1}function i(e,t){if(null==t)return null==e;if(null==e)return!0;for(var n in e)if(e.hasOwnProperty(n)&&String(e[n])!==String(t[n]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),u=r(a),s=n(2),c=r(s),l=n(6),f=u["default"].PropTypes,p=f.func,d=f.object,h={propTypes:{stringifyQuery:p.isRequired},getDefaultProps:function(){return{stringifyQuery:l.stringifyQuery}},childContextTypes:{router:d.isRequired},getChildContext:function(){return{router:this}},makePath:function(e,t){return t&&("string"!=typeof t&&(t=this.props.stringifyQuery(t)),""!==t)?e+"?"+t:e},makeHref:function(e,t){return this.makePath(e,t)},transitionTo:function(e,t){var n=void 0===arguments[2]?null:arguments[2],r=this.props.history;c["default"](r,"Router#transitionTo is client-side only (needs history)"),r.pushState(n,this.makePath(e,t))},replaceWith:function(e,t){var n=void 0===arguments[2]?null:arguments[2],r=this.props.history;c["default"](r,"Router#replaceWith is client-side only (needs history)"),r.replaceState(n,this.makePath(e,t))},go:function(e){var t=this.props.history;c["default"](t,"Router#go is client-side only (needs history)"),t.go(e)},goBack:function(){this.go(-1)},goForward:function(){this.go(1)},isActive:function(e,t){var n=this.state.location;return null==n?!1:o(e,n.pathname)&&i(t,n.query)}};t["default"]=h,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(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(s){o=!0,i=s}finally{try{!r&&u["return"]&&u["return"]()}finally{if(o)throw i}}return n}throw new TypeError("Invalid attempt to destructure non-iterable instance")}function i(e,t,n){e.childRoutes?n(null,e.childRoutes):e.getChildRoutes?e.getChildRoutes(t,n):n()}function a(e,t,n){e.indexRoute?n(null,e.indexRoute):e.getIndexRoute?e.getIndexRoute(n,t):n()}function u(e,t,n){return t.reduceRight(function(e,t,r){var o=n[r];return Array.isArray(e[t])?e[t].unshift(o):e[t]=t in e?[o,e[t]]:o,e},e)}function s(e,t){return u({},e,t)}function c(e,t,n,r){var o=O.matchPattern(e.path,t),c=o.remainingPathname,f=o.paramNames,p=o.paramValues,d=""===c;if(d&&e.path){var h=s(f,p),y=[e];a(e,n,function(e,t){e?r(e):(t&&y.push(t),r(null,{params:h,branch:y}))})}else null!=c?i(e,n,function(t,o){t?r(t):o?l(o,c,n,function(t,n){t?r(t):n?(u(n.params,f,p),n.branch.unshift(e),r(null,n)):r()}):r()}):r()}function l(e,t,n,r){e=R.createRoutes(e),_.loopAsync(e.length,function(r,o,i){c(e[r],t,n,function(e,t){e||t?i(e,t):o()})},r)}function f(e,t,n){l(e,O.stripLeadingSlashes(t.pathname),t.state,n)}function p(e,t,n){if(!e.path)return!1;var r=O.getParamNames(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function d(e,t){var n,r,o=e&&e.branch,i=t.branch;return o?(n=o.filter(function(n){return-1===i.indexOf(n)||p(n,e,t)}),n.reverse(),r=i.filter(function(e){return-1===o.indexOf(e)||-1!==n.indexOf(e)})):(n=[],r=i),[n,r]}function h(e,t){return function(n,r,o){e.length>2?e.call(t,n,r,o):(e.call(t,n,r),o())}}function y(e,t){return e.reduce(function(e,n){return n[t]&&e.push(h(n[t],n)),e},[])}function m(e,t){var n=d(e,t),r=o(n,2),i=r[0],a=r[1],u=y(i,"onLeave");return u.push.apply(u,y(a,"onEnter")),u}function v(e,t){e.component||e.components?t(null,e.component||e.components):e.getComponents?e.getComponents(t):t()}function g(e,t){_.mapAsync(e,function(e,t,n){v(e,n)},t)}function b(e,t){var n={};if(!e.path)return n;var r=O.getParamNames(e.path);for(var o in t)t.hasOwnProperty(o)&&-1!==r.indexOf(o)&&(n[o]=t[o]);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.getState=f,t.createTransitionHook=h,t.getTransitionHooks=m,t.getComponents=g,t.getRouteParams=b;var P=n(2),R=(r(P),n(3)),O=n(6),_=n(8)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return e.filter(function(e){return-1!==t.indexOf(e)})}function i(e,t){var n=e.location,r=e.branch,i=t.location,a=t.branch;if(n.pathname===i.pathname)return!1;var u=o(r,a);return u.some(function(e){return e.ignoreScrollBehavior})?!1:!0}function a(e,t,n){c.canUseDOM&&(e===f["default"].POP?c.setWindowScrollPosition(t,n):c.setWindowScrollPosition(0,0))}Object.defineProperty(t,"__esModule",{value:!0});var u=n(1),s=r(u),c=n(11),l=n(9),f=r(l),p=s["default"].PropTypes.func,d={propTypes:{shouldUpdateScrollPosition:p.isRequired,updateScrollPosition:p.isRequired},getDefaultProps:function(){return{shouldUpdateScrollPosition:i,updateScrollPosition:a}},componentDidUpdate:function(e,t){var n=this.state.location,r=n&&n.state;if(r&&this.props.shouldUpdateScrollPosition(this.state,t)){var o=r.scrollX,i=r.scrollY;null!=o&&null!=i&&this.props.updateScrollPosition(n.navigationType,o,i)}}};t["default"]=d,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=i["default"].PropTypes.object,u={contextTypes:{router:a.isRequired}},s=["isActive"];s.forEach(function(e){u[e]=function(){var t=this.context.router;return t[e].apply(t,arguments)}}),t["default"]=u,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var r=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}}(),o=function(){function e(){n(this,e),this.isCancelled=!1,this.redirectInfo=null,this.abortReason=null}return r(e,[{key:"to",value:function(e,t,n){this.redirectInfo={pathname:e,query:t,state:n},this.isCancelled=!0}},{key:"abort",value:function(e){this.abortReason=e,this.isCancelled=!0}}]),e}();t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),i=r(o),a=n(7),u=r(a),s=i["default"].PropTypes.object,c={contextTypes:{router:s.isRequired},componentDidMount:function(){u["default"]("function"==typeof this.routerWillLeave,"Components that mixin TransitionHook should have a routerWillLeave method, check %s",this.constructor.displayName||this.constructor.name),this.routerWillLeave&&this.context.router.addTransitionHook(this.routerWillLeave)},componentWillUnmount:function(){this.routerWillLeave&&this.context.router.removeTransitionHook(this.routerWillLeave)}};t["default"]=c,e.exports=t["default"]},function(e){"use strict";var t=function(e){var t,n={};if(!(e instanceof Object)||Array.isArray(e))throw new Error("keyMirror(...): Argument must be an object.");for(t in e)e.hasOwnProperty(t)&&(n[t]=t);return n};e.exports=t},function(e,t,n){e.exports=n(26)},function(e,t,n){var r=n(28),o=n(27);e.exports={stringify:r,parse:o}},function(e,t,n){var r=n(10),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3};o.parseValues=function(e,t){for(var n={},o=e.split(t.delimiter,1/0===t.parameterLimit?void 0:t.parameterLimit),i=0,a=o.length;a>i;++i){var u=o[i],s=-1===u.indexOf("]=")?u.indexOf("="):u.indexOf("]=")+1;if(-1===s)n[r.decode(u)]="";else{var c=r.decode(u.slice(0,s)),l=r.decode(u.slice(s+1));if(Object.prototype.hasOwnProperty(c))continue;n[c]=n.hasOwnProperty(c)?[].concat(n[c]).concat(l):l}}return n},o.parseObject=function(e,t,n){if(!e.length)return t;var r=e.shift(),i={};if("[]"===r)i=[],i=i.concat(o.parseObject(e,t,n));else{var a="["===r[0]&&"]"===r[r.length-1]?r.slice(1,r.length-1):r,u=parseInt(a,10),s=""+u;!isNaN(u)&&r!==a&&s===a&&u>=0&&u<=n.arrayLimit?(i=[],i[u]=o.parseObject(e,t,n)):i[a]=o.parseObject(e,t,n)}return i},o.parseKeys=function(e,t,n){if(e){var r=/^([^\[\]]*)/,i=/(\[[^\[\]]*\])/g,a=r.exec(e);if(!Object.prototype.hasOwnProperty(a[1])){var u=[];a[1]&&u.push(a[1]);for(var s=0;null!==(a=i.exec(e))&&s<n.depth;)++s,Object.prototype.hasOwnProperty(a[1].replace(/\[|\]/g,""))||u.push(a[1]);return a&&u.push("["+e.slice(a.index)+"]"),o.parseObject(u,t,n)}}},e.exports=function(e,t){if(""===e||null===e||"undefined"==typeof e)return{};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.parameterLimit="number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit;for(var n="string"==typeof e?o.parseValues(e,t):e,i={},a=Object.keys(n),u=0,s=a.length;s>u;++u){var c=a[u],l=o.parseKeys(c,n[c],t);i=r.merge(i,l)}return r.compact(i)}},function(e,t,n){var r=n(10),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}}};o.stringify=function(e,t,n){if(r.isBuffer(e)?e=e.toString():e instanceof Date?e=e.toISOString():null===e&&(e=""),"string"==typeof e||"number"==typeof e||"boolean"==typeof e)return[encodeURIComponent(t)+"="+encodeURIComponent(e)];var i=[];if("undefined"==typeof e)return i;for(var a=Object.keys(e),u=0,s=a.length;s>u;++u){var c=a[u];i=i.concat(Array.isArray(e)?o.stringify(e[c],n(t,c),n):o.stringify(e[c],t+"["+c+"]",n))}return i},e.exports=function(e,t){t=t||{};var n="undefined"==typeof t.delimiter?o.delimiter:t.delimiter,r=[];if("object"!=typeof e||null===e)return"";var i;i=t.arrayFormat in o.arrayPrefixGenerators?t.arrayFormat:"indices"in t?t.indices?"indices":"repeat":"indices";for(var a=o.arrayPrefixGenerators[i],u=Object.keys(e),s=0,c=u.length;c>s;++s){var l=u[s];r=r.concat(o.stringify(e[l],l,a))}return r.join(n)}}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react")):"function"==typeof define&&define.amd?define(["react"],e):"object"==typeof exports?exports.ReactRouter=e(require("react")):t.ReactRouter=e(t.React)}(this,function(t){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(17),i=r(o);e.Router=i["default"];var a=n(13),s=r(a);e.Link=s["default"];var u=n(15),c=r(u);e.Redirect=c["default"];var l=n(16),f=r(l);e.Route=f["default"];var p=n(14),d=r(p);e.Navigation=d["default"];var h=n(23),m=r(h);e.TransitionHook=m["default"];var y=n(21),g=r(y);e.State=g["default"];var v=n(3);e.createRoutesFromReactChildren=v.createRoutesFromReactChildren;var R=n(4),_=r(R);e.PropTypes=_["default"];var b=r(o);e["default"]=b["default"]},function(e){e.exports=t},function(t){"use strict";var e=function(t,e,n,r,o,i,a,s){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,i,a,s],l=0;u=new Error("Invariant Violation: "+e.replace(/%s/g,function(){return c[l++]}))}throw u.framesToPop=1,u}};t.exports=e},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return null==t||f.isValidElement(t)}function i(t){return o(t)||Array.isArray(t)&&t.every(o)}function a(t,e,n){t=t||"UnknownComponent";for(var r in e)if(e.hasOwnProperty(r)){var o=e[r](n,r,t);o instanceof Error&&h["default"](!1,o.message)}}function s(t){var e=t.type,n=l({},e.defaultProps,t.props);return e.propTypes&&a(e.displayName||e.name,e.propTypes,n),n.children&&(n.childRoutes=u(n.children),delete n.children),n}function u(t){var e=[];return p["default"].Children.forEach(t,function(t){f.isValidElement(t)&&e.push(t.type.createRouteFromReactElement?t.type.createRouteFromReactElement(t):s(t))}),e}function c(t){return i(t)?t=u(t):Array.isArray(t)||(t=[t]),t}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t};e.isReactChildren=i,e.createRouteFromReactElement=s,e.createRoutesFromReactChildren=u,e.createRoutes=c;var f=n(1),p=r(f),d=n(6),h=r(d)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){return t[e]?new Error("<"+n+'> should not have a "'+e+'" prop'):void 0}var i=n(1),a=r(i),s=n(7),u=r(s),c=n(12),l=r(c),f=a["default"].PropTypes,p=f.func,d=f.object,h=f.arrayOf,m=f.instanceOf,y=f.oneOfType,g=f.element,v=p,R=y([v,d]),_=m(l["default"]),b=m(u["default"]),x=y([d,g]),w=y([x,h(x)]);t.exports={falsy:o,component:v,components:R,history:_,location:b,route:x,routes:w}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return g["default"].stringify(t,{arrayFormat:"brackets"})}function i(t){return t.replace(b,"")}function a(t){var e=t.match(b);return e?e[1]:""}function s(t){return t?t.replace(/^\/+/,""):""}function u(t){return"string"==typeof t&&"/"===t.charAt(0)}function c(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(t){return c(t).replace(/\/+/g,"/+")}function f(t){for(var e,n="",r=[],o=[],i=0,a=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*|\(|\)/g;e=a.exec(t);)e.index!==i&&(o.push(t.slice(i,e.index)),n+=l(t.slice(i,e.index))),e[1]?(n+="([^/?#]+)",r.push(e[1])):"*"===e[0]?(n+="(.*?)",r.push("splat")):"("===e[0]?n+="(?:":")"===e[0]&&(n+=")?"),o.push(e[0]),i=a.lastIndex;return i!==t.length&&(o.push(t.slice(i,t.length)),n+=l(t.slice(i,t.length))),{pattern:t,regexpSource:n,paramNames:r,tokens:o}}function p(t){return t in x||(x[t]=f(t)),x[t]}function d(t,e){var n=p(s(t)),r=n.regexpSource,o=n.paramNames,i=n.tokens;r+="/*";var a="*"!==i[i.length-1];a&&(r+="(.*?)");var u,c,l=e.match(new RegExp("^"+r+"$","i"));return null!=l&&(c=Array.prototype.slice.call(l,1),u=a?c.pop():e.replace(l[0],"")),{remainingPathname:u,paramNames:o,paramValues:c}}function h(t){return p(t).paramNames}function m(t,e){e=e||{};for(var n,r,o,i=p(t),a=i.tokens,s=0,u="",c=0,l=0,f=a.length;f>l;++l)n=a[l],"*"===n?(o=Array.isArray(e.splat)?e.splat[c++]:e.splat,R["default"](null!=o||s>0,'Missing splat #%s for path "%s"',c,t),null!=o&&(u+=o)):"("===n?s+=1:")"===n?s-=1:":"===n.charAt(0)?(r=n.substring(1),o=e[r],R["default"](null!=o||s>0,'Missing "%s" parameter for path "%s"',r,t),null!=o&&(u+=o)):u+=n;return u.replace(/\/+/g,"/")}e.__esModule=!0,e.stringifyQuery=o,e.getPathname=i,e.getQueryString=a,e.stripLeadingSlashes=s,e.isAbsolutePath=u,e.compilePattern=p,e.matchPattern=d,e.getParamNames=h,e.formatPattern=m;var y=n(25),g=r(y),v=n(2),R=r(v),_=g["default"].parse;e.parseQueryString=_;var b=/\?(.*)$/,x={}},function(t){"use strict";var e=!1,n=function(){};e&&(n=function(t,e,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var o=2;r>o;o++)n[o-2]=arguments[o];if(void 0===e)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(e.length<10||/^[s\W]*$/.test(e))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+e);if(!t){var i=0,a="Warning: "+e.replace(/%s/g,function(){n[i++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(s){}}}),t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var i=n(9),a=r(i),s=function(){function t(){var e=void 0===arguments[0]?"/":arguments[0],n=void 0===arguments[1]?null:arguments[1],r=void 0===arguments[2]?null:arguments[2],i=void 0===arguments[3]?a["default"].POP:arguments[3];o(this,t),this.pathname=e,this.query=n,this.state=r,this.navigationType=i}return t.isLocation=function(e){return e instanceof t},t}();e["default"]=s,t.exports=e["default"]},function(t,e){"use strict";function n(t,e,n){function r(){a=!0,n.apply(this,arguments)}function o(){a||(t>i?(i+=1,e.call(this,i-1,o,r)):r.apply(this,arguments))}var i=0,a=!1;o()}function r(t,e,n){function r(t,e,r){a||(e?(a=!0,n(e)):(i[t]=r,a=++s===o,a&&n(null,i)))}var o=t.length,i=[];if(0===o)return n(null,i);var a=!1,s=0;t.forEach(function(t,n){e(t,n,function(t,e){r(n,t,e)})})}function o(t,e,n){var o=Object.keys(t);r(o,function(n,r,o){e(t[n],o)},function(t,e){if(t)n(t);else{var r=e.reduce(function(t,e,n){return t[o[n]]=e,t},{});n(null,r)}})}e.__esModule=!0,e.loopAsync=n,e.mapAsync=r,e.hashAsync=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(24),i=r(o),a=i["default"]({PUSH:null,REPLACE:null,POP:null});e["default"]=a,t.exports=e["default"]},function(t,e){e.arrayToObject=function(t){for(var e={},n=0,r=t.length;r>n;++n)"undefined"!=typeof t[n]&&(e[n]=t[n]);return e},e.merge=function(t,n){if(!n)return t;if("object"!=typeof n)return Array.isArray(t)?t.push(n):t[n]=!0,t;if("object"!=typeof t)return t=[t].concat(n);Array.isArray(t)&&!Array.isArray(n)&&(t=e.arrayToObject(t));for(var r=Object.keys(n),o=0,i=r.length;i>o;++o){var a=r[o],s=n[a];t[a]=t[a]?e.merge(t[a],s):s}return t},e.decode=function(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}},e.compact=function(t,n){if("object"!=typeof t||null===t)return t;n=n||[];var r=n.indexOf(t);if(-1!==r)return n[r];if(n.push(t),Array.isArray(t)){for(var o=[],i=0,a=t.length;a>i;++i)"undefined"!=typeof t[i]&&o.push(t[i]);return o}var s=Object.keys(t);for(i=0,a=s.length;a>i;++i){var u=s[i];t[u]=e.compact(t[u],n)}return t},e.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},e.isBuffer=function(t){return null===t||"undefined"==typeof t?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}},function(t,e){"use strict";function n(){return decodeURI(window.location.href.split("#")[1]||"")}function r(t){window.location.replace(window.location.pathname+window.location.search+"#"+t)}function o(){return decodeURI(window.location.pathname+window.location.search)}function i(){return{scrollX:window.pageXOffset||document.documentElement.scrollLeft,scrollY:window.pageYOffset||document.documentElement.scrollTop}}function a(t,e){window.scrollTo(t,e)}function s(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}e.__esModule=!0,e.getHashPath=n,e.replaceHashPath=r,e.getWindowPath=o,e.getWindowScrollPosition=i,e.setWindowScrollPosition=a,e.supportsHistory=s;var u=!("undefined"==typeof window||!window.document||!window.document.createElement);e.canUseDOM=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(){return Math.random().toString(36).substr(2)}e.__esModule=!0;var a=n(2),s=r(a),u=n(5),c=n(7),l=r(c),f=["pushState","replaceState","go"],p=function(){function t(){var e=void 0===arguments[0]?{}:arguments[0];o(this,t),f.forEach(function(t){s["default"]("function"==typeof this[t],'%s needs a "%s" method',this.constructor.name,t)},this),this.parseQueryString=e.parseQueryString||u.parseQueryString,this.changeListeners=[],this.location=null}return t.prototype._notifyChange=function(){for(var t=0,e=this.changeListeners.length;e>t;++t)this.changeListeners[t].call(this)},t.prototype.addChangeListener=function(t){this.changeListeners.push(t)},t.prototype.removeChangeListener=function(t){this.changeListeners=this.changeListeners.filter(function(e){return e!==t})},t.prototype.back=function(){this.go(-1)},t.prototype.forward=function(){this.go(1)},t.prototype._createState=function(t){return t=t||{},t.key||(t.key=i()),t},t.prototype.createLocation=function(t,e,n){var r=u.getPathname(t),o=u.getQueryString(t),i=o?this.parseQueryString(o):null;return new l["default"](r,i,e,n)},t}();e["default"]=p,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return 0===t.button}function i(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}e.__esModule=!0;var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=n(1),u=r(s),c=u["default"].PropTypes,l=c.object,f=c.string,p=c.func,d=u["default"].createClass({displayName:"Link",contextTypes:{router:l},propTypes:{activeStyle:l,activeClassName:f,to:f.isRequired,query:l,state:l,onClick:p},getDefaultProps:function(){return{className:"",activeClassName:"active",style:{}}},handleClick:function(t){var e,n=!0;this.props.onClick&&(e=this.props.onClick(t)),!i(t)&&o(t)&&((e===!1||t.defaultPrevented===!0)&&(n=!1),t.preventDefault(),n&&this.context.router.transitionTo(this.props.to,this.props.query,this.props.state))},render:function(){var t=this.context.router,e=this.props,n=e.to,r=e.query,o=a({},this.props,{href:t.makeHref(n,r),onClick:this.handleClick});return t&&t.isActive(n,r)&&(o.activeClassName&&(o.className+=" "+o.activeClassName),o.activeStyle&&a(o.style,o.activeStyle)),u["default"].createElement("a",o)}});e.Link=d,e["default"]=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),i=r(o),a=i["default"].PropTypes.object,s={contextTypes:{router:a.isRequired}},u=["makePath","makeHref","transitionTo","replaceWith","go","goBack","goForward"];u.forEach(function(t){s[t]=function(){var e=this.context.router;return e[t].apply(e,arguments)}}),e["default"]=s,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),i=r(o),a=n(2),s=r(a),u=n(3),c=n(5),l=n(4),f=i["default"].PropTypes,p=f.string,d=f.object,h=i["default"].createClass({displayName:"Redirect",statics:{createRouteFromReactElement:function(t){var e=u.createRouteFromReactElement(t);return e.from&&(e.path=e.from),e.onEnter=function(t,n){var r=t.location,o=t.params,i=e.to?c.formatPattern(e.to,o):r.pathname;n.to(i,e.query||r.query,e.state||r.state)},e}},propTypes:{path:p,from:p,to:p.isRequired,query:d,state:d,onEnter:l.falsy,children:l.falsy},render:function(){s["default"](!1,"<Redirect> elements are for router configuration only and should not be rendered")}});e.Redirect=h,e["default"]=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),i=r(o),a=n(2),s=r(a),u=n(3),c=n(4),l=n(6),f=r(l),p=i["default"].PropTypes,d=p.string,h=p.bool,m=p.func,y=i["default"].createClass({displayName:"Route",statics:{createRouteFromReactElement:function(t){var e=u.createRouteFromReactElement(t);return e.handler&&(f["default"](!1,"<Route handler> is deprecated, use <Route component> instead"),e.component=e.handler,delete e.handler),e}},propTypes:{path:d,ignoreScrollBehavior:h,handler:c.component,component:c.component,components:c.components,getComponents:m},render:function(){s["default"](!1,"<Route> elements are for router configuration only and should not be rendered")}});e.Route=y,e["default"]=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n,r,o){var i=new x["default"];h.getState(e,n,function(e,a){if(e||null==a||i.isCancelled)o(e,null,i);else{a.location=n;var s=h.getTransitionHooks(t,a);Array.isArray(r)&&s.unshift.apply(s,r),p.loopAsync(s.length,function(t,e,n){s[t](a,i,function(t){t||i.isCancelled?n(t):e()})},function(t){t||i.isCancelled?o(t,null,i):h.getComponents(a.branch,function(t,e){t||i.isCancelled?o(t,null,i):(a.components=e,o(null,a,i))})})}})}e.__esModule=!0;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},a=n(1),s=r(a),u=n(6),c=r(u),l=n(2),f=r(l),p=n(8),d=n(3),h=n(19),m=n(4),y=n(18),g=r(y),v=n(20),R=r(v),_=n(7),b=n(22),x=r(b),w=s["default"].PropTypes,P=w.arrayOf,O=w.func,C=w.object,T=s["default"].createClass({displayName:"Router",mixins:[g["default"],R["default"]],statics:{run:function(t,e,n,r){"function"==typeof n&&(r=n,n=null),f["default"]("function"==typeof r,"Router.run needs a callback"),o(null,t,e,n,r)}},propTypes:{createElement:O.isRequired,onAbort:O,onError:O,onUpdate:O,history:m.history,routes:m.routes,children:m.routes,location:m.location,branch:m.routes,params:C,components:P(m.components)},getDefaultProps:function(){return{createElement:a.createElement}},getInitialState:function(){return{isTransitioning:!1,location:null,branch:null,params:null,components:null}},_updateState:function(t){var e=this;f["default"](_.isLocation(t),"A <Router> needs a valid Location");var n=this.transitionHooks;n&&(n=n.map(function(t){return h.createTransitionHook(t,e)})),this.setState({isTransitioning:!0}),o(this.state,this.routes,t,n,function(n,r,o){if(n)e.handleError(n);else if(o.isCancelled)if(o.redirectInfo){var i=o.redirectInfo,a=i.pathname,s=i.query,r=i.state;e.replaceWith(a,s,r)}else f["default"](e.state.location,"You may not abort the initial transition"),e.handleAbort(reason);else null==r?c["default"](!1,'Location "%s" did not match any routes',t.pathname):e.setState(r,e.props.onUpdate);e.setState({isTransitioning:!1})})},addTransitionHook:function(t){this.transitionHooks||(this.transitionHooks=[]),this.transitionHooks.push(t)},removeTransitionHook:function(t){this.transitionHooks&&(this.transitionHooks=this.transitionHooks.filter(function(e){return e!==t}))},handleAbort:function(t){this.props.onAbort?this.props.onAbort.call(this,t):(this._ignoreNextHistoryChange=!0,this.goBack())},handleError:function(t){if(!this.props.onError)throw t;this.props.onError.call(this,t)},handleHistoryChange:function(){this._ignoreNextHistoryChange?this._ignoreNextHistoryChange=!1:this._updateState(this.props.history.location)},componentWillMount:function(){var t=this.props,e=t.history,n=t.routes,r=t.children,o=t.location,i=t.branch,a=t.params,s=t.components;e?(f["default"](n||r,"Client-side <Router>s need routes. Try using <Router routes> or passing your routes as nested <Route> children"),this.routes=d.createRoutes(n||r),"function"==typeof e.setup&&e.setup(),e.addChangeListener&&e.addChangeListener(this.handleHistoryChange),this._updateState(e.location)):(f["default"](o&&i&&a&&s,"Server-side <Router>s need location, branch, params, and components props. Try using Router.run to get all the props you need"),this.setState({location:o,branch:i,params:a,components:s}))},componentWillReceiveProps:function(t){if(f["default"](this.props.history===t.history,"<Router history> may not be changed"),t.history){var e=this.props.routes||this.props.children,n=t.routes||t.children;e!==n&&(this.routes=d.createRoutes(n),t.history.location&&this._updateState(t.history.location))}},componentWillUnmount:function(){var t=this.props.history;t&&t.removeChangeListener&&t.removeChangeListener(this.handleHistoryChange)},_createElement:function(t,e){return"function"==typeof t?this.props.createElement(t,e):null},render:function(){var t=this,e=this.state,n=e.location,r=e.branch,o=e.params,s=e.components,u=e.isTransitioning,c=null;return s&&(c=s.reduceRight(function(e,s,c){if(null==s)return e;var l=r[c],f=h.getRouteParams(l,o),p={location:n,params:o,route:l,routeParams:f,isTransitioning:u};if(a.isValidElement(e)?p.children=e:e&&i(p,e),"object"==typeof s){var d={};for(var m in s)s.hasOwnProperty(m)&&(d[m]=t._createElement(s[m],p));return d}return t._createElement(s,p)},c)),f["default"](null===c||c===!1||a.isValidElement(c),"The root route must render a single element"),c}});e["default"]=T,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return 0===l.stripLeadingSlashes(e).indexOf(l.stripLeadingSlashes(t))?!0:!1}function i(t,e){if(null==e)return null==t;if(null==t)return!0;for(var n in t)if(t.hasOwnProperty(n)&&String(t[n])!==String(e[n]))return!1;return!0}e.__esModule=!0;var a=n(1),s=r(a),u=n(2),c=r(u),l=n(5),f=s["default"].PropTypes,p=f.func,d=f.object,h={propTypes:{stringifyQuery:p.isRequired},getDefaultProps:function(){return{stringifyQuery:l.stringifyQuery}},childContextTypes:{router:d.isRequired},getChildContext:function(){return{router:this}},makePath:function(t,e){return e&&("string"!=typeof e&&(e=this.props.stringifyQuery(e)),""!==e)?t+"?"+e:t},makeHref:function(t,e){return this.makePath(t,e)},transitionTo:function(t,e){var n=void 0===arguments[2]?null:arguments[2],r=this.props.history;c["default"](r,"Router#transitionTo is client-side only (needs history)"),r.pushState(n,this.makePath(t,e))},replaceWith:function(t,e){var n=void 0===arguments[2]?null:arguments[2],r=this.props.history;c["default"](r,"Router#replaceWith is client-side only (needs history)"),r.replaceState(n,this.makePath(t,e))},go:function(t){var e=this.props.history;c["default"](e,"Router#go is client-side only (needs history)"),e.go(t)},goBack:function(){this.go(-1)},goForward:function(){this.go(1)},isActive:function(t,e){var n=this.state.location;return null==n?!1:o(t,n.pathname)&&i(e,n.query)}};e["default"]=h,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e,n){t.childRoutes?n(null,t.childRoutes):t.getChildRoutes?t.getChildRoutes(e,n):n()}function i(t,e,n){t.indexRoute?n(null,t.indexRoute):t.getIndexRoute?t.getIndexRoute(n,e):n()}function a(t,e,n){return e.reduceRight(function(t,e,r){var o=n[r];return Array.isArray(t[e])?t[e].unshift(o):t[e]=e in t?[o,t[e]]:o,t},t)}function s(t,e){return a({},t,e)}function u(t,e,n,r){var u=b.matchPattern(t.path,e),l=u.remainingPathname,f=u.paramNames,p=u.paramValues,d=""===l;if(d&&t.path){var h=s(f,p),m=[t];i(t,n,function(t,e){t?r(t):(e&&m.push(e),r(null,{params:h,branch:m}))})}else null!=l?o(t,n,function(e,o){e?r(e):o?c(o,l,n,function(e,n){e?r(e):n?(a(n.params,f,p),n.branch.unshift(t),r(null,n)):r()}):r()}):r()}function c(t,e,n,r){t=_.createRoutes(t),x.loopAsync(t.length,function(r,o,i){u(t[r],e,n,function(t,e){t||e?i(t,e):o()})},r)}function l(t,e,n){c(t,b.stripLeadingSlashes(e.pathname),e.state,n)}function f(t,e,n){if(!t.path)return!1;var r=b.getParamNames(t.path);return r.some(function(t){return e.params[t]!==n.params[t]})}function p(t,e){var n,r,o=t&&t.branch,i=e.branch;return o?(n=o.filter(function(n){return-1===i.indexOf(n)||f(n,t,e)}),n.reverse(),r=i.filter(function(t){return-1===o.indexOf(t)||-1!==n.indexOf(t)})):(n=[],r=i),[n,r]}function d(t,e){return function(n,r,o){t.length>2?t.call(e,n,r,o):(t.call(e,n,r),o())}}function h(t,e){return t.reduce(function(t,n){return n[e]&&t.push(d(n[e],n)),t},[])}function m(t,e){var n=p(t,e),r=n[0],o=n[1],i=h(r,"onLeave");return i.push.apply(i,h(o,"onEnter")),i}function y(t,e){t.component||t.components?e(null,t.component||t.components):t.getComponents?t.getComponents(e):e()}function g(t,e){x.mapAsync(t,function(t,e,n){y(t,n)},e)}function v(t,e){var n={};if(!t.path)return n;var r=b.getParamNames(t.path);for(var o in e)e.hasOwnProperty(o)&&-1!==r.indexOf(o)&&(n[o]=e[o]);return n}e.__esModule=!0,e.getState=l,e.createTransitionHook=d,e.getTransitionHooks=m,e.getComponents=g,e.getRouteParams=v;var R=n(2),_=(r(R),n(3)),b=n(5),x=n(8)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){return t.filter(function(t){return-1!==e.indexOf(t)})}function i(t,e){var n=t.location,r=t.branch,i=e.location,a=e.branch;if(n.pathname===i.pathname)return!1;var s=o(r,a);return s.some(function(t){return t.ignoreScrollBehavior})?!1:!0}function a(t,e,n){c.canUseDOM&&(t===f["default"].POP?c.setWindowScrollPosition(e,n):c.setWindowScrollPosition(0,0))}e.__esModule=!0;var s=n(1),u=r(s),c=n(11),l=n(9),f=r(l),p=u["default"].PropTypes.func,d={propTypes:{shouldUpdateScrollPosition:p.isRequired,updateScrollPosition:p.isRequired},getDefaultProps:function(){return{shouldUpdateScrollPosition:i,updateScrollPosition:a}},componentDidUpdate:function(t,e){var n=this.state.location,r=n&&n.state;if(r&&this.props.shouldUpdateScrollPosition(this.state,e)){var o=r.scrollX,i=r.scrollY;null!=o&&null!=i&&this.props.updateScrollPosition(n.navigationType,o,i)}}};e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),i=r(o),a=i["default"].PropTypes.object,s={contextTypes:{router:a.isRequired}},u=["isActive"];u.forEach(function(t){s[t]=function(){var e=this.context.router;return e[t].apply(e,arguments)}}),e["default"]=s,t.exports=e["default"]},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}e.__esModule=!0;var r=function(){function t(){n(this,t),this.isCancelled=!1,this.redirectInfo=null,this.abortReason=null}return t.prototype.to=function(t,e,n){this.redirectInfo={pathname:t,query:e,state:n},this.isCancelled=!0},t.prototype.abort=function(t){this.abortReason=t,this.isCancelled=!0},t}();e["default"]=r,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(1),i=r(o),a=n(6),s=r(a),u=i["default"].PropTypes.object,c={contextTypes:{router:u.isRequired},componentDidMount:function(){s["default"]("function"==typeof this.routerWillLeave,"Components that mixin TransitionHook should have a routerWillLeave method, check %s",this.constructor.displayName||this.constructor.name),this.routerWillLeave&&this.context.router.addTransitionHook(this.routerWillLeave)},componentWillUnmount:function(){this.routerWillLeave&&this.context.router.removeTransitionHook(this.routerWillLeave)}};e["default"]=c,t.exports=e["default"]},function(t){"use strict";var e=function(t){var e,n={};if(!(t instanceof Object)||Array.isArray(t))throw new Error("keyMirror(...): Argument must be an object.");for(e in t)t.hasOwnProperty(e)&&(n[e]=e);return n};t.exports=e},function(t,e,n){t.exports=n(26)},function(t,e,n){var r=n(28),o=n(27);t.exports={stringify:r,parse:o}},function(t,e,n){var r=n(10),o={delimiter:"&",depth:5,arrayLimit:20,parameterLimit:1e3};o.parseValues=function(t,e){for(var n={},o=t.split(e.delimiter,1/0===e.parameterLimit?void 0:e.parameterLimit),i=0,a=o.length;a>i;++i){var s=o[i],u=-1===s.indexOf("]=")?s.indexOf("="):s.indexOf("]=")+1;if(-1===u)n[r.decode(s)]="";else{var c=r.decode(s.slice(0,u)),l=r.decode(s.slice(u+1));if(Object.prototype.hasOwnProperty(c))continue;n[c]=n.hasOwnProperty(c)?[].concat(n[c]).concat(l):l}}return n},o.parseObject=function(t,e,n){if(!t.length)return e;var r=t.shift(),i={};if("[]"===r)i=[],i=i.concat(o.parseObject(t,e,n));else{var a="["===r[0]&&"]"===r[r.length-1]?r.slice(1,r.length-1):r,s=parseInt(a,10),u=""+s;!isNaN(s)&&r!==a&&u===a&&s>=0&&s<=n.arrayLimit?(i=[],i[s]=o.parseObject(t,e,n)):i[a]=o.parseObject(t,e,n)}return i},o.parseKeys=function(t,e,n){if(t){var r=/^([^\[\]]*)/,i=/(\[[^\[\]]*\])/g,a=r.exec(t);if(!Object.prototype.hasOwnProperty(a[1])){var s=[];a[1]&&s.push(a[1]);for(var u=0;null!==(a=i.exec(t))&&u<n.depth;)++u,Object.prototype.hasOwnProperty(a[1].replace(/\[|\]/g,""))||s.push(a[1]);return a&&s.push("["+t.slice(a.index)+"]"),o.parseObject(s,e,n)}}},t.exports=function(t,e){if(""===t||null===t||"undefined"==typeof t)return{};e=e||{},e.delimiter="string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,e.depth="number"==typeof e.depth?e.depth:o.depth,e.arrayLimit="number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,e.parameterLimit="number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit;for(var n="string"==typeof t?o.parseValues(t,e):t,i={},a=Object.keys(n),s=0,u=a.length;u>s;++s){var c=a[s],l=o.parseKeys(c,n[c],e);i=r.merge(i,l)}return r.compact(i)}},function(t,e,n){var r=n(10),o={delimiter:"&",arrayPrefixGenerators:{brackets:function(t){return t+"[]"},indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}}};o.stringify=function(t,e,n){if(r.isBuffer(t)?t=t.toString():t instanceof Date?t=t.toISOString():null===t&&(t=""),"string"==typeof t||"number"==typeof t||"boolean"==typeof t)return[encodeURIComponent(e)+"="+encodeURIComponent(t)];var i=[];if("undefined"==typeof t)return i;for(var a=Object.keys(t),s=0,u=a.length;u>s;++s){var c=a[s];i=i.concat(Array.isArray(t)?o.stringify(t[c],n(e,c),n):o.stringify(t[c],e+"["+c+"]",n))}return i},t.exports=function(t,e){e=e||{};var n="undefined"==typeof e.delimiter?o.delimiter:e.delimiter,r=[];if("object"!=typeof t||null===t)return"";var i;i=e.arrayFormat in o.arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":"indices";for(var a=o.arrayPrefixGenerators[i],s=Object.keys(t),u=0,c=s.length;c>u;++u){var l=s[u];r=r.concat(o.stringify(t[l],l,a))}return r.join(n)}}])});
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.__esModule = true;
exports.stringifyQuery = stringifyQuery;

@@ -14,2 +12,3 @@ exports.getPathname = getPathname;

exports.getParamNames = getParamNames;
exports.formatPattern = formatPattern;

@@ -22,2 +21,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _invariant = require('invariant');
var _invariant2 = _interopRequireDefault(_invariant);
var parseQueryString = _qs2['default'].parse;

@@ -163,2 +166,47 @@

return compilePattern(pattern).paramNames;
}
/**
* Returns a version of the given pattern with params interpolated. Throws
* if there is a dynamic segment of the pattern for which there is no param.
*/
function formatPattern(pattern, params) {
params = params || {};
var _compilePattern3 = compilePattern(pattern);
var tokens = _compilePattern3.tokens;
var parenCount = 0,
pathname = '',
splatIndex = 0;
var token, paramName, paramValue;
for (var i = 0, len = tokens.length; i < len; ++i) {
token = tokens[i];
if (token === '*') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
(0, _invariant2['default'])(paramValue != null || parenCount > 0, 'Missing splat #%s for path "%s"', splatIndex, pattern);
if (paramValue != null) pathname += paramValue;
} else if (token === '(') {
parenCount += 1;
} else if (token === ')') {
parenCount -= 1;
} else if (token.charAt(0) === ':') {
paramName = token.substring(1);
paramValue = params[paramName];
(0, _invariant2['default'])(paramValue != null || parenCount > 0, 'Missing "%s" parameter for path "%s"', paramName, pattern);
if (paramValue != null) pathname += paramValue;
} else {
pathname += token;
}
}
return pathname.replace(/\/+/g, '/');
}

@@ -22,3 +22,3 @@ import DOMHistory from './DOMHistory';

*/
export class BrowserHistory extends DOMHistory {
class BrowserHistory extends DOMHistory {

@@ -112,2 +112,2 @@ constructor(options) {

export default new BrowserHistory;
export default BrowserHistory;

@@ -65,9 +65,9 @@ import warning from 'warning';

* support is not enabled by default. In order to use it, create your own
* HashHistory, like this:
* HashHistory.
*
* import { HashHistory } from 'react-router/lib/HashHistory';
* import HashHistory from 'react-router/lib/HashHistory';
* var StatefulHashHistory = new HashHistory({ queryKey: '_key' });
* React.render(<Router history={StatefulHashHistory} .../>, ...);
*/
export class HashHistory extends DOMHistory {
class HashHistory extends DOMHistory {

@@ -174,2 +174,2 @@ constructor(options={}) {

export default new HashHistory;
export default HashHistory;
import React from 'react';
import invariant from 'invariant';
import { createRouteFromReactElement } from './RouteUtils';
import { formatPattern } from './URLUtils';
import { falsy } from './PropTypes';
var { string } = React.PropTypes;
var { string, object } = React.PropTypes;

@@ -18,4 +19,11 @@ export var Redirect = React.createClass({

route.onEnter = function (nextState, router) {
router.replaceWith(route.to, nextState.query);
route.onEnter = function (nextState, transition) {
var { location, params } = nextState;
var pathname = route.to ? formatPattern(route.to, params) : location.pathname;
transition.to(
pathname,
route.query || location.query,
route.state || location.state
);
};

@@ -29,4 +37,7 @@

propTypes: {
from: string,
path: string,
from: string, // Alias for path
to: string.isRequired,
query: object,
state: object,
onEnter: falsy,

@@ -33,0 +44,0 @@ children: falsy

@@ -5,2 +5,3 @@ import React from 'react';

import { component, components } from './PropTypes';
import warning from 'warning';

@@ -7,0 +8,0 @@ var { string, bool, func } = React.PropTypes;

import qs from 'qs';
import invariant from 'invariant';

@@ -137,1 +138,50 @@ export var parseQueryString = qs.parse;

}
/**
* Returns a version of the given pattern with params interpolated. Throws
* if there is a dynamic segment of the pattern for which there is no param.
*/
export function formatPattern(pattern, params) {
params = params || {};
var { tokens } = compilePattern(pattern);
var parenCount = 0, pathname = '', splatIndex = 0;
var token, paramName, paramValue;
for (var i = 0, len = tokens.length; i < len; ++i) {
token = tokens[i];
if (token === '*') {
paramValue = Array.isArray(params.splat) ? params.splat[splatIndex++] : params.splat;
invariant(
paramValue != null || parenCount > 0,
'Missing splat #%s for path "%s"',
splatIndex, pattern
);
if (paramValue != null)
pathname += paramValue;
} else if (token === '(') {
parenCount += 1;
} else if (token === ')') {
parenCount -= 1;
} else if (token.charAt(0) === ':') {
paramName = token.substring(1);
paramValue = params[paramName];
invariant(
paramValue != null || parenCount > 0,
'Missing "%s" parameter for path "%s"',
paramName, pattern
);
if (paramValue != null)
pathname += paramValue;
} else {
pathname += token;
}
}
return pathname.replace(/\/+/g, '/');
}
{
"name": "react-router",
"version": "1.0.0-beta1",
"version": "1.0.0-beta2",
"description": "A complete routing library for React.js",

@@ -5,0 +5,0 @@ "main": "lib/index",

[![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)
[![dependency status](https://img.shields.io/david/rackt/react-router.svg?style=flat-square)](https://david-dm.org/rackt/react-router)
[![Gitter](https://img.shields.io/badge/GITTER-join%20chat-1DCF73.svg?style=flat-square)](https://gitter.im/rackt/react-router?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
<img src="https://rackt.github.io/react-router/img/vertical.png" width="300"/>
A complete routing library for React.
A complete routing library for React. https://rackt.github.io/react-router

@@ -15,4 +14,4 @@ React Router keeps the URL in sync with nested UI. It has a simple API

Docs
----
Docs & Help
-----------

@@ -22,3 +21,9 @@ - [Guides and API Docs](https://rackt.github.io/react-router)

- [Changelog](/CHANGELOG.md)
- [#react-router channel on reactiflux](http://www.reactiflux.com/)
Browser Support
---------------
We intend to support all the browers React supports.
Installation

@@ -39,3 +44,3 @@ ------------

// not using and ES6 transpiler
// not using an ES6 transpiler
var ReactRouter = require('react-router');

@@ -112,6 +117,6 @@ var Router = ReactRouter.Router;

// Declarative route configuration (could also load this config lazily
// instead, all you reall need is a single root route, you don't need to
// instead, all you really need is a single root route, you don't need to
// colocate the entire config).
React.render((
<Router history={BrowserHistory}>
<Router history={new BrowserHistory}>
<Route path="/" component={App}>

@@ -141,2 +146,1 @@ <Route path="about" component={About}/>

thanks to the Ember team.

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc