-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstormpath-sdk-react.min.js
6 lines (6 loc) · 161 KB
/
stormpath-sdk-react.min.js
1
2
3
4
5
6
!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.ReactStormpath=t(require("react")):e.ReactStormpath=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}}function o(){i["default"].init.apply(i["default"],arguments)}Object.defineProperty(t,"__esModule",{value:!0}),t.UserComponent=t.UserField=t.SocialLoginButton=t.SocialLoginLink=t.VerifyEmailView=t.ChangePasswordForm=t.ResetPasswordForm=t.RegistrationForm=t.UserProfileForm=t.LoginForm=t.LogoutLink=t.LoginLink=t.NotAuthenticated=t.Authenticated=t.AuthenticatedRoute=t.LogoutRoute=t.LoginRoute=t.HomeRoute=t.constants=t.actions=t.Router=t.context=void 0,t.init=o;var a=n(51),i=r(a),s=n(5),u=r(s),l=n(59),c=r(l),f=n(9),p=r(f),d=n(22),h=r(d),v=n(30),m=r(v),y=n(31),g=r(y),b=n(32),_=r(b),E=n(29),w=r(E),O=n(52),P=r(O),k=n(56),R=r(k),x=n(15),j=r(x),N=n(55),S=r(N),M=n(54),C=r(M),T=n(61),A=r(T),L=n(57),D=r(L),F=n(58),q=r(F),U=n(53),I=r(U),H=n(62),V=r(H),B=n(33),W=r(B),G=n(21),z=r(G),K=n(60),Y=r(K),Q=n(34),J=r(Q);t.context=u["default"],t.Router=c["default"],t.actions=p["default"],t.constants=h["default"],t.HomeRoute=m["default"],t.LoginRoute=g["default"],t.LogoutRoute=_["default"],t.AuthenticatedRoute=w["default"],t.Authenticated=P["default"],t.NotAuthenticated=R["default"],t.LoginLink=j["default"],t.LogoutLink=S["default"],t.LoginForm=C["default"],t.UserProfileForm=A["default"],t.RegistrationForm=D["default"],t.ResetPasswordForm=q["default"],t.ChangePasswordForm=I["default"],t.VerifyEmailView=V["default"],t.SocialLoginLink=W["default"],t.SocialLoginButton=z["default"],t.UserField=Y["default"],t.UserComponent=J["default"],t["default"]=i["default"]},function(e,t){function n(){l=!1,i.length?u=i.concat(u):c=-1,u.length&&r()}function r(){if(!l){var e=setTimeout(n);l=!0;for(var t=u.length;t;){for(i=u,u=[];++c<t;)i&&i[c].run();c=-1,t=u.length}i=null,l=!1,clearTimeout(e)}}function o(e,t){this.fun=e,this.array=t}function a(){}var i,s=e.exports={},u=[],l=!1,c=-1;s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new o(e,t)),1!==u.length||l||setTimeout(r,0)},o.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=a,s.addListener=a,s.once=a,s.off=a,s.removeListener=a,s.removeAllListeners=a,s.emit=a,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},function(t,n){t.exports=e},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 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}}(),i=n(110),s=r(i),u=n(2),l=r(u),c=function(){function e(){o(this,e),this.nopElement=l["default"].createElement("span",null)}return a(e,[{key:"uuid",value:function(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},{key:"translateProviderIdToName",value:function(e){var t={github:"GitHub",linkedin:"LinkedIn"},n=t[e];return n||(n=e[0].toUpperCase()+e.slice(1)),n}},{key:"encodeQueryString",value:function(e){var t="";for(var n in e)""!==t&&(t+="&"),t+=n+"="+encodeURIComponent(e[n]);return t}},{key:"deepForEach",value:function(e,t){t(e),e.props.children&&this.forEachChild(e.props.children,t,e)}},{key:"forEachChild",value:function(e,t,n){var r=this;l["default"].Children.forEach(e,function(e){t(e,n),e.props&&e.props.children&&r.forEachChild(e.props.children,t,e)})}},{key:"buildElementTree",value:function(e,t,n,r){var o=this,a=void 0,i=n&&n(e,r)||e,s=t&&t(e,r)||{};return i!==this.nopElement&&i.props&&i.props.children&&(a=l["default"].Children.map(i.props.children,function(e){return l["default"].isValidElement(e)?o.buildElementTree(e,t,n,i):n(e,r)})),l["default"].cloneElement(i,s,a)}},{key:"getFormFieldMap",value:function(e,t){var n={},r=function(e,t,r){e.props.ignore||(e.props.fieldName&&(t=elements.props.fieldName),"name"in n||(n[t]={element:e,defaultValue:r}))};this.forEachChild(e,function(e){e.props&&t(e,r.bind(null,e))});var o={},a={};for(var i in n){var s=n[i],u=s.element;u.type in o||(o[u.type]={}),a[i]=void 0!==s.defaultValue?s.defaultValue:u.props.value||"",o[u.type][u.props.name]={fieldName:i,field:u}}return{defaultValues:a,inverse:o}}},{key:"makeForm",value:function(e,t,n,r){var o=this,a=l["default"].cloneElement(l["default"].createElement("div",null),{},e.props.children),i=this.getFormFieldMap(a,t);e.state.fields=e.state.fields||{};for(var s in i.defaultValues)s in e.state.fields||(e.state.fields[s]=i.defaultValues[s]);var u=function(e,t){if(e.props){var a=e.props.spIf;if(a){var i=null,s=!1;if("!"===a[0]&&(s=!0,a=a.substr(1)),i=n(a,e),null!==i&&(s&&(i=!i),!i))return o.nopElement}var u=e.props.spBind;if(u){var l=r(u,e);(l!==!1||l)&&(e=l)}}return e},c=function(t,n){var r={};if(t.props){var o=t.type,a=t.props.name;if(o in i.inverse&&a in i.inverse[o]){var s=i.inverse[o][a];a in i.defaultValues&&(r.defaultValue=i.defaultValues[a]);var u=t.props.onChange;r.onChange=function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),a=1;n>a;a++)o[a-1]=arguments[a];r.disabled=e.state.isFormProcessing,e.state.fields[s.fieldName]=t.target.value,u&&u.apply(void 0,[t].concat(o))}}var l=t.props.type;"input"!==o&&"button"!==o||"submit"!==l||(r.disabled=e.state.isFormProcessing)}return r};return this.buildElementTree(a,c,u)}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"mergeObjects",value:function(e,t){var n={};if(e)for(var r in e)n[r]=e[r];if(t)for(var r in t)n[r]=t[r];return n}},{key:"isRelativeUri",value:function(e){return e&&"/"===e[0]}},{key:"isSameHost",value:function(e,t){var n=s["default"].parse(e);if(!n)return!1;var r=s["default"].parse(t);return r?n.host===r.host:!1}},{key:"logWarning",value:function(e,t){void 0===t&&(t=e,e=void 0);var n="[Stormpath SDK]";e&&(n+=" "+e),n+=": "+t,console.warn(n)}},{key:"getEnabledGroups",value:function(e){var t={};return e&&e.items&&e.items.forEach(function(e){if("ENABLED"===e.status){var n=e.name;-1!==n.indexOf(" ")&&(n=n.replace(/ /g,"_")),t[n]=!0}}),t}},{key:"makePredicateFunction",value:function(e){return new Function("\n var scope = arguments[0];\n\n var maskingScope = {};\n\n for (var key in window) {\n maskingScope[key] = undefined;\n }\n\n for (var key in scope) {\n maskingScope[key] = scope[key];\n }\n\n with (maskingScope) {\n return ("+e+");\n }\n ")}},{key:"groupsMatchExpression",value:function(e,t){if(!e)return!1;var n=JSON.parse(JSON.stringify(e)),r=this.makePredicateFunction(t);return t.match(/(\w+)/gim).forEach(function(e){e in n||(n[e]=!1)}),r(n)}},{key:"isArray",value:function(e){var t=Array.isArray,n=Object.prototype.toString;return t(e)||"[object Array]"===n.call(e)}},{key:"enforceRootElement",value:function(e){return("string"==typeof e||this.isArray(e))&&(e=l["default"].createElement("span",null,e)),e}}]),e}();t["default"]=new c},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(-1!==t.indexOf("deprecated")){if(u[t])return;u[t]=!0}t="[react-router] "+t;for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;n>o;o++)r[o-2]=arguments[o];s["default"].apply(void 0,[e,t].concat(r))}function a(){u={}}t.__esModule=!0,t["default"]=o,t._resetWarned=a;var i=n(8),s=r(i),u={}},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 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}}(),i=n(38),s=(r(i),function(){function e(){o(this,e),this.router=null,this.dispatcher=null,this.sessionStore=null,this.userStore=null}return a(e,[{key:"setRouter",value:function(e){this.router=e}},{key:"getRouter",value:function(){return this.router}},{key:"setDispatcher",value:function(e){this.dispatcher=e}},{key:"getDispatcher",value:function(){return this.dispatcher}},{key:"setSessionStore",value:function(e){this.sessionStore=e}},{key:"getSessionStore",value:function(){return this.sessionStore}},{key:"setUserStore",value:function(e){this.userStore=e}},{key:"getUserStore",value:function(){return this.userStore}}]),e}());t["default"]=new s},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,o,a,i,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,a,i,s,u],f=0;l=new Error(n.replace(/%s/g,function(){return c[f++]})),l.name="Invariant Violation"}throw l.framesToPop=1,l}};e.exports=n}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.createMemoryHistory=t.hashHistory=t.browserHistory=t.applyRouterMiddleware=t.formatPattern=t.useRouterHistory=t.match=t.routerShape=t.locationShape=t.PropTypes=t.RoutingContext=t.RouterContext=t.createRoutes=t.useRoutes=t.RouteContext=t.Lifecycle=t.History=t.Route=t.Redirect=t.IndexRoute=t.IndexRedirect=t.withRouter=t.IndexLink=t.Link=t.Router=void 0;var o=n(10);Object.defineProperty(t,"createRoutes",{enumerable:!0,get:function(){return o.createRoutes}});var a=n(27);Object.defineProperty(t,"locationShape",{enumerable:!0,get:function(){return a.locationShape}}),Object.defineProperty(t,"routerShape",{enumerable:!0,get:function(){return a.routerShape}});var i=n(14);Object.defineProperty(t,"formatPattern",{enumerable:!0,get:function(){return i.formatPattern}});var s=n(94),u=r(s),l=n(45),c=r(l),f=n(88),p=r(f),d=n(107),h=r(d),v=n(89),m=r(v),y=n(90),g=r(y),b=n(46),_=r(b),E=n(92),w=r(E),O=n(87),P=r(O),k=n(91),R=r(k),x=n(93),j=r(x),N=n(106),S=r(N),M=n(18),C=r(M),T=n(95),A=r(T),L=r(a),D=n(104),F=r(D),q=n(50),U=r(q),I=n(97),H=r(I),V=n(98),B=r(V),W=n(102),G=r(W),z=n(48),K=r(z);t.Router=u["default"],t.Link=c["default"],t.IndexLink=p["default"],t.withRouter=h["default"],t.IndexRedirect=m["default"],t.IndexRoute=g["default"],t.Redirect=_["default"],t.Route=w["default"],t.History=P["default"],t.Lifecycle=R["default"],t.RouteContext=j["default"],t.useRoutes=S["default"],t.RouterContext=C["default"],t.RoutingContext=A["default"],t.PropTypes=L["default"],t.match=F["default"],t.useRouterHistory=U["default"],t.applyRouterMiddleware=H["default"],t.browserHistory=B["default"],t.hashHistory=G["default"],t.createMemoryHistory=K["default"]},function(e,t,n){(function(t){"use strict";var n=function(){};"production"!==t.env.NODE_ENV&&(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 a=0,i="Warning: "+t.replace(/%s/g,function(){return n[a++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(s){}}}),e.exports=n}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){setTimeout(function(){u["default"].getDispatcher().dispatch(e)},0)}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}}(),s=n(5),u=r(s),l=n(22),c=r(l),f=function(){function e(){o(this,e)}return i(e,[{key:"login",value:function(e,t){a({type:c["default"].USER_LOGIN,options:e,callback:t})}},{key:"register",value:function(e,t){a({type:c["default"].USER_REGISTER,options:e,callback:t})}},{key:"forgotPassword",value:function(e,t){a({type:c["default"].USER_FORGOT_PASSWORD,options:e,callback:t})}},{key:"verifyEmail",value:function(e,t){a({type:c["default"].USER_VERIFY_EMAIL,options:{spToken:e},callback:t})}},{key:"changePassword",value:function(e,t){a({type:c["default"].USER_CHANGE_PASSWORD,options:e,callback:t})}},{key:"updateProfile",value:function(e,t){a({type:c["default"].USER_UPDATE_PROFILE,options:{data:e},callback:t})}},{key:"set",value:function(e){a({type:c["default"].USER_SET,options:{data:e}})}},{key:"logout",value:function(e){a({type:c["default"].USER_LOGOUT,callback:e})}}]),e}();t["default"]=new f},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return null==e||d["default"].isValidElement(e)}function a(e){return o(e)||Array.isArray(e)&&e.every(o)}function i(t,n,r){t=t||"UnknownComponent";for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var a=n[o](r,o,t);a instanceof Error&&("production"!==e.env.NODE_ENV?(0,v["default"])(!1,a.message):void 0)}}function s(e,t){return f({},e,t)}function u(e){var t=e.type,n=s(t.defaultProps,e.props);if(t.propTypes&&i(t.displayName||t.name,t.propTypes,n),n.children){var r=l(n.children,n);r.length&&(n.childRoutes=r),delete n.children}return n}function l(e,t){var n=[];return d["default"].Children.forEach(e,function(e){if(d["default"].isValidElement(e))if(e.type.createRouteFromReactElement){var r=e.type.createRouteFromReactElement(e,t);r&&n.push(r)}else n.push(u(e))}),n}function c(e){return a(e)?e=l(e):e&&!Array.isArray(e)&&(e=[e]),e}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.isReactChildren=a,t.createRouteFromReactElement=u,t.createRoutesFromReactChildren=l,t.createRoutes=c;var p=n(2),d=r(p),h=n(4),v=r(h)}).call(t,n(1))},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=e.match(/^https?:\/\/[^\/]*/);return null==t?e:e.substring(t[0].length)}function a(t){var n=o(t),r="",a="";"production"!==e.env.NODE_ENV?s["default"](t===n,'A path must be pathname + search + hash only, not a fully qualified URL like "%s"',t):void 0;var i=n.indexOf("#");-1!==i&&(a=n.substring(i),n=n.substring(0,i));var u=n.indexOf("?");return-1!==u&&(r=n.substring(u),n=n.substring(0,u)),""===n&&(n="/"),{pathname:n,search:r,hash:a}}t.__esModule=!0,t.extractPath=o,t.parsePath=a;var i=n(8),s=r(i)}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t,n){return e[t]?new Error("<"+n+'> should not have a "'+t+'" prop'):void 0}t.__esModule=!0,t.routes=t.route=t.components=t.component=t.history=void 0,t.falsy=r;var o=n(2),a=o.PropTypes.func,i=o.PropTypes.object,s=o.PropTypes.arrayOf,u=o.PropTypes.oneOfType,l=o.PropTypes.element,c=o.PropTypes.shape,f=o.PropTypes.string,p=(t.history=c({listen:a.isRequired,push:a.isRequired,replace:a.isRequired,go:a.isRequired,goBack:a.isRequired,goForward:a.isRequired}),t.component=u([a,f])),d=(t.components=u([p,i]),t.route=u([i,l]));t.routes=u([d,s(d)])},function(e,t){"use strict";t.__esModule=!0;var n="PUSH";t.PUSH=n;var r="REPLACE";t.REPLACE=r;var o="POP";t.POP=o,t["default"]={PUSH:n,REPLACE:r,POP:o}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function a(e){for(var t="",n=[],r=[],a=void 0,i=0,s=/:([a-zA-Z_$][a-zA-Z0-9_$]*)|\*\*|\*|\(|\)/g;a=s.exec(e);)a.index!==i&&(r.push(e.slice(i,a.index)),t+=o(e.slice(i,a.index))),a[1]?(t+="([^/]+)",n.push(a[1])):"**"===a[0]?(t+="(.*)",n.push("splat")):"*"===a[0]?(t+="(.*?)",n.push("splat")):"("===a[0]?t+="(?:":")"===a[0]&&(t+=")?"),r.push(a[0]),i=s.lastIndex;return i!==e.length&&(r.push(e.slice(i,e.length)),t+=o(e.slice(i,e.length))),{pattern:e,regexpSource:t,paramNames:n,tokens:r}}function i(e){return e in d||(d[e]=a(e)),d[e]}function s(e,t){"/"!==e.charAt(0)&&(e="/"+e);var n=i(e),r=n.regexpSource,o=n.paramNames,a=n.tokens;"/"!==e.charAt(e.length-1)&&(r+="/?"),"*"===a[a.length-1]&&(r+="$");var s=t.match(new RegExp("^"+r,"i"));if(null==s)return null;var u=s[0],l=t.substr(u.length);if(l){if("/"!==u.charAt(u.length-1))return null;l="/"+l}return{remainingPathname:l,paramNames:o,paramValues:s.slice(1).map(function(e){return e&&decodeURIComponent(e)})}}function u(e){return i(e).paramNames}function l(e,t){var n=s(e,t);if(!n)return null;var r=n.paramNames,o=n.paramValues,a={};return r.forEach(function(e,t){a[e]=o[t]}),a}function c(t,n){n=n||{};for(var r=i(t),o=r.tokens,a=0,s="",u=0,l=void 0,c=void 0,f=void 0,d=0,h=o.length;h>d;++d)l=o[d],"*"===l||"**"===l?(f=Array.isArray(n.splat)?n.splat[u++]:n.splat,null!=f||a>0?void 0:"production"!==e.env.NODE_ENV?(0,p["default"])(!1,'Missing splat #%s for path "%s"',u,t):(0,p["default"])(!1),null!=f&&(s+=encodeURI(f))):"("===l?a+=1:")"===l?a-=1:":"===l.charAt(0)?(c=l.substring(1),f=n[c],null!=f||a>0?void 0:"production"!==e.env.NODE_ENV?(0,p["default"])(!1,'Missing "%s" parameter for path "%s"',c,t):(0,p["default"])(!1),null!=f&&(s+=encodeURIComponent(f))):s+=l;return s.replace(/\/+/g,"/")}t.__esModule=!0,t.compilePattern=i,t.matchPattern=s,t.getParamNames=u,t.getParams=l,t.formatPattern=c;var f=n(6),p=r(f),d={}}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=n(7),f=n(5),p=r(f),d=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"render",value:function(){var e=p["default"].getRouter(),t=e.getLoginRoute(),n=(t||{}).path||"/login";return l["default"].createElement(c.Link,{to:n,className:this.props.className},this.props.children?this.props.children:"Login")}}]),t}(l["default"].Component);t["default"]=d},function(e,t){"use strict";t.__esModule=!0;var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.canUseDOM=n},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return f.stringify(e).replace(/%20/g,"+")}function i(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"object"==typeof e[t]&&!Array.isArray(e[t])&&null!==e[t])return!0;return!1}function s(e){return function(){function t(e){if(null==e.query){var t=e.search;e.query=k(t.substring(1)),e[y]={search:t,searchBase:""}}return e}function n(e,t){var n,o=e[y],s=t?P(t):"";if(!o&&!s)return e;"production"!==r.env.NODE_ENV?c["default"](P!==a||!i(t),"useQueries does not stringify nested query objects by default; use a custom stringifyQuery function"):void 0,"string"==typeof e&&(e=h.parsePath(e));var l=void 0;l=o&&e.search===o.search?o.searchBase:e.search||"";var f=l;return s&&(f+=(f?"&":"?")+s),u({},e,(n={search:f},n[y]={search:f,searchBase:l},n))}function o(e){return O.listenBefore(function(n,r){d["default"](e,t(n),r)})}function s(e){return O.listen(function(n){e(t(n))})}function l(e){O.push(n(e,e.query))}function f(e){O.replace(n(e,e.query))}function p(e,t){return"production"!==r.env.NODE_ENV?c["default"](!t,"the query argument to createPath is deprecated; use a location descriptor instead"):void 0,O.createPath(n(e,t||e.query))}function v(e,t){return"production"!==r.env.NODE_ENV?c["default"](!t,"the query argument to createHref is deprecated; use a location descriptor instead"):void 0,O.createHref(n(e,t||e.query))}function b(e){for(var r=arguments.length,o=Array(r>1?r-1:0),a=1;r>a;a++)o[a-1]=arguments[a];var i=O.createLocation.apply(O,[n(e,e.query)].concat(o));return e.query&&(i.query=e.query),t(i)}function _(e,t,n){"string"==typeof t&&(t=h.parsePath(t)),l(u({state:e},t,{query:n}))}function E(e,t,n){"string"==typeof t&&(t=h.parsePath(t)),f(u({state:e},t,{query:n}))}var w=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],O=e(w),P=w.stringifyQuery,k=w.parseQueryString;return"function"!=typeof P&&(P=a),"function"!=typeof k&&(k=g),u({},O,{listenBefore:o,listen:s,push:l,replace:f,createPath:p,createHref:v,createLocation:b,pushState:m["default"](_,"pushState is deprecated; use push instead"),replaceState:m["default"](E,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(8),c=o(l),f=n(81),p=n(25),d=o(p),h=n(11),v=n(24),m=o(v),y="$searchBase",g=f.parse;t["default"]=s,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(6),u=o(s),l=n(2),c=o(l),f=n(19),p=o(f),d=n(101),h=o(d),v=n(10),m=n(4),y=o(m),g=c["default"].PropTypes,b=g.array,_=g.func,E=g.object,w=c["default"].createClass({displayName:"RouterContext",propTypes:{history:E,router:E.isRequired,location:E.isRequired,routes:b.isRequired,params:E.isRequired,components:b.isRequired,createElement:_.isRequired},getDefaultProps:function(){return{createElement:c["default"].createElement}},childContextTypes:{history:E,location:E.isRequired,router:E.isRequired},getChildContext:function(){var e=this.props,t=e.router,n=e.history,o=e.location;return t||("production"!==r.env.NODE_ENV?(0,y["default"])(!1,"`<RouterContext>` expects a `router` rather than a `history`"):void 0,t=i({},n,{setRouteLeaveHook:n.listenBeforeLeavingRoute}),delete t.listenBeforeLeavingRoute),"production"!==r.env.NODE_ENV&&(o=(0,p["default"])(o,"`context.location` is deprecated, please use a route component's `props.location` instead. http://tiny.cc/router-accessinglocation")),{history:n,location:o,router:t}},createElement:function(e,t){return null==e?null:this.props.createElement(e,t)},render:function(){var e=this,t=this.props,n=t.history,o=t.location,s=t.routes,l=t.params,f=t.components,p=null;return f&&(p=f.reduceRight(function(t,r,u){if(null==r)return t;var c=s[u],f=(0,h["default"])(c,l),p={history:n,location:o,params:l,route:c,routeParams:f,routes:s};if((0,v.isReactChildren)(t))p.children=t;else if(t)for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(p[d]=t[d]);if("object"===("undefined"==typeof r?"undefined":a(r))){var m={};for(var y in r)Object.prototype.hasOwnProperty.call(r,y)&&(m[y]=e.createElement(r[y],i({key:y},p)));return m}return e.createElement(r,p)},p)),null===p||p===!1||c["default"].isValidElement(p)?void 0:"production"!==r.env.NODE_ENV?(0,u["default"])(!1,"The root route must render a single element"):(0,u["default"])(!1),p}});t["default"]=w,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.canUseMembrane=void 0;var o=n(4),a=r(o),i=t.canUseMembrane=!1,s=function(e){return e};if("production"!==e.env.NODE_ENV){try{Object.defineProperty({},"x",{get:function(){return!0}}).x&&(t.canUseMembrane=i=!0)}catch(u){}i&&(s=function(t,n){var r={},o=function(o){return Object.prototype.hasOwnProperty.call(t,o)?"function"==typeof t[o]?(r[o]=function(){return"production"!==e.env.NODE_ENV?(0,a["default"])(!1,n):void 0,t[o].apply(t,arguments)},"continue"):void Object.defineProperty(r,o,{get:function(){return"production"!==e.env.NODE_ENV?(0,a["default"])(!1,n):void 0,t[o]}}):"continue"};for(var i in t){o(i)}return r})}t["default"]=s}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),c=r(l),f=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.waitTimeout=null,r.state={text:null},i=n,a(r,i)}return i(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;this.waitTimeout=setTimeout(function(){e.setState({text:e.props.text||"Loading..."})},this.props.showAfter||250)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.waitTimeout)}},{key:"render",value:function(){return this.state.text?c["default"].createElement("p",s({},this.props,{style:{textAlign:"center"}}),this.props.children?this.props.children:this.state.text):null}}]),t}(c["default"].Component);t["default"]=f},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),c=r(l),f=n(3),p=r(f),d=n(33),h=r(d),v=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),u(t,[{key:"render",value:function(){var e=this.props.providerId;return c["default"].createElement(h["default"],s({},this.props,{className:"btn btn-default btn-social btn-"+e}),this.props.hideIcon?null:c["default"].createElement("span",{className:"fa fa-"+e,style:{marginRight:"5px"}}),this.props.children?this.props.children:p["default"].translateProviderIdToName(e))}}]),t}(c["default"].Component);t["default"]=v},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(83),a=r(o);t["default"]=(0,a["default"])({USER_LOGIN:null,USER_SET:null,USER_REGISTER:null,USER_FORGOT_PASSWORD:null,USER_CHANGE_PASSWORD:null,USER_UPDATE_PROFILE:null,USER_VERIFY_EMAIL:null,USER_LOGOUT:null})},function(e,t){"use strict";function n(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function r(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent("on"+t,n)}function o(){return window.location.href.split("#")[1]||""}function a(e){window.location.replace(window.location.pathname+window.location.search+"#"+e)}function i(){return window.location.pathname+window.location.search+window.location.hash}function s(e){e&&window.history.go(e)}function u(e,t){t(window.confirm(e))}function l(){var e=navigator.userAgent;return-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")?window.history&&"pushState"in window.history:!1}function c(){var e=navigator.userAgent;return-1===e.indexOf("Firefox")}t.__esModule=!0,t.addEventListener=n,t.removeEventListener=r,t.getHashPath=o,t.replaceHashPath=a,t.getWindowPath=i,t.go=s,t.getUserConfirmation=u,t.supportsHistory=l,t.supportsGoWithoutReloadUsingHash=c},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){return function(){return"production"!==r.env.NODE_ENV?s["default"](!1,"[history] "+t):void 0,e.apply(this,arguments)}}t.__esModule=!0;var i=n(8),s=o(i);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){var o=e(t,n);e.length<2?n(o):"production"!==r.env.NODE_ENV?s["default"](void 0===o,'You should not "return" in a transition hook with a callback argument; call the callback instead'):void 0}t.__esModule=!0;var i=n(8),s=o(i);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t){"use strict";function n(e,t,n){function r(){return i=!0,s?void(l=[].concat(Array.prototype.slice.call(arguments))):void n.apply(this,arguments)}function o(){if(!i&&(u=!0,!s)){for(s=!0;!i&&e>a&&u;)u=!1,t.call(this,a++,o,r);return s=!1,i?void n.apply(this,l):void(a>=e&&u&&(i=!0,n()))}}var a=0,i=!1,s=!1,u=!1,l=void 0;o()}function r(e,t,n){function r(e,t,r){i||(t?(i=!0,n(t)):(a[e]=r,i=++s===o,i&&n(null,a)))}var o=e.length,a=[];if(0===o)return n(null,a);var i=!1,s=0;e.forEach(function(e,n){t(e,n,function(e,t){r(n,e,t)})})}t.__esModule=!0,t.loopAsync=n,t.mapAsync=r},function(e,t,n){(function(e){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);
return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t.router=t.routes=t.route=t.components=t.component=t.location=t.history=t.falsy=t.locationShape=t.routerShape=void 0;var a=n(2),i=n(19),s=o(i),u=n(12),l=r(u),c=n(4),f=o(c),p=a.PropTypes.func,d=a.PropTypes.object,h=a.PropTypes.shape,v=a.PropTypes.string,m=t.routerShape=h({push:p.isRequired,replace:p.isRequired,go:p.isRequired,goBack:p.isRequired,goForward:p.isRequired,setRouteLeaveHook:p.isRequired,isActive:p.isRequired}),y=t.locationShape=h({pathname:v.isRequired,search:v.isRequired,state:d,action:v.isRequired,key:v}),g=t.falsy=l.falsy,b=t.history=l.history,_=t.location=y,E=t.component=l.component,w=t.components=l.components,O=t.route=l.route,P=t.routes=l.routes,k=t.router=m;"production"!==e.env.NODE_ENV&&!function(){var n=function(t,n){return function(){return"production"!==e.env.NODE_ENV?(0,f["default"])(!1,n):void 0,t.apply(void 0,arguments)}},r=function(e){return n(e,"This prop type is not intended for external use, and was previously exported by mistake. These internal prop types are deprecated for external use, and will be removed in a later version.")},o=function(e,t){return n(e,"The `"+t+"` prop type is now exported as `"+t+"Shape` to avoid name conflicts. This export is deprecated and will be removed in a later version.")};t.falsy=g=r(g),t.history=b=r(b),t.component=E=r(E),t.components=w=r(w),t.route=O=r(O),t.routes=P=r(P),t.location=_=o(_,"location"),t.router=k=o(k,"router")}();var R={falsy:g,history:b,location:_,component:E,components:w,route:O,router:k};"production"!==e.env.NODE_ENV&&(R=(0,s["default"])(R,"The default export from `react-router/lib/PropTypes` is deprecated. Please use the named exports instead.")),t["default"]=R}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!0;return!1}function i(e,t){function n(t){var n=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],o=arguments.length<=2||void 0===arguments[2]?null:arguments[2],a=void 0;return n&&n!==!0||null!==o?("production"!==r.env.NODE_ENV?(0,l["default"])(!1,"`isActive(pathname, query, indexOnly) is deprecated; use `isActive(location, indexOnly)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated"):void 0,t={pathname:t,query:n},a=o||!1):(t=e.createLocation(t),a=n),(0,v["default"])(t,a,O.location,O.routes,O.params)}function o(t){return e.createLocation(t,c.REPLACE)}function i(e,n){P&&P.location===e?u(P,n):(0,b["default"])(t,e,function(t,r){t?n(t):r?u(s({},r,{location:e}),n):n()})}function u(e,t){function n(n,o){return n||o?r(n,o):void(0,y["default"])(e,function(n,r){n?t(n):t(null,null,O=s({},e,{components:r}))})}function r(e,n){e?t(e):t(null,o(n))}var a=(0,p["default"])(O,e),i=a.leaveRoutes,u=a.changeRoutes,l=a.enterRoutes;(0,d.runLeaveHooks)(i),i.filter(function(e){return-1===l.indexOf(e)}).forEach(_),(0,d.runChangeHooks)(u,O,e,function(t,o){return t||o?r(t,o):void(0,d.runEnterHooks)(l,e,n)})}function f(e){var t=arguments.length<=1||void 0===arguments[1]?!0:arguments[1];return e.__id__||t&&(e.__id__=k++)}function h(e){return e.reduce(function(e,t){return e.push.apply(e,R[f(t)]),e},[])}function m(e,n){(0,b["default"])(t,e,function(t,r){if(null==r)return void n();P=s({},r,{location:e});for(var o=h((0,p["default"])(O,P).leaveRoutes),a=void 0,i=0,u=o.length;null==a&&u>i;++i)a=o[i](e);n(a)})}function g(){if(O.routes){for(var e=h(O.routes),t=void 0,n=0,r=e.length;"string"!=typeof t&&r>n;++n)t=e[n]();return t}}function _(e){var t=f(e,!1);t&&(delete R[t],a(R)||(x&&(x(),x=null),j&&(j(),j=null)))}function E(t,n){var o=f(t),i=R[o];if(i)-1===i.indexOf(n)&&("production"!==r.env.NODE_ENV?(0,l["default"])(!1,"adding multiple leave hooks for the same route is deprecated; manage multiple confirmations in your own code instead"):void 0,i.push(n));else{var s=!a(R);R[o]=[n],s&&(x=e.listenBefore(m),e.listenBeforeUnload&&(j=e.listenBeforeUnload(g)))}return function(){var e=R[o];if(e){var r=e.filter(function(e){return e!==n});0===r.length?_(t):R[o]=r}}}function w(t){return e.listen(function(n){O.location===n?t(null,O):i(n,function(o,a,i){o?t(o):a?e.transitionTo(a):i?t(null,i):"production"!==r.env.NODE_ENV?(0,l["default"])(!1,'Location "%s" did not match any routes',n.pathname+n.search+n.hash):void 0})})}var O={},P=void 0,k=1,R=Object.create(null),x=void 0,j=void 0;return{isActive:n,match:i,listenBeforeLeavingRoute:E,listen:w}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=i;var u=n(4),l=o(u),c=n(13),f=n(99),p=o(f),d=n(96),h=n(103),v=o(h),m=n(100),y=o(m),g=n(105),b=o(g);e.exports=t["default"]}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=n(7),c=n(5),f=r(c),p=(u=s=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(l.Route),s.defaultProps={onEnter:function(e,t,n){f["default"].userStore.isAuthenticated({inGroup:this.inGroup},function(e,r){if(!r){var o=f["default"].getRouter(),a=o.getHomeRoute(),i=o.getLoginRoute(),s=(i||{}).path||(a||{}).path||"/";t(s)}n()})}},u);t["default"]=p},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var i=n(7),s=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),t}(i.Route);t["default"]=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 a(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}),t["default"]=void 0;var s,u,l=n(7),c=n(5),f=r(c),p=(u=s=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(l.Route),s.defaultProps={onEnter:function(e,t,n){f["default"].userStore.isAuthenticated(function(e,r){if(r){var o=f["default"].getRouter(),a=o.getHomeRoute(),i=o.getAuthenticatedHomeRoute(),s=(i||{}).path||(a||{}).path||"/";t(s)}n()})}},u);t["default"]=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=n(2),c=(r(l),n(7)),f=(r(c),n(5)),p=r(f),d=n(9),h=r(d),v=(u=s=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),t}(c.Route),s.defaultProps={onEnter:function(e,t,n){var r=this;h["default"].logout(function(){var e=p["default"].getRouter(),o=e.getHomeRoute(),a=e.getLoginRoute(),i=r.redirectTo||(o||{}).path||(a||{}).path||"/";t(i),n()})}},u);t["default"]=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),c=r(l),f=n(3),p=r(f),d=n(5),h=r(d),v={github:"https://github.com/login/oauth/authorize",google:"https://accounts.google.com/o/oauth2/v2/auth",linkedin:"https://www.linkedin.com/uas/oauth2/authorization",facebook:"https://www.facebook.com/dialog/oauth"},m=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={disabled:!1},i=n,a(r,i)}return i(t,e),u(t,[{key:"_buildRedirectUri",value:function(e){return location.protocol+"//"+location.host+"/callbacks/"+e.providerId}},{key:"_createStateCookie",value:function(){var e=p["default"].uuid();return document.cookie="oauthStateToken="+e,e}},{key:"_buildAuthorizationUri",value:function(e,t,n){var r=v[e.providerId];if(!r)return!1;var o={client_id:e.clientId,scope:t||e.scope,redirect_uri:n||this._buildRedirectUri(e),state:this._createStateCookie(),response_type:"code"};return r+"?"+p["default"].encodeQueryString(o)}},{key:"_findProvider",value:function(e,t){for(var n,r=0;r<e.length;r++){var o=e[r];if(o.provider.providerId===t){n=o.provider;break}}return n}},{key:"_onClick",value:function(e){var t=this;if(e.preventDefault(),!this.state.disabled){this.setState({disabled:!0});var n=this.props.providerId;h["default"].userStore.getLoginViewData(function(e,r){if(e)return console.error("Error: Unable to retrieve login view data.");var o=t._findProvider(r.accountStores,n);return o?void(window.location.href=t._buildAuthorizationUri(o,t.props.scope,t.props.redirectUri)):console.error("Error: Unable to login. Social provider "+p["default"].translateProviderIdToName(n)+" not configured.")})}}},{key:"render",value:function(){var e=this.props.providerId;return c["default"].createElement("a",s({},this.props,{href:"#",onClick:this._onClick.bind(this),disabled:this.state.disabled}),this.props.children?this.props.children:"Login with "+p["default"].translateProviderIdToName(e))}}]),t}(c["default"].Component);t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=n(3),f=r(c),p=n(5),d=r(p),h=function(e){function t(){o(this,t);var e=a(this,Object.getPrototypeOf(t).apply(this,arguments));return e.onChangeListener=null,e.state={user:{}},f["default"].logWarning("The UserComponent class has been deprecated. Please use the user context instead. See: https://github.com/stormpath/stormpath-sdk-react/blob/master/docs/api.md#contexts"),e}return i(t,e),s(t,[{key:"onChange",value:function(){var e=this;d["default"].userStore.resolveSession(function(t,n){null!==e.onChangeListener&&e.setState({user:n})})}},{key:"componentDidMount",value:function(){this.onChangeListener=this.onChange.bind(this),d["default"].userStore.addChangeListener(this.onChangeListener),this.onChange()}},{key:"componentWillUnmount",value:function(){d["default"].userStore.removeChangeListener(this.onChangeListener),this.onChangeListener=null}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n,r,o){var a=new XMLHttpRequest;if(a.open(e.toUpperCase(),t,!0),r)for(var i in r){var u=r[i];a.setRequestHeader(i,u)}a.onreadystatechange=function(){if(4===a.readyState){var e={status:a.status,responseJSON:null};try{a.responseText&&(e.responseJSON=JSON.parse(a.responseText)),o(null,e)}catch(t){o(t)}}},n&&"object"===("undefined"==typeof n?"undefined":s(n))?(a.setRequestHeader("Content-Type","application/json; charset=utf-8"),a.send(JSON.stringify(n))):a.send()}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 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}}(),s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},u=n(2),l=r(u),c=n(3),f=r(c),p=function(){function e(t){o(this,e);var n={baseUri:null};this.endpoints=f["default"].mergeObjects(n,t)}return i(e,[{key:"_makeRequest",value:function(e,t,n,r){var o=this._buildEndpoint(t),i={Accept:"application/json"};(f["default"].isRelativeUri(o)||f["default"].isSameHost(o,window.location.href))&&(i["X-Stormpath-Agent"]="react-stormpath/1.2.1 react/"+l["default"].version),a(e,o,n,i,function(e,t){if(e)return r(e);var n=t.responseJSON||{};if(200===t.status)r(null,n);else{var o=new Error(n.message||n.error||"A request to the API failed.");o.status=t.status,r(o)}})}},{key:"_buildEndpoint",value:function(e){return(this.endpoints.baseUri||"")+e}}]),e}();t["default"]=p},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.waiting=[]}return r(e,[{key:"request",value:function(e,t){var n=this.waiting;return n.push(t),1===n.length&&e(function(){for(;n.length;)n.shift().apply(null,arguments)}),!1}}]),e}();t["default"]=o},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}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}}(),s=n(39).EventEmitter,u=function(e){function t(){return r(this,t),o(this,Object.getPrototypeOf(t).apply(this,arguments))}return a(t,e),i(t,[{key:"emitChange",value:function(e){this.emit("changed",e)}},{key:"addChangeListener",value:function(e){return this.on("changed",e)}},{key:"removeChangeListener",value:function(e){this.removeListener("changed",e)}}]),t}(s);t["default"]=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(37),l=r(u),c=n(3),f=r(c),p=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.session=void 0,i=n,a(r,i)}return i(t,e),s(t,[{key:"get",value:function(){return this.session}},{key:"set",value:function(e){e&&e.groups&&e.groups.href&&(e.groups=f["default"].getEnabledGroups(e.groups)),JSON.stringify(this.session)!==JSON.stringify(e)&&(this.session=e,this.emitChange(e))}},{key:"empty",value:function(){return void 0===this.session}},{key:"reset",value:function(){void 0!==this.session&&(this.session=void 0,this.emitChange(void 0))}}]),t}(l["default"]);t["default"]=p},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!o(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,o,s,u,l;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(n=this._events[e],i(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),l=n.slice(),o=l.length,u=0;o>u;u++)l[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var o;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(o=i(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),o||(o=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var o=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,o,i,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],i=n.length,o=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=i;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){o=s;break}if(0>o)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return l+e}function a(t,n){try{null==n?window.sessionStorage.removeItem(o(t)):window.sessionStorage.setItem(o(t),JSON.stringify(n))}catch(r){if(r.name===f)return void("production"!==e.env.NODE_ENV?u["default"](!1,"[history] Unable to save state; sessionStorage is not available due to security settings"):void 0);if(c.indexOf(r.name)>=0&&0===window.sessionStorage.length)return void("production"!==e.env.NODE_ENV?u["default"](!1,"[history] Unable to save state; sessionStorage is not available in Safari private mode"):void 0);throw r}}function i(t){var n=void 0;try{n=window.sessionStorage.getItem(o(t))}catch(r){if(r.name===f)return"production"!==e.env.NODE_ENV?u["default"](!1,"[history] Unable to read state; sessionStorage is not available due to security settings"):void 0,null}if(n)try{return JSON.parse(n)}catch(r){}return null}t.__esModule=!0,t.saveState=a,t.readState=i;var s=n(8),u=r(s),l="@@History/",c=["QuotaExceededError","QUOTA_EXCEEDED_ERR"],f="SecurityError"}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){function t(e){return l.canUseDOM?void 0:"production"!==r.env.NODE_ENV?u["default"](!1,"DOM history needs a DOM"):u["default"](!1),n.listen(e)}var n=p["default"](i({getUserConfirmation:c.getUserConfirmation},e,{go:c.go}));return i({},n,{listen:t})}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(6),u=o(s),l=n(16),c=n(23),f=n(43),p=o(f);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return"string"==typeof e&&"/"===e.charAt(0)}function i(){var e=b.getHashPath();return a(e)?!0:(b.replaceHashPath("/"+e),!1)}function s(e,t,n){return e+(-1===e.indexOf("?")?"?":"&")+(t+"="+n)}function u(e,t){return e.replace(new RegExp("[?&]?"+t+"=[a-zA-Z0-9]+"),"")}function l(e,t){var n=e.match(new RegExp("\\?.*?\\b"+t+"=(.+?)\\b"));return n&&n[1]}function c(){function e(){var e=b.getHashPath(),t=void 0,n=void 0;N?(t=l(e,N),e=u(e,N),t?n=_.readState(t):(n=null,t=S.createKey(),b.replaceHashPath(s(e,N,t)))):t=n=null;var r=y.parsePath(e);return S.createLocation(f({},r,{state:n}),void 0,t)}function t(t){function n(){i()&&r(e())}var r=t.transitionTo;return i(),b.addEventListener(window,"hashchange",n),function(){b.removeEventListener(window,"hashchange",n)}}function n(e){var t=e.basename,n=e.pathname,o=e.search,a=e.state,i=e.action,u=e.key;if(i!==m.POP){var l=(t||"")+n+o;N?(l=s(l,N,u),_.saveState(u,a)):e.key=e.state=null;var c=b.getHashPath();i===m.PUSH?c!==l?window.location.hash=l:"production"!==r.env.NODE_ENV?d["default"](!1,"You cannot PUSH the same path using hash history"):void 0:c!==l&&b.replaceHashPath(l)}}function o(e){1===++M&&(C=t(S));var n=S.listenBefore(e);return function(){n(),0===--M&&C()}}function a(e){1===++M&&(C=t(S));var n=S.listen(e);return function(){n(),0===--M&&C()}}function c(e){"production"!==r.env.NODE_ENV?d["default"](N||null==e.state,"You cannot use state without a queryKey it will be dropped"):void 0,S.push(e)}function p(e){"production"!==r.env.NODE_ENV?d["default"](N||null==e.state,"You cannot use state without a queryKey it will be dropped"):void 0,S.replace(e)}function h(e){"production"!==r.env.NODE_ENV?d["default"](T,"Hash history go(n) causes a full page reload in this browser"):void 0,S.go(e)}function E(e){return"#"+S.createHref(e)}function P(e){1===++M&&(C=t(S)),S.registerTransitionHook(e)}function k(e){S.unregisterTransitionHook(e),0===--M&&C()}function R(e,t){"production"!==r.env.NODE_ENV?d["default"](N||null==e,"You cannot use state without a queryKey it will be dropped"):void 0,S.pushState(e,t)}function x(e,t){"production"!==r.env.NODE_ENV?d["default"](N||null==e,"You cannot use state without a queryKey it will be dropped"):void 0,S.replaceState(e,t)}var j=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];g.canUseDOM?void 0:"production"!==r.env.NODE_ENV?v["default"](!1,"Hash history needs a DOM"):v["default"](!1);var N=j.queryKey;(void 0===N||N)&&(N="string"==typeof N?N:O);var S=w["default"](f({},j,{getCurrentLocation:e,finishTransition:n,saveState:_.saveState})),M=0,C=void 0,T=b.supportsGoWithoutReloadUsingHash();return f({},S,{listenBefore:o,listen:a,push:c,replace:p,go:h,createHref:E,registerTransitionHook:P,unregisterTransitionHook:k,pushState:R,replaceState:x})}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=n(8),d=o(p),h=n(6),v=o(h),m=n(13),y=n(11),g=n(16),b=n(23),_=n(40),E=n(41),w=o(E),O="_k";t["default"]=c,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return Math.random().toString(36).substr(2,e)}function i(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.key===t.key&&p["default"](e.state,t.state)}function s(){function e(e){return I.push(e),function(){I=I.filter(function(t){return t!==e})}}function t(){return W&&W.action===v.POP?H.indexOf(W.key):B?H.indexOf(B.key):-1}function n(e){var n=t();B=e,B.action===v.PUSH?H=[].concat(H.slice(0,n+1),[B.key]):B.action===v.REPLACE&&(H[n]=B.key),V.forEach(function(e){e(B)})}function o(e){if(V.push(e),B)e(B);else{var t=A();H=[t.key],n(t)}return function(){V=V.filter(function(t){return t!==e})}}function s(e,t){h.loopAsync(I.length,function(t,n,r){b["default"](I[t],e,function(e){null!=e?r(e):n()})},function(e){q&&"string"==typeof e?q(e,function(e){t(e!==!1)}):t(e!==!1)})}function l(e){B&&i(B,e)||(W=e,s(e,function(t){if(W===e)if(t){if(e.action===v.PUSH){var r=P(B),o=P(e);o===r&&p["default"](B.state,e.state)&&(e.action=v.REPLACE)}L(e)!==!1&&n(e)}else if(B&&e.action===v.POP){var a=H.indexOf(B.key),i=H.indexOf(e.key);-1!==a&&-1!==i&&F(a-i)}}))}function f(e){l(R(e,v.PUSH,O()))}function m(e){l(R(e,v.REPLACE,O()))}function g(){F(-1)}function _(){F(1)}function O(){return a(U)}function P(e){if(null==e||"string"==typeof e)return e;var t=e.pathname,n=e.search,r=e.hash,o=t;return n&&(o+=n),r&&(o+=r),o}function k(e){return P(e)}function R(e,t){var n=arguments.length<=2||void 0===arguments[2]?O():arguments[2];return"object"==typeof t&&("production"!==r.env.NODE_ENV?c["default"](!1,"The state (2nd) argument to history.createLocation is deprecated; use a location descriptor instead"):void 0,"string"==typeof e&&(e=d.parsePath(e)),e=u({},e,{state:t}),t=n,n=arguments[3]||O()),y["default"](e,t,n)}function x(e){B?(j(B,e),n(B)):j(A(),e)}function j(e,t){e.state=u({},e.state,t),D(e.key,e.state)}function N(e){-1===I.indexOf(e)&&I.push(e)}function S(e){I=I.filter(function(t){return t!==e})}function M(e,t){"string"==typeof t&&(t=d.parsePath(t)),f(u({state:e},t))}function C(e,t){"string"==typeof t&&(t=d.parsePath(t)),m(u({state:e},t))}var T=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],A=T.getCurrentLocation,L=T.finishTransition,D=T.saveState,F=T.go,q=T.getUserConfirmation,U=T.keyLength;"number"!=typeof U&&(U=w);var I=[],H=[],V=[],B=void 0,W=void 0;return{listenBefore:e,listen:o,transitionTo:l,push:f,replace:m,go:F,goBack:g,goForward:_,createKey:O,createPath:P,createHref:k,createLocation:R,setState:E["default"](x,"setState is deprecated; use location.key to save state instead"),registerTransitionHook:E["default"](N,"registerTransitionHook is deprecated; use listenBefore instead"),unregisterTransitionHook:E["default"](S,"unregisterTransitionHook is deprecated; use the callback returned from listenBefore instead"),pushState:E["default"](M,"pushState is deprecated; use push instead"),replaceState:E["default"](C,"replaceState is deprecated; use replace instead")}}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=n(8),c=o(l),f=n(71),p=o(f),d=n(11),h=n(77),v=n(13),m=n(79),y=o(m),g=n(25),b=o(g),_=n(24),E=o(_),w=6;t["default"]=s,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return function(){function t(){if(!O){if(null==w&&l.canUseDOM){var e=document.getElementsByTagName("base")[0],t=e&&e.getAttribute("href");null!=t&&(w=t,"production"!==r.env.NODE_ENV?u["default"](!1,"Automatically setting basename using <base href> is deprecated and will be removed in the next major release. The semantics of <base href> are subtly different from basename. Please pass the basename explicitly in the options to createHistory"):void 0);
}O=!0}}function n(e){return t(),w&&null==e.basename&&(0===e.pathname.indexOf(w)?(e.pathname=e.pathname.substring(w.length),e.basename=w,""===e.pathname&&(e.pathname="/")):e.basename=""),e}function o(e){if(t(),!w)return e;"string"==typeof e&&(e=c.parsePath(e));var n=e.pathname,r="/"===w.slice(-1)?w:w+"/",o="/"===n.charAt(0)?n.slice(1):n,a=r+o;return i({},e,{pathname:a})}function a(e){return E.listenBefore(function(t,r){p["default"](e,n(t),r)})}function s(e){return E.listen(function(t){e(n(t))})}function f(e){E.push(o(e))}function d(e){E.replace(o(e))}function v(e){return E.createPath(o(e))}function m(e){return E.createHref(o(e))}function y(e){for(var t=arguments.length,r=Array(t>1?t-1:0),a=1;t>a;a++)r[a-1]=arguments[a];return n(E.createLocation.apply(E,[o(e)].concat(r)))}function g(e,t){"string"==typeof t&&(t=c.parsePath(t)),f(i({state:e},t))}function b(e,t){"string"==typeof t&&(t=c.parsePath(t)),d(i({state:e},t))}var _=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],E=e(_),w=_.basename,O=!1;return i({},E,{listenBefore:a,listen:s,push:f,replace:d,createPath:v,createHref:m,createLocation:y,pushState:h["default"](g,"pushState is deprecated; use push instead"),replaceState:h["default"](b,"replaceState is deprecated; use replace instead")})}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(8),u=o(s),l=n(16),c=n(11),f=n(25),p=o(f),d=n(24),h=o(d);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return 0===e.button}function s(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function l(e,t){var n=t.query,r=t.hash,o=t.state;return n||r||o?{pathname:e,query:n,hash:r,state:o}:e}t.__esModule=!0;var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=n(2),p=o(f),d=n(4),h=o(d),v=n(27),m=p["default"].PropTypes,y=m.bool,g=m.object,b=m.string,_=m.func,E=m.oneOfType,w=p["default"].createClass({displayName:"Link",contextTypes:{router:v.routerShape},propTypes:{to:E([b,g]).isRequired,query:g,hash:b,state:g,activeStyle:g,activeClassName:b,onlyActiveOnIndex:y.isRequired,onClick:_,target:b},getDefaultProps:function(){return{onlyActiveOnIndex:!1,style:{}}},handleClick:function(e){var t=!0;if(this.props.onClick&&this.props.onClick(e),!s(e)&&i(e)){if(e.defaultPrevented===!0&&(t=!1),this.props.target)return void(t||e.preventDefault());if(e.preventDefault(),t){var n=this.props,r=n.to,o=n.query,a=n.hash,u=n.state,c=l(r,{query:o,hash:a,state:u});this.context.router.push(c)}}},render:function(){var e=this.props,t=e.to,n=e.query,o=e.hash,i=e.state,s=e.activeClassName,f=e.activeStyle,d=e.onlyActiveOnIndex,v=a(e,["to","query","hash","state","activeClassName","activeStyle","onlyActiveOnIndex"]);"production"!==r.env.NODE_ENV?(0,h["default"])(!(n||o||i),"the `query`, `hash`, and `state` props on `<Link>` are deprecated, use `<Link to={{ pathname, query, hash, state }}/>. http://tiny.cc/router-isActivedeprecated"):void 0;var m=this.context.router;if(m){var y=l(t,{query:n,hash:o,state:i});v.href=m.createHref(y),(s||null!=f&&!u(f))&&m.isActive(y,d)&&(s&&(v.className?v.className+=" "+s:v.className=s),f&&(v.style=c({},v.style,f)))}return p["default"].createElement("a",c({},v,{onClick:this.handleClick}))}});t["default"]=w,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),i=o(a),s=n(6),u=o(s),l=n(10),c=n(14),f=n(12),p=i["default"].PropTypes,d=p.string,h=p.object,v=i["default"].createClass({displayName:"Redirect",statics:{createRouteFromReactElement:function(e){var t=(0,l.createRouteFromReactElement)(e);return t.from&&(t.path=t.from),t.onEnter=function(e,n){var r=e.location,o=e.params,a=void 0;if("/"===t.to.charAt(0))a=(0,c.formatPattern)(t.to,o);else if(t.to){var i=e.routes.indexOf(t),s=v.getRoutePattern(e.routes,i-1),u=s.replace(/\/*$/,"/")+t.to;a=(0,c.formatPattern)(u,o)}else a=r.pathname;n({pathname:a,query:t.query||r.query,state:t.state||r.state})},t},getRoutePattern:function(e,t){for(var n="",r=t;r>=0;r--){var o=e[r],a=o.path||"";if(n=a.replace(/\/*$/,"/")+n,0===a.indexOf("/"))break}return"/"+n}},propTypes:{path:d,from:d,to:d.isRequired,query:h,state:h,onEnter:f.falsy,children:f.falsy},render:function(){"production"!==r.env.NODE_ENV?(0,u["default"])(!1,"<Redirect> elements are for router configuration only and should not be rendered"):(0,u["default"])(!1)}});t["default"]=v,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return i({},e,{setRouteLeaveHook:t.listenBeforeLeavingRoute,isActive:t.isActive})}function a(t,n){return t=i({},t,n),"production"!==e.env.NODE_ENV&&(t=(0,u["default"])(t,"`props.history` and `context.history` are deprecated. Please use `context.router`. http://tiny.cc/router-contextchanges")),t}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t.createRouterObject=o,t.createRoutingHistory=a;var s=n(19),u=r(s)}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=(0,c["default"])(e),n=function(){return t},r=(0,i["default"])((0,u["default"])(n))(e);return r.__v2_compatible__=!0,r}t.__esModule=!0,t["default"]=o;var a=n(17),i=r(a),s=n(44),u=r(s),l=n(80),c=r(l);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0,t["default"]=function(e){var t=void 0;return i&&(t=(0,a["default"])(e)()),t};var o=n(50),a=r(o),i=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return function(t){var n=(0,i["default"])((0,u["default"])(e))(t);return n.__v2_compatible__=!0,n}}t.__esModule=!0,t["default"]=o;var a=n(17),i=r(a),s=n(44),u=r(s);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(39),l=n(68),c=n(63),f=n(70),p=n(66),d=n(3),h=(r(d),n(5)),v=r(h),m=function(e){function t(){o(this,t);var e=a(this,Object.getPrototypeOf(t).call(this));return e.initialized=!1,e}return i(t,e),s(t,[{key:"isInitialized",value:function(){return this.initialized}},{key:"init",value:function(e){if(e=e||{},this.isInitialized())throw new Error("React Stormpath already initialized.");this.initialized=!0;var t=new f.SessionStore,n=new l.UserService(e.endpoints),r=new f.UserStore(n,t);v["default"].setSessionStore(t),v["default"].setUserStore(r);var o=e.dispatcher||{type:"flux"},a=function(e){switch(e.type){case c.UserConstants.USER_LOGIN:r.login(e.options,e.callback);break;case c.UserConstants.USER_LOGOUT:r.logout(e.callback);break;case c.UserConstants.USER_REGISTER:r.register(e.options,e.callback);break;case c.UserConstants.USER_FORGOT_PASSWORD:r.forgotPassword(e.options,e.callback);break;case c.UserConstants.USER_CHANGE_PASSWORD:r.changePassword(e.options,e.callback);break;case c.UserConstants.USER_UPDATE_PROFILE:r.updateProfile(e.options.data,e.callback);break;case c.UserConstants.USER_VERIFY_EMAIL:r.verifyEmail(e.options.spToken,e.callback)}return!0};switch(o.type){case"flux":o=new p.FluxDispatcher(a);break;case"redux":o=new p.ReduxDispatcher(a,o.store);break;default:throw new Error("Stormpath SDK: Invalid dispatcher type "+o.type)}v["default"].setDispatcher(o)}}]),t}(u.EventEmitter);t["default"]=new m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(3),d=r(p),h=(u=s=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.context.user,t=void 0!==e;return t&&this.props.inGroup&&(e.groups?t=d["default"].groupsMatchExpression(e.groups,this.props.inGroup):d["default"].logWarning("<Authenticated>","In order to use the inGroup property, you must expand the groups resource for the /me endpoint.")),t?d["default"].enforceRootElement(this.props.children):null}}]),t}(f["default"].Component),s.contextTypes={user:f["default"].PropTypes.object},u);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=(n(7),n(3)),f=r(c),p=n(15),d=r(p),h=n(20),v=(r(h),n(9)),m=r(v),y=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"render",value:function(){return l["default"].createElement(g,this.props,l["default"].createElement("div",{className:"sp-change-password-form"},l["default"].createElement("div",{className:"row"},l["default"].createElement("div",{className:"col-sm-offset-4 col-xs-12 col-sm-4",spIf:"form.sent"},l["default"].createElement("p",{className:"alert alert-success"},"Your new password has been set. Please ",l["default"].createElement(d["default"],null),".")),l["default"].createElement("div",{className:"col-xs-12",spIf:"!form.sent"},l["default"].createElement("div",{className:"form-horizontal"},l["default"].createElement("div",{className:"form-group"},l["default"].createElement("label",{htmlFor:"spPassword",className:"col-xs-12 col-sm-4 control-label"},"New Password"),l["default"].createElement("div",{className:"col-xs-12 col-sm-4"},l["default"].createElement("input",{id:"spPassword",type:"password",name:"password",className:"form-control",placeholder:"New Password",required:!0}))),l["default"].createElement("div",{className:"form-group"},l["default"].createElement("label",{htmlFor:"spConfirmPassword",className:"col-xs-12 col-sm-4 control-label"},"Confirm New Password"),l["default"].createElement("div",{className:"col-xs-12 col-sm-4"},l["default"].createElement("input",{id:"spConfirmPassword",type:"password",name:"confirmPassword",className:"form-control",placeholder:"Confirm New Password",required:!0}))),l["default"].createElement("div",{className:"form-group"},l["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},l["default"].createElement("p",{className:"alert alert-danger",spIf:"form.error"},l["default"].createElement("span",{spBind:"form.errorMessage"})),l["default"].createElement("button",{type:"submit",className:"btn btn-primary"},l["default"].createElement("span",{spIf:"form.processing"},"Setting New Password..."),l["default"].createElement("span",{spIf:"!form.processing"},"Set New Password")))))))))}}]),t}(l["default"].Component),g=function(e){function t(){var e;o(this,t);for(var n=arguments.length,r=Array(n),i=0;n>i;i++)r[i]=arguments[i];var s=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(r)));if(s.state={spToken:null,fields:{password:""},errorMessage:null,isFormSent:!1,isFormProcessing:!1},!(s.props&&"spToken"in s.props))throw new Error("[Stormpath SDK/Error] ChangePasswordForm: Property 'spToken' is required.");return s.state.spToken=s.props.spToken,s}return i(t,e),s(t,[{key:"onFormSubmit",value:function(e){var t=this;e.preventDefault();var n=function(e,n){return e?t.setState({isFormProcessing:!1,errorMessage:e.message}):(n=n||t.state.fields,"confirmPassword"in n&&n.password!==n.confirmPassword?t.setState({isFormProcessing:!1,errorMessage:"Passwords does not match."}):void m["default"].changePassword(n,function(e){return e?(404===e.status&&(e.message="The reset password token is not valid. Please try resetting your password again."),t.setState({isFormProcessing:!1,errorMessage:e.message})):void t.setState({isFormProcessing:!1,isFormSent:!0})}))};this.setState({errorMessage:null,isFormSent:!1,isFormProcessing:!0});var r=this.state.fields;this.state.spToken&&(r.sptoken=this.props.spToken),this.props.onSubmit?(e.data=r,this.props.onSubmit(e,n)):n(null,r)}},{key:"_mapFormFieldHandler",value:function(e,t){if(("input"===e.type||"textarea"===e.type)&&"submit"!==e.props.type)switch(e.props.name){case"password":t("password");break;case"confirmPassword":t("confirmPassword")}}},{key:"_spIfHandler",value:function(e,t){var n=null;switch(e){case"form.sent":n=this.state.isFormSent;break;case"form.processing":n=this.state.isFormProcessing;break;case"form.error":n=null!==this.state.errorMessage}return n}},{key:"_spBindHandler",value:function(e,t){var n=!1;switch(e){case"form.errorMessage":var r=t.props?t.props.className:void 0;n=l["default"].createElement("span",{className:r},this.state.errorMessage)}return n}},{key:"render",value:function(){return this.props.children?l["default"].createElement("form",{onSubmit:this.onFormSubmit.bind(this)},f["default"].makeForm(this,this._mapFormFieldHandler.bind(this),this._spIfHandler.bind(this),this._spBindHandler.bind(this))):l["default"].createElement(y,this.props)}}]),t}(l["default"].Component);t["default"]=g},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(7),d=n(3),h=r(d),v=n(5),m=r(v),y=n(9),g=r(y),b=n(20),_=r(b),E=n(21),w=r(E),O=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:null,socialProviders:null},i=n,a(r,i)}return i(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this;if(null===this.state.fields){var t=[{label:"Username or Email",name:"login",placeholder:"Username or Email",required:!0,type:"text"},{label:"Password",name:"password",placeholder:"Password",required:!0,type:"password"}];m["default"].userStore.getLoginViewData(function(n,r){var o=null,a=null;n?o=t:r&&r.form&&(o=r.form.fields,e.props.hideSocial||r.accountStores.forEach(function(e){e.provider&&(null===a&&(a=[]),a.push({id:e.provider.providerId}))})),e.setState({fields:o,socialProviders:a})})}}},{key:"render",value:function(){var e=null;if(null!==this.state.fields&&(e=[],this.state.fields.forEach(function(t,n){var r="sp-"+t.name+"-"+n;e.push(f["default"].createElement("div",{key:r,className:"form-group"},f["default"].createElement("label",{htmlFor:r,className:"col-xs-12 col-sm-4 control-label"},t.label),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:t.type,className:"form-control",id:r,name:t.name,placeholder:t.placeholder,required:t.required}))))}),e.push(f["default"].createElement("div",{key:"login-button",className:"form-group"},f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},f["default"].createElement("p",{className:"alert alert-danger",spIf:"form.error"},f["default"].createElement("span",{spBind:"form.errorMessage"})),f["default"].createElement("button",{type:"submit",className:"btn btn-primary"},"Login"),f["default"].createElement(p.Link,{to:"/forgot",className:"pull-right"},"Forgot Password"))))),null!==this.state.socialProviders){var t=[];this.state.socialProviders.forEach(function(e,n){var r="sp-"+e.id+"-"+n;t.push(f["default"].createElement(w["default"],{key:r,providerId:e.id,style:{marginRight:"5px",marginBottom:"5px"}}))}),t.length&&e.push(f["default"].createElement("div",{key:"provider-buttons",className:"form-group",style:{paddingTop:"20px"}},f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4",style:{marginBottom:"10px"}},"Or sign in using..."),f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},t)))}return f["default"].createElement(P,this.props,f["default"].createElement("div",{className:"sp-login-form"},f["default"].createElement("div",{className:"row"},f["default"].createElement("div",{className:"col-xs-12"},f["default"].createElement("div",{className:"form-horizontal"},e?e:f["default"].createElement(_["default"],null))))))}}]),t}(f["default"].Component),P=(u=s=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:{username:"",password:""},errorMessage:null,isFormProcessing:!1},i=n,a(r,i)}return i(t,e),l(t,[{key:"onFormSubmit",value:function(e){var t=this;e.preventDefault();var n=function(e,n){return e?t.setState({isFormProcessing:!1,errorMessage:e.message}):(n=n||t.state.fields,void g["default"].login({username:n.username,password:n.password},function(e,n){return e?t.setState({isFormProcessing:!1,errorMessage:e.message}):void t._performRedirect()}))};this.setState({isFormProcessing:!0}),this.props.onSubmit?(e.data=this.state.fields,this.props.onSubmit(e,n)):n(null,this.state.fields)}},{key:"_performRedirect",value:function(){var e=m["default"].getRouter(),t=e.getHomeRoute(),n=e.getAuthenticatedHomeRoute(),r=this.props.redirectTo||(n||{}).path||(t||{}).path||"/";this.context.router.push(r)}},{key:"_mapFormFieldHandler",value:function(e,t){if(("input"===e.type||"textarea"===e.type)&&"submit"!==e.props.type)switch(e.props.name){case"login":case"username":t("username");break;case"password":t("password")}}},{key:"_spIfHandler",value:function(e,t){var n=null;switch(e){case"form.processing":n=this.state.isFormProcessing;break;case"form.error":n=null!==this.state.errorMessage}return n}},{key:"_spBindHandler",value:function(e,t){var n=!1;switch(e){case"form.errorMessage":var r=t.props?t.props.className:void 0;n=f["default"].createElement("span",{className:r},this.state.errorMessage)}return n}},{key:"render",value:function(){return this.props.children?f["default"].createElement("form",{onSubmit:this.onFormSubmit.bind(this)},h["default"].makeForm(this,this._mapFormFieldHandler.bind(this),this._spIfHandler.bind(this),this._spBindHandler.bind(this))):f["default"].createElement(O,this.props)}}]),t}(f["default"].Component),s.contextTypes={router:f["default"].PropTypes.object.isRequired},u);t["default"]=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(5),d=r(p),h=n(9),v=r(h),m=(u=s=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={disabled:!1},i=n,a(r,i)}return i(t,e),l(t,[{key:"_performRedirect",value:function(){var e=d["default"].getRouter(),t=e.getHomeRoute(),n=e.getLoginRoute(),r=this.props.redirectTo||(t||{}).path||(n||{}).path||"/";this.context.router.push(r)}},{key:"onClick",value:function(e){var t=this;e.preventDefault(),this.state.disabled||(this.setState({disabled:!0}),v["default"].logout(function(){t._performRedirect()}))}},{key:"render",value:function(){return f["default"].createElement("a",{href:"#",className:this.props.className,onClick:this.onClick.bind(this),disabled:this.state.disabled},this.props.children?this.props.children:"Logout")}}]),t}(f["default"].Component),s.contextTypes={router:f["default"].PropTypes.object.isRequired},u);t["default"]=m},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(3),d=r(p),h=(u=s=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),l(t,[{key:"render",value:function(){var e=this.context.user,t=void 0!==e;if(this.props.inGroup){if(!t)return null;e.groups?t=d["default"].groupsMatchExpression(e.groups,this.props.inGroup):d["default"].logWarning("<NotAuthenticated> In order to use the inGroup option, you must expand the groups resource for the /me endpoint.")}return t?null:d["default"].enforceRootElement(this.props.children)}}]),t}(f["default"].Component),s.contextTypes={user:f["default"].PropTypes.object},u);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=(n(7),n(3)),d=r(p),h=n(5),v=r(h),m=n(15),y=r(m),g=n(9),b=r(g),_=n(20),E=r(_),w=n(21),O=r(w),P=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:null,socialProviders:null},i=n,a(r,i)}return i(t,e),l(t,[{key:"componentDidMount",value:function(){var e=this;if(null===this.state.fields){var t=[{label:"First Name",name:"givenName",placeholder:"First Name",required:!0,type:"text"},{label:"Last Name",name:"surname",placeholder:"Last Name",required:!0,type:"text"},{label:"Email",name:"email",placeholder:"Email",required:!0,type:"email"},{label:"Password",name:"password",placeholder:"Password",required:!0,type:"password"}];v["default"].userStore.getRegisterViewData(function(n,r){var o=null,a=null;n?o=t:r&&r.form&&(o=r.form.fields,e.props.hideSocial||r.accountStores.forEach(function(e){e.provider&&(null===a&&(a=[]),a.push({id:e.provider.providerId}))})),e.setState({fields:o,socialProviders:a})})}}},{key:"render",value:function(){var e=null;if(null!==this.state.fields&&(e=[],this.state.fields.forEach(function(t,n){var r="sp-"+t.name+"-"+n;e.push(f["default"].createElement("div",{key:r,className:"form-group"},f["default"].createElement("label",{htmlFor:r,className:"col-xs-12 col-sm-4 control-label"},t.label),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:t.type,className:"form-control",id:r,name:t.name,placeholder:t.placeholder,required:t.required}))))}),e.push(f["default"].createElement("div",{key:"register-button",className:"form-group"},f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},f["default"].createElement("p",{className:"alert alert-danger",spIf:"form.error"},f["default"].createElement("span",{spBind:"form.errorMessage"})),f["default"].createElement("button",{type:"submit",className:"btn btn-primary"},"Register"))))),null!==this.state.socialProviders){var t=[];this.state.socialProviders.forEach(function(e,n){var r="sp-"+e.id+"-"+n;t.push(f["default"].createElement(O["default"],{key:r,providerId:e.id,style:{marginRight:"5px",marginBottom:"5px"}}))}),t.length&&e.push(f["default"].createElement("div",{key:"provider-buttons",className:"form-group",style:{paddingTop:"20px"}},f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4",style:{marginBottom:"10px"}},"Or register using..."),f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},t)))}return f["default"].createElement(k,this.props,f["default"].createElement("div",{className:"sp-login-form"},f["default"].createElement("div",{className:"row",spIf:"account.created"},f["default"].createElement("div",{className:"col-sm-offset-4 col-xs-12 col-sm-4"},f["default"].createElement("p",{className:"alert alert-success",spIf:"account.enabled"},"Your account has been created. ",f["default"].createElement(y["default"],null,"Login Now"),"."),f["default"].createElement("div",{spIf:"!account.enabled"},f["default"].createElement("p",{className:"alert alert-success"},"Your account has been created. Please check your email for a verification link."),f["default"].createElement("p",{className:"pull-right"},f["default"].createElement(y["default"],null,"Back to Login"))))),f["default"].createElement("div",{className:"row",spIf:"!account.created"},f["default"].createElement("div",{className:"col-xs-12"},f["default"].createElement("div",{className:"form-horizontal"},e?e:f["default"].createElement(E["default"],null))))))}}]),t}(f["default"].Component),k=(u=s=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:{givenName:"",surname:"",email:"",password:""},errorMessage:null,isFormProcessing:!1,isAccountCreated:!1,isAccountEnabled:!1},i=n,a(r,i)}return i(t,e),l(t,[{key:"onFormSubmit",value:function(e){var t=this;e.preventDefault();var n=function(e,n){return e?t.setState({isFormProcessing:!1,errorMessage:e.message}):(n=n||t.state.fields,void b["default"].register(n,function(e,r){e?t.setState({isFormProcessing:!1,errorMessage:e.message}):"ENABLED"===r.status?b["default"].login({username:n.email||n.username,password:n.password},function(e){return e?t.setState({isFormProcessing:!1,isAccountCreated:!1,errorMessage:e.message}):void t._performRedirect()}):t.setState({isFormProcessing:!1,isAccountCreated:!0,isAccountEnabled:!1})}))};this.setState({isFormProcessing:!0}),this.props.onSubmit?(e.data=this.state.fields,this.props.onSubmit(e,n)):n(null,this.state.fields)}},{key:"_performRedirect",value:function(){var e=v["default"].getRouter(),t=e.getHomeRoute(),n=e.getAuthenticatedHomeRoute(),r=this.props.redirectTo||(n||{}).path||(t||{}).path||"/";this.context.router.push(r)}},{key:"_mapFormFieldHandler",value:function(e,t){if(["input","textarea"].indexOf(e.type)>-1&&"submit"!==e.props.type)switch(e.props.name){case"email":t("email");break;case"login":case"username":t("username");break;case"givenName":case"firstName":t("givenName");break;case"surname":case"lastName":t("surname");break;case"password":t("password")}}},{key:"_spIfHandler",value:function(e,t){var n=null;switch(e){case"form.processing":n=this.state.isFormProcessing;break;case"form.error":n=!!this.state.errorMessage;break;case"account.created":n=this.state.isAccountCreated;break;case"account.enabled":n=this.state.isAccountEnabled}return n}},{key:"_spBindHandler",value:function(e,t){var n=!1;switch(e){case"form.errorMessage":
var r=t.props?t.props.className:void 0;n=f["default"].createElement("span",{className:r},this.state.errorMessage)}return n}},{key:"render",value:function(){return this.props.children?f["default"].createElement("form",{onSubmit:this.onFormSubmit.bind(this)},d["default"].makeForm(this,this._mapFormFieldHandler.bind(this),this._spIfHandler.bind(this),this._spBindHandler.bind(this))):f["default"].createElement(P,this.props)}}]),t}(f["default"].Component),s.contextTypes={router:f["default"].PropTypes.object.isRequired},u);t["default"]=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=(n(7),n(3)),f=r(c),p=n(15),d=r(p),h=n(9),v=r(h),m=function(e){function t(){return o(this,t),a(this,Object.getPrototypeOf(t).apply(this,arguments))}return i(t,e),s(t,[{key:"render",value:function(){return l["default"].createElement(y,this.props,l["default"].createElement("div",{className:"sp-reset-password-form"},l["default"].createElement("div",{className:"row"},l["default"].createElement("div",{className:"col-sm-offset-4 col-xs-12 col-sm-4",spIf:"form.sent"},l["default"].createElement("p",{className:"alert alert-success"},"We have sent a password reset link to the email address of the account that you specified. Please check your email for this message, then click on the link."),l["default"].createElement("p",{className:"pull-right"},l["default"].createElement(d["default"],null,"Back to Login"))),l["default"].createElement("div",{className:"col-xs-12",spIf:"!form.sent"},l["default"].createElement("div",{className:"form-horizontal"},l["default"].createElement("div",{className:"form-group"},l["default"].createElement("label",{htmlFor:"spEmail",className:"col-xs-12 col-sm-4 control-label"},"Email or Username"),l["default"].createElement("div",{className:"col-xs-12 col-sm-4"},l["default"].createElement("input",{className:"form-control",id:"spEmail",name:"email",placeholder:"Your Email Address"}))),l["default"].createElement("div",{className:"form-group"},l["default"].createElement("div",{className:"col-sm-offset-4 col-xs-12"},l["default"].createElement("p",{spIf:"form.error"},l["default"].createElement("span",{spBind:"form.errorMessage"})),l["default"].createElement("button",{type:"submit",className:"btn btn-primary"},"Request Password Reset"))))))))}}]),t}(l["default"].Component),y=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:{email:""},errorMessage:null,isFormProcessing:!1,isFormSent:!1},i=n,a(r,i)}return i(t,e),s(t,[{key:"onFormSubmit",value:function(e){var t=this;e.preventDefault();var n=function(e,n){return e?t.setState({isFormProcessing:!1,errorMessage:e.message}):(n=n||t.state.fields,void v["default"].forgotPassword(t.state.fields,function(e){e?t.setState({isFormProcessing:!1,errorMessage:e.message}):t.setState({isFormSent:!0,isFormProcessing:!1,errorMessage:null})}))};this.setState({isFormProcessing:!0}),this.props.onSubmit?(e.data=this.state.fields,this.props.onSubmit(e,n)):n(null,this.state.fields)}},{key:"_mapFormFieldHandler",value:function(e,t){if(("input"===e.type||"textarea"===e.type)&&"submit"!==e.props.type)switch(e.props.name){case"email":t("email")}}},{key:"_spIfHandler",value:function(e,t){var n=null;switch(e){case"form.processing":n=this.state.isFormProcessing;break;case"form.sent":n=this.state.isFormSent;break;case"form.error":n=null!==this.state.errorMessage}return n}},{key:"_spBindHandler",value:function(e,t){var n=!1;switch(e){case"form.errorMessage":var r=t.props?t.props.className:void 0;n=l["default"].createElement("span",{className:r},this.state.errorMessage)}return n}},{key:"render",value:function(){return this.props.children?l["default"].createElement("form",{onSubmit:this.onFormSubmit.bind(this)},f["default"].makeForm(this,this._mapFormFieldHandler.bind(this),this._spIfHandler.bind(this),this._spBindHandler.bind(this))):l["default"].createElement(m,this.props)}}]),t}(l["default"].Component);t["default"]=y},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=n(7),d=n(3),h=r(d),v=n(5),m=r(v),y=n(30),g=r(y),b=n(31),_=r(b),E=n(32),w=r(E),O=n(29),P=r(O),k=(u=s=function(e){function t(){o(this,t);var e=a(this,Object.getPrototypeOf(t).apply(this,arguments));return e.state={authenticated:!1,user:void 0},e.markedRoutes={home:{type:g["default"],authenticated:{props:null},notAuthenticated:{props:null}},login:{type:_["default"],props:null},logout:{type:w["default"],props:null}},e._mapMarkedRoutes(),e.sessionChangeListener=e._setSessionState.bind(e),m["default"].setRouter(e),e}return i(t,e),l(t,[{key:"_mapMarkedRoutes",value:function(){var e=this.markedRoutes;h["default"].deepForEach(this,function(t,n){for(var r in e){var o=e[r];if(t.type===o.type){var a=e[r];t.type===g["default"]&&(a=n.type===P["default"]?a.authenticated:a.notAuthenticated),a.props=t.props;break}}})}},{key:"getHomeRoute",value:function(){return this.markedRoutes.home.notAuthenticated.props}},{key:"getAuthenticatedHomeRoute",value:function(){return this.markedRoutes.home.authenticated.props}},{key:"getLoginRoute",value:function(){return this.markedRoutes.login.props}},{key:"getLogoutRoute",value:function(){return this.markedRoutes.logout.props}},{key:"_setSessionState",value:function(e){this.setState({authenticated:void 0!==e,user:e})}},{key:"componentDidMount",value:function(){this._setSessionState(m["default"].sessionStore.get()),m["default"].sessionStore.addListener("changed",this.sessionChangeListener)}},{key:"componentWillUnmount",value:function(){m["default"].sessionStore.removeListener("changed",this.sessionChangeListener)}},{key:"getChildContext",value:function(){return{authenticated:this.state.authenticated,user:this.state.user}}}]),t}(p.Router),s.childContextTypes={authenticated:f["default"].PropTypes.bool,user:f["default"].PropTypes.object},u);t["default"]=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=n(3),f=r(c),p=n(34),d=r(p),h=function(e){function t(){o(this,t);var e=a(this,Object.getPrototypeOf(t).apply(this,arguments));return f["default"].logWarning("The UserField component has been deprecated. Please use the user context instead. See: https://github.com/stormpath/stormpath-sdk-react/blob/master/docs/api.md#contexts"),e}return i(t,e),s(t,[{key:"_resolveFieldValue",value:function(e){for(var t=this.state.user,n=e.split(".");n.length;){var r=n.shift();if(!(r in t))throw new Error("Field does not exist");t=t[r]}return t}},{key:"render",value:function(){var e=this.props.fieldName,t=null;try{t=this._resolveFieldValue(e)}catch(n){"default"in this.props&&(t=this.props["default"])}return l["default"].createElement("span",{className:this.props.className},t)}}]),t}(d["default"]);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s,u,l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(2),f=r(c),p=(n(7),n(3)),d=r(p),h=n(5),v=r(h),m=n(9),y=r(m),g=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={showPasswordVerification:!1},i=n,a(r,i)}return i(t,e),l(t,[{key:"onPasswordChanged",value:function(e){this.setState({showPasswordVerification:e.target.value.length>0})}},{key:"render",value:function(){return f["default"].createElement(b,this.props,f["default"].createElement("div",{className:"sp-update-profile-form"},f["default"].createElement("div",{className:"row"},f["default"].createElement("div",{className:"col-xs-12"},f["default"].createElement("div",{className:"form-horizontal"},f["default"].createElement("div",{className:"form-group"},f["default"].createElement("label",{htmlFor:"givenName",className:"col-xs-12 col-sm-4 control-label"},"First name"),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:"text",className:"form-control",id:"givenName",name:"givenName",placeholder:"First name",required:!0}))),f["default"].createElement("div",{className:"form-group"},f["default"].createElement("label",{htmlFor:"surname",className:"col-xs-12 col-sm-4 control-label"},"Last name"),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:"text",className:"form-control",id:"surname",name:"surname",placeholder:"Last name",required:!0}))),f["default"].createElement("div",{className:"form-group"},f["default"].createElement("label",{htmlFor:"email",className:"col-xs-12 col-sm-4 control-label"},"Email"),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:"email",className:"form-control",id:"email",name:"email",placeholder:"Email",required:!0}))),f["default"].createElement("div",{className:"form-group"},f["default"].createElement("label",{htmlFor:"password",className:"col-xs-12 col-sm-4 control-label"},"Password"),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:"password",className:"form-control",id:"password",name:"password",placeholder:"Password",onChange:this.onPasswordChanged.bind(this)}))),f["default"].createElement("div",null,this.state.showPasswordVerification?f["default"].createElement("div",{className:"form-group"},f["default"].createElement("label",{htmlFor:"password",className:"col-xs-12 col-sm-4 control-label"},"Existing password"),f["default"].createElement("div",{className:"col-xs-12 col-sm-4"},f["default"].createElement("input",{type:"password",className:"form-control",id:"existingPassword",name:"existingPassword",placeholder:"Existing password",required:!0}))):null),f["default"].createElement("div",{key:"update-button",className:"form-group"},f["default"].createElement("div",{className:"col-sm-offset-4 col-sm-4"},f["default"].createElement("p",{className:"alert alert-danger",spIf:"form.error"},f["default"].createElement("span",{spBind:"form.errorMessage"})),f["default"].createElement("p",{className:"alert alert-success",spIf:"form.successful"},"Profile updated."),f["default"].createElement("button",{type:"submit",className:"btn btn-primary"},f["default"].createElement("span",{spIf:"!form.processing"},"Update"),f["default"].createElement("span",{spIf:"form.processing"},"Updating...")))))))))}}]),t}(f["default"].Component),b=(u=s=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={fields:{},defaultFields:r.context.user,errorMessage:null,isFormProcessing:!1,isFormSuccessful:!1},r._updateSessionData=function(e,t){var n=v["default"].sessionStore;if(!n.empty()){var r=!1,o=d["default"].clone(n.get());for(var a in e)a in o&&o[a]!=e[a]&&(r=!0,o[a]=e[a]);r?v["default"].userStore.resolveSession(t,!0):t()}},i=n,a(r,i)}return i(t,e),l(t,[{key:"_onFormSubmit",value:function(e){var t=this;e.preventDefault();var n=function(e,n){return e?t.setState({isFormProcessing:!1,isFormSuccessful:!1,errorMessage:e.message}):(n=n||t.state.fields,void y["default"].updateProfile(n,function(e){return e?t.setState({isFormProcessing:!1,isFormSuccessful:!1,errorMessage:e.message}):void t._updateSessionData(n,function(){t.setState({isFormProcessing:!1,isFormSuccessful:!0,errorMessage:null})})}))};this.setState({isFormProcessing:!0}),this.props.onSubmit?(e.data=this.state.fields,this.props.onSubmit(e,n)):n(null,this.state.fields)}},{key:"_mapFormFieldHandler",value:function(e,t){var n=this.state.defaultFields[e.props.name];if("input"===e.type){if("submit"===e.props.type)return;t(e.props.name,n)}}},{key:"_spIfHandler",value:function(e,t){var n=null;switch(e){case"form.successful":n=this.state.isFormSuccessful;break;case"form.processing":n=this.state.isFormProcessing;break;case"form.error":n=!!this.state.errorMessage}return n}},{key:"_spBindHandler",value:function(e,t){var n=!1;switch(e){case"form.errorMessage":var r=t.props?t.props.className:void 0;n=f["default"].createElement("span",{className:r},this.state.errorMessage)}return n}},{key:"render",value:function(){return this.props.children?f["default"].createElement("form",{onSubmit:this._onFormSubmit.bind(this)},d["default"].makeForm(this,this._mapFormFieldHandler.bind(this),this._spIfHandler.bind(this),this._spBindHandler.bind(this))):f["default"].createElement(g,this.props)}}]),t}(f["default"].Component),s.contextTypes={user:f["default"].PropTypes.object},u);t["default"]=b},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(2),l=r(u),c=n(15),f=r(c),p=n(9),d=r(p),h=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),l=0;s>l;l++)u[l]=arguments[l];return n=r=a(this,(e=Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),r.state={status:"VERIFYING"},i=n,a(r,i)}return i(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.spToken;d["default"].verifyEmail(t,function(t){t?e.setState({status:"ERROR"}):e.setState({status:"VERIFIED"})})}},{key:"render",value:function(){return l["default"].createElement("div",{className:"row"},l["default"].createElement("div",{className:"col-sm-offset-4 col-xs-12 col-sm-4"},{VERIFYING:l["default"].createElement("p",{className:"alert alert-warning"},"We are verifying your account."),VERIFIED:l["default"].createElement("p",{className:"alert alert-success"},"Your account has has been verified! ",l["default"].createElement(f["default"],null,"Login Now.")),ERROR:l["default"].createElement("div",{className:"alert alert-danger"},"This email verification link is not valid.")}[this.state.status]))}}]),t}(l["default"].Component);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.UserConstants=void 0;var o=n(22),a=r(o);t.UserConstants=a["default"]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0;var o=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(74),i=function(){function e(t){r(this,e),this.dispatcher=new a.Dispatcher,this.register(t)}return o(e,[{key:"register",value:function(e){this.dispatcher.register(function(t){t&&"actionType"in t&&(t.type=t.actionType,delete t.actionType),e(t)})}},{key:"dispatch",value:function(e){this.dispatcher.dispatch({actionType:e.type,options:e.options,callback:e.callback})}}]),e}();t["default"]=i},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}),t["default"]=void 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}}(),i=n(5),s=(r(i),function(){function e(t,n){o(this,e),this.reducer=t,this.store=n}return a(e,[{key:"dispatch",value:function(e){this.reducer(e),this.store.dispatch(e)}}]),e}());t["default"]=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ReduxDispatcher=t.FluxDispatcher=void 0;var o=n(64),a=r(o),i=n(65),s=r(i);t.FluxDispatcher=a["default"],t.ReduxDispatcher=s["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(3),l=r(u),c=n(35),f=r(c),p=n(36),d=r(p),h=function(e){function t(e){o(this,t);var n={me:"/me",login:"/login",register:"/register",verifyEmail:"/verify",forgotPassword:"/forgot",changePassword:"/change",logout:"/logout"},r=a(this,Object.getPrototypeOf(t).call(this,l["default"].mergeObjects(n,e)));return r.meRequestPool=new d["default"],r}return i(t,e),s(t,[{key:"_unwrapAccountResult",value:function(e){return function(t,n){return t?e(t):void e(null,n.account||n||{})}}},{key:"me",value:function(e){var t=this;this.meRequestPool.request(function(e){t._makeRequest("get",t.endpoints.me,null,t._unwrapAccountResult(e))},e)}},{key:"updateProfile",value:function(e,t){this._makeRequest("post",this.endpoints.me,e,t)}},{key:"getLoginViewData",value:function(e){this._makeRequest("get",this.endpoints.login,null,e)}},{key:"login",value:function(e,t){this._makeRequest("post",this.endpoints.login,e,this._unwrapAccountResult(t))}},{key:"register",value:function(e,t){this._makeRequest("post",this.endpoints.register,e,this._unwrapAccountResult(t))}},{key:"getRegisterViewData",value:function(e){this._makeRequest("get",this.endpoints.register,null,e)}},{key:"verifyEmail",value:function(e,t){this._makeRequest("get",this.endpoints.verifyEmail+"?sptoken="+encodeURIComponent(e),null,t)}},{key:"forgotPassword",value:function(e,t){this._makeRequest("post",this.endpoints.forgotPassword,e,t)}},{key:"changePassword",value:function(e,t){this._makeRequest("post",this.endpoints.changePassword,e,t)}},{key:"logout",value:function(e){this._makeRequest("post",this.endpoints.logout,null,e)}}]),t}(f["default"]);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.RequestPool=t.BaseService=t.UserService=void 0;var o=n(67),a=r(o),i=n(35),s=r(i),u=n(36),l=r(u);t.UserService=a["default"],t.BaseService=s["default"],t.RequestPool=l["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!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}),t["default"]=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(3),l=r(u),c=n(37),f=r(c),p=n(9),d=r(p),h=function(e){function t(e,n){o(this,t);var r=a(this,Object.getPrototypeOf(t).call(this));return r.service=e,r.sessionError=null,r.sessionStore=n,r.resolveSession(),r}return i(t,e),s(t,[{key:"isAuthenticated",value:function(e,t){var n=this;"function"==typeof e&&(t=e,e={}),this.resolveSession(function(r,o){var a=!r&&!n.sessionStore.empty();a&&e.inGroup&&(o.groups?a=l["default"].groupsMatchExpression(o.groups,e.inGroup):l["default"].logWarning("<AuthenticatedRoute> In order to use the inGroup option, you must expand the groups resource for the /me endpoint.")),t(r,a)})}},{key:"getLoginViewData",value:function(e){this.service.getLoginViewData(e)}},{key:"login",value:function(e,t){var n=this;this.reset(),this.service.login(e,function(e,r){return e?t(e):(n.sessionError=null,n.sessionStore.set(r),d["default"].set(r),n.emitChange(),void t(null,r))})}},{key:"register",value:function(e,t){this.service.register(e,t)}},{key:"getRegisterViewData",value:function(e){this.service.getRegisterViewData(e)}},{key:"forgotPassword",value:function(e,t){this.service.forgotPassword(e,t)}},{key:"changePassword",value:function(e,t){this.service.changePassword(e,t)}},{key:"updateProfile",value:function(e,t){this.service.updateProfile(e,t)}},{key:"verifyEmail",value:function(e,t){this.service.verifyEmail(e,t)}},{key:"logout",value:function(e){var t=this;this.service.logout(function(n){return n?e(n):(t.reset(),t.emitChange(),void e())})}},{key:"resolveSession",value:function(e,t){var n=this;return t||!this.sessionError&&this.sessionStore.empty()?void this.service.me(function(t,r){t?(n.sessionError=t,n.sessionStore.reset(),d["default"].set(null)):(n.sessionError=null,n.sessionStore.set(r),d["default"].set(r)),e&&e(n.sessionError,n.sessionStore.get()),n.emitChange()}):e&&e(this.sessionError,this.sessionStore.get())}},{key:"reset",value:function(){this.sessionError=null,this.sessionStore.reset(),d["default"].set(null)}}]),t}(f["default"]);t["default"]=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.SessionStore=t.UserStore=void 0;var o=n(69),a=r(o),i=n(38),s=r(i);t.UserStore=a["default"],t.SessionStore=s["default"]},function(e,t,n){function r(e){return null===e||void 0===e}function o(e){return e&&"object"==typeof e&&"number"==typeof e.length?"function"!=typeof e.copy||"function"!=typeof e.slice?!1:!(e.length>0&&"number"!=typeof e[0]):!1}function a(e,t,n){var a,c;if(r(e)||r(t))return!1;if(e.prototype!==t.prototype)return!1;if(u(e))return u(t)?(e=i.call(e),t=i.call(t),l(e,t,n)):!1;if(o(e)){if(!o(t))return!1;if(e.length!==t.length)return!1;for(a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}try{var f=s(e),p=s(t)}catch(d){return!1}if(f.length!=p.length)return!1;for(f.sort(),p.sort(),a=f.length-1;a>=0;a--)if(f[a]!=p[a])return!1;for(a=f.length-1;a>=0;a--)if(c=f[a],!l(e[c],t[c],n))return!1;return typeof e==typeof t}var i=Array.prototype.slice,s=n(73),u=n(72),l=e.exports=function(e,t,n){return n||(n={}),e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():!e||!t||"object"!=typeof e&&"object"!=typeof t?n.strict?e===t:e==t:a(e,t,n)}},function(e,t){function n(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function r(e){return e&&"object"==typeof e&&"number"==typeof e.length&&Object.prototype.hasOwnProperty.call(e,"callee")&&!Object.prototype.propertyIsEnumerable.call(e,"callee")||!1}var o="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();t=e.exports=o?n:r,t.supported=n,t.unsupported=r},function(e,t){function n(e){var t=[];for(var n in e)t.push(n);return t}t=e.exports="function"==typeof Object.keys?Object.keys:n,t.shim=n},function(e,t,n){e.exports.Dispatcher=n(75)},function(e,t,n){(function(r){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var a=n(76),i="ID_",s=function(){function e(){o(this,e),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}return e.prototype.register=function(e){var t=i+this._lastID++;return this._callbacks[t]=e,t},e.prototype.unregister=function(e){this._callbacks[e]?void 0:"production"!==r.env.NODE_ENV?a(!1,"Dispatcher.unregister(...): `%s` does not map to a registered callback.",e):a(!1),delete this._callbacks[e]},e.prototype.waitFor=function(e){this._isDispatching?void 0:"production"!==r.env.NODE_ENV?a(!1,"Dispatcher.waitFor(...): Must be invoked while dispatching."):a(!1);for(var t=0;t<e.length;t++){var n=e[t];this._isPending[n]?this._isHandled[n]?void 0:"production"!==r.env.NODE_ENV?a(!1,"Dispatcher.waitFor(...): Circular dependency detected while waiting for `%s`.",n):a(!1):(this._callbacks[n]?void 0:"production"!==r.env.NODE_ENV?a(!1,"Dispatcher.waitFor(...): `%s` does not map to a registered callback.",n):a(!1),this._invokeCallback(n))}},e.prototype.dispatch=function(e){this._isDispatching?"production"!==r.env.NODE_ENV?a(!1,"Dispatch.dispatch(...): Cannot dispatch in the middle of a dispatch."):a(!1):void 0,this._startDispatching(e);try{for(var t in this._callbacks)this._isPending[t]||this._invokeCallback(t)}finally{this._stopDispatching()}},e.prototype.isDispatching=function(){return this._isDispatching},e.prototype._invokeCallback=function(e){this._isPending[e]=!0,this._callbacks[e](this._pendingPayload),this._isHandled[e]=!0},e.prototype._startDispatching=function(e){for(var t in this._callbacks)this._isPending[t]=!1,this._isHandled[t]=!1;this._pendingPayload=e,this._isDispatching=!0},e.prototype._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},e}();e.exports=s}).call(t,n(1))},function(e,t,n){(function(t){"use strict";var n=function(e,n,r,o,a,i,s,u){if("production"!==t.env.NODE_ENV&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var l;if(void 0===n)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,o,a,i,s,u],f=0;l=new Error("Invariant Violation: "+n.replace(/%s/g,function(){return c[f++]}))}throw l.framesToPop=1,l}};e.exports=n}).call(t,n(1))},function(e,t){"use strict";function n(e,t,n){function o(){return s=!0,u?void(c=[].concat(r.call(arguments))):void n.apply(this,arguments)}function a(){if(!s&&(l=!0,!u)){for(u=!0;!s&&e>i&&l;)l=!1,t.call(this,i++,a,o);return u=!1,s?void n.apply(this,c):void(i>=e&&l&&(s=!0,n()))}}var i=0,s=!1,u=!1,l=!1,c=void 0;a()}t.__esModule=!0;var r=Array.prototype.slice;t.loopAsync=n},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(){function e(e){e=e||window.history.state||{};var t=p.getWindowPath(),n=e,r=n.key,o=void 0;r?o=d.readState(r):(o=null,r=_.createKey(),g&&window.history.replaceState(i({},e,{key:r}),null));var a=c.parsePath(t);return _.createLocation(i({},a,{state:o}),void 0,r)}function t(t){function n(t){void 0!==t.state&&r(e(t.state))}var r=t.transitionTo;return p.addEventListener(window,"popstate",n),function(){p.removeEventListener(window,"popstate",n)}}function n(e){var t=e.basename,n=e.pathname,r=e.search,o=e.hash,a=e.state,i=e.action,s=e.key;if(i!==l.POP){d.saveState(s,a);var u=(t||"")+n+r+o,c={key:s};if(i===l.PUSH){if(b)return window.location.href=u,!1;window.history.pushState(c,null,u)}else{if(b)return window.location.replace(u),!1;window.history.replaceState(c,null,u)}}}function o(e){1===++E&&(w=t(_));var n=_.listenBefore(e);return function(){n(),0===--E&&w()}}function a(e){1===++E&&(w=t(_));var n=_.listen(e);return function(){n(),0===--E&&w()}}function s(e){1===++E&&(w=t(_)),_.registerTransitionHook(e)}function h(e){_.unregisterTransitionHook(e),0===--E&&w()}var m=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];f.canUseDOM?void 0:"production"!==r.env.NODE_ENV?u["default"](!1,"Browser history needs a DOM"):u["default"](!1);
var y=m.forceRefresh,g=p.supportsHistory(),b=!g||y,_=v["default"](i({},m,{getCurrentLocation:e,finishTransition:n,saveState:d.saveState})),E=0,w=void 0;return i({},_,{listenBefore:o,listen:a,registerTransitionHook:s,unregisterTransitionHook:h})}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(6),u=o(s),l=n(13),c=n(11),f=n(16),p=n(23),d=n(40),h=n(41),v=o(h);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?"/":arguments[0],t=arguments.length<=1||void 0===arguments[1]?l.POP:arguments[1],n=arguments.length<=2||void 0===arguments[2]?null:arguments[2],o=arguments.length<=3||void 0===arguments[3]?null:arguments[3];"string"==typeof e&&(e=c.parsePath(e)),"object"==typeof t&&("production"!==r.env.NODE_ENV?u["default"](!1,"The state (2nd) argument to createLocation is deprecated; use a location descriptor instead"):void 0,e=i({},e,{state:t}),t=n||l.POP,n=o);var a=e.pathname||"/",s=e.search||"",f=e.hash||"",p=e.state||null;return{pathname:a,search:s,hash:f,state:p,action:t,key:n}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=n(8),u=o(s),l=n(13),c=n(11);t["default"]=a,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e){return e.filter(function(e){return e.state}).reduce(function(e,t){return e[t.key]=t.state,e},{})}function i(){function e(e,t){b[e]=t}function t(e){return b[e]}function n(){var e=y[g],n=e.basename,r=e.pathname,o=e.search,a=(n||"")+r+(o||""),i=void 0,u=void 0;e.key?(i=e.key,u=t(i)):(i=h.createKey(),u=null,e.key=i);var l=p.parsePath(a);return h.createLocation(s({},l,{state:u}),void 0,i)}function o(e){var t=g+e;return t>=0&&t<y.length}function i(e){if(e){if(!o(e))return void("production"!==r.env.NODE_ENV?l["default"](!1,"Cannot go(%s) there is not enough history",e):void 0);g+=e;var t=n();h.transitionTo(s({},t,{action:d.POP}))}}function u(t){switch(t.action){case d.PUSH:g+=1,g<y.length&&y.splice(g),y.push(t),e(t.key,t.state);break;case d.REPLACE:y[g]=t,e(t.key,t.state)}}var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];Array.isArray(c)?c={entries:c}:"string"==typeof c&&(c={entries:[c]});var h=v["default"](s({},c,{getCurrentLocation:n,finishTransition:u,saveState:e,go:i})),m=c,y=m.entries,g=m.current;"string"==typeof y?y=[y]:Array.isArray(y)||(y=["/"]),y=y.map(function(e){var t=h.createKey();return"string"==typeof e?{pathname:e,key:t}:"object"==typeof e&&e?s({},e,{key:t}):void("production"!==r.env.NODE_ENV?f["default"](!1,"Unable to create history entry from %s",e):f["default"](!1))}),null==g?g=y.length-1:g>=0&&g<y.length?void 0:"production"!==r.env.NODE_ENV?f["default"](!1,"Current index must be >= 0 and < %s, was %s",y.length,g):f["default"](!1);var b=a(y);return h}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(8),l=o(u),c=n(6),f=o(c),p=n(11),d=n(13),h=n(43),v=o(h);t["default"]=i,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){"use strict";var r=n(108);t.extract=function(e){return e.split("?")[1]||""},t.parse=function(e){return"string"!=typeof e?{}:(e=e.trim().replace(/^(\?|#|&)/,""),e?e.split("&").reduce(function(e,t){var n=t.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0;return r=decodeURIComponent(r),o=void 0===o?null:decodeURIComponent(o),e.hasOwnProperty(r)?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o,e},{}):{})},t.stringify=function(e){return e?Object.keys(e).sort().map(function(t){var n=e[t];return void 0===n?"":null===n?t:Array.isArray(n)?n.slice().sort().map(function(e){return r(t)+"="+r(e)}).join("&"):r(t)+"="+r(n)}).filter(function(e){return e.length>0}).join("&"):""}},function(e,t){"use strict";var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,arguments:!0,arity:!0};e.exports=function(e,t){for(var o=Object.getOwnPropertyNames(t),a=0;a<o.length;++a)if(!n[o[a]]&&!r[o[a]])try{e[o[a]]=t[o[a]]}catch(i){}return e}},function(e,t){"use strict";var n=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=n},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,o){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var i=/\+/g;e=e.split(t);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var l=0;u>l;++l){var c,f,p,d,h=e[l].replace(i,"%20"),v=h.indexOf(r);v>=0?(c=h.substr(0,v),f=h.substr(v+1)):(c=h,f=""),p=decodeURIComponent(c),d=decodeURIComponent(f),n(a,p)?Array.isArray(a[p])?a[p].push(d):a[p]=[a[p],d]:a[p]=d}return a}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,o){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(o){var a=encodeURIComponent(n(o))+r;return Array.isArray(e[o])?e[o].map(function(e){return a+encodeURIComponent(n(e))}).join(t):a+encodeURIComponent(n(e[o]))}).join(t):o?encodeURIComponent(n(o))+r+encodeURIComponent(n(e)):""}},function(e,t,n){"use strict";t.decode=t.parse=n(84),t.encode=t.stringify=n(85)},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(4),i=o(a),s=n(12),u={contextTypes:{history:s.history},componentWillMount:function(){"production"!==r.env.NODE_ENV?(0,i["default"])(!1,"the `History` mixin is deprecated, please access `context.router` with your own `contextTypes`. http://tiny.cc/router-historymixin"):void 0,this.history=this.context.history}};t["default"]=u,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=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(2),i=r(a),s=n(45),u=r(s),l=i["default"].createClass({displayName:"IndexLink",render:function(){return i["default"].createElement(u["default"],o({},this.props,{onlyActiveOnIndex:!0}))}});t["default"]=l,e.exports=t["default"]},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),i=o(a),s=n(4),u=o(s),l=n(6),c=o(l),f=n(46),p=o(f),d=n(12),h=i["default"].PropTypes,v=h.string,m=h.object,y=i["default"].createClass({displayName:"IndexRedirect",statics:{createRouteFromReactElement:function(e,t){t?t.indexRoute=p["default"].createRouteFromReactElement(e):"production"!==r.env.NODE_ENV?(0,u["default"])(!1,"An <IndexRedirect> does not make sense at the root of your route config"):void 0}},propTypes:{to:v.isRequired,query:m,state:m,onEnter:d.falsy,children:d.falsy},render:function(){"production"!==r.env.NODE_ENV?(0,c["default"])(!1,"<IndexRedirect> elements are for router configuration only and should not be rendered"):(0,c["default"])(!1)}});t["default"]=y,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),i=o(a),s=n(4),u=o(s),l=n(6),c=o(l),f=n(10),p=n(12),d=i["default"].PropTypes.func,h=i["default"].createClass({displayName:"IndexRoute",statics:{createRouteFromReactElement:function(e,t){t?t.indexRoute=(0,f.createRouteFromReactElement)(e):"production"!==r.env.NODE_ENV?(0,u["default"])(!1,"An <IndexRoute> does not make sense at the root of your route config"):void 0}},propTypes:{path:p.falsy,component:p.component,components:p.components,getComponent:d,getComponents:d},render:function(){"production"!==r.env.NODE_ENV?(0,c["default"])(!1,"<IndexRoute> elements are for router configuration only and should not be rendered"):(0,c["default"])(!1)}});t["default"]=h,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(4),i=o(a),s=n(2),u=o(s),l=n(6),c=o(l),f=u["default"].PropTypes.object,p={contextTypes:{history:f.isRequired,route:f},propTypes:{route:f},componentDidMount:function(){"production"!==r.env.NODE_ENV?(0,i["default"])(!1,"the `Lifecycle` mixin is deprecated, please use `context.router.setRouteLeaveHook(route, hook)`. http://tiny.cc/router-lifecyclemixin"):void 0,this.routerWillLeave?void 0:"production"!==r.env.NODE_ENV?(0,c["default"])(!1,"The Lifecycle mixin requires you to define a routerWillLeave method"):(0,c["default"])(!1);var e=this.props.route||this.context.route;e?void 0:"production"!==r.env.NODE_ENV?(0,c["default"])(!1,"The Lifecycle mixin must be used on either a) a <Route component> or b) a descendant of a <Route component> that uses the RouteContext mixin"):(0,c["default"])(!1),this._unlistenBeforeLeavingRoute=this.context.history.listenBeforeLeavingRoute(e,this.routerWillLeave)},componentWillUnmount:function(){this._unlistenBeforeLeavingRoute&&this._unlistenBeforeLeavingRoute()}};t["default"]=p,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),i=o(a),s=n(6),u=o(s),l=n(10),c=n(12),f=i["default"].PropTypes,p=f.string,d=f.func,h=i["default"].createClass({displayName:"Route",statics:{createRouteFromReactElement:l.createRouteFromReactElement},propTypes:{path:p,component:c.component,components:c.components,getComponent:d,getComponents:d},render:function(){"production"!==r.env.NODE_ENV?(0,u["default"])(!1,"<Route> elements are for router configuration only and should not be rendered"):(0,u["default"])(!1)}});t["default"]=h,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(4),i=o(a),s=n(2),u=o(s),l=u["default"].PropTypes.object,c={propTypes:{route:l.isRequired},childContextTypes:{route:l.isRequired},getChildContext:function(){return{route:this.props.route}},componentWillMount:function(){"production"!==r.env.NODE_ENV?(0,i["default"])(!1,"The `RouteContext` mixin is deprecated. You can provide `this.props.route` on context with your own `contextTypes`. http://tiny.cc/router-routecontextmixin"):void 0}};t["default"]=c,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return!e||!e.__v2_compatible__}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(42),l=o(u),c=n(17),f=o(c),p=n(2),d=o(p),h=n(28),v=o(h),m=n(12),y=n(18),g=o(y),b=n(10),_=n(47),E=n(4),w=o(E),O=d["default"].PropTypes,P=O.func,k=O.object,R=d["default"].createClass({displayName:"Router",propTypes:{history:k,children:m.routes,routes:m.routes,render:P,createElement:P,onError:P,onUpdate:P,matchContext:k},getDefaultProps:function(){return{render:function(e){return d["default"].createElement(g["default"],e)}}},getInitialState:function(){return{location:null,routes:null,params:null,components:null}},handleError:function(e){if(!this.props.onError)throw e;this.props.onError.call(this,e)},componentWillMount:function(){var e=this,t=this.props,n=t.parseQueryString,o=t.stringifyQuery;"production"!==r.env.NODE_ENV?(0,w["default"])(!(n||o),"`parseQueryString` and `stringifyQuery` are deprecated. Please create a custom history. http://tiny.cc/router-customquerystring"):void 0;var a=this.createRouterObjects(),i=a.history,s=a.transitionManager,u=a.router;this._unlisten=s.listen(function(t,n){t?e.handleError(t):e.setState(n,e.props.onUpdate)}),this.history=i,this.router=u},createRouterObjects:function(){var e=this.props.matchContext;if(e)return e;var t=this.props.history,n=this.props,r=n.routes,o=n.children;i(t)&&(t=this.wrapDeprecatedHistory(t));var a=(0,v["default"])(t,(0,b.createRoutes)(r||o)),s=(0,_.createRouterObject)(t,a),u=(0,_.createRoutingHistory)(t,a);return{history:u,transitionManager:a,router:s}},wrapDeprecatedHistory:function(e){var t=this.props,n=t.parseQueryString,o=t.stringifyQuery,a=void 0;return e?("production"!==r.env.NODE_ENV?(0,w["default"])(!1,"It appears you have provided a deprecated history object to `<Router/>`, please use a history provided by React Router with `import { browserHistory } from 'react-router'` or `import { hashHistory } from 'react-router'`. If you are using a custom history please create it with `useRouterHistory`, see http://tiny.cc/router-usinghistory for details."):void 0,a=function(){return e}):("production"!==r.env.NODE_ENV?(0,w["default"])(!1,"`Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead. http://tiny.cc/router-defaulthistory"):void 0,a=l["default"]),(0,f["default"])(a)({parseQueryString:n,stringifyQuery:o})},componentWillReceiveProps:function(e){"production"!==r.env.NODE_ENV?(0,w["default"])(e.history===this.props.history,"You cannot change <Router history>; it will be ignored"):void 0,"production"!==r.env.NODE_ENV?(0,w["default"])((e.routes||e.children)===(this.props.routes||this.props.children),"You cannot change <Router routes>; it will be ignored"):void 0},componentWillUnmount:function(){this._unlisten&&this._unlisten()},render:function x(){var e=this.state,t=e.location,n=e.routes,r=e.params,o=e.components,i=this.props,u=i.createElement,x=i.render,l=a(i,["createElement","render"]);return null==t?null:(Object.keys(R.propTypes).forEach(function(e){return delete l[e]}),x(s({},l,{history:this.history,router:this.router,location:t,routes:n,params:r,components:o,createElement:u})))}});t["default"]=R,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var a=n(2),i=o(a),s=n(18),u=o(s),l=n(4),c=o(l),f=i["default"].createClass({displayName:"RoutingContext",componentWillMount:function(){"production"!==r.env.NODE_ENV?(0,c["default"])(!1,"`RoutingContext` has been renamed to `RouterContext`. Please use `import { RouterContext } from 'react-router'`. http://tiny.cc/router-routercontext"):void 0},render:function(){return i["default"].createElement(u["default"],this.props)}});t["default"]=f,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return function(){for(var r=arguments.length,o=Array(r),a=0;r>a;a++)o[a]=arguments[a];if(e.apply(t,o),e.length<n){var i=o[o.length-1];i()}}}function a(e){return e.reduce(function(e,t){return t.onEnter&&e.push(o(t.onEnter,t,3)),e},[])}function i(e){return e.reduce(function(e,t){return t.onChange&&e.push(o(t.onChange,t,4)),e},[])}function s(t,n,r){function o(t,n,r){return n?("production"!==e.env.NODE_ENV?(0,d["default"])(!1,"`replaceState(state, pathname, query) is deprecated; use `replace(location)` with a location descriptor instead. http://tiny.cc/router-isActivedeprecated"):void 0,void(a={pathname:n,query:r,state:t})):void(a=t)}if(!t)return void r();var a=void 0;(0,f.loopAsync)(t,function(e,t,r){n(e,o,function(e){e||a?r(e,a):t()})},r)}function u(e,t,n){var r=a(e);return s(r.length,function(e,n,o){r[e](t,n,o)},n)}function l(e,t,n,r){var o=i(e);return s(o.length,function(e,r,a){o[e](t,n,r,a)},r)}function c(e){for(var t=0,n=e.length;n>t;++t)e[t].onLeave&&e[t].onLeave.call(e[t])}t.__esModule=!0,t.runEnterHooks=u,t.runChangeHooks=l,t.runLeaveHooks=c;var f=n(26),p=n(4),d=r(p)}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=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(2),i=r(a),s=n(18),u=r(s);t["default"]=function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];var r=t.map(function(e){return e.renderRouterContext}).filter(function(e){return e}),s=t.map(function(e){return e.renderRouteComponent}).filter(function(e){return e}),l=function(){var e=arguments.length<=0||void 0===arguments[0]?a.createElement:arguments[0];return function(t,n){return s.reduceRight(function(e,t){return t(e,n)},e(t,n))}};return function(e){return r.reduceRight(function(t,n){return n(t,e)},i["default"].createElement(u["default"],o({},e,{createElement:l(e.createElement)})))}},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(78),a=r(o),i=n(49),s=r(i);t["default"]=(0,s["default"])(a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t,n){if(!e.path)return!1;var r=(0,a.getParamNames)(e.path);return r.some(function(e){return t.params[e]!==n.params[e]})}function o(e,t){var n=e&&e.routes,o=t.routes,a=void 0,i=void 0,s=void 0;return n?!function(){var u=!1;a=n.filter(function(n){if(u)return!0;var a=-1===o.indexOf(n)||r(n,e,t);return a&&(u=!0),a}),a.reverse(),s=[],i=[],o.forEach(function(e){var t=-1===n.indexOf(e),r=-1!==a.indexOf(e);t||r?s.push(e):i.push(e)})}():(a=[],i=[],s=o),{leaveRoutes:a,changeRoutes:i,enterRoutes:s}}t.__esModule=!0;var a=n(14);t["default"]=o,e.exports=t["default"]},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){if(t.component||t.components)return void n(null,t.component||t.components);var o=t.getComponent||t.getComponents;if(!o)return void n();var a=e.location,i=void 0;if("production"!==r.env.NODE_ENV&&l.canUseMembrane){i=s({},e);var u=function(e){return Object.prototype.hasOwnProperty.call(a,e)?void Object.defineProperty(i,e,{get:function(){return"production"!==r.env.NODE_ENV?(0,f["default"])(!1,"Accessing location properties from the first argument to `getComponent` and `getComponents` is deprecated. That argument is now the router state (`nextState`) rather than the location. To access the location, use `nextState.location`."):void 0,a[e]}}):"continue"};for(var c in a){u(c)}}else i=s({},e,a);o.call(t,i,n)}function i(e,t){(0,u.mapAsync)(e.routes,function(t,n,r){a(e,t,r)},t)}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(26),l=n(19),c=n(4),f=o(c);t["default"]=i,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){"use strict";function r(e,t){var n={};if(!e.path)return n;var r=(0,o.getParamNames)(e.path);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&-1!==r.indexOf(a)&&(n[a]=t[a]);return n}t.__esModule=!0;var o=n(14);t["default"]=r,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(42),a=r(o),i=n(49),s=r(i);t["default"]=(0,s["default"])(a["default"]),e.exports=t["default"]},function(e,t,n){"use strict";function r(e,t){if(e==t)return!0;if(null==e||null==t)return!1;if(Array.isArray(e))return Array.isArray(t)&&e.length===t.length&&e.every(function(e,n){return r(e,t[n])});if("object"===("undefined"==typeof e?"undefined":u(e))){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))if(void 0===e[n]){if(void 0!==t[n])return!1}else{if(!Object.prototype.hasOwnProperty.call(t,n))return!1;if(!r(e[n],t[n]))return!1}return!0}return String(e)===String(t)}function o(e,t){return"/"!==t.charAt(0)&&(t="/"+t),"/"!==e.charAt(e.length-1)&&(e+="/"),"/"!==t.charAt(t.length-1)&&(t+="/"),t===e}function a(e,t,n){for(var r=e,o=[],a=[],i=0,s=t.length;s>i;++i){var u=t[i],c=u.path||"";if("/"===c.charAt(0)&&(r=e,o=[],a=[]),null!==r&&c){var f=(0,l.matchPattern)(c,r);if(f?(r=f.remainingPathname,o=[].concat(o,f.paramNames),a=[].concat(a,f.paramValues)):r=null,""===r)return o.every(function(e,t){return String(a[t])===String(n[e])})}}return!1}function i(e,t){return null==t?null==e:null==e?!0:r(e,t)}function s(e,t,n,r,s){var u=e.pathname,l=e.query;return null==n?!1:("/"!==u.charAt(0)&&(u="/"+u),o(u,n.pathname)||!t&&a(u,r,s)?i(l,n.query):!1)}t.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=s;var l=n(14);e.exports=t["default"]},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){var n=e.history,o=e.routes,i=e.location,u=a(e,["history","routes","location"]);n||i?void 0:"production"!==r.env.NODE_ENV?(0,l["default"])(!1,"match needs a history or a location"):(0,l["default"])(!1),n=n?n:(0,f["default"])(u);var c=(0,d["default"])(n,(0,h.createRoutes)(o)),p=void 0;i?i=n.createLocation(i):p=n.listen(function(e){i=e});var m=(0,v.createRouterObject)(n,c);n=(0,v.createRoutingHistory)(n,c),c.match(i,function(e,r,o){t(e,r,o&&s({},o,{history:n,router:m,matchContext:{history:n,transitionManager:c,router:m}})),p&&p()})}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(6),l=o(u),c=n(48),f=o(c),p=n(28),d=o(p),h=n(10),v=n(47);t["default"]=i,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t,n){if(e.childRoutes)return[null,e.childRoutes];if(!e.getChildRoutes)return[];var r=!0,o=void 0;return e.getChildRoutes(t,function(e,t){return t=!e&&(0,y.createRoutes)(t),r?void(o=[e,t]):void n(e,t)}),r=!1,o}function i(e,t,n){e.indexRoute?n(null,e.indexRoute):e.getIndexRoute?e.getIndexRoute(t,function(e,t){n(e,!e&&(0,y.createRoutes)(t)[0])}):e.childRoutes?!function(){var r=e.childRoutes.filter(function(e){return!e.path});(0,v.loopAsync)(r.length,function(e,n,o){i(r[e],t,function(t,a){if(t||a){var i=[r[e]].concat(Array.isArray(a)?a:[a]);o(t,i)}else n()})},function(e,t){n(null,t)})}():n()}function s(e,t,n){return t.reduce(function(e,t,r){var o=n&&n[r];return Array.isArray(e[t])?e[t].push(o):t in e?e[t]=[e[t],o]:e[t]=o,e},e)}function u(e,t){return s({},e,t)}function l(e,t,n,o,s,l){var f=e.path||"";if("/"===f.charAt(0)&&(n=t.pathname,o=[],s=[]),null!==n&&f){var d=(0,m.matchPattern)(f,n);if(d?(n=d.remainingPathname,o=[].concat(o,d.paramNames),s=[].concat(s,d.paramValues)):n=null,""===n){var v=function(){var n={routes:[e],params:u(o,s)};return i(e,t,function(e,t){if(e)l(e);else{if(Array.isArray(t)){var o;"production"!==r.env.NODE_ENV?(0,h["default"])(t.every(function(e){return!e.path}),"Index routes should not have paths"):void 0,(o=n.routes).push.apply(o,t)}else t&&("production"!==r.env.NODE_ENV?(0,h["default"])(!t.path,"Index routes should not have paths"):void 0,n.routes.push(t));l(null,n)}}),{v:void 0}}();if("object"===("undefined"==typeof v?"undefined":p(v)))return v.v}}if(null!=n||e.childRoutes){var y=function(r,a){r?l(r):a?c(a,t,function(t,n){t?l(t):n?(n.routes.unshift(e),l(null,n)):l()},n,o,s):l()},g=a(e,t,y);g&&y.apply(void 0,g)}else l()}function c(e,t,n,r){var o=arguments.length<=4||void 0===arguments[4]?[]:arguments[4],a=arguments.length<=5||void 0===arguments[5]?[]:arguments[5];void 0===r&&("/"!==t.pathname.charAt(0)&&(t=f({},t,{pathname:"/"+t.pathname})),r=t.pathname),(0,v.loopAsync)(e.length,function(n,i,s){l(e[n],t,r,o,a,function(e,t){e||t?s(e,t):i()})},n)}t.__esModule=!0;var f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t["default"]=c;var d=n(4),h=o(d),v=n(26),m=n(14),y=n(10);e.exports=t["default"]}).call(t,n(1))},function(e,t,n){(function(r){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function a(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return"production"!==r.env.NODE_ENV?(0,d["default"])(!1,"`useRoutes` is deprecated. Please use `createTransitionManager` instead."):void 0,function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=t.routes,r=a(t,["routes"]),o=(0,l["default"])(e)(r),i=(0,f["default"])(o,n);return s({},o,i)}}t.__esModule=!0;var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=n(17),l=o(u),c=n(28),f=o(c),p=n(4),d=o(p);t["default"]=i,e.exports=t["default"]}).call(t,n(1))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.displayName||e.name||"Component"}function a(e){var t=u["default"].createClass({displayName:"WithRouter",contextTypes:{router:f.routerShape},render:function(){return u["default"].createElement(e,i({},this.props,{router:this.context.router}))}});return t.displayName="withRouter("+o(e)+")",t.WrappedComponent=e,(0,c["default"])(t,e)}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};t["default"]=a;var s=n(2),u=r(s),l=n(82),c=r(l),f=n(27);e.exports=t["default"]},function(e,t){"use strict";e.exports=function(e){return encodeURIComponent(e).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}},function(e,t,n){var r;(function(e,o){!function(a){function i(e){throw RangeError(C[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(M,".");var o=e.split("."),a=s(o,t).join(".");return r+a}function l(e){for(var t,n,r=[],o=0,a=e.length;a>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&a>o?(n=e.charCodeAt(o++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--)):r.push(t);return r}function c(e){return s(e,function(e){var t="";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join("")}function f(e){return 10>e-48?e-22:26>e-65?e-65:26>e-97?e-97:E}function p(e,t){return e+22+75*(26>e)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?A(e/k):e>>1,e+=A(e/t);e>T*O>>1;r+=E)e=A(e/T);return A(r+(T+1)*e/(e+P))}function h(e){var t,n,r,o,a,s,u,l,p,h,v=[],m=e.length,y=0,g=x,b=R;for(n=e.lastIndexOf(j),0>n&&(n=0),r=0;n>r;++r)e.charCodeAt(r)>=128&&i("not-basic"),v.push(e.charCodeAt(r));for(o=n>0?n+1:0;m>o;){for(a=y,s=1,u=E;o>=m&&i("invalid-input"),l=f(e.charCodeAt(o++)),(l>=E||l>A((_-y)/s))&&i("overflow"),y+=l*s,p=b>=u?w:u>=b+O?O:u-b,!(p>l);u+=E)h=E-p,s>A(_/h)&&i("overflow"),s*=h;t=v.length+1,b=d(y-a,t,0==a),A(y/t)>_-g&&i("overflow"),g+=A(y/t),y%=t,v.splice(y++,0,g)}return c(v)}function v(e){var t,n,r,o,a,s,u,c,f,h,v,m,y,g,b,P=[];for(e=l(e),m=e.length,t=x,n=0,a=R,s=0;m>s;++s)v=e[s],128>v&&P.push(L(v));for(r=o=P.length,o&&P.push(j);m>r;){for(u=_,s=0;m>s;++s)v=e[s],v>=t&&u>v&&(u=v);for(y=r+1,u-t>A((_-n)/y)&&i("overflow"),n+=(u-t)*y,t=u,s=0;m>s;++s)if(v=e[s],t>v&&++n>_&&i("overflow"),v==t){for(c=n,f=E;h=a>=f?w:f>=a+O?O:f-a,!(h>c);f+=E)b=c-h,g=E-h,P.push(L(p(h+b%g,0))),c=A(b/g);P.push(L(p(c,0))),a=d(n,y,r==o),n=0,++r}++n,++t}return P.join("")}function m(e){return u(e,function(e){return N.test(e)?h(e.slice(4).toLowerCase()):e})}function y(e){return u(e,function(e){return S.test(e)?"xn--"+v(e):e})}var g=("object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof o&&o);g.global!==g&&g.window!==g&&g.self!==g||(a=g);var b,_=2147483647,E=36,w=1,O=26,P=38,k=700,R=72,x=128,j="-",N=/^xn--/,S=/[^\x20-\x7E]/,M=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},T=E-w,A=Math.floor,L=String.fromCharCode;b={version:"1.3.2",ucs2:{decode:l,encode:c},decode:h,encode:v,toASCII:y,toUnicode:m},r=function(){return b}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(111)(e),function(){return this}())},function(e,t,n){function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function o(e,t,n){if(e&&l(e)&&e instanceof r)return e;var o=new r;return o.parse(e,t,n),o}function a(e){return u(e)&&(e=o(e)),e instanceof r?e.format():r.prototype.format.call(e)}function i(e,t){return o(e,!1,!0).resolve(t)}function s(e,t){return e?o(e,!1,!0).resolveObject(t):t}function u(e){return"string"==typeof e}function l(e){return"object"==typeof e&&null!==e}function c(e){return null===e}function f(e){return null==e}var p=n(109);t.parse=o,t.resolve=i,t.resolveObject=s,t.format=a,t.Url=r;var d=/^([a-z0-9.+-]+:)/i,h=/:[0-9]*$/,v=["<",">",'"',"`"," ","\r","\n"," "],m=["{","}","|","\\","^","`"].concat(v),y=["'"].concat(m),g=["%","/","?",";","#"].concat(y),b=["/","?","#"],_=255,E=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,O={javascript:!0,"javascript:":!0},P={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},R=n(86);r.prototype.parse=function(e,t,n){if(!u(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e;r=r.trim();var o=d.exec(r);if(o){o=o[0];var a=o.toLowerCase();this.protocol=a,r=r.substr(o.length)}if(n||o||r.match(/^\/\/[^@\/]+@[^@\/]+/)){var i="//"===r.substr(0,2);!i||o&&P[o]||(r=r.substr(2),this.slashes=!0)}if(!P[o]&&(i||o&&!k[o])){for(var s=-1,l=0;l<b.length;l++){var c=r.indexOf(b[l]);-1!==c&&(-1===s||s>c)&&(s=c)}var f,h;h=-1===s?r.lastIndexOf("@"):r.lastIndexOf("@",s),-1!==h&&(f=r.slice(0,h),r=r.slice(h+1),this.auth=decodeURIComponent(f)),s=-1;for(var l=0;l<g.length;l++){var c=r.indexOf(g[l]);-1!==c&&(-1===s||s>c)&&(s=c)}-1===s&&(s=r.length),this.host=r.slice(0,s),r=r.slice(s),this.parseHost(),this.hostname=this.hostname||"";var v="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!v)for(var m=this.hostname.split(/\./),l=0,x=m.length;x>l;l++){var j=m[l];if(j&&!j.match(E)){for(var N="",S=0,M=j.length;M>S;S++)N+=j.charCodeAt(S)>127?"x":j[S];if(!N.match(E)){var C=m.slice(0,l),T=m.slice(l+1),A=j.match(w);A&&(C.push(A[1]),T.unshift(A[2])),T.length&&(r="/"+T.join(".")+r),this.hostname=C.join(".");break}}}if(this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),!v){for(var L=this.hostname.split("."),D=[],l=0;l<L.length;++l){var F=L[l];D.push(F.match(/[^A-Za-z0-9_-]/)?"xn--"+p.encode(F):F)}this.hostname=D.join(".")}var q=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+q,this.href+=this.host,v&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==r[0]&&(r="/"+r))}if(!O[a])for(var l=0,x=y.length;x>l;l++){var I=y[l],H=encodeURIComponent(I);H===I&&(H=escape(I)),r=r.split(I).join(H)}var V=r.indexOf("#");-1!==V&&(this.hash=r.substr(V),r=r.slice(0,V));var B=r.indexOf("?");if(-1!==B?(this.search=r.substr(B),
this.query=r.substr(B+1),t&&(this.query=R.parse(this.query)),r=r.slice(0,B)):t&&(this.search="",this.query={}),r&&(this.pathname=r),k[a]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var q=this.pathname||"",F=this.search||"";this.path=q+F}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&l(this.query)&&Object.keys(this.query).length&&(a=R.stringify(this.query));var i=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||k[t])&&o!==!1?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),i=i.replace("#","%23"),t+o+n+i+r},r.prototype.resolve=function(e){return this.resolveObject(o(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(u(e)){var t=new r;t.parse(e,!1,!0),e=t}var n=new r;if(Object.keys(this).forEach(function(e){n[e]=this[e]},this),n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol)return Object.keys(e).forEach(function(t){"protocol"!==t&&(n[t]=e[t])}),k[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n;if(e.protocol&&e.protocol!==n.protocol){if(!k[e.protocol])return Object.keys(e).forEach(function(t){n[t]=e[t]}),n.href=n.format(),n;if(n.protocol=e.protocol,e.host||P[e.protocol])n.pathname=e.pathname;else{for(var o=(e.pathname||"").split("/");o.length&&!(e.host=o.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==o[0]&&o.unshift(""),o.length<2&&o.unshift(""),n.pathname=o.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var a=n.pathname||"",i=n.search||"";n.path=a+i}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var s=n.pathname&&"/"===n.pathname.charAt(0),l=e.host||e.pathname&&"/"===e.pathname.charAt(0),p=l||s||n.host&&e.pathname,d=p,h=n.pathname&&n.pathname.split("/")||[],o=e.pathname&&e.pathname.split("/")||[],v=n.protocol&&!k[n.protocol];if(v&&(n.hostname="",n.port=null,n.host&&(""===h[0]?h[0]=n.host:h.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===o[0]?o[0]=e.host:o.unshift(e.host)),e.host=null),p=p&&(""===o[0]||""===h[0])),l)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,h=o;else if(o.length)h||(h=[]),h.pop(),h=h.concat(o),n.search=e.search,n.query=e.query;else if(!f(e.search)){if(v){n.hostname=n.host=h.shift();var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return n.search=e.search,n.query=e.query,c(n.pathname)&&c(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!h.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var y=h.slice(-1)[0],g=(n.host||e.host)&&("."===y||".."===y)||""===y,b=0,_=h.length;_>=0;_--)y=h[_],"."==y?h.splice(_,1):".."===y?(h.splice(_,1),b++):b&&(h.splice(_,1),b--);if(!p&&!d)for(;b--;b)h.unshift("..");!p||""===h[0]||h[0]&&"/"===h[0].charAt(0)||h.unshift(""),g&&"/"!==h.join("/").substr(-1)&&h.push("");var E=""===h[0]||h[0]&&"/"===h[0].charAt(0);if(v){n.hostname=n.host=E?"":h.length?h.shift():"";var m=n.host&&n.host.indexOf("@")>0?n.host.split("@"):!1;m&&(n.auth=m.shift(),n.host=n.hostname=m.shift())}return p=p||n.host&&h.length,p&&!E&&h.unshift(""),h.length?n.pathname=h.join("/"):(n.pathname=null,n.path=null),c(n.pathname)&&c(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=h.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}}])});