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AASC,KAG/CZ,EAAOO,EAAII,SAASC,MAFpBZ,EAAOO,EAIX,GACJ,GACF,CAEO,SAAS0P,EAAsCxE,GACpD,IAAMmE,EAAMC,EAAAA,GACR,gDAAkDC,EAAAA,GAClD,kCACJ,OAAO,IAAIhQ,SAAa,SAACC,EAASC,GAChCC,EAAAA,GAAI+P,IAAI,UAAWJ,EAAK,CAAEzP,KAAMsL,IAC7BrL,MAAK,SAACC,GAELN,EAAQM,EACV,IACCC,OAAM,SAAAC,GACLgP,QAAQC,MAAM,qDAAsDjP,EAAIC,SACxER,EAAOO,EAAII,SAASC,KACtB,GACJ,GACF,CAEO,SAASsO,EAAuBrB,EAAkBmB,GACvD,OAAO,IAAIlP,SAAa,SAACC,EAASC,GAChCC,EAAAA,GAAIC,KAAK,UAAW,4BAA6B,CAAEC,KAAM,CAAE0N,SAAUA,EAAUmB,UAAWA,KACvF5O,MAAK,SAACC,GAELN,EAAQM,EACV,IACCC,OAAM,SAAAC,GACLgP,QAAQC,MAAM,mCAAoCjP,EAAII,UACtDX,EAAOO,EAAII,SACb,GACJ,GACF,C","sources":["webpack://www-differentdog-com/./src/state/apis/couponApi.ts","webpack://www-differentdog-com/./src/state/apis/dogApi.ts","webpack://www-differentdog-com/./src/state/actions/dogAction.ts","webpack://www-differentdog-com/./src/state/apis/parentApi.ts","webpack://www-differentdog-com/./src/state/actions/parentAction.ts","webpack://www-differentdog-com/./src/state/actions/planAction.ts","webpack://www-differentdog-com/./src/state/actions/shippingAction.ts","webpack://www-differentdog-com/./src/state/apis/shippingApi.ts"],"sourcesContent":["import Api from './api'\n\nexport function checkCouponValidity(coupon: string) {\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', '/v1/public/signup/coupon', { body: { coupon } })\n .then(res => resolve(res))\n .catch(err => reject(err.message))\n })\n}\n","import { DogType } from '../types/dogType'\nimport Api from './api'\n\nexport function addDogs(dogInfo: DogType) {\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', '/v1/public/signup/dogs', { body: dogInfo })\n .then(res => resolve(res))\n .catch(err => {\n if (err.response) {\n reject(err.response.data)\n } else {\n reject(err)\n }\n })\n })\n}\n","import { Dispatch } from 'redux'\nimport { checkCouponCodesValidity, checkCouponValidity } from '../apis/couponApi'\nimport { addDogs } from '../apis/dogApi'\nimport { Action, ActionType, DogType } from '../types/dogType'\n\nexport const createDogs = (dogInfo: DogType) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.ADD_DOGS_PENDING\n })\n try {\n const success = await addDogs(dogInfo)\n for (let i = dogInfo.dogs.length; i < 5; i++) {\n dogInfo.dogs.push({\n name: '',\n weight: 0,\n dob: '',\n exercise: '',\n physique: '',\n neutered: '',\n gender: '',\n breed: '',\n ageStage: '',\n medicalConditionOrAllergies: null,\n unknownBreed: null\n })\n }\n dogInfo.growthbook = success.growthbook\n dogInfo.customer.marketingCookieConsent = window?.Cookiebot?.consent?.marketing\n dispatch({\n type: ActionType.ADD_DOGS_SUCCESS,\n payload: {\n dogInfo,\n summary: success.dogs,\n coupon: success.defaultCoupon,\n couponCodes: success.defaultCoupons,\n isValidCoupon: success.defaultCoupon.code ? true : false,\n pack: success.defaultPackSize,\n packSizes: success.packSizes,\n defaultPack: success.defaultPackSize.default,\n planLevel: success.defaultPackSize.planLevel,\n packNew: success.planLevels\n }\n })\n } catch (err) {\n dispatch({\n type: ActionType.ADD_DOGS_FAIL,\n payload: { errorMessage: err }\n })\n }\n }\n}\n\nexport const updateCurrCouponCode = (code: string) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_CURRCOUPON_CODE,\n payload: code\n })\n }\n}\n\nexport const updateCouponCodeValidity = (isValid: boolean | string, code?: string) => {\n return async (dispatch: Dispatch) => {\n if (typeof isValid === 'boolean') {\n dispatch({\n type: ActionType.UPDATE_COUPON_CODE_VALIDITY_SUCCESS,\n payload: { isValid },\n code\n })\n } else {\n dispatch({\n type: ActionType.UPDATE_COUPON_CODE_VALIDITY_PENDING\n })\n try {\n const res = await checkCouponValidity(code as string)\n dispatch({\n type: ActionType.UPDATE_COUPON_CODE_VALIDITY_SUCCESS,\n payload: {\n isValid: true,\n lastValidCode: res.couponCode,\n lastValidCodes: res.couponCodes\n }\n })\n } catch (_err) {\n dispatch({\n type: ActionType.UPDATE_COUPON_CODE_VALIDITY_SUCCESS,\n payload: { isValid: false }\n })\n }\n }\n }\n}\n\nexport const updateCustomerEmail = (email: string) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_CUSTOMER_EMAIL,\n payload: email\n })\n }\n}\n\nexport const updateChangedStatus = (status: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_CHANGE_STATUS,\n payload: status\n })\n }\n}\n\nexport const resetLoadingStatus = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_LOADING_STATUS\n })\n }\n}\n\nexport const resetErrorMessageForDogs = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_ERROR_MESSAGE\n })\n }\n}\n\nexport const resetDogs = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET\n })\n }\n}\n","import { ParentDetailsType } from '../types/parentType'\nimport Api from './api'\n\nexport function addParent(parentDetails: ParentDetailsType) {\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', '/v1/public/signup/details', { body: parentDetails })\n .then(res => resolve(res))\n .catch(err => reject(err.response.data))\n })\n}\n","import { Dispatch } from 'redux'\nimport { addParent } from '../apis/parentApi'\nimport { Action, ActionType, ParentDetailsType, errorMessageParentType } from '../types/parentType'\n\nexport const createParentDetails = (parentDetails: ParentDetailsType, isSubmit: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.ADD_PARENT_PENDING\n })\n try {\n parentDetails.customer.marketingCookieConsent = window?.Cookiebot?.consent?.marketing\n isSubmit && (await addParent(parentDetails))\n dispatch({\n type: ActionType.ADD_PARENT_SUCCESS,\n payload: { parentDetails, changed: isSubmit }\n })\n } catch (err) {\n dispatch({\n type: ActionType.ADD_PARENT_FAIL,\n payload: { errorMessage: err as errorMessageParentType | any }\n })\n }\n }\n}\n\nexport const updateCouponCode = (couponCode: string) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_COUPON_CODE,\n payload: couponCode\n })\n }\n}\n\nexport const updateChangedStatus = (status: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_CHANGE_STATUS,\n payload: status\n })\n }\n}\n\nexport const updateParentEmail = (email: string) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_PARENT_EMAIL,\n payload: email\n })\n }\n}\n\nexport const resetErrorMessageForParent = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_ERROR_MESSAGE\n })\n }\n}\n\nexport const resetParent = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET\n })\n }\n}\n\nexport const resetLoadingStatus = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_LOADING_STATUS\n })\n }\n}\n","import { Dispatch } from 'redux'\nimport { addPlanId } from '../apis/planApi'\nimport { Action, ActionType, RecipeType } from '../types/planType'\n\ninterface PostPlanType {\n planId: string\n planObject: object\n noOfPacks: number | undefined\n packSize: number | undefined\n weeks: number | undefined\n isDefaultPlan: boolean\n packType: string\n fixedOrCustomPlan: string\n}\n\nexport const postPlanId = ({\n planId,\n planObject,\n noOfPacks,\n packSize,\n weeks,\n isDefaultPlan,\n packType,\n fixedOrCustomPlan\n}: PostPlanType) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.ADD_PLAN_PENDING\n })\n try {\n dispatch({\n type: ActionType.ADD_PLAN_SUCCESS,\n payload: { plan: planObject, noOfPacks, packSize, weeks, isDefaultPlan, packType, fixedOrCustomPlan }\n })\n } catch (_err) {\n dispatch({\n type: ActionType.ADD_PLAN_FAIL\n })\n }\n }\n}\n\nexport const addRecipes = (recipes: RecipeType[], isSubmit: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.ADD_RECIPES_PENDING\n })\n try {\n dispatch({\n type: ActionType.ADD_RECIPES_SUCCESS,\n payload: { recipes, changed: isSubmit }\n })\n } catch (_err) {\n dispatch({\n type: ActionType.ADD_RECIPES_FAIL\n })\n }\n }\n}\n\nexport const removeRecipes = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.REMOVE_RECIPES_PENDING\n })\n try {\n dispatch({\n type: ActionType.REMOVE_RECIPES_SUCCESS,\n payload: []\n })\n } catch (_err) {\n dispatch({\n type: ActionType.REMOVE_RECIPES_FAIL\n })\n }\n }\n}\n\nexport const prefillSignupRecipes = (recipes: RecipeType[]) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.PREFILL_SIGNUP_RECIPES,\n payload: recipes\n })\n }\n}\n\nexport const removeAddons = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.REMOVE_ADDONS_PENDING\n })\n try {\n dispatch({\n type: ActionType.REMOVE_ADDONS_SUCCESS\n })\n } catch (_err) {\n dispatch({\n type: ActionType.REMOVE_ADDONS_FAIL\n })\n }\n }\n}\n\nexport const updateTrialBox = (trialBoxEnabled: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_TRIAL_BOX_PENDING\n })\n try {\n dispatch({\n type: ActionType.UPDATE_TRIAL_BOX_SUCCESS,\n payload: trialBoxEnabled\n })\n } catch (_err) {\n dispatch({\n type: ActionType.UPDATE_TRIAL_BOX_FAIL\n })\n }\n }\n}\n\nexport const addAddons = (addons: RecipeType[] | any) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.ADD_ADDONS_PENDING\n })\n try {\n dispatch({\n type: ActionType.ADD_ADDONS_SUCCESS,\n payload: addons\n })\n } catch (_err) {\n dispatch({\n type: ActionType.ADD_ADDONS_FAIL\n })\n }\n }\n}\n\nexport const updateChangedStatus = (status: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.UPDATE_CHANGE_STATUS,\n payload: status\n })\n }\n}\n\nexport const resetPlan = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET\n })\n }\n}\n","import { Dispatch, Store } from 'redux'\nimport { RootState } from 'state'\nimport { Action, ActionType, ShippingType } from 'state/types/shippingType'\nimport { submitShippingConfirm, submitValidatePostcode } from '../apis/shippingApi'\n\nexport const createShippingConfirm = (formData: ShippingType, isSubmit: boolean) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.SUBMIT_SHIPPING_PENDING\n })\n try {\n formData.customer.marketingCookieConsent = window?.Cookiebot?.consent?.marketing\n const success = isSubmit && (await submitShippingConfirm(formData))\n isSubmit &&\n dispatch({\n type: ActionType.ADD_ORDER_SUMMARY_SUCCESS,\n payload: { orderSummary: success.orderSummary }\n })\n dispatch({\n type: ActionType.SUBMIT_SHIPPING_SUCCESS,\n payload: { shippingConfirm: formData, changed: isSubmit ? true : false }\n })\n } catch (err) {\n if (err?.data?.payment?.status === 'requires_action') {\n dispatch({\n type: ActionType.REQUIRES_3D_SECURE,\n payload: { setupIntent: err?.data.payment }\n })\n } else {\n dispatch({\n type: ActionType.SUBMIT_SHIPPING_FAIL,\n payload: { errorMessage: err?.data || 'Generic error' }\n })\n }\n }\n }\n}\n\nexport const saveShippingConfirmForm = (values: any, fixedOrCustomPlan: string) => {\n return function (dispatch: Dispatch, getState: Store['getState']) {\n const { plan } = getState()\n return dispatch({\n type: ActionType.SAVE_SHIPPING_FORM,\n payload: {\n customer: {\n name: values.firstName,\n surname: values.lastName,\n email: values.email,\n marketingOptIn: values.marketingOptIn,\n telephone: values.phoneNumber,\n smsOptIn: values.smsOptIn,\n password: values.password\n },\n address: {\n shipping: {\n address1: values.shippingAddress1,\n address2: values.shippingAddress2,\n city: values.shippingCity,\n county: values.shippingCounty,\n postcode: values.shippingPostcode\n },\n billing: {\n address1: values.billingAddress1,\n address2: values.billingAddress2,\n city: values.billingCity,\n county: values.billingCounty,\n postcode: values.billingPostcode\n }\n },\n coupon: values.coupon,\n notes: values.deliveryInstructions,\n payment: values.payment,\n recipes: plan.recipesSelected,\n addons: plan.addonsSelected,\n deliveryDate: values.deliveryDate,\n plan: {\n id: `${plan.packSize}g-${plan.weeks}w`,\n type: fixedOrCustomPlan,\n level: 10,\n size: plan.planLevel,\n grams: (plan.packSize ?? 0).toString() // TODO: type fix required\n }\n }\n })\n }\n}\n\nexport const validatePostcode = (postcode: string, visitorId?: string) => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.VALIDATE_POSTCODE_PENDING\n })\n try {\n const _success = await submitValidatePostcode(postcode, visitorId)\n dispatch({\n type: ActionType.VALIDATE_POSTCODE_SUCCESS\n })\n } catch (err) {\n dispatch({\n type: ActionType.VALIDATE_POSTCODE_FAIL,\n payload: { errorMessage: err?.data }\n })\n }\n }\n}\n\nexport const resetLoadingStatus = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_LOADING_STATUS\n })\n }\n}\n\nexport const resetShipping = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET\n })\n }\n}\n\nexport const resetErrorMessageForShipping = () => {\n return async (dispatch: Dispatch) => {\n dispatch({\n type: ActionType.RESET_ERROR_MESSAGE\n })\n }\n}\n","import { ShippingType } from 'state/types/shippingType'\nimport Api, { spoofMode, spoofedUserId } from './api'\n\nexport function submitShippingConfirm(formData: ShippingType) {\n console.error('formData: ', JSON.stringify(formData, null, 2))\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', '/v1/public/signup/checkout', { body: formData })\n .then((res: any) => {\n console.error(`submitShippingConfirmResponse: ${JSON.stringify(res)}`)\n resolve(res)\n })\n .catch(err => {\n console.error(`submitShippingConfirmError: ${JSON.stringify(err)}`)\n reject(err.response)\n })\n })\n}\n\nexport function submitShippingConfirmForAccount(formData: ShippingType) {\n const url = spoofMode\n ? '/v1/private/admin/account/plan/checkout?userId=' + spoofedUserId\n : '/v1/private/account/plan/checkout'\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', url, { body: formData })\n .then((res: any) => {\n console.log('response: ', res)\n resolve(res)\n })\n .catch(err => {\n console.error('Error submit shipping confirm for account: ', err.message)\n reject(err.response.data)\n })\n })\n}\n\nexport function submitShippingConfirmForAccountExisting(formData: ShippingType) {\n const url = spoofMode\n ? '/v1/private/admin/account/plan/checkout?userId=' + spoofedUserId\n : '/v1/private/account/plan/checkout'\n return new Promise((resolve, reject) => {\n Api.put('wwwREST', url, { body: formData })\n .then((res: any) => {\n console.log('response: ', res)\n resolve(res)\n })\n .catch((err: any) => {\n console.error('Error submit shipping confirm for account existing: ', err.message)\n if (err.response.status === 400 && !err.response.data) {\n reject(err)\n } else {\n reject(err.response.data)\n }\n })\n })\n}\n\nexport function submitShippingConfirmForAccountAddons(formData: ShippingType) {\n const url = spoofMode\n ? '/v1/private/admin/account/plan/addons?userId=' + spoofedUserId\n : '/v1/private/account/plan/addons'\n return new Promise((resolve, reject) => {\n Api.put('wwwREST', url, { body: formData })\n .then((res: any) => {\n console.log('response: ', res)\n resolve(res)\n })\n .catch(err => {\n console.error('Error submit shipping confirm for account addons: ', err.message)\n reject(err.response.data)\n })\n })\n}\n\nexport function submitValidatePostcode(postcode: string, visitorId?: string) {\n return new Promise((resolve, reject) => {\n Api.post('wwwREST', '/v1/public/signup/address', { body: { postcode: postcode, visitorId: visitorId } })\n .then((res: any) => {\n console.log('response: ', res)\n resolve(res)\n })\n .catch(err => {\n console.error('Error submit validate postcode: ', err.response)\n reject(err.response)\n })\n })\n}\n"],"names":["checkCouponValidity","coupon","Promise","resolve","reject","Api","post","body","then","res","catch","err","message","addDogs","dogInfo","response","data","createDogs","_ref","_asyncToGenerator","_regeneratorRuntime","_callee","dispatch","_window","_window$Cookiebot","_window$Cookiebot$con","success","i","_context","prev","next","type","ActionType","ADD_DOGS_PENDING","sent","dogs","length","push","name","weight","dob","exercise","physique","neutered","gender","breed","ageStage","medicalConditionOrAllergies","unknownBreed","growthbook","customer","marketingCookieConsent","window","Cookiebot","consent","marketing","ADD_DOGS_SUCCESS","payload","summary","defaultCoupon","couponCodes","defaultCoupons","isValidCoupon","code","pack","defaultPackSize","packSizes","defaultPack","default","planLevel","packNew","planLevels","t0","ADD_DOGS_FAIL","errorMessage","stop","_x","apply","arguments","updateCurrCouponCode","_ref2","_callee2","_context2","UPDATE_CURRCOUPON_CODE","_x2","updateCouponCodeValidity","isValid","_ref3","_callee3","_context3","UPDATE_COUPON_CODE_VALIDITY_SUCCESS","UPDATE_COUPON_CODE_VALIDITY_PENDING","lastValidCode","couponCode","lastValidCodes","_x3","updateCustomerEmail","email","_ref4","_callee4","_context4","UPDATE_CUSTOMER_EMAIL","_x4","updateChangedStatus","status","_ref5","_callee5","_context5","UPDATE_CHANGE_STATUS","_x5","resetLoadingStatus","_ref6","_callee6","_context6","RESET_LOADING_STATUS","_x6","resetErrorMessageForDogs","_ref7","_callee7","_context7","RESET_ERROR_MESSAGE","_x7","resetDogs","_ref8","_callee8","_context8","RESET","_x8","addParent","parentDetails","createParentDetails","isSubmit","ADD_PARENT_PENDING","ADD_PARENT_SUCCESS","changed","t1","ADD_PARENT_FAIL","updateCouponCode","UPDATE_COUPON_CODE","updateParentEmail","UPDATE_PARENT_EMAIL","resetErrorMessageForParent","resetParent","postPlanId","planId","planObject","noOfPacks","packSize","weeks","isDefaultPlan","packType","fixedOrCustomPlan","ADD_PLAN_PENDING","ADD_PLAN_SUCCESS","plan","_err","ADD_PLAN_FAIL","addRecipes","recipes","ADD_RECIPES_PENDING","ADD_RECIPES_SUCCESS","ADD_RECIPES_FAIL","removeRecipes","REMOVE_RECIPES_PENDING","REMOVE_RECIPES_SUCCESS","REMOVE_RECIPES_FAIL","prefillSignupRecipes","PREFILL_SIGNUP_RECIPES","removeAddons","REMOVE_ADDONS_PENDING","REMOVE_ADDONS_SUCCESS","REMOVE_ADDONS_FAIL","updateTrialBox","trialBoxEnabled","UPDATE_TRIAL_BOX_PENDING","UPDATE_TRIAL_BOX_SUCCESS","UPDATE_TRIAL_BOX_FAIL","addAddons","addons","ADD_ADDONS_PENDING","ADD_ADDONS_SUCCESS","ADD_ADDONS_FAIL","_ref9","resetPlan","_ref10","_callee9","_context9","_x9","createShippingConfirm","formData","_err$data","_err$data$payment","SUBMIT_SHIPPING_PENDING","submitShippingConfirm","ADD_ORDER_SUMMARY_SUCCESS","orderSummary","SUBMIT_SHIPPING_SUCCESS","shippingConfirm","payment","REQUIRES_3D_SECURE","setupIntent","SUBMIT_SHIPPING_FAIL","saveShippingConfirmForm","values","getState","_plan$packSize","SAVE_SHIPPING_FORM","firstName","surname","lastName","marketingOptIn","telephone","phoneNumber","smsOptIn","password","address","shipping","address1","shippingAddress1","address2","shippingAddress2","city","shippingCity","county","shippingCounty","postcode","shippingPostcode","billing","billingAddress1","billingAddress2","billingCity","billingCounty","billingPostcode","notes","deliveryInstructions","recipesSelected","addonsSelected","deliveryDate","id","level","size","grams","toString","validatePostcode","visitorId","VALIDATE_POSTCODE_PENDING","submitValidatePostcode","VALIDATE_POSTCODE_SUCCESS","VALIDATE_POSTCODE_FAIL","resetShipping","resetErrorMessageForShipping","console","error","JSON","stringify","submitShippingConfirmForAccount","url","spoofMode","spoofedUserId","submitShippingConfirmForAccountExisting","put","submitShippingConfirmForAccountAddons"],"sourceRoot":""}