From 4b46ac1218366e27bbd0819379c8c2d97854a646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 16 Sep 2016 11:12:27 -0300 Subject: [PATCH 01/14] Adding xhr --- bootstrap-theme.js | 6 +-- default-theme.js | 6 +-- dummy/src/actions/request-test-buttons.js | 28 ++++++++++- dummy/src/views/Main.js | 21 ++++++++ dummy/src/views/partials/RequestTestButton.js | 8 ++- index.js | 4 +- material-ui-theme.js | 6 +-- src/index.js | 1 + src/utils/fetch.js | 49 ++++++++++++++++++- test/actions/client-config-test.js | 10 +++- 10 files changed, 122 insertions(+), 17 deletions(-) diff --git a/bootstrap-theme.js b/bootstrap-theme.js index a59aa99c..0bd53b9b 100644 --- a/bootstrap-theme.js +++ b/bootstrap-theme.js @@ -1,3 +1,3 @@ -!function(e,t){for(var n in t)e[n]=t[n]}(exports,function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonLoader=t.TokenBridge=t.DestroyAccountButton=t.UpdatePasswordForm=t.OAuthSignInButton=t.RequestPasswordResetForm=t.SignOutButton=t.EmailSignUpForm=t.EmailSignInForm=t.AuthGlobals=void 0;var o=n(62),i=r(o),s=n(64),a=r(s),u=n(65),l=r(u),p=n(69),c=r(p),f=n(68),d=r(f),h=n(67),b=r(h),y=n(70),m=r(y),g=n(63),w=r(g),E=n(18),v=r(E),P=n(13),O=r(P);t.AuthGlobals=i["default"],t.EmailSignInForm=a["default"],t.EmailSignUpForm=l["default"],t.SignOutButton=c["default"],t.RequestPasswordResetForm=d["default"],t.OAuthSignInButton=b["default"],t.UpdatePasswordForm=m["default"],t.DestroyAccountButton=w["default"],t.TokenBridge=v["default"],t.ButtonLoader=O["default"]},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("redux-auth")},function(e,t){e.exports=require("react-redux")},function(e,t){e.exports=require("immutable")},,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var t="error";return t+=1===e?"":"s",l["default"].createElement("div",{className:"has-error"},l["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return l["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},l["default"].createElement(p.Glyphicon,{glyph:"exclamation-sign",style:{position:"absolute",left:0,top:2}})," ",e)}))}return l["default"].createElement("p",null,l["default"].createElement(p.Glyphicon,{glyph:"exclamation-sign"})," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return l["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(l["default"].Component);d.propTypes={errors:u.PropTypes.object},d.defaultProps={errors:f["default"].fromJS([])},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0){var t="error";return t+=1===e?"":"s",l["default"].createElement("div",{className:"has-error"},l["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return l["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},l["default"].createElement(p.Glyphicon,{glyph:"exclamation-sign",style:{position:"absolute",left:0,top:2}})," ",e)}))}return l["default"].createElement("p",null,l["default"].createElement(p.Glyphicon,{glyph:"exclamation-sign"})," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return l["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(l["default"].Component);d.propTypes={errors:u.PropTypes.object},d.defaultProps={errors:f["default"].fromJS([])},t["default"]=d},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0){var t="error";return t+=1===e?"":"s",l["default"].createElement("div",{className:"has-error"},l["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return l["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},l["default"].createElement("i",{style:{position:"absolute",left:0,top:2}},"✗")," ",e)}))}return l["default"].createElement("p",null,l["default"].createElement("i",{style:{position:"absolute",left:0,top:2}},"✗")," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return l["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(l["default"].Component);f.propTypes={errors:u.PropTypes.object},f.defaultProps={errors:c["default"].fromJS([])},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 i(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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t0){var t="error";return t+=1===e?"":"s",l["default"].createElement("div",{className:"has-error"},l["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return l["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},l["default"].createElement("i",{style:{position:"absolute",left:0,top:2}},"✗")," ",e)}))}return l["default"].createElement("p",null,l["default"].createElement("i",{style:{position:"absolute",left:0,top:2}},"✗")," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return l["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(l["default"].Component);f.propTypes={errors:u.PropTypes.object},f.defaultProps={errors:c["default"].fromJS([])},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 i(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 s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t { + dispatch(requestTestStart(key)); + + return xhr(url, { + credentials: "include" + }) + .then(resp => { + if (resp && resp.statusText === "OK") { + dispatch(requestTestComplete(key)) + } else { + dispatch(requestTestError(key)); + } + + return resp.json(); + }) + .then(json => { + console.log("@-->resp json", json); + return json; + }) + .catch(resp => { + console.log("fail", resp); + dispatch(requestTestError(key)) + }); + }; +} diff --git a/dummy/src/views/Main.js b/dummy/src/views/Main.js index f1b0ed93..12c34b51 100644 --- a/dummy/src/views/Main.js +++ b/dummy/src/views/Main.js @@ -100,6 +100,27 @@ class Main extends React.Component { path="/demo/members_only_group" endpointKey="any"/> + + Default user: + + + + Alternate user class: + + + + Group that includes both user classes: + + diff --git a/dummy/src/views/partials/RequestTestButton.js b/dummy/src/views/partials/RequestTestButton.js index 6c39b97c..6d11c9ae 100644 --- a/dummy/src/views/partials/RequestTestButton.js +++ b/dummy/src/views/partials/RequestTestButton.js @@ -2,7 +2,7 @@ import React, { PropTypes } from "react"; import {Glyphicon} from "react-bootstrap"; import {ButtonLoader} from "../../../../src/views/bootstrap"; import {connect} from "react-redux"; -import {requestTest} from "../../actions/request-test-buttons"; +import {requestTest, requestTestXhr} from "../../actions/request-test-buttons"; import {getApiUrl} from "../../../../src/utils/session-storage"; class RequestTestButton extends React.Component { @@ -17,7 +17,11 @@ class RequestTestButton extends React.Component { handleClick () { let url = getApiUrl() + this.props.path; - this.props.dispatch(requestTest(url, this.props.path)); + if (!this.props.xhr) { + this.props.dispatch(requestTest(url, this.props.path)); + } else { + this.props.dispatch(requestTestXhr(url, this.props.path)); + } } render () { diff --git a/index.js b/index.js index b14242d3..4309c943 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),D=n(h),m=r(51),y=n(m),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:D["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function D(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function m(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=D,t.getConfirmationSuccessUrl=m,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(S(e)){var t=(0,E.retrieveData)(l.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,E.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(S(e.url)){var t={},r=!0;for(var n in(0,E.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,E.persistData)(l.SAVED_CREDS_KEY,t)}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,f["default"])(t.headers,i(e)),(0,d["default"])(e,t).then(function(e){return a(e)})};var s=r(42),d=o(s),c=r(19),l=n(c),_=r(16),f=o(_),E=r(11),S=function(e){return e.match((0,E.getApiUrl)((0,E.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:D}}function u(){return{type:m}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",D=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",m=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(t,n){var o=new XMLHttpRequest;o.open(opts.method,getApiPath(e)),o.onload=function(){r.status>=200&&r.status<300?t(o.response):n({status:r.status,statusText:o.statusText})},o.onerror=function(){n({status:r.status,statusText:o.statusText})},opts.headers&&Object.keys(opts.headers).forEach(function(e){o.setRequestHeader(e,opts.headers[e])});var u=opts.params;u&&"object"===("undefined"==typeof u?"undefined":l(u))&&(u=objectToQueryString(u)),opts.progress&&o.upload.addEventListener("progress",opts.progress,!1),o.send(u)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file diff --git a/material-ui-theme.js b/material-ui-theme.js index b6e1bb67..0c2104b7 100644 --- a/material-ui-theme.js +++ b/material-ui-theme.js @@ -1,3 +1,3 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonLoader=t.TokenBridge=t.DestroyAccountButton=t.UpdatePasswordForm=t.OAuthSignInButton=t.RequestPasswordResetForm=t.SignOutButton=t.EmailSignUpForm=t.EmailSignInForm=t.AuthGlobals=void 0;var o=r(114),i=n(o),a=r(116),s=n(a),u=r(117),l=n(u),p=r(121),c=n(p),f=r(120),d=n(f),h=r(119),b=n(h),y=r(122),m=n(y),g=r(115),w=n(g),v=r(18),O=n(v),E=r(15),P=n(E);t.AuthGlobals=i["default"],t.EmailSignInForm=s["default"],t.EmailSignUpForm=l["default"],t.SignOutButton=c["default"],t.RequestPasswordResetForm=d["default"],t.OAuthSignInButton=b["default"],t.UpdatePasswordForm=m["default"],t.DestroyAccountButton=w["default"],t.TokenBridge=O["default"],t.ButtonLoader=P["default"]},function(e,t){e.exports=require("react")},function(e,t){e.exports=require("redux-auth")},function(e,t){e.exports=require("react-redux")},function(e,t){e.exports=require("immutable")},,,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);thandling submit"),e.preventDefault();var t=this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form"]).toJS();this.props.dispatch((0,b.emailSignUp)(t,this.getEndpoint())).then(this.props.next)["catch"](function(){})}},{key:"render",value:function(){var e=this.props.auth.getIn(["user","isSignedIn"])||this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"loading"]);return p["default"].createElement("form",{className:"redux-auth email-sign-up-form clearfix",style:{clear:"both",overflow:"hidden"},onSubmit:this.handleSubmit.bind(this)},p["default"].createElement(f["default"],s({type:"text",floatingLabelText:"Email",className:"email-sign-up-email",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","email"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","email"]),onChange:this.handleInput.bind(this,"email")},this.props.inputProps.email)),p["default"].createElement(f["default"],s({type:"password",floatingLabelText:"Password",className:"email-sign-up-password",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","password"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","password"]),onChange:this.handleInput.bind(this,"password")},this.props.inputProps.password)),p["default"].createElement(f["default"],s({type:"password",floatingLabelText:"Password Confirmation",className:"email-sign-up-password-confirmation",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","password_confirmation"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","password_confirmation"]),onChange:this.handleInput.bind(this,"password_confirmation")},this.props.inputProps.passwordConfirmation)),p["default"].createElement(h["default"],s({loading:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"loading"]),type:"submit",className:"email-sign-up-submit",primary:!0,style:{"float":"right"},icon:g["default"],disabled:e,onClick:this.handleSubmit.bind(this)},this.props.inputProps.submit),"Sign Up"))}}]),t}(p["default"].Component);w.propTypes={endpoint:l.PropTypes.string,next:l.PropTypes.func,inputProps:l.PropTypes.shape({email:l.PropTypes.object,password:l.PropTypes.object,passwordConfirmation:l.PropTypes.object,submit:l.PropTypes.object})},w.defaultProps={next:function(){},inputProps:{email:{},password:{},submit:{}}},t["default"]=(0,y.connect)(function(e){var t=e.auth;return{auth:t}})(w)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(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 s(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 u=function(){function e(e,t){for(var r=0;r0){var t="error";return t+=1===e?"":"s",p["default"].createElement("div",{className:"has-error"},p["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return p["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},p["default"].createElement(h["default"],{viewBox:"0 0 50 50",color:f.red500,style:{position:"absolute",left:0,top:3}})," ",e)}))}return p["default"].createElement("p",{style:{paddingLeft:"20px",position:"relative"}},p["default"].createElement(h["default"],{viewBox:"0 0 50 50",style:{position:"absolute",left:0,top:3},color:f.red500})," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return p["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(p["default"].Component);m.propTypes={errors:l.PropTypes.object},m.defaultProps={errors:y["default"].fromJS([])},t["default"]=m},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s=Object.assign||function(e){for(var t=1;thandling submit"),e.preventDefault();var t=this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form"]).toJS();this.props.dispatch((0,b.emailSignUp)(t,this.getEndpoint())).then(this.props.next)["catch"](function(){})}},{key:"render",value:function(){var e=this.props.auth.getIn(["user","isSignedIn"])||this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"loading"]);return p["default"].createElement("form",{className:"redux-auth email-sign-up-form clearfix",style:{clear:"both",overflow:"hidden"},onSubmit:this.handleSubmit.bind(this)},p["default"].createElement(f["default"],s({type:"text",floatingLabelText:"Email",className:"email-sign-up-email",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","email"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","email"]),onChange:this.handleInput.bind(this,"email")},this.props.inputProps.email)),p["default"].createElement(f["default"],s({type:"password",floatingLabelText:"Password",className:"email-sign-up-password",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","password"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","password"]),onChange:this.handleInput.bind(this,"password")},this.props.inputProps.password)),p["default"].createElement(f["default"],s({type:"password",floatingLabelText:"Password Confirmation",className:"email-sign-up-password-confirmation",disabled:e,value:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"form","password_confirmation"]),errors:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"errors","password_confirmation"]),onChange:this.handleInput.bind(this,"password_confirmation")},this.props.inputProps.passwordConfirmation)),p["default"].createElement(h["default"],s({loading:this.props.auth.getIn(["emailSignUp",this.getEndpoint(),"loading"]),type:"submit",className:"email-sign-up-submit",primary:!0,style:{"float":"right"},icon:g["default"],disabled:e,onClick:this.handleSubmit.bind(this)},this.props.inputProps.submit),"Sign Up"))}}]),t}(p["default"].Component);w.propTypes={endpoint:l.PropTypes.string,next:l.PropTypes.func,inputProps:l.PropTypes.shape({email:l.PropTypes.object,password:l.PropTypes.object,passwordConfirmation:l.PropTypes.object,submit:l.PropTypes.object})},w.defaultProps={next:function(){},inputProps:{email:{},password:{},submit:{}}},t["default"]=(0,y.connect)(function(e){var t=e.auth;return{auth:t}})(w)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(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 s(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 u=function(){function e(e,t){for(var r=0;r0){var t="error";return t+=1===e?"":"s",p["default"].createElement("div",{className:"has-error"},p["default"].createElement("p",null,"Please correct the following ",t,":"),this.props.errors.map(function(e,t){return p["default"].createElement("p",{key:t,className:"control-label modal-error-item",style:{paddingLeft:"20px",position:"relative"}},p["default"].createElement(h["default"],{viewBox:"0 0 50 50",color:f.red500,style:{position:"absolute",left:0,top:3}})," ",e)}))}return p["default"].createElement("p",{style:{paddingLeft:"20px",position:"relative"}},p["default"].createElement(h["default"],{viewBox:"0 0 50 50",style:{position:"absolute",left:0,top:3},color:f.red500})," There was an error processing this form. Please check each field and try again.")}},{key:"render",value:function(){return p["default"].createElement("div",{className:"auth-error-message"},this.renderErrorList())}}]),t}(p["default"].Component);m.propTypes={errors:l.PropTypes.object},m.defaultProps={errors:y["default"].fromJS([])},t["default"]=m},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 s=Object.assign||function(e){for(var t=1;t updateAuthCredentials(resp)); } + +function xhrRequest(url, options) { + return new Promise((resolve, reject) => { + const xhrReq = new XMLHttpRequest(); + xhrReq.open(opts.method, getApiPath(url)); + xhrReq.onload = () => { + if (this.status >= 200 && this.status < 300) { + resolve(xhrReq.response); + } else { + reject({ + status: this.status, + statusText: xhrReq.statusText + }); + } + }; + xhrReq.onerror = () => { + reject({ + status: this.status, + statusText: xhrReq.statusText + }); + }; + if (opts.headers) { + Object.keys(opts.headers).forEach((key) => { + xhrReq.setRequestHeader(key, opts.headers[key]); + }); + } + let params = opts.params; + if (params && typeof params === 'object') { + params = objectToQueryString(params); + } + if (opts.progress) { + xhrReq.upload.addEventListener('progress', opts.progress, false); + } + xhrReq.send(params); + }); +} diff --git a/test/actions/client-config-test.js b/test/actions/client-config-test.js index 693c16a2..df34bf4e 100644 --- a/test/actions/client-config-test.js +++ b/test/actions/client-config-test.js @@ -3,7 +3,7 @@ import ReactDOM from "react-dom"; import {retrieveData, getCurrentEndpointKey} from "../../src/utils/session-storage"; import {syncHistoryWithStore, push} from "react-router-redux"; import {expect} from "chai"; -import {fetch} from "../../src"; +import {fetch, xhr} from "../../src"; import nock from "nock"; var testUid = "test@test.com", @@ -164,6 +164,14 @@ export default function() { expect(retrieveData("authHeaders")["access-token"]).to.equal(nextToken); done(); }); + + // next request should include auth headers + console.log('Hereeeeeeee'); + xhr(`${altApiUrl}/api/hello`).then(() => { + // cookie should have been updated to latest + expect(retrieveData("authHeaders")["access-token"]).to.equal(nextToken); + done(); + }); }) .catch(err => console.log("@-->error", err.stack)); From c2279f6943442245d45dd3f252962279a4000d10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 16 Sep 2016 11:31:24 -0300 Subject: [PATCH 02/14] Releasing --- index.js | 4 ++-- src/utils/fetch.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 4309c943..48b7be83 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(t,n){var o=new XMLHttpRequest;o.open(opts.method,getApiPath(e)),o.onload=function(){r.status>=200&&r.status<300?t(o.response):n({status:r.status,statusText:o.statusText})},o.onerror=function(){n({status:r.status,statusText:o.statusText})},opts.headers&&Object.keys(opts.headers).forEach(function(e){o.setRequestHeader(e,opts.headers[e])});var u=opts.params;u&&"object"===("undefined"==typeof u?"undefined":l(u))&&(u=objectToQueryString(u)),opts.progress&&o.upload.addEventListener("progress",opts.progress,!1),o.send(u)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(t,n){var o=new XMLHttpRequest;o.open(opts.method,getApiPath(e)),o.onload=function(){r.status>=200&&r.status<300?t(o.response):n({status:r.status,statusText:o.statusText})},o.onerror=function(){n({status:r.status,statusText:o.statusText})},opts.headers&&Object.keys(opts.headers).forEach(function(e){o.setRequestHeader(e,opts.headers[e])});var u=opts.params;u&&"object"===("undefined"==typeof u?"undefined":l(u))&&(u=objectToQueryString(u)),opts.progress&&o.upload.addEventListener("progress",opts.progress,!1),o.send(u)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){return d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 40bcb98b..0fa4f005 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -75,11 +75,11 @@ function updateAuthCredentials(resp) { } export default function (url, options) { - extendRequester(url, originalFetch, options) + return extendRequester(url, originalFetch, options); } export function xhr(url, options) { - extendRequester(url, xhrRequest, options) + return extendRequester(url, xhrRequest, options); } From 48c5e40fef076d6b9f100dba4a75b66efb9b6702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 16 Sep 2016 11:42:44 -0300 Subject: [PATCH 03/14] Fixing options --- src/utils/fetch.js | 14 +++++++------- test/actions/client-config-test.js | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 0fa4f005..89d13d63 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -95,7 +95,7 @@ function extendRequester(url, requester, options={}) { function xhrRequest(url, options) { return new Promise((resolve, reject) => { const xhrReq = new XMLHttpRequest(); - xhrReq.open(opts.method, getApiPath(url)); + xhrReq.open(options.method, getApiPath(url)); xhrReq.onload = () => { if (this.status >= 200 && this.status < 300) { resolve(xhrReq.response); @@ -112,17 +112,17 @@ function xhrRequest(url, options) { statusText: xhrReq.statusText }); }; - if (opts.headers) { - Object.keys(opts.headers).forEach((key) => { - xhrReq.setRequestHeader(key, opts.headers[key]); + if (options.headers) { + Object.keys(options.headers).forEach((key) => { + xhrReq.setRequestHeader(key, options.headers[key]); }); } - let params = opts.params; + let params = options.params; if (params && typeof params === 'object') { params = objectToQueryString(params); } - if (opts.progress) { - xhrReq.upload.addEventListener('progress', opts.progress, false); + if (options.progress) { + xhrReq.upload.addEventListener('progress', options.progress, false); } xhrReq.send(params); }); diff --git a/test/actions/client-config-test.js b/test/actions/client-config-test.js index df34bf4e..d19cdbc1 100644 --- a/test/actions/client-config-test.js +++ b/test/actions/client-config-test.js @@ -166,7 +166,6 @@ export default function() { }); // next request should include auth headers - console.log('Hereeeeeeee'); xhr(`${altApiUrl}/api/hello`).then(() => { // cookie should have been updated to latest expect(retrieveData("authHeaders")["access-token"]).to.equal(nextToken); From 9abc0f3726fe4237c384261546792ce742323d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 16 Sep 2016 11:46:11 -0300 Subject: [PATCH 04/14] Releasing --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 48b7be83..5e78f4d7 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(t,n){var o=new XMLHttpRequest;o.open(opts.method,getApiPath(e)),o.onload=function(){r.status>=200&&r.status<300?t(o.response):n({status:r.status,statusText:o.statusText})},o.onerror=function(){n({status:r.status,statusText:o.statusText})},opts.headers&&Object.keys(opts.headers).forEach(function(e){o.setRequestHeader(e,opts.headers[e])});var u=opts.params;u&&"object"===("undefined"==typeof u?"undefined":l(u))&&(u=objectToQueryString(u)),opts.progress&&o.upload.addEventListener("progress",opts.progress,!1),o.send(u)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){return d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,getApiPath(e)),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":l(i))&&(i=objectToQueryString(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),u.send(i)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){return d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file From d8e93cc96f005edc5f02a41d5d085ef3a2a9230d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Sat, 17 Sep 2016 12:28:07 -0300 Subject: [PATCH 05/14] Reversing to fetch --- src/utils/fetch.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 89d13d63..8403379e 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -74,8 +74,13 @@ function updateAuthCredentials(resp) { return resp; } -export default function (url, options) { - return extendRequester(url, originalFetch, options); +export default function (url, options={}) { + if (!options.headers) { + options.headers = {} + } + extend(options.headers, getAuthHeaders(url)); + return originalFetch(url, options) + .then(resp => updateAuthCredentials(resp)); } export function xhr(url, options) { From 728d46751bee54500a4093e0003a9ffb9dbccf20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 12:14:22 -0300 Subject: [PATCH 06/14] Fixing xhrRequest --- index.js | 4 ++-- src/utils/fetch.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5e78f4d7..303db8c1 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,getApiPath(e)),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":l(i))&&(i=objectToQueryString(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),u.send(i)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e,t){return d(e,f["default"],t)},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":l(i))&&(i=objectToQueryString(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),u.send(i)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,O["default"])(t.headers,i(e)),(0,f["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 8403379e..faecb9df 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -87,7 +87,6 @@ export function xhr(url, options) { return extendRequester(url, xhrRequest, options); } - function extendRequester(url, requester, options={}) { if (!options.headers) { options.headers = {} @@ -100,7 +99,7 @@ function extendRequester(url, requester, options={}) { function xhrRequest(url, options) { return new Promise((resolve, reject) => { const xhrReq = new XMLHttpRequest(); - xhrReq.open(options.method, getApiPath(url)); + xhrReq.open(options.method, url); xhrReq.onload = () => { if (this.status >= 200 && this.status < 300) { resolve(xhrReq.response); From 7c9f285b7343774c3a703e6f5589ffe1d4e1b560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 13:06:42 -0300 Subject: [PATCH 07/14] Adding form data option to xhr --- index.js | 4 ++-- src/utils/fetch.js | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 303db8c1..99ada805 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var S=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return S.getApiUrl}});var E=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return E.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return E.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return E.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return E.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return E.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return E.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return E.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return E.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return E.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return E.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return E.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return E.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return E.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),L=r(58),C=n(L),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:C["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,E.destroySession)(),n=Promise.resolve((0,S.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),S=r(60),E=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return L(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return L(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},S()}function S(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function E(e){return e&&e.replace(/("|')/g,"")}function p(){return E(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function L(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return E(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=S,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=L;var C=r(140),w=o(C),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(T(e)){var t=(0,R.retrieveData)(E.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,R.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(T(e.url)){var t={},r=!0;for(var n in(0,R.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,R.persistData)(E.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,O["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":l(i))&&(i=objectToQueryString(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),u.send(i)})}Object.defineProperty(t,"__esModule",{value:!0});var l="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,O["default"])(t.headers,i(e)),(0,f["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var _=r(42),f=o(_),S=r(19),E=n(S),p=r(16),O=o(p),R=r(11),T=function(e){return e.match((0,R.getApiUrl)((0,R.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,endpoint:t,message:e}}function i(e,t){return{type:E,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",S=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",E=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:E,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),S=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",E=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,S.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,S.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,S.getCurrentEndpointKey)();(0,S.setCurrentEndpointKey)(n),e((0,E.storeCurrentEndpointKey)(n));var u=(0,S.getCurrentEndpointKey)();e(a(t,u));var c=(0,S.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,S.setCurrentEndpointKey)(o),e((0,E.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),S=r(11),E=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:S,user:t,endpoint:e}}function i(e,t){return{type:E,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",S=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",E=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,S["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),S=n(f),E=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:L}}function f(){return{type:C}}function S(){return{type:j}}function E(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=S,t.showPasswordResetErrorModal=E,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",S=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",E=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:S,endpoint:e,user:t}}function a(e,t){return{type:E,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",S=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",E=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=E(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},S=function(e,t){for(var r in t)delete e[t[r]];return e},E=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(S(_(e),t)),n=s["default"].stringify(S(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,E.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),S=r(5),E=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(P(e)){var t=(0,T.retrieveData)(p.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,T.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(P(e.url)){var t={},r=!0;for(var n in(0,T.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,T.persistData)(p.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,R["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file diff --git a/src/utils/fetch.js b/src/utils/fetch.js index faecb9df..3cf398c4 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -128,6 +128,13 @@ function xhrRequest(url, options) { if (options.progress) { xhrReq.upload.addEventListener('progress', options.progress, false); } + if (params.formData) { + params = params.formData; + } xhrReq.send(params); }); } + +function objectToQueryString(obj) { + return Object.keys(obj).map(k => `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`).join('&'); +} From f10a997600fd7f6a7698c77b14ad231fd1a387b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 13:27:03 -0300 Subject: [PATCH 08/14] Adding one exception when there is formData --- src/utils/fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 3cf398c4..52969871 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -122,7 +122,7 @@ function xhrRequest(url, options) { }); } let params = options.params; - if (params && typeof params === 'object') { + if (params && typeof params === 'object' && !params.formData) { params = objectToQueryString(params); } if (options.progress) { From dd10d5b7f22d254ad6f05f235ec09b16a16f1435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 13:33:20 -0300 Subject: [PATCH 09/14] Adding status --- src/utils/fetch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 52969871..837c6ba1 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -101,7 +101,7 @@ function xhrRequest(url, options) { const xhrReq = new XMLHttpRequest(); xhrReq.open(options.method, url); xhrReq.onload = () => { - if (this.status >= 200 && this.status < 300) { + if (xhrReq.status >= 200 && xhrReq.status < 300) { resolve(xhrReq.response); } else { reject({ From 89ad94b5aa7b393b1ba89932f9bb8e2c447a15f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 13:44:06 -0300 Subject: [PATCH 10/14] Releasing --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 99ada805..fbfb886b 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(P(e)){var t=(0,T.retrieveData)(p.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,T.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(P(e.url)){var t={},r=!0;for(var n in(0,T.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,T.persistData)(p.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,R["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){r.status>=200&&r.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&u.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&!i.formData&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file From 070d6d1352d51042409e3410c9ccfa45639834f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 14:55:33 -0300 Subject: [PATCH 11/14] Adding updateAuthCredentialsXhr --- src/utils/fetch.js | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 837c6ba1..2bdc9c80 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -74,6 +74,34 @@ function updateAuthCredentials(resp) { return resp; } +function updateAuthCredentialsXhr(xhrReq, url) { + // check config apiUrl matches the current response url + if (isApiRequest(url)) { + // set header for each key in `tokenFormat` config + var newHeaders = {}; + + // set flag to ensure that we don't accidentally nuke the headers + // if the response tokens aren't sent back from the API + var blankHeaders = true; + + // set header key + val for each key in `tokenFormat` config + for (var key in getTokenFormat()) { + newHeaders[key] = xhrReq.getResponseHeader(key); + + if (newHeaders[key]) { + blankHeaders = false; + } + } + + // persist headers for next request + if (!blankHeaders) { + persistData(C.SAVED_CREDS_KEY, newHeaders); + } + } + + return xhrReq.response; +} + export default function (url, options={}) { if (!options.headers) { options.headers = {} @@ -84,16 +112,16 @@ export default function (url, options={}) { } export function xhr(url, options) { - return extendRequester(url, xhrRequest, options); + return extendRequesterXhr(url, xhrRequest, options); } -function extendRequester(url, requester, options={}) { +function extendRequesterXhr(url, requester, options={}) { if (!options.headers) { options.headers = {} } extend(options.headers, getAuthHeaders(url)); return requester(url, options) - .then(resp => updateAuthCredentials(resp)); + .then(xhrReq => updateAuthCredentials(xhrReq, url)); } function xhrRequest(url, options) { @@ -102,7 +130,7 @@ function xhrRequest(url, options) { xhrReq.open(options.method, url); xhrReq.onload = () => { if (xhrReq.status >= 200 && xhrReq.status < 300) { - resolve(xhrReq.response); + resolve(xhrReq); } else { reject({ status: this.status, From 751955809f53c4758db5bbc63d52e7bc702838b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 14:56:53 -0300 Subject: [PATCH 12/14] Releasing --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fbfb886b..176a854a 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(P(e)){var t=(0,T.retrieveData)(p.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,T.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(P(e.url)){var t={},r=!0;for(var n in(0,T.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,T.persistData)(p.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,R["default"])(r.headers,i(e)),t(e,r).then(function(e){return a(e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){u.status>=200&&u.status<300?n(u.response):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&!i.formData&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&u.status<300?n(u):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&!i.formData&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file From b875f7ea58d29ea70ae92f8795b92ae10887f8ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Fri, 14 Oct 2016 15:03:44 -0300 Subject: [PATCH 13/14] Chaging to updateAuthCredentialsXhr --- index.js | 4 ++-- src/utils/fetch.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 176a854a..481ed8ef 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,2 @@ -!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(P(e)){var t=(0,T.retrieveData)(p.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,T.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(P(e.url)){var t={},r=!0;for(var n in(0,T.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,T.persistData)(p.SAVED_CREDS_KEY,t)}return e}function s(e,t){return d(e,c,t)}function d(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,R["default"])(r.headers,i(e)),t(e,r).then(function(t){return a(t,e)})}function c(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){u.status>=200&&u.status<300?n(u):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":_(i))&&!i.formData&&(i=l(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function l(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var _="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,R["default"])(t.headers,i(e)),(0,E["default"])(e,t).then(function(e){return a(e)})},t.xhr=s;var f=r(42),E=o(f),S=r(19),p=n(S),O=r(16),R=o(O),T=r(11),P=function(e){return e.match((0,T.getApiUrl)((0,T.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file +!function(e,t){for(var r in t)e[r]=t[r]}(exports,function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.xhr=t.fetch=t.hideDestroyAccountErrorModal=t.hideDestroyAccountSuccessModal=t.hideUpdatePasswordErrorModal=t.hideUpdatePasswordSuccessModal=t.hidePasswordResetRequestErrorModal=t.hidePasswordResetRequestSuccessModal=t.hidePasswordResetErrorModal=t.hideFirstTimeLoginErrorModal=t.showPasswordResetErrorModal=t.showFirstTimeLoginErrorModal=t.hidePasswordResetSuccessModal=t.hideFirstTimeLoginSuccessModal=t.showPasswordResetSuccessModal=t.showFirstTimeLoginSuccessModal=t.hideEmailSignUpErrorModal=t.hideEmailSignUpSuccessModal=t.hideSignOutErrorModal=t.hideSignOutSuccessModal=t.hideOAuthSignInErrorModal=t.hideOAuthSignInSuccessModal=t.hideEmailSignInErrorModal=t.hideEmailSignInSuccessModal=t.getApiUrl=t.verifyAuth=t.destroyAccount=t.updatePasswordModalFormUpdate=t.updatePasswordModal=t.updatePasswordFormUpdate=t.updatePassword=t.requestPasswordResetFormUpdate=t.requestPasswordReset=t.oAuthSignIn=t.emailSignUpFormUpdate=t.emailSignUp=t.signOut=t.emailSignInFormUpdate=t.emailSignIn=t.authenticate=t.configure=t.authStateReducer=void 0;var o=r(5);Object.defineProperty(t,"configure",{enumerable:!0,get:function(){return o.configure}});var u=r(24);Object.defineProperty(t,"authenticate",{enumerable:!0,get:function(){return u.authenticate}});var i=r(26);Object.defineProperty(t,"emailSignIn",{enumerable:!0,get:function(){return i.emailSignIn}}),Object.defineProperty(t,"emailSignInFormUpdate",{enumerable:!0,get:function(){return i.emailSignInFormUpdate}});var a=r(30);Object.defineProperty(t,"signOut",{enumerable:!0,get:function(){return a.signOut}});var s=r(27);Object.defineProperty(t,"emailSignUp",{enumerable:!0,get:function(){return s.emailSignUp}}),Object.defineProperty(t,"emailSignUpFormUpdate",{enumerable:!0,get:function(){return s.emailSignUpFormUpdate}});var d=r(28);Object.defineProperty(t,"oAuthSignIn",{enumerable:!0,get:function(){return d.oAuthSignIn}});var c=r(33);Object.defineProperty(t,"requestPasswordReset",{enumerable:!0,get:function(){return c.requestPasswordReset}}),Object.defineProperty(t,"requestPasswordResetFormUpdate",{enumerable:!0,get:function(){return c.requestPasswordResetFormUpdate}});var l=r(36);Object.defineProperty(t,"updatePassword",{enumerable:!0,get:function(){return l.updatePassword}}),Object.defineProperty(t,"updatePasswordFormUpdate",{enumerable:!0,get:function(){return l.updatePasswordFormUpdate}});var _=r(35);Object.defineProperty(t,"updatePasswordModal",{enumerable:!0,get:function(){return _.updatePasswordModal}}),Object.defineProperty(t,"updatePasswordModalFormUpdate",{enumerable:!0,get:function(){return _.updatePasswordModalFormUpdate}});var f=r(25);Object.defineProperty(t,"destroyAccount",{enumerable:!0,get:function(){return f.destroyAccount}});var E=r(11);Object.defineProperty(t,"getApiUrl",{enumerable:!0,get:function(){return E.getApiUrl}});var S=r(34);Object.defineProperty(t,"hideEmailSignInSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignInSuccessModal}}),Object.defineProperty(t,"hideEmailSignInErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignInErrorModal}}),Object.defineProperty(t,"hideOAuthSignInSuccessModal",{enumerable:!0,get:function(){return S.hideOAuthSignInSuccessModal}}),Object.defineProperty(t,"hideOAuthSignInErrorModal",{enumerable:!0,get:function(){return S.hideOAuthSignInErrorModal}}),Object.defineProperty(t,"hideSignOutSuccessModal",{enumerable:!0,get:function(){return S.hideSignOutSuccessModal}}),Object.defineProperty(t,"hideSignOutErrorModal",{enumerable:!0,get:function(){return S.hideSignOutErrorModal}}),Object.defineProperty(t,"hideEmailSignUpSuccessModal",{enumerable:!0,get:function(){return S.hideEmailSignUpSuccessModal}}),Object.defineProperty(t,"hideEmailSignUpErrorModal",{enumerable:!0,get:function(){return S.hideEmailSignUpErrorModal}}),Object.defineProperty(t,"showFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"showPasswordResetSuccessModal",{enumerable:!0,get:function(){return S.showPasswordResetSuccessModal}}),Object.defineProperty(t,"hideFirstTimeLoginSuccessModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginSuccessModal}}),Object.defineProperty(t,"hidePasswordResetSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetSuccessModal}}),Object.defineProperty(t,"showFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.showFirstTimeLoginErrorModal}}),Object.defineProperty(t,"showPasswordResetErrorModal",{enumerable:!0,get:function(){return S.showPasswordResetErrorModal}}),Object.defineProperty(t,"hideFirstTimeLoginErrorModal",{enumerable:!0,get:function(){return S.hideFirstTimeLoginErrorModal}}),Object.defineProperty(t,"hidePasswordResetErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetErrorModal}}),Object.defineProperty(t,"hidePasswordResetRequestSuccessModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestSuccessModal}}),Object.defineProperty(t,"hidePasswordResetRequestErrorModal",{enumerable:!0,get:function(){return S.hidePasswordResetRequestErrorModal}}),Object.defineProperty(t,"hideUpdatePasswordSuccessModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordSuccessModal}}),Object.defineProperty(t,"hideUpdatePasswordErrorModal",{enumerable:!0,get:function(){return S.hideUpdatePasswordErrorModal}}),Object.defineProperty(t,"hideDestroyAccountSuccessModal",{enumerable:!0,get:function(){return S.hideDestroyAccountSuccessModal}}),Object.defineProperty(t,"hideDestroyAccountErrorModal",{enumerable:!0,get:function(){return S.hideDestroyAccountErrorModal}});var p=r(12);Object.defineProperty(t,"fetch",{enumerable:!0,get:function(){return n(p)["default"]}}),Object.defineProperty(t,"xhr",{enumerable:!0,get:function(){return p.xhr}});var O=r(47),R=n(O),T=r(48),P=n(T),A=r(59),g=n(A),M=r(56),I=n(M),h=r(50),m=n(h),D=r(51),y=n(D),v=r(52),U=n(v),b=r(53),N=n(b),C=r(58),L=n(C),w=r(57),j=n(w),K=r(54),G=n(K),H=r(55),F=n(H),W=r(49),V=n(W),k=r(10),Y=r(41),q=n(Y);t.authStateReducer=(0,k.combineReducers)({configure:P["default"],emailSignIn:m["default"],emailSignUp:y["default"],signOut:F["default"],authentication:R["default"],requestPasswordReset:N["default"],oAuthSignIn:U["default"],updatePassword:L["default"],updatePasswordModal:j["default"],destroyAccount:V["default"],server:G["default"],ui:I["default"],user:g["default"]});t.verifyAuth=q["default"]},,,,function(e,t){e.exports=require("immutable")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t,r){return{type:A,endpoints:e,currentEndpointKey:t,defaultEndpointKey:r}}function i(e){return{type:g,currentEndpointKey:e}}function a(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return function(r){if(t.currentLocation&&t.currentLocation.match(/blank=true/))return Promise.resolve({blank:!0});r((0,l.authenticateStart)());var n=void 0,o=void 0,i=void 0,a=void 0,s=void 0;if(t.isServer)n=(0,O["default"])(e,t).then(function(e){var t=e.user,n=e.headers,o=e.firstTimeLogin,i=e.mustResetPassword,a=e.currentEndpoint,s=e.currentEndpointKey,d=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({headers:n,user:t,firstTimeLogin:o,mustResetPassword:i})),r(u(Object.keys(a),s,d)),t})["catch"](function(e){var t=e.reason,n=e.firstTimeLogin,o=e.mustResetPassword,i=e.currentEndpoint,a=e.defaultEndpointKey;return r((0,f.ssAuthTokenUpdate)({firstTimeLogin:n,mustResetPassword:o})),r(u(Object.keys(i||{}),null,a)),Promise.reject({reason:t})});else{var c=document.getElementById("token-bridge");if(c){var p=c.innerHTML;if(p){var R=JSON.parse(p);s=R.headers,a=R.user,o=R.firstTimeLogin,i=R.mustResetPassword,a&&(r((0,l.authenticateComplete)(a)),t.initialCredentials=R),r((0,f.ssAuthTokenUpdate)({user:a,headers:s,mustResetPassword:i,firstTimeLogin:o}))}}var A=(0,T["default"])(window.location),g=A.authRedirectPath,M=A.authRedirectHeaders;g&&r((0,P.push)({pathname:g})),M&&M.uid&&M["access-token"]&&(t.initialCredentials=(0,d["default"])({},t.initialCredentials,M)),(!t.clientOnly&&!t.initialCredentials||t.cleanSession)&&(0,S.destroySession)(),n=Promise.resolve((0,E.applyConfig)({dispatch:r,endpoint:e,settings:t}))}return n.then(function(e){return r((0,l.authenticateComplete)(e)),o&&r((0,_.showFirstTimeLoginSuccessModal)()),i&&r((0,_.showPasswordResetSuccessModal)()),e})["catch"](function(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=e.reason;return r((0,l.authenticateError)([t])),o&&r((0,_.showFirstTimeLoginErrorModal)()),i&&r((0,_.showPasswordResetErrorModal)()),Promise.resolve({reason:t})})}}Object.defineProperty(t,"__esModule",{value:!0}),t.STORE_CURRENT_ENDPOINT_KEY=t.SET_ENDPOINT_KEYS=void 0,t.setEndpointKeys=u,t.storeCurrentEndpointKey=i,t.configure=a;var s=r(16),d=o(s),c=r(19),l=(n(c),r(24)),_=r(34),f=r(29),E=r(60),S=r(11),p=r(41),O=o(p),R=r(37),T=o(R),P=r(148),A=t.SET_ENDPOINT_KEYS="SET_ENDPOINT_KEYS",g=t.STORE_CURRENT_ENDPOINT_KEY="STORE_CURRENT_ENDPOINT_KEY"},,,,,function(e,t){e.exports=require("redux-immutablejs")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e){G.authState.currentSettings=e}function i(){return G.authState.currentSettings}function a(e){G.authState.currentEndpoint=e}function s(){return G.authState.currentEndpoint}function d(e){N(K.SAVED_CONFIG_KEY,e||_())}function c(){return C(K.SAVED_CONFIG_KEY)||_()}function l(e){N(K.DEFAULT_CONFIG_KEY,e)}function _(){return C(K.DEFAULT_CONFIG_KEY)}function f(){G.authState=G.authState||{},G.authState.currentSettings={},G.authState.currentEndpoint={},E()}function E(){var e=[K.SAVED_CREDS_KEY,K.SAVED_CONFIG_KEY];for(var t in e)t=e[t],G.localStorage&&G.localStorage.removeItem(t),w["default"].erase(t,{path:G.authState.currentSettings.cookiePath||"/"})}function S(e){return e&&e.replace(/("|')/g,"")}function p(){return S(w["default"].get(K.SAVED_CONFIG_KEY)||G.localStorage&&G.localStorage.getItem(K.SAVED_CONFIG_KEY))}function O(e){var t=e||c();if(t)return t;throw"You must configure redux-auth before use."}function R(e){return s()[O(e)]}function T(e){return""+v(e)+R(e).accountDeletePath}function P(e){return""+v(e)+R(e).signOutPath}function A(e){return""+v(e)+R(e).emailSignInPath}function g(e){return""+v(e)+R(e).emailRegistrationPath+"?config_name="+e}function M(e){return""+v(e)+R(e).passwordResetPath+"?config_name="+e}function I(e){return""+v(e)+R(e).passwordUpdatePath}function h(e){return""+v(e)+R(e).tokenValidationPath}function m(e){var t=e.provider,r=e.params,n=e.endpointKey,o=v(n)+R(n).authProviderPaths[t]+"?auth_origin_url="+encodeURIComponent(G.location.href)+"&config_name="+encodeURIComponent(O(n));if(r)for(var u in r)o+="&",o+=encodeURIComponent(u),o+="=",o+=encodeURIComponent(r[u]);return o}function D(){return G.authState.currentSettings.confirmationSuccessUrl()}function y(){return G.authState.currentSettings.confirmationSuccessUrl()}function v(e){var t=O(e);return G.authState.currentEndpoint[t].apiUrl}function U(){return G.authState.currentSettings.tokenFormat}function b(e){switch(G.authState.currentSettings.storage){case"localStorage":G.localStorage.removeItem(e);break;default:w["default"].erase(e)}}function N(e,t){switch(t=JSON.stringify(t),G.authState.currentSettings.storage){case"localStorage":G.localStorage.setItem(e,t);break;default:w["default"].set(e,t,{expires:G.authState.currentSettings.cookieExpiry,path:G.authState.currentSettings.cookiePath})}}function C(e,t){var r=null;switch(t||G.authState.currentSettings.storage){case"localStorage":r=G.localStorage&&G.localStorage.getItem(e);break;default:r=w["default"].get(e)}try{return JSON.parse(r)}catch(n){return S(r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.setCurrentSettings=u,t.getCurrentSettings=i,t.setCurrentEndpoint=a,t.getCurrentEndpoint=s,t.setCurrentEndpointKey=d,t.getCurrentEndpointKey=c,t.setDefaultEndpointKey=l,t.getDefaultEndpointKey=_,t.resetConfig=f,t.destroySession=E,t.getInitialEndpointKey=p,t.getSessionEndpointKey=O,t.getSessionEndpoint=R,t.getDestroyAccountUrl=T,t.getSignOutUrl=P,t.getEmailSignInUrl=A,t.getEmailSignUpUrl=g,t.getPasswordResetRequestUrl=M,t.getPasswordUpdateUrl=I,t.getTokenValidationPath=h,t.getOAuthUrl=m,t.getConfirmationSuccessUrl=D,t.getPasswordResetRedirectUrl=y,t.getApiUrl=v,t.getTokenFormat=U,t.removeData=b,t.persistData=N,t.retrieveData=C;var L=r(140),w=o(L),j=r(19),K=n(j),G=Function("return this")()||(0,eval)("this");G.authState={currentSettings:{},currentEndpoint:{},defaultEndpointKey:null}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function u(e,t){return Object.assign({},t,{Authorization:"Bearer "+e})}function i(e){if(A(e)){var t=(0,P.retrieveData)(O.SAVED_CREDS_KEY)||{},r={};r["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";for(var n in(0,P.getTokenFormat)())r[n]=t[n];return u(t["access-token"],r)}return{}}function a(e){if(A(e.url)){var t={},r=!0;for(var n in(0,P.getTokenFormat)())t[n]=e.headers.get(n),t[n]&&(r=!1);r||(0,P.persistData)(O.SAVED_CREDS_KEY,t)}return e}function s(e,t){if(A(t)){var r={},n=!0;for(var o in(0,P.getTokenFormat)())r[o]=e.getResponseHeader(o),r[o]&&(n=!1);n||(0,P.persistData)(O.SAVED_CREDS_KEY,r)}return e.response}function d(e,t){return c(e,l,t)}function c(e,t){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];return r.headers||(r.headers={}),(0,T["default"])(r.headers,i(e)),t(e,r).then(function(t){return s(t,e)})}function l(e,t){var r=this;return new Promise(function(n,o){var u=new XMLHttpRequest;u.open(t.method,e),u.onload=function(){u.status>=200&&u.status<300?n(u):o({status:r.status,statusText:u.statusText})},u.onerror=function(){o({status:r.status,statusText:u.statusText})},t.headers&&Object.keys(t.headers).forEach(function(e){u.setRequestHeader(e,t.headers[e])});var i=t.params;i&&"object"===("undefined"==typeof i?"undefined":f(i))&&!i.formData&&(i=_(i)),t.progress&&u.upload.addEventListener("progress",t.progress,!1),i.formData&&(i=i.formData),u.send(i)})}function _(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}Object.defineProperty(t,"__esModule",{value:!0});var f="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.addAuthorizationHeader=u,t["default"]=function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return t.headers||(t.headers={}),(0,T["default"])(t.headers,i(e)),(0,S["default"])(e,t).then(function(e){return a(e)})},t.xhr=d;var E=r(42),S=o(E),p=r(19),O=n(p),R=r(16),T=o(R),P=r(11),A=function(e){return e.match((0,P.getApiUrl)((0,P.getSessionEndpointKey)()))}},,,,function(e,t){e.exports=require("extend")},function(e,t){"use strict";function r(e){var t=e.json();return e.status>=200&&e.status<300?t:t.then(function(e){return Promise.reject(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.parseResponse=r},,function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.INITIAL_CONFIG_KEY="default",t.DEFAULT_CONFIG_KEY="defaultConfigKey",t.SAVED_CONFIG_KEY="currentConfigName",t.SAVED_CREDS_KEY="authHeaders"},,,,,function(e,t){"use strict";function r(){return{type:u}}function n(e){return{type:i,user:e}}function o(e){return{type:a,errors:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.authenticateStart=r,t.authenticateComplete=n,t.authenticateError=o;var u=t.AUTHENTICATE_START="AUTHENTICATE_START",i=t.AUTHENTICATE_COMPLETE="AUTHENTICATE_COMPLETE",a=t.AUTHENTICATE_ERROR="AUTHENTICATE_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,endpoint:t,message:e}}function i(e,t){return{type:S,endpoint:t,errors:e}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getDestroyAccountUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){var n=r.message;t(u(n,e));var o=(0,s.getDefaultEndpointKey)();t((0,c.storeCurrentEndpointKey)(o)),(0,s.setCurrentEndpointKey)(o)})["catch"](function(r){var n=r.errors;return t(i(n,e))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.DESTROY_ACCOUNT_ERROR=t.DESTROY_ACCOUNT_COMPLETE=t.DESTROY_ACCOUNT_START=void 0,t.destroyAccountStart=o,t.destroyAccountComplete=u,t.destroyAccountError=i,t.destroyAccount=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.DESTROY_ACCOUNT_START="DESTROY_ACCOUNT_START",E=t.DESTROY_ACCOUNT_COMPLETE="DESTROY_ACCOUNT_COMPLETE",S=t.DESTROY_ACCOUNT_ERROR="DESTROY_ACCOUNT_ERROR"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:O,endpoint:e,key:t,value:r}}function u(e){return{type:E,endpoint:e}}function i(e,t){return{type:S,user:t,endpoint:e}}function a(e,t){return{type:p,errors:t,endpoint:e}}function s(e,t){return function(r){var n=(0,d.getCurrentEndpointKey)();(0,d.setCurrentEndpointKey)(t);var o=(0,d.getCurrentEndpointKey)();return r((0,c.storeCurrentEndpointKey)(o)),r(u(o)),(0,f["default"])((0,d.getEmailSignInUrl)(o),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify(e)}).then(l.parseResponse).then(function(e){return r(i(o,e))})["catch"](function(e){throw(0,d.setCurrentEndpointKey)(n),r((0,c.storeCurrentEndpointKey)(n)),r(a(o,e)),e})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_IN_FORM_UPDATE=t.EMAIL_SIGN_IN_ERROR=t.EMAIL_SIGN_IN_COMPLETE=t.EMAIL_SIGN_IN_START=void 0,t.emailSignInFormUpdate=o,t.emailSignInStart=u,t.emailSignInComplete=i,t.emailSignInError=a,t.emailSignIn=s;var d=r(11),c=r(5),l=r(17),_=r(12),f=n(_),E=t.EMAIL_SIGN_IN_START="EMAIL_SIGN_IN_START",S=t.EMAIL_SIGN_IN_COMPLETE="EMAIL_SIGN_IN_COMPLETE",p=t.EMAIL_SIGN_IN_ERROR="EMAIL_SIGN_IN_ERROR",O=t.EMAIL_SIGN_IN_FORM_UPDATE="EMAIL_SIGN_IN_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,user:e,endpoint:t}}function a(e,t){return{type:O,errors:e,endpoint:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getEmailSignUpUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{confirm_success_url:(0,d.getConfirmationSuccessUrl)()}))}).then(c.parseResponse).then(function(e){var n=e.data;return r(i(n,t))})["catch"](function(e){var n=e.errors;throw r(a(n,t)),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.EMAIL_SIGN_UP_FORM_UPDATE=t.EMAIL_SIGN_UP_ERROR=t.EMAIL_SIGN_UP_COMPLETE=t.EMAIL_SIGN_UP_START=void 0,t.emailSignUpFormUpdate=o,t.emailSignUpStart=u,t.emailSignUpComplete=i,t.emailSignUpError=a,t.emailSignUp=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.EMAIL_SIGN_UP_START="EMAIL_SIGN_UP_START",p=t.EMAIL_SIGN_UP_COMPLETE="EMAIL_SIGN_UP_COMPLETE",O=t.EMAIL_SIGN_UP_ERROR="EMAIL_SIGN_UP_ERROR",R=t.EMAIL_SIGN_UP_FORM_UPDATE="EMAIL_SIGN_UP_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e,t,r,n,o){if(!n)return new Promise(function(n,o){u(e,t,r,n,o)});var i=void 0;try{i=(0,f.getAllParams)(t.location)}catch(a){}i&&i.uid?(t.close(),(0,E.persistData)(_.SAVED_CREDS_KEY,(0,f.normalizeTokenKeys)(i)),(0,R["default"])((0,E.getTokenValidationPath)(e)).then(p.parseResponse).then(function(e){var t=e.data;return n(t)})["catch"](function(e){var t=e.errors;return o({errors:t})})):t.closed?o({errors:"Authentication was cancelled."}):setTimeout(function(){u(e,t,r,n,o)},0)}function i(e){var t=e.endpointKey,r=e.provider,n=e.url,o=e.tab,i=void 0!==o&&o,a=i?"_blank":r,s=I(r,n,a);return u(t,s,r)}function a(e,t){return{type:A,provider:e,endpoint:t}}function s(e,t){return{type:g,user:e,endpoint:t}}function d(e,t){return{type:M,errors:e,endpoint:t}}function c(e){var t=e.provider,r=e.params,n=e.endpointKey;return function(e){var o=(0,E.getCurrentEndpointKey)();(0,E.setCurrentEndpointKey)(n),e((0,S.storeCurrentEndpointKey)(n));var u=(0,E.getCurrentEndpointKey)();e(a(t,u));var c=(0,E.getOAuthUrl)({provider:t,params:r,currentEndpointKey:u});return i({endpointKey:n,provider:t,url:c}).then(function(t){return e(s(t,u))})["catch"](function(t){var r=t.errors;throw(0,E.setCurrentEndpointKey)(o),e((0,S.storeCurrentEndpointKey)(o)),e(d(r,u)),r})}}Object.defineProperty(t,"__esModule",{value:!0}),t.OAUTH_SIGN_IN_ERROR=t.OAUTH_SIGN_IN_COMPLETE=t.OAUTH_SIGN_IN_START=void 0,t.oAuthSignInStart=a,t.oAuthSignInComplete=s,t.oAuthSignInError=d,t.oAuthSignIn=c;var l=r(19),_=o(l),f=r(37),E=r(11),S=r(5),p=r(17),O=r(12),R=n(O),T=r(61),P=n(T),A=t.OAUTH_SIGN_IN_START="OAUTH_SIGN_IN_START",g=t.OAUTH_SIGN_IN_COMPLETE="OAUTH_SIGN_IN_COMPLETE",M=t.OAUTH_SIGN_IN_ERROR="OAUTH_SIGN_IN_ERROR",I=P["default"]},function(e,t){"use strict";function r(e){var t=e.user,r=e.headers,o=e.mustResetPassword,u=e.firstTimeLogin,i=e.endpointKey;return{type:n,user:t,headers:r,mustResetPassword:o,firstTimeLogin:u,endpointKey:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.ssAuthTokenUpdate=r;var n=t.SS_AUTH_TOKEN_UPDATE="SS_AUTH_TOKEN_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return{type:f,endpoint:e}}function u(e,t){return{type:E,user:t,endpoint:e}}function i(e,t){return{type:S,endpoint:e,errors:t}}function a(e){return function(t){return t(o(e)),(0,_["default"])((0,s.getSignOutUrl)(e),{method:"delete"}).then(d.parseResponse).then(function(r){t(u(e,r)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)()})["catch"](function(r){var n=r.errors;throw t(i(e,n)),t((0,c.storeCurrentEndpointKey)(null)),(0,s.destroySession)(),n})}}Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_OUT_ERROR=t.SIGN_OUT_COMPLETE=t.SIGN_OUT_START=void 0,t.signOutStart=o,t.signOutComplete=u,t.signOutError=i,t.signOut=a;var s=r(11),d=r(17),c=r(5),l=r(12),_=n(l),f=t.SIGN_OUT_START="SIGN_OUT_START",E=t.SIGN_OUT_COMPLETE="SIGN_OUT_COMPLETE",S=t.SIGN_OUT_ERROR="SIGN_OUT_ERROR"},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:R,endpoint:e,key:t,value:r}}function u(e){return{type:S,endpoint:e}}function i(e,t){return{type:p,endpoint:e,message:t}}function a(e,t){return{type:O,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,E["default"])((0,d.getPasswordResetRequestUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"post",body:JSON.stringify((0,_["default"])(e,{redirect_url:(0,d.getPasswordResetRedirectUrl)(t)}))}).then(c.parseResponse).then(function(e){var n=e.message;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.REQUEST_PASSWORD_RESET_FORM_UPDATE=t.REQUEST_PASSWORD_RESET_ERROR=t.REQUEST_PASSWORD_RESET_COMPLETE=t.REQUEST_PASSWORD_RESET_START=void 0,t.requestPasswordResetFormUpdate=o,t.requestPasswordResetStart=u,t.requestPasswordResetComplete=i,t.requestPasswordResetError=a,t.requestPasswordReset=s;var d=r(11),c=r(17),l=r(16),_=n(l),f=r(12),E=n(f),S=t.REQUEST_PASSWORD_RESET_START="REQUEST_PASSWORD_RESET_START",p=t.REQUEST_PASSWORD_RESET_COMPLETE="REQUEST_PASSWORD_RESET_COMPLETE",O=t.REQUEST_PASSWORD_RESET_ERROR="REQUEST_PASSWORD_RESET_ERROR",R=t.REQUEST_PASSWORD_RESET_FORM_UPDATE="REQUEST_PASSWORD_RESET_FORM_UPDATE"},function(e,t){"use strict";function r(){return{type:I}}function n(){return{type:h}}function o(){return{type:m}}function u(){return{type:D}}function i(){return{type:v}}function a(){return{type:y}}function s(){return{type:U}}function d(){return{type:b}}function c(){return{type:N}}function l(){return{type:w}}function _(){return{type:C}}function f(){return{type:L}}function E(){return{type:j}}function S(){return{type:H}}function p(){return{type:K}}function O(){return{type:G}}function R(){return{type:F}}function T(){return{type:W}}function P(){return{type:V}}function A(){return{type:k}}function g(){return{type:Y}}function M(){return{type:q}}Object.defineProperty(t,"__esModule",{value:!0}),t.hideEmailSignInSuccessModal=r,t.hideEmailSignInErrorModal=n,t.hideOAuthSignInSuccessModal=o,t.hideOAuthSignInErrorModal=u,t.hideSignOutSuccessModal=i,t.hideSignOutErrorModal=a,t.hideEmailSignUpSuccessModal=s,t.hideEmailSignUpErrorModal=d,t.showFirstTimeLoginSuccessModal=c,t.showPasswordResetSuccessModal=l,t.hideFirstTimeLoginSuccessModal=_,t.hidePasswordResetSuccessModal=f,t.showFirstTimeLoginErrorModal=E,t.showPasswordResetErrorModal=S,t.hideFirstTimeLoginErrorModal=p,t.hidePasswordResetErrorModal=O,t.hidePasswordResetRequestSuccessModal=R,t.hidePasswordResetRequestErrorModal=T,t.hideUpdatePasswordSuccessModal=P,t.hideUpdatePasswordErrorModal=A,t.hideDestroyAccountSuccessModal=g,t.hideDestroyAccountErrorModal=M;var I=t.HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL="HIDE_EMAIL_SIGN_IN_SUCCESS_MODAL",h=t.HIDE_EMAIL_SIGN_IN_ERROR_MODAL="HIDE_EMAIL_SIGN_IN_ERROR_MODAL",m=t.HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL="HIDE_OAUTH_SIGN_IN_SUCCESS_MODAL",D=t.HIDE_OAUTH_SIGN_IN_ERROR_MODAL="HIDE_OAUTH_SIGN_IN_ERROR_MODAL",y=t.HIDE_SIGN_OUT_ERROR_MODAL="HIDE_SIGN_OUT_ERROR_MODAL",v=t.HIDE_SIGN_OUT_SUCCESS_MODAL="HIDE_SIGN_OUT_SUCCESS_MODAL",U=t.HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL="HIDE_EMAIL_SIGN_UP_SUCCESS_MODAL",b=t.HIDE_EMAIL_SIGN_UP_ERROR_MODAL="HIDE_EMAIL_SIGN_UP_ERROR_MODAL",N=t.SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL="SHOW_FIRST_TIME_LOGIN_SUCCESS_MODAL",C=t.HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL="HIDE_FIRST_TIME_LOGIN_SUCCESS_MODAL",L=t.HIDE_PASSWORD_RESET_SUCCESS_MODAL="HIDE_PASSWORD_RESET_SUCCESS_MODAL",w=t.SHOW_PASSWORD_RESET_SUCCESS_MODAL="SHOW_PASSWORD_RESET_SUCCESS_MODAL",j=t.SHOW_FIRST_TIME_LOGIN_ERROR_MODAL="SHOW_FIRST_TIME_LOGIN_ERROR_MODAL",K=t.HIDE_FIRST_TIME_LOGIN_ERROR_MODAL="HIDE_FIRST_TIME_LOGIN_ERROR_MODAL",G=t.HIDE_PASSWORD_RESET_ERROR_MODAL="HIDE_PASSWORD_RESET_ERROR_MODAL",H=t.SHOW_PASSWORD_RESET_ERROR_MODAL="SHOW_PASSWORD_RESET_ERROR_MODAL",F=t.HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL="HIDE_REQUEST_PASSWORD_RESET_SUCCESS_MODAL",W=t.HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL="HIDE_REQUEST_PASSWORD_RESET_ERROR_MODAL",V=t.HIDE_UPDATE_PASSWORD_SUCCESS_MODAL="HIDE_UPDATE_PASSWORD_SUCCESS_MODAL",k=t.HIDE_UPDATE_PASSWORD_ERROR_MODAL="HIDE_UPDATE_PASSWORD_ERROR_MODAL",Y=t.HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL="HIDE_DESTROY_ACCOUNT_SUCCESS_MODAL",q=t.HIDE_DESTROY_ACCOUNT_ERROR_MODAL="HIDE_DESTROY_ACCOUNT_ERROR_MODAL"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_MODAL_FORM_UPDATE=t.UPDATE_PASSWORD_MODAL_ERROR=t.UPDATE_PASSWORD_MODAL_COMPLETE=t.UPDATE_PASSWORD_MODAL_START=void 0,t.updatePasswordModalFormUpdate=o,t.updatePasswordModalStart=u,t.updatePasswordModalComplete=i,t.updatePasswordModalError=a,t.updatePasswordModal=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_MODAL_START="UPDATE_PASSWORD_MODAL_START",E=t.UPDATE_PASSWORD_MODAL_COMPLETE="UPDATE_PASSWORD_MODAL_COMPLETE",S=t.UPDATE_PASSWORD_MODAL_ERROR="UPDATE_PASSWORD_MODAL_ERROR",p=t.UPDATE_PASSWORD_MODAL_FORM_UPDATE="UPDATE_PASSWORD_MODAL_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,r){return{type:p,endpoint:e,key:t,value:r}}function u(e){return{type:f,endpoint:e}}function i(e,t){return{type:E,endpoint:e,user:t}}function a(e,t){return{type:S,endpoint:e,errors:t}}function s(e,t){return function(r){return r(u(t)),(0,_["default"])((0,d.getPasswordUpdateUrl)(t),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"put",body:JSON.stringify(e)}).then(c.parseResponse).then(function(e){var n=e.user;return r(i(t,n))})["catch"](function(e){var n=e.errors;return r(a(t,n))})}}Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_PASSWORD_FORM_UPDATE=t.UPDATE_PASSWORD_ERROR=t.UPDATE_PASSWORD_COMPLETE=t.UPDATE_PASSWORD_START=void 0,t.updatePasswordFormUpdate=o,t.updatePasswordStart=u,t.updatePasswordComplete=i,t.updatePasswordError=a,t.updatePassword=s;var d=r(11),c=r(17),l=r(12),_=n(l),f=t.UPDATE_PASSWORD_START="UPDATE_PASSWORD_START",E=t.UPDATE_PASSWORD_COMPLETE="UPDATE_PASSWORD_COMPLETE",S=t.UPDATE_PASSWORD_ERROR="UPDATE_PASSWORD_ERROR",p=t.UPDATE_PASSWORD_FORM_UPDATE="UPDATE_PASSWORD_FORM_UPDATE"},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.token&&(e["access-token"]=e.token,delete e.token),e.auth_token&&(e["access-token"]=e.auth_token,delete e.auth_token),e.client_id&&(e.client=e.client_id,delete e.client_id),e.config&&(e.endpointKey=e.config,delete e.config),e}function u(e){return(0,c["default"])({},f(e),_(e))}function i(e){if(e){var t=["access-token","token","auth_token","config","client","client_id","expiry","uid","reset_password","account_confirmation_success"],r=S(e,t),n=p(e,t);return n!==e?{authRedirectHeaders:r,authRedirectPath:n}:{}}return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeTokenKeys=o,t.getAllParams=u,t["default"]=i;var a=r(146),s=n(a),d=r(16),c=n(d),l=function(e){var t=e.anchor||"",r=t.split("?");return r.length>1?r[1]:null},_=function(e){var t=e.search||"",r=t.replace("?",""),n=r?s["default"].parse(r):{};return n},f=function(e){var t=l(e),r=t?s["default"].parse(t):{};return r},E=function(e,t){for(var r in t)delete e[t[r]];return e},S=function(e,t){var r=u(e),n={},i=!0,a=!1,s=void 0;try{for(var d,c=t[Symbol.iterator]();!(i=(d=c.next()).done);i=!0){var l=d.value;n[l]=r[l]}}catch(_){a=!0,s=_}finally{try{!i&&c["return"]&&c["return"]()}finally{if(a)throw s}}return o(n)},p=function(e,t){var r=s["default"].stringify(E(_(e),t)),n=s["default"].stringify(E(f(e),t)),o=(e.hash||"").split("?")[0];r&&(r="?"+r),n&&(o+="?"+n),o&&!o.match(/^#/)&&(o="#/"+o);var u=e.pathname+r+o;return u}},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t["default"]=e,t}function u(e){for(var t in e)return t}function i(e){var t=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if(e.constructor!==Array){t=s.INITIAL_CONFIG_KEY;var r={};r[t]=e,e=[r]}for(var n={},o=0;o=200&&e.status<300?e.json().then(function(e){var t=e.data;return t}):((0,S.removeData)(a.SAVED_CREDS_KEY),Promise.reject({reason:"No credentials."}))}):Promise.reject({reason:"No credentials."})}Object.defineProperty(t,"__esModule",{value:!0}),t.applyConfig=u;var i=r(19),a=o(i),s=r(16),d=n(s),c=r(12),l=n(c),_=r(40),f=n(_),E=r(5),S=r(11),p=Function("return this")()||(0,eval)("this"),O={proxyIf:function(){return!1},proxyUrl:"/proxy",forceHardRedirect:!1,storage:"cookies",cookieExpiry:14,cookiePath:"/",initialCredentials:null,passwordResetSuccessUrl:function(){return p.location.href},confirmationSuccessUrl:function(){return p.location.href},tokenFormat:{"access-token":"{{ access-token }}","token-type":"Bearer",client:"{{ client }}",expiry:"{{ expiry }}",uid:"{{ uid }}"},parseExpiry:function(e){return 1e3*parseInt(e.expiry,10)||null},handleLoginResponse:function(e){return e.data},handleAccountUpdateResponse:function(e){return e.data},handleTokenValidationResponse:function(e){return e.data}}},function(e,t){"use strict";function r(e){var t=e.width,r=e.height,n=window.screenLeft?window.screenLeft:window.screenX,o=window.screenTop?window.screenTop:window.screenY,u=n+window.innerWidth/2-t/2,i=o+window.innerHeight/2-r/2;return{top:i,left:u}}function n(e){switch(e){case"facebook":return{width:580,height:400};case"google":return{width:452,height:633};case"github":return{width:1020,height:618};case"linkedin":return{width:527,height:582};case"twitter":return{width:495,height:645};case"live":return{width:500,height:560};case"yahoo":return{width:559,height:519};default:return{width:1020,height:618}}}function o(e){var t=n(e),o=t.width,u=t.height,i=r({width:o,height:u}),a=i.top,s=i.left;return"width="+o+",height="+u+",top="+a+",left="+s}function u(e,t,r){return window.open(t,r,i+","+o(e))}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=u;var i="scrollbars=no,toolbar=no,location=no,titlebar=no,directories=no,status=no,menubar=no"},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=require("browser-cookies")},function(e,t){e.exports=require("cookie")},,,,,function(e,t){e.exports=require("querystring")},,function(e,t){e.exports=require("react-router-redux")},function(e,t){e.exports=require("url")}])); \ No newline at end of file diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 2bdc9c80..1d294bbb 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -121,7 +121,7 @@ function extendRequesterXhr(url, requester, options={}) { } extend(options.headers, getAuthHeaders(url)); return requester(url, options) - .then(xhrReq => updateAuthCredentials(xhrReq, url)); + .then(xhrReq => updateAuthCredentialsXhr(xhrReq, url)); } function xhrRequest(url, options) { From 45814c1d6915f2b8e6c5ba05a94a2ec17823f2ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Charad?= Date: Mon, 26 Dec 2016 18:19:18 -0300 Subject: [PATCH 14/14] Fixing xhr errors --- src/utils/fetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/fetch.js b/src/utils/fetch.js index 1d294bbb..c6590f52 100644 --- a/src/utils/fetch.js +++ b/src/utils/fetch.js @@ -133,14 +133,14 @@ function xhrRequest(url, options) { resolve(xhrReq); } else { reject({ - status: this.status, + status: xhrReq.status, statusText: xhrReq.statusText }); } }; xhrReq.onerror = () => { reject({ - status: this.status, + status: xhrReq.status, statusText: xhrReq.statusText }); };