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,IACnB3Z,QACbQ,EAAAA,EAAAA,KAAC0Y,EAAAA,EAAQ,CAACO,YAAcxB,GAAwBrV,SAAWA,GAAW8W,MAAQT,GAAe1Y,UACzFC,EAAAA,EAAAA,KAACoN,GAAqB,OAKlC,MAAMgM,GAAsClQ,SAASY,eAAe4L,IAChE0D,KACyCJ,EAAAA,EAAAA,GAAWI,IACnB5Z,QAC7BQ,EAAAA,EAAAA,KAAC0Y,EAAAA,EAAQ,CAACO,YAAcxB,GAAwBrV,SAAWA,GAAW8W,MAAQT,GAAe1Y,UACzFC,EAAAA,EAAAA,KAACkW,GAA2B,OAKxC,MAAMmD,GAAoBnQ,SAASY,eAAe,2BAC9CuP,KACuBL,EAAAA,EAAAA,GAAWK,IACnB7Z,QACXQ,EAAAA,EAAAA,KAAC0Y,EAAAA,EAAQ,CAACO,YAAcxB,GAAwBrV,SAAWA,GAAW8W,MAAQT,GAAe1Y,UACzFC,EAAAA,EAAAA,KAACqW,GAAuB,OAKpC,MAAMiD,GAA4BpQ,SAASY,eAAe,8BACtDwP,KAC2BN,EAAAA,EAAAA,GAAWM,IACnB9Z,QACfQ,EAAAA,EAAAA,KAAC0Y,EAAAA,EAAQ,CAACO,YAAcxB,GAAwBrV,SAAWA,GAAW8W,MAAQT,GAAe1Y,UACzFC,EAAAA,EAAAA,KAAC+N,GAAuB,OAKpC,MAAMwL,GAA6BrQ,SAASY,eAAe,eACvDyP,KACuBP,EAAAA,EAAAA,GAAWO,IACnB/Z,QACXK,EAAAA,EAAAA,MAAC6Y,EAAAA,EAAQ,CAACO,YAAcxB,GAAwBrV,SAAWA,GAAW8W,MAAQT,GAAe1Y,SAAA,EACzFC,EAAAA,EAAAA,KAACiP,GAA4B,IAAE","sources":["webpack://bevspot/./src/main/web/typescript/apps/PublicSite/SignUpAndLoginButtons/SignUpAndLogInButtons.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/utils.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/SignUpAndLoginButtons/actions.ts","webpack://bevspot/./src/main/web/typescript/shared/components/SignUpOrSignIn/EmbeddedSignUpForm/reducers.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/SignUpAndLoginButtons/reducers.ts","webpack://bevspot/./src/main/web/typescript/shared/components/SignUpOrSignIn/SlimCreateRetailerForm/actions.ts","webpack://bevspot/./src/main/web/typescript/shared/components/SignUpOrSignIn/SlimCreateRetailerForm/reducers.ts","webpack://bevspot/./src/main/web/typescript/shared/components/SignUpOrSignIn/EmbeddedSignUpForm/EmbeddedSignUpForm.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/DownloadGate/actions.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/DownloadGate/DownloadGate.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/GetStartedForm/actions.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/GetStartedForm/GetStartedForm.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/GetStartedWithEmail/GetStartedWithEmail.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/PublicSite.tsx","webpack://bevspot/./src/main/web/typescript/shared/components/SignUpOrSignIn/SlimCreateRetailerForm/SlimCreateRetailerForm.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/RetailerOnrampForm/actions.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/RetailerOnrampForm/RetailerOnrampForm.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/UserSignUpForm/UserSignUpForm.tsx","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/UserSignUpForm/actions.ts","webpack://bevspot/./src/main/web/typescript/apps/PublicSite/index.tsx"],"sourcesContent":["import React from 'react';\nimport MediaQuery from 'react-responsive';\n\nimport { MAX_MOBILE_WIDTH, MIN_TABLET_WIDTH } from 'shared/constants';\n\nimport { Button } from 'shared/components/Button';\n\nimport 'shared/css/PublicSite.scss';\n\nexport interface ISignUpAndLogInButtons {\n    onClickSignUp : () => void;\n    onClickLogIn : () => void;\n}\n\nexport class SignUpAndLogInButtons extends React.Component<ISignUpAndLogInButtons, object> {\n    public render() {\n        const {\n            onClickSignUp,\n            onClickLogIn,\n        } = this.props;\n\n        return (\n            <ul className=\"sign-up-and-login-buttons\">\n                <li>\n                    <a className=\"btn bevspot-button bs-psb bs-register button-modal button-default button-secondary\" data-target=\"#modal-schedule-call\">\n                        <span className=\"bevicon bevico-headset\">&nbsp;</span>\n                        <MediaQuery maxWidth={ MAX_MOBILE_WIDTH }>\n                            Chat\n                        </MediaQuery>\n                        <MediaQuery minWidth={ MIN_TABLET_WIDTH }>\n                            Schedule a Chat\n                        </MediaQuery>\n                    </a>\n                </li>\n                <li>\n                    <Button\n                        buttonClassName=\"bs-psb bs-register\"\n                        isDisabled={ false }\n                        isLoading={ false }\n                        onClick={ onClickSignUp }\n                    >\n                        <MediaQuery maxWidth={ MAX_MOBILE_WIDTH }>\n                            Free Trial\n                        </MediaQuery>\n                        <MediaQuery minWidth={ MIN_TABLET_WIDTH }>\n                            Start Free Trial\n                        </MediaQuery>\n                    </Button>\n                </li>\n                <li>\n                    <Button\n                        buttonClassName=\"bs-psb bs-login\"\n                        isDisabled={ false }\n                        isLoading={ false }\n                        onClick={ onClickLogIn }\n                    >\n                        Log In\n                    </Button>\n                </li>\n            </ul>\n        );\n    }\n}\n","import PublicContentModel from 'gen-thrift/public_content_Model_types';\nimport { URLStringUtils } from 'shared/utils/urlStringUtils';\n\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\n\nexport const getPublicContentParameters = (\n    publicContentUrl : string,\n) : { publicContentUrl : PublicContentModel.PublicContentUrl, publicContentUrlParameters : { [k : string] : Array<string> } } => {\n\n    const location = URLStringUtils.getLocation(publicContentUrl);\n\n    if (location) {\n        const hostname : string = location.host;\n        const path : string = location.pathname;\n\n        const queryString : string | undefined = publicContentUrl.split('?')[1];\n        const publicContentUrlParameters : { [k : string] : Array<string> } = queryString ? URLStringUtils.parseQueryString(queryString) : {};\n\n        return {\n            publicContentUrl : new PublicContentModel.PublicContentUrl({\n                hostname,\n                path,\n            }),\n            publicContentUrlParameters,\n        };\n    } else {\n        throw new RuntimeException('Could not parse content url: ' + publicContentUrl);\n    }\n};\n","import { ThunkAction, IAction, IActionCreatorsMapObject } from 'shared/models/IAction';\n\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { IUserAccountInfoReader, UserAccountInfo } from 'api/UserAccount/interfaces/IUserAccountInfoReader';\nimport { IAccountRetailerData } from 'api/UserAccount/model/AccountInfo';\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { UserSessionId } from 'api/UserAccount/model/UserSessionId';\n\nimport { AccountSessionNotFoundException } from 'shared/lib/account/exceptions/AccountSessionNotFoundException';\nimport { UnknownCookieException } from 'shared/lib/cookie/exceptions/UnknownCookieException';\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\n\nimport { IPublicContentViewEventService } from 'api/PublicContent/interfaces/IPublicContentViewEventService';\nimport { PublicContentUrl } from 'api/PublicContent/model/PublicContentUrl';\nimport { PublicContentViewEventTypeEnum } from 'api/PublicContent/model/PublicContentViewEventTypeEnum';\n\nimport { UserAccountManagerImpl } from 'shared/lib/account/impl/UserAccountManagerImpl';\nimport { UserPasswordManagerImpl } from 'shared/lib/account/impl/UserPasswordManagerImpl';\nimport { UserSessionManagerImpl } from 'shared/lib/account/impl/UserSessionManagerImpl';\nimport { ICookieReader } from 'shared/lib/cookie/interfaces/ICookieReader';\nimport { UnauthenticatedUserSessionManagerImpl } from 'shared/lib/unauthenticated_user_session/impl/UnauthenticatedUserSessionManagerImpl';\n\nimport { DjangoApiManager } from 'shared/api/DjangoApiManager';\n\nimport { ISignUpData } from 'shared/components/SignUpOrSignIn/ISignUpData';\n\nimport { ILoggedInUser, ISignUpAndLoginButtonsState, IUserInfo } from './reducers';\n\nimport { Observer } from 'shared/utils/observer';\nimport { getPublicContentParameters } from '../utils';\nimport { BevSpotDispatch } from 'shared/components/Provider';\n\nexport interface ISignUpAndLoginButtonsStore {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n}\n\nexport const ActionTypes = {\n    SET_USER_ICON_POPOVER_IS_SHOWN : 'PUBLIC_SITE/SET_USER_ICON_POPOVER_IS_SHOWN',\n    SET_UNAUTHENTICATED_USER_SESSION_ID : 'PUBLIC_SITE/SET_UNAUTHENTICATED_USER_SESSION_ID',\n    SET_LOGGED_IN_USER : 'PUBLIC_SITE/SET_LOGGED_IN_USER',\n    SET_LOGGED_IN_USER_INFO : 'PUBLIC_SITE/SET_LOGGED_IN_USER_INFO',\n};\n\nexport namespace SignUpAndLoginButtonsActionInterfaces {\n    export interface ISetUserIconPopoverIsShown extends IAction {\n        payload : {\n            isShown : boolean;\n        };\n    }\n\n    export interface ISetLoggedInUser extends IAction {\n        payload : {\n            loggedInUser : null | ILoggedInUser;\n        };\n    }\n\n    export interface ISetLoggedInUserInfo extends IAction {\n        payload : {\n            userInfo : null | IUserInfo;\n        };\n    }\n\n    export interface ISetUnauthenticatedUserSessionId extends IAction {\n        payload : {\n            unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId;\n        };\n    }\n\n    export interface ISignUpAndLoginButtonsActionCreatorsMapObject extends IActionCreatorsMapObject {\n        onMount : () => ThunkAction<void, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}>;\n        onSetUserIconPopoverIsShown : (\n            isShown : boolean,\n        ) => ThunkAction<void, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}>;\n        onSuccessfulSignIn : () => ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}>;\n        onSuccessfulSignUp : (\n            userAccountIdentifier : UserAccountId,\n            signUpData : ISignUpData,\n        ) => ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}>;\n        onLogout : () => ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        cookieReader : ICookieReader;\n        publicContentViewEventService : IPublicContentViewEventService;\n        unauthenticatedUserSessionManager : UnauthenticatedUserSessionManagerImpl;\n        userSessionManager : UserSessionManagerImpl;\n        userAccountInfoReader : IUserAccountInfoReader;\n        userAccountManager : UserAccountManagerImpl;\n        userPasswordManager : UserPasswordManagerImpl;\n        djangoApiManager : DjangoApiManager;\n    }\n}\n\nexport type SignUpAndLoginDispatch = BevSpotDispatch<ISignUpAndLoginButtonsStore, { services: SignUpAndLoginButtonsActionInterfaces.IServices }>\n\nconst setUnauthenticatedUserSessionId = (\n    unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId,\n) : SignUpAndLoginButtonsActionInterfaces.ISetUnauthenticatedUserSessionId => ({\n    payload : {\n        unauthenticatedUserSessionId,\n    },\n    type : ActionTypes.SET_UNAUTHENTICATED_USER_SESSION_ID,\n});\n\nconst setLoggedInUser = (\n    loggedInUser : null | ILoggedInUser,\n) : SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUser => ({\n    payload : {\n        loggedInUser,\n    },\n    type : ActionTypes.SET_LOGGED_IN_USER,\n});\n\nconst setLoggedInUserInfo = (\n    userInfo : null | IUserInfo,\n) : SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUserInfo => ({\n    payload : {\n        userInfo,\n    },\n    type : ActionTypes.SET_LOGGED_IN_USER_INFO,\n});\n\nconst setUserIconPopoverIsShown = (\n    isShown : boolean,\n) : SignUpAndLoginButtonsActionInterfaces.ISetUserIconPopoverIsShown => ({\n    payload : {\n        isShown,\n    },\n    type : ActionTypes.SET_USER_ICON_POPOVER_IS_SHOWN,\n});\n\nconst getLoggedInUserIdAndUserInfo = (\n    authenticatedUserSessionId : UserSessionId\n) : ThunkAction<Promise<void | SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUserInfo>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void | SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUserInfo> => {\n        return (extraArguments.services.userSessionManager.getAccountId()\n        .then((userId : UserAccountId) => {\n            dispatch(setLoggedInUser({\n                userId,\n                authenticatedUserSessionId,\n                userInfo: null,\n            }));\n\n            return extraArguments.services.userAccountInfoReader.getAccountInfo(userId)\n            .then((accountInfo : UserAccountInfo) => {\n                return extraArguments.services.userAccountInfoReader.getAccountRetailers(userId)\n                .then((retailers : IAccountRetailerData) => {\n                    return dispatch(setLoggedInUserInfo({\n                        firstName: accountInfo.firstName,\n                        lastName: accountInfo.lastName,\n                        emailAddress : accountInfo.emailAddress,\n                        phoneNumber : accountInfo.phoneNumber,\n                        hasAccessibleRetailers : (retailers.retailerIds.length > 0),\n                    }));\n                });\n            });\n        }));\n    };\n};\n\nconst onMount = () : ThunkAction<void, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        let authenticatedUserSessionId : UserSessionId | null = null;\n        try {\n            authenticatedUserSessionId = extraArguments.services.userSessionManager.getSessionId();\n        } catch (error) {\n            if (!(error instanceof AccountSessionNotFoundException)) {\n                throw error;\n            }\n        }\n\n        const publicContentParameters = getPublicContentParameters(window.location.href);\n\n        extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId()\n        .then((unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId) => {\n            dispatch(setUnauthenticatedUserSessionId(unauthenticatedUserSessionId));\n            return unauthenticatedUserSessionId;\n        })\n        .then((unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId) => {\n            if (authenticatedUserSessionId === null) {\n                dispatch(setLoggedInUser(null));\n                Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n                Observer.observePageView();\n\n                void extraArguments.services.publicContentViewEventService.createPublicContentViewEventForUnauthenticatedSession(\n                    unauthenticatedUserSessionId,\n                    PublicContentViewEventTypeEnum.PAGE_VIEW,\n                    new PublicContentUrl('www.bevspot.com', window.location.pathname),\n                    publicContentParameters.publicContentUrlParameters,\n                    document.referrer,\n                );\n            } else {\n                void dispatch(getLoggedInUserIdAndUserInfo(authenticatedUserSessionId))\n                .then(() => {\n                    const loggedInUser : ILoggedInUser | null | undefined = getState().signUpAndLoginButtonsState.loggedInUser;\n                    if (!loggedInUser) {\n                        throw new RuntimeException();\n                    }\n\n                    const userId : UserAccountId = loggedInUser.userId;\n                    const userInfo : IUserInfo = loggedInUser.userInfo as IUserInfo;\n                    Observer.identifyAuthenticated(userId, userInfo.firstName + ' ' + userInfo.lastName, null, null); // TODO: no email in this context\n                    Observer.observePageView();\n                });\n\n                void extraArguments.services.publicContentViewEventService.createPublicContentViewEventForAuthenticatedSession(\n                    authenticatedUserSessionId,\n                    PublicContentViewEventTypeEnum.PAGE_VIEW,\n                    new PublicContentUrl('www.bevspot.com', window.location.pathname),\n                    publicContentParameters.publicContentUrlParameters,\n                    document.referrer,\n                );\n            }\n        })\n        .catch((error) => {\n            throw error;\n        });\n    };\n};\n\nconst onSetUserIconPopoverIsShown = (\n    isShown : boolean,\n) : ThunkAction<void, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        dispatch(setUserIconPopoverIsShown(isShown));\n    };\n};\n\nconst onSuccessfulSignIn = () : ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        return Promise.resolve().then(() => {\n            let authenticatedUserSessionId : UserSessionId | null = null;\n            try {\n                authenticatedUserSessionId = extraArguments.services.userSessionManager.getSessionId();\n            } catch (error) {\n                if (!(error instanceof AccountSessionNotFoundException)) {\n                    throw error;\n                }\n            }\n\n            if (authenticatedUserSessionId === null) {\n                throw new RuntimeException('authenticatedUserSessionId unexpectedly null');\n            }\n\n            const publicContentParameters = getPublicContentParameters(window.location.href);\n\n            // TODO: the analytics calls below are unawaited, and the caller redirects to the dashboard as soon as this thunk resolves,\n            // so the page-view event and the identify/login analytics may be cut off. Decide whether they should block the redirect.\n            void extraArguments.services.publicContentViewEventService.createPublicContentViewEventForAuthenticatedSession(\n                authenticatedUserSessionId,\n                PublicContentViewEventTypeEnum.PAGE_VIEW,\n                new PublicContentUrl('www.bevspot.com', window.location.pathname),\n                publicContentParameters.publicContentUrlParameters,\n                document.referrer,\n            );\n\n            void dispatch(getLoggedInUserIdAndUserInfo(authenticatedUserSessionId))\n            .then(() => {\n                const loggedInUser : ILoggedInUser | null | undefined = getState().signUpAndLoginButtonsState.loggedInUser;\n                if (!loggedInUser) {\n                    throw new RuntimeException();\n                }\n\n                const userId : UserAccountId = loggedInUser.userId;\n                const userInfo : IUserInfo = loggedInUser.userInfo as IUserInfo;\n                Observer.identifyAuthenticated(userId, userInfo.firstName + ' ' + userInfo.lastName, null, null);\n                void Observer.observeAction('Logged into account', {});\n                Observer.observePageView();\n            });\n        });\n    };\n};\n\nconst onSuccessfulSignUp = (\n    userAccountIdentifier : UserAccountId,\n    signUpData : ISignUpData,\n) : ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        let hubspotCookie : string | null = null;\n        try {\n            hubspotCookie = extraArguments.services.cookieReader.getCookie('hubspotutk');\n        } catch (error) {\n            if (!(error instanceof UnknownCookieException)) {\n                throw error;\n            }\n        }\n\n        return Promise.all([\n            extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId(),\n            Observer.trackConversion.userCreated({\n                email: signUpData.emailAddress,\n                phone: signUpData.phone,\n                bar_name: signUpData.barName,\n                first_name: signUpData.firstName,\n                last_name: signUpData.lastName,\n                zip_code: signUpData.optionalZipCode,\n                subscribe_to_blog: signUpData.subscribeToBlog,\n                hubspot_cookie : hubspotCookie,\n                is_admin_created: false,\n                source_url: window.location.href,\n                should_receive_marketing: true,\n                creator_user_id: null,\n                retailer_id: null,\n            })\n        ])\n        .then((result) => {\n            const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId = result[0];\n            const userFullName = signUpData.firstName + ' ' + signUpData.lastName;\n            Observer.identifyAuthenticated(userAccountIdentifier, userFullName, signUpData.emailAddress, null);\n            void Observer.observeAction('New User Account Created', {\n                referrer: document.referrer,\n                page: window.location.pathname,\n                unauthenticatedUserSessionId: unauthenticatedUserSessionId.value,\n            });\n\n            Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n            void Observer.observeAction('Clicked button to submit sign up form', {});\n            void Observer.observeAction('Successfully Submitted Sign Up Form', {\n                userAccountId: userAccountIdentifier.getValue(),\n            });\n        });\n    };\n};\n\nconst onLogout = () : ThunkAction<Promise<void>, ISignUpAndLoginButtonsStore, {services : SignUpAndLoginButtonsActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        void Observer.observeAction('User logged out', {});\n\n        return extraArguments.services.userSessionManager.terminateSession()\n        .then(() => {\n            dispatch(onSetUserIconPopoverIsShown(false));\n            dispatch(setLoggedInUser(null));\n            const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId | null = getState().signUpAndLoginButtonsState.unauthenticatedUserSessionId;\n            if (!unauthenticatedUserSessionId) {\n                throw new RuntimeException();\n            }\n\n            Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n            Observer.observePageView();\n        });\n    };\n};\n\nexport const SignUpAndLoginButtonsActions : SignUpAndLoginButtonsActionInterfaces.ISignUpAndLoginButtonsActionCreatorsMapObject = {\n    onMount,\n    onSetUserIconPopoverIsShown,\n    onSuccessfulSignIn,\n    onSuccessfulSignUp,\n    onLogout,\n};\n","import { combineReducers } from '@reduxjs/toolkit';\n\nimport { ISignUpFormState, SignUpFormReducers } from '../SignUpForm/reducers';\nimport { IThanksForRegisteringState, ThanksForRegisteringReducers } from '../ThanksForRegistering/reducers';\n\nexport const EmbeddedSignUpFormReducers = combineReducers({\n    signUpForm: SignUpFormReducers,\n    thanksForRegistering: ThanksForRegisteringReducers,\n});\n\nexport interface IEmbeddedSignUpFormState {\n    signUpForm : ISignUpFormState;\n    thanksForRegistering : IThanksForRegisteringState;\n}\n","import merge from 'lodash/merge';\nimport { Action } from '@reduxjs/toolkit';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { UserSessionId } from 'api/UserAccount/model/UserSessionId';\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { ActionTypes, SignUpAndLoginButtonsActionInterfaces } from './actions';\n\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\n\nexport interface IUserInfo {\n    firstName : string;\n    lastName : string;\n    emailAddress : string;\n    phoneNumber : string | null;\n    hasAccessibleRetailers : boolean;\n}\n\nexport interface ILoggedInUser {\n    userInfo : null | IUserInfo;\n    authenticatedUserSessionId : UserSessionId;\n    userId : UserAccountId;\n}\n\nexport interface ISignUpAndLoginButtonsState {\n    loggedInUser : null | undefined | ILoggedInUser;\n    userIconPopoverIsShown : boolean;\n    unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId | null;\n}\n\nconst publicSiteInitialState : ISignUpAndLoginButtonsState = {\n    loggedInUser: undefined,\n    userIconPopoverIsShown: false,\n    unauthenticatedUserSessionId: null,\n};\n\nconst reduceSetUnauthenticatedUserSessionId = (\n    state : ISignUpAndLoginButtonsState,\n    action : SignUpAndLoginButtonsActionInterfaces.ISetUnauthenticatedUserSessionId\n) : ISignUpAndLoginButtonsState => {\n    const updates = {\n        unauthenticatedUserSessionId : action.payload.unauthenticatedUserSessionId,\n    };\n\n    return merge({}, state, updates);\n};\n\nconst reduceSetLoggedInUser = (\n    state : ISignUpAndLoginButtonsState,\n    action : SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUser\n) : ISignUpAndLoginButtonsState => {\n    const updates = {\n        loggedInUser : action.payload.loggedInUser,\n    };\n\n    return merge({}, state, updates);\n};\n\nconst reduceSetLoggedInUserInfo = (\n    state : ISignUpAndLoginButtonsState,\n    action : SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUserInfo\n) : ISignUpAndLoginButtonsState => {\n\n    if ((typeof state.loggedInUser === 'undefined') || state.loggedInUser === null) {\n        throw new RuntimeException('loggedInUser unexpectedly not set');\n    }\n\n    const updates = {\n        loggedInUser : {\n            userInfo : action.payload.userInfo,\n        }\n    };\n\n    return merge({}, state, updates);\n};\n\nconst reduceSetUserIconPopoverIsShown = (\n    state : ISignUpAndLoginButtonsState,\n    action : SignUpAndLoginButtonsActionInterfaces.ISetUserIconPopoverIsShown\n) : ISignUpAndLoginButtonsState => {\n    const updates = {\n        userIconPopoverIsShown : action.payload.isShown,\n    };\n\n    return merge({}, state, updates);\n};\n\nexport const SignUpAndLoginButtonsReducers = (\n    state : ISignUpAndLoginButtonsState = publicSiteInitialState,\n    action : Action,\n) : ISignUpAndLoginButtonsState => {\n    switch (action.type) {\n        case ActionTypes.SET_UNAUTHENTICATED_USER_SESSION_ID:\n            return reduceSetUnauthenticatedUserSessionId(state, action as SignUpAndLoginButtonsActionInterfaces.ISetUnauthenticatedUserSessionId);\n        case ActionTypes.SET_LOGGED_IN_USER:\n            return reduceSetLoggedInUser(state, action as SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUser);\n        case ActionTypes.SET_LOGGED_IN_USER_INFO:\n            return reduceSetLoggedInUserInfo(state, action as SignUpAndLoginButtonsActionInterfaces.ISetLoggedInUserInfo);\n        case ActionTypes.SET_USER_ICON_POPOVER_IS_SHOWN:\n            return reduceSetUserIconPopoverIsShown(state, action as SignUpAndLoginButtonsActionInterfaces.ISetUserIconPopoverIsShown);\n        default:\n            return state;\n    }\n};\n","import { ThunkAction, IAction, IActionCreatorsMapObject } from 'shared/models/IAction';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { UserSessionId } from 'api/UserAccount/model/UserSessionId';\n\nimport { validateValueByFieldName } from '../utils';\n\nimport { ISlimCreateRetailerFormState, SlimCreateRetailerFormFieldName } from './reducers';\n\nimport { AddressFormFieldName } from 'shared/components/AddressForm/AddressForm';\nimport { IValidationInputData } from 'shared/components/ValidationInput';\nimport { UserAccountManagerImpl } from 'shared/lib/account/impl/UserAccountManagerImpl';\nimport { IAccountSessionReader } from 'shared/lib/account/interfaces/IAccountSessionReader';\n\nexport interface ISlimCreateRetailerFormStore {\n    SlimCreateRetailerFormState : ISlimCreateRetailerFormState;\n}\n\nexport const ActionTypes = {\n    SET_FORM_FIELD_VALIDATION_DATA : 'SIGN_UP_FORM/SET_FORM_FIELD_VALIDATION_DATA',\n    SET_FORM_VALIDATION_DATA : 'SIGN_UP_FORM/SET_FORM_VALIDATION_DATA',\n    SET_IS_SUBMITTING : 'SIGN_UP_FORM/SET_IS_SUBMITTING',\n    SET_HAS_SUCCESSFULLY_SUBMITTED : 'SIGN_UP_FORM/SET_HAS_SUCCESSFULLY_SUBMITTED',\n};\n\nexport namespace SlimCreateRetailerFormActionInterfaces {\n    export interface ISetFormFieldValidationData extends IAction {\n        payload : {\n            field : SlimCreateRetailerFormFieldName;\n            value : string | boolean;\n            isValid : boolean;\n            errorMessage : string;\n        };\n    }\n\n    export interface ISetFormValidationData extends IAction {\n        payload : {\n            isValid : boolean;\n            errorMessage : string;\n        };\n    }\n\n    export interface ISetIsSubmitting extends IAction {\n        payload : {\n            isSubmitting : boolean;\n        };\n    }\n\n    export interface ISetHasSuccessfullySubmitted extends IAction {\n        payload : {\n            hasSuccessfullySubmitted : boolean;\n        };\n    }\n\n    export interface ISlimCreateRetailerFormActionCreatorsMapObject extends IActionCreatorsMapObject {\n        onFormFieldChange : (\n            field : SlimCreateRetailerFormFieldName,\n            value : string | boolean\n        ) => ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n        onFormFieldBlur : (\n            field : SlimCreateRetailerFormFieldName,\n            value : string | boolean,\n        ) => ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n        onSetHasSuccessfullySubmitted : (\n            hasSuccessfullySubmitted : boolean,\n        ) => ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n        onResetForm : () => ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n        onSubmit : (\n            formState : ISlimCreateRetailerFormState,\n        ) => ThunkAction<Promise<boolean>, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n        onSetAddressFormField : (\n            fieldName : AddressFormFieldName,\n            validationInputData : IValidationInputData\n        ) => ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        userAccountManager : UserAccountManagerImpl;\n        userSessionReader : IAccountSessionReader<UserSessionId, UserAccountId>;\n    }\n}\n\nconst setFormFieldValidationData = (\n    field : SlimCreateRetailerFormFieldName,\n    value : string | boolean,\n    isValid : boolean,\n    errorMessage : string\n) : SlimCreateRetailerFormActionInterfaces.ISetFormFieldValidationData => ({\n    payload : {\n        field,\n        value,\n        isValid,\n        errorMessage,\n    },\n    type : ActionTypes.SET_FORM_FIELD_VALIDATION_DATA,\n});\n\nconst setFormValidationData = (\n    isValid : boolean,\n    errorMessage : string\n) : SlimCreateRetailerFormActionInterfaces.ISetFormValidationData => ({\n    payload : {\n        isValid,\n        errorMessage,\n    },\n    type : ActionTypes.SET_FORM_VALIDATION_DATA,\n});\n\nconst setIsSubmitting = (\n    isSubmitting : boolean\n) : SlimCreateRetailerFormActionInterfaces.ISetIsSubmitting => ({\n    payload : {\n        isSubmitting,\n    },\n    type : ActionTypes.SET_IS_SUBMITTING,\n});\n\nconst setHasSuccessfullySubmitted = (\n    hasSuccessfullySubmitted : boolean\n) : SlimCreateRetailerFormActionInterfaces.ISetHasSuccessfullySubmitted => ({\n    payload : {\n        hasSuccessfullySubmitted,\n    },\n    type : ActionTypes.SET_HAS_SUCCESSFULLY_SUBMITTED,\n});\n\nconst onFormFieldChange = (\n    field : SlimCreateRetailerFormFieldName,\n    value : string | boolean,\n) : ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        const validationResult = validateValueByFieldName(field, value as string, null);\n        dispatch(setFormFieldValidationData(field, value, validationResult.isValid, validationResult.errorMessage));\n    };\n};\n\nconst onFormFieldBlur = (\n    field : SlimCreateRetailerFormFieldName,\n    value : string | boolean,\n) : ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        const validationResult = validateValueByFieldName(field, value as string, null);\n        dispatch(setFormFieldValidationData(field, value, validationResult.isValid, validationResult.errorMessage));\n    };\n};\n\n// this is just the validation step\nconst onSubmit = (\n    formState : ISlimCreateRetailerFormState,\n) : ThunkAction<Promise<boolean>, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<boolean> => {\n        const validationInputDataByFieldName = formState.validationInputDataByFieldName;\n        let formIsValid = true;\n\n        Object.keys(validationInputDataByFieldName).forEach((key) => {\n            const fieldName = key as SlimCreateRetailerFormFieldName;\n            const fieldValue = (validationInputDataByFieldName)[fieldName].value;\n\n            const validationResult = validateValueByFieldName(fieldName, fieldValue, null);\n\n            const { isValid, errorMessage } = validationResult;\n            formIsValid = formIsValid && isValid;\n\n            dispatch(setFormFieldValidationData(fieldName, fieldValue, isValid, errorMessage));\n        });\n\n        if (formIsValid) {\n            dispatch(setFormValidationData(true, ''));\n            dispatch(setIsSubmitting(true));\n\n            return Promise.resolve(true);\n        } else {\n            dispatch(setFormValidationData(false, 'Please correctly fill in the form fields.'));\n        }\n\n        return Promise.resolve(false);\n    };\n};\n\nconst onSetHasSuccessfullySubmitted = (\n    hasSuccessfullySubmitted : boolean,\n) : ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        dispatch(setHasSuccessfullySubmitted(hasSuccessfullySubmitted));\n    };\n};\n\nconst onSetAddressFormField = (fieldName : AddressFormFieldName, validationInputData : IValidationInputData): ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        dispatch(setFormFieldValidationData(fieldName, validationInputData.value, validationInputData.isValid, validationInputData.errorMessage));\n    };\n};\n\nconst onResetForm = () : ThunkAction<void, ISlimCreateRetailerFormStore, {services : SlimCreateRetailerFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        const validationInputDataByFieldName = getState().SlimCreateRetailerFormState.validationInputDataByFieldName;\n\n        Object.keys(validationInputDataByFieldName).forEach((fieldNameValue) => {\n            const fieldName = fieldNameValue as SlimCreateRetailerFormFieldName;\n            dispatch(setFormFieldValidationData(fieldName, '', true, ''));\n        });\n\n        dispatch(setIsSubmitting(false));\n    };\n};\n\nexport const SlimCreateRetailerFormActions : SlimCreateRetailerFormActionInterfaces.ISlimCreateRetailerFormActionCreatorsMapObject = {\n    onFormFieldChange,\n    onFormFieldBlur,\n    onSetAddressFormField,\n    onResetForm,\n    onSetHasSuccessfullySubmitted,\n    onSubmit,\n};\n","import merge from 'lodash/merge';\nimport { Action } from '@reduxjs/toolkit';\n\nimport { ActionTypes, SlimCreateRetailerFormActionInterfaces } from './actions';\n\nimport { AddressFormFieldName } from 'shared/components/AddressForm/AddressForm';\nimport { IValidationInputData } from '../../ValidationInput';\n\nexport type SlimCreateRetailerFormFieldName = 'retailerName' | AddressFormFieldName;\n\nexport interface ISlimCreateRetailerFormState {\n    validationInputDataByFieldName : {[fieldName in SlimCreateRetailerFormFieldName] : IValidationInputData};\n    isValid : boolean;\n    errorMessage : string;\n    isSubmitting : boolean;\n    // hasSuccessfullySubmitted : boolean;\n}\n\nconst SlimCreateRetailerFormInitialState : ISlimCreateRetailerFormState = {\n    validationInputDataByFieldName : {\n        retailerName : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        },\n        country : {\n            value: 'US', // is it ok if this is default?\n            isValid: true,\n            errorMessage: '',\n        },\n        city : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        },\n        state : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        },\n        streetAddressLine1 : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        },\n        streetAddressLine2 : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        },\n        zipCode : {\n            value: '',\n            isValid: true,\n            errorMessage: '',\n        }\n    },\n    isValid: true,\n    errorMessage: '',\n    isSubmitting: false,\n    // hasSuccessfullySubmitted: false,\n};\n\nconst reduceSetFormFieldValidationData = (\n    state : ISlimCreateRetailerFormState,\n    action : SlimCreateRetailerFormActionInterfaces.ISetFormFieldValidationData\n) : ISlimCreateRetailerFormState => {\n    const updates = {\n        validationInputDataByFieldName: {\n            [action.payload.field]: {\n                value : action.payload.value,\n                errorMessage : action.payload.errorMessage,\n                isValid : action.payload.isValid,\n            },\n        },\n    };\n\n    return merge({}, state, updates);\n};\n\nconst reduceSetFormValidationData = (\n    state : ISlimCreateRetailerFormState,\n    action : SlimCreateRetailerFormActionInterfaces.ISetFormValidationData\n) : ISlimCreateRetailerFormState => {\n    const updates = {\n        isValid: action.payload.isValid,\n        errorMessage: action.payload.errorMessage,\n    };\n\n    return merge({}, state, updates);\n};\n\nconst reduceSetIsSubmitting = (\n    state : ISlimCreateRetailerFormState,\n    action : SlimCreateRetailerFormActionInterfaces.ISetIsSubmitting\n) : ISlimCreateRetailerFormState => {\n    const updates = {\n        isSubmitting: action.payload.isSubmitting,\n    };\n\n    return merge({}, state, updates);\n};\n\n// const reduceSetHasSuccessfullySubmitted = (\n//     state : ISlimCreateRetailerFormState,\n//     action : SlimCreateRetailerFormActionInterfaces.ISetHasSuccessfullySubmitted\n// ) : ISlimCreateRetailerFormState => {\n//     const updates = {\n//         hasSuccessfullySubmitted: action.payload.hasSuccessfullySubmitted\n//     };\n\n//     return merge({}, state, updates);\n// };\n\nexport const SlimCreateRetailerFormReducers = (\n    state : ISlimCreateRetailerFormState = SlimCreateRetailerFormInitialState,\n    action : Action,\n) : ISlimCreateRetailerFormState => {\n    switch (action.type) {\n        case ActionTypes.SET_FORM_FIELD_VALIDATION_DATA:\n            return reduceSetFormFieldValidationData(state, action as SlimCreateRetailerFormActionInterfaces.ISetFormFieldValidationData);\n        case ActionTypes.SET_FORM_VALIDATION_DATA:\n            return reduceSetFormValidationData(state, action as SlimCreateRetailerFormActionInterfaces.ISetFormValidationData);\n        case ActionTypes.SET_IS_SUBMITTING:\n            return reduceSetIsSubmitting(state, action as SlimCreateRetailerFormActionInterfaces.ISetIsSubmitting);\n        // case ActionTypes.SET_HAS_SUCCESSFULLY_SUBMITTED:\n        //     return reduceSetHasSuccessfullySubmitted(state, action as SlimCreateRetailerFormActionInterfaces.ISetHasSuccessfullySubmitted);\n        default:\n            return state;\n    }\n};\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { SignUpForm } from '../SignUpForm/SignUpForm';\nimport { ThanksForRegistering } from '../ThanksForRegistering/ThanksForRegistering';\n\nimport { ISignUpFormState, signUpFormFieldName } from '../SignUpForm/reducers';\n\nimport { SignUpFormActions, SignUpFormDispatch } from '../SignUpForm/actions';\nimport { ThanksForRegisteringActions, ThanksForRegisteringDispatch } from '../ThanksForRegistering/actions';\nimport { IEmbeddedSignUpFormState } from './reducers';\n\nimport { AddressFormFieldName } from 'shared/components/AddressForm/AddressForm';\nimport { IValidationInputData } from 'shared/components/ValidationInput';\n\nimport 'shared/css/EmbeddedSignUpForm.scss';\n\nexport interface IEmbeddedSignUpFormProps {\n    embeddedSignUpFormState : IEmbeddedSignUpFormState;\n    additionalFieldsAreShown : boolean;\n    additionalRetailerFieldsAreRequired : boolean;\n    onSuccessfulSignUp : (userAccountIdentifier : UserAccountId, signUpFormState : ISignUpFormState) => Promise<void>;\n}\n\nexport interface IBoundEmbeddedSignUpFormProps extends IEmbeddedSignUpFormProps {\n    dispatch : ThanksForRegisteringDispatch & SignUpFormDispatch;\n}\n\nexport class EmbeddedSignUpForm extends React.Component<IBoundEmbeddedSignUpFormProps, object> {\n\n    public render() {\n        const {\n            dispatch,\n            embeddedSignUpFormState,\n            additionalFieldsAreShown,\n            additionalRetailerFieldsAreRequired,\n            onSuccessfulSignUp,\n        } = this.props;\n\n        const getRenderedComponent = () : JSX.Element | null => {\n            if (embeddedSignUpFormState.signUpForm.hasSuccessfullySubmitted) {\n                const onSendEmailAgainClick = () => {\n                    dispatch(ThanksForRegisteringActions.onResendEmail(embeddedSignUpFormState.signUpForm.validationInputDataByFieldName.emailAddress.value));\n                };\n                const onCloseButtonClick = () => {\n                    return;\n                };\n\n                return (\n                    <ThanksForRegistering\n                        isEmbeddedInModal={ false }\n                        onSendEmailAgainClick={ onSendEmailAgainClick }\n                        onCloseButtonClick={ onCloseButtonClick }\n                        isResendingEmail={ embeddedSignUpFormState.thanksForRegistering.isResendingEmail }\n                        isEmailResent={ embeddedSignUpFormState.thanksForRegistering.isEmailResent }\n                    />\n                );\n            } else {\n                const onFormFieldChange = (field : signUpFormFieldName, value : string | boolean) => {\n                    return dispatch(SignUpFormActions.onFormFieldChange(field, value));\n                };\n\n                const onFormFieldBlur = (field : signUpFormFieldName, value : string | boolean) => {\n                    return dispatch(SignUpFormActions.onFormFieldBlur(field, value));\n                };\n\n                const setAddressFormField = (fieldName : AddressFormFieldName, validationInputData : IValidationInputData) => {\n                    return dispatch(SignUpFormActions.onSetAddressFormField(fieldName, validationInputData));\n                };\n\n                const onSubmit = () => {\n                    // if needing retailer fields, need to create session\n                    void dispatch(SignUpFormActions.onSubmit(embeddedSignUpFormState.signUpForm, additionalFieldsAreShown, additionalRetailerFieldsAreRequired, additionalRetailerFieldsAreRequired))\n                    .then((userAccountIdentifier : UserAccountId | void) => {\n                        if (userAccountIdentifier) {\n                            void onSuccessfulSignUp(userAccountIdentifier, embeddedSignUpFormState.signUpForm)\n                            .then(() => {\n                                dispatch(SignUpFormActions.onSetHasSuccessfullySubmitted(true));\n                            });\n                        }\n                    });\n                };\n\n                return (\n                    <div className=\"embedded-sign-up-form\">\n                        <SignUpForm\n                            headerTitle={ null }\n                            headerMessage={ null }\n                            signUpFormState={ embeddedSignUpFormState.signUpForm }\n                            onFormFieldChange={ onFormFieldChange }\n                            onFormFieldBlur={ onFormFieldBlur }\n                            additionalUserFieldsAreShown={ additionalFieldsAreShown }\n                            additionalRetailerFieldsAreShown={ additionalFieldsAreShown }\n                            additionalRetailerFieldsAreRequired={ additionalRetailerFieldsAreRequired }\n                            submitButtonContents=\"JOIN BEVSPOT\"\n                            onSubmit={ onSubmit }\n                            setAddressFormField={ setAddressFormField }\n                        />\n                    </div>\n                );\n            }\n        };\n\n        return getRenderedComponent();\n    }\n}\n\nexport interface IConnectedEmbeddedSignUpFormProps {\n    additionalFieldsAreShown : boolean;\n    additionalRetailerFieldsAreRequired : boolean;\n    onSuccessfulSignUp : (userAccountIdentifier : UserAccountId, signUpFormState : ISignUpFormState) => Promise<void>;\n}\n\ninterface IState {\n    embeddedSignUpFormState : IEmbeddedSignUpFormState;\n}\nconst mapStateToProps = (state : IState, ownProps : IConnectedEmbeddedSignUpFormProps) : IEmbeddedSignUpFormProps => {\n    return {\n        embeddedSignUpFormState : state.embeddedSignUpFormState,\n        additionalFieldsAreShown : ownProps.additionalFieldsAreShown,\n        additionalRetailerFieldsAreRequired: ownProps.additionalRetailerFieldsAreRequired,\n        onSuccessfulSignUp : ownProps.onSuccessfulSignUp,\n    };\n};\n\nexport const ConnectedEmbeddedSignUpForm = connect<IEmbeddedSignUpFormProps, object, IConnectedEmbeddedSignUpFormProps, IState>(mapStateToProps)(EmbeddedSignUpForm);\n","import { ThunkAction, IActionCreatorsMapObject } from 'shared/models/IAction';\n\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { IPublicContentViewEventService } from 'api/PublicContent/interfaces/IPublicContentViewEventService';\nimport { PublicContentUrl } from 'api/PublicContent/model/PublicContentUrl';\nimport { PublicContentViewEventTypeEnum } from 'api/PublicContent/model/PublicContentViewEventTypeEnum';\nimport { IUserAccountInfoReader } from 'api/UserAccount/interfaces/IUserAccountInfoReader';\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { UserAccountManagerImpl } from 'shared/lib/account/impl/UserAccountManagerImpl';\nimport { UserPasswordManagerImpl } from 'shared/lib/account/impl/UserPasswordManagerImpl';\nimport { UserSessionManagerImpl } from 'shared/lib/account/impl/UserSessionManagerImpl';\nimport { UnknownCookieException } from 'shared/lib/cookie/exceptions/UnknownCookieException';\nimport { ICookieReader } from 'shared/lib/cookie/interfaces/ICookieReader';\nimport { UnauthenticatedUserSessionManagerImpl } from 'shared/lib/unauthenticated_user_session/impl/UnauthenticatedUserSessionManagerImpl';\n\nimport { ISignUpFormState } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\n\nimport { Observer } from 'shared/utils/observer';\nimport { getPublicContentParameters } from '../utils';\n\ninterface IPublicSiteStore {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n}\n\nexport namespace DownloadGateActionInterfaces {\n    export interface IDownloadGateActionCreatorsMapObject extends IActionCreatorsMapObject {\n        onSuccessfulSignUp : (\n            userAccountIdentifier : UserAccountId,\n            signUpFormState : ISignUpFormState\n        ) => ThunkAction<Promise<void>, IPublicSiteStore, {services : DownloadGateActionInterfaces.IServices}>;\n        onDownloadClicked : (\n            downloadUrl : string | null,\n        ) => ThunkAction<void, IPublicSiteStore, {services : DownloadGateActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        cookieReader : ICookieReader;\n        publicContentViewEventService : IPublicContentViewEventService;\n        unauthenticatedUserSessionManager : UnauthenticatedUserSessionManagerImpl;\n        userSessionManager : UserSessionManagerImpl;\n        userAccountInfoReader : IUserAccountInfoReader;\n        userAccountManager : UserAccountManagerImpl;\n        userPasswordManager : UserPasswordManagerImpl;\n    }\n}\n\nconst onDownloadClicked = (\n    downloadUrl : string | null\n) : ThunkAction<void, IPublicSiteStore, {services : DownloadGateActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : void => {\n        Observer.trackConversion.downloadedContent(window.location.href, downloadUrl);\n\n        if (downloadUrl) {\n            const publicSiteState : ISignUpAndLoginButtonsState = getState().signUpAndLoginButtonsState;\n            const publicContentParameters = getPublicContentParameters(window.location.href);\n\n            if (publicSiteState.loggedInUser) {\n                void extraArguments.services.publicContentViewEventService.createPublicContentViewEventForAuthenticatedSession(\n                    publicSiteState.loggedInUser.authenticatedUserSessionId,\n                    PublicContentViewEventTypeEnum.DOWNLOAD,\n                    new PublicContentUrl('www.bevspot.com', window.location.pathname),\n                    publicContentParameters.publicContentUrlParameters,\n                    document.referrer,\n                );\n            } else {\n                if (!publicSiteState.unauthenticatedUserSessionId) {\n                    throw new RuntimeException('UnauthenticatedUserSessionId was somehow not set');\n                }\n\n                void extraArguments.services.publicContentViewEventService.createPublicContentViewEventForUnauthenticatedSession(\n                    publicSiteState.unauthenticatedUserSessionId,\n                    PublicContentViewEventTypeEnum.DOWNLOAD,\n                    new PublicContentUrl('www.bevspot.com', window.location.pathname),\n                    publicContentParameters.publicContentUrlParameters,\n                    document.referrer,\n                );\n            }\n        }\n    };\n};\n\nconst onSuccessfulSignUp = (\n    userAccountId : UserAccountId,\n    signUpFormState : ISignUpFormState\n) : ThunkAction<Promise<void>, IPublicSiteStore, {services : DownloadGateActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        const inputDataByFieldName = signUpFormState.validationInputDataByFieldName;\n\n        let hubspotCookie : string | null = null;\n        try {\n            hubspotCookie = extraArguments.services.cookieReader.getCookie('hubspotutk');\n        } catch (error) {\n            if (!(error instanceof UnknownCookieException)) {\n                throw error;\n            }\n        }\n\n        return Promise.all([\n            extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId(),\n            Observer.trackConversion.userCreated({\n                email: inputDataByFieldName.emailAddress.value,\n                phone: inputDataByFieldName.phone.value,\n                bar_name: inputDataByFieldName.barName.value,\n                first_name: inputDataByFieldName.firstName.value,\n                last_name: inputDataByFieldName.lastName.value,\n                zip_code: inputDataByFieldName.optionalZipCode.value,\n                subscribe_to_blog: inputDataByFieldName.subscribeToBlog.value,\n                hubspot_cookie: hubspotCookie,\n                is_admin_created: false,\n                source_url: window.location.href,\n                should_receive_marketing: true,\n                creator_user_id: null,\n                retailer_id: null,\n            })\n        ])\n        .then((result) => {\n            const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId = result[0];\n            const userFullName = inputDataByFieldName.firstName.value + ' ' + inputDataByFieldName.lastName.value;\n            Observer.identifyAuthenticated(userAccountId, userFullName, inputDataByFieldName.emailAddress.value, null);\n            void Observer.observeAction('New User Account Created', {\n                referrer: document.referrer,\n                page: window.location.pathname,\n                unauthenticatedUserSessionId: unauthenticatedUserSessionId.value,\n            });\n\n            Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n            void Observer.observeAction('Clicked button to submit sign up form', {});\n            void Observer.observeAction('Successfully Submitted Sign Up Form', {\n                userAccountId: userAccountId.getValue(),\n            });\n        });\n    };\n};\n\nexport const DownloadGateActions : DownloadGateActionInterfaces.IDownloadGateActionCreatorsMapObject = {\n    onDownloadClicked,\n    onSuccessfulSignUp,\n};\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { ISignUpFormState } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\n\nimport { Button } from 'shared/components/Button';\nimport { ConnectedEmbeddedSignUpForm, IConnectedEmbeddedSignUpFormProps } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/EmbeddedSignUpForm';\nimport { IEmbeddedSignUpFormState } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/reducers';\nimport { SignUpOptionsFormActions } from 'shared/components/SignUpOrSignIn/SignUpOptions/actions';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\nimport { DownloadGateActions, DownloadGateActionInterfaces } from './actions';\n\nimport { logJsError } from 'shared/global/datadogLogger';\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\nimport { PathUtils } from 'shared/utils/pathUtils';\nimport { BevSpotDispatch } from 'shared/components/Provider';\n\nimport 'shared/css/MakeItSpin.scss';\n\nconst DOWNLOAD_GATE_MOUNT_ELEMENT_ID = 'download-gate-mount'; // Note: This should match the ID of the mount element for this component because we've decided to set the needed data attribute there\nconst DOWNLOAD_URL_ATTRIBUTE_NAME = 'data-download-url';\nconst DOWNLOAD_BUTTON_TEXT_ATTRIBUTE_NAME = 'data-download-button-text';\nconst ADDITIONAL_FIELDS_ARE_SHOWN_ATTRIBUTE_NAME = 'data-show-additional-fields';\n\ninterface IDownloadGateProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n    embeddedSignUpFormState : IEmbeddedSignUpFormState;\n}\n\ninterface IConnectedDownloadGateProps extends IDownloadGateProps {\n    dispatch : BevSpotDispatch<IDownloadGateProps, { services: DownloadGateActionInterfaces.IServices }>;\n}\n\nclass DownloadGate extends React.Component<IConnectedDownloadGateProps, object> {\n\n    private downloadUrl : string | null = null;\n    private downloadButtonText : string = 'Download';\n    private additionalFieldsAreShown : boolean = false;\n\n    public UNSAFE_componentWillMount() {\n        const downloadGateMountElement : HTMLElement | null = document.getElementById(DOWNLOAD_GATE_MOUNT_ELEMENT_ID);\n\n        if (downloadGateMountElement) {\n            const downloadUrlAttributeValue = downloadGateMountElement.getAttribute(DOWNLOAD_URL_ATTRIBUTE_NAME);\n            downloadGateMountElement.removeAttribute(DOWNLOAD_URL_ATTRIBUTE_NAME);\n\n            if (!downloadUrlAttributeValue) {\n                logJsError(\n                    'Could not get download url data attribute. Found element with Id: ' + DOWNLOAD_GATE_MOUNT_ELEMENT_ID + 'Was expecting attribute: ' + DOWNLOAD_URL_ATTRIBUTE_NAME,\n                    { isHandled: true },\n                    new RuntimeException('Could not get download url data attribute')\n                );\n            }\n\n            this.downloadUrl = downloadUrlAttributeValue;\n\n            const downloadButtonTextAttributeValue = downloadGateMountElement.getAttribute(DOWNLOAD_BUTTON_TEXT_ATTRIBUTE_NAME);\n            if (downloadButtonTextAttributeValue) {\n                this.downloadButtonText = downloadButtonTextAttributeValue;\n            }\n\n            const additionalFieldsAreShownAttributeValue = downloadGateMountElement.getAttribute(ADDITIONAL_FIELDS_ARE_SHOWN_ATTRIBUTE_NAME);\n            if (additionalFieldsAreShownAttributeValue) {\n                this.additionalFieldsAreShown = additionalFieldsAreShownAttributeValue === 'true';\n            }\n        } else {\n            logJsError(\n                'Could not find mount point for download gate when trying to get download url. Was expecting ' + DOWNLOAD_GATE_MOUNT_ELEMENT_ID,\n                { isHandled: true },\n                new RuntimeException('Could not find mount point for download gate')\n            );\n            this.downloadUrl = null;\n        }\n    }\n\n    public render() {\n        const {\n            dispatch,\n            signUpAndLoginButtonsState,\n            embeddedSignUpFormState,\n        } = this.props;\n\n        if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n            return (\n                <div>\n                    <span className=\"bevicon bevico-spinner2 make-it-spin loading-spinner\"/>\n                </div>\n            );\n        }\n\n        let downloadElement : JSX.Element | null = null;\n        if (this.downloadUrl) {\n            const onClick = () => {\n                if (this.downloadUrl) {\n                    window.open(this.downloadUrl, '_blank');\n                } else {\n                    window.open(PathUtils.getAbsolutePathForRequest('/user'), '_blank');\n\n                    logJsError(\n                        'Value of download url somehow changed!',\n                        { isHandled: true },\n                        new RuntimeException('Value of download url somehow changed!')\n                    );\n                }\n\n                dispatch(DownloadGateActions.onDownloadClicked(this.downloadUrl));\n            };\n\n            downloadElement = (\n                <div>\n                    <Button\n                        buttonClassName=\"bs-psb\"\n                        isLoading={ false }\n                        isDisabled={ false }\n                        onClick={ onClick }\n                    >\n                        { this.downloadButtonText }\n                    </Button>\n                </div>\n            );\n        } else {\n            const onClick = () => {\n                window.open(PathUtils.getAbsolutePathForRequest('/user'), '_blank');\n                dispatch(DownloadGateActions.onDownloadClicked(this.downloadUrl));\n            };\n\n            downloadElement = (\n                <div>\n                    <p>Go to your user dashboard to get access.</p>\n                    <Button\n                        buttonClassName=\"bs-psb\"\n                        isLoading={ false }\n                        isDisabled={ false }\n                        onClick={ onClick }\n                    >\n                        Go to user dashboard\n                    </Button>\n                </div>\n            );\n        }\n\n        if ((signUpAndLoginButtonsState.loggedInUser === null)) {\n            let aboveForm : JSX.Element | null = null;\n            let belowForm : JSX.Element | null = null;\n\n            if (embeddedSignUpFormState.signUpForm.hasSuccessfullySubmitted) {\n                aboveForm = (\n                    <div>\n                        <h5>You&rsquo;ve unlocked this resource!</h5>\n                        { downloadElement }\n                    </div>\n                );\n            } else {\n                const onWantsToLogIn = () => {\n                    dispatch(SignUpOptionsFormActions.onSetActiveForm('signInForm'));\n                    dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n                };\n\n                aboveForm  = (\n                    <div>\n                        <h5>To access this resource, sign up for BevSpot free!</h5>\n                    </div>\n                );\n                belowForm = (\n                    <p className=\"small\">\n                        &nbsp; <br/>Already have a BevSpot account?<br/>\n                        <a onClick={ onWantsToLogIn }>Log in</a> to get access.\n                    </p>\n                );\n            }\n\n            const connectedEmbeddedSignUpFormProps : IConnectedEmbeddedSignUpFormProps = {\n                additionalFieldsAreShown : this.additionalFieldsAreShown,\n                additionalRetailerFieldsAreRequired : false,\n                onSuccessfulSignUp : (userAccountIdentifier : UserAccountId, signUpFormState : ISignUpFormState) => {\n                    return dispatch(DownloadGateActions.onSuccessfulSignUp(userAccountIdentifier, signUpFormState));\n                },\n            };\n\n            return (\n                <div className=\"download-gate\">\n                    { aboveForm }\n                    <ConnectedEmbeddedSignUpForm { ...connectedEmbeddedSignUpFormProps }/>\n                    { belowForm }\n                </div>\n            );\n        }\n\n        return (\n            <div className=\"download-gate\">\n                <p>\n                    Welcome back { (signUpAndLoginButtonsState.loggedInUser.userInfo === null) ? '' : ', ' + signUpAndLoginButtonsState.loggedInUser.userInfo.firstName }!\n                </p>\n\n                { downloadElement }\n\n                <p>\n                    &nbsp; <br/>Remember, by joining you&rsquo;ve unlocked more resources! Check them out on your <a href={ PathUtils.getAbsolutePathForRequest('/user') }>user dashboard</a>\n                </p>\n            </div>\n        );\n    }\n}\n\nconst mapStateToProps = (state : IDownloadGateProps) : IDownloadGateProps => {\n    return {\n        signUpAndLoginButtonsState : state.signUpAndLoginButtonsState,\n        embeddedSignUpFormState : state.embeddedSignUpFormState,\n    };\n};\n\nexport const ConnectedDownloadGate = connect<IDownloadGateProps, object, object, IDownloadGateProps>(mapStateToProps)(DownloadGate);\n","import { ThunkAction, IActionCreatorsMapObject } from 'shared/models/IAction';\n\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { IUserAccountInfoReader } from 'api/UserAccount/interfaces/IUserAccountInfoReader';\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { UnknownCookieException } from 'shared/lib/cookie/exceptions/UnknownCookieException';\n\nimport { UserAccountManagerImpl } from 'shared/lib/account/impl/UserAccountManagerImpl';\nimport { UserPasswordManagerImpl } from 'shared/lib/account/impl/UserPasswordManagerImpl';\nimport { UserSessionManagerImpl } from 'shared/lib/account/impl/UserSessionManagerImpl';\nimport { ICookieReader } from 'shared/lib/cookie/interfaces/ICookieReader';\nimport { UnauthenticatedUserSessionManagerImpl } from 'shared/lib/unauthenticated_user_session/impl/UnauthenticatedUserSessionManagerImpl';\n\nimport { DjangoApiManager } from 'shared/api/DjangoApiManager';\n\nimport { ISignUpData } from 'shared/components/SignUpOrSignIn/ISignUpData';\n\nimport { Observer } from 'shared/utils/observer';\n\nexport const ActionTypes = {\n};\n\nexport namespace GetStartedFormActionInterfaces {\n    export interface IGetStartedFormActionCreatorsMapObject extends IActionCreatorsMapObject {\n        onSuccessfulUserSignUp : (\n            userAccountIdentifier : UserAccountId,\n            signUpData : ISignUpData\n        ) => ThunkAction<Promise<void>, object, {services : GetStartedFormActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        djangoApiManager : DjangoApiManager;\n        cookieReader : ICookieReader;\n        unauthenticatedUserSessionManager : UnauthenticatedUserSessionManagerImpl;\n        userSessionManager : UserSessionManagerImpl;\n        userAccountInfoReader : IUserAccountInfoReader;\n        userAccountManager : UserAccountManagerImpl;\n        userPasswordManager : UserPasswordManagerImpl;\n    }\n}\n\nconst onSuccessfulUserSignUp = (\n    userAccountIdentifier : UserAccountId,\n    signUpData : ISignUpData\n) : ThunkAction<Promise<void>, object, {services : GetStartedFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        let hubspotCookie : string | null = null;\n        try {\n            hubspotCookie = extraArguments.services.cookieReader.getCookie('hubspotutk');\n        } catch (error) {\n            if (!(error instanceof UnknownCookieException)) {\n                throw error;\n            }\n        }\n\n        return Promise.all([\n            extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId(),\n            Observer.trackConversion.userCreated({\n                email: signUpData.emailAddress,\n                phone: signUpData.phone,\n                bar_name: signUpData.barName,\n                first_name: signUpData.firstName,\n                last_name: signUpData.lastName,\n                zip_code: signUpData.optionalZipCode,\n                subscribe_to_blog: signUpData.subscribeToBlog,\n                hubspot_cookie: hubspotCookie,\n                is_admin_created: false,\n                source_url: window.location.href,\n                should_receive_marketing: true,\n                creator_user_id: null,\n                retailer_id: null,\n            })\n        ])\n        .then((result) => {\n            const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId = result[0];\n            const userFullName = signUpData.firstName + ' ' + signUpData.lastName;\n            Observer.identifyAuthenticated(userAccountIdentifier, userFullName, signUpData.emailAddress, null);\n            void Observer.observeAction('New User Account Created', {\n                referrer: document.referrer,\n                page: window.location.pathname,\n                unauthenticatedUserSessionId: unauthenticatedUserSessionId.value,\n            });\n\n            Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n            void Observer.observeAction('Clicked button to submit sign up form', {});\n            void Observer.observeAction('Successfully Submitted Sign Up Form', {\n                userAccountId: userAccountIdentifier.getValue(),\n            });\n        });\n    };\n};\n\nexport const GetStartedFormActions : GetStartedFormActionInterfaces.IGetStartedFormActionCreatorsMapObject = {\n    onSuccessfulUserSignUp,\n};\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { SignUpFormDispatch, SignUpFormActions } from 'shared/components/SignUpOrSignIn/SignUpForm/actions';\nimport { signUpFormFieldName } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\nimport { SignUpForm } from 'shared/components/SignUpOrSignIn/SignUpForm/SignUpForm';\nimport { ISignUpOptionsState } from 'shared/components/SignUpOrSignIn/SignUpOptions/reducers';\n\nimport { SignUpAndLoginDispatch } from '../SignUpAndLoginButtons/actions';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\nimport { GetStartedFormActions } from './actions';\n\nimport { PathUtils } from 'shared/utils/pathUtils';\n\nimport 'shared/css/MakeItSpin.scss';\n\ninterface IGetStartedFormProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n    signUpOptionsState : ISignUpOptionsState;\n}\n\ninterface IConnectedGetStartedFormProps extends IGetStartedFormProps {\n    dispatch : SignUpFormDispatch & SignUpAndLoginDispatch;\n}\n\nclass GetStartedForm extends React.Component<IConnectedGetStartedFormProps, object> {\n\n    public render() {\n        const {\n            signUpAndLoginButtonsState,\n            signUpOptionsState,\n        } = this.props;\n\n        if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n            return (\n                <div>\n                    <span className=\"bevicon bevico-spinner2 make-it-spin loading-spinner\"/>\n                </div>\n            );\n        }\n\n        if (signUpAndLoginButtonsState.loggedInUser) {\n            const userName = signUpAndLoginButtonsState.loggedInUser.userInfo ? ', ' + signUpAndLoginButtonsState.loggedInUser.userInfo.firstName : '';\n            return (\n                <div className=\"get-started-form\">\n                    <p>Welcome back{ userName }!</p>\n                    <p>\n                        <a className=\"btn\" href={ PathUtils.getAbsolutePathForRequest(`/start_free_trial${ window.location.search }`) }>Start Free Trial</a>\n                    </p>\n                    <p>You already have a user account with BevSpot. You can still start a new free trial above or go to your <a href={ PathUtils.getAbsolutePathForRequest('/user') }>user dashboard</a>.</p>\n                </div>\n            );\n        } else {\n            return (\n                <div className=\"get-started-form\">\n                    <SignUpForm\n                        headerTitle={ null }\n                        headerMessage={ null }\n                        signUpFormState={ signUpOptionsState.signUpOptionsForm.signUpForm }\n                        onFormFieldChange={ this.onFormFieldChange }\n                        onFormFieldBlur={ this.onFormFieldBlur }\n                        additionalUserFieldsAreShown={ false }\n                        additionalRetailerFieldsAreShown={ false }\n                        additionalRetailerFieldsAreRequired={ false }\n                        submitButtonContents=\"START FREE TRIAL\"\n                        onSubmit={ this.onSignUpAndCreateRetailerFormSubmit }\n                        setAddressFormField={ this.doNothing }\n                    />\n                </div>\n            );\n        }\n    }\n\n    private readonly onFormFieldChange = (field : signUpFormFieldName, value : string | boolean) => {\n        return this.props.dispatch(SignUpFormActions.onFormFieldChange(field, value));\n    }\n\n    private readonly  onFormFieldBlur = (field : signUpFormFieldName, value : string | boolean) => {\n        return this.props.dispatch(SignUpFormActions.onFormFieldBlur(field, value));\n    }\n\n    private readonly onSignUpAndCreateRetailerFormSubmit = () => {\n        const {\n            dispatch,\n            signUpOptionsState,\n        } = this.props;\n\n        void dispatch(SignUpFormActions.onSubmit(signUpOptionsState.signUpOptionsForm.signUpForm, false, false, true))\n        .then((userAccountIdentifier : UserAccountId | void) => {\n            if (userAccountIdentifier) {\n                const validationInputDataByFieldName = signUpOptionsState.signUpOptionsForm.signUpForm.validationInputDataByFieldName;\n                void dispatch(GetStartedFormActions.onSuccessfulUserSignUp(\n                    userAccountIdentifier,\n                    {\n                        firstName : validationInputDataByFieldName.firstName.value,\n                        lastName : validationInputDataByFieldName.lastName.value,\n                        emailAddress : validationInputDataByFieldName.emailAddress.value,\n                        phone : validationInputDataByFieldName.phone.value,\n                        barName : validationInputDataByFieldName.barName.value,\n                        country : validationInputDataByFieldName.country.value,\n                        city : validationInputDataByFieldName.city.value,\n                        state : validationInputDataByFieldName.state.value,\n                        streetAddressLine1 : validationInputDataByFieldName.streetAddressLine1.value,\n                        streetAddressLine2 : validationInputDataByFieldName.streetAddressLine2.value,\n                        zipCode : validationInputDataByFieldName.zipCode.value,\n                        optionalZipCode : validationInputDataByFieldName.optionalZipCode.value,\n                        subscribeToBlog : validationInputDataByFieldName.subscribeToBlog.value,\n                    }\n                ))\n                .then(() => {\n                    window.location.href = PathUtils.getAbsolutePathForRequest(`/start_free_trial${ window.location.search }`);\n                });\n            }\n        });\n    }\n\n    private readonly doNothing = () => undefined;\n}\n\nconst mapStateToProps = (state : IGetStartedFormProps) : IGetStartedFormProps => {\n    return {\n        signUpAndLoginButtonsState : state.signUpAndLoginButtonsState,\n        signUpOptionsState : state.signUpOptionsState,\n    };\n};\n\nexport const ConnectedGetStartedForm = connect<IGetStartedFormProps, object, object, IGetStartedFormProps>(mapStateToProps)(GetStartedForm);\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { Button } from 'shared/components/Button';\nimport { LoadingCover } from 'shared/components/LoadingCover';\nimport { SignUpFormActions, SignUpFormDispatch } from 'shared/components/SignUpOrSignIn/SignUpForm/actions';\nimport { ISignUpOptionsState } from 'shared/components/SignUpOrSignIn/SignUpOptions/reducers';\nimport { ValidationInput } from 'shared/components/ValidationInput';\n\nimport { GetStartedFormActions } from 'apps/PublicSite/GetStartedForm/actions';\n\nimport { SignUpAndLoginDispatch } from '../SignUpAndLoginButtons/actions';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\n\nimport { PathUtils } from 'shared/utils/pathUtils';\n\nimport './GetStartedWithEmail.scss';\n\ninterface IGetStartedWithEmailProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n    signUpOptionsState : ISignUpOptionsState;\n}\n\ninterface IConnectedGetStartedWithEmailProps extends IGetStartedWithEmailProps {\n    dispatch : SignUpAndLoginDispatch & SignUpFormDispatch;\n}\n\ninterface IGetStartedWithEmailState {\n    email : string;\n}\n\nexport class GetStartedWithEmail extends React.Component<IConnectedGetStartedWithEmailProps, IGetStartedWithEmailState> {\n    constructor(props : IConnectedGetStartedWithEmailProps) {\n        super(props);\n    }\n\n    public render() {\n        const {\n            signUpAndLoginButtonsState,\n            signUpOptionsState,\n        } = this.props;\n\n        if (typeof signUpAndLoginButtonsState.loggedInUser  === 'undefined') {\n            return (\n                <LoadingCover\n                    className=\"overlay-light inline\"\n                    hasLoadingIcon={ true }\n                />\n            );\n        }\n        if (signUpAndLoginButtonsState.loggedInUser) {\n            return null;\n        }\n\n        const emailAddress = signUpOptionsState.signUpOptionsForm.signUpForm.validationInputDataByFieldName.emailAddress;\n        return (\n                <div className=\"get-started-with-email\">\n                    <div className=\"inner-container\">\n                        <div className=\"email-entry-container\">\n                            <ValidationInput\n                                inputClassName=\"email-entry\"\n                                type=\"email\"\n                                autoFocus={ false }\n                                autoComplete={ null }\n                                errorMessage={ emailAddress.errorMessage }\n                                isValid={ emailAddress.isValid }\n                                handleBlur={ this.onFormFieldChange }\n                                handleFocus={ null }\n                                handleChange={ this.onFormFieldChange }\n                                handleEnterClick={ this.doNothing }\n                                label=\"\"\n                                hintText=\"Email address\"\n                                value={ emailAddress.value }\n                                isDisabled={ false }\n                            />\n                            <Button\n                                buttonClassName=\"ml-xs emphasis\"\n                                isDisabled={ false }\n                                isLoading={ false }\n                                onClick={ this.onSignUpAndCreateRetailerFormSubmit }\n                            >\n                                Get Started\n                            </Button>\n                        </div>\n                        <p>\n                            Already have an account?\n                            <Button\n                                buttonClassName=\"primary medium flat normal\"\n                                isDisabled={ false }\n                                isLoading={ false }\n                                onClick={ this.onSignIn }\n                            >\n                                Sign in\n                            </Button>\n                        </p>\n                    </div>\n                </div>\n        );\n    }\n\n    private readonly doNothing = () => {\n        // pass\n    }\n\n    private readonly onSignIn = () => {\n        window.location.href = PathUtils.getAbsolutePathForRequest('/login');\n    }\n\n    private readonly onFormFieldChange = (e : React.ChangeEvent<HTMLInputElement>) => {\n        const emailValue = e.target.value;\n        this.props.dispatch(SignUpFormActions.onFormFieldChange('emailAddress', emailValue));\n        this.props.dispatch(SignUpFormActions.onFormFieldChange('firstName', emailValue));\n        this.props.dispatch(SignUpFormActions.onFormFieldChange('lastName', 'Bevspot'));\n    }\n\n    private readonly onSignUpAndCreateRetailerFormSubmit = () => {\n        const {\n            dispatch,\n            signUpOptionsState,\n        } = this.props;\n\n        const validationInputDataByFieldName = signUpOptionsState.signUpOptionsForm.signUpForm.validationInputDataByFieldName;\n        void dispatch(SignUpFormActions.onSubmit(signUpOptionsState.signUpOptionsForm.signUpForm, false, false, true))\n        .then((userAccountIdentifier : UserAccountId | void) => {\n            if (userAccountIdentifier) {\n                void dispatch(GetStartedFormActions.onSuccessfulUserSignUp(\n                    userAccountIdentifier,\n                    {\n                        firstName : validationInputDataByFieldName.firstName.value,\n                        lastName : validationInputDataByFieldName.lastName.value,\n                        emailAddress: validationInputDataByFieldName.emailAddress.value,\n                        phone : validationInputDataByFieldName.phone.value,\n                        barName : validationInputDataByFieldName.barName.value,\n                        country : validationInputDataByFieldName.country.value,\n                        city : validationInputDataByFieldName.city.value,\n                        state : validationInputDataByFieldName.state.value,\n                        streetAddressLine1 : validationInputDataByFieldName.streetAddressLine1.value,\n                        streetAddressLine2 : validationInputDataByFieldName.streetAddressLine2.value,\n                        zipCode : validationInputDataByFieldName.zipCode.value,\n                        optionalZipCode : validationInputDataByFieldName.optionalZipCode.value,\n                        subscribeToBlog : validationInputDataByFieldName.subscribeToBlog.value,\n                    }\n                ))\n                .then(() => {\n                    window.location.href = PathUtils.getAbsolutePathForRequest('/user/welcome_to_bevspot/?public=true');\n                });\n            }\n        });\n    }\n}\n\nconst mapStateToProps = (state : IGetStartedWithEmailProps) : IGetStartedWithEmailProps => {\n    return {\n        signUpAndLoginButtonsState : state.signUpAndLoginButtonsState,\n        signUpOptionsState : state.signUpOptionsState,\n    };\n};\n\nexport const ConnectedGetStartedWithEmail = connect<IGetStartedWithEmailProps, object, object, IGetStartedWithEmailProps>(mapStateToProps)(GetStartedWithEmail);\n","import React from 'react';\nimport { connect } from 'react-redux';\nimport { AnyAction, ThunkDispatch } from '@reduxjs/toolkit';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { ConnectedUserButtonApp } from 'apps/UserSessionApp/UserButtonApp';\nimport { ISignUpData } from 'shared/components/SignUpOrSignIn/ISignUpData';\nimport { SignUpOptionsFormActions } from 'shared/components/SignUpOrSignIn/SignUpOptions/actions';\nimport { IActiveFormState } from 'shared/components/SignUpOrSignIn/SignUpOptions/reducers';\nimport { ConnectedSignUpOptions } from 'shared/components/SignUpOrSignIn/SignUpOptions/SignUpOptions';\n\nimport { SignUpAndLogInButtons } from './SignUpAndLoginButtons/SignUpAndLogInButtons';\n\nimport { SignUpAndLoginButtonsActions, SignUpAndLoginDispatch } from './SignUpAndLoginButtons/actions';\nimport { ISignUpAndLoginButtonsState } from './SignUpAndLoginButtons/reducers';\n\nimport { logJsError } from 'shared/global/datadogLogger';\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\nimport { Observer } from 'shared/utils/observer';\nimport { PathUtils } from 'shared/utils/pathUtils';\nimport { URLStringUtils } from 'shared/utils/urlStringUtils';\n\nimport 'shared/css/MakeItSpin.scss';\nimport 'shared/css/PublicSite.scss';\nimport { IExtraArguments } from 'shared/components/Provider';\n\ninterface IPublicSiteProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n}\n\ninterface IConnectedPublicSiteProps extends IPublicSiteProps {\n    dispatch : SignUpAndLoginDispatch & ThunkDispatch<IPublicSiteProps, IExtraArguments, AnyAction>;\n}\n\nconst PUBLIC_SITE_MOUNT_ELEMENT_ID = 'public-site-app'; // Note: This should match the ID of the mount element for this component because we've decided to set the needed data attribute there\nconst INITIAL_ACTIVE_FORM_NAME = 'data-initial-active-form';\nconst CLICK_SELECTOR_CLASS : string = 'public-site-sign-up-modal-trigger';\nconst DASHBOARD_REDIRECT_URL : string = 'https://app.bevspot.com/account/dashboard';\n\nclass PublicSite extends React.Component<IConnectedPublicSiteProps, object> {\n\n    private defaultInitialActiveFormName : IActiveFormState = 'signUpAndCreateRetailerForm';\n    private initialActiveFormName : IActiveFormState = 'signUpAndCreateRetailerForm';\n    private availableForms : Array<IActiveFormState> = ['signUpAndCreateRetailerForm', 'signUpForm', 'signInForm'];\n\n    public UNSAFE_componentWillMount() {\n        const signUpOptionsFormMountElement : HTMLElement | null = document.getElementById(PUBLIC_SITE_MOUNT_ELEMENT_ID);\n\n        if (signUpOptionsFormMountElement) {\n            const initialActiveFormAttributeValue = signUpOptionsFormMountElement.getAttribute(INITIAL_ACTIVE_FORM_NAME);\n            signUpOptionsFormMountElement.removeAttribute(INITIAL_ACTIVE_FORM_NAME);\n\n            if (initialActiveFormAttributeValue !== null) {\n                if (this.availableForms.indexOf(initialActiveFormAttributeValue as IActiveFormState) > -1) {\n                    this.defaultInitialActiveFormName = initialActiveFormAttributeValue as IActiveFormState;\n                } else {\n                    logJsError(\n                        'Could not get initial active form name data attribute. Found element with Id: ' +\n                            PUBLIC_SITE_MOUNT_ELEMENT_ID + '. Was expecting attribute: ' + INITIAL_ACTIVE_FORM_NAME + '. Found value: ' + initialActiveFormAttributeValue,\n                        { isHandled: true },\n                        new RuntimeException('Could not get initial active form name data attribute')\n                    );\n                }\n            }\n        } else {\n            logJsError(\n                'Could not find mount point for sign up form. Was expecting ' + PUBLIC_SITE_MOUNT_ELEMENT_ID,\n                { isHandled: true },\n                new RuntimeException('Could not find mount point for sign up form')\n            );\n        }\n    }\n\n    public componentDidMount() {\n        const openSignUpModal = (event : JQueryEventObject) => {\n            const {\n                dispatch,\n                signUpAndLoginButtonsState\n            } = this.props;\n\n            if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n                return;\n            }\n\n            if (signUpAndLoginButtonsState.loggedInUser === null) {\n                const triggerSource = event.target.getAttribute('data-trigger-source') || null;\n\n                const newURL = URLStringUtils.replaceOrRemoveURLParameter(window.location.href, 'triggerSource', triggerSource);\n                window.history.replaceState(null, '', newURL);\n\n                const initialActiveFormAttributeValue = event.target.getAttribute(INITIAL_ACTIVE_FORM_NAME);\n\n                if (initialActiveFormAttributeValue !== null && this.availableForms.indexOf(initialActiveFormAttributeValue as IActiveFormState) > -1) {\n                    this.initialActiveFormName = initialActiveFormAttributeValue as IActiveFormState;\n                } else {\n                    this.initialActiveFormName = this.defaultInitialActiveFormName;\n                }\n\n                dispatch(SignUpOptionsFormActions.onSetActiveForm(this.initialActiveFormName));\n                dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n                void Observer.observeAction('Opened SignUpOrSignInModal', { active : this.initialActiveFormName });\n            } else {\n                window.location.href = PathUtils.getAbsolutePathForRequest('/start_free_trial');\n            }\n\n            return false;\n        };\n\n        $(document).on('click.' + CLICK_SELECTOR_CLASS, '.' + CLICK_SELECTOR_CLASS, openSignUpModal);\n    }\n\n    public componentWillUnmount() {\n        $(document).off('click.' + CLICK_SELECTOR_CLASS, '.' + CLICK_SELECTOR_CLASS);\n    }\n\n    public render() {\n        const {\n            signUpAndLoginButtonsState,\n        } = this.props;\n\n        const loadingSpinner = <span className=\"bevicon bevico-spinner2 make-it-spin loading-spinner\"/>;\n\n        if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n            return loadingSpinner;\n        }\n\n        if (signUpAndLoginButtonsState.loggedInUser === null) {\n            return (\n                <span>\n                    <SignUpAndLogInButtons\n                        onClickSignUp={ this.onSignUpAndLogInButtonsClickSignUp }\n                        onClickLogIn={ this.onSignUpAndLogInButtonsClickLogIn }\n                    />\n                    <ConnectedSignUpOptions\n                        availableFormOptions={ ['signUpAndCreateRetailerForm', 'signInForm'] }\n                        isEmbeddedInModal={ true }\n                        isDismissible={ true }\n                        formIsVisibleOnLoad={ false }\n                        additionalUserFieldsAreShown={ false }\n                        additionalRetailerFieldsAreShown={ false }\n                        additionalRetailerFieldsAreRequired={ false }\n                        onSuccessfulSignIn={ this.onConnectedSignUpOptionsSuccessfulSignIn }\n                        onSuccessfulSignUp={ this.onConnectedSignUpOptionsSuccessfulSignUp }\n                    />\n                </span>\n            );\n        }\n\n        if (signUpAndLoginButtonsState.loggedInUser.userInfo === null) {\n            return loadingSpinner;\n        }\n\n        // TODO: do we care about this `retailerDashboardLinkVisible` logic? right now it's not being used in `ConnectedUserButtonApp`\n        return (\n            <span className=\"user-icon-table\">\n                <a className=\"user-icon-label\" onClick={ this.onUserIconWithPopoverIconClick } >My Account</a>\n                <span className=\"user-icon-container\">\n                    <ConnectedUserButtonApp />\n                </span>\n            </span>\n        );\n    }\n\n    private readonly onConnectedSignUpOptionsSuccessfulSignIn = () => {\n        return this.props.dispatch(SignUpAndLoginButtonsActions.onSuccessfulSignIn())\n        .then(() => {\n            window.location.href = DASHBOARD_REDIRECT_URL;\n        });\n    }\n\n    private readonly onConnectedSignUpOptionsSuccessfulSignUp = (userAccountIdentifier : UserAccountId, signUpData : ISignUpData) => {\n        return this.props.dispatch(SignUpAndLoginButtonsActions.onSuccessfulSignUp(userAccountIdentifier, signUpData))\n        .then(() => {\n            window.location.href = DASHBOARD_REDIRECT_URL;\n        });\n    }\n\n    private readonly onSignUpAndLogInButtonsClickSignUp = () => {\n        this.initialActiveFormName = this.defaultInitialActiveFormName;\n        this.props.dispatch(SignUpOptionsFormActions.onSetActiveForm(this.defaultInitialActiveFormName));\n        this.props.dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n        void Observer.observeAction('Opened SignUpOrSignInModal', { active : this.defaultInitialActiveFormName });\n    }\n\n    private readonly onSignUpAndLogInButtonsClickLogIn = () => {\n        this.initialActiveFormName = this.defaultInitialActiveFormName;\n        this.props.dispatch(SignUpOptionsFormActions.onSetActiveForm('signInForm'));\n        this.props.dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n        void Observer.observeAction('Opened SignUpOrSignInModal', { active : 'signInForm' });\n    }\n\n    private readonly onUserIconWithPopoverIconClick = () => {\n        this.props.dispatch(SignUpAndLoginButtonsActions.onSetUserIconPopoverIsShown(!this.props.signUpAndLoginButtonsState.userIconPopoverIsShown));\n        void Observer.observeAction('User icon clicked', { popoverIsShown : this.props.signUpAndLoginButtonsState.userIconPopoverIsShown });\n    }\n}\n\nconst mapStateToProps = (state : IPublicSiteProps) : IPublicSiteProps => {\n    return {\n        signUpAndLoginButtonsState: state.signUpAndLoginButtonsState,\n    };\n};\n\nexport const ConnectedPublicSite = connect<IPublicSiteProps, object, object, IPublicSiteProps>(mapStateToProps)(PublicSite);\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { AddressFormFieldName, ConnectedAddressForm } from 'shared/components/AddressForm/AddressForm';\nimport { IValidationInputData, ValidationInput } from 'shared/components/ValidationInput';\n\nimport { Button } from 'shared/components/Button';\nimport { ISlimCreateRetailerFormStore, SlimCreateRetailerFormActions, SlimCreateRetailerFormActionInterfaces } from 'shared/components/SignUpOrSignIn/SlimCreateRetailerForm/actions';\nimport { ISlimCreateRetailerFormState, SlimCreateRetailerFormFieldName } from 'shared/components/SignUpOrSignIn/SlimCreateRetailerForm/reducers';\nimport { BevSpotDispatch } from 'shared/components/Provider';\n\nexport interface ISlimCreateRetailerFormProps {\n    slimCreateRetailerFormState : ISlimCreateRetailerFormState;\n    onSubmit : (retailerName : string, addressForm : {[fieldName in AddressFormFieldName] : IValidationInputData }) => Promise<void>;\n}\n\nexport interface IBoundSlimCreateRetailerFormProps extends ISlimCreateRetailerFormProps {\n    dispatch : BevSpotDispatch<ISlimCreateRetailerFormStore, { services: SlimCreateRetailerFormActionInterfaces.IServices }>;\n}\n\nexport class SlimCreateRetailerForm extends React.Component<IBoundSlimCreateRetailerFormProps, object> {\n\n    public render() {\n        const {\n            slimCreateRetailerFormState,\n        } = this.props;\n\n        return (\n            <div className=\"sign-up-form\">\n                <div className=\"row\">\n                    <div className=\"col-xs-12\">\n                        { this.makeValidationInput('retailerName', slimCreateRetailerFormState.validationInputDataByFieldName.retailerName, `Bar Name`) }\n                    </div>\n                </div>\n                <div className=\"row\">\n                    <ConnectedAddressForm // for right now, need full address to create a retailer\n                        validationInputDataByFieldName={ slimCreateRetailerFormState.validationInputDataByFieldName }\n                        rowClassName=\"col-xs-12\"\n                        addressLine1Label=\"Street Address Line 1\"\n                        addressLine2Label=\"Street Address Line 2 (Optional)\"\n                        countryIsDisabled={ false }\n                        setValidationInputForField={ this.setAddressFormField }\n                        onEnterClick={ this.doNothing }\n                    />\n                </div>\n                <Button\n                    buttonClassName=\"modal-sign-up-button primary\"\n                    isDisabled={ slimCreateRetailerFormState.isSubmitting }\n                    isLoading={ slimCreateRetailerFormState.isSubmitting }\n                    onClick={ this.onSubmitFormClick }\n                >\n                    JOIN BEVSPOT\n                </Button>\n                { !slimCreateRetailerFormState.isValid && slimCreateRetailerFormState.errorMessage &&\n                    <p className=\"form-error-message\">{ slimCreateRetailerFormState.errorMessage }</p>\n                }\n            </div>\n        );\n    }\n\n    private readonly doNothing = () => undefined;\n\n    private readonly onFormFieldChange = (field : SlimCreateRetailerFormFieldName, value : string | boolean) => {\n        return this.props.dispatch(SlimCreateRetailerFormActions.onFormFieldChange(field, value));\n    }\n\n    private readonly onFormFieldBlur = (field : SlimCreateRetailerFormFieldName, value : string | boolean) => {\n        return this.props.dispatch(SlimCreateRetailerFormActions.onFormFieldBlur(field, value));\n    }\n\n    private readonly setAddressFormField = (fieldName : AddressFormFieldName, validationInputData : IValidationInputData) => {\n        return this.props.dispatch(SlimCreateRetailerFormActions.onSetAddressFormField(fieldName, validationInputData));\n    }\n\n    private readonly onSubmitFormClick = () => {\n        const {\n            dispatch,\n            slimCreateRetailerFormState,\n            onSubmit\n        } = this.props;\n\n        return dispatch(SlimCreateRetailerFormActions.onSubmit(slimCreateRetailerFormState))\n        .then((isValid : boolean) => {\n            if (isValid) {\n                void onSubmit(slimCreateRetailerFormState.validationInputDataByFieldName.retailerName.value, slimCreateRetailerFormState.validationInputDataByFieldName);\n            }\n        });\n    }\n\n    private readonly makeValidationInput = (fieldName : SlimCreateRetailerFormFieldName, fieldData : IValidationInputData, label : string) : JSX.Element => {\n        const onChange = (event : React.ChangeEvent<HTMLInputElement>) => this.onFormFieldChange(fieldName, event.currentTarget.value);\n        const onBlur = (event : React.FocusEvent<HTMLInputElement>) => this.onFormFieldBlur(fieldName, event.currentTarget.value);\n\n        return (\n            <ValidationInput\n                key={ fieldName }\n                inputClassName=\"\"\n                type=\"text\"\n                autoFocus={ false }\n                autoComplete={ null }\n                errorMessage={ fieldData.errorMessage }\n                isValid={ fieldData.isValid }\n                handleBlur={ onBlur }\n                handleFocus={ null }\n                handleChange={ onChange }\n                handleEnterClick={ this.doNothing }\n                label={ label }\n                hintText={ null }\n                value={ fieldData.value }\n            />\n        );\n    }\n}\n\nexport interface IConnectedSlimCreateRetailerFormProps {\n    onSubmit : (retailerName : string, addressForm : {[fieldName in AddressFormFieldName] : IValidationInputData }) => Promise<void>;\n}\n\ninterface IState {\n    slimCreateRetailerFormState : ISlimCreateRetailerFormState;\n}\nconst mapStateToProps = (state : IState, ownProps : IConnectedSlimCreateRetailerFormProps) : ISlimCreateRetailerFormProps => {\n    return {\n        slimCreateRetailerFormState : state.slimCreateRetailerFormState,\n        onSubmit : ownProps.onSubmit,\n    };\n};\n\nexport const ConnectedSlimCreateRetailerForm = connect<ISlimCreateRetailerFormProps, object, IConnectedSlimCreateRetailerFormProps, IState>(mapStateToProps)(SlimCreateRetailerForm);\n","import { ThunkAction, IActionCreatorsMapObject } from 'shared/models/IAction';\n\nimport moment from 'moment-timezone';\n\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { ILocationService } from 'api/Location/interfaces/ILocationService';\nimport { AccountType } from 'api/Location/model/AccountType';\nimport { LocationId } from 'api/Location/model/LocationId';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { UnknownCookieException } from 'shared/lib/cookie/exceptions/UnknownCookieException';\nimport { ICookieReader } from 'shared/lib/cookie/interfaces/ICookieReader';\nimport { UnauthenticatedUserSessionManagerImpl } from 'shared/lib/unauthenticated_user_session/impl/UnauthenticatedUserSessionManagerImpl';\n\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\n\nimport { RetailerGettingStartedType } from 'api/Location/model/RetailerGettingStartedType';\nimport { AddressFormFieldName } from 'shared/components/AddressForm/AddressForm';\nimport { IValidationInputData } from 'shared/components/ValidationInput';\nimport { Observer } from 'shared/utils/observer';\nimport { PathUtils } from 'shared/utils/pathUtils';\n\ninterface IPublicSiteStore {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n}\n\nexport namespace RetailerOnrampFormActionInterfaces {\n    export interface IRetailerOnrampFormActionCreatorsMapObject extends IActionCreatorsMapObject {\n        onCreateRetailer : (\n            userAccountIdentifier : UserAccountId,\n            userIsNewAccount : boolean,\n            retailerName : string,\n            addressValidationInputDataByFieldName : {[fieldName in AddressFormFieldName] : IValidationInputData },\n            userFirstName : string,\n            userLastName : string,\n            userPhone : string,\n            userEmail : string,\n            retailerAccountType : AccountType,\n            retailerOnrampType : RetailerGettingStartedType | null,\n        ) => ThunkAction<Promise<void>, IPublicSiteStore, {services : RetailerOnrampFormActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        cookieReader : ICookieReader;\n        // publicContentViewEventService : IPublicContentViewEventService;\n        unauthenticatedUserSessionManager : UnauthenticatedUserSessionManagerImpl;\n        locationService : ILocationService;\n    }\n}\n\nconst onCreateRetailer = (\n    userAccountId : UserAccountId,\n    userIsNewAccount : boolean,\n    retailerName : string,\n    addressValidationInputDataByFieldName : {[fieldName in AddressFormFieldName] : IValidationInputData },\n    userFirstName : string,\n    userLastName : string,\n    userPhone : string,\n    userEmail : string,\n    retailerAccountType : AccountType,\n    retailerOnrampType : RetailerGettingStartedType | null,\n) : ThunkAction<Promise<void>, IPublicSiteStore, {services : RetailerOnrampFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        const timezone = moment.tz.guess();\n\n        // const retailerName = inputDataByFieldName.barName.value;\n\n        return extraArguments.services.locationService.createLocations(\n            userFirstName,\n            userLastName,\n            userAccountId.getValue(),\n            userEmail,\n            userPhone,\n            retailerAccountType === AccountType.BEVERAGE ? retailerName : null,\n            retailerAccountType === AccountType.FOOD ? retailerName : null,\n            addressValidationInputDataByFieldName.streetAddressLine1.value,\n            addressValidationInputDataByFieldName.streetAddressLine2.value,\n            addressValidationInputDataByFieldName.city.value,\n            addressValidationInputDataByFieldName.state.value,\n            addressValidationInputDataByFieldName.country.value,\n            addressValidationInputDataByFieldName.zipCode.value,\n            timezone,\n            true,\n            {\n                freeTrialSource: window.location.href,\n            },\n            retailerOnrampType,\n        )\n        .then((result) => {\n            const beverageLocationId = result.beverageLocationId;\n            const foodLocationId = result.foodLocationId;\n\n            let retailerIdForRedirect : LocationId | null;\n            if (retailerAccountType === AccountType.BEVERAGE) {\n                retailerIdForRedirect = beverageLocationId;\n            } else {\n                retailerIdForRedirect = foodLocationId;\n            }\n\n            let hubspotCookie : string | null = null;\n            try {\n                hubspotCookie = extraArguments.services.cookieReader.getCookie('hubspotutk');\n            } catch (error) {\n                if (!(error instanceof UnknownCookieException)) {\n                    throw error;\n                }\n            }\n\n            let userCreatedConversionPromise : Promise<void>;\n            if (userIsNewAccount) {\n                userCreatedConversionPromise = Observer.trackConversion.userCreated({\n                    email: userEmail,\n                    phone: userPhone,\n                    bar_name: retailerName,\n                    first_name: userFirstName,\n                    last_name: userLastName,\n                    zip_code: addressValidationInputDataByFieldName.zipCode.value,\n                    subscribe_to_blog: false, // always false now?\n                    hubspot_cookie: hubspotCookie,\n                    is_admin_created: false,\n                    source_url: window.location.href,\n                    should_receive_marketing: true,\n                    creator_user_id: null,\n                    retailer_id: null,\n                });\n            } else {\n                userCreatedConversionPromise = Promise.resolve();\n            }\n\n            return Promise.all([\n                extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId(),\n                userCreatedConversionPromise,\n                Observer.trackConversion.retailerCreated({\n                    user_first_name: userFirstName,\n                    user_last_name: userLastName,\n                    user_email: userEmail,\n                    user_phone : userPhone,\n                    beverage_retailer_id: (beverageLocationId === null) ? null : beverageLocationId.getValue(),\n                    food_retailer_id: (foodLocationId === null) ? null : foodLocationId.getValue(),\n                    source_url: document.referrer,\n                    retailer_name: retailerName,\n                    retailer_address_line1: addressValidationInputDataByFieldName.streetAddressLine1.value,\n                    retailer_address_line2: addressValidationInputDataByFieldName.streetAddressLine2.value,\n                    retailer_country_code: addressValidationInputDataByFieldName.country.value,\n                    retailer_city : addressValidationInputDataByFieldName.city.value,\n                    retailer_zipcode: addressValidationInputDataByFieldName.zipCode.value,\n                    group_location_count: null,\n                    introduction_source: null,\n                    introduction_drilldown: null,\n                    introduction_free_text: null,\n                    product_subscription: null, // TODO verify\n                    hubspot_cookie: hubspotCookie,\n                    is_admin_created: false,\n                    should_receive_marketing: true,\n                    creator_user_id: userAccountId.getValue(),\n                    promo_code: null,\n                    getting_started_source: window.location.href,\n                    beverage_free_trial_getting_started_type: (beverageLocationId === null) ? null : retailerOnrampType,\n                    food_free_trial_getting_started_type: (foodLocationId === null) ? null : retailerOnrampType,\n                })\n            ])\n            .then((result1) => {\n                const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId = result1[0];\n                const userFullName = userFirstName + ' ' + userLastName;\n                Observer.identifyAuthenticated(userAccountId, userFullName, userEmail, null);\n                Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n\n                if (userIsNewAccount) {\n                    void Observer.observeAction('New User Account Created', {\n                        referrer: document.referrer,\n                        page: window.location.pathname,\n                        unauthenticatedUserSessionId: unauthenticatedUserSessionId.value,\n                    });\n\n                    void Observer.observeAction('Clicked button to submit sign up form', {});\n                    void Observer.observeAction('Successfully Submitted Sign Up Form', {\n                        userAccountId: userAccountId.getValue(),\n                    });\n                }\n\n                if (retailerIdForRedirect === null) {\n                    throw new RuntimeException('unexpected retailerIdForRedirect is null');\n                }\n\n                if (retailerOnrampType === 'inventory_template' || retailerOnrampType === 'invoice_upload' || retailerOnrampType === 'invoice_upload_food') {\n                    window.location.href = PathUtils.getAbsolutePathForRequest(`/account/item_manager/r/${ retailerIdForRedirect.getValue() }`);\n                } else if (retailerOnrampType === 'recipe_costing' || retailerOnrampType === 'recipe_costing_food' || retailerOnrampType === 'drink_price_tool') {\n                    window.location.href = PathUtils.getAbsolutePathForRequest(`/sales/items/sales_item_manager/r/${ retailerIdForRedirect.getValue() }`);\n                } else {\n                    window.location.href = PathUtils.getAbsolutePathForRequest(`/account/dashboard/${ retailerIdForRedirect.getValue() }`);\n                }\n            });\n        })\n        .catch((error : Error) => {\n            // dispatch(setIsSubmitting(false));\n            throw error;\n        });\n    };\n};\n\nexport const RetailerOnrampFormActions : RetailerOnrampFormActionInterfaces.IRetailerOnrampFormActionCreatorsMapObject = {\n    onCreateRetailer,\n};\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { AccountType } from 'api/Location/model/AccountType';\nimport { RetailerGettingStartedType } from 'api/Location/model/RetailerGettingStartedType';\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { ISignUpFormState } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\n\nimport { AddressFormFieldName } from 'shared/components/AddressForm/AddressForm';\nimport { ConnectedEmbeddedSignUpForm, IConnectedEmbeddedSignUpFormProps } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/EmbeddedSignUpForm';\nimport { IEmbeddedSignUpFormState } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/reducers';\nimport { SignUpOptionsFormActions } from 'shared/components/SignUpOrSignIn/SignUpOptions/actions';\nimport { ConnectedSlimCreateRetailerForm } from 'shared/components/SignUpOrSignIn/SlimCreateRetailerForm/SlimCreateRetailerForm';\nimport { IValidationInputData } from 'shared/components/ValidationInput';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\nimport { RetailerOnrampFormActions, RetailerOnrampFormActionInterfaces } from './actions';\n\nimport { logJsError } from 'shared/global/datadogLogger';\nimport { RuntimeException } from 'shared/lib/general/exceptions/RuntimeException';\nimport { PathUtils } from 'shared/utils/pathUtils';\nimport { BevSpotDispatch } from 'shared/components/Provider';\n\nimport 'shared/css/MakeItSpin.scss';\n\nconst validRetailerGettingStartedTypes = new Set<RetailerGettingStartedType>([\n    'inventory_template', 'inventory_template_food', 'recipe_costing', 'recipe_costing_food', 'bar_manager',\n    'kitchen_manager', 'owner_beverage', 'owner_food', 'drink_price_tool', 'invoice_upload', 'invoice_upload_food',\n    'lightspeed', 'square', 'toast', 'upserve', 'ambit', 'troon'\n]);\n\nexport const RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID = 'retailer-required-download-gate-mount'; // Note: This should match the ID of the mount element for this component because we've decided to set the needed data attribute there\nconst RETAILER_ONRAMP_TYPE_ATTRIBUTE_NAME = 'data-retailer-onramp-type';\n\ninterface IRetailerOnrampFormProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n    embeddedSignUpFormState : IEmbeddedSignUpFormState;\n}\n\ninterface IConnectedRetailerOnrampFormProps extends IRetailerOnrampFormProps {\n    dispatch : BevSpotDispatch<IRetailerOnrampFormProps, { services: RetailerOnrampFormActionInterfaces.IServices }>;\n}\n\nclass RetailerOnrampForm extends React.Component<IConnectedRetailerOnrampFormProps, object> {\n\n    private retailerOnrampType : RetailerGettingStartedType | null = null; // can add additional values as they come up\n    private retailerAccountType : AccountType = AccountType.BEVERAGE;\n\n    public UNSAFE_componentWillMount() {\n        const RetailerOnrampFormMountElement : HTMLElement | null = document.getElementById(RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID);\n\n        if (RetailerOnrampFormMountElement) {\n            const retailerOnrampTypeAttributeValue = RetailerOnrampFormMountElement.getAttribute(RETAILER_ONRAMP_TYPE_ATTRIBUTE_NAME);\n            RetailerOnrampFormMountElement.removeAttribute(RETAILER_ONRAMP_TYPE_ATTRIBUTE_NAME);\n\n            if (!retailerOnrampTypeAttributeValue) {\n                logJsError(\n                    'Could not get retailer onramp type data attribute. Found element with Id: ' + RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID + 'Was expecting attribute: ' + RETAILER_ONRAMP_TYPE_ATTRIBUTE_NAME,\n                    { isHandled: true },\n                    new RuntimeException('Could not get retailer onramp type data attribute')\n                );\n            }\n\n            if (retailerOnrampTypeAttributeValue !== null && !validRetailerGettingStartedTypes.has(retailerOnrampTypeAttributeValue as RetailerGettingStartedType)) {\n                logJsError(\n                    'Invalid retailer onramp type: ' + retailerOnrampTypeAttributeValue,\n                    { isHandled: true },\n                    new RuntimeException('Invalid retailer onramp type')\n                );\n                this.retailerOnrampType = null;\n            } else {\n                this.retailerOnrampType = retailerOnrampTypeAttributeValue as RetailerGettingStartedType;\n            }\n        } else {\n            logJsError(\n                'Could not find mount point for download gate when trying to get download url. Was expecting ' + RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID,\n                { isHandled: true },\n                new RuntimeException('Could not find mount point for download gate')\n            );\n            this.retailerOnrampType = null;\n        }\n\n        switch (this.retailerOnrampType) {\n            case 'inventory_template_food':\n            case 'recipe_costing_food':\n            case 'owner_food':\n            case 'kitchen_manager':\n            case 'invoice_upload_food':\n                this.retailerAccountType = AccountType.FOOD;\n                break;\n            case null:\n            case 'toast':\n            case 'lightspeed':\n            case 'square':\n            case 'default':\n            case 'test':\n            case 'inventory_template':\n            case 'recipe_costing':\n            case 'bar_manager':\n            case 'owner_beverage':\n            case 'drink_price_tool':\n            case 'invoice_upload':\n            case 'upserve':\n            case 'ambit':\n            case 'troon':\n            default:\n                this.retailerAccountType = AccountType.BEVERAGE;\n                break;\n        }\n    }\n\n    public render() {\n        const {\n            dispatch,\n            signUpAndLoginButtonsState,\n            embeddedSignUpFormState,\n        } = this.props;\n\n        if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n            return (\n                <div>\n                    <span className=\"bevicon bevico-spinner2 make-it-spin loading-spinner\"/>\n                </div>\n            );\n        }\n\n        if ((signUpAndLoginButtonsState.loggedInUser === null)) {\n            let aboveForm : JSX.Element | null = null;\n            let belowForm : JSX.Element | null = null;\n\n            if (embeddedSignUpFormState.signUpForm.hasSuccessfullySubmitted) {\n                aboveForm = (\n                    <div>\n                        <h5>You&rsquo;ve unlocked this resource!</h5>\n                        { /* downloadElement */ }\n                    </div>\n                );\n            } else {\n                const onWantsToLogIn = () => {\n                    dispatch(SignUpOptionsFormActions.onSetActiveForm('signInForm'));\n                    dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n                };\n\n                aboveForm  = (\n                    <div>\n                        <h5>To access this resource, sign up for BevSpot free!</h5>\n                    </div>\n                );\n                belowForm = (\n                    <p className=\"small\">\n                        &nbsp; <br/>Already have a BevSpot account?<br/>\n                        <a onClick={ onWantsToLogIn }>Log in</a> to get access.\n                    </p>\n                );\n            }\n\n            const connectedEmbeddedSignUpFormProps : IConnectedEmbeddedSignUpFormProps = {\n                additionalFieldsAreShown: true,\n                additionalRetailerFieldsAreRequired: true,\n                onSuccessfulSignUp: (userAccountIdentifier : UserAccountId, signUpFormState : ISignUpFormState) => {\n                    return dispatch(RetailerOnrampFormActions.onCreateRetailer(\n                                        userAccountIdentifier,\n                                        true,\n                                        signUpFormState.validationInputDataByFieldName.barName.value,\n                                        signUpFormState.validationInputDataByFieldName,\n                                        signUpFormState.validationInputDataByFieldName.firstName.value,\n                                        signUpFormState.validationInputDataByFieldName.lastName.value,\n                                        signUpFormState.validationInputDataByFieldName.phone.value,\n                                        signUpFormState.validationInputDataByFieldName.emailAddress.value,\n                                        this.retailerAccountType,\n                                        this.retailerOnrampType));\n                },\n            };\n\n            return (\n                <div className=\"download-gate\">\n                    { aboveForm }\n                    <ConnectedEmbeddedSignUpForm { ...connectedEmbeddedSignUpFormProps }/>\n                    { belowForm }\n                </div>\n            );\n        }\n\n        return (\n            <div className=\"retailer-required-download-gate\">\n                <p>\n                    Welcome back{ (signUpAndLoginButtonsState.loggedInUser.userInfo === null) ? '' : ', ' + signUpAndLoginButtonsState.loggedInUser.userInfo.firstName }!\n                </p>\n\n                { signUpAndLoginButtonsState.loggedInUser.userInfo !== null && signUpAndLoginButtonsState.loggedInUser.userInfo.hasAccessibleRetailers &&\n                    <p>\n                        { (this.retailerOnrampType === 'inventory_template' || this.retailerOnrampType === 'inventory_template_food') &&\n                            <p>&nbsp; <br/>You can access your inventory spreadsheet from <a href={ PathUtils.getAbsolutePathForRequest('/account/item_manager') }>My Items</a> in your account.</p>\n                        }\n                        { (this.retailerOnrampType === 'recipe_costing' || this.retailerOnrampType === 'recipe_costing_food') &&\n                            <p>&nbsp; <br/>You can access recipe costing from <a href={ PathUtils.getAbsolutePathForRequest('/inventory/history/?recordPrep=true') }>Prepared Items</a> in your account.</p>\n                        }\n                        { (this.retailerOnrampType === 'invoice_upload' || this.retailerOnrampType === 'invoice_upload_food') &&\n                            <p>&nbsp; <br/>Upload your invoices to get started from <a href={ PathUtils.getAbsolutePathForRequest('/account/item_manager') }>My Items</a> in your account.</p>\n                        }\n                    </p>\n                }\n\n                { signUpAndLoginButtonsState.loggedInUser.userInfo !== null && !signUpAndLoginButtonsState.loggedInUser.userInfo.hasAccessibleRetailers &&\n                    <div>\n                        <div>\n                            <h5>To access this resource, sign up for BevSpot free!</h5>\n                        </div>\n                        <ConnectedSlimCreateRetailerForm\n                            onSubmit={ this.onSubmitRetailerForm }\n                        />\n                    </div>\n                }\n\n                { signUpAndLoginButtonsState.loggedInUser.userInfo === null || signUpAndLoginButtonsState.loggedInUser.userInfo.hasAccessibleRetailers &&\n                    <p>\n                        &nbsp; <br/>Remember, by joining you&rsquo;ve unlocked more resources! Check them out on your <a href={ PathUtils.getAbsolutePathForRequest('/user') }>user dashboard</a>\n                    </p>\n                }\n            </div>\n        );\n    }\n\n    private readonly onSubmitRetailerForm = (retailerName : string, addressForm : {[fieldName in AddressFormFieldName] : IValidationInputData }) => {\n        const {\n            signUpAndLoginButtonsState,\n            dispatch,\n        } = this.props;\n\n        if (signUpAndLoginButtonsState.loggedInUser === null || typeof signUpAndLoginButtonsState.loggedInUser === 'undefined' || signUpAndLoginButtonsState.loggedInUser.userInfo === null) {\n            throw new RuntimeException('unexpected no logged in user');\n        }\n\n        const userAccountIdentifier = signUpAndLoginButtonsState.loggedInUser.userId;\n        return dispatch(RetailerOnrampFormActions.onCreateRetailer(\n                            userAccountIdentifier,\n                            false,\n                            retailerName,\n                            addressForm,\n                            signUpAndLoginButtonsState.loggedInUser.userInfo.firstName,\n                            signUpAndLoginButtonsState.loggedInUser.userInfo.lastName,\n                            signUpAndLoginButtonsState.loggedInUser.userInfo.phoneNumber || '', // TODO? do we need this?\n                            signUpAndLoginButtonsState.loggedInUser.userInfo.emailAddress,\n                            this.retailerAccountType,\n                            this.retailerOnrampType));\n    }\n}\n\nconst mapStateToProps = (state : IRetailerOnrampFormProps) : IRetailerOnrampFormProps => {\n    return {\n        signUpAndLoginButtonsState : state.signUpAndLoginButtonsState,\n        embeddedSignUpFormState : state.embeddedSignUpFormState,\n    };\n};\n\nexport const ConnectedRetailerOnrampForm = connect<IRetailerOnrampFormProps, object, object, IRetailerOnrampFormProps>(mapStateToProps)(RetailerOnrampForm);\n","import React from 'react';\nimport { connect } from 'react-redux';\n\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\nimport { ISignUpFormState } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\n\nimport { Button } from 'shared/components/Button';\nimport { ConnectedEmbeddedSignUpForm, IConnectedEmbeddedSignUpFormProps } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/EmbeddedSignUpForm';\nimport { IEmbeddedSignUpFormState } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/reducers';\nimport { SignUpOptionsFormActions } from 'shared/components/SignUpOrSignIn/SignUpOptions/actions';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\nimport { UserSignUpFormActionInterfaces, UserSignUpFormActions } from './actions';\n\nimport { PathUtils } from 'shared/utils/pathUtils';\n\nimport 'shared/css/MakeItSpin.scss';\nimport { BevSpotDispatch } from 'shared/components/Provider';\n\ninterface IUserSignUpFormProps {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n    embeddedSignUpFormState : IEmbeddedSignUpFormState;\n}\n\ninterface IConnectedUserSignUpFormProps extends IUserSignUpFormProps {\n    dispatch : BevSpotDispatch<IUserSignUpFormProps, { services: UserSignUpFormActionInterfaces.IServices }>;\n}\n\nclass UserSignUpForm extends React.Component<IConnectedUserSignUpFormProps, object> {\n\n    public render() {\n        const {\n            dispatch,\n            signUpAndLoginButtonsState,\n            embeddedSignUpFormState,\n        } = this.props;\n\n        if (typeof(signUpAndLoginButtonsState.loggedInUser) === 'undefined') {\n            return (\n                <div>\n                    <span className=\"bevicon bevico-spinner2 make-it-spin loading-spinner\"/>\n                </div>\n            );\n        }\n\n        if ((signUpAndLoginButtonsState.loggedInUser === null)) {\n            let aboveForm : JSX.Element | null = null;\n            let belowForm : JSX.Element | null = null;\n\n            if (embeddedSignUpFormState.signUpForm.hasSuccessfullySubmitted) {\n                const onClick = () => {\n                    window.open(PathUtils.getAbsolutePathForRequest('/user'), '_blank');\n                };\n\n                aboveForm = (\n                    <div>\n                        <h5>You&rsquo;ve created your user account!</h5>\n                        <div>\n                            <p>Confirm you account then go to your user home to get customized content.</p>\n                            <Button\n                                buttonClassName=\"bs-psb\"\n                                isDisabled={ false }\n                                isLoading={ false }\n                                onClick={ onClick }\n                            >\n                                Go to user home\n                            </Button>\n                        </div>\n                    </div>\n                );\n            } else {\n                const onWantsToLogIn = () => {\n                    dispatch(SignUpOptionsFormActions.onSetActiveForm('signInForm'));\n                    dispatch(SignUpOptionsFormActions.onSetFormIsShown(true));\n                };\n\n                belowForm = (\n                    <p className=\"small\">\n                        &nbsp; <br/>Already have a BevSpot account?<br/>\n                        <a onClick={ onWantsToLogIn }>Log in</a> to get access.\n                    </p>\n                );\n            }\n\n            const connectedEmbeddedSignUpFormProps : IConnectedEmbeddedSignUpFormProps = {\n                additionalFieldsAreShown : false,\n                additionalRetailerFieldsAreRequired : false,\n                onSuccessfulSignUp : (userAccountIdentifier : UserAccountId, signUpFormState : ISignUpFormState) => {\n                    return dispatch(UserSignUpFormActions.onSuccessfulSignUp(userAccountIdentifier, signUpFormState));\n                },\n            };\n\n            return (\n                <div className=\"user-sign-up-form\">\n                    { aboveForm }\n                    <ConnectedEmbeddedSignUpForm { ...connectedEmbeddedSignUpFormProps }/>\n                    { belowForm }\n                </div>\n            );\n        }\n\n        return (\n            <div className=\"user-sign-up-form\">\n                <p>\n                    Welcome back { (signUpAndLoginButtonsState.loggedInUser.userInfo === null) ? '' : ', ' + signUpAndLoginButtonsState.loggedInUser.userInfo.firstName }!\n\n                    &nbsp; <br/>Check out your <a href={ PathUtils.getAbsolutePathForRequest('/user') }>user dashboard</a>\n                </p>\n            </div>\n        );\n    }\n}\n\nconst mapStateToProps = (state : IUserSignUpFormProps) : IUserSignUpFormProps => {\n    return {\n        signUpAndLoginButtonsState : state.signUpAndLoginButtonsState,\n        embeddedSignUpFormState : state.embeddedSignUpFormState,\n    };\n};\n\nexport const ConnectedUserSignUpForm = connect<IUserSignUpFormProps, object, object, IUserSignUpFormProps>(mapStateToProps)(UserSignUpForm);\n","import { ActionCreatorsMapObject } from '@reduxjs/toolkit';\nimport { ThunkAction } from 'shared/models/IAction';\n\nimport UnauthenticatedUserSessionModel from 'gen-thrift/unauthenticated_user_session_Model_types';\n\nimport { IPublicContentViewEventService } from 'api/PublicContent/interfaces/IPublicContentViewEventService';\n\nimport { IUserAccountInfoReader } from 'api/UserAccount/interfaces/IUserAccountInfoReader';\nimport { UserAccountId } from 'api/UserAccount/model/UserAccountId';\n\nimport { UserAccountManagerImpl } from 'shared/lib/account/impl/UserAccountManagerImpl';\nimport { UserPasswordManagerImpl } from 'shared/lib/account/impl/UserPasswordManagerImpl';\nimport { UserSessionManagerImpl } from 'shared/lib/account/impl/UserSessionManagerImpl';\nimport { UnknownCookieException } from 'shared/lib/cookie/exceptions/UnknownCookieException';\nimport { ICookieReader } from 'shared/lib/cookie/interfaces/ICookieReader';\nimport { UnauthenticatedUserSessionManagerImpl } from 'shared/lib/unauthenticated_user_session/impl/UnauthenticatedUserSessionManagerImpl';\n\nimport { ISignUpFormState } from 'shared/components/SignUpOrSignIn/SignUpForm/reducers';\nimport { ISignUpAndLoginButtonsState } from '../SignUpAndLoginButtons/reducers';\n\nimport { Observer } from 'shared/utils/observer';\n\ninterface IPublicSiteStore {\n    signUpAndLoginButtonsState : ISignUpAndLoginButtonsState;\n}\n\nexport namespace UserSignUpFormActionInterfaces {\n    export interface IUserSignUpFormActionCreatorsMapObject extends ActionCreatorsMapObject {\n        onSuccessfulSignUp : (\n            userAccountIdentifier : UserAccountId,\n            signUpFormState : ISignUpFormState\n        ) => ThunkAction<Promise<void>, IPublicSiteStore, {services : UserSignUpFormActionInterfaces.IServices}>;\n    }\n\n    export interface IServices {\n        cookieReader : ICookieReader;\n        publicContentViewEventService : IPublicContentViewEventService;\n        unauthenticatedUserSessionManager : UnauthenticatedUserSessionManagerImpl;\n        userSessionManager : UserSessionManagerImpl;\n        userAccountInfoReader : IUserAccountInfoReader;\n        userAccountManager : UserAccountManagerImpl;\n        userPasswordManager : UserPasswordManagerImpl;\n    }\n}\n\nconst onSuccessfulSignUp = (\n    userAccountId : UserAccountId,\n    signUpFormState : ISignUpFormState\n) : ThunkAction<Promise<void>, IPublicSiteStore, {services : UserSignUpFormActionInterfaces.IServices}> => {\n    return (dispatch, getState, extraArguments) : Promise<void> => {\n        const inputDataByFieldName = signUpFormState.validationInputDataByFieldName;\n\n        let hubspotCookie : string | null = null;\n        try {\n            hubspotCookie = extraArguments.services.cookieReader.getCookie('hubspotutk');\n        } catch (error) {\n            if (!(error instanceof UnknownCookieException)) {\n                throw error;\n            }\n        }\n\n        return Promise.all([\n            extraArguments.services.unauthenticatedUserSessionManager.getOrCreateUnauthenticatedUserSessionId(),\n            Observer.trackConversion.userCreated({\n                email: inputDataByFieldName.emailAddress.value,\n                phone: inputDataByFieldName.phone.value,\n                bar_name: inputDataByFieldName.barName.value,\n                first_name: inputDataByFieldName.firstName.value,\n                last_name: inputDataByFieldName.lastName.value,\n                zip_code: inputDataByFieldName.optionalZipCode.value,\n                subscribe_to_blog: inputDataByFieldName.subscribeToBlog.value,\n                hubspot_cookie : hubspotCookie,\n                is_admin_created: false,\n                source_url: window.location.href,\n                should_receive_marketing: true,\n                creator_user_id: null,\n                retailer_id: null,\n            })\n        ])\n        .then((result) => {\n            const unauthenticatedUserSessionId : UnauthenticatedUserSessionModel.UnauthenticatedUserSessionId = result[0];\n            const userFullName = inputDataByFieldName.firstName.value + ' ' + inputDataByFieldName.lastName.value;\n            Observer.identifyAuthenticated(userAccountId, userFullName, inputDataByFieldName.emailAddress.value, null);\n            void Observer.observeAction('New User Account Created', {\n                referrer: document.referrer,\n                page: window.location.pathname,\n                unauthenticatedUserSessionId: unauthenticatedUserSessionId.value,\n            });\n\n            Observer.identifyUnauthenticated(unauthenticatedUserSessionId);\n            void Observer.observeAction('Clicked button to submit sign up form', {});\n            void Observer.observeAction('Successfully Submitted Sign Up Form', {\n                userAccountId: userAccountId.getValue(),\n            });\n        });\n    };\n};\n\nexport const UserSignUpFormActions : UserSignUpFormActionInterfaces.IUserSignUpFormActionCreatorsMapObject = {\n    onSuccessfulSignUp,\n};\n","import { createRoot } from \"react-dom/client\";\nimport { combineReducers } from '@reduxjs/toolkit';\n\nimport {\n    cookieManager,\n    locationService,\n    publicContentViewEventService,\n    queryStringManager,\n    unauthenticatedUserSessionManager,\n    userAccountInfoService,\n    userAccountManager,\n    userPasswordManager,\n    userSessionManager,\n} from 'shared/lib/manager';\n\nimport { Auth } from 'aws-amplify';\nimport { DjangoApiManager } from 'shared/api/DjangoApiManager';\n\nimport { RetailerOnrampFormActionInterfaces } from 'apps/PublicSite/RetailerOnrampForm/actions';\nimport { ActionInterfaces as UserSessionActionInterfaces } from 'apps/UserSessionApp/actions';\nimport { UserSessionReducers } from 'apps/UserSessionApp/reducers';\n\nimport { SignUpAndLoginButtonsActionInterfaces, SignUpAndLoginButtonsActions } from './SignUpAndLoginButtons/actions';\n\nimport { ErrorNotificationDialogReducers } from 'shared/apps/ErrorNotificationDialog/reducers/reducers';\nimport { EmbeddedSignUpFormReducers } from 'shared/components/SignUpOrSignIn/EmbeddedSignUpForm/reducers';\nimport { SignUpFormActionInterfaces } from 'shared/components/SignUpOrSignIn/SignUpForm/actions';\nimport { SignUpOptionsReducers } from 'shared/components/SignUpOrSignIn/SignUpOptions/reducers';\nimport { SignUpAndLoginButtonsReducers } from './SignUpAndLoginButtons/reducers';\n\nimport { BevSpotDispatch, Provider } from 'shared/components/Provider';\n\nimport { SlimCreateRetailerFormReducers } from 'shared/components/SignUpOrSignIn/SlimCreateRetailerForm/reducers';\nimport { ConnectedDownloadGate } from './DownloadGate/DownloadGate';\nimport { ConnectedGetStartedForm } from './GetStartedForm/GetStartedForm';\nimport { ConnectedGetStartedWithEmail } from './GetStartedWithEmail/GetStartedWithEmail';\nimport { ConnectedPublicSite } from './PublicSite';\nimport { ConnectedRetailerOnrampForm, RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID } from './RetailerOnrampForm/RetailerOnrampForm';\nimport { ConnectedUserSignUpForm } from './UserSignUpForm/UserSignUpForm';\n\ntype IServices = SignUpAndLoginButtonsActionInterfaces.IServices & SignUpFormActionInterfaces.IServices & RetailerOnrampFormActionInterfaces.IServices & UserSessionActionInterfaces.IServices;\nconst services : IServices = {\n    publicContentViewEventService,\n    unauthenticatedUserSessionManager,\n    userSessionManager,\n    userSessionTerminator: userSessionManager,\n    userSessionCreator: userSessionManager,\n    userSessionReader: userSessionManager,\n    userAccountInfoReader: userAccountInfoService,\n    userAccountManager,\n    userPasswordManager,\n    cookieReader: cookieManager,\n    djangoApiManager: new DjangoApiManager(),\n    locationService,\n    queryStringReader: queryStringManager,\n    cookieDeleter: cookieManager,\n};\n\nconst publicSiteAppReducers = combineReducers({\n    signUpAndLoginButtonsState: SignUpAndLoginButtonsReducers,\n    signUpOptionsState: SignUpOptionsReducers,\n    embeddedSignUpFormState : EmbeddedSignUpFormReducers,\n    errorNotificationDialogState: ErrorNotificationDialogReducers,\n    slimCreateRetailerFormState: SlimCreateRetailerFormReducers,\n    userSession: UserSessionReducers,\n});\n\nconst publicSiteStore = Provider.createStore(publicSiteAppReducers, services);\ntype AppState = ReturnType<typeof publicSiteStore[\"getState\"]>;\nconst dispatch = publicSiteStore.dispatch as BevSpotDispatch<AppState, {services: IServices}>;\ndispatch(SignUpAndLoginButtonsActions.onMount());\nAuth.configure(window.AMPLIFY_CONFIG);\n\nconst publicSiteRoot = createRoot(document.getElementById('public-site-app')!);\npublicSiteRoot.render(\n    <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n        <ConnectedPublicSite />\n    </Provider>\n);\n\nconst downloadGateElement = document.getElementById('download-gate-mount');\nif (downloadGateElement) {\n    const downloadGateRoot = createRoot(downloadGateElement);\n    downloadGateRoot.render(\n        <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n            <ConnectedDownloadGate />\n        </Provider>\n    );\n}\n\nconst retailerRequiredDownloadGateElement = document.getElementById(RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID);\nif (retailerRequiredDownloadGateElement) {\n    const retailerRequiredDownloadGateRoot = createRoot(retailerRequiredDownloadGateElement);\n    retailerRequiredDownloadGateRoot.render(\n        <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n            <ConnectedRetailerOnrampForm />\n        </Provider>\n    );\n}\n\nconst userSignUpElement = document.getElementById('user-sign-up-form-mount');\nif (userSignUpElement) {\n    const userSignUpRoot = createRoot(userSignUpElement);\n    userSignUpRoot.render(\n        <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n            <ConnectedUserSignUpForm />\n        </Provider>\n    );\n}\n\nconst createRetailerFormElement = document.getElementById('create-retailer-form-mount');\nif (createRetailerFormElement) {\n    const createRetailerRoot = createRoot(createRetailerFormElement);\n    createRetailerRoot.render(\n        <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n            <ConnectedGetStartedForm />\n        </Provider>\n    );\n}\n\nconst getStartedWithEmailElement = document.getElementById('get-started');\nif (getStartedWithEmailElement) {\n    const getStartedRoot = createRoot(getStartedWithEmailElement);\n    getStartedRoot.render(\n        <Provider appReducers={ publicSiteAppReducers } services={ services } store={ publicSiteStore }>\n            <ConnectedGetStartedWithEmail/>,\n        </Provider>\n    );\n}\n"],"names":["SignUpAndLogInButtons","React","render","onClickSignUp","onClickLogIn","this","props","_jsxs","className","children","_jsx","MediaQuery","maxWidth","MAX_MOBILE_WIDTH","minWidth","MIN_TABLET_WIDTH","Button","buttonClassName","isDisabled","isLoading","onClick","getPublicContentParameters","publicContentUrl","location","URLStringUtils","getLocation","hostname","host","path","pathname","queryString","split","publicContentUrlParameters","parseQueryString","PublicContentModel","RuntimeException","ActionTypes","setLoggedInUser","loggedInUser","payload","type","getLoggedInUserIdAndUserInfo","authenticatedUserSessionId","dispatch","getState","extraArguments","services","userSessionManager","getAccountId","then","userId","userInfo","userAccountInfoReader","getAccountInfo","accountInfo","getAccountRetailers","retailers","firstName","lastName","emailAddress","phoneNumber","hasAccessibleRetailers","retailerIds","length","SignUpAndLoginButtonsActions","isShown","setUserIconPopoverIsShown","EmbeddedSignUpFormReducers","combineReducers","signUpForm","SignUpFormReducers","thanksForRegistering","ThanksForRegisteringReducers","publicSiteInitialState","undefined","userIconPopoverIsShown","unauthenticatedUserSessionId","setFormFieldValidationData","field","value","isValid","errorMessage","setFormValidationData","SlimCreateRetailerFormActions","formState","validationInputDataByFieldName","formIsValid","Object","keys","forEach","key","fieldName","fieldValue","validationResult","validateValueByFieldName","isSubmitting","Promise","resolve","SlimCreateRetailerFormInitialState","retailerName","country","city","state","streetAddressLine1","streetAddressLine2","zipCode","EmbeddedSignUpForm","embeddedSignUpFormState","additionalFieldsAreShown","additionalRetailerFieldsAreRequired","onSuccessfulSignUp","getRenderedComponent","hasSuccessfullySubmitted","onSendEmailAgainClick","ThanksForRegisteringActions","onResendEmail","onCloseButtonClick","ThanksForRegistering","isEmbeddedInModal","isResendingEmail","isEmailResent","onFormFieldChange","SignUpFormActions","onFormFieldBlur","setAddressFormField","validationInputData","onSetAddressFormField","onSubmit","userAccountIdentifier","onSetHasSuccessfullySubmitted","SignUpForm","headerTitle","headerMessage","signUpFormState","additionalUserFieldsAreShown","additionalRetailerFieldsAreShown","submitButtonContents","ConnectedEmbeddedSignUpForm","connect","mapStateToProps","ownProps","DownloadGateActions","downloadUrl","Observer","trackConversion","downloadedContent","window","href","publicSiteState","signUpAndLoginButtonsState","publicContentParameters","publicContentViewEventService","createPublicContentViewEventForAuthenticatedSession","PublicContentViewEventTypeEnum","DOWNLOAD","PublicContentUrl","document","referrer","createPublicContentViewEventForUnauthenticatedSession","DOWNLOAD_GATE_MOUNT_ELEMENT_ID","DOWNLOAD_URL_ATTRIBUTE_NAME","DownloadGate","constructor","super","arguments","downloadButtonText","UNSAFE_componentWillMount","downloadGateMountElement","getElementById","downloadUrlAttributeValue","getAttribute","removeAttribute","logJsError","isHandled","downloadButtonTextAttributeValue","additionalFieldsAreShownAttributeValue","downloadElement","open","PathUtils","getAbsolutePathForRequest","aboveForm","belowForm","onWantsToLogIn","SignUpOptionsFormActions","onSetActiveForm","onSetFormIsShown","connectedEmbeddedSignUpFormProps","userAccountId","inputDataByFieldName","hubspotCookie","cookieReader","getCookie","error","UnknownCookieException","all","unauthenticatedUserSessionManager","getOrCreateUnauthenticatedUserSessionId","userCreated","email","phone","bar_name","barName","first_name","last_name","zip_code","optionalZipCode","subscribe_to_blog","subscribeToBlog","hubspot_cookie","is_admin_created","source_url","should_receive_marketing","creator_user_id","retailer_id","result","userFullName","identifyAuthenticated","observeAction","page","identifyUnauthenticated","getValue","_extends","ConnectedDownloadGate","GetStartedFormActions","onSuccessfulUserSignUp","signUpData","GetStartedForm","onSignUpAndCreateRetailerFormSubmit","signUpOptionsState","signUpOptionsForm","search","doNothing","userName","ConnectedGetStartedForm","GetStartedWithEmail","onSignIn","e","emailValue","target","LoadingCover","hasLoadingIcon","ValidationInput","inputClassName","autoFocus","autoComplete","handleBlur","handleFocus","handleChange","handleEnterClick","label","hintText","ConnectedGetStartedWithEmail","PUBLIC_SITE_MOUNT_ELEMENT_ID","INITIAL_ACTIVE_FORM_NAME","CLICK_SELECTOR_CLASS","DASHBOARD_REDIRECT_URL","PublicSite","defaultInitialActiveFormName","initialActiveFormName","availableForms","onConnectedSignUpOptionsSuccessfulSignIn","getSessionId","AccountSessionNotFoundException","PAGE_VIEW","observePageView","onConnectedSignUpOptionsSuccessfulSignUp","onSignUpAndLogInButtonsClickSignUp","active","onSignUpAndLogInButtonsClickLogIn","onUserIconWithPopoverIconClick","popoverIsShown","signUpOptionsFormMountElement","initialActiveFormAttributeValue","indexOf","componentDidMount","$","on","event","triggerSource","newURL","replaceOrRemoveURLParameter","history","replaceState","componentWillUnmount","off","loadingSpinner","ConnectedSignUpOptions","availableFormOptions","isDismissible","formIsVisibleOnLoad","onSuccessfulSignIn","ConnectedUserButtonApp","ConnectedPublicSite","SlimCreateRetailerForm","onSubmitFormClick","slimCreateRetailerFormState","makeValidationInput","fieldData","currentTarget","ConnectedAddressForm","rowClassName","addressLine1Label","addressLine2Label","countryIsDisabled","setValidationInputForField","onEnterClick","ConnectedSlimCreateRetailerForm","RetailerOnrampFormActions","onCreateRetailer","userIsNewAccount","addressValidationInputDataByFieldName","userFirstName","userLastName","userPhone","userEmail","retailerAccountType","retailerOnrampType","timezone","moment","guess","locationService","createLocations","AccountType","BEVERAGE","FOOD","freeTrialSource","beverageLocationId","foodLocationId","retailerIdForRedirect","userCreatedConversionPromise","retailerCreated","user_first_name","user_last_name","user_email","user_phone","beverage_retailer_id","food_retailer_id","retailer_name","retailer_address_line1","retailer_address_line2","retailer_country_code","retailer_city","retailer_zipcode","group_location_count","introduction_source","introduction_drilldown","introduction_free_text","product_subscription","promo_code","getting_started_source","beverage_free_trial_getting_started_type","food_free_trial_getting_started_type","result1","catch","validRetailerGettingStartedTypes","Set","RETAILER_REQUIRED_DOWNLOAD_GATE_MOUNT_ELEMENT_ID","RETAILER_ONRAMP_TYPE_ATTRIBUTE_NAME","RetailerOnrampForm","onSubmitRetailerForm","addressForm","RetailerOnrampFormMountElement","retailerOnrampTypeAttributeValue","has","ConnectedRetailerOnrampForm","UserSignUpForm","UserSignUpFormActions","ConnectedUserSignUpForm","manager","Xm","zh","Pr","userSessionTerminator","userSessionCreator","userSessionReader","userAccountInfoService","userAccountManager","kZ","userPasswordManager","ci","cookieManager","djangoApiManager","DjangoApiManager","Ny","queryStringReader","queryStringManager","cookieDeleter","publicSiteAppReducers","action","reduceSetUnauthenticatedUserSessionId","updates","merge","reduceSetLoggedInUser","reduceSetLoggedInUserInfo","reduceSetUserIconPopoverIsShown","SignUpOptionsReducers","errorNotificationDialogState","ErrorNotificationDialogReducers","reduceSetFormFieldValidationData","reduceSetFormValidationData","reduceSetIsSubmitting","userSession","UserSessionReducers","publicSiteStore","Provider","createStore","setUnauthenticatedUserSessionId","Auth","configure","AMPLIFY_CONFIG","createRoot","appReducers","store","downloadGateElement","retailerRequiredDownloadGateElement","userSignUpElement","createRetailerFormElement","getStartedWithEmailElement"],"sourceRoot":""}