{"version":3,"file":"store-59v-R0e0.js","sources":["../../../node_modules/lodash/now.js","../../../node_modules/lodash/debounce.js","../../../app/javascript/actions/application.ts","../../../app/javascript/middleware/adobe-trigger-view.ts","../../../app/javascript/middleware/keep-alive.ts","../../../app/javascript/utils/api/orders.ts","../../../app/javascript/components/order-list/order-list.actions.ts","../../../app/javascript/components/order-list/order-list.reducer.ts","../../../app/javascript/actions/active-item.ts","../../../app/javascript/reducers/active-item.ts","../../../app/javascript/actions/address.ts","../../../app/javascript/reducers/address.ts","../../../app/javascript/reducers/application.ts","../../../app/javascript/reducers/auth.ts","../../../app/javascript/reducers/credit-card-on-file.ts","../../../app/javascript/actions/email-confirmation.ts","../../../app/javascript/reducers/email-confirmation.ts","../../../app/javascript/actions/favorite-destinations.ts","../../../app/javascript/reducers/favorite-destinations.ts","../../../app/javascript/utils/api/invite.ts","../../../app/javascript/actions/invite-participant.ts","../../../app/javascript/components/invite-participant-modal/partials/confirm-invite-step/index.tsx","../../../app/javascript/components/alert/alert.component.tsx","../../../app/javascript/utils/profile.ts","../../../app/javascript/components/invite-participant-modal/partials/email-form/index.tsx","../../../app/javascript/components/invite-participant-modal/partials/enter-email-step/index.tsx","../../../app/javascript/components/invite-participant-modal/index.tsx","../../../app/javascript/reducers/invite-participant.ts","../../../app/javascript/reducers/minor-consent.ts","../../../app/javascript/reducers/mountain-checklist.ts","../../../app/javascript/actions/notifications.ts","../../../app/javascript/reducers/notifications.ts","../../../app/javascript/deserializers/onboarding.ts","../../../app/javascript/actions/onboarding.ts","../../../app/javascript/reducers/onboarding.ts","../../../app/javascript/utils/api/password-reset.ts","../../../app/javascript/actions/password-reset.ts","../../../app/javascript/reducers/password-reset.ts","../../../app/javascript/reducers/profile.ts","../../../app/javascript/actions/redeemable-vouchers.ts","../../../app/javascript/reducers/redeemable-vouchers.ts","../../../app/javascript/actions/reservations.ts","../../../app/javascript/reducers/reservations.ts","../../../app/javascript/reducers/resort-authorization.ts","../../../app/javascript/reducers/resort-charge.ts","../../../app/javascript/utils/api/resort-favorites.ts","../../../app/javascript/actions/resort-favorites.ts","../../../app/javascript/reducers/resort-favorites.ts","../../../app/javascript/actions/resources.ts","../../../app/javascript/reducers/resources.ts","../../../app/javascript/reducers/session.ts","../../../app/javascript/reducers/terms-and-conditions.ts","../../../app/javascript/actions/waivers.ts","../../../app/javascript/reducers/waivers.ts","../../../app/javascript/reducers/index.ts","../../../app/javascript/store.ts"],"sourcesContent":["var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","type SetApplicationWidthAction = {\n type: 'SET_APPLICATION_WIDTH'\n payload: number\n}\n\nexport type ApplicationAction = SetApplicationWidthAction\n\nexport const setApplicationWidth = (\n width: number,\n): SetApplicationWidthAction => ({\n type: 'SET_APPLICATION_WIDTH',\n payload: width,\n})\n","import { NAVIGATION_LOCATION_CHANGE_ACTION_TYPE } from '~/hooks/use-location-change-handler'\n\nimport type { Middleware } from 'redux'\n\nconst sanitizePathname = (pathname) => pathname.match(/^[#/]?(.*)/)[1]\n\nconst adobeTriggerView = () => {\n document.addEventListener('at-library-loaded', function () {\n window.adobe.target.triggerView(sanitizePathname(window.location.pathname))\n })\n\n const middleware: Middleware = () => (next) => (action: any) => {\n const triggerView = window.adobe?.target?.triggerView\n const returnValue = next(action)\n\n if (\n window.adobe?.target?.triggerView &&\n action.type === NAVIGATION_LOCATION_CHANGE_ACTION_TYPE\n ) {\n triggerView(sanitizePathname(action.payload.location.pathname))\n }\n\n return returnValue\n }\n\n return middleware\n}\n\nexport default adobeTriggerView\n","import { NAVIGATION_LOCATION_CHANGE_ACTION_TYPE } from '~/hooks/use-location-change-handler'\n\nimport { extendSessionInBackground } from '../actions/session'\n\nimport type { Middleware } from 'redux'\n\n/**\n * Middleware to keep the session alive when the user is logged in.\n */\nconst keepAlive: Middleware = (store) => (next) => (action: any) => {\n const returnValue = next(action)\n\n if (action.type === NAVIGATION_LOCATION_CHANGE_ACTION_TYPE) {\n // @ts-expect-error TS2345\n store.dispatch(extendSessionInBackground())\n }\n\n return returnValue\n}\n\nexport default keepAlive\n","import HTTPError from '~/utils/http-error'\n\nimport { authedFetch } from '../fetch'\n\nconst PATH = '/api/v2/my-orders'\n\nexport async function requestLoadMyOrders() {\n const response = await authedFetch(PATH)\n\n if (response.ok) {\n const json = await response.json()\n return json\n }\n\n throw new HTTPError(`failed: GET ${PATH}`, response, await response.text())\n}\n","import { camelizeKeys } from 'humps'\n\nimport { requestLoadMyOrders } from '~/utils/api/orders'\nimport { reportGroupedError } from '~/utils/logger'\n\nimport type { ListOrder } from './order-list.types'\n\nexport type OrdersAction =\n | {\n type: 'LOAD_MY_ORDERS_REQUEST'\n }\n | {\n type: 'LOAD_MY_ORDERS_SUCCESS'\n orders: ListOrder[]\n }\n\nexport const LOAD_MY_ORDERS_REQUEST = 'LOAD_MY_ORDERS_REQUEST'\nexport const LOAD_MY_ORDERS_SUCCESS = 'LOAD_MY_ORDERS_SUCCESS'\n\nfunction loadMyOrdersSuccess(orders: ListOrder[]) {\n return {\n type: LOAD_MY_ORDERS_SUCCESS,\n orders,\n }\n}\n\nexport function loadMyOrders() {\n return async (dispatch: (...args: Array) => any) => {\n try {\n dispatch({\n type: LOAD_MY_ORDERS_REQUEST,\n })\n const { data } = await requestLoadMyOrders()\n const orders = camelizeKeys(data)\n dispatch(loadMyOrdersSuccess(orders))\n } catch (error) {\n reportGroupedError('loadMyOrders', error)\n }\n }\n}\n","import {\n LOAD_MY_ORDERS_REQUEST,\n LOAD_MY_ORDERS_SUCCESS,\n} from './order-list.actions'\n\nimport type { ListOrder } from './order-list.types'\nimport type { AppActions } from '~/actions/types'\n\nexport type OrdersState = {\n loading: boolean\n entities: ListOrder[]\n}\n\nconst initialState = {\n loading: false,\n entities: [],\n}\n\nexport default function myOrders(\n state: OrdersState = initialState,\n action: AppActions,\n): OrdersState {\n switch (action.type) {\n case LOAD_MY_ORDERS_REQUEST:\n return { ...state, loading: true }\n\n case LOAD_MY_ORDERS_SUCCESS: {\n const sortedOrders = action.orders.sort(\n // @ts-expect-error TS2362\n (a, b) => new Date(b.createdAt) - new Date(a.createdAt),\n )\n return { ...state, loading: false, entities: sortedOrders }\n }\n\n default:\n return state\n }\n}\n","/**\n * Defines actions and action creators related to the active item internal id.\n */\n//\n// - Actions and Sync Action Creators\n//\nimport type { ActiveItem } from '~/types'\n\nexport type ActiveItemActions =\n | {\n type: 'SET_ACTIVE_ITEM'\n data: ActiveItem\n }\n | {\n type: 'REMOVE_ACTIVE_ITEM'\n }\n\nexport const SET_ACTIVE_ITEM = 'SET_ACTIVE_ITEM'\nexport function setActiveItem(data: ActiveItem) {\n return {\n type: SET_ACTIVE_ITEM,\n data,\n }\n}\n\nexport const REMOVE_ACTIVE_ITEM = 'REMOVE_ACTIVE_ITEM'\nexport function removeActiveItem() {\n return {\n type: REMOVE_ACTIVE_ITEM,\n }\n}\n","import { SET_ACTIVE_ITEM, REMOVE_ACTIVE_ITEM } from '../actions/active-item'\n\nimport type { ActiveItemActions } from '../actions/active-item'\nimport type { ActiveItem } from '~/types'\n\nexport const DEFAULT_STATE = {\n internalId: null,\n isEditing: false,\n}\n\nexport default function (\n state: ActiveItem = DEFAULT_STATE,\n action: ActiveItemActions,\n) {\n switch (action.type) {\n case SET_ACTIVE_ITEM:\n return action.data\n\n case REMOVE_ACTIVE_ITEM:\n return DEFAULT_STATE\n\n default:\n return state\n }\n}\n","/**\n * Defines actions and action creators related to the user's addresses.\n */\nimport { addFlashMessage } from '~/actions/flash-message'\nimport { i18n } from '~/i18n'\nimport delay from '~/utils/delay'\n\nimport { loadProfile } from './profile'\nimport { requestPutAddresses } from '../utils/api/address'\nimport { reportGroupedError } from '../utils/logger'\n\nimport type { Address } from '~/types'\n\ntype Dispatch = (...args: Array) => any\n\nexport const UPDATE_ADDRESSES_START = 'address/UPDATE_START'\nexport const UPDATE_ADDRESSES_SUCCESS = 'address/UPDATE_SUCCESS'\nexport const UPDATE_ADDRESSES_FAIL = 'address/UPDATE_FAIL'\n\nexport type AddressActions =\n | {\n type: 'address/UPDATE_START'\n }\n | {\n type: 'address/UPDATE_SUCCESS'\n }\n | {\n type: 'address/UPDATE_FAIL'\n }\n\n//\n// - Async Action Creators\n//\n\n/**\n * updateAddresses makes a request to the server to update the profile addresses.\n *\n * @return {Function} Thunk which will initiate the request to the server.\n */\nexport function updateAddresses(\n profileId: string,\n addresses: Address[],\n showSuccessFlash = true,\n) {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: UPDATE_ADDRESSES_START,\n })\n\n try {\n await requestPutAddresses(profileId, addresses)\n\n await delay()\n\n dispatch({\n type: UPDATE_ADDRESSES_SUCCESS,\n })\n\n if (showSuccessFlash) {\n dispatch(\n addFlashMessage(\n 'info',\n i18n.t('components.flash_messages.address_updated'),\n {\n navCount: 0,\n glyph: 'circle-info',\n },\n ),\n )\n }\n\n dispatch(\n loadProfile({\n reload: true,\n }),\n )\n return true\n } catch (error) {\n dispatch({\n type: UPDATE_ADDRESSES_FAIL,\n })\n dispatch(\n addFlashMessage(\n 'error',\n i18n.t('components.flash_messages.address_update_error'),\n ),\n )\n reportGroupedError('updateAddresses', error)\n return false\n }\n }\n}\n","import {\n UPDATE_ADDRESSES_START,\n UPDATE_ADDRESSES_SUCCESS,\n UPDATE_ADDRESSES_FAIL,\n} from '../actions/address'\n\nimport type { AppActions } from '../actions/types'\n\ntype AddressStateType = {\n updating: boolean\n}\n\nconst initialState = {\n updating: false,\n}\n\nexport default function (\n state: AddressStateType = initialState,\n action: AppActions,\n) {\n switch (action.type) {\n case UPDATE_ADDRESSES_START:\n return { ...state, updating: true }\n\n case UPDATE_ADDRESSES_SUCCESS:\n return { ...state, updating: false }\n\n case UPDATE_ADDRESSES_FAIL:\n return { ...state, updating: false }\n\n default:\n return state\n }\n}\n","import { DESKTOP_WIDTH } from '~/config'\n\nimport type { ApplicationAction } from '~/actions/application'\n\nexport type ApplicationState = {\n width: number\n isDesktop: boolean\n}\n\nconst isDesktop = (width) => width >= DESKTOP_WIDTH\n\nconst initialState = (): ApplicationState => {\n const width = window.innerWidth\n return {\n width,\n isDesktop: isDesktop(width),\n }\n}\n\nexport default (\n state: ApplicationState = initialState(),\n action: ApplicationAction,\n) => {\n switch (action.type) {\n case 'SET_APPLICATION_WIDTH':\n return {\n ...state,\n width: action.payload,\n isDesktop: isDesktop(action.payload),\n }\n\n default:\n return state\n }\n}\n","/**\n * Reducer for state related to authentication.\n */\nimport {\n AUTH_CHECKED,\n AUTHENTICATED,\n AUTHENTICATING,\n AUTHENTICATION_FAILED,\n CHECKING_AUTH,\n RESET_AUTH_REJECTED,\n} from '../actions/auth'\n\nexport type State = {\n authenticated: boolean\n authenticationAttemptRejected: boolean\n errorMessage: string\n pending: boolean\n}\n\n// This is the initial state that will be stored in the global state tree.\nconst initialAuthState = {\n authenticated: false,\n authenticationAttemptRejected: false,\n errorMessage: '',\n pending: false,\n}\n/**\n * Given the existing state and an action this computes the new state.\n *\n * @param {object} state The current state of the auth section of global\n * state tree. Defaults to a initialized object.\n * @param {object} action The action to use to compute the new state.\n * @return {object} The new state.\n */\n\nexport default function auth(\n state: State = initialAuthState,\n action: (...args: Array) => any,\n): State {\n // @ts-expect-error TS2339\n switch (action.type) {\n case CHECKING_AUTH:\n case AUTHENTICATING:\n return Object.assign({}, state, {\n pending: true,\n authenticationAttemptRejected: false,\n })\n\n case AUTHENTICATION_FAILED:\n return Object.assign({}, state, {\n authenticated: false,\n authenticationAttemptRejected: true,\n // @ts-expect-error TS2339\n errorMessage: action.reason,\n pending: false,\n })\n\n case AUTHENTICATED:\n return Object.assign({}, state, {\n authenticated: true,\n pending: false,\n })\n\n case AUTH_CHECKED:\n return Object.assign({}, state, {\n // @ts-expect-error TS2339\n authenticated: action.loggedIn,\n pending: false,\n })\n\n case RESET_AUTH_REJECTED:\n return Object.assign({}, state, {\n authenticated: false,\n authenticationAttemptRejected: false,\n errorMessage: '',\n pending: false,\n })\n\n default:\n return state\n }\n}\n","import {\n LOAD_CREDIT_CARD_ON_FILE_START,\n LOAD_CREDIT_CARD_ON_FILE_SUCCESS,\n LOAD_CREDIT_CARD_ON_FILE_NO_CARD,\n LOAD_CREDIT_CARD_ON_FILE_FAIL,\n} from '~/actions/credit-card-on-file'\n\nimport type { AppActions } from '~/actions/types'\nimport type { TokenizedCreditCard } from '~/types'\n\nexport type CreditCardOnFileState = {\n loading: boolean\n loaded: boolean\n cardExistsOnFile: boolean\n data: TokenizedCreditCard | null | undefined\n}\n\nconst initialState = {\n loading: false,\n cardExistsOnFile: false,\n loaded: false,\n data: null,\n}\n\nexport default function (\n state: CreditCardOnFileState = initialState,\n action: AppActions,\n) {\n switch (action.type) {\n case LOAD_CREDIT_CARD_ON_FILE_START: {\n return { ...state, loading: true }\n }\n\n case LOAD_CREDIT_CARD_ON_FILE_SUCCESS: {\n return {\n ...state,\n data: action.data,\n cardExistsOnFile: true,\n loading: false,\n loaded: true,\n }\n }\n\n case LOAD_CREDIT_CARD_ON_FILE_NO_CARD: {\n return { ...state, cardExistsOnFile: false, loading: false, loaded: true }\n }\n\n case LOAD_CREDIT_CARD_ON_FILE_FAIL: {\n return { ...state, loading: false }\n }\n\n default: {\n return state\n }\n }\n}\n","/**\n * Defines actions and action creators related to email confirmation.\n */\n\nimport { addFlashMessage } from '~/actions/flash-message'\nimport { push } from '~/actions/navigation'\nimport { i18n } from '~/i18n'\nimport { authedFetch } from '~/utils/fetch'\nimport HTTPError from '~/utils/http-error'\n\nimport { EMAIL_CONFIRMATION_STATUS } from '../config'\nimport { reportGroupedError } from '../utils/logger'\n\ntype Dispatch = (...args: Array) => any //\n// - Actions and Sync Action Creators\n//\n\nexport const RESEND_EMAIL_SUCCESS = 'RESEND_EMAIL_SUCCESS'\n\nfunction confirmEmailWarning() {\n return addFlashMessage(\n 'info',\n i18n.t('pages.account_confirm.email_already_confirmed'),\n )\n}\n\nexport const CONFIRM_EMAIL_SUCCESS = 'CONFIRM_EMAIL_SUCCESS'\n\nfunction confirmEmailSuccess() {\n return {\n type: CONFIRM_EMAIL_SUCCESS,\n }\n}\n\nexport const CONFIRM_EMAIL_FAILURE = 'CONFIRM_EMAIL_FAILURE'\n\nfunction confirmEmailFailure() {\n return {\n type: CONFIRM_EMAIL_FAILURE,\n }\n}\n\n//\n// - Async Action Creators\n//\n\n/**\n * resendConfirmationEmail requests the iaa server to resend a confirmation\n * email for the provided email.\n *\n * @return {Function} Thunk which will initiate the request to the server.\n */\nlet requestingResend = false\nexport function resendConfirmationEmail(email: string) {\n return (dispatch: Dispatch) => {\n if (requestingResend) return\n requestingResend = true\n const opts = {\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'post',\n body: JSON.stringify({\n data: {\n type: 'confirmation',\n email,\n },\n }),\n }\n return authedFetch('/api/v2/emails', opts)\n .then((resp) => {\n requestingResend = false\n\n if (resp.status === 202) {\n dispatch(\n addFlashMessage(\n 'info',\n i18n.t('pages.account_confirm.email_resent'),\n {\n navCount: 0,\n },\n ),\n )\n } else {\n return Promise.reject(new HTTPError('unknown error', resp, ''))\n }\n })\n .catch((error) => {\n requestingResend = false\n reportGroupedError('resendConfirmationEmail', error)\n dispatch(addFlashMessage('error', error.message))\n })\n }\n}\n\nexport function confirmEmail() {\n return (dispatch: Dispatch) => {\n if (EMAIL_CONFIRMATION_STATUS === 'WARNING') dispatch(confirmEmailWarning())\n if (EMAIL_CONFIRMATION_STATUS === 'FAILURE') dispatch(confirmEmailFailure())\n if (EMAIL_CONFIRMATION_STATUS === 'SUCCESS') dispatch(confirmEmailSuccess())\n\n dispatch(push('/login'))\n }\n}\n","/**\n * Reducer for state related to the user's orders.\n */\nimport {\n CONFIRM_EMAIL_SUCCESS,\n CONFIRM_EMAIL_FAILURE,\n RESEND_EMAIL_SUCCESS,\n} from '../actions/email-confirmation'\n\nconst DEFAULT_STATE = {\n confirmEmailSuccess: undefined,\n resendEmailSuccess: undefined,\n}\n\nexport type EmailConfirmationType = {\n confirmEmailSuccess: boolean | null | undefined\n resendEmailSuccess: boolean | null | undefined\n}\n\nexport default function (\n state: EmailConfirmationType = DEFAULT_STATE,\n action: {\n type: string\n },\n) {\n switch (action.type) {\n case RESEND_EMAIL_SUCCESS:\n return { ...state, resendEmailSuccess: true }\n\n case CONFIRM_EMAIL_SUCCESS:\n return { ...state, confirmEmailSuccess: true }\n\n case CONFIRM_EMAIL_FAILURE:\n return { ...state, confirmEmailSuccess: false }\n }\n\n return state\n}\n","import type { SelectedFavorites } from '../reducers/favorite-destinations'\n\ntype OpenModal = {\n type: 'favorite-destinations/OPEN_MODAL'\n}\ntype CloseModal = {\n type: 'favorite-destinations/CLOSE_MODAL'\n}\ntype SetSelected = {\n type: 'favorite-destinations/SET_SELECTED'\n selectedFavorites: SelectedFavorites\n}\n\nexport type Action = OpenModal | CloseModal | SetSelected\n\nexport const OPEN_MODAL = 'favorite-destinations/OPEN_MODAL'\nexport const CLOSE_MODAL = 'favorite-destinations/CLOSE_MODAL'\nexport const SET_SELECTED = 'favorite-destinations/SET_SELECTED'\n\nexport const openModal = () => ({\n type: OPEN_MODAL,\n})\nexport const closeModal = () => ({\n type: CLOSE_MODAL,\n})\n\nexport const setSelected = (\n selectedFavorites: SelectedFavorites | null | undefined,\n) => ({\n type: SET_SELECTED,\n selectedFavorites: selectedFavorites,\n})\n","import {\n OPEN_MODAL,\n CLOSE_MODAL,\n SET_SELECTED,\n} from '../actions/favorite-destinations'\n\nimport type { AppActions } from '../actions/types'\n\nexport type SelectedFavorites = Record\n\nexport type State = {\n modalOpen: boolean\n selectedFavorites: SelectedFavorites | null | undefined\n}\n\nconst initialState = {\n modalOpen: false,\n selectedFavorites: null,\n}\n\nconst favoriteDestinations = (\n state: State = initialState,\n action: AppActions,\n): State => {\n switch (action.type) {\n case OPEN_MODAL:\n return {\n modalOpen: true,\n selectedFavorites: null,\n }\n\n case CLOSE_MODAL:\n return { ...state, modalOpen: false }\n\n case SET_SELECTED:\n return { ...state, selectedFavorites: action.selectedFavorites }\n\n default:\n return state\n }\n}\n\nexport default favoriteDestinations\n","import HTTPError from '~/utils/http-error'\n\nimport { authedFetch } from '../fetch'\n\nconst PATH = '/api/v2/invite'\nexport async function postInvite(\n profileId: string,\n email: string,\n): Promise {\n const options = {\n method: 'POST',\n body: JSON.stringify({\n data: {\n profile_id: profileId,\n email: email,\n },\n }),\n headers: {\n 'Content-Type': 'application/json',\n Accept: 'application/json',\n },\n }\n\n const response = await authedFetch(PATH, options)\n\n if (response.ok) return\n\n throw new HTTPError(`failed: GET ${PATH}`, response, await response.text())\n}\n","import { addFlashMessage } from '~/actions/flash-message'\nimport { i18n } from '~/i18n'\nimport HTTPError from '~/utils/http-error'\n\nimport { loadGroup } from './group'\nimport { postInvite } from '../utils/api/invite'\nimport { reportGroupedError } from '../utils/logger'\n\nexport const INVITE_PARTICIPANT_STARTED = 'invite-participant/STARTED'\nexport const INVITE_PARTICIPANT_COMPLETED = 'invite-participant/COMPLETED'\nexport const INVITE_PARTICIPANT_FAILED = 'invite-participant/FAILED'\nexport const OPEN_MODAL = 'invite-participant/OPEN_MODAL'\nexport const CLOSE_MODAL = 'invite-participant/CLOSE_MODAL'\nexport const GO_TO_STEP = 'invite-participant/GO_TO_STEP'\nexport const RESET_ERRORS = 'invite-participant/RESET_ERRORS'\n\ntype OpenModal = {\n type: 'invite-participant/OPEN_MODAL'\n}\n\ntype CloseModal = {\n type: 'invite-participant/CLOSE_MODAL'\n}\n\ntype Started = {\n type: 'invite-participant/STARTED'\n}\n\ntype Completed = {\n type: 'invite-participant/COMPLETED'\n}\n\ntype Failed = {\n type: 'invite-participant/FAILED'\n errorCode: InviteErrorCode\n}\n\ntype GoToStep = {\n type: 'invite-participant/GO_TO_STEP'\n step: number\n}\n\ntype ResetErrors = {\n type: 'invite-participant/RESET_ERRORS'\n}\n\ntype InviteErrorCode = 'ALREADY_REGISTERED' | 'UNKNOWN_ERROR'\n\nexport type InviteActions =\n | OpenModal\n | CloseModal\n | Started\n | Completed\n | Failed\n | GoToStep\n | ResetErrors\n\nexport function openInviteParticipantModal() {\n return {\n type: OPEN_MODAL,\n }\n}\n\nexport function closeInviteParticipantModal() {\n return {\n type: CLOSE_MODAL,\n }\n}\n\nexport function goToStep(step: number) {\n return {\n type: GO_TO_STEP,\n step,\n }\n}\n\nexport function resetErrors() {\n return {\n type: RESET_ERRORS,\n }\n}\n\nexport function inviteParticipant(profileId: string, email: string) {\n return async (dispatch) => {\n dispatch({\n type: INVITE_PARTICIPANT_STARTED,\n })\n\n try {\n await postInvite(profileId, email)\n await dispatch(\n loadGroup({\n reload: true,\n }),\n )\n dispatch(\n addFlashMessage(\n 'info',\n i18n.t('components.flash_messages.invited_participant', {\n email,\n }),\n {\n glyph: 'circle-check',\n },\n ),\n )\n dispatch({\n type: INVITE_PARTICIPANT_COMPLETED,\n })\n } catch (error) {\n const errorCode = getErrorCode(error)\n\n if (errorCode === 'UNKNOWN_ERROR') {\n reportGroupedError('inviteParticipant', error, {\n inviteeProfileId: profileId,\n inviteeEmail: email,\n })\n }\n\n dispatch({\n type: INVITE_PARTICIPANT_FAILED,\n errorCode,\n })\n }\n }\n}\n\nfunction getErrorCode(error: HTTPError): InviteErrorCode {\n if (error.context.text.includes('Email address is already in use')) {\n return 'ALREADY_REGISTERED'\n } else {\n return 'UNKNOWN_ERROR'\n }\n}\n","import React, { Fragment } from 'react'\n\nimport ContentBlock from '~/components/content-block'\nimport ResponsiveButton from '~/components/responsive-button'\nimport Step from '~/components/step'\nimport { i18n } from '~/i18n'\n\nimport type { GroupMember } from '~/types'\n\ntype ConfirmInviteStepProps = {\n invitee: GroupMember\n currentStep: number\n onProceed: () => void\n}\n\nexport default function ConfirmInviteStep({\n invitee,\n currentStep,\n onProceed,\n}: ConfirmInviteStepProps) {\n return (\n \n \n {i18n.t('components.invite_participant_modal.step_2.content_md', {\n invitee_first_name: invitee.firstName,\n })}\n \n
\n \n {i18n.t('components.invite_participant_modal.step_2.confirm_btn')}\n \n
\n \n }\n />\n )\n}\n","import React from 'react'\n\nimport Icon from '~/components/icon'\n\nimport type { Props } from './alert.types'\n\nimport './alert.scss'\n\nexport default function Alert({ children, heading }: Props) {\n return (\n
\n \n
\n

{heading}

\n
{children}
\n
\n
\n )\n}\n","import { ageNow } from '~/utils/date'\nimport { MIN_ADULT, MIN_TEEN } from '~/utils/validations'\n\nimport type { GroupMember } from '~/types'\n\nexport const isTeenProfile = (profile: GroupMember): boolean => {\n const age = ageNow(profile.dob)\n return age >= MIN_TEEN && age < MIN_ADULT\n}\n\nexport const isAdultProfile = (profile: GroupMember): boolean =>\n ageNow(profile.dob) >= MIN_ADULT\n","import React, { PureComponent } from 'react'\n\nimport Form from '~/components//form'\nimport { i18n } from '~/i18n'\n\nimport type { InputValue } from '~/components/form/form.types'\n\ntype EmailFormProps = {\n email: string\n onChange: (email: string) => void\n errors: Record\n}\n\nexport default class EmailForm extends PureComponent {\n onChange = (key: string, value: InputValue) => {\n if (key === 'email' && typeof value === 'string') {\n this.props.onChange(value)\n }\n }\n\n render() {\n return (\n \n )\n }\n}\n","import React, { Component, Fragment } from 'react'\n\nimport Alert from '~/components/alert'\nimport ContentBlock from '~/components/content-block'\nimport ResponsiveButton from '~/components/responsive-button'\nimport Step from '~/components/step'\nimport { i18n } from '~/i18n'\nimport { translateErrors } from '~/utils/error-messages'\nimport { isTeenProfile } from '~/utils/profile'\nimport {\n INVALID,\n REQUIRED,\n ALREADY_REGISTERED,\n validateRequired,\n validateEmail,\n} from '~/utils/validations'\n\nimport EmailForm from '../email-form'\n\nimport type { GroupMember } from '~/types'\n\ntype Props = {\n invitee: GroupMember\n email: string\n onChangeEmail: (email: string) => void\n currentStep: number\n onProceed: () => void\n onEdit: () => void\n errors: Record\n}\n\ntype State = {\n validationErrors: Record\n}\n\nexport default class EnterEmailStep extends Component {\n state = {\n validationErrors: {},\n }\n\n get translatedErrorsByKey() {\n return {\n email: {\n [INVALID]: i18n.t('components.errors.email.invalid'),\n [REQUIRED]: i18n.t('components.errors.email.required'),\n [ALREADY_REGISTERED]: i18n.t(\n 'components.invite_participant_modal.errors.email_address_already_taken',\n ),\n },\n }\n }\n\n onProceed = () => {\n const email = this.props.email\n const validationErrors = {\n ...validateRequired(\n {\n email,\n },\n 'email',\n ),\n ...validateEmail({\n email,\n }),\n }\n\n this.setState({\n validationErrors,\n })\n\n const allErrors = { ...validationErrors, ...this.props.errors }\n\n if (Object.keys(allErrors).length === 0) {\n this.props.onProceed()\n }\n }\n\n render() {\n const { currentStep, invitee, email, onChangeEmail, onEdit } = this.props\n const errors = translateErrors(\n { ...this.state.validationErrors, ...this.props.errors },\n this.translatedErrorsByKey,\n )\n\n return (\n \n \n {i18n.t('components.invite_participant_modal.step_1.content_md', {\n invitee_full_name: invitee.firstName,\n invitee_first_name: `${invitee.firstName} ${invitee.lastName}`,\n })}\n \n \n
\n \n {i18n.t('components.invite_participant_modal.step_1.next_btn')}\n \n
\n {isTeenProfile(invitee) && (\n \n \n {i18n.t(\n 'components.invite_participant_modal.restricted_account_alert.content_md',\n )}\n \n \n )}\n \n }\n inactive={email}\n />\n )\n }\n}\n","import React, { Component } from 'react'\n\nimport Modal from '~/components/modal'\nimport { i18n } from '~/i18n'\n\nimport ConfirmInviteStep from './partials/confirm-invite-step'\nimport EnterEmailStep from './partials/enter-email-step'\n\nimport type { GroupMember } from '~/types'\n\nimport './invite-participant-modal.scss'\n\nexport const Step = {\n ENTER_EMAIL: 1,\n CONFIRM_INVITE: 2,\n}\n\nexport type Props = {\n invitee: GroupMember\n invitedByProfileId: string\n onClose: () => void\n onConfirm: (\n email: string,\n inviteeProfileId: string,\n invitedByProfileId: string,\n ) => void\n loading?: boolean\n errors?: Record\n resetErrors: () => void\n currentStep: number\n goToStep: (step: number) => void\n}\n\nexport type State = {\n email: string\n}\n\nexport default class InviteParticipantModal extends Component {\n state = {\n email: this.props.invitee.email,\n }\n\n onChangeEmail = (email: string) => {\n this.props.resetErrors()\n this.setState({\n email,\n })\n }\n\n goToEnterEmailStep = () => this.props.goToStep(Step.ENTER_EMAIL)\n goToConfirmInviteStep = () => this.props.goToStep(Step.CONFIRM_INVITE)\n\n proceed = () => {\n const currentStep = this.props.currentStep\n\n if (currentStep == Step.ENTER_EMAIL) {\n this.goToConfirmInviteStep()\n } else if (currentStep === Step.CONFIRM_INVITE) {\n this.props.onConfirm(\n this.state.email,\n this.props.invitee.id,\n this.props.invitedByProfileId,\n )\n }\n }\n\n render() {\n return (\n \n \n \n \n )\n }\n}\n","import { combineReducers } from 'redux'\n\nimport {\n OPEN_MODAL,\n CLOSE_MODAL,\n GO_TO_STEP,\n INVITE_PARTICIPANT_STARTED,\n INVITE_PARTICIPANT_COMPLETED,\n INVITE_PARTICIPANT_FAILED,\n RESET_ERRORS,\n} from '~/actions/invite-participant'\nimport { Step } from '~/components/invite-participant-modal'\nimport { ALREADY_REGISTERED, BASE_ERROR_KEY } from '~/utils/validations'\n\nimport type { AppActions } from '../actions/types'\n\nexport type InviteParticipantState = {\n loading: boolean\n modalOpen: boolean\n errors: Record\n currentStep: number\n}\n\nfunction loading(state = false, action: AppActions): boolean {\n switch (action.type) {\n case INVITE_PARTICIPANT_STARTED:\n return true\n\n case INVITE_PARTICIPANT_COMPLETED:\n case INVITE_PARTICIPANT_FAILED:\n return false\n\n default:\n return state\n }\n}\n\nfunction errors(\n state: Record = {},\n action: AppActions,\n): Record {\n switch (action.type) {\n case RESET_ERRORS:\n case INVITE_PARTICIPANT_COMPLETED:\n return {}\n\n case INVITE_PARTICIPANT_FAILED:\n if (action.errorCode === ALREADY_REGISTERED) {\n return {\n email: action.errorCode,\n }\n } else {\n return {\n [BASE_ERROR_KEY]: action.errorCode,\n }\n }\n\n default:\n return state\n }\n}\n\nfunction modalOpen(state = false, action: AppActions): boolean {\n switch (action.type) {\n case OPEN_MODAL:\n return true\n\n case INVITE_PARTICIPANT_COMPLETED:\n case CLOSE_MODAL:\n return false\n\n default:\n return state\n }\n}\n\nfunction currentStep(\n state: number = Step.ENTER_EMAIL,\n action: AppActions,\n): number {\n switch (action.type) {\n case GO_TO_STEP:\n return action.step\n\n case INVITE_PARTICIPANT_COMPLETED:\n case INVITE_PARTICIPANT_FAILED:\n return Step.ENTER_EMAIL\n\n default:\n return state\n }\n}\n\nexport default combineReducers({\n loading,\n errors,\n modalOpen,\n currentStep,\n})\n","import {\n TOGGLE_MINOR_CONSENT,\n ALERT_MINOR_CONSENT,\n RESET_MINOR_CONSENT,\n} from '~/actions/minor-consent'\n\nimport type { AppActions } from '~/actions/types'\n\nexport type MinorConsentState = {\n accepted: boolean\n alert: boolean\n}\n\nconst initialState = {\n accepted: false,\n alert: false,\n}\n\nexport default (\n state: MinorConsentState = initialState,\n action: AppActions,\n) => {\n switch (action.type) {\n case TOGGLE_MINOR_CONSENT:\n return { ...state, accepted: !state.accepted }\n case ALERT_MINOR_CONSENT:\n return { ...state, alert: action.value }\n case RESET_MINOR_CONSENT:\n return { ...initialState }\n default:\n return state\n }\n}\n","import { MOUNTAIN_CHECKLIST_LOADED } from '../actions/mountain-checklist'\n\nimport type { MountainChecklist } from '~/types'\n\nexport type MountainChecklistState = {\n loaded: boolean\n data: MountainChecklist\n}\n\nexport const DEFAULT_STATE = {\n loaded: false,\n data: {\n uploadPhoto: [],\n waiversRequired: [],\n },\n}\n\nexport default function mountainChecklist(\n state: MountainChecklistState = DEFAULT_STATE,\n action: Record,\n) {\n switch (action.type) {\n case MOUNTAIN_CHECKLIST_LOADED:\n return { ...state, loaded: true, data: action.data }\n\n default:\n return state\n }\n}\n","import { camelizeKeys } from 'humps'\n\nimport getCustomerAPI from '~/utils/api/get-customer-api'\nimport HTTPError from '~/utils/http-error'\nimport { reportGroupedError } from '~/utils/logger'\n\nimport type { Notification } from '~/types'\n\nexport const LOAD_NOTIFICATIONS_START = 'notifications/LOAD_START'\nexport const LOAD_NOTIFICATIONS_SUCCESS = 'notifications/LOAD_SUCCESS'\nexport const LOAD_NOTIFICATIONS_FAIL = 'notifications/LOAD_FAIL'\nexport const DISMISS_NOTIFICATION = 'notifications/DISMISS'\nexport type NotificationActions =\n | {\n type: 'notifications/LOAD_START'\n }\n | {\n type: 'notifications/LOAD_SUCCESS'\n data: Notification[]\n }\n | {\n type: 'notifications/LOAD_FAIL'\n }\n | {\n type: 'notifications/DISMISS'\n data: Notification\n }\n\nexport function loadNotifications({\n reload,\n}: {\n reload?: boolean\n} = {}) {\n return async (\n dispatch: (...args: Array) => any,\n getState: (...args: Array) => any,\n ) => {\n const {\n notifications: { loaded, loading },\n } = getState()\n\n if (loading || (loaded && !reload)) return\n\n dispatch({\n type: LOAD_NOTIFICATIONS_START,\n })\n\n try {\n const api = getCustomerAPI()\n const response = await api.getNotifications()\n\n if (response.ok) {\n const { data } = await response.json()\n dispatch({\n type: LOAD_NOTIFICATIONS_SUCCESS,\n data: data.map((notification) => camelizeKeys(notification)),\n })\n } else {\n throw new HTTPError('failed: GET', response, await response.text())\n }\n } catch (error) {\n reportGroupedError('loadNotifications', error)\n dispatch({\n type: LOAD_NOTIFICATIONS_FAIL,\n })\n }\n }\n}\n\nexport function dismissNotification(notification: Notification) {\n return async (dispatch: (...args: Array) => any) => {\n dispatch({\n type: DISMISS_NOTIFICATION,\n data: notification,\n })\n\n try {\n const api = getCustomerAPI()\n const response = await api.dismissNotification(notification.id)\n\n if (!response.ok) {\n throw new HTTPError(\n `failed: dismissNotification`,\n response,\n await response.text(),\n )\n }\n } catch (error) {\n reportGroupedError('dismissNotification', error, {\n message: 'Dismiss Notification Failed',\n })\n }\n }\n}\n","import {\n LOAD_NOTIFICATIONS_START,\n LOAD_NOTIFICATIONS_SUCCESS,\n LOAD_NOTIFICATIONS_FAIL,\n DISMISS_NOTIFICATION,\n} from '~/actions/notifications'\n\nimport type { AppActions } from '~/actions/types'\nimport type { Notification } from '~/types'\n\nexport type NotificationsState = {\n loading: boolean\n loaded: boolean\n data: Notification[]\n}\n\nconst initialState = {\n loading: false,\n loaded: false,\n data: [],\n}\n\nexport default function (\n state: NotificationsState = initialState,\n action: AppActions,\n): NotificationsState {\n switch (action.type) {\n case LOAD_NOTIFICATIONS_START: {\n return { ...state, loading: true }\n }\n\n case LOAD_NOTIFICATIONS_SUCCESS: {\n return { ...state, data: action.data, loading: false, loaded: true }\n }\n\n case LOAD_NOTIFICATIONS_FAIL: {\n return { ...state, loading: false }\n }\n\n case DISMISS_NOTIFICATION: {\n return {\n ...state,\n data: state.data.filter(\n (notification: Notification) => notification.id !== action.data.id,\n ),\n }\n }\n\n default: {\n return state\n }\n }\n}\n","import type { Onboarding } from '~/types'\n\nconst editableFieldTranslation = {\n first_name: 'firstName',\n last_name: 'lastName',\n email: 'email',\n dob: 'dob',\n}\n\nexport default function onboardingDeserializer(\n data: Record,\n token: string,\n): Onboarding {\n if (Object.keys(data).includes('start_of_last_name')) {\n return {\n firstName: data.first_name,\n startOfLastName: data.start_of_last_name,\n type: 'basic',\n token,\n }\n } else {\n return {\n firstName: data.first_name,\n lastName: data.last_name,\n dob: data.dob,\n email: data.email,\n // @ts-expect-error TS2322\n editableFields: data.editable_fields.map(\n (attribute) => editableFieldTranslation[attribute],\n ),\n type: 'detailed',\n token,\n }\n }\n}\n","/**\n * Defines actions and action creators related to onboarding.\n */\nimport { push } from '~/actions/navigation'\nimport onboardingDeserializer from '~/deserializers/onboarding'\nimport changeLocation from '~/utils/change-location'\nimport { authedFetch } from '~/utils/fetch'\nimport HTTPError from '~/utils/http-error'\nimport { reportGroupedError } from '~/utils/logger'\n\nimport type { Onboarding, ValueOf } from '~/types'\n\ntype Dispatch = (...args: Array) => any\n\nexport const onboardingStatus = {\n LOADING: 'LOADING',\n FAILED: 'FAILED',\n LOADED: 'LOADED',\n LOCKED: 'LOCKED',\n}\n\ntype OnboardingStatusValues = ValueOf\n\nexport type OnboardingActions =\n | {\n type: 'ONBOARDING_LOADED'\n data: Onboarding\n }\n | {\n type: 'UPDATE_ONBOARDING_STATUS'\n status: OnboardingStatusValues\n }\n | {\n type: 'ONBOARDING_RESET'\n }\n\nexport const ONBOARDING_LOADED = 'ONBOARDING_LOADED'\nexport function onboardingLoaded(onboarding: Onboarding) {\n return {\n type: ONBOARDING_LOADED,\n data: onboarding,\n }\n}\n\nexport const ONBOARDING_RESET = 'ONBOARDING_RESET'\nexport function resetOnboarding() {\n return {\n type: ONBOARDING_RESET,\n }\n}\n\nexport const UPDATE_ONBOARDING_STATUS = 'UPDATE_ONBOARDING_STATUS'\nexport function updateOnboardingStatus(status: OnboardingStatusValues) {\n return {\n type: UPDATE_ONBOARDING_STATUS,\n status: status,\n }\n}\n\n//\n// - Async Action Creators\n//\n\n/**\n * loadOnboarding loads the basic pii of the onboarding profile\n */\nexport function loadOnboarding(token: string) {\n return async (dispatch: Dispatch) => {\n try {\n dispatch(updateOnboardingStatus(onboardingStatus.LOADING))\n const resp = await authedFetch(`/api/v2/onboardings/${token}`)\n\n if (resp.ok) {\n const { data } = await resp.json()\n dispatch(onboardingLoaded(onboardingDeserializer(data, token)))\n } else if (resp.status === 404) {\n changeLocation('/onboarding/not-found')\n } else {\n const text = await resp.text()\n throw new HTTPError('Unable to find onboarding', resp, text)\n }\n } catch (error) {\n reportGroupedError('loadOnboarding', error)\n dispatch(updateOnboardingStatus(onboardingStatus.FAILED))\n }\n }\n}\n\n/**\n * verifyOnboarding loads the detailed pii of the onboarding profile if the\n * dob provided matches with the onboarding record.\n */\nexport function verifyOnboarding(token: string, dob: string) {\n return async (dispatch: Dispatch) => {\n try {\n dispatch(updateOnboardingStatus(onboardingStatus.LOADING))\n const endpoint = `/api/v2/onboardings/${token}`\n const resp = await authedFetch(`${endpoint}?dob=${dob}`)\n\n if (resp.ok) {\n const { data } = await resp.json()\n dispatch(onboardingLoaded(onboardingDeserializer(data, token)))\n dispatch(push('/onboarding/create-account'))\n } else {\n const text = await resp.text()\n throw new HTTPError('Unable to verify', resp, text)\n }\n } catch (error) {\n reportGroupedError('verifyOnboarding', error)\n const { status } = error.context\n\n if (status === 429) {\n return dispatch(updateOnboardingStatus(onboardingStatus.LOCKED))\n }\n\n dispatch(updateOnboardingStatus(onboardingStatus.FAILED))\n }\n }\n}\n","import {\n ONBOARDING_LOADED,\n UPDATE_ONBOARDING_STATUS,\n ONBOARDING_RESET,\n onboardingStatus,\n} from '~/actions/onboarding'\n\nimport type { OnboardingActions } from '~/actions/onboarding'\nimport type { Onboarding, ValueOf } from '~/types'\n\ntype OnboardingState = {\n status: ValueOf | null\n data: Onboarding | object\n}\n\nconst DEFAULT_STATE = {\n status: null,\n data: {},\n}\n\nexport default function onboarding(\n state: OnboardingState = DEFAULT_STATE,\n action: OnboardingActions,\n) {\n switch (action.type) {\n case ONBOARDING_RESET:\n return DEFAULT_STATE\n\n case ONBOARDING_LOADED:\n return { ...state, status: onboardingStatus.LOADED, data: action.data }\n\n case UPDATE_ONBOARDING_STATUS:\n return { ...state, status: action.status }\n\n default:\n return state\n }\n}\n","import { authedFetch } from '../fetch'\n\nconst PASSWORD_RESET_PATH = '/api/v2/password-resets'\n\nexport function requestSendPasswordReset(email: string) {\n const options = {\n method: 'post',\n body: JSON.stringify({\n email: email,\n }),\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n return authedFetch(PASSWORD_RESET_PATH, options)\n}\n\nexport function requestResetPassword(token: string, password: string) {\n const options = {\n method: 'PATCH',\n body: JSON.stringify({\n password: password,\n }),\n headers: {\n 'Content-Type': 'application/json',\n },\n }\n\n return authedFetch(`${PASSWORD_RESET_PATH}/${token}`, options)\n}\n","/**\n * Defines actions and action creators related to resetting a users password.\n */\nimport delay from '~/utils/delay'\nimport HTTPError from '~/utils/http-error'\n\nimport { authenticated } from './auth'\nimport {\n requestSendPasswordReset,\n requestResetPassword,\n} from '../utils/api/password-reset'\nimport { reportGroupedError } from '../utils/logger'\n\ntype Dispatch = (...args: Array) => any\n\nexport type PasswordResetActions =\n | {\n type: 'REQUEST_PASSWORD_RESET'\n }\n | {\n type: 'PASSWORD_RESET_REQUESTED'\n }\n | {\n type: 'PASSWORD_RESET_REQUEST_FAILED'\n }\n | {\n type: 'PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND'\n }\n | {\n type: 'PASSWORD_RESET'\n }\n | {\n type: 'PASSWORD_RESET_FAILED'\n }\n\n//\n// - Actions and Sync Action Creators\n//\nexport const REQUEST_PASSWORD_RESET = 'REQUEST_PASSWORD_RESET'\nexport function requestPasswordReset() {\n return {\n type: REQUEST_PASSWORD_RESET,\n }\n}\n\nexport const PASSWORD_RESET_REQUESTED = 'PASSWORD_RESET_REQUESTED'\nexport function passwordResetRequested() {\n return {\n type: PASSWORD_RESET_REQUESTED,\n }\n}\n\nexport const PASSWORD_RESET_REQUEST_FAILED = 'PASSWORD_RESET_REQUEST_FAILED'\nexport function passwordResetRequestFailed() {\n return {\n type: PASSWORD_RESET_REQUEST_FAILED,\n }\n}\n\nexport const PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND =\n 'PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND'\nexport function passwordResetRequestFailedEmailNotFound() {\n return {\n type: PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND,\n }\n}\n\nexport const PASSWORD_RESET = 'PASSWORD_RESET'\nexport function passwordReset() {\n return {\n type: PASSWORD_RESET,\n }\n}\n\nexport const PASSWORD_RESET_FAILED = 'PASSWORD_RESET_FAILED'\nexport function passwordResetFailed() {\n return {\n type: PASSWORD_RESET_FAILED,\n }\n}\n\n//\n// - Async Action Creators\n//\nexport function forgotPassword(email: string) {\n return async (dispatch: Dispatch) => {\n dispatch(requestPasswordReset())\n\n try {\n const minDelay = delay()\n\n const resp = await requestSendPasswordReset(email)\n await minDelay\n\n if (resp.ok) {\n dispatch(passwordResetRequested())\n } else if (resp.status === 422) {\n dispatch(passwordResetRequestFailedEmailNotFound())\n } else {\n const text = await resp.text()\n throw new HTTPError('Unable to send password reset', resp, text)\n }\n } catch (err) {\n reportGroupedError('forgotPassword', err)\n dispatch(passwordResetRequestFailed())\n }\n }\n}\n\nexport function resetPassword(token: string, newPassword: string) {\n return async (dispatch: Dispatch) => {\n try {\n const resp = await requestResetPassword(token, newPassword)\n\n if (resp.ok) {\n dispatch(authenticated())\n dispatch(passwordReset())\n } else if (resp.status === 422) {\n dispatch(passwordResetFailed())\n } else {\n const text = await resp.text()\n throw new HTTPError('Unable to reset password', resp, text)\n }\n } catch (err) {\n reportGroupedError('resetPassword', err)\n dispatch(passwordResetFailed())\n }\n }\n}\n","/**\n * Reducer for state related to the user's orders.\n */\nimport {\n REQUEST_PASSWORD_RESET,\n PASSWORD_RESET_REQUESTED,\n PASSWORD_RESET_REQUEST_FAILED,\n PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND,\n PASSWORD_RESET,\n PASSWORD_RESET_FAILED,\n} from '../actions/password-reset'\n\nimport type { AppActions } from '../actions/types'\n\nconst DEFAULT_STATE = {\n requestSuccessful: undefined,\n successful: undefined,\n loading: false,\n}\n\nexport type PasswordResetState = {\n loading: boolean\n requestSuccessful?: boolean\n successful?: boolean\n}\n\nexport default function (\n state: PasswordResetState = DEFAULT_STATE,\n action: AppActions,\n) {\n switch (action.type) {\n case REQUEST_PASSWORD_RESET:\n return { ...state, loading: true }\n\n case PASSWORD_RESET_REQUESTED:\n return { ...state, requestSuccessful: true, loading: false }\n\n case PASSWORD_RESET_REQUEST_FAILED:\n return { ...state, requestSuccessful: false, loading: false }\n\n case PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND:\n return {\n ...state,\n requestSuccessful: false,\n emailNotFound: true,\n loading: false,\n }\n\n case PASSWORD_RESET:\n return { ...state, successful: true, loading: false }\n\n case PASSWORD_RESET_FAILED:\n return { ...state, successful: false, loading: false }\n }\n\n return state\n}\n","/**\n * Reducer for state related to the user's profile.\n */\nimport { CONFIRM_EMAIL_SUCCESS } from '../actions/email-confirmation'\nimport { PROFILE_UPDATE } from '../actions/profile'\n\n// This is the initial state that will be stored in the global state tree.\nexport const initialProfileState = {\n firstName: '',\n lastName: '',\n email: '',\n dob: '',\n loaded: false,\n loadFailed: false,\n errors: {},\n password: null,\n}\n\nfunction updateProfile(state, profile) {\n if (state.id && profile.id && state.id !== profile.id) return state\n return {\n ...state,\n ...profile,\n cloudinary: { ...state.cloudinary, ...profile.cloudinary },\n }\n}\n/**\n * Given the existing state and an action this computes the new state.\n *\n * @param {object} state The current state of the auth section of global\n * state tree. Defaults to a initialized object.\n * @param {object} action The action to use to compute the new state.\n * @return {object} The new state.\n */\n\nexport default function profile(\n state: Record = initialProfileState,\n action: Record,\n) {\n switch (action.type) {\n case PROFILE_UPDATE:\n return updateProfile(state, action.profile)\n\n case CONFIRM_EMAIL_SUCCESS:\n return { ...state, confirmedAt: new Date().toISOString() }\n\n default:\n return state\n }\n}\n","import { camelizeKeys } from 'humps'\n\nimport getCustomerAPI from '~/utils/api/get-customer-api'\nimport HTTPError from '~/utils/http-error'\nimport { reportGroupedError } from '~/utils/logger'\n\nimport type { RedeemableVoucher } from '~/types'\n\nexport const LOAD_REDEEMABLE_VOUCHERS_START = 'redeemableVouchers/LOAD_START'\nexport const LOAD_REDEEMABLE_VOUCHERS_SUCCESS =\n 'redeemableVouchers/LOAD_SUCCESS'\nexport const LOAD_REDEEMABLE_VOUCHERS_FAIL = 'redeemableVouchers/LOAD_FAIL'\nexport type RedeemableVoucherActions =\n | {\n type: 'redeemableVouchers/LOAD_START'\n }\n | {\n type: 'redeemableVouchers/LOAD_SUCCESS'\n data: RedeemableVoucher[]\n }\n | {\n type: 'redeemableVouchers/LOAD_FAIL'\n }\n\nexport function loadRedeemableVouchers({\n reload,\n}: {\n reload?: boolean\n} = {}) {\n return async (\n dispatch: (...args: Array) => any,\n getState: (...args: Array) => any,\n ) => {\n const {\n redeemableVouchers: { loaded, loading },\n } = getState()\n\n if (loading || (loaded && !reload)) return\n\n dispatch({\n type: LOAD_REDEEMABLE_VOUCHERS_START,\n })\n\n try {\n const api = getCustomerAPI()\n const response = await api.getRedeemableVouchers()\n\n if (response.ok) {\n const { data } = await response.json()\n dispatch({\n type: LOAD_REDEEMABLE_VOUCHERS_SUCCESS,\n data: data.map((redeemableVoucher) =>\n camelizeKeys(redeemableVoucher),\n ),\n })\n } else {\n throw new HTTPError('failed: GET', response, await response.text())\n }\n } catch (err) {\n reportGroupedError('loadRedeemableVouchers', err)\n dispatch({\n type: LOAD_REDEEMABLE_VOUCHERS_FAIL,\n })\n }\n }\n}\n","import {\n LOAD_REDEEMABLE_VOUCHERS_START,\n LOAD_REDEEMABLE_VOUCHERS_SUCCESS,\n LOAD_REDEEMABLE_VOUCHERS_FAIL,\n} from '~/actions/redeemable-vouchers'\n\nimport type { AppActions } from '~/actions/types'\nimport type { RedeemableVoucher } from '~/types'\n\nexport type RedeemableVouchersState = {\n loading: boolean\n loaded: boolean\n data: RedeemableVoucher[]\n}\n\nconst initialState = {\n loading: false,\n loaded: false,\n data: [],\n}\n\nexport default function (\n state: RedeemableVouchersState = initialState,\n action: AppActions,\n) {\n switch (action.type) {\n case LOAD_REDEEMABLE_VOUCHERS_START: {\n return { ...state, loading: true }\n }\n\n case LOAD_REDEEMABLE_VOUCHERS_SUCCESS: {\n return { ...state, data: action.data, loading: false, loaded: true }\n }\n\n case LOAD_REDEEMABLE_VOUCHERS_FAIL: {\n return { ...state, loading: false }\n }\n\n default: {\n return state\n }\n }\n}\n","import { addFlashMessage } from '~/actions/flash-message'\nimport reservationsDeserializer from '~/deserializers/reservations'\nimport { i18n } from '~/i18n'\nimport getCustomerAPI from '~/utils/api/get-customer-api'\nimport { getReservations } from '~/utils/api/reservations'\nimport { reportGroupedError } from '~/utils/logger'\n\nimport type { Reservation } from '~/types'\n\nexport const LOAD_RESERVATIONS_START = 'reservations/LOAD_START'\nexport const LOAD_RESERVATIONS_SUCCESS = 'reservations/LOAD_SUCCESS'\nexport const LOAD_RESERVATIONS_FAIL = 'reservations/LOAD_FAIL'\nexport type ReservationActions =\n | {\n type: 'reservations/LOAD_START'\n }\n | {\n type: 'reservations/LOAD_SUCCESS'\n data: Reservation[]\n }\n | {\n type: 'reservations/LOAD_FAIL'\n }\n\nexport function loadReservations({\n reload,\n}: {\n reload?: boolean\n} = {}) {\n return async (\n dispatch: (...args: Array) => any,\n getState: (...args: Array) => any,\n ) => {\n const {\n reservations: { loaded, loading },\n } = getState()\n\n if (loading || (loaded && !reload)) return\n\n dispatch({\n type: LOAD_RESERVATIONS_START,\n })\n\n try {\n const api = getCustomerAPI()\n const { data } = await getReservations(api)\n\n dispatch({\n type: LOAD_RESERVATIONS_SUCCESS,\n data: reservationsDeserializer(data),\n })\n } catch (err) {\n reportGroupedError('loadReservations', err)\n dispatch({\n type: LOAD_RESERVATIONS_FAIL,\n })\n dispatch(\n addFlashMessage(\n 'error',\n i18n.t('components.hooks.reservations.error_flash_message'),\n ),\n )\n }\n }\n}\n","import {\n LOAD_RESERVATIONS_START,\n LOAD_RESERVATIONS_SUCCESS,\n LOAD_RESERVATIONS_FAIL,\n} from '~/actions/reservations'\n\nimport type { AppActions } from '~/actions/types'\nimport type { Reservation } from '~/types'\n\nexport type ReservationsState = {\n loading: boolean\n loaded: boolean\n data: Reservation[]\n}\n\nconst initialState = {\n loading: false,\n loaded: false,\n data: [],\n}\n\nexport default function (\n state: ReservationsState = initialState,\n action: AppActions,\n) {\n switch (action.type) {\n case LOAD_RESERVATIONS_START: {\n return { ...state, loading: true }\n }\n\n case LOAD_RESERVATIONS_SUCCESS: {\n return { ...state, data: action.data, loading: false, loaded: true }\n }\n\n case LOAD_RESERVATIONS_FAIL: {\n return { ...state, loading: false }\n }\n\n default: {\n return state\n }\n }\n}\n","import type { AppActions, WaiverStates } from '../actions/types'\n\nexport type ResortAuthorizationState = {\n status: WaiverStates\n}\n\nconst DEFAULT_STATE: ResortAuthorizationState = {\n status: '',\n}\nexport default function resortAuthorization(\n state: ResortAuthorizationState = DEFAULT_STATE,\n action: AppActions,\n) {\n switch (action.type) {\n case 'UPDATE_RESORT_AUTORIZATION_STATUS':\n return { ...state, status: action.state }\n\n default:\n return state\n }\n}\n","import { RESORT_CHARGE_LOADED } from '../actions/resort-charge'\n\nimport type { AppActions } from '../actions/types'\nimport type { ResortChargeState } from '~/types'\n\nconst DEFAULT_STATE: ResortChargeState = {\n loaded: false,\n data: {},\n}\n\nexport default function resortCharge(\n state: ResortChargeState = DEFAULT_STATE,\n action: AppActions,\n) {\n switch (action.type) {\n case RESORT_CHARGE_LOADED:\n return {\n data: action.data,\n loaded: true,\n }\n\n default:\n return state\n }\n}\n","import HTTPError from '~/utils/http-error'\n\nimport { authedFetch } from '../fetch'\n\nconst endpoint = '/api/v2/resort-favorites'\n\nexport async function getResortFavorites() {\n const res = await authedFetch(endpoint)\n\n if (res.ok) {\n const json = await res.json()\n return json\n }\n\n throw new HTTPError(`failed: GET ${endpoint}`, res, await res.text())\n}\n\nexport async function putResortFavorites(resortIDs: number[]) {\n const body = JSON.stringify({\n data: {\n resort_ids: resortIDs,\n ordered: false,\n },\n })\n\n const options = {\n headers: {\n 'Content-Type': 'application/json',\n },\n method: 'PUT',\n body,\n }\n\n const res = await authedFetch(endpoint, options)\n\n if (res.ok) {\n const json = await res.json()\n return json\n }\n\n throw new HTTPError(`failed: PUT ${endpoint}`, res, await res.text())\n}\n","import { addFlashMessage } from '~/actions/flash-message'\nimport { i18n } from '~/i18n'\n\nimport {\n getResortFavorites,\n putResortFavorites,\n} from '../utils/api/resort-favorites'\n\nimport type { Resort, ResortFavoritesData } from '~/types'\n\ntype Dispatch = (...args: Array) => any\n\nexport const LOAD_RESORT_FAVORITES_START = 'resortFavorites/LOAD_START'\nexport const LOAD_RESORT_FAVORITES_SUCCESS = 'resortFavorites/LOAD_SUCCESS'\nexport const LOAD_RESORT_FAVORITES_FAIL = 'resortFavorites/LOAD_FAIL'\n\nexport const UPDATE_RESORT_FAVORITES_START = 'resortFavorites/UPDATE_START'\nexport const UPDATE_RESORT_FAVORITES_SUCCESS = 'resortFavorites/UPDATE_SUCCESS'\nexport const UPDATE_RESORT_FAVORITES_FAIL = 'resortFavorites/UPDATE_FAIL'\n\nexport type ResortFavoritesActions =\n | {\n type: 'resortFavorites/LOAD_START'\n }\n | {\n type: 'resortFavorites/LOAD_SUCCESS'\n data: ResortFavoritesData\n }\n | {\n type: 'resortFavorites/LOAD_FAIL'\n }\n | {\n type: 'resortFavorites/UPDATE_START'\n }\n | {\n type: 'resortFavorites/UPDATE_SUCCESS'\n data: ResortFavoritesData\n }\n | {\n type: 'resortFavorites/UPDATE_FAIL'\n }\n\nexport function loadResortFavorites({\n reload = false,\n}: {\n reload?: boolean\n} = {}) {\n return async (dispatch: Dispatch, getState: (...args: Array) => any) => {\n const {\n resortFavorites: { loaded },\n } = getState()\n\n if (loaded && !reload) return\n\n dispatch({\n type: LOAD_RESORT_FAVORITES_START,\n })\n\n try {\n const jsonResp = await getResortFavorites()\n const data = jsonResp.data.reduce(\n (previousValue, currentResort: Resort) => {\n return { ...previousValue, [currentResort.id]: true }\n },\n {},\n )\n dispatch({\n type: LOAD_RESORT_FAVORITES_SUCCESS,\n data: data,\n })\n } catch {\n dispatch(\n addFlashMessage(\n 'error',\n i18n.t('components.flash_messages.resort_favorites_index_error'),\n ),\n )\n dispatch({\n type: LOAD_RESORT_FAVORITES_FAIL,\n })\n }\n }\n}\n\nexport function updateResortFavorites(data: ResortFavoritesData) {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: UPDATE_RESORT_FAVORITES_START,\n })\n\n const resortIDs = Object.keys(data).filter((resortID) => {\n return data[resortID]\n })\n\n try {\n await putResortFavorites(resortIDs.map(Number))\n dispatch({\n type: UPDATE_RESORT_FAVORITES_SUCCESS,\n data: data,\n })\n } catch {\n dispatch(\n addFlashMessage(\n 'error',\n i18n.t('components.flash_messages.resort_favorites_update_error'),\n ),\n )\n dispatch({\n type: UPDATE_RESORT_FAVORITES_FAIL,\n })\n }\n }\n}\n","import {\n LOAD_RESORT_FAVORITES_SUCCESS,\n UPDATE_RESORT_FAVORITES_SUCCESS,\n UPDATE_RESORT_FAVORITES_START,\n UPDATE_RESORT_FAVORITES_FAIL,\n} from '../actions/resort-favorites'\n\nimport type { AppActions } from '../actions/types'\nimport type { ResortFavorites } from '~/types'\n\nconst DEFAULT_STATE: ResortFavorites = {\n updating: false,\n loaded: false,\n data: {},\n}\n\nexport default function (\n state: ResortFavorites = DEFAULT_STATE,\n action: AppActions,\n) {\n switch (action.type) {\n case UPDATE_RESORT_FAVORITES_SUCCESS:\n return { ...state, updating: false, loaded: true, data: action.data }\n\n case LOAD_RESORT_FAVORITES_SUCCESS:\n return { ...state, loaded: true, data: action.data }\n\n case UPDATE_RESORT_FAVORITES_START:\n return { ...state, updating: true }\n\n case UPDATE_RESORT_FAVORITES_FAIL:\n return { ...state, updating: false }\n\n default:\n return state\n }\n}\n","/**\n * Defines actions and action creators related to resources.\n *\n * This is a generic way of getting data from the server without needing to\n * create actions and related reducers for every resource.\n */\n\nimport { camelizeKeys } from 'humps'\n\nimport HTTPError from '~/utils/http-error'\n\nimport { authedFetch } from '../utils/fetch'\nimport { reportGroupedError } from '../utils/logger'\n\nimport type { AppState } from '../reducers'\n\ntype Dispatch = (...args: Array) => any\ntype GetState = () => AppState\n\ntype Resource = {\n loading: boolean\n loaded: boolean\n data: Record | null\n errorCode: string | null\n} //\n// - Actions and Sync Action Creators\n//\n\nexport const RESOURCE_UPDATE = 'RESOURCE_UPDATE'\nexport function resourceUpdate(path: string, resource: Resource) {\n return {\n type: RESOURCE_UPDATE,\n path,\n resource,\n }\n}\n\nfunction resourceLoading(path) {\n return resourceUpdate(path, {\n loading: true,\n loaded: false,\n data: null,\n errorCode: null,\n })\n}\n\nfunction resourceLoaded(path, data) {\n return resourceUpdate(path, {\n loading: false,\n loaded: true,\n data,\n errorCode: null,\n })\n}\n\nfunction resourceLoadFailed(path, errorCode) {\n return resourceUpdate(path, {\n loading: false,\n loaded: false,\n data: null,\n errorCode,\n })\n}\n\n//\n// - Async Action Creators\n//\nexport function loadResource(name: string, id?: string) {\n let resourcePath = `/api/v2/${name}`\n\n if (id) {\n resourcePath += `/${id}`\n }\n\n return (dispatch: Dispatch, getState: GetState) => {\n const state = getState()\n const resource = state.resources[resourcePath]\n\n if (resource && resource.loading) {\n return\n }\n\n dispatch(resourceLoading(resourcePath))\n return authedFetch(resourcePath)\n .then((resp) => {\n if (resp.ok) {\n return resp.json()\n } else {\n return Promise.reject(\n new HTTPError(`Unable to load resource ${resourcePath}`, resp, ''),\n )\n }\n })\n .then((body) => {\n dispatch(resourceLoaded(resourcePath, camelizeKeys(body.data)))\n })\n .catch((err) => {\n reportGroupedError('loadResource', err)\n dispatch(resourceLoadFailed(resourcePath, 'UNKNOWN'))\n })\n }\n}\n","import { RESOURCE_UPDATE } from '../actions/resources'\n\ntype ActionTypes = typeof RESOURCE_UPDATE\n\nexport type Action = {\n path: string\n resource: Record\n type: ActionTypes\n}\n\nfunction updateResource(state, { path, resource }) {\n const currentResource = state[path]\n return { ...state, [path]: { ...currentResource, ...resource } }\n}\n\nexport default function resources(\n state: Record = {},\n action: Action,\n) {\n switch (action.type) {\n case RESOURCE_UPDATE:\n return updateResource(state, action)\n }\n\n return state\n}\n","/**\n * Reducer for state related to ticket finding.\n */\nimport {\n UPDATE_SESSION_FAILURE,\n UPDATE_SESSION_REQUEST,\n UPDATE_SESSION_SUCCESS,\n} from '../actions/session'\n\nimport type { Actions } from '../actions/session'\n\nexport type State = {\n lastUpdated?: number\n updating: boolean\n}\n\nconst initialState = {\n lastUpdated: Date.now(),\n updating: false,\n}\n\nexport default function session(state: State = initialState, action: Actions) {\n switch (action.type) {\n case UPDATE_SESSION_REQUEST:\n return { ...state, updating: true }\n\n case UPDATE_SESSION_SUCCESS:\n return { ...state, lastUpdated: action.lastUpdated, updating: false }\n\n case UPDATE_SESSION_FAILURE:\n return { ...state, updating: false }\n\n default:\n return state\n }\n}\n","import { getUnixTime } from 'date-fns'\n\nimport {\n ALERT_TERMS,\n CHECK_TERMS,\n RESET_TERMS,\n} from '../actions/terms-and-conditions'\n\nimport type { AppActions } from '../actions/types'\n\nexport type TermsState = {\n acceptedAt: number | null | undefined\n alert: boolean\n}\n\nconst initialState = {\n acceptedAt: null,\n alert: false,\n}\n\nexport default function termsAndConditions(\n state: TermsState = initialState,\n action: AppActions,\n): TermsState {\n switch (action.type) {\n case CHECK_TERMS:\n return state.acceptedAt\n ? { ...state, acceptedAt: null }\n : { ...state, acceptedAt: getUnixTime(Date.now()), alert: false }\n\n case ALERT_TERMS:\n return { ...state, alert: true }\n\n case RESET_TERMS:\n return { ...initialState }\n\n default:\n return state\n }\n}\n","import { camelizeKeys } from 'humps'\n\nimport { addFlashMessage } from '~/actions/flash-message'\nimport { i18n } from '~/i18n'\nimport getCustomerAPI from '~/utils/api/get-customer-api'\nimport HTTPError from '~/utils/http-error'\n\nimport { reportGroupedError } from '../utils/logger'\n\nimport type { Waiver } from '~/types'\n\nexport const GET_WAIVERS_REQUEST = 'waivers/GET_WAIVERS_REQUEST'\nexport const GET_WAIVERS_SUCCESS = 'waivers/GET_WAIVERS_SUCCESS'\nexport const GET_WAIVERS_FAILURE = 'waivers/GET_WAIVERS_FAILURE'\n\nexport type WaiversActions =\n | {\n type: 'waivers/GET_WAIVERS_REQUEST'\n }\n | {\n type: 'waivers/GET_WAIVERS_SUCCESS'\n waivers: Waiver[]\n }\n | {\n type: 'waivers/GET_WAIVERS_FAILURE'\n }\n\nexport const loadWaivers =\n ({\n reload = false,\n }: {\n reload?: boolean\n } = {}) =>\n async (\n dispatch: (...args: Array) => any,\n getState: (...args: Array) => any,\n ) => {\n const {\n waivers: { loaded },\n } = getState()\n\n if (loaded && !reload) return\n\n const api = getCustomerAPI()\n dispatch({\n type: GET_WAIVERS_REQUEST,\n })\n\n try {\n const resp = await api.getWaivers()\n\n if (resp.ok) {\n const { data } = await resp.json()\n dispatch({\n type: GET_WAIVERS_SUCCESS,\n waivers: camelizeKeys(data),\n })\n } else {\n throw new HTTPError('Unable to fetch waivers', resp, '')\n }\n } catch (error) {\n dispatch({\n type: GET_WAIVERS_FAILURE,\n })\n dispatch(\n addFlashMessage(\n 'error',\n i18n.t('components.flash_messages.get_waivers_error'),\n ),\n )\n reportGroupedError('loadWaivers', error)\n }\n }\n","import {\n GET_WAIVERS_REQUEST,\n GET_WAIVERS_SUCCESS,\n GET_WAIVERS_FAILURE,\n} from '../actions/waivers'\n\nimport type { AppActions } from '../actions/types'\nimport type { Waiver } from '~/types'\n\nexport type State = {\n loading: boolean\n loaded: boolean\n data: Waiver[]\n}\n\nconst initialState = {\n loading: false,\n loaded: false,\n data: [],\n}\n\nexport default function (state: State = initialState, action: AppActions) {\n switch (action.type) {\n case GET_WAIVERS_REQUEST:\n return { ...state, loading: true }\n\n case GET_WAIVERS_SUCCESS:\n return { ...state, loading: false, data: action.waivers, loaded: true }\n\n case GET_WAIVERS_FAILURE:\n return { ...state, loading: false }\n\n default:\n return state\n }\n}\n","/**\n * Reducers convert actions into mutations of the application state.\n *\n * They should not have any side effects.\n */\n\nimport { combineReducers } from 'redux'\n\nimport myOrders from '~/components/order-list/order-list.reducer'\nimport flashMessages from '~/reducers/flash-messages'\n\nimport activeItem from './active-item'\nimport address from './address'\nimport application from './application'\nimport auth from './auth'\nimport cart from './cart'\nimport creditCardOnFile from './credit-card-on-file'\nimport credits from './credits'\nimport emailConfirmation from './email-confirmation'\nimport favoriteDestinations from './favorite-destinations'\nimport featureFlags from './feature-flags'\nimport groupMembers from './group-members'\nimport inviteParticipant from './invite-participant'\nimport minorConsent from './minor-consent'\nimport mountainChecklist from './mountain-checklist'\nimport navigation from './navigation'\nimport notifications from './notifications'\nimport onboarding from './onboarding'\nimport passwordReset from './password-reset'\nimport photoUpload from './photo-upload'\nimport productCatalog from './product-catalog'\nimport profile from './profile'\nimport profileDetailsEdit from './profile-details-edit'\nimport profileProducts from './profile-products'\nimport redeemableVouchers from './redeemable-vouchers'\nimport redemptions from './redemptions'\nimport reservations from './reservations'\nimport resortAuthorization from './resort-authorization'\nimport resortCharge from './resort-charge'\nimport resortFavorites from './resort-favorites'\nimport resorts from './resorts'\nimport resources from './resources'\nimport session from './session'\nimport termsAndConditions from './terms-and-conditions'\nimport ui from './ui'\nimport waivers from './waivers'\n\nimport type { ApplicationState } from './application'\nimport type { State as AuthState } from './auth'\nimport type { CreditCardOnFileState } from './credit-card-on-file'\nimport type { CreditsState } from './credits'\nimport type { EmailConfirmationType } from './email-confirmation'\nimport type { State as FDState } from './favorite-destinations'\nimport type { FeatureFlags } from './feature-flags'\nimport type { GroupMemberState } from './group-members'\nimport type { InviteParticipantState } from './invite-participant'\nimport type { MinorConsentState } from './minor-consent'\nimport type { MountainChecklistState } from './mountain-checklist'\nimport type { NavigationState } from './navigation'\nimport type { NotificationsState } from './notifications'\nimport type { PasswordResetState } from './password-reset'\nimport type { State as ProductCatalogState } from './product-catalog'\nimport type { ProfileProductState } from './profile-products'\nimport type { RedeemableVouchersState } from './redeemable-vouchers'\nimport type { RedemptionsState } from './redemptions'\nimport type { ReservationsState } from './reservations'\nimport type { ResortAuthorizationState } from './resort-authorization'\nimport type { ResortsState } from './resorts'\nimport type { TermsState } from './terms-and-conditions'\nimport type { UIState } from './ui'\nimport type { State as WaiversState } from './waivers'\nimport type { OrdersState } from '~/components/order-list/order-list.reducer'\nimport type {\n CartState,\n FlashMessage,\n GuestProfile,\n ResortFavorites,\n ProfileDetailsEdit,\n PhotoUploadState,\n ResortChargeState,\n} from '~/types'\n\nconst products = (state = []) => state\n\nexport default () =>\n combineReducers({\n address,\n application,\n activeItem,\n auth,\n cart,\n creditCardOnFile,\n credits,\n emailConfirmation,\n favoriteDestinations,\n featureFlags,\n flashMessages,\n groupMembers,\n minorConsent,\n mountainChecklist,\n myOrders,\n navigation,\n notifications,\n onboarding,\n passwordReset,\n photoUpload,\n productCatalog,\n products,\n profile,\n profileDetailsEdit,\n profileProducts,\n redemptions,\n redeemableVouchers,\n reservations,\n resortAuthorization,\n resortCharge,\n resortFavorites,\n resorts,\n resources,\n session,\n termsAndConditions,\n ui,\n inviteParticipant,\n waivers,\n })\n\nexport type AppState = {\n address: {\n updating: boolean\n }\n application: ApplicationState\n auth: AuthState\n cart: CartState\n creditCardOnFile: CreditCardOnFileState\n credits: CreditsState\n emailConfirmation: EmailConfirmationType\n favoriteDestinations: FDState\n featureFlags: FeatureFlags\n flashMessages: FlashMessage[]\n groupMembers: GroupMemberState\n inviteParticipant: InviteParticipantState\n minorConsent: MinorConsentState\n mountainChecklist: MountainChecklistState\n myOrders: OrdersState\n navigation: NavigationState\n notifications: NotificationsState\n passLookup: {\n associatingMedia: boolean\n }\n passwordReset: PasswordResetState\n photoUpload: PhotoUploadState\n productCatalog: ProductCatalogState\n profile: GuestProfile\n profileDetailsEdit: ProfileDetailsEdit\n profileProducts: ProfileProductState\n redemptions: RedemptionsState\n redeemableVouchers: RedeemableVouchersState\n reservations: ReservationsState\n resortAuthorization: ResortAuthorizationState\n resortCharge: ResortChargeState\n resortFavorites: ResortFavorites\n resorts: ResortsState\n resources: Record>\n termsAndConditions: TermsState\n ui: UIState\n waivers: WaiversState\n}\n\nexport type { GroupMemberState } from './group-members'\nexport type { ProfileProductState } from './profile-products'\nexport type { State as ProductCatalogState } from './product-catalog'\n","import { camelizeKeys } from 'humps'\nimport debounce from 'lodash/debounce'\nimport { applyMiddleware, compose, createStore } from 'redux'\nimport { thunk } from 'redux-thunk'\n\nimport { setApplicationWidth } from '~/actions/application'\nimport track, {\n enhancedCommerceMiddleware,\n} from '~/utils/enhanced-commerce-tracking'\n\nimport adobeTriggerView from './middleware/adobe-trigger-view'\nimport keepAlive from './middleware/keep-alive'\nimport createReducers from './reducers'\nimport sessionCookie from './utils/session-cookie'\n\nimport type { CartState } from '~/types'\n\nfunction create(initialState: Record) {\n const reducers = createReducers()\n\n const middleware = [\n thunk,\n enhancedCommerceMiddleware,\n keepAlive,\n adobeTriggerView(),\n ]\n\n const enhancer = compose(\n applyMiddleware(...middleware),\n window.__REDUX_DEVTOOLS_EXTENSION__\n ? window.__REDUX_DEVTOOLS_EXTENSION__()\n : (f) => f,\n )\n return createStore(reducers, initialState, enhancer)\n}\n\nfunction getCart() {\n const { updatedAt, ...rest } = camelizeKeys(window.CONSTANTS.cart)\n\n return { ...rest }\n}\n\nfunction getAuth() {\n return {\n authenticationAttemptRejected: false,\n pending: false,\n authenticated: sessionCookie.isAuthenticated(),\n }\n}\n\nfunction getSession() {\n return {\n lastUpdated: Date.now(),\n updating: false,\n }\n}\n\nfunction getInitialState() {\n return {\n auth: getAuth(),\n cart: getCart(),\n profile: {\n loaded: false,\n },\n session: getSession(),\n }\n}\n\nexport function createAndInitializeStore({\n trackCart = true,\n}: {\n trackCart?: boolean\n} = {}) {\n const initialState = getInitialState()\n\n if (trackCart) track.cart(initialState.cart as CartState)\n\n const store = create(initialState)\n\n store.dispatch(setApplicationWidth(window.innerWidth))\n\n window.onresize = debounce(() => {\n store.dispatch(setApplicationWidth(window.innerWidth))\n }, 200)\n\n return store\n}\n"],"names":["root","require$$0","now","now_1","isObject","require$$1","toNumber","require$$2","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","debounce_1","setApplicationWidth","width","sanitizePathname","pathname","adobeTriggerView","next","action","triggerView","returnValue","NAVIGATION_LOCATION_CHANGE_ACTION_TYPE","keepAlive","store","extendSessionInBackground","PATH","requestLoadMyOrders","response","authedFetch","HTTPError","LOAD_MY_ORDERS_REQUEST","LOAD_MY_ORDERS_SUCCESS","loadMyOrdersSuccess","orders","loadMyOrders","dispatch","data","camelizeKeys","error","reportGroupedError","initialState","myOrders","state","sortedOrders","a","b","SET_ACTIVE_ITEM","setActiveItem","REMOVE_ACTIVE_ITEM","removeActiveItem","DEFAULT_STATE","activeItem","UPDATE_ADDRESSES_START","UPDATE_ADDRESSES_SUCCESS","UPDATE_ADDRESSES_FAIL","updateAddresses","profileId","addresses","showSuccessFlash","requestPutAddresses","delay","addFlashMessage","i18n","loadProfile","address","isDesktop","DESKTOP_WIDTH","application","initialAuthState","auth","CHECKING_AUTH","AUTHENTICATING","AUTHENTICATION_FAILED","AUTHENTICATED","AUTH_CHECKED","RESET_AUTH_REJECTED","creditCardOnFile","LOAD_CREDIT_CARD_ON_FILE_START","LOAD_CREDIT_CARD_ON_FILE_SUCCESS","LOAD_CREDIT_CARD_ON_FILE_NO_CARD","LOAD_CREDIT_CARD_ON_FILE_FAIL","RESEND_EMAIL_SUCCESS","confirmEmailWarning","CONFIRM_EMAIL_SUCCESS","confirmEmailSuccess","CONFIRM_EMAIL_FAILURE","confirmEmailFailure","requestingResend","resendConfirmationEmail","email","opts","resp","confirmEmail","EMAIL_CONFIRMATION_STATUS","push","emailConfirmation","OPEN_MODAL","CLOSE_MODAL","SET_SELECTED","setSelected","selectedFavorites","favoriteDestinations","postInvite","INVITE_PARTICIPANT_STARTED","INVITE_PARTICIPANT_COMPLETED","INVITE_PARTICIPANT_FAILED","GO_TO_STEP","RESET_ERRORS","openInviteParticipantModal","closeInviteParticipantModal","goToStep","step","resetErrors","inviteParticipant","loadGroup","errorCode","getErrorCode","ConfirmInviteStep","invitee","currentStep","onProceed","React","Step","Fragment","ContentBlock","ResponsiveButton","Alert","children","heading","Icon","isTeenProfile","profile","age","ageNow","MIN_TEEN","MIN_ADULT","isAdultProfile","EmailForm","PureComponent","key","value","Form","EnterEmailStep","Component","validationErrors","validateRequired","validateEmail","allErrors","INVALID","REQUIRED","ALREADY_REGISTERED","onChangeEmail","onEdit","errors","translateErrors","InviteParticipantModal","Modal","loading","BASE_ERROR_KEY","modalOpen","combineReducers","minorConsent","TOGGLE_MINOR_CONSENT","ALERT_MINOR_CONSENT","RESET_MINOR_CONSENT","mountainChecklist","MOUNTAIN_CHECKLIST_LOADED","LOAD_NOTIFICATIONS_START","LOAD_NOTIFICATIONS_SUCCESS","LOAD_NOTIFICATIONS_FAIL","DISMISS_NOTIFICATION","loadNotifications","reload","getState","loaded","getCustomerAPI","notification","dismissNotification","notifications","editableFieldTranslation","onboardingDeserializer","token","attribute","onboardingStatus","ONBOARDING_LOADED","onboardingLoaded","onboarding","ONBOARDING_RESET","UPDATE_ONBOARDING_STATUS","updateOnboardingStatus","status","loadOnboarding","changeLocation","text","verifyOnboarding","dob","endpoint","PASSWORD_RESET_PATH","requestSendPasswordReset","requestResetPassword","password","REQUEST_PASSWORD_RESET","requestPasswordReset","PASSWORD_RESET_REQUESTED","passwordResetRequested","PASSWORD_RESET_REQUEST_FAILED","passwordResetRequestFailed","PASSWORD_RESET_REQUEST_FAILED_EMAIL_NOT_FOUND","passwordResetRequestFailedEmailNotFound","PASSWORD_RESET","passwordReset","PASSWORD_RESET_FAILED","passwordResetFailed","forgotPassword","minDelay","err","resetPassword","newPassword","authenticated","initialProfileState","updateProfile","PROFILE_UPDATE","LOAD_REDEEMABLE_VOUCHERS_START","LOAD_REDEEMABLE_VOUCHERS_SUCCESS","LOAD_REDEEMABLE_VOUCHERS_FAIL","loadRedeemableVouchers","redeemableVoucher","redeemableVouchers","LOAD_RESERVATIONS_START","LOAD_RESERVATIONS_SUCCESS","LOAD_RESERVATIONS_FAIL","loadReservations","api","getReservations","reservationsDeserializer","reservations","resortAuthorization","resortCharge","RESORT_CHARGE_LOADED","getResortFavorites","res","putResortFavorites","resortIDs","body","LOAD_RESORT_FAVORITES_START","LOAD_RESORT_FAVORITES_SUCCESS","LOAD_RESORT_FAVORITES_FAIL","UPDATE_RESORT_FAVORITES_START","UPDATE_RESORT_FAVORITES_SUCCESS","UPDATE_RESORT_FAVORITES_FAIL","loadResortFavorites","previousValue","currentResort","updateResortFavorites","resortID","resortFavorites","RESOURCE_UPDATE","resourceUpdate","path","resource","resourceLoading","resourceLoaded","resourceLoadFailed","loadResource","name","id","resourcePath","updateResource","currentResource","resources","session","UPDATE_SESSION_REQUEST","UPDATE_SESSION_SUCCESS","UPDATE_SESSION_FAILURE","termsAndConditions","CHECK_TERMS","getUnixTime","ALERT_TERMS","RESET_TERMS","GET_WAIVERS_REQUEST","GET_WAIVERS_SUCCESS","GET_WAIVERS_FAILURE","loadWaivers","waivers","products","createReducers","cart","credits","featureFlags","flashMessages","groupMembers","navigation","photoUpload","productCatalog","profileDetailsEdit","profileProducts","redemptions","resorts","ui","create","reducers","middleware","thunk","enhancedCommerceMiddleware","enhancer","compose","applyMiddleware","f","createStore","getCart","updatedAt","rest","getAuth","sessionCookie","getSession","getInitialState","createAndInitializeStore","trackCart","track"],"mappings":"w1BAAA,IAAIA,EAAOC,GAAkB,EAkBzBC,EAAM,UAAW,CACnB,OAAOF,EAAK,KAAK,IAAK,CACvB,EAED,OAAAG,EAAiBD,4CCt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