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AEqH,MAAM,GAC5G,CACF,G","sources":["webpack://kinside_app/./app/frontend/src/common/stores/modules/search.service.js","webpack://kinside_app/./app/frontend/src/common/services/user.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/messaging.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/messaging.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/tours.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/dependents.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/dependents.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/track.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/legup.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/legup.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/notifications.js","webpack://kinside_app/./app/frontend/src/common/services/hubspot.service.js","webpack://kinside_app/./app/frontend/src/care-provider/stores/modules/provider-user.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/tours.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/account.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/account.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facility.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facility.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facilities.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/payments.service.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/facilities.js","webpack://kinside_app/./app/frontend/src/common/stores/modules/payments.js"],"sourcesContent":["import {\n axios,\n toSnakeCase,\n toCamelCase,\n clearEmptyValue,\n getBoundsFromFacilities,\n} from '@utils';\n\nfunction searchParamsToFetchParams({\n location, filters: fil, bounds, geoSearchType, sort, searchRadius,\n}) {\n const filters = (() => {\n if (fil) {\n const {\n age,\n startDate,\n onlyEmergencyCare,\n ...rest\n } = fil;\n return {\n dependents: age?.dependents,\n age_ranges: age?.range,\n openings: startDate?.value,\n openings_from: startDate?.date,\n emergency_care: onlyEmergencyCare,\n search_radius: searchRadius,\n ...toSnakeCase(rest),\n };\n }\n return undefined;\n })();\n\n return clearEmptyValue({\n source_address: location?.targetAddress,\n source_latitude: location?.lat,\n source_longitude: location?.lon,\n precise_address_lat: location?.lat,\n precise_address_lon: location?.lon,\n source_city: location?.city,\n source_state: location?.state,\n source_zip: location?.zip,\n is_precise_address: location?.preciseLocation,\n filters,\n bounds_neLat: bounds?.neLat,\n bounds_neLon: bounds?.neLon,\n bounds_swLat: bounds?.swLat,\n bounds_swLon: bounds?.swLon,\n center_lon: location?.lon,\n center_lat: location?.lat,\n geo_search_type: geoSearchType,\n sort,\n });\n}\n\nfunction fetchParamsToSearchParams({\n filters: fetchFilters,\n /* eslint-disable camelcase */\n bounds_neLat,\n bounds_neLon,\n bounds_swLat,\n bounds_swLon,\n ...rest\n}) {\n const {\n dependents,\n age_ranges: range,\n openings,\n openings_from,\n emergency_care: onlyEmergencyCare,\n search_radius: searchRadius,\n ...restFilters\n } = fetchFilters;\n\n const filters = {\n age: { dependents: dependents || [], range: range || [] },\n startDate: { value: openings, date: openings_from },\n onlyEmergencyCare,\n ...toCamelCase(restFilters),\n };\n\n const location = {\n targetAddress: rest.source_address,\n lat: parseFloat(rest.source_latitude),\n lon: parseFloat(rest.source_longitude),\n city: rest.source_city,\n state: rest.source_state,\n zip: rest.source_zip,\n preciseLocation: rest.precise_address,\n };\n\n return ({\n bounds: {\n neLat: bounds_neLat,\n neLon: bounds_neLon,\n swLat: bounds_swLat,\n swLon: bounds_swLon,\n },\n location,\n filters: clearEmptyValue(filters),\n searchRadius,\n });\n /* eslint-enable camelcase */\n}\n\nasync function fetchSearchHistory() {\n const response = await axios.get('/cd_searches.json');\n return toCamelCase(response.data);\n}\n\nasync function saveSearch(params) {\n const response = await axios.post('/cd_searches.json', searchParamsToFetchParams(params));\n return toCamelCase(response.data);\n}\n\nasync function fetchSearch(id) {\n const response = await axios.get(`/cd_searches/${id}.json`);\n return fetchParamsToSearchParams(response.data);\n}\n\nfunction deleteSearch(id) {\n return axios.delete(`/cd_searches/${id}.json`);\n}\n\nasync function fetchPhilosophies() {\n const response = await axios.get('/facility_philosophies.json');\n return response.data;\n}\n\nasync function fetchScheduleTypes() {\n const response = await axios.get('/api/v1/schedule_types.json');\n return response.data;\n}\n\n// age ranges are disabled\n// async function fetchAgeRanges() {\n// const response = await axios.get('/age_groups.json');\n// return toCamelCase(response.data);\n// }\n\nasync function fetchMotivation() {\n const response = await axios.get('/parent_motivations.json');\n return toCamelCase(response.data);\n}\n\nfunction arrayToString(array = []) {\n return array.join(',');\n}\n\nfunction mapParamsToFetchParams({\n filters: fil, bounds, pagination, location, geoSearchType, sort, searchRadius, searchId,\n} = {}) {\n const { filters: fetchFilters, ...rest } = searchParamsToFetchParams({\n filters: fil,\n bounds,\n location,\n geoSearchType,\n sort,\n searchRadius,\n });\n\n const filters = {};\n if (fil) {\n Object.keys(fetchFilters).forEach((filterName) => {\n const value = fetchFilters[filterName];\n if (value === undefined || (Array.isArray(value) && !value.length)) {\n return;\n }\n filters[`filters[${filterName}]`] = Array.isArray(value) ? arrayToString(value) : value;\n });\n }\n\n return {\n ...filters,\n ...rest,\n per_page: pagination?.perPage,\n page: pagination?.page,\n search_id: searchId,\n };\n}\n\nasync function findFacilities(restOfParams) {\n const axiosController = new AbortController();\n\n try {\n const params = mapParamsToFetchParams(restOfParams);\n\n const response = await axios.get('/childcare/markers.json', {\n params,\n signal: axiosController.signal,\n });\n\n const { markers, ...restOfResponse } = response.data;\n const facilities = markers.map((m) => ({ ...m.facility, zipBased: m.zip_based }));\n\n return toCamelCase({\n ...restOfResponse,\n facilities,\n pagination: {\n page: response.data.current_page,\n totalPages: response.data.total_pages,\n totalRecords: response.data.total_results,\n },\n markers: markers\n .map(({ facility, ...rest }) => ({ ...rest, facilityId: facility.id })),\n boundsToFit: getBoundsFromFacilities(markers),\n });\n } catch (error) {\n if (axiosController.abort()) {\n return undefined;\n }\n throw new Error(error);\n }\n}\n\nexport {\n fetchSearchHistory,\n saveSearch,\n fetchSearch,\n deleteSearch,\n fetchPhilosophies,\n fetchScheduleTypes,\n searchParamsToFetchParams,\n fetchMotivation,\n findFacilities,\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\n\nconst notificationSettings = [\n { value: 'all', label: 'Receive all emails' },\n { value: 'important', label: 'Receive important emails only' },\n];\n\nasync function removeAvatar() {\n return axios.delete('/avatar');\n}\n\nasync function updateNotificationSettings(settings) {\n return axios.patch('/notification_settings', { user: { email_settings: settings } });\n}\n\nasync function getUser() {\n const { data } = await axios.get('/user.json');\n return toCamelCase(data.user);\n}\n\nasync function updateUser(userObj) {\n const { isImpersonated, ...user } = userObj;\n const response = await axios.put('/user.json', { user: toSnakeCase(user) });\n return toCamelCase(response.data.user);\n}\n\nasync function updatePassword(password, passwordConfirmation) {\n const response = await axios.put(\n '/users.json',\n {\n user: {\n password,\n password_confirmation: passwordConfirmation,\n },\n },\n ).catch(() => false);\n\n return response;\n}\n\nasync function getUserNavData(email) {\n const { data } = await axios.get('/api/v1/legup/users/nav', {\n params: {\n email,\n },\n });\n\n return toCamelCase(data);\n}\n\nasync function updateUserContact(userObj) {\n const response = await axios.put('/update_contact.json', toSnakeCase(userObj));\n return toCamelCase(response.data.user);\n}\n\nexport default {\n removeAvatar,\n updateNotificationSettings,\n getUser,\n updateUser,\n updatePassword,\n notificationSettings,\n getUserNavData,\n updateUserContact,\n};\n","import { axios, toSnakeCase, toCamelCase } from '@utils';\n\nconst CONVERSATIONS_BASE_PATH = 'api/v1/conversations';\nconst MESSAGES_BASE_PATH = 'api/v1/messages';\n\nasync function getConversations(params) {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nasync function getMessages(params) {\n const response = await axios.get(`/${MESSAGES_BASE_PATH}`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nasync function sendMessage(body) {\n const response = await axios.post(\n `/${MESSAGES_BASE_PATH}`,\n toSnakeCase(body),\n );\n return toCamelCase(response.data);\n}\n\nasync function markAsRead(body) {\n const response = await axios.put(\n `/${MESSAGES_BASE_PATH}/mark_read`,\n toSnakeCase(body),\n );\n\n return response;\n}\n\nasync function getParentInfo(params) {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}/parent_info`, {\n params: toSnakeCase(params),\n });\n return toCamelCase(response.data);\n}\n\nfunction formatConversation(conversation, currentUser) {\n const conv = {\n id: conversation.id,\n lastMessage: conversation.lastMessage,\n facilityId: conversation.childCareFacilityId,\n color: ['gold', 'periwinkle', 'coral', 'fuchsia', 'rust'][Math.floor(Math.random() * 5)],\n lastUpdatedAt: conversation.updatedAt,\n hasUnreadMessages: conversation.hasUnreadMessages,\n };\n if (currentUser.isParent) {\n conv.secondUser = {\n id: conversation.firstUserType === 'User' ? conversation.secondUserId : conversation.firstUserId,\n name: conversation.childCareFacilityName,\n type: 'Provider',\n };\n } else {\n conv.secondUser = {\n id: conversation.firstUserType === 'Provider' ? conversation.secondUserId : conversation.firstUserId,\n name: conversation.firstUserType === 'Provider' ? conversation.secondUser : conversation.firstUser,\n type: 'User',\n legupParentId: conversation.legupParentId,\n };\n }\n return conv;\n}\nasync function getUnreadBadge() {\n const response = await axios.get(`/${CONVERSATIONS_BASE_PATH}/badge`);\n return toCamelCase(response.data);\n}\n\nexport {\n getConversations,\n getMessages,\n sendMessage,\n markAsRead,\n getParentInfo,\n formatConversation,\n getUnreadBadge,\n};\n","import cloneDeep from 'lodash/cloneDeep';\nimport { toCamelCase } from '../../utils';\nimport {\n getConversations,\n getMessages,\n sendMessage,\n markAsRead,\n getParentInfo,\n formatConversation,\n getUnreadBadge,\n} from './messaging.service';\n\nexport default {\n namespaced: true,\n\n state: {\n conversations: [],\n messages: [],\n currentConversationId: undefined,\n conversationScrollEnabled: true,\n messagesScrollEnabled: true,\n lastMessageId: undefined,\n currentConversationFamily: {},\n newMessageReceived: false,\n unreadBadge: 0,\n },\n mutations: {\n setConversations: (state, { conversations, lastId, isFirstNewConversation }) => {\n if (lastId) {\n state.conversations.push(...conversations);\n } else if (isFirstNewConversation) {\n // if conversation returned in request, merge with new conversation placeholder\n // else push rest of conversations to the list\n const newConv = state.conversations[0];\n const idx = conversations.findIndex((c) => c.secondUser.type === newConv.secondUser.type\n && c.secondUser.id === newConv.secondUser.id);\n if (idx > -1) {\n const conversation = conversations.splice(idx, 1)[0];\n state.conversations[0] = conversation;\n state.currentConversationId = conversation.id;\n }\n state.conversations.push(...conversations);\n } else {\n state.conversations = conversations;\n }\n },\n setMessages: (state, messages) => {\n state.lastMessageId = messages[messages.length - 1].id;\n // group messages by sent date to display dates in chat\n // and reverse the messages to handle the inverted scrolling\n const groupedMessages = messages.reverse().reduce((groups, message) => {\n const date = new Date(message.createdAt).toDateString();\n\n const index = groups.findIndex((group) => group.date === date);\n if (index < 0) {\n groups.push({\n date,\n messages: [message],\n });\n } else {\n groups[index].messages.push(message);\n }\n return groups;\n }, []);\n\n // check if the new messages last date overlaps with the old messages dates\n const lastDate = groupedMessages[groupedMessages.length - 1].date;\n if (lastDate === state.messages[0]?.date) {\n state.messages[0].messages.unshift(...groupedMessages[groupedMessages.length - 1].messages);\n groupedMessages.pop();\n }\n state.messages = [...groupedMessages, ...state.messages];\n },\n pushMessage: (state, message) => {\n // check if date matches last group of messages\n const date = new Date(message.createdAt).toDateString();\n if (date === state.messages[state.messages.length - 1]?.date) {\n state.messages[state.messages.length - 1].messages.push(message);\n } else {\n state.messages.push({\n date,\n messages: [message],\n });\n }\n },\n changeConversation: (state, conversationId) => {\n state.messages = [];\n state.lastMessageId = undefined;\n state.currentConversationId = conversationId;\n state.messagesScrollEnabled = true;\n state.currentConversationFamily = {};\n },\n setConversationsScroll: (state, isEnabled) => {\n state.conversationScrollEnabled = isEnabled;\n },\n setChatScroll: (state, isEnabled) => {\n state.messagesScrollEnabled = isEnabled;\n },\n moveConversationToTop: (state, { message, isNewConversation, conversation }) => {\n const conversationId = isNewConversation ? 'newConversation' : message.conversationId;\n const convIdx = state.conversations.findIndex((c) => c.id === conversationId);\n if (convIdx > -1) {\n const conv = state.conversations.splice(convIdx, 1)[0];\n conv.id = message.conversationId;\n conv.lastMessage = message;\n if (message.secondUserId && !conv.secondUser?.id) conv.secondUser.id = message.secondUserId;\n state.conversations.unshift(conv);\n } else if (conversation) {\n state.conversations.unshift(conversation);\n }\n },\n markAsRead: (state, conversationId) => {\n const convIdx = state.conversations.findIndex((c) => c.id === conversationId);\n\n if (convIdx === -1) return;\n\n state.conversations[convIdx].lastMessage.read = true;\n state.conversations[convIdx].hasUnreadMessages = false;\n },\n newMessage: (state, {\n providerId, facilityId, facilityName, legupParentId,\n }) => {\n // add new conversation to top of the list\n const conversations = cloneDeep(state.conversations);\n conversations.unshift({\n id: 'newConversation',\n secondUser: {\n id: legupParentId ? undefined : providerId,\n type: legupParentId ? 'User' : 'Provider',\n name: legupParentId ? '' : facilityName,\n legupParentId,\n },\n lastMessage: {},\n createdAt: new Date(),\n facilityId,\n });\n state.conversations = conversations;\n },\n setConversationFamily: (state, family) => {\n state.currentConversationFamily = family;\n },\n setConversationReceiverName: (state, parent) => {\n state.conversations[0].secondUser.name = `${parent.firstName} ${(parent.lastName || '').charAt(0)}`;\n },\n resetMessaging: (state) => {\n state.conversations = [];\n state.messages = [];\n state.currentConversationId = undefined;\n state.conversationScrollEnabled = true;\n state.messagesScrollEnabled = true;\n state.lastMessageId = undefined;\n state.currentConversationFamily = {};\n state.newMessageReceived = false;\n },\n setNewMessageReceived: (state, isNewMessage) => {\n state.newMessageReceived = isNewMessage;\n },\n setUnreadBadge: (state, count) => {\n state.unreadBadge = count;\n },\n updateUnreadBadge: (state, value) => {\n state.unreadBadge += value;\n },\n },\n actions: {\n async fetchConversations(\n {\n commit, dispatch, state, rootState,\n },\n params,\n ) {\n let lastId = state.conversations[state.conversations.length - 1]?.id;\n const lastUpdatedAt = state.conversations[state.conversations.length - 1]?.lastUpdatedAt;\n let isFirstNewConversation = false;\n if (lastId === 'newConversation') {\n lastId = undefined;\n isFirstNewConversation = true;\n }\n try {\n const data = await getConversations({ lastUpdatedAt, ...params });\n if (data.length) {\n const conversations = data.map((c) => formatConversation(c, rootState.user.current));\n commit('setConversations', {\n lastId,\n conversations,\n isFirstNewConversation,\n });\n } else {\n commit('setConversationsScroll', false);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get conversations', error }, { root: true });\n }\n },\n\n async fetchMessages({ commit, dispatch, state }, conversationId) {\n if (state.currentConversationId !== conversationId) {\n commit('changeConversation', conversationId);\n }\n try {\n const data = await getMessages({\n conversationId,\n lastId: state.lastMessageId,\n });\n if (data.length) {\n commit('setMessages', data);\n } else {\n commit('setChatScroll', false);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get messages', error }, { root: true });\n }\n },\n async fetchUnreadBadge({ commit, dispatch }) {\n try {\n const data = await getUnreadBadge();\n commit('setUnreadBadge', data?.badgeCount);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get messages badge', error }, { root: true });\n }\n },\n\n async sendMessage(\n {\n commit, dispatch, state, rootState,\n },\n {\n content, receiverId, conversationId, facilityId, legupParentId,\n },\n ) {\n const isNewConversation = conversationId === 'newConversation';\n const body = {\n content, secondUserId: receiverId, facilityId, legupParentId,\n };\n if (rootState.user.current.isParent) {\n body.senderType = 'User';\n body.senderId = rootState.user.current.id;\n body.secondUserType = 'Provider';\n } else {\n body.senderType = 'Provider';\n body.senderId = rootState.providerId;\n body.secondUserType = 'User';\n }\n try {\n const data = await sendMessage(body);\n if (!data) return;\n\n commit('moveConversationToTop', { message: data, isNewConversation });\n if (!isNewConversation) commit('pushMessage', data);\n if (!state.conversationId || isNewConversation) {\n state.currentConversationId = data.conversationId;\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not send message', error }, { root: true });\n }\n },\n\n async markConversationAsRead({ commit, dispatch }, conversationId) {\n try {\n const response = await markAsRead({ conversationId });\n if (!response.status === 200) {\n dispatch('notifications/addToastError', { text: 'Could not mark messages as read' }, { root: true });\n }\n commit('markAsRead', conversationId);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not mark message as read', error }, { root: true });\n }\n },\n\n async fetchParentInfo({\n commit, dispatch, state,\n }, body) {\n try {\n const response = await getParentInfo(body);\n commit('setConversationFamily', response);\n if (body.legupParentId && state.currentConversationId === state.conversations[0].id) {\n commit('setConversationReceiverName', response.legupParent);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch family', error }, { root: true });\n }\n },\n\n newMessageReceived({ commit, rootState }, message) {\n const messageFormatted = toCamelCase(message).newMessage;\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n // drop message if current user is the sender\n if (userType !== messageFormatted.senderType) {\n commit('pushMessage', messageFormatted);\n commit('setNewMessageReceived', true);\n }\n },\n\n newConversationReceived({ commit, rootState, state }, conv) {\n const { conversation, newMessage, incBadge } = toCamelCase(conv);\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n if (userType === newMessage.senderType) return;\n\n if (conversation.id === state.currentConversationId) {\n newMessage.read = conversation.id === state.currentConversationId;\n } else if (incBadge) {\n commit('updateUnreadBadge', +1);\n }\n const formattedConversation = formatConversation({\n ...conversation,\n facilityId: conversation.childCareFacilityId,\n lastMessage: newMessage,\n }, rootState.user.current);\n commit('moveConversationToTop', {\n message: newMessage, isNewConversation: false, conversation: formattedConversation,\n });\n },\n },\n};\n","import vue from 'vue';\nimport moment from 'moment-timezone';\nimport { addArrayToDictionary } from '@utils';\nimport {\n fetchParentSlots, updateParentSlots, reserveTour, fetchTours,\n getTourSettings, updateSettings, fetchSingleTour,\n fetchUpcomingParentTourForCenter,\n fetchToursForParent,\n tourProviderSetting,\n centerTourPolicy,\n centerTourSlots,\n bookTour, cancelTour, rescheduleTour, confirmTour,\n} from './tours.service';\n\nexport default {\n namespaced: true,\n state: {\n parentSlots: [],\n tours: {},\n toursAsArray: [],\n centerSettings: {},\n tourPolicy: {},\n tourSlots: {},\n tourEnabled: false,\n upcomingTour: {},\n pastTour: {},\n toursForParent: [],\n tourToConfirm: {},\n },\n mutations: {\n setParentSlots: (state, { slots }) => {\n state.parentSlots = [...slots];\n },\n setTours: (state, payload) => {\n state.tours = { ...addArrayToDictionary(payload, state.tours) };\n },\n setToursAsArray: (state, payload) => {\n state.toursAsArray = [...payload];\n },\n // legup\n setCenterSettings: (state, settings) => {\n state.centerSettings = settings;\n },\n setTourPolicy: (state, { tourPolicy }) => {\n state.tourPolicy = tourPolicy;\n },\n setTourSlots: (state, { tourSlots }) => {\n state.tourSlots = tourSlots;\n },\n setTourSetting: (state, { tourEnabled }) => {\n state.tourEnabled = tourEnabled;\n },\n setCenterParentUpcomingTour: (state, { tour }) => {\n state.upcomingTour = tour;\n },\n setCenterParentPastTour: (state, { tour }) => {\n state.pastTour = tour;\n },\n setToursForParent(state, payload) {\n state.toursForParent = payload;\n },\n setSingleTour(state, tour) {\n state.tourToConfirm = tour;\n },\n },\n getters: {\n tourStartTime: (state) => (tourId, format = 'ddd MMM D h:mma') => {\n const tour = state.tours[tourId];\n const startTime = moment.unix(tour.startAt).tz(tour.timezone);\n return startTime.format(format);\n },\n // legup\n tourProviderSetting(state) {\n return state.tourEnabled;\n },\n centerTourPolicy(state) {\n return state.tourPolicy;\n },\n centerTourSlots(state) {\n return state.tourSlots;\n },\n upcomingTour(state) {\n return state.upcomingTour;\n },\n pastTour(state) {\n return state.pastTour;\n },\n tourToConfirm(state) {\n return state.tourToConfirm;\n },\n centerSettings: (state) => state.centerSettings,\n },\n actions: {\n async fetchParentSlots({ commit, dispatch }, { timezone }) {\n try {\n const slots = await fetchParentSlots(timezone);\n commit('setParentSlots', { slots });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load parent slots.', error }, { root: true });\n }\n },\n\n async fetchTours({ commit, rootState }) {\n const tours = await fetchTours(rootState.facilityId);\n commit('setTours', tours);\n commit('setToursAsArray', tours);\n },\n async updateParentSlots({ commit }, { newSlots, timezone }) {\n const slots = newSlots.map((ps) => {\n const date = vue.moment(ps.date).format('YYYY-MM-DD');\n const slotDateFrom = vue.moment\n .tz(`${date} ${ps.time.from}`, 'YYYY-MM-DD h:mm A', timezone)\n .utc();\n const slotDateTo = vue.moment\n .tz(`${date} ${ps.time.to}`, 'YYYY-MM-DD h:mm A', timezone)\n .utc();\n\n return {\n id: ps.id,\n from: slotDateFrom,\n to: slotDateTo,\n date: ps.date,\n };\n });\n const updatedSlots = await updateParentSlots(slots);\n commit('setParentSlots', { slots: updatedSlots });\n },\n async reserveTour({ commit, dispatch, rootState }, { tourData, facilityId }) {\n try {\n const { tour, redirectUrl } = await reserveTour(\n {\n ...tourData,\n facilityId,\n dependentIds: Object.keys(rootState.dependents.list),\n },\n );\n if (tour) {\n commit('setTours', [tour]);\n }\n return { redirectUrl, tour };\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not reserve the tour.', error }, { root: true });\n throw new Error();\n }\n },\n // legup tour\n async centerParentTour({ rootState, dispatch, commit }, { legupCenterId }) {\n try {\n if (rootState.user.current.legupParentId) {\n const response = await fetchUpcomingParentTourForCenter(\n rootState.user.current.legupParentId,\n legupCenterId,\n );\n if (response?.success) {\n const today = new Date();\n const upcomingTours = response.tours.filter((t) => (\n new Date(new Date(t.startTime).toDateString()) >= today\n ));\n upcomingTours.sort((a, b) => a.startTime.localeCompare(b.startTime));\n commit('setCenterParentUpcomingTour', { tour: (upcomingTours.shift() || {}) });\n\n const pastTours = response.tours.filter((t) => (\n new Date(new Date(t.startTime).toDateString()) <= today\n ));\n pastTours.sort((a, b) => a.startTime.localeCompare(b.startTime));\n commit('setCenterParentPastTour', { tour: (pastTours.shift() || {}) });\n }\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch legup tours data.', error }, { root: true });\n }\n },\n async bookTour({ commit, dispatch }, {\n centerId, parent, child, tourInfo, noFamilyNotes, ageGroupId,\n }) {\n try {\n const response = await bookTour(\n centerId,\n parent,\n child,\n tourInfo,\n noFamilyNotes,\n ageGroupId,\n );\n if (response?.success) {\n commit('setCenterParentUpcomingTour', { tour: response.tour });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not book tour.', error }, { root: true });\n throw new Error();\n }\n },\n async cancelTour({ commit, dispatch }, { tour, userId }) {\n try {\n const response = await cancelTour(tour, userId);\n if (response?.success) {\n if (userId) {\n commit('setSingleTour', response.tour);\n } else {\n commit('setCenterParentUpcomingTour', { tour: null });\n }\n dispatch('notifications/addToastSuccess', { text: 'Your tour has been canceled.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not cancel tour.', error }, { root: true });\n throw new Error();\n }\n },\n async rescheduleTour({ commit, dispatch, state }, { params }) {\n try {\n const { tour, newDateTime, userId } = params;\n const response = await rescheduleTour(tour, newDateTime, userId);\n if (response?.success) {\n if (userId) {\n const { timezone, policy, ageGroupId } = state.tourToConfirm;\n commit('setSingleTour', {\n ...response.tour, timezone, policy, ageGroupId,\n });\n } else {\n commit('setCenterParentUpcomingTour', { tour: response.tour });\n }\n dispatch('notifications/addToastSuccess', { text: 'Your tour has been rescheduled.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not reschedule tour.', error }, { root: true });\n throw new Error();\n }\n },\n async fetchSingleTour({ commit }, { tourId, centerId, userId }) {\n const response = await fetchSingleTour(tourId, centerId, userId);\n if (response?.success) {\n commit('setSingleTour', response.tour);\n }\n },\n async parentConfirmTour({ commit, dispatch, state }, { tourId, centerId, userId }) {\n try {\n const response = await confirmTour(tourId, centerId, userId);\n if (response?.success) {\n commit('setSingleTour', { ...state.tourToConfirm, confirmed: true });\n dispatch('notifications/addToastSuccess', { text: 'Your tour is confirmed.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not confirm tour.', error }, { root: true });\n throw new Error();\n }\n },\n async fetchToursForParent({ rootState, dispatch, commit }) {\n try {\n if (rootState.user.current.legupParentId) {\n const response = await fetchToursForParent(\n rootState.user.current.legupParentId,\n );\n if (response?.success) {\n commit('setToursForParent', response.tours);\n }\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch all tours for parent.', error }, { root: true });\n }\n },\n async tourProviderSetting({ commit, dispatch }, { params }) {\n try {\n const response = await tourProviderSetting(params);\n if (response?.success) {\n commit('setTourSetting', { tourEnabled: response.tourEnabled });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve tour setting.', error }, { root: true });\n }\n },\n async centerTourPolicy({ commit, dispatch }, { params }) {\n try {\n const response = await centerTourPolicy(params);\n if (response?.success) {\n const { policy, virtualInstructions, virtualLink } = response;\n commit('setTourPolicy', { tourPolicy: { policy, virtualInstructions, virtualLink } });\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong fetching facility tour policy.', error },\n { root: true },\n );\n }\n },\n async centerTourSlots({ commit, dispatch }, { params }) {\n try {\n const response = await centerTourSlots(params);\n if (response?.success) {\n commit('setTourSlots', { tourSlots: response.times });\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong fetching facility available tours slots.', error },\n { root: true },\n );\n }\n },\n async fetchSettings({ commit, dispatch }, params) {\n try {\n const response = await getTourSettings({ params });\n commit('setCenterSettings', response.data);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch your tour settings.', error }, { root: true });\n }\n },\n async updateSettings({ commit, dispatch }, params) {\n try {\n const response = await updateSettings(params);\n if (response.success) {\n commit('setCenterSettings', response.data);\n dispatch('notifications/addToastNotification', { text: 'Your tour settings have been updated.' }, { root: true });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch your tour settings.', error }, { root: true });\n }\n },\n },\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\n\nasync function fetchDependents(params) {\n const response = await axios.get('/api/v1/dependents.json', { params: toSnakeCase(params) });\n return toCamelCase(response.data);\n}\n\nasync function addDependent(dependent) {\n const response = await axios.post('/dependents.json', { dependent: toSnakeCase(dependent) });\n return toCamelCase(response.data);\n}\n\nasync function updateDependent(dependent) {\n const response = await axios.put(`/dependents/${dependent.id}.json`, toSnakeCase(dependent));\n return toCamelCase(response.data);\n}\n\nasync function removeDependent(id) {\n return axios.delete(`/dependents/${id}`);\n}\n\nexport {\n addDependent,\n updateDependent,\n removeDependent,\n fetchDependents,\n};\n","import { addArrayToDictionary } from '@utils';\nimport {\n fetchDependents,\n removeDependent,\n addDependent,\n updateDependent,\n} from './dependents.service';\n\nexport default {\n namespaced: true,\n\n state: {\n list: {},\n },\n getters: {\n dependentById: (state) => (depId) => (state.list[depId]),\n dependentIds: (state) => Object.keys(state.list),\n asArray(state) {\n return Object.values(state.list).filter((dependent) => dependent !== undefined);\n },\n },\n mutations: {\n clearDependents(state) {\n state.list = [];\n },\n updateDependents(state, dependents) {\n state.list = { ...addArrayToDictionary(dependents, state.list) };\n },\n updateDependent(state, dependent) {\n state.list[dependent.id] = dependent;\n },\n removeDependent(state, id) {\n const { [id]: removed, ...rest } = state.list;\n state.list = rest;\n },\n },\n\n actions: {\n async fetchDependents({ commit, dispatch }, params) {\n try {\n const dependents = await fetchDependents(params);\n commit('clearDependents');\n commit('updateDependents', dependents);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load dependents', error }, { root: true });\n throw new Error();\n }\n },\n async addDependents({ commit, dispatch }, dependents) {\n try {\n if (dependents && dependents.length) {\n const newDependents = await Promise.all(dependents.map((d) => addDependent(d)));\n commit('updateDependents', newDependents);\n return newDependents;\n }\n return [];\n } catch (error) {\n const names = dependents.map((d1) => d1.firstName).join(', ');\n dispatch('notifications/addToastError', { text: `Could not add dependents: ${names}`, error }, { root: true });\n throw new Error();\n }\n },\n async updateDependent({ commit, dispatch }, dependent) {\n try {\n if (dependent) {\n const updatedDependent = await updateDependent(dependent);\n commit('updateDependent', updatedDependent);\n return updatedDependent;\n }\n return undefined;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update dependent', error }, { root: true });\n throw new Error();\n }\n },\n async updateDependents({ commit, dispatch }, dependents) {\n try {\n const dependentsToUpdate = dependents.filter((d) => d.id !== -1);\n const dependentsToAdd = dependents.filter((d) => d.id === -1);\n const [addedDependents, ...updatedDependents] = await Promise.all([\n dispatch('addDependents', dependentsToAdd),\n ...dependentsToUpdate.map((d) => updateDependent(d)),\n ]);\n commit('updateDependents', updatedDependents);\n return { addedDependents, updatedDependents };\n } catch (error) {\n const names = dependents.map((d1) => d1.firstName).join(', ');\n dispatch('notifications/addToastError', { text: `Could not update dependents: ${names}`, error }, { root: true });\n throw new Error();\n }\n },\n async removeDependent({ commit, dispatch, state }, id) {\n try {\n await removeDependent(id);\n commit('removeDependent', id);\n } catch (error) {\n const dependent = state.list[id];\n dispatch('notifications/addToastError', { text: `Could not remove dependent: ${dependent.firstName} ${dependent.lastName}`, error }, { root: true });\n throw new Error();\n }\n },\n },\n};\n","import { toSnakeCase } from '@utils';\nimport hubspot from '@services/hubspot.service';\n\nif (!window.analytics) {\n window.analytics = {\n page: (name) => {\n console.info('Tracking Page', name); // eslint-disable-line no-console\n },\n identify: (id, obj) => {\n console.info('Tracking User', id, obj); // eslint-disable-line no-console\n },\n };\n}\n\nfunction extractUtmParams(url) {\n const urlObject = new URL(url);\n const utmParams = {};\n\n urlObject.searchParams.forEach((value, key) => {\n if (key.startsWith('utm_')) {\n utmParams[key] = value;\n }\n });\n\n return utmParams;\n}\n\nexport default {\n namespaced: true,\n\n actions: {\n event: (store, { category, event, props }) => {\n const eventName = `${category}_${event}`;\n // catch missing events for the areas where provider views are loaded into\n // the admin UI\n try {\n window.MetaEvents.event(eventName, toSnakeCase(props));\n } catch (error) {\n console.warn(error); // eslint-disable-line no-console\n }\n },\n\n pageLoad: (store, path) => {\n window.analytics.page(path);\n },\n\n identifyUser: (store, { id, traits }) => {\n hubspot.identifyUser(traits);\n\n const utmParams = extractUtmParams(document.URL);\n\n window.analytics.identify(id, toSnakeCase({ ...traits, ...utmParams }));\n\n if (process.env.HOST !== 'www.kinside.com') {\n console.info('Identified user', id, { traits, utmParams }); // eslint-disable-line no-console\n }\n },\n },\n};\n","import {\n axios,\n toCamelCase,\n} from '@utils';\n\nlet dependentAgeGroupPromise;\nasync function dependentAgeGroup(centerId, childBirthDate, preferredDate) {\n if (dependentAgeGroupPromise) {\n return dependentAgeGroupPromise;\n }\n\n const promise = axios.get(\n '/api/v1/legup/tours/age_group',\n {\n params: {\n legup_center_id: centerId,\n birth_date: childBirthDate,\n preferred_date: preferredDate,\n },\n },\n )\n .then(({ data }) => {\n dependentAgeGroupPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n dependentAgeGroupPromise = null;\n throw new Error(error);\n });\n\n dependentAgeGroupPromise = promise;\n\n return promise;\n}\n\nlet providerWaitlistFeesPromise;\nasync function providerWaitlistFees(params) {\n if (providerWaitlistFeesPromise) {\n return providerWaitlistFeesPromise;\n }\n\n const promise = axios.get('/api/v1/legup/centers/waitlist_fee.json', { params })\n .then(({ data }) => {\n providerWaitlistFeesPromise = null;\n return data;\n })\n .catch(() => {\n providerWaitlistFeesPromise = null;\n });\n\n providerWaitlistFeesPromise = promise;\n\n return promise;\n}\n\nasync function validateProviderWaitlistCoupon(params) {\n const { data } = await axios.get('/api/v1/legup/coupons/validate_code_and_calculate_discount.json', { params });\n\n return data;\n}\n\nasync function checkForProviderQuestionsDiscount(params) {\n const { data } = await axios.post('/api/v1/legup/coupons/check_coupon_questions_for_automatic_discount.json', { params });\n\n return data;\n}\n\nasync function checkForProviderSubsidiesDiscount(params) {\n const { data } = await axios.post(' /api/v1/legup/coupons/check_coupons_for_automatic_subsidy_discount.json', { params });\n\n return data;\n}\n\nlet findCenterInfoPromise;\nasync function findCenterInfo(legupCenterId) {\n if (findCenterInfoPromise) {\n return findCenterInfoPromise;\n }\n\n const promise = axios.get(`/api/v1/legup/centers/${legupCenterId}.json`)\n .then(({ data }) => {\n findCenterInfoPromise = null;\n return data;\n })\n .catch(() => {\n findCenterInfoPromise = null;\n });\n\n findCenterInfoPromise = promise;\n\n return promise;\n}\n\nlet findCenterQuestionsPromise;\nasync function findCenterQuestions(params) {\n if (findCenterQuestionsPromise) {\n return findCenterQuestionsPromise;\n }\n\n const promise = axios.get('/api/v1/legup/centers/find_questions.json', { params })\n .then(({ data }) => {\n findCenterQuestionsPromise = null;\n return data;\n })\n .catch(() => {\n findCenterQuestionsPromise = null;\n });\n\n findCenterQuestionsPromise = promise;\n\n return promise;\n}\n\nlet findCenterSubsidiesPromise;\nasync function findCenterSubsidies(params) {\n if (findCenterSubsidiesPromise) {\n return findCenterSubsidiesPromise;\n }\n\n const promise = axios.get('/api/v1/legup/subsidies.json', { params })\n .then(({ data }) => {\n findCenterSubsidiesPromise = null;\n return data;\n })\n .catch(() => {\n findCenterSubsidiesPromise = null;\n });\n\n findCenterSubsidiesPromise = promise;\n\n return promise;\n}\n\nlet validateSubsidiesDiscountPromise;\nasync function validateSubsidiesDiscount(centerId) {\n if (validateSubsidiesDiscountPromise) {\n return validateSubsidiesDiscountPromise;\n }\n\n const promise = axios.get(`/api/v1/legup/centers/${centerId}/validate_subsidy_discount`)\n .then(({ data }) => {\n validateSubsidiesDiscountPromise = null;\n return data;\n })\n .catch(() => {\n validateSubsidiesDiscountPromise = null;\n });\n\n validateSubsidiesDiscountPromise = promise;\n\n return promise;\n}\n\nlet checkForProviderCouponsPromise;\nasync function checkForProviderCoupons(params) {\n if (checkForProviderCouponsPromise) {\n return checkForProviderCouponsPromise;\n }\n\n const promise = axios.get('/api/v1/legup/coupons/provider_coupons.json', { params })\n .then(({ data }) => data);\n\n checkForProviderCouponsPromise = promise;\n\n return promise;\n}\n\nasync function updateOrRemoveWaitlistSpot(params) {\n const spotId = params.waitlist_spot_id;\n\n const { data } = await axios.post(`/api/v1/legup/waitlist_spots/${spotId}/update_or_remove`, { params });\n\n return data;\n}\n\nasync function passOrDeclineSeatOffer(params) {\n const seatId = params.seat_id;\n\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/pass_or_decline.json`, params);\n\n return data;\n}\n\nasync function updateWaitlistSpotAnswers(spotId, answers) {\n const { data } = await axios.post(`/api/v1/legup/waitlist_spots/${spotId}/update_answers`, { answers });\n\n return data;\n}\n\nasync function ageGroupProgramSchedules(params) {\n const { data } = await axios.get('/api/v1/legup/age_group_program_schedules.json', { params });\n\n return toCamelCase(data);\n}\n\nasync function fetchAgeGroups(centerId) {\n const { data } = await axios.get(`/api/v1/legup/age_groups?center_id=${centerId}`);\n\n return toCamelCase(data);\n}\n\nasync function fetchSeatOfferDetails(seatId) {\n const { data } = await axios.get(`/api/v1/legup/seat_offers/${seatId}`);\n\n return toCamelCase(data);\n}\n\nasync function fetchSeatOffersForParent(params) {\n const { data } = await axios.get('/api/v1/legup/seat_offers', { params });\n\n return toCamelCase(data);\n}\n\nasync function sendOffersMessage(seatId) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/message_provider`);\n\n return toCamelCase(data);\n}\n\nasync function requestPaperwork(seatId) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/request_paperwork`);\n\n return toCamelCase(data);\n}\n\nasync function acceptSeatOffer({ seatId, paymentRequestMethods }) {\n const { data } = await axios.post(`/api/v1/legup/seat_offers/${seatId}/accept`, { payment_request_methods: paymentRequestMethods });\n\n return toCamelCase(data);\n}\n\nexport {\n dependentAgeGroup,\n providerWaitlistFees,\n validateProviderWaitlistCoupon,\n findCenterInfo,\n findCenterQuestions,\n findCenterSubsidies,\n checkForProviderQuestionsDiscount,\n checkForProviderSubsidiesDiscount,\n validateSubsidiesDiscount,\n checkForProviderCoupons,\n updateOrRemoveWaitlistSpot,\n passOrDeclineSeatOffer,\n updateWaitlistSpotAnswers,\n ageGroupProgramSchedules,\n fetchSeatOfferDetails,\n fetchSeatOffersForParent,\n sendOffersMessage,\n requestPaperwork,\n acceptSeatOffer,\n fetchAgeGroups,\n};\n","import {\n dependentAgeGroup,\n ageGroupProgramSchedules,\n updateOrRemoveWaitlistSpot,\n passOrDeclineSeatOffer,\n providerWaitlistFees,\n validateProviderWaitlistCoupon,\n validateSubsidiesDiscount,\n checkForProviderQuestionsDiscount,\n checkForProviderSubsidiesDiscount,\n findCenterInfo,\n findCenterQuestions,\n findCenterSubsidies,\n checkForProviderCoupons,\n fetchSeatOfferDetails,\n fetchSeatOffersForParent,\n sendOffersMessage,\n requestPaperwork,\n updateWaitlistSpotAnswers,\n acceptSeatOffer,\n fetchAgeGroups,\n} from './legup.service';\n\nexport default {\n namespaced: true,\n state: {\n dependentAgeGroup: null,\n waitlistFees: {},\n couponInfo: {},\n centerInfo: {},\n centerQuestions: [],\n centerSubsidies: [],\n providerCoupons: [],\n seatOfferDetails: {},\n seatOffersForParent: [],\n seatOfferMessageParams: {},\n declineOfferInfo: {},\n subsidyDiscount: false,\n ageGroups: [],\n },\n mutations: {\n setDeclineOfferInfo(state, payload) {\n state.declineOfferInfo = payload;\n },\n setDependentAgeGroup: (state, { ageGroupId }) => {\n state.dependentAgeGroup = ageGroupId;\n },\n setSubsidyDiscount: (state, { subsidyDiscount }) => {\n state.subsidyDiscount = subsidyDiscount;\n },\n setWaitlistFees: (state, { waitlistFees }) => {\n state.waitlistFees = waitlistFees;\n },\n setCouponInfo: (state, { couponInfo }) => {\n state.couponInfo = couponInfo;\n },\n setCenterInfo: (state, { centerInfo }) => {\n state.centerInfo = centerInfo;\n },\n setCenterQuestions: (state, { centerQuestions }) => {\n state.centerQuestions = centerQuestions;\n },\n setCenterSubsidies: (state, { centerSubsidies }) => {\n state.centerSubsidies = centerSubsidies;\n },\n setProviderCoupons: (state, { providerCoupons }) => {\n state.providerCoupons = providerCoupons;\n },\n setSeatOfferDetails: (state, { seatOfferDetails }) => {\n state.seatOfferDetails = seatOfferDetails;\n },\n setSeatOffersForParent: (state, { seatOffersForParent }) => {\n state.seatOffersForParent = seatOffersForParent;\n },\n setSeatOfferMessageParams: (state, { seatOfferMessageParams }) => {\n state.seatOfferMessageParams = seatOfferMessageParams;\n },\n setAgeGroups: (state, { ageGroups }) => {\n state.ageGroups = ageGroups;\n },\n },\n getters: {\n manageWaitlistUrl(state) {\n return `/manage_legup_waitlist/${state.parentId}`;\n },\n dependentAgeGroup(state) {\n return state.dependentAgeGroup;\n },\n ageGroupProgramSchedules(state) {\n return state.ageGroupProgramSchedules;\n },\n updateOrRemoveWaitlistSpot(state) {\n return state.updateOrRemoveWaitlistSpot;\n },\n passOrDeclineSeatOffer(state) {\n return state.passOrDeclineSeatOffer;\n },\n requestPaperwork(state) {\n return state.requestPaperwork;\n },\n validateSubsidiesDiscount(state) {\n return state.subsidyDiscount;\n },\n providerWaitlistFees(state) {\n return state.waitlistFees;\n },\n validateProviderWaitlistCoupon(state) {\n return state.couponInfo;\n },\n checkForProviderQuestionsDiscount(state) {\n return state.couponInfo;\n },\n checkForProviderSubsidiesDiscount(state) {\n return state.couponInfo;\n },\n findCenterInfo(state) {\n return state.centerInfo;\n },\n findCenterQuestions(state) {\n return state.centerQuestions;\n },\n findCenterSubsidies(state) {\n return state.centerSubsidies;\n },\n checkForProviderCoupons(state) {\n return state.providerCoupons;\n },\n fetchSeatOfferDetails(state) {\n return state.seatOfferDetails;\n },\n getCenterSeatOfferDetails(state) {\n return state.centerSeatOfferDetails;\n },\n getDeclineOfferInfo(state) {\n return state.declineOfferInfo;\n },\n },\n actions: {\n\n async dependentAgeGroup({ commit }, { centerId, childBirthDate, preferredDate }) {\n const response = await dependentAgeGroup(centerId, childBirthDate, preferredDate);\n if (response?.success) {\n commit('setDependentAgeGroup', { ageGroupId: Number(response.ageGroupId) });\n } else {\n commit('setDependentAgeGroup', { ageGroupId: undefined });\n }\n },\n\n async ageGroupProgramSchedules({ dispatch }, params) {\n try {\n const programs = await ageGroupProgramSchedules(params);\n\n return programs;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch age group program schedules', error }, { root: true });\n throw new Error(`ageGroupProgramSchedules failed due to ${error.code}: ${error.message}`);\n }\n },\n\n async updateOrRemoveWaitlistSpot({ dispatch }, params) {\n try {\n const result = await updateOrRemoveWaitlistSpot(params);\n if (params.remove_from_waitlist && params.provider_removal) {\n dispatch(\n 'notifications/addToastSuccess',\n { text: 'Waitlist spot successfully removed.' },\n { root: true },\n );\n }\n return result;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update the waitlist spot. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error();\n }\n },\n\n async passOrDeclineSeatOffer({ dispatch }, params) {\n try {\n await passOrDeclineSeatOffer(params);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not complete this offer response. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error(`passOrDeclineSeatOffer failed due to: ${error.code}: ${error.message}`);\n }\n },\n async validateSubsidiesDiscount({ commit, dispatch }, centerId) {\n try {\n const response = await validateSubsidiesDiscount(centerId);\n if (response?.success) {\n commit('setSubsidyDiscount', { subsidyDiscount: response.subsidy_discount });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'There is no subsidy discount.', error }, { root: true });\n }\n },\n async providerWaitlistFees({ commit, dispatch }, params) {\n try {\n const response = await providerWaitlistFees(params);\n if (response?.success) {\n commit('setWaitlistFees', { waitlistFees: response.waitlist_fee });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the waitlist fees', error }, { root: true });\n }\n },\n async validateProviderWaitlistCoupon({ commit, dispatch }, params) {\n try {\n const response = await validateProviderWaitlistCoupon(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not validate the provider coupon', error }, { root: true });\n }\n },\n async checkForProviderQuestionsDiscount({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderQuestionsDiscount(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the provider questions discount', error }, { root: true });\n }\n },\n async checkForProviderSubsidiesDiscount({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderSubsidiesDiscount(params);\n if (response?.success) {\n commit('setCouponInfo', { couponInfo: response });\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the provider subsidies discount', error }, { root: true });\n }\n },\n async findCenterInfo({ commit, dispatch }, params) {\n try {\n const response = await findCenterInfo(params);\n commit('setCenterInfo', { centerInfo: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the LegUp center information', error }, { root: true });\n }\n },\n async findCenterQuestions({ commit, dispatch }, params) {\n try {\n const response = await findCenterQuestions(params);\n commit('setCenterQuestions', { centerQuestions: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the center questions', error }, { root: true });\n }\n },\n async findCenterSubsidies({ commit, dispatch }, params) {\n try {\n const response = await findCenterSubsidies(params);\n commit('setCenterSubsidies', { centerSubsidies: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve the center subsidies', error }, { root: true });\n }\n },\n async checkForProviderCoupons({ commit, dispatch }, params) {\n try {\n const response = await checkForProviderCoupons(params);\n commit('setProviderCoupons', { providerCoupons: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve provider coupons', error }, { root: true });\n }\n },\n async fetchSeatOfferDetails({ commit, dispatch }, params) {\n try {\n const response = await fetchSeatOfferDetails(params);\n commit('setSeatOfferDetails', { seatOfferDetails: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve offer details', error }, { root: true });\n }\n },\n async fetchSeatOffersForParent({ commit, dispatch }, params) {\n try {\n const response = await fetchSeatOffersForParent(params);\n commit('setSeatOffersForParent', { seatOffersForParent: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve offers', error }, { root: true });\n }\n },\n async sendOffersMessage({ commit, dispatch }, seatId) {\n try {\n const response = await sendOffersMessage(seatId);\n commit('setSeatOfferMessageParams', { seatOfferMessageParams: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Cannot message this provider', error }, { root: true });\n }\n },\n async requestPaperwork({ dispatch }, seatId) {\n try {\n await requestPaperwork(seatId);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Request was not successful. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw new Error();\n }\n },\n async updateWaitlistSpotAnswers({ dispatch }, { spotId, answers }) {\n try {\n await updateWaitlistSpotAnswers(spotId, answers);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update the waitlist spot answers', error }, { root: true });\n }\n },\n async acceptSeatOffer({ dispatch }, { seatId, paymentRequestMethods }) {\n try {\n await acceptSeatOffer({ seatId, paymentRequestMethods });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Request was not successful. Refresh the page to try again, or contact concierge@kinside.com for more help.', error }, { root: true });\n throw error;\n }\n },\n addDeclineOfferInfo({ commit }, declineInfo) {\n commit('setDeclineOfferInfo', declineInfo);\n },\n\n async fetchAgeGroups({ commit, dispatch }, { centerId }) {\n try {\n const response = await fetchAgeGroups(centerId);\n commit('setAgeGroups', { ageGroups: response });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not retrieve age groups', error }, { root: true });\n }\n },\n },\n};\n","import { getEnvVar } from '@utils';\n\nexport default {\n namespaced: true,\n state: {\n toastNotifications: [],\n updated: false,\n },\n mutations: {\n addToastNotification: (state, notification) => {\n state.toastNotifications = [...state.toastNotifications, notification];\n },\n\n removeToastNotification: (state, id) => {\n state.toastNotifications = state.toastNotifications\n .filter((notification) => notification.id !== id);\n },\n\n setUpdated: (state, updatedStatus) => {\n state.updated = updatedStatus;\n },\n },\n actions: {\n addToastNotification: ({ commit }, { error, ...rest }) => {\n const isDev = getEnvVar('NODE_ENV') === 'development';\n const newNotification = {\n ...rest,\n id: `${Date.now()}${Math.floor((1000 * Math.random()))}`,\n error: isDev && error,\n };\n commit('addToastNotification', newNotification);\n },\n\n addToastError: ({ dispatch }, notification) => {\n dispatch('addToastNotification', { ...notification, isError: true });\n },\n\n addToastSuccess: ({ dispatch }, notification) => {\n dispatch('addToastNotification', { ...notification });\n },\n\n removeToastNotification: ({ commit }, id) => {\n commit('removeToastNotification', id);\n },\n\n async setUpdatedStatus({ commit }, updatedStatus) {\n commit('setUpdated', updatedStatus);\n },\n },\n};\n","class HubSpotService {\n constructor() {\n if (this.instance) {\n return this.instance; // eslint-disable-line no-constructor-return\n }\n this.instance = this;\n\n window.hsConversationsSettings = {\n inlineEmbedSelector: '#hubspot-chat-widget',\n };\n\n if (window.env.AUTHORIZED) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n setTimeout(() => this.loadScript(), 1);\n } else {\n document.addEventListener('DOMContentLoaded', () => this.loadScript());\n }\n }\n }\n\n async loadScript() {\n if (window.location.href.includes('messaging') || window.location.href.includes('admin')) return;\n\n const id = 'hs-script-loader';\n const scr = document.getElementById(id);\n if (scr) {\n this.loadHSC();\n } else {\n const scriptTag = document.createElement('script');\n scriptTag.src = 'https://js.hs-scripts.com/4769325.js';\n scriptTag.id = id;\n\n scriptTag.onload = () => this.loadHSC();\n document.body.appendChild(scriptTag);\n }\n }\n\n async loadHSC() {\n if (this.widget) {\n return;\n }\n if (window.HubSpotConversations) {\n this.hsc = window.HubSpotConversations;\n this.widget = this.hsc.widget;\n this.loaded = false;\n } else {\n window.hsConversationsOnReady = [() => {\n this.loadHSC();\n }];\n }\n }\n\n async waitForHSC() {\n return new Promise((resolve) => {\n const checkHSC = () => {\n setTimeout(() => {\n if (this.widget) {\n resolve();\n } else {\n checkHSC();\n }\n }, 300);\n };\n if (this.widget) {\n resolve();\n } else {\n checkHSC();\n }\n });\n }\n\n async waitForLoadedStatus() {\n await this.waitForHSC();\n return new Promise((resolve) => {\n const checkLoadedState = () => {\n setTimeout(() => {\n if (this.widget.status().loaded) {\n this.loaded = true;\n resolve();\n } else {\n checkLoadedState();\n }\n }, 3000);\n };\n if (this.loaded) {\n resolve();\n } else {\n checkLoadedState();\n }\n });\n }\n\n async load(widgetOpen = true) {\n if (!this.loaded) {\n await this.waitForHSC();\n await this.widget.load({ widgetOpen });\n }\n }\n\n async refresh(openToNewThread = false) {\n if (this.loaded) {\n await this.widget.refresh({ openToNewThread });\n } else {\n await this.load();\n }\n }\n\n async open() {\n if (!this.widget) {\n await this.waitForHSC();\n }\n window.HubSpotConversations.widget.open();\n return this.widget.open();\n }\n\n close() {\n if (this.loaded) {\n this.widget.close();\n }\n }\n\n isLoaded() {\n return this.loaded;\n }\n\n trackEvent(eventName, data) {\n /* eslint-disable no-underscore-dangle */\n window._hsq = window._hsq || [];\n this.hsq = window._hsq;\n window._hsq.push([eventName, data]);\n /* eslint-enable no-underscore-dangle */\n }\n\n identifyUser({\n firstName, lastName, type, phoneNumber, email,\n } = {}) {\n const contactType = (() => {\n switch (type) {\n case 'parent':\n return 'Parent';\n case 'provider':\n return 'Care provider';\n default:\n return null;\n }\n })();\n\n this.trackEvent('identify', {\n email,\n firstname: firstName,\n lastname: lastName,\n contact_type: contactType,\n mobilephone: phoneNumber,\n });\n\n this.trackEvent('trackPageView');\n\n return new Promise((resolve) => {\n setTimeout(\n async () => {\n await this.refresh();\n resolve();\n },\n 1000,\n );\n });\n }\n}\n\nconst hubspot = new HubSpotService();\n\nexport default hubspot;\n","import { axios, toCamelCase } from '@utils';\nimport userService from '@services/user.service';\n\nconst {\n removeAvatar, updateNotificationSettings, notificationSettings, getUserNavData,\n} = userService;\n\nasync function updateUserContact(userObj) {\n const user = await userService.updateUserContact(userObj);\n return user;\n}\n\nasync function updateUser(userObj) {\n const user = await userService.updateUser(userObj);\n return user;\n}\n\nasync function getUser() {\n const user = await userService.getUser();\n const {\n openingsContactDetailsFirstName,\n openingsContactDetailsLastName,\n openingsContactDetailsEmail,\n openingsContactDetailsPhoneNumber,\n openingsContactDetailsTitle,\n ...rest\n } = user;\n return {\n ...rest,\n openingsContactDetails: {\n firstName: openingsContactDetailsFirstName,\n lastName: openingsContactDetailsLastName,\n email: openingsContactDetailsEmail,\n phoneNumber: openingsContactDetailsPhoneNumber,\n title: openingsContactDetailsTitle,\n },\n };\n}\n\nasync function getActionItems() {\n const { data } = await axios.get('/api/v1/legup/users/provider_action_items');\n\n return toCamelCase(data);\n}\n\nasync function confirmNewFeeStructure(providerId) {\n const response = await axios.put(`/api/v1/providers/${providerId}/confirm_new_fee_structure`);\n return toCamelCase(response.data);\n}\n\nasync function fetchSiteWideSearchResults({ query }) {\n const url = `/api/v1/providers/search?q=${query}`;\n const response = await axios.get(url);\n return toCamelCase(response.data);\n}\n\nexport {\n removeAvatar, updateNotificationSettings, getUser, updateUser, notificationSettings,\n getUserNavData, getActionItems, confirmNewFeeStructure, fetchSiteWideSearchResults,\n updateUserContact,\n};\n","import { axios, toCamelCase, toSnakeCase } from '@utils';\nimport moment from 'moment-timezone';\n\nasync function fetchParentSlots(timezone = 'America/Los_Angeles') {\n const { data } = await axios.get('/parent_availability_slots.json');\n return toCamelCase(data).map(({\n date, from, to, id,\n }) => ({\n date,\n id,\n time: {\n from: moment(new Date(from).toLocaleString('en-US', { timeZone: timezone })).format('h:mm a'),\n to: moment(new Date(to).toLocaleString('en-US', { timeZone: timezone })).format('h:mm a'),\n },\n }));\n}\n\nasync function updateParentSlots(slots) {\n await axios.put('/parent_availability_slots.json', {\n slots,\n });\n return fetchParentSlots();\n}\n\nlet fetchToursPromise;\nasync function fetchTours(facilityId, onlyUpcoming) {\n if (fetchToursPromise) {\n return fetchToursPromise;\n }\n\n const promise = axios.get('/tour_reservations.json', {\n params: {\n upcoming: onlyUpcoming,\n facility_id: facilityId,\n },\n })\n .then(({ data }) => {\n fetchToursPromise = null;\n return toCamelCase(data.reservations);\n })\n .catch(() => {\n fetchToursPromise = null;\n });\n fetchToursPromise = promise;\n\n return promise;\n}\n\nasync function fetchLatestTour(facilityId) {\n const tours = await fetchTours(facilityId, true);\n if (tours?.length > 0) {\n const maxTourId = Math.max(...(tours.map((t) => t.id)));\n const tour = tours.find((t) => t.id === maxTourId);\n return tour;\n }\n return null;\n}\n\nasync function reserveTour({\n facilityId, tourSlotId, useParentSlots, comment, dependentIds,\n}) {\n const { data } = await axios.post('/tour_reservations.json', {\n facility_id: facilityId,\n tour_slot_id: tourSlotId,\n use_parent_slots: useParentSlots,\n parent_comment: comment,\n dependent_ids: dependentIds,\n });\n\n const { successMessage, errorMessage, redirectUrl } = toCamelCase(data);\n\n if (successMessage) {\n const tour = await fetchLatestTour(facilityId);\n return { tour, redirectUrl };\n }\n throw new Error(errorMessage);\n}\n\nasync function getTourSettings(params) {\n const { data } = await axios.get('/api/v1/legup/tours/setting', toSnakeCase(params));\n return toCamelCase(data);\n}\n\nasync function updateSettings(params) {\n const { data } = await axios.post('/api/v1/legup/tours/setting', toSnakeCase(params));\n return toCamelCase(data);\n}\n\nasync function fetchSingleTour(tourId, centerId, userId) {\n try {\n const { data } = await axios.get(`/api/v1/legup/tours/${tourId}?legup_center_id=${centerId}&user_id=${userId}`);\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function bookTour(centerId, parent, child, tourInfo, noFamilyNotes, ageGroupId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/schedule', {\n legup_center_id: centerId,\n parent: toSnakeCase(parent),\n child: toSnakeCase(child),\n tour_info: toSnakeCase(tourInfo),\n no_family_notes: noFamilyNotes,\n age_group_id: ageGroupId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function rescheduleTour(tour, newDateTime, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/reschedule', {\n user_id: userId,\n legup_center_id: tour.centerId || tour.center.centerId,\n tour: toSnakeCase(tour),\n new_date_time: toSnakeCase(newDateTime),\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function cancelTour(tour, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/cancel', {\n legup_center_id: tour.centerId,\n id: tour.tourId,\n user_id: userId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function confirmTour(tourId, centerId, userId) {\n try {\n const { data } = await axios.post('/api/v1/legup/tours/confirm', {\n legup_center_id: centerId,\n id: tourId,\n user_id: userId,\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nlet fetchUpcomingParentTourForCenterPromise;\nasync function fetchUpcomingParentTourForCenter(parentId, legupCenterId) {\n if (fetchUpcomingParentTourForCenterPromise) {\n return fetchUpcomingParentTourForCenterPromise;\n }\n\n const promise = axios.get('/api/v1/legup/tours', {\n params: {\n parent_id: parentId,\n legup_center_id: legupCenterId,\n },\n })\n .then(({ data }) => {\n fetchUpcomingParentTourForCenterPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n fetchUpcomingParentTourForCenterPromise = null;\n throw new Error(error);\n });\n fetchUpcomingParentTourForCenterPromise = promise;\n\n return promise;\n}\n\nlet fetchToursForParentPromise;\nasync function fetchToursForParent(parentId) {\n if (fetchToursForParentPromise) {\n return fetchToursForParentPromise;\n }\n\n const promise = axios.get('/api/v1/legup/tours', {\n params: {\n parent_id: parentId,\n },\n })\n .then(({ data }) => {\n fetchToursForParentPromise = null;\n return toCamelCase(data);\n })\n .catch((error) => {\n fetchToursForParentPromise = null;\n throw new Error(error);\n });\n fetchToursForParentPromise = promise;\n\n return promise;\n}\n\nasync function centerTourPolicy(params) {\n try {\n const { data } = await axios.get(`/api/v1/legup/tours/policy?legup_center_id=${params.centerId}&user_id=${params.userId}`);\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function tourProviderSetting(params) {\n try {\n const { data } = await axios.get('/api/v1/legup/tours/tours_enabled', {\n params: {\n legup_center_id: params.centerId,\n place: params.place,\n },\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nasync function centerTourSlots(params) {\n try {\n const { data } = await axios.get('/api/v1/legup/tours/slots', {\n params: {\n legup_center_id: params.centerId,\n legup_age_group_id: params.ageGroupId,\n year: params.year,\n month: params.month,\n user_id: params.userId,\n },\n });\n return toCamelCase(data);\n } catch (error) {\n throw new Error(error);\n }\n}\n\nexport {\n fetchParentSlots,\n updateParentSlots,\n reserveTour,\n fetchLatestTour,\n fetchTours,\n getTourSettings,\n updateSettings,\n fetchSingleTour,\n bookTour,\n rescheduleTour,\n cancelTour,\n confirmTour,\n fetchUpcomingParentTourForCenter,\n fetchToursForParent,\n centerTourPolicy,\n tourProviderSetting,\n centerTourSlots,\n};\n","import { axios } from '@utils';\n\nconst BASE_PATH = 'api/v1/accounts';\n\nasync function accountValidateEmployerCode(accessCode) {\n const response = await axios.post(`/${BASE_PATH}/validate_employer_code.json`, accessCode);\n return response;\n}\n\nasync function accountResendConfirmationEmail() {\n const response = await axios.post(`/${BASE_PATH}/resend_confirmation_email.json`);\n return response;\n}\n\nexport {\n // eslint-disable-next-line import/prefer-default-export\n accountValidateEmployerCode,\n accountResendConfirmationEmail,\n};\n","import { accountValidateEmployerCode, accountResendConfirmationEmail } from './account.service';\n\nexport default {\n namespaced: true,\n\n state: {\n success: false,\n tries: null,\n confirmationDisabled: false,\n },\n mutations: {\n updateValidation: (state, validatedStatus) => {\n state.success = validatedStatus.data.success;\n state.tries = validatedStatus.data.tries;\n },\n disableConfirmation: (state) => {\n state.confirmationDisabled = true;\n },\n },\n\n actions: {\n async validateEmployerCode({ commit, dispatch }, accessCode) {\n try {\n const validatedStatus = await accountValidateEmployerCode({\n access_code: accessCode,\n });\n if (!validatedStatus.data.success && accessCode !== '') {\n const remainingTries = 3 - validatedStatus.data.tries;\n dispatch('notifications/addToastError', { text: `Could not validate the code. ${remainingTries} tries remaining.` }, { root: true });\n } else if (validatedStatus.data.success && accessCode !== '') {\n window.location.reload();\n }\n commit('updateValidation', validatedStatus);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not validate the code', error }, { root: true });\n }\n },\n\n async resendConfirmationEmail({ commit, dispatch }) {\n try {\n const validatedStatus = await accountResendConfirmationEmail();\n if (!validatedStatus.data.success) {\n dispatch(\n 'notifications/addToastError',\n { text: 'You have reached the maximum amount of confirmation retries, please contact our concierge team.' },\n { root: true },\n );\n commit('disableConfirmation');\n } else {\n dispatch(\n 'notifications/addToastNotification',\n { text: 'Sucessfully resent confirmation email!' },\n { root: true },\n );\n }\n } catch (error) {\n dispatch(\n 'notifications/addToastError',\n { text: 'Something went wrong resending confirmation instructions, please contact our concierge team.', error },\n { root: true },\n );\n }\n },\n },\n};\n","import { objHasFalseyValues } from '../../utils';\nimport {\n fetchFacility,\n fetchFacilityDetails,\n updateFacility,\n} from './facility.service';\n\nimport {\n fetchPhilosophies,\n} from './search.service';\n\nconst INITIAL_PROFILE_EDIT_COMPLETENESS = {\n basicInfo: false,\n licensing: false,\n programDetails: false,\n photos: false,\n welcome: false,\n approach: false,\n healthSafety: false,\n};\n\nexport default {\n namespaced: true,\n\n state: {\n facility: null,\n philosophies: null,\n profileCompletenessBySection: INITIAL_PROFILE_EDIT_COMPLETENESS,\n },\n\n mutations: {\n setFacility(state, facility) {\n state.facility = facility;\n },\n setPhilosophies(state, philosophies) {\n state.philosophies = philosophies;\n },\n setSectionCompleteness(state, { section, completeness }) {\n const newProfileCompletenessBySection = { ...state.profileCompletenessBySection };\n newProfileCompletenessBySection[section] = completeness;\n state.profileCompletenessBySection = newProfileCompletenessBySection;\n },\n },\n\n getters: {\n facilityInfo(state) {\n return state.facility;\n },\n basicInfoComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'name',\n 'facility_class',\n 'address',\n 'city',\n 'state',\n 'zip',\n 'website',\n 'email',\n 'phone_number',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n licensingComplete(state) {\n if (!state.facility) return false;\n\n return !!state.facility.license_number;\n },\n keyDetailsComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'age_months_to',\n 'time_open_from',\n 'time_open_to',\n 'schedule_types',\n 'schedule_days_of_week',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n photosComplete(state) {\n if (!state.facility) return false;\n\n return state.facility.profile_images\n && state.facility.profile_images.length > 0;\n },\n welcomeComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'profile_director',\n 'profile_description',\n 'administrator',\n 'director_profile_photo',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n approachComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'facility_philosophy_ids',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n healthSafetyComplete(state) {\n if (!state.facility) return false;\n\n const fields = [\n 'profile_covid_response',\n ];\n const data = {};\n fields.forEach((field) => {\n data[field] = state.facility[field];\n });\n return !objHasFalseyValues(data);\n },\n isProfileEditComplete(state, getters) {\n return getters.numCompleteProfileEditSections === getters.totalProfileEditSections;\n },\n profileEditSections(state) {\n return Object.keys(state.profileCompletenessBySection);\n },\n numCompleteProfileEditSections(state, getters) {\n const sectionsBycompleteness = getters\n .profileEditSections.map((section) => getters[`${section}Complete`]);\n return sectionsBycompleteness.filter((section) => section).length;\n },\n totalProfileEditSections(state, getters) {\n return getters.profileEditSections.length;\n },\n profileEditCompleteness(state, getters) {\n return parseInt(\n (getters.numCompleteProfileEditSections / getters.totalProfileEditSections) * 100,\n 10,\n );\n },\n },\n\n actions: {\n async fetchPhilosophies({ commit, dispatch }) {\n try {\n const philosophies = await fetchPhilosophies();\n await commit('setPhilosophies', philosophies);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load philosophies',\n error,\n }, { root: true });\n }\n },\n async fetchFacility({ commit, dispatch }, facilityId) {\n try {\n const facility = await fetchFacility(facilityId);\n await commit('setFacility', facility);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load facility',\n error,\n }, { root: true });\n }\n },\n async fetchFacilityDetails({ commit, dispatch }, facilitySlug) {\n try {\n const facility = await fetchFacilityDetails(facilitySlug);\n await commit('setFacility', facility);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'Could not load facility',\n error,\n }, { root: true });\n }\n },\n async updateFacility({ rootState, dispatch }, data) {\n try {\n await updateFacility(data, rootState.facilityId);\n await dispatch('fetchFacility', rootState.facilityId);\n } catch (error) {\n dispatch('notifications/addToastError', {\n text: 'This facility could not be updated, please ensure all information is correct and try again.',\n error,\n }, { root: true });\n }\n },\n },\n};\n","import { axios } from '@utils';\n\nasync function fetchFacility(facilityId) {\n const { data } = await axios.get(`/child_care_facilities/${facilityId}.json`);\n return data;\n}\n\nasync function updateFacility(data, facilityId) {\n await axios.post('/facility_logs.json', {\n child_care_facility_id: facilityId,\n facility_log: { ...data, source: 'insitu' },\n });\n}\nasync function fetchFacilityDetails(facilitySlug) {\n const { data } = await axios.get(`/child_care_facilities/${facilitySlug}/details.json`);\n return data;\n}\n\nexport {\n fetchFacility,\n updateFacility,\n fetchFacilityDetails,\n};\n","import { axios, toCamelCase } from '@utils';\n\nconst FACILITY_OPINIONS = {\n favorited: 'great_fit',\n ignored: 'not_a_fit',\n saved: 'maybe',\n noOpinion: null,\n};\n\nasync function fetchFacilities({ idsToRequest, ...restParams }, { isSearch, limited } = {}) {\n const axiosController = new AbortController();\n try {\n if (isSearch) {\n axiosController.abort();\n }\n\n const params = {\n facility_ids: idsToRequest,\n ...restParams,\n };\n\n const url = limited ? '/childcare/facilities_limited.json' : '/childcare/facilities.json';\n const response = await axios.get(url, { params, signal: axiosController.signal });\n return response.data.facilities;\n } catch (e) {\n if (axiosController.abort()) {\n // eslint-disable-next-line\n console.info('facilities/loadFacilityRecords request canceled', e.message);\n return [];\n }\n // eslint-disable-next-line\n console.error(e);\n throw new Error('Could not fetch facilities');\n }\n}\n\nasync function fetchMatchesFacilitiesForParent() {\n const response = await axios.get('/api/v1/matches.json');\n return response.data;\n}\n\nasync function acceptPayment(facilityId, facilityAcceptPayment) {\n const response = await axios.post(`/api/v1/child_care_facilities/${facilityId}/accept_payment.json`, {\n accept_payment: facilityAcceptPayment,\n });\n return toCamelCase(response.data);\n}\n\nasync function deactivateFacilitiesPayment() {\n const response = await axios.post('/api/v1/child_care_facilities/deactivate_all_payment.json');\n return toCamelCase(response.data);\n}\n\nasync function fetchFacilitiesByOpinion(opinion) {\n const response = await axios.get('/childcare/markers.json', {\n params: { opinion_only: FACILITY_OPINIONS[opinion], sort: 'quality' },\n });\n return {\n ids: response.data.ordered_ids.map(Number),\n facilities: toCamelCase(response.data.markers.map((m) => m.facility)),\n };\n}\n\nasync function fetchOpinionCounts() {\n const { data } = await axios.get('/facility_opinions/counts.json');\n return {\n favorited: data[FACILITY_OPINIONS.favorited],\n saved: data[FACILITY_OPINIONS.saved],\n ignored: data[FACILITY_OPINIONS.ignored],\n };\n}\n\nfunction saveFacilityOpinion(facilityId, opinion, context) {\n return axios.put(`/child_care_facilities/${facilityId}/opinion.json`, {\n opinion,\n context,\n });\n}\n\nasync function searchFacilities({ query, page = 1, perPage = 10 }) {\n const response = await axios.get('/childcare/payments_list.json', { params: { search: query, page, per_page: perPage } });\n return response.data;\n}\n\nfunction saveFacilityComment(facilityId, comment) {\n return axios.put(`/child_care_facilities/${facilityId}/comment.json`, { comment });\n}\n\nfunction saveFacilityImages(facilityId, facilityData) {\n return axios.post('/facility_logs.json', {\n child_care_facility_id: facilityId,\n facility_log: facilityData,\n });\n}\n\nasync function fetchFacilitiesForProvider({\n providerId, page = 1, search = null, messaging,\n}) {\n const BASE_URL = '/api/v1/child_care_facilities';\n const response = await axios.get(`${BASE_URL}/${providerId}/facilities_by_provider.json`, {\n params: {\n page,\n search,\n messaging,\n },\n });\n return toCamelCase(response.data);\n}\n\nexport {\n FACILITY_OPINIONS,\n fetchFacilities,\n fetchFacilitiesByOpinion,\n fetchOpinionCounts,\n fetchFacilitiesForProvider,\n fetchMatchesFacilitiesForParent,\n saveFacilityOpinion,\n saveFacilityComment,\n searchFacilities,\n saveFacilityImages,\n acceptPayment,\n deactivateFacilitiesPayment,\n};\n","import { axios, toSnakeCase, toCamelCase } from '../../utils';\n\nconst BASE_PATH = 'payments';\nconst METHODS_BASE_PATH = 'payment_methods';\nconst REQUESTS_BASE_PATH = 'payment_requests';\nconst API_REQUESTS_BASE_PATH = 'api/v1/payment_requests';\n\nfunction errorToData(error) {\n if (!error) {\n return undefined;\n }\n return {\n message: error.message,\n relatedObj: error.related_object_id\n ? {\n class: error.related_object_class,\n id: error.related_object_id,\n }\n : undefined,\n };\n}\n\nfunction paymentDataToRequest(data) {\n return {\n id: data.id,\n provider_id: data.providerId,\n child_care_facility_id: data.facilityId,\n amount: data.amount,\n category: data.category,\n date_from: data.from,\n date_to: data.to,\n dependent_ids: data.dependentIds || [data.dependentId || data.dependent?.id],\n dependent_data: toSnakeCase(data.dependentData),\n payment_request_items: toSnakeCase(data.paymentRequestItems),\n payment_request_methods: data.paymentRequestMethods.map(\n ({ initialAmount, paymentMethodId, id }) => ({\n amount: initialAmount,\n payment_method_id: paymentMethodId,\n id,\n }),\n ),\n provider_data: data.newProvider,\n message_to_provider: data.messageToProvider,\n payment_coupons: data.paymentCoupons,\n user_id: data.userId,\n scheduled_at: data.scheduledAt,\n recurring_settings: data.recurringSettings,\n is_pay_me_request: data.isPayMeRequest,\n };\n}\n\nfunction paymentRequestToData({\n amount,\n aasm_state: status,\n child_care_facility_id: facilityId,\n latest_error: error,\n ...request\n}) {\n return {\n ...toCamelCase(request),\n amount, // in cents\n status,\n facilityId,\n error: errorToData(error),\n };\n}\n\nasync function fetchPayees() {\n const response = await axios.get(`/${BASE_PATH}/providers_paid.json`);\n return response.data.providers;\n}\n\nasync function addProvider(provider) {\n const response = await axios.post(`/${BASE_PATH}/payments_provider.json`, {\n provider: toSnakeCase(provider),\n });\n return response.data;\n}\n\nasync function addCardPaymentMethod(stripeId, isFsa, userId, replace) {\n const response = await axios.post(`/${METHODS_BASE_PATH}/card.json`, {\n fsa: isFsa,\n stripe_payment_method_id: stripeId,\n user_id: userId,\n replace: replace,\n });\n return response.data;\n}\n\nasync function addBankAccountPaymentMethod(publicToken, accountId, userId) {\n const response = await axios.post(`/${METHODS_BASE_PATH}/bank_account.json`, {\n public_token: publicToken,\n account_id: accountId,\n user_id: userId,\n });\n return response.data;\n}\n\nasync function fetchPaymentMethods() {\n const response = await axios.get(`/${METHODS_BASE_PATH}.json`);\n return response.data;\n}\n\nfunction removePaymentMethod(id) {\n return axios.delete(`/${METHODS_BASE_PATH}/${id}.json`);\n}\n\nfunction canRemovePaymentMethod(id) {\n return axios.get(`/${METHODS_BASE_PATH}/${id}/can_remove.json`);\n}\n\nasync function addPaymentRequest(paymentData) {\n const payment = paymentDataToRequest(paymentData);\n\n const response = await axios.post(`/${REQUESTS_BASE_PATH}/checkout.json`, {\n payment_request: payment,\n send_payment: true,\n });\n\n return paymentRequestToData(response.data);\n}\n\nasync function updatePaymentRequest(paymentData, id) {\n const payment = paymentDataToRequest(paymentData);\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}.json`, {\n payment_request: payment,\n apply_changes_to_collection: paymentData.applyChangesToCollection,\n });\n\n return paymentRequestToData(response.data);\n}\n\nasync function updateByProvider(params, id) {\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}/update_by_provider.json`, { payment_request: toSnakeCase(params) });\n return toCamelCase(response.data);\n}\n\nasync function cancelPaymentRequest(id) {\n const response = await axios.put(`/${API_REQUESTS_BASE_PATH}/${id}/cancel.json`);\n return paymentRequestToData(response.data);\n}\n\nasync function fetchPaymentRequests() {\n const response = await axios.get(`/${API_REQUESTS_BASE_PATH}.json`);\n const paymentRequests = response.data.payment_requests.map(paymentRequestToData);\n return paymentRequests;\n}\n\nasync function fetchPaymentRequest(id) {\n const response = await axios.get(`/${API_REQUESTS_BASE_PATH}/${id}.json`);\n return paymentRequestToData(response.data);\n}\n\nasync function fetchPayMeRequest({ id, facilityId }) {\n const { data } = await axios.get(`/${API_REQUESTS_BASE_PATH}/${id}/pay_me_request.json?facility_id=${facilityId}`);\n return toCamelCase(data);\n}\n\nasync function getPaymentCouponsToApply() {\n const { data } = await axios.get('/payment_coupons.json');\n\n return toCamelCase(data);\n}\n\nasync function doPaymentMathAndGetCommissions({\n amount = 0,\n paymentRequestMethods,\n coupons,\n seatId = undefined,\n centerId = undefined,\n providerId,\n paymentRequestId,\n}) {\n if (amount === 0 || amount < 0) {\n return toCamelCase({\n total_remaining: amount,\n total_to_be_charged: amount,\n total_to_be_sent_to_provider: amount,\n });\n }\n\n const params = {\n amount_to_be_sent: amount,\n payment_coupons: coupons,\n payment_methods: toSnakeCase(\n paymentRequestMethods.map(\n ({ paymentMethodId, totalAmount, includesFees = true }) => ({\n id: paymentMethodId,\n includesFees,\n amount: totalAmount,\n }),\n ),\n ),\n seat_id: seatId,\n center_id: centerId,\n provider_id: providerId,\n id: paymentRequestId,\n };\n\n const { data } = await axios.put(\n `/${API_REQUESTS_BASE_PATH}/commissions.json`,\n params,\n );\n const { totalToBeSentToProvider, paymentMethods, ...rest } = toCamelCase(data);\n\n return {\n amount: totalToBeSentToProvider,\n paymentRequestMethods: paymentMethods.map(({ id, ...restOfRequest }) => ({\n paymentMethodId: id,\n includesFees: true,\n ...restOfRequest,\n })),\n ...rest,\n };\n}\n\nasync function recalculateAmount({ paymentRequestMethods, totalAmount }) {\n // eslint-disable-next-line no-param-reassign\n paymentRequestMethods = paymentRequestMethods.map(({ paymentMethodId }) => ({\n paymentMethodId,\n includesFees: false,\n totalAmount,\n }));\n const params = { amount: totalAmount, paymentRequestMethods };\n const data = await doPaymentMathAndGetCommissions(params);\n return data;\n}\n\nasync function checkNaviaBalance() {\n const { data } = await axios.get(`/${METHODS_BASE_PATH}/navia_balance.json`);\n\n return toCamelCase(data);\n}\n\nasync function submitCheckRequest(data) {\n await axios\n .post('/api/v1/providers/request_papercheck.json', {\n papercheck_request: data,\n })\n .then(() => {\n window.localStorage.setItem(\n 'kinside:paperCheckOnboardingMessage',\n \"We've received your information and are processing the payment. \"\n + 'Please allow 7-10 days for the check to arrive. '\n + 'You can mail us at support@kinside.com with any questions related to this process.',\n );\n window.location.replace('/');\n });\n}\n\nasync function downloadInvoicePdf(paymentRequestId) {\n await axios.get(`/${API_REQUESTS_BASE_PATH}/${paymentRequestId}/invoice_pdf.pdf`, { responseType: 'blob' })\n .then((response) => response.data)\n .then((blob) => {\n const data = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = data;\n link.download = 'receipt.pdf';\n link.click();\n });\n}\n\nasync function declinePayMeRequest(params) {\n const { paymentRequestId, declineReason, declineMessage } = params;\n await axios.post(`/${API_REQUESTS_BASE_PATH}/${paymentRequestId}/decline`, { decline_reason: declineReason, decline_message: declineMessage });\n}\n\nasync function acceptEnrollmentAutopay(paymentData) {\n const payment = paymentDataToRequest(paymentData);\n await axios.put(`/${API_REQUESTS_BASE_PATH}/${paymentData.id}/accept_enrollment_autopay`, { payment_request: payment });\n}\n\nasync function fetchUserPayMeRequests() {\n const { data } = await axios.get(`/${API_REQUESTS_BASE_PATH}/requested.json`);\n return toCamelCase(data);\n}\n\nexport {\n fetchPayees,\n addCardPaymentMethod,\n fetchPaymentMethods,\n addPaymentRequest,\n updatePaymentRequest,\n cancelPaymentRequest,\n fetchPaymentRequests,\n fetchPayMeRequest,\n addBankAccountPaymentMethod,\n addProvider,\n removePaymentMethod,\n getPaymentCouponsToApply,\n doPaymentMathAndGetCommissions,\n checkNaviaBalance,\n submitCheckRequest,\n downloadInvoicePdf,\n recalculateAmount,\n canRemovePaymentMethod,\n declinePayMeRequest,\n fetchUserPayMeRequests,\n acceptEnrollmentAutopay,\n fetchPaymentRequest,\n updateByProvider,\n};\n","import { addArrayToDictionary, getBoundsFromFacilities, toCamelCase } from '@utils';\nimport { upperFirst } from 'lodash';\nimport {\n FACILITY_OPINIONS,\n searchFacilities,\n fetchFacilities,\n fetchFacilitiesByOpinion,\n fetchFacilitiesForProvider,\n fetchMatchesFacilitiesForParent,\n saveFacilityOpinion,\n saveFacilityComment,\n fetchOpinionCounts,\n saveFacilityImages,\n acceptPayment,\n deactivateFacilitiesPayment,\n} from './facilities.service';\n\nconst searchSortOptionsMap = {\n partners: 'quality',\n distance: 'distance',\n price: 'price',\n};\n\nconst shortlistSortOptionsMap = {\n fit: 'fit',\n distance: 'distance',\n price: 'price',\n};\n\nconst matchesSortOptionsMap = {\n distance: 'distance',\n price: 'price',\n};\n\nfunction convertMapToRadioOptions(options) {\n const keys = Object.keys(options);\n return keys.map((k) => ({ label: k, value: options[k] }));\n}\n\nexport default {\n namespaced: true,\n\n state: {\n storedFacilities: {},\n orderedResultIds: [],\n\n hoveredId: undefined,\n\n records: {\n ids: [],\n facilities: {},\n },\n\n opinionCounts: {\n favorited: undefined,\n saved: undefined,\n ignored: undefined,\n },\n\n comments: {},\n\n favoritedIds: [],\n ignoredIds: [],\n savedIds: [],\n matchesIds: [],\n\n loadedIds: {\n favorited: false,\n saved: false,\n ignored: false,\n matches: false,\n },\n\n facilitiesResultsForProvider: null,\n\n matchesSortOption: matchesSortOptionsMap.distance,\n shortlistSortOption: shortlistSortOptionsMap.fit,\n searchSortOption: searchSortOptionsMap.partners,\n selectedFacilityId: null,\n },\n\n getters: {\n currentSearchSortKey: (state) => () => state.searchSortOption,\n\n currentMatchesSortKey: (state) => () => state.matchesSortOption,\n\n currentShortlistSortKey: (state) => () => state.shortlistSortOption,\n\n currentFacility: (state) => {\n const facilities = state.facilitiesResultsForProvider?.facilities;\n return facilities?.find((f) => f.id === state.selectedFacilityId);\n },\n\n orderedFacilities: (state) => {\n const facilities = state.records.ids\n .map((id) => state.records.facilities[id])\n .filter((f) => !!f && state.ignoredIds.indexOf(f.id) < 0);\n\n return {\n exact: facilities.filter((f) => f.exactMatch).map(({ id }) => id),\n partial: facilities.filter((f) => !f.exactMatch).map(({ id }) => id),\n };\n },\n\n resultsWithOffersCount: (state) => Object.values(state.records.facilities)\n .filter((f) => f.offersCount)\n .length,\n\n favoritedFacilities: (state) => state.favoritedIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n ignoredFacilities: (state) => state.ignoredIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n savedFacilities: (state) => state.savedIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n shortlistFacilities: (state, getters) => getters.favoritedFacilities\n .concat(getters.savedFacilities),\n\n matchesFacilities: (state) => state.matchesIds\n .map((id) => state.storedFacilities[id])\n .filter((f) => !!f),\n\n sortedByDistance: (state, getters) => (facilities) => {\n const sortedFacilities = facilities.sort((a, b) => {\n const facilityA = getters.facilityById(a);\n const facilityB = getters.facilityById(b);\n return facilityA.distance - facilityB.distance;\n });\n return sortedFacilities;\n },\n\n sortedByPrice: (state, getters) => (facilities) => {\n const sortedFacilities = facilities.sort((a, b) => {\n const facilityA = getters.facilityById(a);\n const facilityB = getters.facilityById(b);\n\n if (facilityA.priceFrom === facilityB.priceFrom) return 0;\n if (facilityA.priceFrom === null) return 1;\n if (facilityB.priceFrom === null) return -1;\n return facilityA.priceFrom < facilityB.priceFrom ? -1 : 1;\n });\n return sortedFacilities;\n },\n\n sortedShortlistFacilities: (state, getters) => {\n const facilitiesByFit = state.favoritedIds.concat(state.savedIds);\n\n switch (state.shortlistSortOption) {\n case 'fit':\n return facilitiesByFit;\n case 'distance':\n return getters.sortedByDistance(facilitiesByFit);\n case 'price':\n return getters.sortedByPrice(facilitiesByFit);\n default:\n return facilitiesByFit;\n }\n },\n\n sortedMatchesFacilities: (state, getters) => {\n const facilities = state.matchesIds;\n\n switch (state.matchesSortOption) {\n case 'distance':\n return getters.sortedByDistance(facilities);\n case 'price':\n return getters.sortedByPrice(facilities);\n default:\n return facilities;\n }\n },\n\n areFavoritedIdsLoaded: (state) => state.loadedIds.favorited,\n\n areSavedIdsLoaded: (state) => state.loadedIds.saved,\n\n areIgnoredIdsLoaded: (state) => state.loadedIds.ignored,\n\n areShortlistIdsLoaded: (state) => state.loadedIds.favorited && state.loadedIds.saved,\n\n searchSortOptions: () => convertMapToRadioOptions(searchSortOptionsMap),\n\n matchesSortOptions: () => convertMapToRadioOptions(matchesSortOptionsMap),\n\n shortlistSortOptions: () => convertMapToRadioOptions(shortlistSortOptionsMap),\n\n opinionCounts: (state, getters) => {\n const shortlistIdsLength = state.favoritedIds.length + state.savedIds.length;\n\n return {\n favorited: (getters.areFavoritedIdsLoaded\n ? state.favoritedIds.length\n : state.opinionCounts.favorited)\n || 0,\n saved: (getters.areSavedIdsLoaded\n ? state.savedIds.length\n : state.opinionCounts.saved)\n || 0,\n ignored: (getters.areIgnoredIdsLoaded\n ? state.ignoredIds.length\n : state.opinionCounts.ignored)\n || 0,\n shortlisted: (getters.areShortlistIdsLoaded\n ? shortlistIdsLength\n : state.opinionCounts.shortlisted)\n || 0,\n };\n },\n\n facilityIsFavorited: (state) => (id) => state.favoritedIds.includes(id),\n\n facilityIsSaved: (state) => (id) => state.savedIds.includes(id),\n\n facilityIsIgnored: (state) => (id) => state.ignoredIds.includes(id),\n\n facilityById: (state) => (id) => state.records.facilities[id]\n || state.storedFacilities[id]\n || { id },\n\n totalMatchesFacilities: (state) => state.matchesIds.length || 0,\n\n currentFacilityTimezone: (state) => state.facilitiesResultsForProvider\n .facilities\n .find((f) => f.id === state.selectedFacilityId)\n ?.timezone,\n },\n\n mutations: {\n setSelectedFacilityId(state, facilityId) {\n state.selectedFacilityId = facilityId;\n localStorage.setItem('selectedFacilityId', facilityId);\n },\n\n setFacilityRecords: (state, { facilities, ids }) => {\n state.records = {\n facilities: addArrayToDictionary(facilities, []),\n ids,\n };\n },\n\n setMatchesSortOption: (state, sort) => {\n state.matchesSortOption = sort || state.matchesSortOption;\n },\n\n setShortlistSortOption: (state, sort) => {\n state.shortlistSortOption = sort || state.shortlistSortOption;\n },\n\n setSearchSortOption: (state, sort) => {\n state.searchSortOption = sort || state.searchSortOption;\n },\n\n setMatchesIds: (state, ids) => {\n state.matchesIds = ids;\n state.loadedIds.matches = true;\n },\n\n setFavoritedIds: (state, ids) => {\n state.favoritedIds = ids;\n state.loadedIds.favorited = true;\n },\n\n setSavedIds: (state, ids) => {\n state.savedIds = ids;\n state.loadedIds.saved = true;\n },\n\n setIgnoredIds: (state, ids) => {\n state.ignoredIds = ids;\n state.loadedIds.ignored = true;\n },\n\n setOpinionCounts: (state, counts) => {\n state.opinionCounts = counts;\n },\n\n setOpinionState: (state, { facilityId, opinion }) => {\n ['favorited', 'saved', 'ignored'].forEach((key) => {\n state[`${key}Ids`] = state[`${key}Ids`].filter((ids) => ids !== facilityId);\n });\n if (opinion === FACILITY_OPINIONS.favorited) {\n state.favoritedIds.push(facilityId);\n } else if (opinion === FACILITY_OPINIONS.saved) {\n state.savedIds.push(facilityId);\n } else if (opinion === FACILITY_OPINIONS.ignored) {\n state.ignoredIds.push(facilityId);\n }\n },\n\n addStoredFacilities: (state, facilities) => {\n state.storedFacilities = { ...addArrayToDictionary(facilities, state.storedFacilities) };\n facilities.forEach((f) => {\n state.comments[f.id] = f.comment || '';\n });\n },\n\n setHoveredId(state, id) {\n state.hoveredId = id;\n },\n\n updateFacilityComment(state, { facilityId, comment }) {\n state.comments = { ...state.comments, [facilityId]: comment };\n },\n setAcceptPayment(state, { facilityId, acceptKinsidePayment }) {\n state.facilitiesResultsForProvider = {\n ...state.facilitiesResultsForProvider,\n facilities: state.facilitiesResultsForProvider.facilities.map((facility) => {\n if (facility.id === facilityId) {\n return {\n ...facility,\n acceptKinsidePayment,\n };\n }\n return facility;\n }),\n };\n },\n setDeactivatePayment(state) {\n state.facilitiesResultsForProvider = {\n ...state.facilitiesResultsForProvider,\n facilities: state.facilitiesResultsForProvider.facilities\n .map((facility) => ({ ...facility, acceptKinsidePayment: false })),\n };\n },\n setFacilitiesResultsForProvider(state, results) {\n state.facilitiesResultsForProvider = { ...results };\n },\n },\n\n actions: {\n async setSort({ commit, dispatch, rootGetters }, sort) {\n if (rootGetters.showShortlist) {\n await commit('setShortlistSortOption', sort);\n }\n if (rootGetters.showRecords) {\n await commit('setSearchSortOption', sort);\n await commit('search/updatePagination', { page: 1 }, { root: true });\n dispatch('search/reload', undefined, { root: true });\n }\n if (rootGetters.showMatches) {\n await commit('setMatchesSortOption', sort);\n }\n },\n\n async loadOpinionCounts({ commit }) {\n const opinionCounts = await fetchOpinionCounts();\n commit('setOpinionCounts', opinionCounts);\n },\n\n async loadFacilitiesByOpinion({\n commit, dispatch, state,\n }, opinion) {\n const opinionLabel = upperFirst(opinion);\n try {\n const noFacilitiesWithOpinion = state.opinionCounts[opinion] === 0;\n if (noFacilitiesWithOpinion) {\n return;\n }\n\n const loadedFacilitiesCount = state[`${opinion}Ids`].map((id) => state.storedFacilities[id]).filter(Boolean).length;\n const areFacilitiesLoaded = state.opinionCounts[opinion] !== undefined\n && state.opinionCounts[opinion] === loadedFacilitiesCount;\n\n if (areFacilitiesLoaded) {\n return;\n }\n\n const {\n ids,\n facilities,\n } = await fetchFacilitiesByOpinion(opinion);\n const bounds = getBoundsFromFacilities(facilities);\n await commit(`set${opinionLabel}Ids`, ids);\n await commit(`map/set${opinionLabel}Bounds`, bounds, { root: true });\n commit('addStoredFacilities', facilities);\n } catch (error) {\n dispatch('notifications/addToastError', { text: `Could not load the list of ${opinion} facilities`, error }, { root: true });\n }\n },\n\n async fetchFacilitiesToStore({ commit, dispatch }, { ids = [], limited = true } = {}) {\n try {\n if (ids.length === 0) {\n return;\n }\n const params = { idsToRequest: ids };\n const facilities = await fetchFacilities(params, { limited });\n commit('addStoredFacilities', facilities);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch and store facilities', error }, { root: true });\n throw new Error();\n }\n },\n\n async searchFacilities({ dispatch }, searchParams) {\n try {\n const records = await searchFacilities(searchParams);\n return records;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not run a search', error }, { root: true });\n return [];\n }\n },\n\n async toggleFavorited({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasFavorited = getters.facilityIsFavorited(facilityId);\n const opinion = wasFavorited\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.favorited;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async toggleSaved({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasSaved = getters.facilityIsSaved(facilityId);\n const opinion = wasSaved\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.saved;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async toggleIgnored({\n dispatch, getters,\n }, { facilityId, context }) {\n const wasIgnored = getters.facilityIsIgnored(facilityId);\n const opinion = wasIgnored\n ? FACILITY_OPINIONS.noOpinion\n : FACILITY_OPINIONS.ignored;\n\n await dispatch('updateFacilityOpinion', { facilityId, context, opinion });\n },\n\n async updateFacilityOpinion({\n commit, dispatch, getters, rootGetters,\n }, { facilityId, opinion, context }) {\n const facility = getters.facilityById(facilityId);\n const oldOpinion = facility.opinion;\n\n // change optimistically\n commit('setOpinionState', { opinion, facilityId });\n commit('addStoredFacilities', [facility]);\n try {\n await saveFacilityOpinion(facilityId, opinion, context);\n\n if (opinion === FACILITY_OPINIONS.favorited || opinion === FACILITY_OPINIONS.saved) {\n await dispatch(\n 'notifications/addToastNotification',\n { text: 'Location added to your shortlist' },\n { root: true },\n );\n } else if (opinion === FACILITY_OPINIONS.ignored) {\n await dispatch(\n 'notifications/addToastNotification',\n { text: 'Location moved to not a fit' },\n { root: true },\n );\n }\n\n // fetch matches so we only show matches\n // that do not have an opinion set\n if (rootGetters.showMatches) {\n // fetch matches\n await dispatch('fetchMatchesFacilitiesForParent');\n\n // check/set flag for matches note\n const hasSeenMatchesNote = localStorage.getItem('hasSeenMatchesNote');\n if (!hasSeenMatchesNote) {\n await commit('setHasSeenMatchesNote', true, { root: true });\n localStorage.setItem('hasSeenMatchesNote', true);\n }\n }\n\n // update bounds\n if (!rootGetters.showShortlist\n && (\n [opinion, oldOpinion].includes(FACILITY_OPINIONS.favorited)\n || [opinion, oldOpinion].includes(FACILITY_OPINIONS.saved)\n )\n ) {\n commit('map/setShortlistBounds', getBoundsFromFacilities(getters.shortlistFacilities), { root: true });\n }\n if (!rootGetters.showFavorited\n && [opinion, oldOpinion].includes(FACILITY_OPINIONS.favorited)\n ) {\n commit('map/setFavoritedBounds', getBoundsFromFacilities(getters.favoritedFacilities), { root: true });\n }\n if (!rootGetters.showSaved && [opinion, oldOpinion].includes(FACILITY_OPINIONS.saved)) {\n commit('map/setSavedBounds', getBoundsFromFacilities(getters.savedFacilities), { root: true });\n }\n if (!rootGetters.showIgnored && [opinion, oldOpinion].includes(FACILITY_OPINIONS.ignored)) {\n commit('map/setIgnoredBounds', getBoundsFromFacilities(getters.ignoredFacilities), { root: true });\n }\n } catch (error) {\n commit('setOpinionState', { opinion: oldOpinion, facilityId });\n dispatch('notifications/addToastError', { text: 'Could not update opinion', error }, { root: true });\n }\n },\n\n async updateComment({\n commit, dispatch, getters,\n }, { facilityId, comment, context }) {\n const facility = getters.facilityById(facilityId);\n\n try {\n await saveFacilityComment(facilityId, comment);\n commit('updateFacilityComment', { facilityId, comment });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not save a comment', error }, { root: true });\n }\n if (facility.friendlyId) {\n dispatch('track/event', {\n category: 'parents',\n event: 'add_location_note',\n props: {\n slug: `/childcare/${facility.friendlyId}`,\n context,\n opinion: facility.opinion,\n },\n }, { root: true });\n }\n return comment || facility?.comment;\n },\n // eslint-disable-next-line\n async saveFacilityImages({ commit }, { id, data }) {\n await saveFacilityImages(id, data);\n },\n\n async fetchFacilitiesForProvider(\n { commit, dispatch, rootState },\n { page = 1, search = null, messaging },\n ) {\n try {\n const results = await fetchFacilitiesForProvider({\n providerId: rootState.providerId,\n page,\n search,\n messaging,\n });\n commit('setFacilitiesResultsForProvider', results);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Something went wrong fetching facilities' }, { root: true });\n }\n },\n\n async fetchMatchesFacilitiesForParent({\n commit,\n dispatch,\n getters,\n }) {\n const matchesData = await fetchMatchesFacilitiesForParent();\n const facilityIds = matchesData.recommendations\n .map((facility) => parseInt(Object.keys(facility)[0], 10));\n await commit('setMatchesPhase', matchesData.empty_state, { root: true });\n await commit('setMatchesIds', facilityIds);\n await dispatch('fetchFacilitiesToStore', { ids: facilityIds, limited: false });\n const bounds = getBoundsFromFacilities(getters.matchesFacilities);\n await commit('map/setMatchesBounds', bounds, { root: true });\n },\n\n newConversationReceived({ rootState, state }, conv) {\n const { conversation, newMessage } = toCamelCase(conv);\n const userType = rootState.user.current.isParent ? 'User' : 'Provider';\n if (userType === newMessage.senderType) return;\n const facility = state.facilitiesResultsForProvider.facilities\n .find((f) => f.id === conversation.childCareFacilityId);\n facility.hasUnreadMessages = true;\n },\n\n async acceptPayment(\n { commit, dispatch },\n { facilityId, acceptKinsidePayment },\n ) {\n await acceptPayment(facilityId, acceptKinsidePayment);\n commit('setAcceptPayment', { facilityId, acceptKinsidePayment });\n\n if (acceptKinsidePayment) {\n dispatch('notifications/addToastNotification', { text: 'Location payment link activated' }, { root: true });\n } else {\n dispatch('notifications/addToastNotification', { text: 'Location payment link deactivated' }, { root: true });\n }\n },\n async deactivateFacilitiesPayment({ commit, dispatch }) {\n await deactivateFacilitiesPayment();\n commit('setDeactivatePayment');\n dispatch('notifications/addToastNotification', { text: 'Deactivated payment link for all locations' }, { root: true });\n },\n },\n};\n","import { loadStripe } from '@stripe/stripe-js';\nimport {\n addArrayToDictionary, add, subtract, isCurrencyAmountTooLow, getFullName, getEnvVar,\n} from '@utils';\nimport {\n confirmNewFeeStructure,\n} from '@care-provider/stores/modules/provider-user.service';\nimport {\n fetchPayees,\n addCardPaymentMethod,\n fetchPaymentMethods,\n fetchPaymentRequests,\n fetchPayMeRequest,\n addPaymentRequest,\n updatePaymentRequest,\n cancelPaymentRequest,\n addBankAccountPaymentMethod,\n addProvider,\n removePaymentMethod,\n getPaymentCouponsToApply,\n doPaymentMathAndGetCommissions,\n checkNaviaBalance,\n submitCheckRequest,\n canRemovePaymentMethod,\n declinePayMeRequest,\n fetchUserPayMeRequests,\n acceptEnrollmentAutopay,\n fetchPaymentRequest,\n updateByProvider,\n} from './payments.service';\n\nconst completedStatuses = [\n 'failed',\n 'completed',\n];\n\nconst pendingStatuses = [\n 'created',\n 'payin_initiating',\n 'payin_bank_transactions_inititated',\n 'payin_all_transactions_inititated',\n 'funds_received',\n 'payout_initiated',\n];\n\nexport default {\n namespaced: true,\n\n state: {\n payees: {},\n paymentMethods: {},\n paymentRequests: {},\n currentPayment: {\n paymentRequestMethods: [],\n paymentRequestItems: [],\n },\n payMeRequest: {},\n userPayMeRequests: [],\n coupons: {},\n navia: {},\n isInitialized: false,\n },\n\n getters: {\n scheduledPaymentRequest(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => request.status === 'scheduled')\n .sort((a, b) => Date.parse(a.scheduledAt) - Date.parse(b.scheduledAt))[0];\n },\n paymentMethodTypes() {\n return {\n fsaCard: 'DCFSA Debit Card',\n stripeCard: 'Credit / Debit Card',\n bankAccount: 'Direct debit from a bank account',\n };\n },\n\n pendingPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => pendingStatuses.includes(request.status))\n .map(({ id }) => id);\n },\n\n schedulePaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => request.status === 'scheduled')\n .map(({ id }) => id);\n },\n\n completedPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => completedStatuses.includes(request.status))\n .map(({ id }) => id);\n },\n\n nonScheduledPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .filter((request) => !['scheduled', 'canceled', 'requested'].includes(request.status))\n .map(({ id }) => id);\n },\n\n allPaymentRequestIds(state) {\n return Object.values(state.paymentRequests)\n .map(({ id }) => id);\n },\n\n currentPayment(state) {\n return state.currentPayment;\n },\n\n currentPaymentHasFsaMethod(state) {\n return state.currentPayment.paymentRequestMethods.some(\n (method) => state.paymentMethods[method.paymentMethodId].fsa,\n );\n },\n\n currentPaymentHasBankAccount(state) {\n return state.currentPayment.paymentRequestMethods.some(\n (method) => state.paymentMethods[method.paymentMethodId].paymentMethodType.includes('BankAccount'),\n );\n },\n\n currentPaymentTotalFees(state) {\n const paymentMethods = state.currentPayment.paymentRequestMethods || [];\n return paymentMethods.length\n ? state.currentPayment.paymentRequestMethods\n .reduce((sum, method) => add(sum, method.commissionAmount), 0)\n : 0;\n },\n\n currentPaymentDiscounts(state) {\n const uniqDiscountsFromPaymentMethods = [];\n\n state.currentPayment.paymentRequestMethods.forEach(({ couponsApplied }) => {\n if (couponsApplied) {\n couponsApplied.forEach(({ code, discountAmount }) => {\n const coupon = uniqDiscountsFromPaymentMethods.find((d) => d.code === code);\n if (coupon) {\n coupon.amount = add(coupon.amount, discountAmount);\n } else if (discountAmount) {\n uniqDiscountsFromPaymentMethods.push({ code, amount: discountAmount });\n }\n });\n }\n });\n\n return uniqDiscountsFromPaymentMethods;\n },\n\n currentPaymentTotalDiscount(state) {\n return state.currentPayment.paymentRequestMethods\n .reduce((sum, method) => add(sum, method.discountAmount), 0);\n },\n\n currentPaymentTotalFeeDiscount(state) {\n return state.currentPayment.paymentRequestMethods.reduce((sum, method) => {\n const feeDiscount = (method.couponsApplied || []).reduce((methodSum, coupon) => {\n const isFeeDiscount = ['ACHFREE', 'WELCOME2020'].includes(coupon.code);\n return isFeeDiscount ? add(methodSum, coupon.discountAmount) : methodSum;\n }, 0);\n return add(sum, feeDiscount);\n }, 0);\n },\n\n currentPaymentFeeAfterDiscount(state, getters) {\n const { currentPaymentTotalFees, currentPaymentTotalFeeDiscount } = getters;\n return subtract(currentPaymentTotalFees, currentPaymentTotalFeeDiscount);\n },\n\n currentPaymentTotalInPaymentMethods(state) {\n return (state.currentPayment.paymentRequestMethods || [])\n .reduce((sum, method) => add(sum, method?.totalAmount || 0), 0);\n },\n\n currentPaymentTotalRemainingWithFee(state, getters) {\n if (state.currentPayment.totalToBeCharged) {\n return subtract(\n state.currentPayment.totalToBeCharged,\n getters.currentPaymentTotalInPaymentMethods,\n );\n }\n return 0;\n },\n\n currentPaymentProviderName(state) {\n const { providerId, newProvider } = state.currentPayment;\n const provider = providerId && state.payees[providerId];\n return getFullName(provider || newProvider, provider?.email || 'Your contact');\n },\n\n currentPaymentFacility(state, g, rootState) {\n const { facilityId } = state.currentPayment;\n return facilityId && rootState.facilities.storedFacilities[facilityId];\n },\n\n currentPaymentFacilityName(state, getters) {\n const { providerId, newProvider } = state.currentPayment;\n const { companyName } = newProvider || {};\n const { currentPaymentFacility, currentPaymentProviderName } = getters;\n const payee = (providerId && state.payees[providerId]);\n const facilityName = currentPaymentFacility?.name || payee?.companyName;\n\n return facilityName || companyName || currentPaymentProviderName || 'Facility';\n },\n\n currentPaymentIsSomeAmountTooLow(state) {\n const isAmountTooLow = isCurrencyAmountTooLow(state.currentPayment.amount);\n const isSomeMethodAmountTooLow = state.currentPayment.paymentRequestMethods\n .map((m) => m.totalAmount).some(isCurrencyAmountTooLow);\n\n return isAmountTooLow || isSomeMethodAmountTooLow;\n },\n\n currentPaymentHasNoLongerActiveCard(state) {\n if (!state.currentPayment.error || !state.currentPayment.error.relatedObj) {\n return false;\n }\n\n const { error } = state.currentPayment;\n\n if (error.relatedObj.class !== 'PaymentMethod') {\n return false;\n }\n\n const isErrorRelatedToCurrentPaymentMethods = state.currentPayment.paymentRequestMethods\n .map((m) => m.paymentMethodId)\n .includes(error.relatedObj.id);\n\n const isNoLongerActiveError = (error.message || '').toLowerCase().includes('no longer active');\n\n return isErrorRelatedToCurrentPaymentMethods && isNoLongerActiveError;\n },\n\n paymentMethodsAsArray(state) {\n return Object.values(state.paymentMethods)\n .filter((method) => method !== undefined && !method.deleted);\n },\n\n payMeRequest(state) {\n return state.payMeRequest;\n },\n\n userPayMeRequests(state) {\n return state.userPayMeRequests;\n },\n\n payeeIds(state) {\n return Object.keys(state.payees);\n },\n\n payeesAsArray(state) {\n return Object.values(state.payees);\n },\n\n couponCodes(state) {\n return Object.keys(state.coupons);\n },\n\n hasNaviaCard(state, getters) {\n return getters.paymentMethodsAsArray.some((m) => m.navia);\n },\n\n naviaCard(s, getters) {\n return getters.paymentMethodsAsArray.filter((m) => m.navia)[0];\n },\n\n naviaCardId(s, getters) {\n return getters.paymentMethodsAsArray.filter((m) => m.navia)[0]?.id;\n },\n },\n\n mutations: {\n addPayees: (state, payees) => {\n state.payees = { ...addArrayToDictionary(payees, state.payees) };\n },\n\n addPaymentMethods: (state, methods) => {\n state.paymentMethods = { ...addArrayToDictionary(methods, state.paymentMethods) };\n },\n\n removePaymentMethod: (state, id) => {\n state.paymentMethods = {\n ...state.paymentMethods,\n [id]: { ...state.paymentMethods[id], deleted: true },\n };\n },\n\n resetPaymentRequests: (state) => {\n state.paymentRequests = {};\n },\n\n addPaymentRequests: (state, requests) => {\n state.paymentRequests = { ...addArrayToDictionary(requests, state.paymentRequests) };\n },\n\n updateCurrentPayment: (state, newPaymentDetails) => {\n state.currentPayment = {\n ...state.currentPayment,\n ...newPaymentDetails,\n };\n },\n\n setCurrentPayment: (state, initData) => {\n state.currentPayment = {\n providerId: undefined,\n facilityId: undefined,\n newProvider: undefined,\n amount: undefined,\n category: undefined,\n paymentRequestMethods: [],\n ...initData,\n };\n },\n\n updateCurrentPaymentMethods: (state, paymentRequestMethods) => {\n state.currentPayment = {\n ...state.currentPayment,\n paymentRequestMethods,\n };\n },\n\n updatePaymentRequest: (state, request) => {\n state.paymentRequests[request.id] = request;\n },\n\n setCoupons: (state, coupons) => {\n state.coupons = addArrayToDictionary(coupons, undefined, 'code');\n },\n\n storeInitialized: (state) => {\n state.isInitialized = true;\n },\n\n setNavia: (state, payload) => {\n state.navia = payload;\n },\n\n setPayMeRequest: (state, payMeRequest) => {\n state.payMeRequest = payMeRequest;\n },\n\n setUserPayMeRequests: (state, userPayMeRequests) => {\n state.userPayMeRequests = userPayMeRequests;\n },\n },\n\n actions: {\n // setup user\n async fetchPaymentMethods({ commit, state, dispatch }) {\n try {\n const isPaymentMethodsEmpty = Object.keys(state.paymentMethods).length === 0;\n if (isPaymentMethodsEmpty) {\n const paymentMethods = await fetchPaymentMethods();\n commit('addPaymentMethods', paymentMethods);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment methods', error }, { root: true });\n throw new Error();\n }\n },\n\n // setup payments store\n async initializePaymentsStore({ dispatch, commit, state }) {\n if (!state.isInitialized) {\n return new Promise((resolve, reject) => {\n const promises = [\n dispatch('fetchPayees'),\n dispatch('fetchPaymentRequests'),\n ];\n\n Promise.all(promises)\n .then(() => {\n commit('storeInitialized');\n resolve();\n })\n .catch(() => {\n reject(new Error('Could not initialize payments module'));\n });\n });\n }\n return undefined;\n },\n\n async fetchPayees({ commit, dispatch }) {\n try {\n const payees = await fetchPayees();\n commit('addPayees', payees);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payees', error }, { root: true });\n }\n },\n\n async fetchPaymentRequests({ commit, dispatch }) {\n try {\n const paymentRequests = await fetchPaymentRequests();\n commit('resetPaymentRequests');\n commit('addPaymentRequests', paymentRequests);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment history', error }, { root: true });\n }\n },\n\n // eslint-disable-next-line consistent-return\n async fetchPaymentRequest({ dispatch }, id) {\n try {\n return await fetchPaymentRequest(id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch payment history', error }, { root: true });\n }\n },\n\n // setup payment\n async setCurrentPayment({ dispatch, commit }, initData) {\n try {\n commit('setCurrentPayment', initData);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not initialize sending payment', error }, { root: true });\n }\n },\n\n async updateCurrentPayment({ commit, dispatch }, newPaymentDetails) {\n try {\n commit('updateCurrentPayment', newPaymentDetails);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update payment details', error }, { root: true });\n }\n },\n\n async getPaymentCoupons({ commit, dispatch }) {\n try {\n const coupons = await getPaymentCouponsToApply();\n commit('setCoupons', coupons);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not get coupons', error }, { root: true });\n throw new Error(error);\n }\n },\n\n // manage the amounts\n async setTotalAmount({ commit, dispatch }, amount) {\n try {\n await commit('updateCurrentPayment', {\n amount,\n });\n\n await dispatch('doPaymentMathAndGetCommissions');\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update total amount', error }, { root: true });\n }\n },\n\n async updateMethodInCurrentPayment({ commit, state, dispatch }, method) {\n if (!method) {\n return;\n }\n\n // eslint-disable-next-line\n let { paymentRequestMethods, totalToBeCharged } = state.currentPayment;\n const methodToUpdateIndex = paymentRequestMethods.findIndex(\n (existingMethod) => existingMethod.paymentMethodId === method.paymentMethodId,\n );\n\n if (methodToUpdateIndex < 0) {\n paymentRequestMethods.push(method);\n } else {\n paymentRequestMethods[methodToUpdateIndex].totalAmount = method.totalAmount;\n }\n\n if (paymentRequestMethods.length === 2 && !!method.totalAmount) {\n const secondMethodIndex = methodToUpdateIndex < 0 ? 0 : 1 - methodToUpdateIndex;\n const secondPayment = paymentRequestMethods[secondMethodIndex];\n if (secondPayment) {\n const { paymentMethodId } = secondPayment;\n paymentRequestMethods[secondMethodIndex] = { paymentMethodId };\n // if the user edit split payment then choose whole amount,\n // we need to remove the other payment method\n if (method.totalAmount === totalToBeCharged) {\n paymentRequestMethods = paymentRequestMethods\n .filter((paymentMethod) => paymentMethod.paymentMethodId !== paymentMethodId);\n }\n }\n }\n await commit('updateCurrentPaymentMethods', paymentRequestMethods);\n await dispatch('doPaymentMathAndGetCommissions');\n },\n\n async removeMethodFromCurrentPayment({ commit, state, dispatch }, methodId) {\n if (!methodId) {\n return;\n }\n const { paymentRequestMethods } = state.currentPayment;\n const filteredPaymentRequestMethods = paymentRequestMethods\n .filter((method) => method.paymentMethodId !== methodId);\n\n await commit('updateCurrentPaymentMethods', filteredPaymentRequestMethods);\n await dispatch('doPaymentMathAndGetCommissions');\n },\n\n async doPaymentMathAndGetCommissions({\n commit, dispatch, state, getters, rootState,\n }) {\n try {\n const {\n id,\n amount,\n paymentRequestMethods,\n providerId,\n } = state.currentPayment;\n const params = {\n amount,\n paymentRequestMethods,\n coupons: getters.couponCodes,\n seatId: rootState.route.params.seatId,\n centerId: rootState.legup.centerInfo.center_id,\n providerId,\n paymentRequestId: id,\n };\n const data = await doPaymentMathAndGetCommissions(params);\n if (!state.currentPayment.paymentRequestMethods) {\n commit('updateCurrentPayment', data);\n return;\n }\n\n const updatedPaymentRequestMethods = state.currentPayment.paymentRequestMethods\n .map((method) => {\n let methodFromResponse = {};\n if (data.paymentRequestMethods) {\n methodFromResponse = data.paymentRequestMethods\n .find(({ paymentMethodId }) => paymentMethodId === method.paymentMethodId);\n }\n return {\n ...method,\n ...methodFromResponse,\n };\n });\n commit('updateCurrentPayment', {\n ...data,\n paymentRequestMethods: updatedPaymentRequestMethods,\n });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not calculate payment commissions', error }, { root: true });\n throw new Error(error);\n }\n },\n\n // start a payment request\n async addPaymentProvider({ dispatch }, newProvider) {\n try {\n const provider = await addProvider(newProvider);\n return provider.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a provider', error }, { root: true });\n throw new Error();\n }\n },\n\n async addPaymentRequest({ commit, dispatch, getters }, currentPayment) {\n try {\n const requestedPayment = await addPaymentRequest({\n ...currentPayment,\n paymentCoupons: getters.couponCodes,\n });\n await commit('updateCurrentPayment', {\n status: requestedPayment.status,\n id: requestedPayment.id,\n });\n commit('addPaymentRequests', [requestedPayment]);\n return requestedPayment.id;\n } catch (error) {\n const text = error.response.data.message || 'Could not send a payment request';\n dispatch('notifications/addToastError', { text, error }, { root: true });\n throw new Error();\n }\n },\n\n // eslint-disable-next-line max-len\n async updatePaymentRequest({ commit, dispatch, getters }, { id, applyChangesToCollection, ...data }) {\n try {\n const params = { ...data, paymentCoupons: getters.couponCodes, applyChangesToCollection };\n const updatedPayment = await updatePaymentRequest(params, id);\n commit('updatePaymentRequest', updatedPayment);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update a payment request', error }, { root: true });\n throw new Error();\n }\n },\n\n async updateByProvider({ dispatch }, { id, params }) {\n let updatedPayment = {};\n try {\n updatedPayment = await updateByProvider(params, id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not update a payment request', error }, { root: true });\n throw new Error();\n }\n return updatedPayment;\n },\n\n async cancelPaymentRequest({ commit, dispatch }, { id }) {\n try {\n const updatedPayment = await cancelPaymentRequest(id);\n commit('updatePaymentRequest', updatedPayment);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not cancel a payment request', error }, { root: true });\n throw new Error();\n }\n },\n\n // manage payment methods\n async addCard({\n dispatch, commit, getters,\n }, {\n cardType, cardData, userId, replace,\n }) {\n let stripePaymentMethod;\n\n // NAVIA FSA: CARD CHECK\n\n // stripe\n try {\n const stripe = await dispatch('loadStripe');\n const { nameOnCard, ...stripeData } = cardData;\n const { paymentMethod, error } = await stripe.createPaymentMethod({\n type: 'card',\n card: stripeData.cardNumber,\n billing_details: {\n name: nameOnCard,\n },\n });\n stripePaymentMethod = paymentMethod;\n if (error) {\n throw new Error(error);\n }\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a card, please check card details', error }, { root: true });\n throw new Error();\n }\n\n // our db\n try {\n const isFsa = cardType === getters.paymentMethodTypes.fsaCard;\n const addedMethod = await addCardPaymentMethod(stripePaymentMethod.id, isFsa, userId, replace);\n commit('addPaymentMethods', [addedMethod]);\n return addedMethod.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: error.response?.data?.error || 'Could not add a card, please check card details', error }, { root: true });\n throw new Error();\n }\n },\n\n async loadStripe({ dispatch }) {\n try {\n if (window.stripe !== undefined) {\n return window.stripe;\n }\n const stripeKey = getEnvVar('STRIPE_PUBLISHABLE_KEY') || 'pk_test_Z6CKyvULf8ZrRYUMCCs70tXu00SWlreOO6';\n const stripe = await loadStripe(stripeKey);\n window.stripe = stripe;\n return window.stripe;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not load stripe', error }, { root: true });\n throw new Error();\n }\n },\n\n async addBankAccount({ commit, dispatch }, { publicToken, accountId, userId }) {\n try {\n const addedMethod = await addBankAccountPaymentMethod(publicToken, accountId, userId);\n commit('addPaymentMethods', [addedMethod]);\n return addedMethod.id;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not add a new bank account', error }, { root: true });\n throw new Error();\n }\n },\n\n async removePaymentMethod({ commit, dispatch }, id) {\n try {\n await removePaymentMethod(id);\n commit('removePaymentMethod', id);\n } catch (error) {\n dispatch('notifications/addToastError', { text: `Could not remove payment method: ${id}`, error }, { root: true });\n throw new Error();\n }\n },\n\n async checkNaviaBalance({ commit, getters }) {\n commit('setNavia', {});\n if (!getters.hasNaviaCard) {\n return;\n }\n\n try {\n const response = await checkNaviaBalance();\n const {\n nextContributionDate, availableBalance, paymentMethodId, gracePeriodDate,\n } = response;\n\n commit('setNavia', {\n nextContributionDate,\n balance: availableBalance,\n cardId: paymentMethodId,\n expirationDate: gracePeriodDate,\n });\n } catch (e) {\n const { errorMessage, error, paymentMethodId } = e.response?.data || {};\n\n commit('setNavia', {\n errorMessage,\n error: error || true,\n cardId: paymentMethodId,\n });\n }\n },\n\n async submitCheckRequest(_, data) {\n await submitCheckRequest(data);\n },\n\n async confirmNewFeeStructure({ dispatch }, { providerId }) {\n try {\n const response = await confirmNewFeeStructure(providerId);\n return response;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not optin', error }, { root: true });\n return { error };\n }\n },\n async canRemovePaymentMethod({ dispatch }, { id }) {\n try {\n const response = await canRemovePaymentMethod(id);\n return response.data.can_remove;\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not check payment method status', error }, { root: true });\n throw new Error();\n }\n },\n\n async fetchPayMeRequest({ commit, dispatch }, { id, facilityId }) {\n try {\n const payMeRequest = await fetchPayMeRequest({ id, facilityId });\n commit('setPayMeRequest', payMeRequest);\n commit('setCurrentPayment', payMeRequest);\n // set user for guest user\n if (payMeRequest.user) {\n await dispatch('user/setCurrentUser', payMeRequest.user, { root: true });\n }\n } catch (error) {\n commit('setPayMeRequest', null);\n dispatch('notifications/addToastError', { text: 'Could not fetch pay me request', error }, { root: true });\n }\n },\n\n async declinePayMeRequest({ dispatch }, params) {\n try {\n await declinePayMeRequest(params);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not decline pay me request', error }, { root: true });\n }\n },\n\n async acceptEnrollmentAutopay({ dispatch }, currentPayment) {\n try {\n await acceptEnrollmentAutopay({\n ...currentPayment,\n });\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not accept autopay', error }, { root: true });\n throw new Error();\n }\n },\n\n async fetchUserPayMeRequests({ commit, dispatch }) {\n try {\n const payMeRequests = await fetchUserPayMeRequests();\n commit('setUserPayMeRequests', payMeRequests);\n } catch (error) {\n dispatch('notifications/addToastError', { text: 'Could not fetch users pay me requests', error }, { root: true });\n }\n },\n },\n};\n"],"names":["searchParamsToFetchParams","location","filters","fil","bounds","geoSearchType","sort","searchRadius","age","startDate","onlyEmergencyCare","rest","dependents","age_ranges","range","openings","value","openings_from","date","emergency_care","search_radius","source_address","targetAddress","source_latitude","lat","source_longitude","lon","precise_address_lat","precise_address_lon","source_city","city","source_state","state","source_zip","zip","is_precise_address","preciseLocation","bounds_neLat","neLat","bounds_neLon","neLon","bounds_swLat","swLat","bounds_swLon","swLon","center_lon","center_lat","geo_search_type","async","fetchSearchHistory","response","get","data","saveSearch","params","post","fetchSearch","id","fetchFilters","restFilters","parseFloat","precise_address","fetchParamsToSearchParams","deleteSearch","delete","fetchPhilosophies","fetchScheduleTypes","fetchMotivation","findFacilities","restOfParams","axiosController","AbortController","pagination","searchId","Object","keys","forEach","filterName","undefined","Array","isArray","length","array","join","arrayToString","per_page","perPage","page","search_id","mapParamsToFetchParams","signal","markers","restOfResponse","facilities","map","m","facility","zipBased","zip_based","current_page","totalPages","total_pages","totalRecords","total_results","facilityId","boundsToFit","error","abort","Error","removeAvatar","updateNotificationSettings","settings","patch","user","email_settings","getUser","updateUser","userObj","isImpersonated","put","updatePassword","password","passwordConfirmation","password_confirmation","catch","notificationSettings","label","getUserNavData","email","updateUserContact","CONVERSATIONS_BASE_PATH","MESSAGES_BASE_PATH","formatConversation","conversation","currentUser","conv","lastMessage","childCareFacilityId","color","Math","floor","random","lastUpdatedAt","updatedAt","hasUnreadMessages","isParent","secondUser","firstUserType","secondUserId","firstUserId","name","childCareFacilityName","type","firstUser","legupParentId","namespaced","conversations","messages","currentConversationId","conversationScrollEnabled","messagesScrollEnabled","lastMessageId","currentConversationFamily","newMessageReceived","unreadBadge","mutations","setConversations","lastId","isFirstNewConversation","push","newConv","idx","findIndex","c","splice","setMessages","groupedMessages","reverse","reduce","groups","message","Date","createdAt","toDateString","index","group","unshift","pop","pushMessage","changeConversation","conversationId","setConversationsScroll","isEnabled","setChatScroll","moveConversationToTop","isNewConversation","convIdx","markAsRead","read","newMessage","providerId","facilityName","setConversationFamily","family","setConversationReceiverName","parent","firstName","lastName","charAt","resetMessaging","setNewMessageReceived","isNewMessage","setUnreadBadge","count","updateUnreadBadge","actions","fetchConversations","commit","dispatch","rootState","getConversations","current","text","root","fetchMessages","getMessages","fetchUnreadBadge","getUnreadBadge","badgeCount","sendMessage","content","receiverId","body","senderType","senderId","secondUserType","markConversationAsRead","status","fetchParentInfo","getParentInfo","legupParent","messageFormatted","newConversationReceived","incBadge","parentSlots","tours","toursAsArray","centerSettings","tourPolicy","tourSlots","tourEnabled","upcomingTour","pastTour","toursForParent","tourToConfirm","setParentSlots","slots","setTours","payload","setToursAsArray","setCenterSettings","setTourPolicy","setTourSlots","setTourSetting","setCenterParentUpcomingTour","tour","setCenterParentPastTour","setToursForParent","setSingleTour","getters","tourStartTime","tourId","format","startAt","tz","timezone","tourProviderSetting","centerTourPolicy","centerTourSlots","fetchParentSlots","fetchTours","updateParentSlots","newSlots","ps","slotDateFrom","time","from","utc","slotDateTo","to","reserveTour","tourData","redirectUrl","dependentIds","list","centerParentTour","legupCenterId","success","today","upcomingTours","filter","t","startTime","a","b","localeCompare","shift","pastTours","bookTour","centerId","child","tourInfo","noFamilyNotes","ageGroupId","cancelTour","userId","rescheduleTour","newDateTime","policy","fetchSingleTour","parentConfirmTour","confirmed","fetchToursForParent","virtualInstructions","virtualLink","times","fetchSettings","updateSettings","updateDependent","dependent","dependentById","depId","asArray","values","clearDependents","updateDependents","removeDependent","removed","fetchDependents","addDependents","newDependents","Promise","all","d","addDependent","d1","updatedDependent","dependentsToUpdate","dependentsToAdd","addedDependents","updatedDependents","window","analytics","console","info","identify","obj","event","store","category","props","eventName","MetaEvents","warn","pageLoad","path","identifyUser","traits","utmParams","url","urlObject","URL","searchParams","key","startsWith","extractUtmParams","document","dependentAgeGroupPromise","providerWaitlistFeesPromise","findCenterInfoPromise","findCenterQuestionsPromise","findCenterSubsidiesPromise","validateSubsidiesDiscountPromise","checkForProviderCouponsPromise","dependentAgeGroup","waitlistFees","couponInfo","centerInfo","centerQuestions","centerSubsidies","providerCoupons","seatOfferDetails","seatOffersForParent","seatOfferMessageParams","declineOfferInfo","subsidyDiscount","ageGroups","setDeclineOfferInfo","setDependentAgeGroup","setSubsidyDiscount","setWaitlistFees","setCouponInfo","setCenterInfo","setCenterQuestions","setCenterSubsidies","setProviderCoupons","setSeatOfferDetails","setSeatOffersForParent","setSeatOfferMessageParams","setAgeGroups","manageWaitlistUrl","parentId","ageGroupProgramSchedules","updateOrRemoveWaitlistSpot","passOrDeclineSeatOffer","requestPaperwork","validateSubsidiesDiscount","providerWaitlistFees","validateProviderWaitlistCoupon","checkForProviderQuestionsDiscount","checkForProviderSubsidiesDiscount","findCenterInfo","findCenterQuestions","findCenterSubsidies","checkForProviderCoupons","fetchSeatOfferDetails","getCenterSeatOfferDetails","centerSeatOfferDetails","getDeclineOfferInfo","childBirthDate","preferredDate","promise","legup_center_id","birth_date","preferred_date","then","Number","programs","code","result","spotId","waitlist_spot_id","remove_from_waitlist","provider_removal","seatId","seat_id","subsidy_discount","waitlist_fee","fetchSeatOffersForParent","sendOffersMessage","updateWaitlistSpotAnswers","answers","acceptSeatOffer","paymentRequestMethods","payment_request_methods","addDeclineOfferInfo","declineInfo","fetchAgeGroups","toastNotifications","updated","addToastNotification","notification","removeToastNotification","setUpdated","updatedStatus","isDev","now","addToastError","isError","addToastSuccess","setUpdatedStatus","hubspot","constructor","this","instance","hsConversationsSettings","inlineEmbedSelector","env","AUTHORIZED","readyState","setTimeout","loadScript","addEventListener","href","includes","getElementById","loadHSC","scriptTag","createElement","src","onload","appendChild","widget","HubSpotConversations","hsc","loaded","hsConversationsOnReady","waitForHSC","resolve","checkHSC","waitForLoadedStatus","checkLoadedState","load","widgetOpen","refresh","openToNewThread","open","close","isLoaded","trackEvent","_hsq","hsq","phoneNumber","contactType","firstname","lastname","contact_type","mobilephone","openingsContactDetailsFirstName","openingsContactDetailsLastName","openingsContactDetailsEmail","openingsContactDetailsPhoneNumber","openingsContactDetailsTitle","openingsContactDetails","title","getActionItems","confirmNewFeeStructure","fetchSiteWideSearchResults","query","toLocaleString","timeZone","fetchToursPromise","fetchUpcomingParentTourForCenterPromise","fetchToursForParentPromise","onlyUpcoming","upcoming","facility_id","reservations","fetchLatestTour","maxTourId","max","find","tourSlotId","useParentSlots","comment","tour_slot_id","use_parent_slots","parent_comment","dependent_ids","successMessage","errorMessage","getTourSettings","tour_info","no_family_notes","age_group_id","user_id","center","new_date_time","confirmTour","fetchUpcomingParentTourForCenter","parent_id","place","legup_age_group_id","year","month","BASE_PATH","tries","confirmationDisabled","updateValidation","validatedStatus","disableConfirmation","validateEmployerCode","accessCode","accountValidateEmployerCode","access_code","reload","resendConfirmationEmail","accountResendConfirmationEmail","philosophies","profileCompletenessBySection","basicInfo","licensing","programDetails","photos","welcome","approach","healthSafety","setFacility","setPhilosophies","setSectionCompleteness","section","completeness","newProfileCompletenessBySection","facilityInfo","basicInfoComplete","field","licensingComplete","license_number","keyDetailsComplete","photosComplete","profile_images","welcomeComplete","approachComplete","healthSafetyComplete","isProfileEditComplete","numCompleteProfileEditSections","totalProfileEditSections","profileEditSections","profileEditCompleteness","parseInt","fetchFacility","fetchFacilityDetails","facilitySlug","updateFacility","child_care_facility_id","facility_log","source","FACILITY_OPINIONS","favorited","ignored","saved","noOpinion","fetchFacilities","idsToRequest","restParams","isSearch","limited","facility_ids","e","fetchMatchesFacilitiesForParent","acceptPayment","facilityAcceptPayment","accept_payment","deactivateFacilitiesPayment","fetchFacilitiesByOpinion","opinion","opinion_only","ids","ordered_ids","fetchOpinionCounts","saveFacilityOpinion","context","searchFacilities","search","saveFacilityComment","saveFacilityImages","facilityData","fetchFacilitiesForProvider","messaging","METHODS_BASE_PATH","REQUESTS_BASE_PATH","API_REQUESTS_BASE_PATH","errorToData","relatedObj","related_object_id","class","related_object_class","paymentDataToRequest","provider_id","amount","date_from","date_to","dependentId","dependent_data","dependentData","payment_request_items","paymentRequestItems","initialAmount","paymentMethodId","payment_method_id","provider_data","newProvider","message_to_provider","messageToProvider","payment_coupons","paymentCoupons","scheduled_at","scheduledAt","recurring_settings","recurringSettings","is_pay_me_request","isPayMeRequest","paymentRequestToData","aasm_state","latest_error","request","fetchPayees","providers","addProvider","provider","addCardPaymentMethod","stripeId","isFsa","replace","fsa","stripe_payment_method_id","addBankAccountPaymentMethod","publicToken","accountId","public_token","account_id","fetchPaymentMethods","removePaymentMethod","canRemovePaymentMethod","addPaymentRequest","paymentData","payment","payment_request","send_payment","updatePaymentRequest","apply_changes_to_collection","applyChangesToCollection","updateByProvider","cancelPaymentRequest","fetchPaymentRequests","payment_requests","fetchPaymentRequest","fetchPayMeRequest","getPaymentCouponsToApply","doPaymentMathAndGetCommissions","coupons","paymentRequestId","total_remaining","total_to_be_charged","total_to_be_sent_to_provider","amount_to_be_sent","payment_methods","totalAmount","includesFees","center_id","totalToBeSentToProvider","paymentMethods","restOfRequest","recalculateAmount","checkNaviaBalance","submitCheckRequest","papercheck_request","localStorage","setItem","downloadInvoicePdf","responseType","blob","createObjectURL","link","download","click","declinePayMeRequest","declineReason","declineMessage","decline_reason","decline_message","acceptEnrollmentAutopay","fetchUserPayMeRequests","searchSortOptionsMap","partners","distance","price","shortlistSortOptionsMap","fit","matchesSortOptionsMap","convertMapToRadioOptions","options","k","storedFacilities","orderedResultIds","hoveredId","records","opinionCounts","comments","favoritedIds","ignoredIds","savedIds","matchesIds","loadedIds","matches","facilitiesResultsForProvider","matchesSortOption","shortlistSortOption","searchSortOption","selectedFacilityId","currentSearchSortKey","currentMatchesSortKey","currentShortlistSortKey","currentFacility","f","orderedFacilities","indexOf","exact","exactMatch","partial","resultsWithOffersCount","offersCount","favoritedFacilities","ignoredFacilities","savedFacilities","shortlistFacilities","concat","matchesFacilities","sortedByDistance","facilityA","facilityById","facilityB","sortedByPrice","priceFrom","sortedShortlistFacilities","facilitiesByFit","sortedMatchesFacilities","areFavoritedIdsLoaded","areSavedIdsLoaded","areIgnoredIdsLoaded","areShortlistIdsLoaded","searchSortOptions","matchesSortOptions","shortlistSortOptions","shortlistIdsLength","shortlisted","facilityIsFavorited","facilityIsSaved","facilityIsIgnored","totalMatchesFacilities","currentFacilityTimezone","setSelectedFacilityId","setFacilityRecords","setMatchesSortOption","setShortlistSortOption","setSearchSortOption","setMatchesIds","setFavoritedIds","setSavedIds","setIgnoredIds","setOpinionCounts","counts","setOpinionState","addStoredFacilities","setHoveredId","updateFacilityComment","setAcceptPayment","acceptKinsidePayment","setDeactivatePayment","setFacilitiesResultsForProvider","results","setSort","rootGetters","showShortlist","showRecords","showMatches","loadOpinionCounts","loadFacilitiesByOpinion","opinionLabel","upperFirst","loadedFacilitiesCount","Boolean","fetchFacilitiesToStore","toggleFavorited","toggleSaved","toggleIgnored","updateFacilityOpinion","oldOpinion","getItem","showFavorited","showSaved","showIgnored","updateComment","friendlyId","slug","matchesData","facilityIds","recommendations","empty_state","completedStatuses","pendingStatuses","payees","paymentRequests","currentPayment","payMeRequest","userPayMeRequests","navia","isInitialized","scheduledPaymentRequest","parse","paymentMethodTypes","fsaCard","stripeCard","bankAccount","pendingPaymentRequestIds","schedulePaymentRequestIds","completedPaymentRequestIds","nonScheduledPaymentRequestIds","allPaymentRequestIds","currentPaymentHasFsaMethod","some","method","currentPaymentHasBankAccount","paymentMethodType","currentPaymentTotalFees","sum","commissionAmount","currentPaymentDiscounts","uniqDiscountsFromPaymentMethods","couponsApplied","discountAmount","coupon","currentPaymentTotalDiscount","currentPaymentTotalFeeDiscount","feeDiscount","methodSum","currentPaymentFeeAfterDiscount","currentPaymentTotalInPaymentMethods","currentPaymentTotalRemainingWithFee","totalToBeCharged","currentPaymentProviderName","currentPaymentFacility","g","currentPaymentFacilityName","companyName","payee","currentPaymentIsSomeAmountTooLow","isAmountTooLow","isSomeMethodAmountTooLow","currentPaymentHasNoLongerActiveCard","isErrorRelatedToCurrentPaymentMethods","isNoLongerActiveError","toLowerCase","paymentMethodsAsArray","deleted","payeeIds","payeesAsArray","couponCodes","hasNaviaCard","naviaCard","s","naviaCardId","addPayees","addPaymentMethods","methods","resetPaymentRequests","addPaymentRequests","requests","updateCurrentPayment","newPaymentDetails","setCurrentPayment","initData","updateCurrentPaymentMethods","setCoupons","storeInitialized","setNavia","setPayMeRequest","setUserPayMeRequests","initializePaymentsStore","reject","promises","getPaymentCoupons","setTotalAmount","updateMethodInCurrentPayment","methodToUpdateIndex","existingMethod","secondMethodIndex","secondPayment","paymentMethod","removeMethodFromCurrentPayment","methodId","filteredPaymentRequestMethods","route","legup","updatedPaymentRequestMethods","methodFromResponse","addPaymentProvider","requestedPayment","updatedPayment","addCard","cardType","cardData","stripePaymentMethod","stripe","nameOnCard","stripeData","createPaymentMethod","card","cardNumber","billing_details","addedMethod","loadStripe","stripeKey","addBankAccount","nextContributionDate","availableBalance","gracePeriodDate","balance","cardId","expirationDate","_","can_remove"],"sourceRoot":""}