!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.ReduxLittleRouter=t(require("react")):e.ReduxLittleRouter=t(e.React)}(this,function(e){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Link=t.routerReducer=t.routerMiddleware=t.createStoreWithRouter=void 0;var o=r(1),u=n(o),i=r(16),a=n(i),c=r(14),f=n(c),s=r(17),d=n(s);t.createStoreWithRouter=u["default"],t.routerMiddleware=a["default"],t.routerReducer=f["default"],t.Link=d["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i=r(2),a=r(13),c=n(a),f=r(14),s=n(f),d=r(16),l=n(d);t["default"]=function(e){var t=e.middleware,r=e.routes,n=e.history,a=e.createMatcher,f=void 0===a?c["default"]:a;return function(e){return function(a,c){var d=function(e,t){var n=u({},e);return delete n.router,u({},a(n,t),{router:(0,s["default"])(r,f)(e.router,t)})};return e(d,c,i.applyMiddleware.apply(void 0,[(0,l["default"])(n)].concat(o(t))))}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.compose=t.applyMiddleware=t.bindActionCreators=t.combineReducers=t.createStore=void 0;var o=r(3),u=n(o),i=r(8),a=n(i),c=r(10),f=n(c),s=r(11),d=n(s),l=r(12),p=n(l),y=r(9);n(y);t.createStore=u["default"],t.combineReducers=a["default"],t.bindActionCreators=f["default"],t.applyMiddleware=d["default"],t.compose=p["default"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){function n(){y===p&&(y=p.slice())}function u(){return l}function c(e){if("function"!=typeof e)throw new Error("Expected listener to be a function.");var t=!0;return n(),y.push(e),function(){if(t){t=!1,n();var r=y.indexOf(e);y.splice(r,1)}}}function f(e){if(!(0,i["default"])(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if("undefined"==typeof e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(h)throw new Error("Reducers may not dispatch actions.");try{h=!0,l=d(l,e)}finally{h=!1}for(var t=p=y,r=0;r<t.length;r++)t[r]();return e}function s(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");d=e,f({type:a.INIT})}if("function"==typeof t&&"undefined"==typeof r&&(r=t,t=void 0),"undefined"!=typeof r){if("function"!=typeof r)throw new Error("Expected the enhancer to be a function.");return r(o)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var d=e,l=t,p=[],y=p,h=!1;return f({type:a.INIT}),{dispatch:f,subscribe:c,getState:u,replaceReducer:s}}t.__esModule=!0,t.ActionTypes=void 0,t["default"]=o;var u=r(4),i=n(u),a=t.ActionTypes={INIT:"@@redux/INIT"}},function(e,t,r){function n(e){if(!i(e)||l.call(e)!=a||u(e))return!1;var t=o(e);if(null===t)return!0;var r=s.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&f.call(r)==d}var o=r(5),u=r(6),i=r(7),a="[object Object]",c=Object.prototype,f=Function.prototype.toString,s=c.hasOwnProperty,d=f.call(Object),l=c.toString;e.exports=n},function(e,t){function r(e){return n(Object(e))}var n=Object.getPrototypeOf;e.exports=r},function(e,t){function r(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}e.exports=r},function(e,t){function r(e){return!!e&&"object"==typeof e}e.exports=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var r=t&&t.type,n=r&&'"'+r.toString()+'"'||"an action";return"Given action "+n+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state.'}function u(e){Object.keys(e).forEach(function(t){var r=e[t],n=r(void 0,{type:a.ActionTypes.INIT});if("undefined"==typeof n)throw new Error('Reducer "'+t+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var o="@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof r(void 0,{type:o}))throw new Error('Reducer "'+t+'" returned undefined when probed with a random type. '+("Don't try to handle "+a.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")})}function i(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var i=t[n];"function"==typeof e[i]&&(r[i]=e[i])}var a,c=Object.keys(r);try{u(r)}catch(f){a=f}return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];if(a)throw a;for(var n=!1,u={},i=0;i<c.length;i++){var f=c[i],s=r[f],d=e[f],l=s(d,t);if("undefined"==typeof l){var p=o(f,t);throw new Error(p)}u[f]=l,n=n||l!==d}return n?u:e}}t.__esModule=!0,t["default"]=i;var a=r(3),c=r(4),f=(n(c),r(9));n(f)},function(e,t){"use strict";function r(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(t){}}t.__esModule=!0,t["default"]=r},function(e,t){"use strict";function r(e,t){return function(){return t(e.apply(void 0,arguments))}}function n(e,t){if("function"==typeof e)return r(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(e),o={},u=0;u<n.length;u++){var i=n[u],a=e[i];"function"==typeof a&&(o[i]=r(a,t))}return o}t.__esModule=!0,t["default"]=n},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(e){return function(r,n,o){var i=e(r,n,o),c=i.dispatch,f=[],s={getState:i.getState,dispatch:function(e){return c(e)}};return f=t.map(function(e){return e(s)}),c=a["default"].apply(void 0,f)(i.dispatch),u({},i,{dispatch:c})}}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t["default"]=o;var i=r(12),a=n(i)},function(e,t){"use strict";function r(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return function(){if(0===t.length)return arguments.length<=0?void 0:arguments[0];var e=t[t.length-1],r=t.slice(0,-1);return r.reduceRight(function(e,t){return t(e)},e.apply(void 0,arguments))}}t.__esModule=!0,t["default"]=r},function(e,t){var r=/\((.*?)\)/g,n=/(\(\?)?:\w+/g,o=/[\-{}\[\]+?.,\\\^$|#\s]/g,u=/\*/g,i=function(e){var t=[];return e=e.replace(o,"\\$&").replace(r,"(?:$1)?").replace(n,function(e,r){return t.push(e.slice(1)),r?e:"([^/?]+)"}).replace(u,function(e,r){return t.push("path"),"([^?]*?)"}),{regExp:new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$"),namedParams:t}};e.exports=function(e,t){var r=Object.keys(e);for(var n in e)e[n]={value:e[n]};return function(n){var o,u,a=r.some(function(t){var r;u=e[t],u.regExp||(r=i(t),u.regExp=r.regExp,u.namedParams=r.namedParams);var a=u.regExp.exec(n);return a?(a=a.slice(1,-1),o=a.reduce(function(e,t,r){return t&&(e[u.namedParams[r]]=t),e},{}),!0):void 0});return a?{page:u.value,params:o,url:n}:t?{page:t,url:n,params:null}:null}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u=r(15),i=r(13),a=n(i);t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?a["default"]:arguments[1],r=t(e);return function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments[1];return t.type===u.LOCATION_CHANGED?o({},r(t.payload)):e}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.LOCATION_CHANGED="ROUTER_LOCATION_CHANGED",t.PUSH="ROUTER_PUSH",t.REPLACE="ROUTER_REPLACE",t.GO="ROUTER_GO",t.GO_BACK="ROUTER_GO_BACK",t.GO_FORWARD="ROUTER_GO_FORWARD"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(15),o=function(e){var t=e.basename,r=e.pathname;return{type:n.LOCATION_CHANGED,payload:(""+(t||"")+r).replace(/\/$/,"")}};t["default"]=function(e){return function(){return function(t){return function(r){switch(e.listen(function(e){t(o(e))}),r.type){case n.PUSH:e.push(r.payload.pathname);break;case n.REPLACE:e.replace(r.payload.pathname);break;case n.GO:e.go(r.payload.index);break;case n.GO_BACK:e.goBack();break;case n.GO_FORWARD:e.goForward();break;case n.LOCATION_CHANGED:break;default:t(r)}}}}}},function(e,t,r){"use strict";function n(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 u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),f=r(18),s=n(f),d=r(15),l=function(e){function t(){return o(this,t),u(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),c(t,[{key:"onClick",value:function(e){e.preventDefault(),this.props.dispatch({type:d.PUSH,payload:{pathname:this.props.href}})}},{key:"render",value:function(){var e=this.props,t=e.href,r=e.history,n=e.children;return s["default"].createElement("a",a({},this.props,{href:r?r.createHref(t):t,onClick:this.onClick.bind(this)}),n)}}]),t}(f.Component);t["default"]=l,l.propTypes={href:f.PropTypes.string,children:f.PropTypes.node,dispatch:f.PropTypes.func,history:f.PropTypes.object}},function(t,r){t.exports=e}])});
//# sourceMappingURL=redux-little-router.min.js.map