react-router
Advanced tools
Comparing version 4.0.0-beta.3 to 4.0.0-beta.4
{ | ||
"name": "react-router", | ||
"version": "4.0.0-beta.3", | ||
"version": "4.0.0-beta.4", | ||
"description": "Declarative routing for React", | ||
@@ -42,2 +42,3 @@ "repository": "ReactTraining/react-router", | ||
"history": "^4.5.1", | ||
"invariant": "^2.2.2", | ||
"loose-envify": "^1.3.1", | ||
@@ -44,0 +45,0 @@ "path-to-regexp": "^1.5.3", |
@@ -98,5 +98,8 @@ 'use strict'; | ||
render = props.render, | ||
children = props.children, | ||
match = props.match; // eslint-disable-line react/prop-types | ||
var children = props.children; // eslint-disable-line react/prop-types | ||
if (children && !children.length) children = null; | ||
(0, _warning2.default)(!(component && render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored'); | ||
@@ -103,0 +106,0 @@ |
@@ -1060,5 +1060,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
render = props.render, | ||
children = props.children, | ||
match = props.match; // eslint-disable-line react/prop-types | ||
var children = props.children; // eslint-disable-line react/prop-types | ||
if (children && !children.length) children = null; | ||
false ? (0, _warning2.default)(!(component && render), 'You should not use <Route component> and <Route render> in the same route; <Route render> will be ignored') : void 0; | ||
@@ -1065,0 +1068,0 @@ |
@@ -1,1 +0,1 @@ | ||
!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,e.withRouter=e.matchPath=e.Switch=e.StaticRouter=e.Router=e.Route=e.Redirect=e.Prompt=e.MemoryRouter=void 0;var o=n(6),i=r(o),u=n(7),a=r(u),c=n(8),s=r(c),f=n(9),l=r(f),p=n(2),h=r(p),d=n(10),y=r(d),v=n(11),b=r(v),m=n(3),g=r(m),w=n(12),x=r(w);e.MemoryRouter=i.default,e.Prompt=a.default,e.Redirect=s.default,e.Route=l.default,e.Router=h.default,e.StaticRouter=y.default,e.Switch=b.default,e.matchPath=g.default,e.withRouter=x.default},function(e,n){e.exports=t},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.getChildContext=function(){return{router:this.props.history}},e.prototype.render=function(){var t=this.props.children;return t?c.default.Children.only(t):null},e}(c.default.Component);s.childContextTypes={router:a.PropTypes.object.isRequired},e.default=s},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),u={},a=1e4,c=0,s=function(t,e){var n=e.end+e.strict,r=u[n]||(u[n]={});if(r[t])return r[t];var o=[],s=(0,i.default)(t,o,e),f={re:s,keys:o};return c<a&&(r[t]=f,c++),f},f=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.exact,o=void 0!==r&&r,i=n.strict,u=void 0!==i&&i;if(!e)return{url:t,isExact:!0,params:{}};var a=s(e,{end:o,strict:u}),c=a.re,f=a.keys,l=c.exec(t);if(!l)return null;var p=l[0],h=l.slice(1),d=t===p;return o&&!d?null:{path:e,url:"/"===e&&""===p?"/":p,isExact:d,params:f.reduce(function(t,e,n){return t[e.name]=h[n],t},{})}};e.default=f},function(t,e){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";var r=function(){};t.exports=r},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=n(14),f=r(s),l=n(2),p=r(l),h=function(t){function e(){var n,r,u;o(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.history=(0,f.default)(r.props),u=n,i(r,u)}return u(e,t),e.prototype.render=function(){return c.default.createElement(p.default,{history:this.history,children:this.props.children})},e}(c.default.Component);e.default=h},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(c.default.Component);s.contextTypes={router:a.PropTypes.shape({block:a.PropTypes.func.isRequired}).isRequired},s.defaultProps={when:!0},e.default=s},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.componentWillMount=function(){this.context.router.staticContext&&this.perform()},e.prototype.componentDidMount=function(){this.context.router.staticContext||this.perform()},e.prototype.perform=function(){var t=this.context.router,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(c.default.Component);s.contextTypes={router:a.PropTypes.shape({push:a.PropTypes.func.isRequired,replace:a.PropTypes.func.isRequired,staticContext:a.PropTypes.object}).isRequired},s.defaultProps={push:!1},e.default=s},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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},c=n(5),s=(r(c),n(1)),f=r(s),l=n(3),p=r(l),h=function(t,e){var n=e.computedMatch,r=e.path,o=e.exact,i=e.strict;return n||(0,p.default)(t.location.pathname,r,{exact:o,strict:i})},d=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.getChildContext=function(){return{router:this.router}},e.prototype.componentWillMount=function(){var t=this,e=this.context.router;this.router=a({},e,{match:h(e,this.props)}),this.unlisten=e.listen(function(){a(t.router,e,{match:h(e,t.props)}),t.forceUpdate()})},e.prototype.componentWillReceiveProps=function(t){a(this.router,{match:h(this.router,t)})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){return e.render(a({},this.props,this.router))},e}(f.default.Component);d.render=function(t){var e=t.component,n=t.render,r=t.children,o=t.match;return e?o?f.default.createElement(e,t):null:n?o?n(t):null:r?"function"==typeof r?r(t):f.default.Children.only(r):null},d.contextTypes={router:s.PropTypes.shape({listen:s.PropTypes.func.isRequired}).isRequired},d.childContextTypes={router:s.PropTypes.object.isRequired},e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=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(16),f=r(s),l=n(1),p=r(l),h=n(4),d=n(2),y=r(d),v=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,u=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===u?"":u}},b=function(t){return"string"==typeof t?(0,h.parsePath)(t):v(t)},m=function(t){return"string"==typeof t?t:(0,h.createPath)(t)},g=function(t){return function(){(0,f.default)(!1)}},w=function(){},x=function(t){function e(){var n,r,o;i(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=u(this,t.call.apply(t,[this].concat(c))),r.createHref=function(t){return r.props.basename+m(t)},r.handlePush=function(t){var e=r.props.context;e.action="PUSH",e.location=b(t),e.url=m(t)},r.handleReplace=function(t){var e=r.props.context;e.action="REPLACE",e.location=b(t),e.url=m(t)},r.handleListen=function(){return w},o=n,u(r,o)}return a(e,t),e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=o(t,["context","location"]),i={staticContext:e,createHref:this.createHref,action:"POP",location:b(n),push:this.handlePush,replace:this.handleReplace,go:g("go"),goBack:g("goBack"),goForward:g("goForward"),listen:this.handleListen};return p.default.createElement(y.default,c({},r,{history:i}))},e}(p.default.Component);x.defaultProps={basename:"",location:"/"},e.default=x},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=n(3),f=r(s),l=function(t){function e(){var n,r,u;o(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.state={location:null},u=n,i(r,u)}return u(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.context.router;this.setState({location:e.location}),this.unlisten=e.listen(function(){t.setState({location:e.location})})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){for(var t=this.props.children,e=this.state.location,n=c.default.Children.toArray(t),r=void 0,o=void 0,i=0,u=n.length;null==o&&i<u;++i)r=n[i],o=(0,f.default)(e.pathname,r.props.path,r.props);return o?c.default.cloneElement(r,{computedMatch:o}):null},e}(c.default.Component);l.contextTypes={router:a.PropTypes.shape({listen:a.PropTypes.func.isRequired}).isRequired},e.default=l},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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},c=n(1),s=r(c),f=function(t){var e,n;return n=e=function(e){function n(){return o(this,n),i(this,e.apply(this,arguments))}return u(n,e),n.prototype.componentWillMount=function(){var t=this;this.unlisten=this.context.router.listen(function(){return t.forceUpdate()})},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){return s.default.createElement(t,a({},this.props,this.context.router))},n}(s.default.Component),e.displayName="withRouter("+(t.displayName||t.name)+")",e.contextTypes={router:c.PropTypes.shape({listen:c.PropTypes.func.isRequired}).isRequired},n};e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o=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},i=n(19),u=r(i),a=n(20),c=r(a),s=n(4);e.createLocation=function(t,e,n,r){var i=void 0;return"string"==typeof t?(i=(0,s.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e)),i.key=n,r&&(i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,u.default)(i.pathname,r.pathname)):i.pathname=r.pathname),i},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,c.default)(t.state,e.state)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},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}),i=n(5),u=(r(i),n(4)),a=n(13),c=n(15),s=r(c),f=function(t,e,n){return Math.min(Math.max(t,e),n)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,l=t.keyLength,p=void 0===l?6:l,h=(0,s.default)(),d=function(t){o(R,t),R.length=R.entries.length,h.notifyListeners(R.location,R.action)},y=function(){return Math.random().toString(36).substr(2,p)},v=f(c,0,r.length-1),b=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,void 0,e?y():void 0):(0,a.createLocation)(t,void 0,e?t.key||y():void 0)}),m=u.createPath,g=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,y(),R.location);h.confirmTransitionTo(o,r,e,function(t){if(t){var e=R.index,n=e+1,i=R.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),d({action:r,location:o,index:n,entries:i})}})},w=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,y(),R.location);h.confirmTransitionTo(o,r,e,function(t){t&&(R.entries[R.index]=o,d({action:r,location:o}))})},x=function(t){var n=f(R.index+t,0,R.entries.length-1),r="POP",o=R.entries[n];h.confirmTransitionTo(o,r,e,function(t){t?d({action:r,location:o,index:n}):d()})},_=function(){return x(-1)},O=function(){return x(1)},P=function(t){var e=R.index+t;return e>=0&&e<R.entries.length},j=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return h.setPrompt(t)},E=function(t){return h.appendListener(t)},R={length:b.length,action:"POP",location:b[v],index:v,entries:b,createHref:m,push:g,replace:w,go:x,goBack:_,goForward:O,canGo:P,block:j,listen:E};return R};e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(5),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e.default=i},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,u,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,u,a],f=0;c=new Error(e.replace(/%s/g,function(){return s[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,u="",a=e&&e.delimiter||"/";null!=(n=m.exec(t));){var f=n[0],l=n[1],p=n.index;if(u+=t.slice(i,p),i=p+f.length,l)u+=l[1];else{var h=t[i],d=n[2],y=n[3],v=n[4],b=n[5],g=n[6],w=n[7];u&&(r.push(u),u="");var x=null!=d&&null!=h&&h!==d,_="+"===g||"*"===g,O="?"===g||"*"===g,P=n[2]||a,j=v||b;r.push({name:y||o++,prefix:d||"",delimiter:P,optional:O,repeat:_,partial:x,asterisk:!!w,pattern:j?s(j):w?".*":"[^"+c(P)+"]+?"})}}return i<t.length&&(u+=t.substr(i)),u&&r.push(u),r}function o(t,e){return a(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function u(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",a=n||{},c=r||{},s=c.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=a[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?u(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){return y(r(t,n),e,n)}function y(t,e,n){b(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",u=0;u<t.length;u++){var a=t[u];if("string"==typeof a)i+=c(a);else{var s=c(a.prefix),p="(?:"+a.pattern+")";e.push(a),a.repeat&&(p+="(?:"+s+p+")*"),p=a.optional?a.partial?s+"("+p+")?":"(?:"+s+"("+p+"))?":s+"("+p+")",i+=p}}var h=c(n.delimiter||"/"),d=i.slice(-h.length)===h;return r||(i=(d?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+h+"|$)",f(new RegExp("^"+i,l(n)),e)}function v(t,e,n){return b(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(18);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=a,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";var n=function(t){return"/"===t.charAt(0)},r=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],u=t&&n(t),a=e&&n(e),c=u||a;if(t&&n(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,p=i.length;p>=0;p--){var h=i[p];"."===h?r(i,p):".."===h?(r(i,p),l++):l&&(r(i,p),l--)}if(!c)for(;l--;l)i.unshift("..");!c||""===i[0]||i[0]&&n(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return!(!Array.isArray(r)||e.length!==r.length)&&e.every(function(e,n){return t(e,r[n])});var o="undefined"==typeof e?"undefined":n(e),i="undefined"==typeof r?"undefined":n(r);if(o!==i)return!1;if("object"===o){var u=e.valueOf(),a=r.valueOf();if(u!==e||a!==r)return t(u,a);var c=Object.keys(e),s=Object.keys(r);return c.length===s.length&&c.every(function(n){return t(e[n],r[n])})}return!1};e.default=r}])}); | ||
!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,e.withRouter=e.matchPath=e.Switch=e.StaticRouter=e.Router=e.Route=e.Redirect=e.Prompt=e.MemoryRouter=void 0;var o=n(6),i=r(o),u=n(7),a=r(u),c=n(8),s=r(c),f=n(9),l=r(f),p=n(2),h=r(p),d=n(10),y=r(d),v=n(11),b=r(v),m=n(3),g=r(m),w=n(12),x=r(w);e.MemoryRouter=i.default,e.Prompt=a.default,e.Redirect=s.default,e.Route=l.default,e.Router=h.default,e.StaticRouter=y.default,e.Switch=b.default,e.matchPath=g.default,e.withRouter=x.default},function(e,n){e.exports=t},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.getChildContext=function(){return{router:this.props.history}},e.prototype.render=function(){var t=this.props.children;return t?c.default.Children.only(t):null},e}(c.default.Component);s.childContextTypes={router:a.PropTypes.object.isRequired},e.default=s},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),u={},a=1e4,c=0,s=function(t,e){var n=e.end+e.strict,r=u[n]||(u[n]={});if(r[t])return r[t];var o=[],s=(0,i.default)(t,o,e),f={re:s,keys:o};return c<a&&(r[t]=f,c++),f},f=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.exact,o=void 0!==r&&r,i=n.strict,u=void 0!==i&&i;if(!e)return{url:t,isExact:!0,params:{}};var a=s(e,{end:o,strict:u}),c=a.re,f=a.keys,l=c.exec(t);if(!l)return null;var p=l[0],h=l.slice(1),d=t===p;return o&&!d?null:{path:e,url:"/"===e&&""===p?"/":p,isExact:d,params:f.reduce(function(t,e,n){return t[e.name]=h[n],t},{})}};e.default=f},function(t,e){"use strict";e.__esModule=!0;e.addLeadingSlash=function(t){return"/"===t.charAt(0)?t:"/"+t},e.stripLeadingSlash=function(t){return"/"===t.charAt(0)?t.substr(1):t},e.stripPrefix=function(t,e){return 0===t.indexOf(e)?t.substr(e.length):t},e.parsePath=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");o!==-1&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return i!==-1&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}},e.createPath=function(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}},function(t,e,n){"use strict";var r=function(){};t.exports=r},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=n(14),f=r(s),l=n(2),p=r(l),h=function(t){function e(){var n,r,u;o(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.history=(0,f.default)(r.props),u=n,i(r,u)}return u(e,t),e.prototype.render=function(){return c.default.createElement(p.default,{history:this.history,children:this.props.children})},e}(c.default.Component);e.default=h},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.enable=function(t){this.unblock&&this.unblock(),this.unblock=this.context.router.block(t)},e.prototype.disable=function(){this.unblock&&(this.unblock(),this.unblock=null)},e.prototype.componentWillMount=function(){this.props.when&&this.enable(this.props.message)},e.prototype.componentWillReceiveProps=function(t){t.when?this.props.when&&this.props.message===t.message||this.enable(t.message):this.disable()},e.prototype.componentWillUnmount=function(){this.disable()},e.prototype.render=function(){return null},e}(c.default.Component);s.contextTypes={router:a.PropTypes.shape({block:a.PropTypes.func.isRequired}).isRequired},s.defaultProps={when:!0},e.default=s},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.componentWillMount=function(){this.context.router.staticContext&&this.perform()},e.prototype.componentDidMount=function(){this.context.router.staticContext||this.perform()},e.prototype.perform=function(){var t=this.context.router,e=this.props,n=e.push,r=e.to;n?t.push(r):t.replace(r)},e.prototype.render=function(){return null},e}(c.default.Component);s.contextTypes={router:a.PropTypes.shape({push:a.PropTypes.func.isRequired,replace:a.PropTypes.func.isRequired,staticContext:a.PropTypes.object}).isRequired},s.defaultProps={push:!1},e.default=s},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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},c=n(5),s=(r(c),n(1)),f=r(s),l=n(3),p=r(l),h=function(t,e){var n=e.computedMatch,r=e.path,o=e.exact,i=e.strict;return n||(0,p.default)(t.location.pathname,r,{exact:o,strict:i})},d=function(t){function e(){return o(this,e),i(this,t.apply(this,arguments))}return u(e,t),e.prototype.getChildContext=function(){return{router:this.router}},e.prototype.componentWillMount=function(){var t=this,e=this.context.router;this.router=a({},e,{match:h(e,this.props)}),this.unlisten=e.listen(function(){a(t.router,e,{match:h(e,t.props)}),t.forceUpdate()})},e.prototype.componentWillReceiveProps=function(t){a(this.router,{match:h(this.router,t)})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){return e.render(a({},this.props,this.router))},e}(f.default.Component);d.render=function(t){var e=t.component,n=t.render,r=t.match,o=t.children;return o&&!o.length&&(o=null),e?r?f.default.createElement(e,t):null:n?r?n(t):null:o?"function"==typeof o?o(t):f.default.Children.only(o):null},d.contextTypes={router:s.PropTypes.shape({listen:s.PropTypes.func.isRequired}).isRequired},d.childContextTypes={router:s.PropTypes.object.isRequired},e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var c=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(16),f=r(s),l=n(1),p=r(l),h=n(4),d=n(2),y=r(d),v=function(t){var e=t.pathname,n=void 0===e?"/":e,r=t.search,o=void 0===r?"":r,i=t.hash,u=void 0===i?"":i;return{pathname:n,search:"?"===o?"":o,hash:"#"===u?"":u}},b=function(t){return"string"==typeof t?(0,h.parsePath)(t):v(t)},m=function(t){return"string"==typeof t?t:(0,h.createPath)(t)},g=function(t){return function(){(0,f.default)(!1)}},w=function(){},x=function(t){function e(){var n,r,o;i(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=u(this,t.call.apply(t,[this].concat(c))),r.createHref=function(t){return r.props.basename+m(t)},r.handlePush=function(t){var e=r.props.context;e.action="PUSH",e.location=b(t),e.url=m(t)},r.handleReplace=function(t){var e=r.props.context;e.action="REPLACE",e.location=b(t),e.url=m(t)},r.handleListen=function(){return w},o=n,u(r,o)}return a(e,t),e.prototype.render=function(){var t=this.props,e=t.context,n=t.location,r=o(t,["context","location"]),i={staticContext:e,createHref:this.createHref,action:"POP",location:b(n),push:this.handlePush,replace:this.handleReplace,go:g("go"),goBack:g("goBack"),goForward:g("goForward"),listen:this.handleListen};return p.default.createElement(y.default,c({},r,{history:i}))},e}(p.default.Component);x.defaultProps={basename:"",location:"/"},e.default=x},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(1),c=r(a),s=n(3),f=r(s),l=function(t){function e(){var n,r,u;o(this,e);for(var a=arguments.length,c=Array(a),s=0;s<a;s++)c[s]=arguments[s];return n=r=i(this,t.call.apply(t,[this].concat(c))),r.state={location:null},u=n,i(r,u)}return u(e,t),e.prototype.componentWillMount=function(){var t=this,e=this.context.router;this.setState({location:e.location}),this.unlisten=e.listen(function(){t.setState({location:e.location})})},e.prototype.componentWillUnmount=function(){this.unlisten()},e.prototype.render=function(){for(var t=this.props.children,e=this.state.location,n=c.default.Children.toArray(t),r=void 0,o=void 0,i=0,u=n.length;null==o&&i<u;++i)r=n[i],o=(0,f.default)(e.pathname,r.props.path,r.props);return o?c.default.cloneElement(r,{computedMatch:o}):null},e}(c.default.Component);l.contextTypes={router:a.PropTypes.shape({listen:a.PropTypes.func.isRequired}).isRequired},e.default=l},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(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}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},c=n(1),s=r(c),f=function(t){var e,n;return n=e=function(e){function n(){return o(this,n),i(this,e.apply(this,arguments))}return u(n,e),n.prototype.componentWillMount=function(){var t=this;this.unlisten=this.context.router.listen(function(){return t.forceUpdate()})},n.prototype.componentWillUnmount=function(){this.unlisten()},n.prototype.render=function(){return s.default.createElement(t,a({},this.props,this.context.router))},n}(s.default.Component),e.displayName="withRouter("+(t.displayName||t.name)+")",e.contextTypes={router:c.PropTypes.shape({listen:c.PropTypes.func.isRequired}).isRequired},n};e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.locationsAreEqual=e.createLocation=void 0;var o=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},i=n(19),u=r(i),a=n(20),c=r(a),s=n(4);e.createLocation=function(t,e,n,r){var i=void 0;return"string"==typeof t?(i=(0,s.parsePath)(t),i.state=e):(i=o({},t),void 0===i.pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==e&&void 0===i.state&&(i.state=e)),i.key=n,r&&(i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,u.default)(i.pathname,r.pathname)):i.pathname=r.pathname),i},e.locationsAreEqual=function(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&(0,c.default)(t.state,e.state)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=("function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},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}),i=n(5),u=(r(i),n(4)),a=n(13),c=n(15),s=r(c),f=function(t,e,n){return Math.min(Math.max(t,e),n)},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.getUserConfirmation,n=t.initialEntries,r=void 0===n?["/"]:n,i=t.initialIndex,c=void 0===i?0:i,l=t.keyLength,p=void 0===l?6:l,h=(0,s.default)(),d=function(t){o(R,t),R.length=R.entries.length,h.notifyListeners(R.location,R.action)},y=function(){return Math.random().toString(36).substr(2,p)},v=f(c,0,r.length-1),b=r.map(function(t,e){return"string"==typeof t?(0,a.createLocation)(t,void 0,e?y():void 0):(0,a.createLocation)(t,void 0,e?t.key||y():void 0)}),m=u.createPath,g=function(t,n){var r="PUSH",o=(0,a.createLocation)(t,n,y(),R.location);h.confirmTransitionTo(o,r,e,function(t){if(t){var e=R.index,n=e+1,i=R.entries.slice(0);i.length>n?i.splice(n,i.length-n,o):i.push(o),d({action:r,location:o,index:n,entries:i})}})},w=function(t,n){var r="REPLACE",o=(0,a.createLocation)(t,n,y(),R.location);h.confirmTransitionTo(o,r,e,function(t){t&&(R.entries[R.index]=o,d({action:r,location:o}))})},x=function(t){var n=f(R.index+t,0,R.entries.length-1),r="POP",o=R.entries[n];h.confirmTransitionTo(o,r,e,function(t){t?d({action:r,location:o,index:n}):d()})},_=function(){return x(-1)},O=function(){return x(1)},P=function(t){var e=R.index+t;return e>=0&&e<R.entries.length},j=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return h.setPrompt(t)},E=function(t){return h.appendListener(t)},R={length:b.length,action:"POP",location:b[v],index:v,entries:b,createHref:m,push:g,replace:w,go:x,goBack:_,goForward:O,canGo:P,block:j,listen:E};return R};e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(5),i=(r(o),function(){var t=null,e=function(e){return t=e,function(){t===e&&(t=null)}},n=function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(i!==!1)}else o(!0)},r=[],o=function(t){var e=!0,n=function(){e&&t.apply(void 0,arguments)};return r.push(n),function(){e=!1,r=r.filter(function(t){return t!==n})}},i=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];r.forEach(function(t){return t.apply(void 0,e)})};return{setPrompt:e,confirmTransitionTo:n,appendListener:o,notifyListeners:i}});e.default=i},function(t,e,n){"use strict";var r=function(t,e,n,r,o,i,u,a){if(!t){var c;if(void 0===e)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,u,a],f=0;c=new Error(e.replace(/%s/g,function(){return s[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};t.exports=r},function(t,e,n){function r(t,e){for(var n,r=[],o=0,i=0,u="",a=e&&e.delimiter||"/";null!=(n=m.exec(t));){var f=n[0],l=n[1],p=n.index;if(u+=t.slice(i,p),i=p+f.length,l)u+=l[1];else{var h=t[i],d=n[2],y=n[3],v=n[4],b=n[5],g=n[6],w=n[7];u&&(r.push(u),u="");var x=null!=d&&null!=h&&h!==d,_="+"===g||"*"===g,O="?"===g||"*"===g,P=n[2]||a,j=v||b;r.push({name:y||o++,prefix:d||"",delimiter:P,optional:O,repeat:_,partial:x,asterisk:!!w,pattern:j?s(j):w?".*":"[^"+c(P)+"]+?"})}}return i<t.length&&(u+=t.substr(i)),u&&r.push(u),r}function o(t,e){return a(r(t,e))}function i(t){return encodeURI(t).replace(/[\/?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function u(t){return encodeURI(t).replace(/[?#]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})}function a(t){for(var e=new Array(t.length),n=0;n<t.length;n++)"object"==typeof t[n]&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,r){for(var o="",a=n||{},c=r||{},s=c.pretty?i:encodeURIComponent,f=0;f<t.length;f++){var l=t[f];if("string"!=typeof l){var p,h=a[l.name];if(null==h){if(l.optional){l.partial&&(o+=l.prefix);continue}throw new TypeError('Expected "'+l.name+'" to be defined')}if(b(h)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but received `'+JSON.stringify(h)+"`");if(0===h.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var d=0;d<h.length;d++){if(p=s(h[d]),!e[f].test(p))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'", but received `'+JSON.stringify(p)+"`");o+=(0===d?l.prefix:l.delimiter)+p}}else{if(p=l.asterisk?u(h):s(h),!e[f].test(p))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but received "'+p+'"');o+=l.prefix+p}}else o+=l}return o}}function c(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function p(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}function h(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(v(t[o],e,n).source);var i=new RegExp("(?:"+r.join("|")+")",l(n));return f(i,e)}function d(t,e,n){return y(r(t,n),e,n)}function y(t,e,n){b(e)||(n=e||n,e=[]),n=n||{};for(var r=n.strict,o=n.end!==!1,i="",u=0;u<t.length;u++){var a=t[u];if("string"==typeof a)i+=c(a);else{var s=c(a.prefix),p="(?:"+a.pattern+")";e.push(a),a.repeat&&(p+="(?:"+s+p+")*"),p=a.optional?a.partial?s+"("+p+")?":"(?:"+s+"("+p+"))?":s+"("+p+")",i+=p}}var h=c(n.delimiter||"/"),d=i.slice(-h.length)===h;return r||(i=(d?i.slice(0,-h.length):i)+"(?:"+h+"(?=$))?"),i+=o?"$":r&&d?"":"(?="+h+"|$)",f(new RegExp("^"+i,l(n)),e)}function v(t,e,n){return b(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?p(t,e):b(t)?h(t,e,n):d(t,e,n)}var b=n(18);t.exports=v,t.exports.parse=r,t.exports.compile=o,t.exports.tokensToFunction=a,t.exports.tokensToRegExp=y;var m=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g")},function(t,e){t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},function(t,e){"use strict";var n=function(t){return"/"===t.charAt(0)},r=function(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()},o=function(t){var e=arguments.length<=1||void 0===arguments[1]?"":arguments[1],o=t&&t.split("/")||[],i=e&&e.split("/")||[],u=t&&n(t),a=e&&n(e),c=u||a;if(t&&n(t)?i=o:o.length&&(i.pop(),i=i.concat(o)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,p=i.length;p>=0;p--){var h=i[p];"."===h?r(i,p):".."===h?(r(i,p),l++):l&&(r(i,p),l--)}if(!c)for(;l--;l)i.unshift("..");!c||""===i[0]||i[0]&&n(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d};t.exports=o},function(t,e){"use strict";e.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(Array.isArray(e))return!(!Array.isArray(r)||e.length!==r.length)&&e.every(function(e,n){return t(e,r[n])});var o="undefined"==typeof e?"undefined":n(e),i="undefined"==typeof r?"undefined":n(r);if(o!==i)return!1;if("object"===o){var u=e.valueOf(),a=r.valueOf();if(u!==e||a!==r)return t(u,a);var c=Object.keys(e),s=Object.keys(r);return c.length===s.length&&c.every(function(n){return t(e[n],r[n])})}return!1};e.default=r}])}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118876
2055
6
+ Addedinvariant@^2.2.2
+ Addedinvariant@2.2.4(transitive)