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AOjB,EAAoB,QAC7FysI,EAAsBzsI,EAAoBkqI,EAAEuC,E","sources":["app/src/helpers/userHelpers.ts","app/src/snippets/datadog_snippet.js","app/src/constants/images.tsx","app/src/snippets/facebook_pixel_snippet.js","app/src/types/index.ts","node_modules/moment/locale|sync|/^/.//.*$","app/src/slices/onboardingSlice.ts","app/src/snippets/segment_snippet.js","app/src/services/logger.ts","app/src/helpers/featureFlags.ts","app/src/constants/routeNames.tsx","app/src/constants/ScreenIndexes.ts","app/src/constants/styles.tsx","app/src/constants/index.tsx","app/src/constants/data.tsx","app/src/screens/New_DIY_form/createOnboardingState.ts","app/src/helpers/generalHelpers.ts","app/src/config/customerPixels.ts","app/src/helpers/analyticsHelpers.ts","app/src/constants/helperFunction.tsx","i18n.ts","app/src/constants/theme.tsx","app/src/helpers/facebookPixelHelpers.ts","app/src/slices/userSlice.ts","app/src/services/baseApi.ts","app/src/slices/brandSlice.ts","app/src/slices/foodSlice.ts","app/src/slices/plannerSlice.ts","store.ts","app/src/helpers/intercomHelpers.ts","app/src/helpers/logout.ts","app/src/commons/CommonButtons.tsx","app/src/commons/CommonCategoryCard.tsx","app/src/commons/CommonDateTextInput.tsx","app/src/commons/CommonDescriptionInput.tsx","app/src/commons/CommonIconButton.tsx","app/src/commons/CommonInnerText.tsx","app/src/commons/CommonModal.tsx","app/src/commons/CommonModalize.tsx","app/src/commons/CommonNumberInputWithPlusMinusButtons.tsx","app/src/commons/CommonPageHeader.tsx","app/src/commons/CommonRadioBox.tsx","app/src/commons/CommonSearchInput.tsx","app/src/commons/CommonSelect.tsx","app/src/commons/CommonSmallText.tsx","app/src/commons/CommonStepIndex.tsx","app/src/commons/CommonText.tsx","app/src/commons/CommonTextInput.tsx","app/src/commons/CommonWhiteContainer.tsx","app/src/components/SelectOptionScreen.tsx","app/src/screens/AddGenderScreen.tsx","app/src/screens/AddLifeStyleScreen.tsx","app/src/screens/AddMainGoalScreen.tsx","app/src/screens/AddMotivationGoalScreen.tsx","app/src/helpers/foodHelpers.tsx","app/src/services/backendTypes.ts","app/src/services/backendApi.ts","app/src/components/EditUserProfileComponent.tsx","app/src/hooks/useExternalLink.tsx","app/src/screens/MagicLinkSentScreenStyle.tsx","app/src/screens/MagicLinkSentScreen.tsx","app/src/helpers/supportHelpers.tsx","app/src/screens/ClientsOverviewScreenStyle.tsx","app/src/screens/ClientsOverviewScreen.tsx","app/src/commons/ProgressBar.tsx","app/src/components/RecipeMacrosItem.tsx","app/src/helpers/coachHelpers.tsx","app/src/services/legacyNutritionCalculations.ts","app/src/services/nutritionCalculations.ts","app/src/helpers/fitnessCalculationHelpers.ts","app/src/services/legacyNutritionCalculations7.ts","app/src/services/nutritionCalculations7.ts","app/src/screens/CoachModeClientInfoScreenStyle.tsx","app/src/components/CustomBrandingMobileScreenHeader.tsx","app/src/constants/fonts.tsx","app/src/helpers/chartHelpers.tsx","app/src/screens/MyProfileScreenStyles.tsx","app/src/screens/MyProgressScreen.tsx","app/src/screens/CoachModeClientInfoScreen.tsx","app/src/commons/CommonHeaderDivider.tsx","app/src/components/FloatingButton.tsx","app/src/components/MacroTargetInfoStyle.ts","app/src/components/MacroTargetInfo.tsx","app/src/components/MealsCategoryCardStyles.ts","app/src/helpers/diaryHelpers.tsx","app/src/helpers/testHelpers.ts","app/src/components/PlannerItem.tsx","app/src/components/MealSlotInPlanner.tsx","app/src/components/QuickAddModal.tsx","app/src/components/SlidingCalendarStyle.tsx","app/src/components/SlidingCalendar.tsx","app/src/screens/CopyDayModal.tsx","app/src/helpers/apiHelpers.tsx","app/src/screens/CopyMealsModal.tsx","app/src/screens/DiaryViewScreenStyles.tsx","app/src/screens/DiaryViewScreen.tsx","app/src/screens/EmailConfirmationSentScreen.tsx","app/src/screens/EmailConfirmed.tsx","app/src/components/FoodSearchResult.tsx","app/src/screens/FoodSearchScreen.tsx","app/src/screens/GetStartedScreenStyle.tsx","app/src/screens/GetStartedScreen.tsx","app/src/screens/LoginScreenStyles.tsx","app/src/screens/LoginScreen.tsx","app/src/components/NutritionPlanRowItemStyle.tsx","app/src/components/NutritionPlanRowItem.tsx","app/src/screens/NutritionPlanScreenStyle.tsx","app/src/screens/NutritionPlanScreen.tsx","app/src/screens/OnBoardingScreenStyle.tsx","app/src/screens/OnboardingScreen.tsx","app/src/screens/PersonalDetailsScreen.tsx","app/src/components/PlanRowItem.tsx","app/src/screens/PlanScreenStyle.tsx","app/src/screens/PlanScreen.tsx","app/src/screens/ProfilePictureScreenStyle.tsx","app/src/screens/ProfilePictureScreen.tsx","app/src/screens/ProfileStartScreenStyle.tsx","app/src/screens/RecipeInspirationScreenStyle.tsx","app/src/components/RecipeInspirationScreenListItems.tsx","app/src/screens/RecipeInspirationScreen.tsx","app/src/components/RecipeCard.tsx","app/src/screens/RecipeSearchScreenStyle.tsx","app/src/screens/RecipeSearchScreen.tsx","app/src/screens/RegisterStyles.tsx","app/src/screens/RegisterScreen.tsx","app/src/screens/AddIngredientScreenStyle.tsx","app/src/screens/AddIngredientScreen.tsx","app/src/screens/BarcodeScannerScreen.tsx","app/src/screens/checkout/CheckoutFailureScreen.tsx","app/src/screens/checkout/constants.tsx","app/src/screens/checkout/CheckoutSceen.tsx","app/src/screens/createNutritionDayPlan/helperComponents.tsx","app/src/screens/createNutritionDayPlan/helperFunctions.ts","app/src/screens/createNutritionDayPlan/ChooseMealMomentsTab2.tsx","app/src/screens/createNutritionDayPlan/EditMealMomentsTab3.tsx","app/src/screens/MacroProfilesEditDayScreenStyle.tsx","app/src/screens/createNutritionDayPlan/EnergyBalanceTab1.tsx","app/src/screens/createNutritionDayPlan/FineTuningTab4.tsx","app/src/screens/EditUserProfileScreen.tsx","app/src/screens/EnterOTPScreen.tsx","app/src/screens/FinishPlanningStyles.tsx","app/src/screens/FinishPlanningScreen.tsx","app/src/components/checkBox.tsx","app/src/components/GroceryListDatePicker.tsx","app/src/screens/GroceriesViewScreenStyle.tsx","app/src/screens/GroceryListScreen.tsx","app/src/screens/New_DIY_form/Onboarding_1_SignUpScreen.tsx","app/src/screens/New_DIY_form/SelectionScreen.tsx","app/src/screens/New_DIY_form/Onboarding_2_GoalScreen.tsx","app/src/screens/New_DIY_form/Onboarding_3_ActivityLevelScreen.tsx","app/src/screens/New_DIY_form/Onboarding_4_BiometricDataScreen.tsx","app/src/helpers/diyFormHelpers.ts","app/src/screens/New_DIY_form/onboardingHelpers.ts","app/src/screens/New_DIY_form/Onboarding_5_PhysicalStatsScreen.tsx","app/src/screens/New_DIY_form/Onboarding_6_WeeklyGoalScreen.tsx","app/src/screens/New_DIY_form/Onboarding_7_ModifyNutritionPlanScreen.tsx","app/src/screens/New_DIY_form/Onboarding_7_NutritionPlanScreen.tsx","app/src/screens/New_DIY_form/Onboarding_8_MealTimesScreen.tsx","app/src/screens/New_DIY_form/Onboarding_8b_DietSelectionScreen.tsx","app/src/screens/New_DIY_form/Onboarding_9_IntoleranceScreen.tsx","app/src/components/PostOnboardingLoadingInterstitial.tsx","app/src/screens/New_DIY_form/Onboarding_10_IngredientDislikesScreen.tsx","app/src/screens/New_DIY_form/Onboarding_11_PostOnboardingScreen.tsx","app/src/screens/New_DIY_form/Onboarding_MenstrualCycle_1_DatesScreen.tsx","app/src/screens/New_DIY_form/Onboarding_MenstrualCycle_2_Spacing.tsx","app/src/components/MenstrualCycleDiagram.tsx","app/src/screens/New_DIY_form/Onboarding_MenstrualCycle_3_DetailsScreen.tsx","app/src/screens/New_DIY_form/RegistrationScreen.tsx","app/src/screens/PWASignupScreen.tsx","app/src/components/RecipeMacros.tsx","app/src/screens/RecipeAddOwnScreenStyle.tsx","app/src/screens/RecipeDetailScreenStyle.tsx","app/src/screens/RecipeDetailScreen.tsx","app/src/screens/RecipeAddOwnScreen.tsx","app/src/screens/BillingIssueScreen.tsx","app/src/screens/CoachModeAccountScreen.tsx","app/src/components/BlogLinksDropdown.tsx","app/src/screens/MyProfileScreen.tsx","app/src/navigation/BottomNavigationStack.tsx","app/src/navigation/NavigationStack.tsx","AppContent.tsx","App.ts","webpack/bootstrap","webpack/runtime/amd options","webpack/runtime/chunk loaded","webpack/runtime/compat get default export","webpack/runtime/create fake namespace object","webpack/runtime/define property getters","webpack/runtime/global","webpack/runtime/harmony module decorator","webpack/runtime/hasOwnProperty shorthand","webpack/runtime/make namespace object","webpack/runtime/node module decorator","webpack/runtime/publicPath","webpack/runtime/jsonp chunk loading","webpack/startup"],"sourcesContent":["import _ from \"lodash\";\nimport { parse } from \"tldts\";\n\nimport type { MenstrualCycleDiagramProps } from \"../components/MenstrualCycleDiagram\";\nimport { PRODUCTION, SUBDOMAIN_OVERRIDE } from \"../constants\";\nimport { createOnboardingState } from \"../screens/New_DIY_form/createOnboardingState\";\nimport type {\n DietEnum as DietaryPreference,\n DjstripeCustomer,\n DjstripeSubscription,\n DjstripeSubscriptionStatusEnum,\n ExerciseTemplate,\n Organisation,\n User,\n UserDislikeRecipe,\n UserFavouriteRecipe,\n} from \"../services/backendTypes\";\nimport type { OnboardingState } from \"../slices/onboardingSlice\";\nimport type {\n UserDislikeRecipeByRecipeTemplateId,\n UserFavouriteRecipeByRecipeTemplateId,\n UserSleepsByDate,\n UserStressByDate,\n UserWeightsByDate,\n} from \"../slices/userSlice\";\nimport { DietaryPreferenceEnum } from \"../types\";\nimport { FeatureFlag as FeatureFlagProper, isFeatureFlagActive } from \"./featureFlags\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport function isUserLoggedIn(user: User | null): boolean {\n return Boolean(user);\n}\n\nexport function getFavouritedRecipe(\n userFavouriteRecipeByRecipeTemplateId: UserFavouriteRecipeByRecipeTemplateId,\n recipeTemplateId: number\n): UserFavouriteRecipe | undefined {\n return userFavouriteRecipeByRecipeTemplateId[recipeTemplateId];\n}\n\nexport function getDislikedRecipe(\n userDislikeRecipeByRecipeTemplateId: UserDislikeRecipeByRecipeTemplateId,\n recipeTemplateId: number\n): UserDislikeRecipe | undefined {\n return userDislikeRecipeByRecipeTemplateId[recipeTemplateId];\n}\n\nexport const getLatestMeasurementForDate = (\n measurements: UserWeightsByDate | UserSleepsByDate | UserStressByDate,\n date: string\n): number | undefined => {\n const measurementOnDate = measurements[date];\n\n if (!measurementOnDate) return undefined;\n\n const orderedMeasurements = _.orderBy(measurementOnDate, \"created_at\", \"desc\");\n\n const measurement = _.head(orderedMeasurements);\n\n if (!measurement) {\n return undefined;\n }\n\n if (typeof measurement === \"number\") {\n return measurement;\n }\n\n // The compiler is acting strangely here and we override it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const measurementValue = measurement.value;\n\n switch (measurementValue) {\n case \"VERY_LOW\":\n return 1;\n case \"LOW\":\n return 2;\n case \"MEDIUM\":\n return 3;\n case \"HIGH\":\n return 4;\n case \"VERY_HIGH\":\n return 5;\n default:\n return measurementValue;\n }\n};\n\nexport function getOrganisation(user: User): Organisation | undefined {\n return user?.coach?.organisation || user?.organisation;\n}\n\nexport function getKcalPerSession(\n exerciseTemplateIdRaw: number | string,\n minutesPerSession: number,\n weight: number,\n exerciseTemplates?: ExerciseTemplate[]\n): number {\n const exerciseTemplateId = Number(exerciseTemplateIdRaw);\n const exerciseTemplate = _.find(exerciseTemplates, { id: exerciseTemplateId });\n\n if (!exerciseTemplate || typeof exerciseTemplate === \"number\") return 0;\n\n const kcalPerMin: number = exerciseTemplate.kcal_per_kg_per_min;\n\n return kcalPerMin * weight * minutesPerSession;\n}\n\nexport const getUserSubscriptionStatus = (user: User): DjstripeSubscriptionStatusEnum[] | undefined => {\n let customer: DjstripeCustomer | undefined;\n\n if (user?.is_coach) {\n customer = _.first(user.customer);\n } else {\n return undefined;\n }\n\n const statuses = _.map(customer?.subscriptions, \"status\");\n\n if (_.isEmpty(statuses)) {\n return undefined;\n }\n\n return statuses;\n};\n\nconst INVALID_SUBSCRIPTION_STATUSES: DjstripeSubscriptionStatusEnum[] = [\n \"canceled\",\n \"unpaid\",\n \"incomplete_expired\",\n // Note: The status \"paused\" is still beta (but we use it in production) and not supported by djstripe\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \"paused\",\n];\n\nexport const userAccountIsDisabledOrHasInValidSubscription = (user: User | null): boolean => {\n if (!user) {\n return false;\n }\n\n if (user.payment_status_override === true) {\n // Always allow the user to login if payment_status_override is set to true\n return false;\n }\n\n if (!user.account_enabled || (user.coach && !user.coach?.account_enabled)) {\n return true;\n }\n\n const statuses = getUserSubscriptionStatus(user);\n\n if (!statuses || _.isEmpty(statuses)) {\n return false;\n }\n\n const isStatusInvalid = (status: DjstripeSubscriptionStatusEnum): boolean =>\n INVALID_SUBSCRIPTION_STATUSES.includes(status);\n\n const validStatuses = _.reject(statuses, isStatusInvalid);\n\n return _.isEmpty(validStatuses);\n};\n\n// Stripe subscriptions\n\n/**\n * If customer is trialing (on any subscription)\n */\nexport function doesCustomerHaveAnyTrialingSubscriptions(user: User): boolean {\n return _.some(user?.customer?.[0]?.subscriptions, { status: \"trialing\" });\n}\n\nconst SELF_SERVICE_PRODUCT_STRIPE_ID = \"prod_MlNaQY9hwHvdKS\";\nconst SELF_SERVICE_PRODUCT_STRIPE_IDS = [\n // Live mode\n SELF_SERVICE_PRODUCT_STRIPE_ID,\n // Test mode\n \"prod_Ml1OptlpTI1FH7\",\n];\nconst LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_ID = \"prod_MlNaQY9hwHvdKS\";\nconst LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_IDS = [\n // Live mode\n LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_ID,\n // Test mode\n \"prod_LYTjPIADGXfoDd\",\n];\n\nfunction isCustomerOnOurSelfServicePlan(user: User): boolean {\n // eslint-disable-next-line no-restricted-syntax\n for (const subscription of user?.customer?.[0]?.subscriptions || []) {\n // eslint-disable-next-line no-restricted-syntax\n for (const item of subscription.items) {\n if (item.plan.product && SELF_SERVICE_PRODUCT_STRIPE_IDS.includes(item.plan.product)) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nfunction doesCustomerHaveValidSubscription(user: User, product: string): boolean {\n // NOTE: The compiler does not work well with lodash filter and typescript\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // const matchingSubscriptions: DjstripeSubscription[] = _.filter(user?.customer?.[0]?.subscriptions, {\n // plan: { product },\n // });\n const matchingSubscriptions: DjstripeSubscription[] = _.filter(\n user?.customer?.[0]?.subscriptions,\n // (subscription) => subscription?.plan?.product === product\n (subscription) => {\n _.some(subscription?.items, (item) => item.plan.product === product);\n }\n );\n\n const isAnySubscriptionAValidSubscription = _.some(\n matchingSubscriptions,\n (subscription) => !_.includes(INVALID_SUBSCRIPTION_STATUSES, subscription.status)\n );\n\n return isAnySubscriptionAValidSubscription;\n}\n\n/**\n * Note that this fails open to ensure no-one is accidentally blocked.\n * @param user\n * @returns\n */\nexport function shouldB2CCustomerHavePaidAccess(user: User | null): boolean {\n if (!user) {\n return true;\n }\n\n if (user.payment_status_override === true) {\n return true;\n }\n\n if (!isFeatureFlagActive(user, FeatureFlagProper.FF_B2C_PAYWALL)) {\n return true;\n }\n\n if (!user.coach) {\n return true;\n }\n\n if (!user.coach.organisation) {\n return true;\n }\n\n if (!user.coach.organisation.product_stripe_id) {\n return true;\n }\n\n if (!user.customer) {\n return true;\n }\n\n const hasNoSubscriptions = !user.customer?.[0]?.subscriptions || user.customer[0].subscriptions.length === 0;\n if (hasNoSubscriptions) {\n return true;\n }\n\n const isAnySubscriptionAValidSubscription = _.some(\n user?.customer?.[0]?.subscriptions,\n (subscription) => !_.includes(INVALID_SUBSCRIPTION_STATUSES, subscription.status)\n );\n\n return isAnySubscriptionAValidSubscription;\n}\n\nexport function shouldCustomerHaveAccessToAccountManagementFunctionality(user: User): boolean {\n return (\n // doesCustomerHaveValidSubscription(user, LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_ID) ||\n _.some(LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_IDS, (productId) =>\n doesCustomerHaveValidSubscription(user, productId)\n ) || isCustomerOnOurSelfServicePlan(user)\n );\n}\n\nexport function shouldShowCustomBrandingHeader(user: User): boolean {\n return Boolean(user?.coach.organisation && user?.coach.organisation?.logo_visible);\n}\n\nexport function isUserDiy(user: User): boolean {\n return Boolean(getOrganisation(user)?.clients_are_diy);\n}\n\nexport function hasUserCompletedTheirDiyNutritionPlanningFormCompletely(user: User): boolean {\n return Boolean(user?.intake && user?.intake.weekly_nutrition_plan);\n}\n\nexport const getHostname = (): string => window.location.hostname;\n\n/**\n * We host customer portals on subdomains of our main domain.\n * This function checks if we are on a subdomain of our main domain and\n * therefore should do the logic for a customer portal\n *\n * @param hostname ie, \"trainmore.weekmeals.co\"\n * @returns\n */\nexport function getManagedCustomerPortalSubdomain(hostname: string): string {\n if (SUBDOMAIN_OVERRIDE && !PRODUCTION) {\n // This is for development purposes\n return SUBDOMAIN_OVERRIDE;\n }\n\n const parsedDomain = parse(hostname);\n\n const { subdomain } = parsedDomain;\n\n // Ignore PR branch subdomains\n if (subdomain && subdomain.startsWith(\"pr-\") && hostname.includes(\"amplifyapp.com\")) {\n return \"\";\n }\n\n if (subdomain === \"www\" || subdomain === \"app\") {\n return \"\";\n }\n\n return subdomain || \"\";\n}\n\n/**\n * DEPRECATED: We now use groups to manage feature flags. This is here for legacy compatibility.\n * @param organisation\n * @param flag\n * @returns\n */\nexport enum FeatureFlag {\n // eslint-disable-next-line no-unused-vars\n DisableProductLogging = \"feature_flag_disable_product_logging\",\n}\n\n/**\n * DEPRECATED: We now use groups to manage feature flags. This is here for legacy compatibility.\n * @param organisation\n * @param flag\n * @returns\n */\nexport function isFeatureFlagEnabled(organisation: Organisation | null | undefined, flag: FeatureFlag): boolean {\n if (!organisation) return false;\n return _.get(organisation, flag, false);\n}\n\nexport function doesOrganisationHaveManagedPlanning(organisation: Organisation): boolean {\n return Boolean(organisation?.clients_are_diy);\n}\n\nexport function isUserInPaymentRequiredOrganisation(user: User): boolean {\n if (user.payment_status_override === true) {\n return false;\n }\n\n const organisation = getOrganisation(user);\n\n // FIXME: We are hardcoding this for now\n return organisation?.subdomain?.toLowerCase() === \"killerbody\";\n // return Boolean(organisation?.payment_required);\n}\n\n/**\n * DEPRECATED: We now use groups to manage feature flags. This is here for legacy compatibility.\n * @param organisation\n * @returns\n */\nexport function shouldHaveAccessToGenerateMeals(organisation: Organisation | null | undefined): boolean {\n if (!organisation) return false;\n return organisation.feature_flag_generate_meals_button_in_planner || false;\n}\n\n/**\n * DEPRECATED: We now use groups to manage feature flags. This is here for legacy compatibility.\n * @param user\n * @returns\n */\nexport function shouldHaveAccessToCreateYourOwnRecipes(user: User): boolean {\n const organisation = getOrganisation(user);\n\n if (!organisation) return false;\n\n return organisation.feature_flag_create_your_own_recipes || false;\n}\n\nexport function organisationIsDiyBillingForUsers(user: User): boolean {\n // If the organisation has a product set then we are billing for users\n return Boolean(user?.coach?.organisation?.product_stripe_id);\n}\n\n/**\n * DEPRECATED: We now use groups to manage feature flags. This is here for legacy compatibility.\n * @param organisation\n * @returns\n */\nexport function areWeAnOpinionatedRecipeInspirationApp(organisation: Organisation | null): boolean {\n return isFeatureFlagEnabled(organisation, FeatureFlag.DisableProductLogging);\n}\n\nconst HIGH_PROTEIN_ORGS = [\"trainmore\", \"clubsportive\", \"pimklement\", \"happyhealthy\", \"bamifit\", \"alexarciab\"];\n\nexport function isHighProteinOrganisation(): boolean {\n const subdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n // NOTE: app and www are \"\"\n if (!subdomain) return true;\n\n return HIGH_PROTEIN_ORGS.includes(subdomain.toLowerCase());\n}\n\nexport function isLowProteinOrganisation(): boolean {\n return !isHighProteinOrganisation();\n}\n\n// TODO: Note that this is temporary to allow testing in production with an app that is not yet released.\n// Once testing is complete, we should remove this function.\nexport function isImperialUnitsAllowedOrganisation(): boolean {\n const subdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n return subdomain.toLowerCase() === \"alexarciab\";\n}\n\nexport function isKillerbodySubdomain(): boolean {\n const subdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n return subdomain.toLowerCase() === \"killerbody\";\n}\n\nexport function isBamifitSubdomain(): boolean {\n const subdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n return subdomain.toLowerCase() === \"bamifit\";\n}\n\n/**\n * Calculates the current day of the menstrual cycle for a user\n * @param onboardingState The onboarding state object\n * @param date Optional date to calculate for (defaults to today)\n * @returns Number representing the current day of the cycle (1-based), or null if not applicable/not enough data\n */\nexport function getCurrentMenstrualCycleDay(onboardingState: OnboardingState, date?: Date): number | null {\n if (!onboardingState.menstrualCycle) return null;\n\n const {\n biometricData: { gender },\n menstrualCycle: { lastMenstrualPeriodStartDate, menstrualCycleLength },\n } = onboardingState;\n\n // Return null for users where menstrual cycle is not relevant\n if (gender !== \"FEMALE\") return null;\n\n // Return null if we don't have the necessary data to calculate\n if (!lastMenstrualPeriodStartDate || !menstrualCycleLength) return null;\n\n const lastPeriodDate = new Date(lastMenstrualPeriodStartDate);\n const targetDate = date || new Date();\n\n // Calculate days since last period\n const daysSinceLastPeriod = Math.floor((targetDate.getTime() - lastPeriodDate.getTime()) / (1000 * 60 * 60 * 24));\n\n // Calculate current day in cycle (1-based)\n const currentDayInCycle = (daysSinceLastPeriod % menstrualCycleLength) + 1;\n\n return currentDayInCycle;\n}\n\n/**\n * Calculates the date of the next menstruation for a user\n * @param onboardingState The onboarding state object\n * @param date Optional date to calculate from (defaults to today)\n * @returns Date object representing the next menstruation start date, or null if not applicable/not enough data\n */\nexport function dateOfNextMenstruation(onboardingState: OnboardingState, date?: Date): Date | null {\n if (!onboardingState.menstrualCycle) return null;\n\n const {\n biometricData: { gender },\n menstrualCycle: { lastMenstrualPeriodStartDate, menstrualCycleLength },\n } = onboardingState;\n\n // Return null for users where menstrual cycle is not relevant\n if (gender !== \"FEMALE\") return null;\n\n // Return null if we don't have the necessary data to calculate\n if (!lastMenstrualPeriodStartDate || !menstrualCycleLength) return null;\n\n const lastPeriodDate = new Date(lastMenstrualPeriodStartDate);\n const targetDate = date || new Date();\n\n // Calculate days since last period\n const daysSinceLastPeriod = Math.floor((targetDate.getTime() - lastPeriodDate.getTime()) / (1000 * 60 * 60 * 24));\n\n // Calculate how many complete cycles have passed\n const completeCycles = Math.floor(daysSinceLastPeriod / menstrualCycleLength);\n\n // Calculate the next cycle start date\n const nextMenstruationDate = new Date(lastPeriodDate);\n nextMenstruationDate.setDate(lastPeriodDate.getDate() + (completeCycles + 1) * menstrualCycleLength);\n\n // If the next date is in the past (which shouldn't happen but just to be safe),\n // add another cycle\n if (nextMenstruationDate <= targetDate) {\n nextMenstruationDate.setDate(nextMenstruationDate.getDate() + menstrualCycleLength);\n }\n\n return nextMenstruationDate;\n}\n\n/**\n * Calculates the number of days of menstruation based on onboarding data\n * @param onboardingState The onboarding state object\n * @returns Number of menstruation days, or default value (5) if not enough data\n */\nexport function getNumberOfDaysOfMenstruation(onboardingState: OnboardingState): number {\n // We no longer track the last day of menstruation so we just return 5 here\n return 5;\n}\n\n/**\n * Gets menstrual cycle diagram props from onboarding state\n * @param onboardingState The onboarding state object\n * @param date Optional date to calculate for (defaults to today)\n * @returns Props for rendering a menstrual cycle diagram\n */\nexport function getMenstrualCycleProps(onboardingState: OnboardingState, date?: Date): MenstrualCycleDiagramProps {\n const nextPeriodDate = dateOfNextMenstruation(onboardingState, date);\n const targetDate = date || new Date();\n\n // Calculate days until next period if we have a valid date\n const daysUntilNextPeriod = nextPeriodDate\n ? Math.ceil((nextPeriodDate.getTime() - targetDate.getTime()) / (1000 * 60 * 60 * 24))\n : 28;\n\n return {\n numberOfDaysInCycle: onboardingState.menstrualCycle?.menstrualCycleLength || 28,\n numberOfMenstruationDays: getNumberOfDaysOfMenstruation(onboardingState),\n currentDayInCycle: getCurrentMenstrualCycleDay(onboardingState, date) || 1,\n daysUntilNextPeriod,\n };\n}\n\n/**\n * Gets menstrual cycle diagram props from a user object\n * @param user The user object\n * @param date Optional date to calculate for (defaults to today)\n * @returns Props for rendering a menstrual cycle diagram\n */\nexport function getMenstrualCyclePropsFromUser(user: User, date?: Date): MenstrualCycleDiagramProps | undefined {\n if (!user.intake) {\n return undefined;\n }\n\n const onboardingState = createOnboardingState(user.intake);\n\n return getMenstrualCycleProps(onboardingState, date);\n}\n\n/**\n * Enum representing different phases of the menstrual cycle\n * FIXME: Once the backend is updated we should use the generated types\n */\nexport enum MenstrualCyclePhase {\n Menstruation = \"Menstruation\",\n Follicular = \"Follicular\",\n Ovulation = \"Ovulation\",\n Luteal = \"Luteal\",\n}\n\n/**\n * Determines which phase of the menstrual cycle a user is currently in\n * @param onboardingState The onboarding state object\n * @param date Optional date to calculate for (defaults to today)\n * @returns The current menstrual cycle phase, or undefined if not applicable\n */\nexport function getCurrentMenstrualCyclePhase(\n onboardingState: OnboardingState,\n date?: Date\n): MenstrualCyclePhase | undefined {\n if (!onboardingState.menstrualCycle) return undefined;\n\n const {\n biometricData: { gender },\n menstrualCycle: { lastMenstrualPeriodStartDate, menstrualCycleLength },\n } = onboardingState;\n\n // Return undefined for users where menstrual cycle is not relevant\n if (gender !== \"FEMALE\") return undefined;\n\n // Return undefined if we don't have the necessary data to calculate\n if (!lastMenstrualPeriodStartDate || !menstrualCycleLength) return undefined;\n\n const currentDay = getCurrentMenstrualCycleDay(onboardingState, date);\n if (currentDay === null) return undefined;\n\n const menstruationDays = getNumberOfDaysOfMenstruation(onboardingState);\n\n // Calculate phase boundaries\n // Typically, ovulation occurs around day 14 in a 28-day cycle, so we adjust proportionally\n const ovulationDay = Math.round(menstrualCycleLength / 2);\n const ovulationPhaseStart = ovulationDay - 1;\n const ovulationPhaseEnd = ovulationDay + 1;\n\n // Determine cycle phase\n if (currentDay <= menstruationDays) {\n return MenstrualCyclePhase.Menstruation;\n }\n if (currentDay < ovulationPhaseStart) {\n return MenstrualCyclePhase.Follicular;\n }\n if (currentDay >= ovulationPhaseStart && currentDay <= ovulationPhaseEnd) {\n return MenstrualCyclePhase.Ovulation;\n }\n return MenstrualCyclePhase.Luteal;\n}\n\n/**\n * Determines which phase of the menstrual cycle a user is currently in\n * @param user The user object\n * @param date Optional date to calculate for (defaults to today)\n * @returns The current menstrual cycle phase, or undefined if not applicable\n */\nexport function getCurrentMenstrualCyclePhaseFromUser(user: User, date?: Date): MenstrualCyclePhase | undefined {\n if (!user.intake) {\n return undefined;\n }\n\n const onboardingState = createOnboardingState(user.intake);\n return getCurrentMenstrualCyclePhase(onboardingState, date);\n}\n\nexport function doesTheUserHaveMenstrualPlanSet(user: User): boolean {\n return Boolean(user.intake?.last_menstrual_period_start_date);\n}\n\n/**\n * Determines if the user has a plant-based diet (vegan or vegetarian)\n * @param dietaryPreference The user's dietary preference\n * @returns True if the user has a vegan or vegetarian diet\n */\nexport function isPlantBasedDiet(dietaryPreference: DietaryPreference | undefined): boolean {\n return dietaryPreference === DietaryPreferenceEnum.VEGAN || dietaryPreference === DietaryPreferenceEnum.VEGETARIAN;\n}\n","/* eslint-disable */\n// @ts-nocheck\n\nimport { ENVIRONMENT } from \"../constants\";\n\nconsole.log(`Loading the Datadog snippet, env=\"${ENVIRONMENT}\"`);\n\nif (!(\"Cypress\" in window)) {\n // prettier-ignore\n (function(h,o,u,n,d) {\n h=h[d]=h[d]||{q:[],onReady:function(c){h.q.push(c)}}\n d=o.createElement(u);d.async=1;d.src=n\n n=o.getElementsByTagName(u)[0];n.parentNode.insertBefore(d,n)\n })(window,document,'script','https://www.datadoghq-browser-agent.com/eu1/v5/datadog-rum.js','DD_RUM')\n window.DD_RUM.onReady(function () {\n window.DD_RUM.init({\n clientToken: \"pub374256038657c928b2b3cbcbac1fa41c\",\n applicationId: \"cfb1e442-3a78-40fc-854c-4b0583a764f5\",\n site: \"datadoghq.eu\",\n service: \"nutriai-(js)\",\n env: ENVIRONMENT,\n // Specify a version number to identify the deployed version of your application in Datadog\n // version: '1.0.0',\n sessionSampleRate: 100,\n sessionReplaySampleRate: 100,\n trackUserInteractions: true,\n trackResources: true,\n trackLongTasks: true,\n defaultPrivacyLevel: \"allow\",\n allowedTracingUrls: [\"*\"],\n });\n });\n} else {\n console.log(\"Cypress detected, skipping Datadog snippet\");\n}\n","import * as React from \"react\";\nimport Svg, { G, Path } from \"react-native-svg\";\n\nconst DiaryImageUnselected = (\n // NOTE: The @ts-ignores are due to a typescript compiler error which I believe is fixed by the next version of React\n // https://github.com/react-native-svg/react-native-svg/issues/1741\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n);\n\nconst DiaryImageSelected = (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n);\n\nconst GroceriesImageUnselected = (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n);\n\nconst GroceriesImageSelected = (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n);\n\nconst ProfileAvatarSvg = (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n \n);\n\n/* eslint-disable global-require */\nexport default {\n // App icon\n NutriAIIcon: require(\"../../../assets/icon.png\"),\n PadlockIcon: require(\"../resources/images/padlock.png\"),\n\n LoginBackground: require(\"../../../assets/login-background.png\"),\n\n // icons\n CheckIcon: require(\"../resources/icons/CheckedIcon.png\"),\n UncheckedIcon: require(\"../resources/icons/UnCheckedIcon.png\"),\n EyeIcon: require(\"../resources/eyeIcon.png\"),\n WeekmealsLogo: require(\"../resources/logo.png\"),\n OnBoardingIcon1: require(\"../resources/Icon1.png\"),\n OnBoardingIcon2: require(\"../resources/Icon2.png\"),\n OnBoardingIcon3: require(\"../resources/Icon3.png\"),\n OnBoardingIcon4: require(\"../resources/Icon4.png\"),\n EmailConfirmedIcon: require(\"../resources/emailConfimedIcon.png\"),\n EmailSentIcon: require(\"../resources/emailSent.png\"),\n AvatarIcon1: require(\"../resources/Avatar.png\"),\n HeaderIcon: require(\"../resources/welcome.png\"),\n BicycleIcon: require(\"../resources/bicycle.png\"),\n LiftIcon: require(\"../resources/lift.png\"),\n PencilIcon: require(\"../resources/pencil.png\"),\n FoodIcon1: require(\"../resources/FoodIcon1.png\"),\n FoodIcon2: require(\"../resources/FoodIcon2.png\"),\n FoodIcon3: require(\"../resources/FoodIcon3.png\"),\n InfoIcon: require(\"../resources/infoIcon.png\"),\n PlusIconWhite: require(\"../../../assets/PlusIcon.png\"),\n QuickIcon: require(\"../../../assets/Quick.png\"),\n CrossIcon: require(\"../../../assets/cross.png\"),\n AddProductIcon: require(\"../../../assets/addProduct.png\"),\n ScanProductIcon: require(\"../../../assets/scanProduct.png\"),\n GridIcon: require(\"../../../assets/gridIcon.png\"),\n Dropdown_Icon: require(\"../../../assets/dropDown.png\"),\n RecipesIcon: require(\"../../../assets/recipes.png\"),\n DefaultRecipeImage: require(\"../../../assets/default_recipe_icon.png\"),\n DefaultSpinner: require(\"../../../assets/loading.gif\"),\n DiaryImageUnselected,\n DiaryImageSelected,\n GroceriesImageUnselected,\n GroceriesImageSelected,\n ProfileAvatarSvg,\n AvatarIcon2: require(\"../../../assets/avatar.png\"),\n ProfileStart: require(\"../resources/profileStart.png\"),\n ProfileAvatar: require(\"../resources/profileAvatar.png\"),\n BackIcon: require(\"../resources/BackIcon.png\"),\n CloseIcon: require(\"../resources/CloseIcon.png\"),\n QuestionMarkIcon: require(\"../resources/icons/QuestionMarkIcon.png\"),\n FilterIcon: require(\"../resources/icons/Filter.png\"),\n InstagramIcon: require(\"../resources/icons/InstagramIcon.png\"),\n\n PencilIconWhite: require(\"../resources/PencilIconWhite.png\"),\n ForkKnifeIcon: require(\"../resources/icons/Forkknife.png\"),\n ForkKnifeWhiteIcon: require(\"../resources/icons/ForkKnifeWhite.png\"),\n MicroscopeIcon: require(\"../resources/icons/Microscope.png\"),\n MicroscopeWhiteIcon: require(\"../resources/icons/MicroscopeWhite.png\"),\n CalendarCheckIcon: require(\"../resources/icons/CalendarCheck.png\"),\n CalendarCheckWhiteIcon: require(\"../resources/icons/CalendarCheckWhite.png\"),\n CheckListIcon: require(\"../resources/icons/Checklist.png\"),\n ChecklistWhiteIcon: require(\"../resources/icons/ChecklistWhite.png\"),\n CheckWhite: require(\"../resources/icons/CheckWhite.png\"),\n PlusIconGreen: require(\"../resources/icons/PlusIconGreen.png\"),\n AddMore: require(\"../resources/icons/AddMore.png\"),\n ListDotIcon: require(\"../resources/ListDot.png\"),\n KebabIcon: require(\"../resources/KebabIcon.png\"),\n FloatingButtonIcon: require(\"../resources/FloatingButton.png\"),\n PlusIcon: require(\"../resources/icons/Plus.png\"),\n MinusIcon: require(\"../resources/icons/Minus.png\"),\n TickIcon: require(\"../resources/icons/CheckBlue.png\"),\n ClockIcon: require(\"../resources/icons/Clock.png\"),\n ClockGraIcon: require(\"../resources/icons/ClockGray.png\"),\n NextButtonGreen: require(\"../resources/icons/NextButtonGreen.png\"),\n CheckCircleIcon: require(\"../resources/icons/CheckCircle.png\"),\n MenuIcon: require(\"../resources/icons/Menu.png\"),\n MenuOption: require(\"../resources/icons/MenuOption.png\"),\n CloseIconCircle: require(\"../resources/icons/CloseIconCircle.png\"),\n LikeIconUnchecked: require(\"../resources/icons/LikeIconUnchecked.png\"),\n LikeIconChecked: require(\"../resources/icons/LikeIconChecked.png\"),\n SwapIngredient: require(\"../resources/icons/SwapIngredient.png\"),\n SpinnerPlus: require(\"../resources/icons/SpinnerPlus.png\"),\n SpinnerMinus: require(\"../resources/icons/SpinnerMinus.png\"),\n LightbulbGreen: require(\"../resources/icons/LightbulbGreen.png\"),\n BarcodeScan: require(\"../resources/icons/BarcodeScan.png\"),\n SearchGray: require(\"../resources/icons/SearchGray.png\"),\n AddClient: require(\"../resources/icons/AddClient.png\"),\n BMR: require(\"../resources/icons/BMR.png\"),\n Cardio: require(\"../resources/icons/Cardio.png\"),\n Digestion: require(\"../resources/icons/Digestion.png\"),\n LifeStyle: require(\"../resources/icons/LifeStyle.png\"),\n\n // images\n Avatar: require(\"../resources/Avatar.png\"),\n CategoryMostChosen: require(\"../resources/images/CategoryMostChosen.png\"),\n CategoryFavourite: require(\"../resources/images/CategoryFavorite.png\"),\n CategoryOwnRecipe: require(\"../resources/images/CategoryOwnRecipe.png\"),\n CategoryBrood: require(\"../resources/images/CategoryBrood.png\"),\n Recipe1: require(\"../resources/images/Recipe1.png\"),\n Recipe2: require(\"../resources/images/Recipe2.png\"),\n Recipe3: require(\"../resources/images/Recipe3.png\"),\n Recipe4: require(\"../resources/images/Recipe4.png\"),\n Recipe5: require(\"../resources/images/Recipe5.png\"),\n Recipe6: require(\"../resources/images/Recipe6.png\"),\n BlobImage: require(\"../resources/images/Blob.png\"),\n OwnRecipe1: require(\"../resources/images/Recipe_Quarkblueberries.png\"),\n OwnRecipe2: require(\"../resources/images/Recipe_sandwich.png\"),\n HomeFoodImage1: require(\"../resources/homeFoodImage1.png\"),\n Timer: require(\"../resources/timer.png\"),\n WhiteBackground: require(\"../resources/whitebackground.png\"),\n SearchIcon: require(\"../resources/searchIcon.png\"),\n Diary1: require(\"../resources/diary1.png\"),\n CircularCheckedIcon: require(\"../resources/circularcheckedIcon.png\"),\n UncheckedCircularIcon: require(\"../resources/uncheckedCircularIcon.png\"),\n AngryIcon: require(\"../resources/angry.png\"),\n SadIcon: require(\"../resources/sad.png\"),\n OkIcon: require(\"../resources/ok.png\"),\n SatisfiedIcon: require(\"../resources/satisfied.png\"),\n HappyIcon: require(\"../resources/happy.png\"),\n RightIcon: require(\"../resources/rightIcon.png\"),\n SettingIcon: require(\"../resources/setting.png\"),\n HumanIcon: require(\"../resources/humanIcon.png\"),\n PerfectPerformance: require(\"../resources/images/PerfectPerformance.png\"),\n MagicLink: require(\"../resources/magicLink.png\"),\n EmailIcon: require(\"../resources/emailIcon.png\"),\n MeditationIcon: require(\"../resources/meditationIcon.png\"),\n EditPencilIcon: require(\"../resources/editIcon.png\"),\n\n HappyAvoImage: require(\"../resources/images/happyAvo.png\"),\n\n MenstrualLutealPhase: require(\"../resources/images/MenstrualLutealPhase.jpg\"), // TODO: replace this\n MenstrualFollicularPhase: require(\"../resources/images/MenstrualFollicularPhase.jpg\"), // TODO: replace this\n};\n","/* eslint-disable */\n// @ts-nocheck\n\nimport { getFbPixelIdForSubdomain } from \"../helpers/analyticsHelpers\";\n\n// Get the Facebook Pixel ID for the current subdomain\nconst FB_PIXEL_ID = getFbPixelIdForSubdomain();\n\n// Only load the Facebook Pixel if we have a valid ID\nif (FB_PIXEL_ID) {\n // Facebook Pixel base code\n !(function (f, b, e, v, n, t, s) {\n if (f.fbq) return;\n n = f.fbq = function () {\n n.callMethod ? n.callMethod.apply(n, arguments) : n.queue.push(arguments);\n };\n if (!f._fbq) f._fbq = n;\n n.push = n;\n n.loaded = !0;\n n.version = \"2.0\";\n n.queue = [];\n t = b.createElement(e);\n t.async = !0;\n t.src = v;\n s = b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t, s);\n })(window, document, \"script\", \"https://connect.facebook.net/en_US/fbevents.js\");\n\n // Initialize with the subdomain-specific pixel ID\n fbq(\"init\", FB_PIXEL_ID);\n fbq(\"track\", \"PageView\");\n\n console.log(`Facebook Pixel initialized with ID: ${FB_PIXEL_ID}`);\n} else {\n console.log(\"No Facebook Pixel ID found for this subdomain. Pixel not loaded.\");\n}\n","import type {\n BaseQueryFn,\n FetchArgs,\n FetchBaseQueryError,\n FetchBaseQueryMeta,\n MutationDefinition,\n} from \"@reduxjs/toolkit/dist/query\";\n// eslint-disable-next-line import/no-unresolved\nimport type { MutationTrigger } from \"@reduxjs/toolkit/dist/query/react/buildHooks\";\nimport type { JsonMap } from \"@segment/analytics-react-native\";\nimport type { ImageSourcePropType } from \"react-native\";\n\nimport type { RecipeCategory, RecipeTag } from \"../constants/data\";\nimport type { TAGS } from \"../services/backendApi\";\nimport type {\n CalendarDay,\n CalendarItem,\n DietEnum as DietaryPreference,\n FoodIngredientCreateApiArg,\n FoodQuickAddMealCreateApiArg,\n FoodSingleFoodMealCreateApiArg,\n IngredientPost,\n MainGoalEnum,\n MealMomentEnum as MealMoment,\n MealSlotSpecification,\n NutritionDayPlan,\n PlannerAutoPlanDaysCreateApiArg,\n PlannerCalendarDayCreateApiArg,\n PlannerCalendarItemCreateApiArg,\n PlannerPlanSingleFoodMealCreateApiArg,\n PlanSingleFoodMeal,\n QuickAddMeal,\n SetIngredientToAvoid,\n SingleFoodMeal,\n User,\n UserProfile,\n UsersMealSlotSpecificationCreateApiArg,\n UsersNutritionDayPlanCreateApiArg,\n UsersSetIngredientsToAvoidCreateApiArg,\n UsersUserProfileCreateApiArg,\n UsersUserProfileUpdateApiArg,\n UsersWeeklyNutritionPlanCreateApiArg,\n UsersWeeklyNutritionPlanUpdateApiArg,\n WeeklyNutritionPlanCreate,\n WeeklyNutritionPlanUpdate,\n} from \"../services/backendTypes\";\n\n// FIXME: Use types from generated API file where possible.\ntype MacroName = \"kcal\" | \"fat\" | \"carbohydrates\" | \"protein\";\n\nenum Macros {\n KCAL = \"KCAL\",\n FAT = \"FAT\",\n CARBOHYDRATES = \"CARBOHYDRATES\",\n PROTEIN = \"PROTEIN\",\n // TODO: Fiber?\n}\n\ntype MacroOrG = MacroName | \"g\";\n\n// FIXME: rename ro MacroDetail\ntype RecipeMacrosItemType = {\n id?: string;\n macroName: MacroName;\n unit: MacroOrG;\n total: number;\n progress?: number;\n};\n\ntype IngredientType = {\n id: number;\n name: string;\n optional?: boolean;\n quantity?: number;\n object_id?: number;\n unit?: string;\n kcal?: number;\n protein: number;\n};\n\ntype NutritionType = {\n calories: string;\n fat: string;\n protein: string;\n carbohydrates: string;\n};\n\ntype RecipeItemType = {\n id?: number;\n label: string;\n image: ImageSourcePropType;\n longName?: string;\n prepTime?: number;\n ingredients?: RecipeMacrosItemType[];\n recipeMacros: RecipeMacrosItemType[];\n};\n\ntype RecipeTagOrCategory = RecipeCategory | RecipeTag | \"CREATE_RECIPE\";\n\ntype BaseCategoryFilter = {\n id: string;\n label: string;\n value: RecipeTagOrCategory;\n};\n\ntype ImageCategoryFilter = BaseCategoryFilter & {\n type: \"image\";\n image: ImageSourcePropType;\n};\n\ntype EmojiCategoryFilter = BaseCategoryFilter & {\n type: \"emoji\";\n emoji: string;\n};\n\ntype CategoryFilter = ImageCategoryFilter | EmojiCategoryFilter;\n\nenum GenderEnum {\n MALE = \"MALE\",\n FEMALE = \"FEMALE\",\n}\n\nenum ActivityEnum {\n SEDENTARY = \"SEDENTARY\",\n MILDLY_ACTIVE = \"MILDLY_ACTIVE\",\n ACTIVE = \"ACTIVE\",\n VERY_ACTIVE = \"VERY_ACTIVE\",\n}\n\nenum SustainabilityEnum {\n SUSTAINABLE = \"SUSTAINABLE\",\n OPTIMAL = \"OPTIMAL\",\n}\n\nenum DietEnum {\n VEGAN = \"VEGAN\",\n LACTO_VEGETARIAN = \"LACTO_VEGETARIAN\",\n OVO_VEGETARIAN = \"OVO_VEGETARIAN\",\n VEGETARIAN = \"VEGETARIAN\",\n PESCATARIAN = \"PESCATARIAN\",\n OMNIVORE = \"OMNIVORE\",\n}\n\nexport const DietaryPreferenceEnum: Record = {\n HALAL: \"HALAL\",\n LACTO_VEGETARIAN: \"LACTO_VEGETARIAN\",\n OMNIVORE: \"OMNIVORE\",\n OVO_VEGETARIAN: \"OVO_VEGETARIAN\",\n PESCATARIAN: \"PESCATARIAN\",\n VEGAN: \"VEGAN\",\n VEGETARIAN: \"VEGETARIAN\",\n};\n\nexport type WeeklyGoal =\n | \"LOSE_0_25_KG_PER_WEEK\"\n | \"LOSE_0_5_KG_PER_WEEK\"\n | \"LOSE_0_75_KG_PER_WEEK\"\n | \"LOSE_1_KG_PER_WEEK\";\n\nexport const WeeklyGoalEnum: Record = {\n LOSE_0_25_KG_PER_WEEK: \"LOSE_0_25_KG_PER_WEEK\",\n LOSE_0_5_KG_PER_WEEK: \"LOSE_0_5_KG_PER_WEEK\",\n LOSE_0_75_KG_PER_WEEK: \"LOSE_0_75_KG_PER_WEEK\",\n LOSE_1_KG_PER_WEEK: \"LOSE_1_KG_PER_WEEK\",\n};\n\nenum Stress {\n VERY_LOW = \"VERY_LOW\",\n LOW = \"LOW\",\n MEDIUM = \"MEDIUM\",\n HIGH = \"HIGH\",\n VERY_HIGH = \"VERY_HIGH\",\n}\n\nenum MeasurementType {\n WEIGHT = \"WEIGHT\",\n SLEEP = \"SLEEP\",\n STRESS = \"STRESS\",\n WAIST_CIRCUMFERENCE = \"WAIST_CIRCUMFERENCE\",\n}\n\n// TODO: Can this be computed from the generated file or taken from Moment.js?\ntype DayOfWeekString = \"monday\" | \"tuesday\" | \"wednesday\" | \"thursday\" | \"friday\" | \"saturday\" | \"sunday\";\n\ntype ClientType = {\n id?: number;\n initials: string;\n fullName: string;\n bgColor?: string;\n textColor?: string;\n};\n\nenum ClientsFilterState {\n \"ACTIVE_CLIENTS\" = \"ACTIVE_CLIENTS\",\n \"DEACTIVATED_CLIENTS\" = \"DEACTIVATED_CLIENTS\",\n}\n\n// Generated functions\n\ntype PlannerCalendarDayCreate = MutationTrigger<\n MutationDefinition<\n PlannerCalendarDayCreateApiArg,\n BaseQueryFn,\n never,\n CalendarDay,\n \"api\"\n >\n>;\n\ntype PlannerCalendarItemCreate = MutationTrigger<\n MutationDefinition<\n PlannerCalendarItemCreateApiArg,\n BaseQueryFn,\n never,\n CalendarItem,\n \"api\"\n >\n>;\n\ntype FoodIngredientCreate = MutationTrigger<\n MutationDefinition<\n FoodIngredientCreateApiArg,\n BaseQueryFn,\n never,\n IngredientPost,\n \"api\"\n >\n>;\n\ntype CreateSingleFoodMeal = MutationTrigger<\n MutationDefinition<\n FoodSingleFoodMealCreateApiArg,\n BaseQueryFn,\n never,\n SingleFoodMeal,\n \"api\"\n >\n>;\n\ntype CreateQuickAddMeal = MutationTrigger<\n MutationDefinition<\n FoodQuickAddMealCreateApiArg,\n BaseQueryFn,\n never,\n QuickAddMeal,\n \"api\"\n >\n>;\n\ntype PlannerPlanSingleFoodMealCreateMutation = MutationTrigger<\n MutationDefinition<\n PlannerPlanSingleFoodMealCreateApiArg,\n BaseQueryFn,\n TAGS,\n PlanSingleFoodMeal,\n \"api\"\n >\n>;\n\nexport type UpdateUserProfileOnBackend = MutationTrigger<\n MutationDefinition<\n UsersUserProfileUpdateApiArg,\n BaseQueryFn,\n TAGS,\n UserProfile,\n \"api\"\n >\n>;\n\nexport type CreateUserProfileOnBackend = MutationTrigger<\n MutationDefinition<\n UsersUserProfileCreateApiArg,\n BaseQueryFn,\n TAGS,\n UserProfile,\n \"api\"\n >\n>;\n\nexport type UpdateWeeklyNutritionPlanOnBackend = MutationTrigger<\n MutationDefinition<\n UsersWeeklyNutritionPlanUpdateApiArg,\n BaseQueryFn,\n TAGS,\n WeeklyNutritionPlanUpdate,\n \"api\"\n >\n>;\n\nexport type CreateNutritionDayPlanOnBackend = MutationTrigger<\n MutationDefinition<\n UsersNutritionDayPlanCreateApiArg,\n BaseQueryFn,\n TAGS,\n NutritionDayPlan,\n \"api\"\n >\n>;\n\nexport type CreateMealSlotSpecificationOnBackend = MutationTrigger<\n MutationDefinition<\n UsersMealSlotSpecificationCreateApiArg,\n BaseQueryFn,\n TAGS,\n MealSlotSpecification,\n \"api\"\n >\n>;\n\nexport type CreateWeeklyNutritionPlanOnBackend = MutationTrigger<\n MutationDefinition<\n UsersWeeklyNutritionPlanCreateApiArg,\n BaseQueryFn,\n TAGS,\n WeeklyNutritionPlanCreate,\n \"api\"\n >\n>;\n\nexport type SetIngredientsToAvoidMutation = MutationTrigger<\n MutationDefinition<\n UsersSetIngredientsToAvoidCreateApiArg,\n BaseQueryFn,\n TAGS,\n SetIngredientToAvoid,\n \"api\"\n >\n>;\n\nexport type AutoPlanDaysOnBackendMutation = MutationTrigger<\n MutationDefinition<\n PlannerAutoPlanDaysCreateApiArg,\n BaseQueryFn,\n TAGS,\n unknown,\n \"api\"\n >\n>;\n\nexport const MealMomentEnum: Record = {\n BREAKFAST: \"BREAKFAST\",\n MORNING_SNACK: \"MORNING_SNACK\",\n LUNCH: \"LUNCH\",\n AFTERNOON_SNACK: \"AFTERNOON_SNACK\",\n DINNER: \"DINNER\",\n SNACK: \"SNACK\",\n LATE_SNACK: \"LATE_SNACK\",\n};\nexport const GoalEnum: Record = {\n GAIN_MUSCLE: \"GAIN_MUSCLE\",\n LOSE_WEIGHT: \"LOSE_WEIGHT\",\n RECOMPOSITION: \"RECOMPOSITION\",\n};\n\ntype MacrosPreference = \"KETO\" | \"RECOMMENDED\" | \"CHOOSE_YOUR_OWN\" | \"LOW_CARB\" | \"MENOPAUSE\" | \"CYCLE_DIET\";\nexport const MacrosPreferenceEnum: Record = {\n KETO: \"KETO\",\n RECOMMENDED: \"RECOMMENDED\",\n CHOOSE_YOUR_OWN: \"CHOOSE_YOUR_OWN\",\n LOW_CARB: \"LOW_CARB\",\n MENOPAUSE: \"MENOPAUSE\",\n CYCLE_DIET: \"CYCLE_DIET\",\n};\n\nexport type IntoleranceType = \"NO_INTOLERANCE\" | \"LACTOSE\" | \"CRUSTACEANS_AND_SHELLFISH\" | \"GLUTEN\" | \"NUTS\";\nexport const IntolerancesEnum: Record = {\n NO_INTOLERANCE: \"NO_INTOLERANCE\",\n LACTOSE: \"LACTOSE\",\n CRUSTACEANS_AND_SHELLFISH: \"CRUSTACEANS_AND_SHELLFISH\",\n GLUTEN: \"GLUTEN\",\n NUTS: \"NUTS\",\n};\n\nexport type IngredientDislike =\n | \"BEEF\"\n | \"EGGPLANT\"\n | \"HONEY\"\n | \"CILANTRO\"\n | \"MAYONNAISE\"\n | \"POTATO\"\n | \"MUSHROOM\"\n | \"TOMATO\"\n | \"BRUSSELS_SPROUTS\";\n\nexport const IngredientDislikesEnum: Record = {\n BEEF: \"BEEF\",\n EGGPLANT: \"EGGPLANT\",\n HONEY: \"HONEY\",\n CILANTRO: \"CILANTRO\",\n MAYONNAISE: \"MAYONNAISE\",\n POTATO: \"POTATO\",\n MUSHROOM: \"MUSHROOM\",\n TOMATO: \"TOMATO\",\n BRUSSELS_SPROUTS: \"BRUSSELS_SPROUTS\",\n};\n\nexport const ingredientDislikeToBackendIdentifier: Record = {\n BEEF: \"Beef\",\n EGGPLANT: \"Eggplant\",\n HONEY: \"Honey\",\n CILANTRO: \"Cilantro\",\n MAYONNAISE: \"Mayonnaise\",\n POTATO: \"Potato\",\n MUSHROOM: \"Mushroom\",\n TOMATO: \"Tomato\",\n BRUSSELS_SPROUTS: \"Brussel Sprouts\",\n};\n\nexport {\n ActivityEnum,\n CategoryFilter,\n ClientsFilterState,\n ClientType,\n CreateQuickAddMeal,\n CreateSingleFoodMeal,\n DayOfWeekString,\n DietEnum,\n FoodIngredientCreate,\n GenderEnum,\n IngredientType,\n MacroName,\n Macros,\n MacrosPreference,\n MeasurementType,\n NutritionType,\n PlannerCalendarDayCreate,\n PlannerCalendarItemCreate,\n PlannerPlanSingleFoodMealCreateMutation,\n RecipeItemType,\n RecipeMacrosItemType,\n RecipeTagOrCategory,\n Stress,\n SustainabilityEnum,\n};\n\ntype EventId =\n | \"click_create_coach_button\"\n | \"subscription_created\"\n | \"click_book_a_demo_button\"\n | \"click_referral_programme_button\";\n\nexport type AnalyticsEventConstants = {\n groups: {\n [key: string]: {\n group_id: string;\n\n traits: {\n name: string;\n };\n };\n };\n\n events: {\n [E in EventId]: {\n name: string;\n };\n };\n};\n\nexport interface AnalyticsHelpers {\n identifyUserInSegment: (user: User) => void;\n identifyUserInIntercom: (userId: string) => void;\n trackPageOrScreenView: (pageOrScreenName: string, properties?: JsonMap) => void;\n trackEvent: (eventName: string, properties?: JsonMap) => void;\n resetAnalytics: () => void;\n openIntercomMessenger: () => void;\n isIntercomLoaded: () => boolean;\n}\n","var map = {\n\t\"./af\": 5511,\n\t\"./af.js\": 5511,\n\t\"./ar\": 9715,\n\t\"./ar-dz\": 69974,\n\t\"./ar-dz.js\": 69974,\n\t\"./ar-kw\": 52390,\n\t\"./ar-kw.js\": 52390,\n\t\"./ar-ly\": 3067,\n\t\"./ar-ly.js\": 3067,\n\t\"./ar-ma\": 93906,\n\t\"./ar-ma.js\": 93906,\n\t\"./ar-sa\": 54872,\n\t\"./ar-sa.js\": 54872,\n\t\"./ar-tn\": 82634,\n\t\"./ar-tn.js\": 82634,\n\t\"./ar.js\": 9715,\n\t\"./az\": 20699,\n\t\"./az.js\": 20699,\n\t\"./be\": 49693,\n\t\"./be.js\": 49693,\n\t\"./bg\": 51099,\n\t\"./bg.js\": 51099,\n\t\"./bm\": 38709,\n\t\"./bm.js\": 38709,\n\t\"./bn\": 51244,\n\t\"./bn-bd\": 687,\n\t\"./bn-bd.js\": 687,\n\t\"./bn.js\": 51244,\n\t\"./bo\": 40115,\n\t\"./bo.js\": 40115,\n\t\"./br\": 30008,\n\t\"./br.js\": 30008,\n\t\"./bs\": 73935,\n\t\"./bs.js\": 73935,\n\t\"./ca\": 77080,\n\t\"./ca.js\": 77080,\n\t\"./cs\": 92786,\n\t\"./cs.js\": 92786,\n\t\"./cv\": 87197,\n\t\"./cv.js\": 87197,\n\t\"./cy\": 4000,\n\t\"./cy.js\": 4000,\n\t\"./da\": 70043,\n\t\"./da.js\": 70043,\n\t\"./de\": 29983,\n\t\"./de-at\": 59517,\n\t\"./de-at.js\": 59517,\n\t\"./de-ch\": 15171,\n\t\"./de-ch.js\": 15171,\n\t\"./de.js\": 29983,\n\t\"./dv\": 95938,\n\t\"./dv.js\": 95938,\n\t\"./el\": 66621,\n\t\"./el.js\": 66621,\n\t\"./en-au\": 5538,\n\t\"./en-au.js\": 5538,\n\t\"./en-ca\": 44656,\n\t\"./en-ca.js\": 44656,\n\t\"./en-gb\": 40365,\n\t\"./en-gb.js\": 40365,\n\t\"./en-ie\": 74970,\n\t\"./en-ie.js\": 74970,\n\t\"./en-il\": 13841,\n\t\"./en-il.js\": 13841,\n\t\"./en-in\": 8207,\n\t\"./en-in.js\": 8207,\n\t\"./en-nz\": 14420,\n\t\"./en-nz.js\": 14420,\n\t\"./en-sg\": 64342,\n\t\"./en-sg.js\": 64342,\n\t\"./eo\": 28852,\n\t\"./eo.js\": 28852,\n\t\"./es\": 45968,\n\t\"./es-do\": 93844,\n\t\"./es-do.js\": 93844,\n\t\"./es-mx\": 69316,\n\t\"./es-mx.js\": 69316,\n\t\"./es-us\": 71485,\n\t\"./es-us.js\": 71485,\n\t\"./es.js\": 45968,\n\t\"./et\": 62821,\n\t\"./et.js\": 62821,\n\t\"./eu\": 32102,\n\t\"./eu.js\": 32102,\n\t\"./fa\": 23621,\n\t\"./fa.js\": 23621,\n\t\"./fi\": 69037,\n\t\"./fi.js\": 69037,\n\t\"./fil\": 90501,\n\t\"./fil.js\": 90501,\n\t\"./fo\": 62543,\n\t\"./fo.js\": 62543,\n\t\"./fr\": 63148,\n\t\"./fr-ca\": 43837,\n\t\"./fr-ca.js\": 43837,\n\t\"./fr-ch\": 40790,\n\t\"./fr-ch.js\": 40790,\n\t\"./fr.js\": 63148,\n\t\"./fy\": 61597,\n\t\"./fy.js\": 61597,\n\t\"./ga\": 93548,\n\t\"./ga.js\": 93548,\n\t\"./gd\": 98519,\n\t\"./gd.js\": 98519,\n\t\"./gl\": 23615,\n\t\"./gl.js\": 23615,\n\t\"./gom-deva\": 41082,\n\t\"./gom-deva.js\": 41082,\n\t\"./gom-latn\": 97253,\n\t\"./gom-latn.js\": 97253,\n\t\"./gu\": 81808,\n\t\"./gu.js\": 81808,\n\t\"./he\": 85963,\n\t\"./he.js\": 85963,\n\t\"./hi\": 18343,\n\t\"./hi.js\": 18343,\n\t\"./hr\": 11794,\n\t\"./hr.js\": 11794,\n\t\"./hu\": 33531,\n\t\"./hu.js\": 33531,\n\t\"./hy-am\": 93358,\n\t\"./hy-am.js\": 93358,\n\t\"./id\": 61921,\n\t\"./id.js\": 61921,\n\t\"./is\": 10692,\n\t\"./is.js\": 10692,\n\t\"./it\": 40817,\n\t\"./it-ch\": 87277,\n\t\"./it-ch.js\": 87277,\n\t\"./it.js\": 40817,\n\t\"./ja\": 17881,\n\t\"./ja.js\": 17881,\n\t\"./jv\": 89788,\n\t\"./jv.js\": 89788,\n\t\"./ka\": 28400,\n\t\"./ka.js\": 28400,\n\t\"./kk\": 43106,\n\t\"./kk.js\": 43106,\n\t\"./km\": 80868,\n\t\"./km.js\": 80868,\n\t\"./kn\": 62925,\n\t\"./kn.js\": 62925,\n\t\"./ko\": 53262,\n\t\"./ko.js\": 53262,\n\t\"./ku\": 91724,\n\t\"./ku.js\": 91724,\n\t\"./ky\": 52488,\n\t\"./ky.js\": 52488,\n\t\"./lb\": 10582,\n\t\"./lb.js\": 10582,\n\t\"./lo\": 13025,\n\t\"./lo.js\": 13025,\n\t\"./lt\": 58800,\n\t\"./lt.js\": 58800,\n\t\"./lv\": 12474,\n\t\"./lv.js\": 12474,\n\t\"./me\": 21166,\n\t\"./me.js\": 21166,\n\t\"./mi\": 84666,\n\t\"./mi.js\": 84666,\n\t\"./mk\": 47888,\n\t\"./mk.js\": 47888,\n\t\"./ml\": 36453,\n\t\"./ml.js\": 36453,\n\t\"./mn\": 45827,\n\t\"./mn.js\": 45827,\n\t\"./mr\": 89695,\n\t\"./mr.js\": 89695,\n\t\"./ms\": 55080,\n\t\"./ms-my\": 69731,\n\t\"./ms-my.js\": 69731,\n\t\"./ms.js\": 55080,\n\t\"./mt\": 74429,\n\t\"./mt.js\": 74429,\n\t\"./my\": 22026,\n\t\"./my.js\": 22026,\n\t\"./nb\": 92980,\n\t\"./nb.js\": 92980,\n\t\"./ne\": 20577,\n\t\"./ne.js\": 20577,\n\t\"./nl\": 68778,\n\t\"./nl-be\": 74158,\n\t\"./nl-be.js\": 74158,\n\t\"./nl.js\": 68778,\n\t\"./nn\": 21632,\n\t\"./nn.js\": 21632,\n\t\"./oc-lnc\": 80428,\n\t\"./oc-lnc.js\": 80428,\n\t\"./pa-in\": 21571,\n\t\"./pa-in.js\": 21571,\n\t\"./pl\": 88612,\n\t\"./pl.js\": 88612,\n\t\"./pt\": 41484,\n\t\"./pt-br\": 90685,\n\t\"./pt-br.js\": 90685,\n\t\"./pt.js\": 41484,\n\t\"./ro\": 98595,\n\t\"./ro.js\": 98595,\n\t\"./ru\": 45533,\n\t\"./ru.js\": 45533,\n\t\"./sd\": 27867,\n\t\"./sd.js\": 27867,\n\t\"./se\": 54516,\n\t\"./se.js\": 54516,\n\t\"./si\": 41152,\n\t\"./si.js\": 41152,\n\t\"./sk\": 39370,\n\t\"./sk.js\": 39370,\n\t\"./sl\": 59411,\n\t\"./sl.js\": 59411,\n\t\"./sq\": 30072,\n\t\"./sq.js\": 30072,\n\t\"./sr\": 4753,\n\t\"./sr-cyrl\": 41680,\n\t\"./sr-cyrl.js\": 41680,\n\t\"./sr.js\": 4753,\n\t\"./ss\": 2690,\n\t\"./ss.js\": 2690,\n\t\"./sv\": 22509,\n\t\"./sv.js\": 22509,\n\t\"./sw\": 96494,\n\t\"./sw.js\": 96494,\n\t\"./ta\": 35211,\n\t\"./ta.js\": 35211,\n\t\"./te\": 88207,\n\t\"./te.js\": 88207,\n\t\"./tet\": 95443,\n\t\"./tet.js\": 95443,\n\t\"./tg\": 17137,\n\t\"./tg.js\": 17137,\n\t\"./th\": 19548,\n\t\"./th.js\": 19548,\n\t\"./tk\": 49285,\n\t\"./tk.js\": 49285,\n\t\"./tl-ph\": 65885,\n\t\"./tl-ph.js\": 65885,\n\t\"./tlh\": 58218,\n\t\"./tlh.js\": 58218,\n\t\"./tr\": 3518,\n\t\"./tr.js\": 3518,\n\t\"./tzl\": 56336,\n\t\"./tzl.js\": 56336,\n\t\"./tzm\": 63207,\n\t\"./tzm-latn\": 96881,\n\t\"./tzm-latn.js\": 96881,\n\t\"./tzm.js\": 63207,\n\t\"./ug-cn\": 77488,\n\t\"./ug-cn.js\": 77488,\n\t\"./uk\": 91352,\n\t\"./uk.js\": 91352,\n\t\"./ur\": 17559,\n\t\"./ur.js\": 17559,\n\t\"./uz\": 91615,\n\t\"./uz-latn\": 36009,\n\t\"./uz-latn.js\": 36009,\n\t\"./uz.js\": 91615,\n\t\"./vi\": 57789,\n\t\"./vi.js\": 57789,\n\t\"./x-pseudo\": 24909,\n\t\"./x-pseudo.js\": 24909,\n\t\"./yo\": 54064,\n\t\"./yo.js\": 54064,\n\t\"./zh-cn\": 69402,\n\t\"./zh-cn.js\": 69402,\n\t\"./zh-hk\": 27670,\n\t\"./zh-hk.js\": 27670,\n\t\"./zh-mo\": 66251,\n\t\"./zh-mo.js\": 66251,\n\t\"./zh-tw\": 60958,\n\t\"./zh-tw.js\": 60958\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 35358;","import { createSelector, createSlice, PayloadAction } from \"@reduxjs/toolkit\";\nimport * as Localization from \"expo-localization\";\n\nimport type { RootState } from \"../../../store\";\nimport type {\n ActivityEnum as ActivityLevel,\n DietEnum,\n GenderEnum as Gender,\n MainGoalEnum as Goal,\n MealMomentEnum as MealMoment,\n PersonalWeightUnitEnum,\n UserProfile,\n} from \"../services/backendTypes\";\nimport {\n type WeeklyGoal,\n IngredientDislike,\n IntoleranceType,\n MacrosPreference,\n MacrosPreferenceEnum,\n MealMomentEnum,\n WeeklyGoalEnum,\n} from \"../types\";\n\n// Define the interfaces\nexport interface BiometricData {\n age: number | undefined;\n gender: Gender | undefined;\n}\n\nexport interface PhysicalStats {\n heightInCm: number | undefined;\n weightInKg: number | undefined;\n goalWeight: number | undefined;\n}\n\nexport type DietPreferences = {\n dietType: MacrosPreference;\n dietaryPreference?: DietEnum;\n intolerances: Array;\n ingredientDislikes: Array;\n mealTimes: Array;\n userProvidedMacros?: {\n calories: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n };\n};\n\nexport interface Preferences {\n usesImperialUnitsForRecipes: boolean;\n usesImperialUnitsForHeight: boolean;\n personalWeightUnit: PersonalWeightUnitEnum;\n}\n\nexport interface MenstrualCycle {\n lastMenstrualPeriodStartDate: string | undefined | null;\n menstrualCycleLength: number | undefined | null;\n}\n\nexport interface OnboardingState {\n goal: Goal;\n activityLevel: ActivityLevel;\n biometricData: BiometricData;\n physicalStats: PhysicalStats;\n weeklyGoal: WeeklyGoal;\n dietPreferences: DietPreferences;\n preferences: Preferences;\n menstrualCycle: MenstrualCycle;\n}\n\nexport const DEFAULT_MEAL_TIMES = [MealMomentEnum.BREAKFAST, MealMomentEnum.LUNCH, MealMomentEnum.DINNER];\n\nexport function determineWeeklyGoal(goalWeeklyChangeInKg: number): WeeklyGoal {\n if (!goalWeeklyChangeInKg) return WeeklyGoalEnum.LOSE_0_25_KG_PER_WEEK;\n\n const weeklyChangeAbs = Math.abs(goalWeeklyChangeInKg);\n if (weeklyChangeAbs <= 0.25) {\n return WeeklyGoalEnum.LOSE_0_25_KG_PER_WEEK;\n }\n if (weeklyChangeAbs <= 0.5) {\n return WeeklyGoalEnum.LOSE_0_5_KG_PER_WEEK;\n }\n return WeeklyGoalEnum.LOSE_1_KG_PER_WEEK;\n}\n\nfunction getDefaultMeasurementPreferences(): Preferences {\n const { locale } = Localization;\n const localeLower = locale.toLowerCase();\n\n // US uses imperial system for everything\n const isUS = localeLower.includes(\"us\");\n\n // UK uses imperial for height but metric for weight and recipes\n const isUK = localeLower.includes(\"gb\") || localeLower.includes(\"uk\");\n\n return {\n usesImperialUnitsForRecipes: isUS,\n usesImperialUnitsForHeight: isUS || isUK,\n personalWeightUnit: isUS ? \"POUNDS\" : \"KILOGRAMS\",\n };\n}\n\nconst initialState: OnboardingState = {\n goal: \"LOSE_WEIGHT\",\n activityLevel: \"MILDLY_ACTIVE\",\n biometricData: {\n age: undefined,\n gender: undefined,\n },\n physicalStats: {\n heightInCm: undefined,\n weightInKg: undefined,\n goalWeight: undefined,\n },\n weeklyGoal: WeeklyGoalEnum.LOSE_0_25_KG_PER_WEEK,\n dietPreferences: {\n dietType: MacrosPreferenceEnum.RECOMMENDED,\n intolerances: [],\n ingredientDislikes: [],\n mealTimes: DEFAULT_MEAL_TIMES,\n },\n preferences: {\n usesImperialUnitsForRecipes: false,\n usesImperialUnitsForHeight: false,\n personalWeightUnit: \"KILOGRAMS\",\n },\n menstrualCycle: {\n lastMenstrualPeriodStartDate: undefined,\n menstrualCycleLength: undefined,\n },\n};\n\n// Create the slice\nexport const onboardingSlice = createSlice({\n name: \"onboarding\",\n initialState,\n reducers: {\n setGoal(state, action: PayloadAction) {\n state.goal = action.payload;\n },\n setActivityLevel(state, action: PayloadAction) {\n state.activityLevel = action.payload;\n },\n setBiometricData(state, action: PayloadAction) {\n state.biometricData = action.payload;\n },\n setPhysicalStats(state, action: PayloadAction) {\n state.physicalStats = action.payload;\n },\n setWeeklyGoal(state, action: PayloadAction) {\n state.weeklyGoal = action.payload;\n },\n setDietPreferences(state, action: PayloadAction) {\n const updatedDietPreferences = {\n ...action.payload,\n // Ensure that all the arrays do not contain duplicate elements\n intolerances: [...new Set(action.payload.intolerances)],\n ingredientDislikes: [...new Set(action.payload.ingredientDislikes)],\n mealTimes: [...new Set(action.payload.mealTimes)],\n };\n\n if (action.payload.dietaryPreference) {\n updatedDietPreferences.dietaryPreference = action.payload.dietaryPreference;\n }\n\n state.dietPreferences = updatedDietPreferences;\n },\n setUserProfileData(state, action: PayloadAction) {\n const userProfile = action.payload;\n const defaultPreferences = getDefaultMeasurementPreferences();\n\n state.goal = userProfile.main_goal || \"LOSE_WEIGHT\";\n state.activityLevel = userProfile.activity;\n\n state.biometricData = {\n age: userProfile.age || 25,\n gender: userProfile.gender,\n };\n\n const DEFAULT_HEIGHT = 170;\n const DEFAULT_WEIGHT = 70;\n const DEFAULT_GOAL_WEIGHT = 65;\n\n state.physicalStats = {\n heightInCm: userProfile.height_in_cm || DEFAULT_HEIGHT,\n weightInKg: userProfile.weight || DEFAULT_WEIGHT,\n goalWeight: userProfile.goal_weight_in_kg || DEFAULT_GOAL_WEIGHT,\n };\n\n state.weeklyGoal = determineWeeklyGoal(userProfile.goal_weekly_change_in_kg || -0.25);\n\n state.preferences = {\n usesImperialUnitsForRecipes:\n userProfile.uses_imperial_measurements_for_recipes ?? defaultPreferences.usesImperialUnitsForRecipes,\n usesImperialUnitsForHeight:\n userProfile.uses_imperial_measurements_for_height ?? defaultPreferences.usesImperialUnitsForHeight,\n personalWeightUnit: userProfile.personal_weight_unit ?? defaultPreferences.personalWeightUnit,\n };\n },\n resetOnboardingState(state) {\n // eslint-disable-next-line no-param-reassign, no-unused-vars\n state = initialState;\n },\n setPreferences(state, action: PayloadAction) {\n state.preferences = action.payload;\n },\n setMenstrualCycle(state, action: PayloadAction) {\n state.menstrualCycle = action.payload;\n },\n },\n});\n\n// Export actions\nexport const {\n setGoal,\n setActivityLevel,\n setBiometricData,\n setPhysicalStats,\n setWeeklyGoal,\n resetOnboardingState,\n setPreferences,\n setMenstrualCycle,\n} = onboardingSlice.actions;\n\n// Selectors\nconst selectSelf = (state: RootState): OnboardingState => state[onboardingSlice.name];\n\nexport const onboardingDataSelector = createSelector(selectSelf, (state: OnboardingState) => state);\n","/* eslint-disable */\n// @ts-nocheck\n\nimport { SEGMENT_WRITE_KEY_FOR_WEB_SNIPPET } from \"../constants\";\n\n// prettier-ignore\n!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\",\"addSourceMiddleware\",\"addIntegrationMiddleware\",\"setAnonymousId\",\"addDestinationMiddleware\"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e ({\n// msg: log.message,\n// level: log.level.label,\n// stacktrace: log.stacktrace,\n// });\n\n// TODO: Configure with remote logging when we have decided\n// remote.apply(logLevel, { format: customJSON, url: REMOTE_LOGGER_URL });\n\nlogLevel.setLevel(\"debug\");\n\n// if (!PRODUCTION) {\n// logLevel.enableAll();\n// }\n\nif (process.env.NODE_ENV !== \"test\") {\n console.log(`Log level: ${logLevel.getLevel()}`);\n}\n\nexport default logLevel;\n","import type { User } from \"../services/backendTypes\";\n\n/**\n * Enum for all available feature flags in the application\n * Add new feature flags here to maintain type safety\n */\nexport enum FeatureFlag {\n FF_FEMALE_HORMONES = \"FF_FEMALE_HORMONES\",\n FF_COPY_MEALS_TO_ANOTHER_DAY = \"FF_COPY_MEALS_TO_ANOTHER_DAY\",\n FF_B2C_PAYWALL = \"FF_B2C_PAYWALL\",\n FF_PLANT_BASED_APP = \"FF_PLANT_BASED_APP\",\n FF_DISABLE_LOW_CARB_OPTION = \"FF_DISABLE_LOW_CARB_OPTION\",\n}\n\n/**\n * Checks if a feature flag is active for a given user\n * @param user The user to check\n * @param flag The feature flag to check\n * @returns boolean indicating if the flag is active\n */\nexport function isFeatureFlagActive(user: User | null, flag: FeatureFlag): boolean {\n if (!user || !user.feature_flags_for_user) {\n return false;\n }\n\n const { flags, switches, samples } = user.feature_flags_for_user;\n\n // Check if the flag exists in any of the three collections\n return flags.includes(flag) || switches.includes(flag) || samples.includes(flag);\n}\n\n/**\n * Creates a features object for the FlagProvider based on the user's feature flags\n * @param user The user to check feature flags for\n * @returns Record of feature flags and their active status\n */\nexport function createFeaturesObject(user: User | null): Record {\n return Object.values(FeatureFlag).reduce(\n (acc, flag) => ({\n ...acc,\n [flag]: isFeatureFlagActive(user, flag as FeatureFlag),\n }),\n {} as Record\n );\n}\n","enum ScreenNames {\n BottomNavigationStack = \"BottomNavigationStack\",\n BottomNavigationTab = \"BottomNavigationTab\",\n\n LoginStack = \"LoginStack\",\n LoginScreenOnCheckout = \"LoginScreenOnCheckout\",\n LoginScreen = \"LoginScreen\",\n MagicLinkSentScreen = \"MagicLinkSentScreen\",\n EnterOTPScreen = \"EnterOTPScreen\",\n\n NutritionPlanScreen = \"NutritionPlanScreen\",\n ProfilePictureScreen = \"ProfilePictureScreen\",\n PlanScreen = \"PlanScreen\",\n ProfileStartScreen = \"ProfileStartScreen\",\n GetStaredScreen = \"GetStaredScreen\",\n PersonalDetailsScreen = \"PersonalDetailsScreen\",\n EmailConfirmed = \"EmailConfirmed\",\n EmailConfirmationSent = \"EmailConfirmationSent\",\n RegisterScreen = \"RegisterScreen\",\n OnboardingScreen = \"OnboardingScreen\",\n AddGenderScreen = \"AddGenderScreen\",\n AddMainGoalScreen = \"AddMainGoalScreen\",\n AddMotivationGoalScreen = \"AddMotivationGoalScreen\",\n AddLifeStyleScreen = \"AddLifeStyleScreen\",\n RecipeSearchScreen = \"RecipeSearchScreen\",\n DiaryViewScreen = \"DiaryViewScreen\",\n ThreeDaysScreen = \"ThreeDaysScreen\",\n RecipesScreen = \"RecipesScreen\",\n GroceryListScreen = \"GroceryListScreen\",\n RecipeInspirationScreen = \"RecipeInspirationScreen\",\n RecipesBottomTabScreen = \"RecipesBottomTabScreen\",\n FoodSearchScreen = \"FoodSearchScreen\",\n AddIngredientScreen = \"AddIngredientScreen\",\n RecipeDetailScreen = \"RecipeDetailScreen\",\n RecipeEditScreen = \"RecipeEditScreen\",\n RecipeSaveScreen = \"RecipeSaveScreen\",\n RecipeAddOwnScreen = \"RecipeAddOwnScreen\",\n AddProductStack = \"AddProductStack\",\n\n // Checkout\n CheckoutScreen = \"CheckoutScreen\",\n CheckoutFailureScreen = \"CheckoutFailureScreen\",\n\n // Profile\n MyProfileScreen = \"MyProfileScreen\",\n MyProfileDietPreferencesScreen = \"MyProfileDietPreferencesScreen\",\n MyProgressScreen = \"MyProgressScreen\",\n\n AddProductByBarcodeStack = \"AddProductByBarcodeStack\",\n AddRecipeTemplateStack = \"AddRecipeTemplateStack\",\n RecipeAddOwnStack = \"RecipeAddOwnStack\",\n BarcodeScannerScreen = \"BarcodeScannerScreen\",\n FloatingButton = \"FloatingButton\",\n FinishPlanningScreen = \"FinishPlanningScreen\",\n\n /*\n * Screens available for coaches only\n */\n CoachModeAccountScreen = \"CoachModeAccountScreen\",\n CoachModeViewClientsScreen = \"CoachModeViewClientsScreen\",\n CoachModeClientInfoScreen = \"CoachModeClientInfoScreen\",\n EditUserProfileScreen = \"EditUserProfileScreen\",\n BillingIssueScreen = \"BillingIssueScreen\",\n\n EditNutritionDayPlanStack = \"EditNutritionDayPlanStack\",\n EnergyBalanceTab1 = \"EnergyBalanceTab1\",\n ChooseMealMomentsTab2 = \"ChooseMealMomentsTab2\",\n EditMealMomentsTab3 = \"EditMealMomentsTab3\",\n FineTuningTab4 = \"FineTuningTab4\",\n\n // TODO: Should this be deleted?\n MacroProfilesEditMealAmountScreen = \"MacroProfilesEditMealAmountScreen\",\n\n /*\n * DIY path screens\n */\n Diy1WelcomeScreen = \"Diy1WelcomeScreen\",\n DiyIntakeScreen = \"DiyIntakeScreen\",\n DiyAvoidIngredientsScreen = \"DiyAvoidIngredientsScreen\",\n DiyCreateNutritionPlanScreen = \"DiyCreateNutritionPlanScreen\",\n DiyFineTuningScreen = \"DiyFineTuningScreen\",\n\n // NOTE: This is a user facing name because the user will be installing the PWA from this screen\n PWASignupScreen = \"Install the app\",\n\n // Onboarding flow\n DIY1GoalScreen = \"DIY1GoalScreen\",\n ActivityLevelScreen = \"ActivityLevelScreen\",\n BiometricDataScreen = \"BiometricDataScreen\",\n\n PhysicalStatsScreen = \"PhysicalStatsScreen\",\n WeeklyGoalScreen = \"WeeklyGoalScreen\",\n NutritionalPlanScreen = \"NutritionalPlanScreen\",\n ModifyNutritionalPlanScreen = \"ModifyNutritionalPlanScreen\",\n MealTimesScreen = \"MealTimesScreen\",\n DietSelectionScreen = \"DietSelectionScreen\",\n IntoleranceScreen = \"IntoleranceScreen\",\n IngredientDislikesScreen = \"IngredientDislikesScreen\",\n PostOnboardingScreen = \"PostOnboardingScreen\",\n SignUpScreen = \"SignUpScreen\",\n Onboarding_RegistrationScreen = \"Onboarding_RegistrationScreen\",\n\n MenstrualCycleDatesScreen = \"MenstrualCycleDatesScreen\",\n MenstrualCycleDetailsScreen = \"MenstrualCycleDetailsScreen\",\n OnboardingMenstrualCycleSpacingScreen = \"OnboardingMenstrualCycleSpacingScreen\",\n}\n\nexport default ScreenNames;\n","enum ScreenIndexes {\n CoachCreateNutritionPlanScreen = 0,\n MacroProfilesEditDayScreen = 1,\n MacroProfilesEditMealAmountScreen = 2,\n}\n\nexport default ScreenIndexes;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, StatusBarHeight, VerticalScale } from \"./helperFunction\";\n\nconst commonStyles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n mobileContainer: {\n backgroundColor: \"white\",\n },\n mainContainer: {\n flex: 1,\n display: \"flex\",\n paddingHorizontal: Scale(24),\n },\n paddingContainer: {\n paddingHorizontal: Scale(24),\n },\n paddingVerticalContainer: {\n paddingVertical: VerticalScale(24),\n },\n safeAreaContainer: {\n paddingTop: StatusBarHeight,\n },\n bodyText12: {\n fontSize: 12,\n // color: Colors.textColor,\n fontWeight: \"normal\",\n lineHeight: VerticalScale(24),\n },\n bodyText14: {\n fontSize: 14,\n // color: Colors.textColor,\n fontWeight: \"normal\",\n lineHeight: VerticalScale(24),\n },\n bodyText14W500: {\n fontSize: 14,\n // color: Colors.textColor,\n fontWeight: \"500\",\n lineHeight: VerticalScale(22),\n },\n bodyText16: {\n fontSize: 16,\n // color: Colors.textColor,\n fontWeight: \"normal\",\n lineHeight: VerticalScale(22),\n },\n bodyText16W500: {\n fontSize: 16,\n // color: Colors.textColor,\n fontWeight: \"500\",\n lineHeight: VerticalScale(22),\n },\n bodyText20: {\n fontSize: 20,\n // color: Colors.textColor,\n lineHeight: VerticalScale(28),\n },\n titleText16: {\n fontSize: 16,\n // color: Colors.largeTextColor,\n fontWeight: \"normal\",\n lineHeight: VerticalScale(24),\n },\n titleText16Bold: {\n fontSize: 16,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n lineHeight: VerticalScale(24),\n },\n titleText20Bold: {\n fontSize: 20,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n lineHeight: VerticalScale(24),\n },\n titleText24: {\n fontSize: 24,\n fontWeight: \"normal\",\n // color: Colors.largeTextColor,\n lineHeight: VerticalScale(32),\n },\n titleText24Bold: {\n fontSize: 24,\n fontWeight: \"bold\",\n // color: Colors.largeTextColor,\n lineHeight: VerticalScale(32),\n },\n titleGreenText14: {\n fontSize: 14,\n // color: Colors.primaryGreenColor,\n lineHeight: VerticalScale(24),\n },\n titleGreenText16: {\n fontSize: 16,\n // color: Colors.primaryGreenColor,\n lineHeight: VerticalScale(24),\n },\n titleGreenText16Bold: {\n fontSize: 16,\n fontWeight: \"bold\",\n // color: Colors.primaryGreenColor,\n lineHeight: VerticalScale(24),\n },\n titleGreenText20: {\n fontSize: 20,\n fontWeight: \"bold\",\n // color: Colors.primaryGreenColor,\n lineHeight: VerticalScale(32),\n },\n titleGreenText24: {\n fontSize: 24,\n fontWeight: \"bold\",\n // color: Colors.primaryGreenColor,\n lineHeight: VerticalScale(28),\n },\n descriptionText14: {\n fontSize: 14,\n fontWeight: \"normal\",\n // color: Colors.descriptionTextColor,\n lineHeight: VerticalScale(14),\n },\n descriptionText16Bold: {\n fontSize: 16,\n fontWeight: \"bold\",\n // color: Colors.descriptionTextColor,\n lineHeight: VerticalScale(24),\n },\n descriptionText24Bold: {\n fontSize: 24,\n fontWeight: \"700\",\n // color: Colors.descriptionTextColor,\n lineHeight: VerticalScale(24),\n },\n descriptionText16: {\n fontSize: 16,\n fontWeight: \"normal\",\n // color: Colors.smallTextColor,\n },\n smallText14: {\n fontSize: 14,\n fontWeight: \"normal\",\n // color: Colors.smallTextColor,\n lineHeight: VerticalScale(18),\n },\n sectionText14Bold: {\n // color: Colors.sectionTextColor,\n fontSize: 14,\n fontWeight: \"bold\",\n lineHeight: 24,\n },\n sectionText16Bold: {\n // color: Colors.sectionTextColor,\n fontSize: 16,\n fontWeight: \"bold\",\n lineHeight: 24,\n },\n blueText14: {\n // color: Colors.blueTextColor,\n fontSize: 14,\n lineHeight: VerticalScale(22),\n },\n bottomContainer: {\n paddingHorizontal: Scale(24),\n bottom: Scale(40),\n },\n bottomFixedContainer: {\n paddingHorizontal: Scale(24),\n bottom: Scale(40),\n },\n bottomContainerFixed: {\n paddingHorizontal: Scale(24),\n bottom: 40,\n position: \"absolute\",\n width: \"100%\",\n },\n scrollContentContainer: {\n paddingBottom: Scale(40),\n },\n});\n\nexport default commonStyles;\n","/* eslint-disable import/no-cycle */\nimport * as Application from \"expo-application\";\nimport { Locale } from \"locale-enum\";\nimport { Platform } from \"react-native\";\n\nimport logger from \"../services/logger\";\nimport { faces, homeCarouselData, homeData, timeLineForProfile, walkThroughList } from \"./data\";\nimport * as constants from \"./data\";\nimport { height, isDesktopScreen, Scale, StatusBarHeight, VerticalScale, width } from \"./helperFunction\";\nimport Images from \"./images\";\nimport Routes from \"./routeNames\";\nimport ScreenIndexes from \"./ScreenIndexes\";\nimport commonStyles from \"./styles\";\n\n// TODO: When we implement translations we need to decide what to do\nconst PHRASE_DISTRIBUTION_ID = null;\nconst PHRASE_ENVIRONMENT_ID = null;\n\nconst DEFAULT_PRODUCTION_BACKEND_API_BASE_URL = \"https://weekmeals-django-production.herokuapp.com\";\n\n// NOTE: We cannot use destructuring because we use a rewriting plugin to make the env vars code work\n// eslint-disable-next-line prefer-destructuring\nconst BACKEND_API_BASE_URL = process.env.BACKEND_API_BASE_URL || DEFAULT_PRODUCTION_BACKEND_API_BASE_URL;\n// const BACKEND_API_BASE_URL = \"https://weekmeals-django-production.herokuapp.com\";\n// eslint-disable-next-line prefer-destructuring\nconst SENTRY_DSN = process.env.SENTRY_DSN;\n// eslint-disable-next-line prefer-destructuring\nconst SEGMENT_WRITE_KEY_FOR_WEB_SNIPPET = process.env.SEGMENT_WRITE_KEY_FOR_WEB_SNIPPET || \"\";\n// eslint-disable-next-line prefer-destructuring\nconst SEGMENT_API_KEY_FOR_NATIVE_LIBRARY = process.env.SEGMENT_API_KEY_FOR_NATIVE_LIBRARY || \"\";\n\nif (!BACKEND_API_BASE_URL) {\n // NOTE: Our jest env does not appear to set process.env.BACKEND_API_BASE_URL correctly on CI\n // so we add this guard to prevent the unit tests from crashing\n if (process.env.NODE_ENV !== \"test\") {\n throw Error(\"No process.env.BACKEND_API_BASE_URL found: this should not happen.\");\n }\n}\n\nif (process.env.NODE_ENV !== \"test\") {\n logger.info(\"BACKEND_API_BASE_URL:\", BACKEND_API_BASE_URL);\n}\n\nconst ENVIRONMENT = process.env.ENVIRONMENT || \"production\";\n\nconst PRODUCTION = ENVIRONMENT === \"production\";\n\nconst SUBDOMAIN_OVERRIDE = PRODUCTION && process.env.SUBDOMAIN_OVERRIDE ? process.env.SUBDOMAIN_OVERRIDE : \"\";\n\nconst DEFAULT_LANGUAGE = Locale.nl;\n\nconst IS_MOBILE_PLATFORM = Platform.OS !== \"web\";\n\nconst BUILD_NUMBER = IS_MOBILE_PLATFORM ? Application.nativeBuildVersion : \"web\";\n\nconst KG_TO_LBS = 2.20462;\nconst LBS_TO_KG = 0.453592;\n\nexport {\n BACKEND_API_BASE_URL,\n BUILD_NUMBER,\n commonStyles,\n constants,\n DEFAULT_LANGUAGE,\n ENVIRONMENT,\n faces,\n height,\n homeCarouselData,\n homeData,\n Images,\n IS_MOBILE_PLATFORM,\n isDesktopScreen,\n KG_TO_LBS,\n LBS_TO_KG,\n PHRASE_DISTRIBUTION_ID,\n PHRASE_ENVIRONMENT_ID,\n PRODUCTION,\n Routes,\n Scale,\n ScreenIndexes,\n SEGMENT_API_KEY_FOR_NATIVE_LIBRARY,\n SEGMENT_WRITE_KEY_FOR_WEB_SNIPPET,\n SENTRY_DSN,\n StatusBarHeight,\n SUBDOMAIN_OVERRIDE,\n timeLineForProfile,\n VerticalScale,\n walkThroughList,\n width,\n};\n","// eslint-disable-next-line import/no-cycle\nimport type { MealSlotSpecification } from \"../services/backendTypes\"; // temporary test data and will be removed shortly\nimport type { MacroName } from \"../types\";\nimport Images from \"./images\";\n\nconst walkThroughList = [\n {\n id: 1,\n title: \"Welkom!\",\n description: \"WeekMeals helpt je op een leuke manier gezonder te leven en te eten. Swipe om verder te gaan.\",\n image: Images.WeekmealsLogo,\n },\n {\n id: 2,\n title: \"Recepten op maat\",\n description: \"Recepten in de app worden automatisch aangepast op jouw voedingsplan– lekker & makkelijk.\",\n image: Images.OnBoardingIcon1,\n icon: Images.ForkKnifeWhiteIcon,\n // bgColor: Colors.bgEmerald,\n },\n {\n id: 3,\n title: \"Gebaseerd op wetenschap\",\n description: \"De recepten en het voedingsadvies van WeekMeals zijn gebasseerd op wetenschappelijk onderzoek.\",\n image: Images.OnBoardingIcon2,\n icon: Images.MicroscopeWhiteIcon,\n // bgColor: Colors.bgPurple,\n },\n {\n id: 4,\n title: \"Weekplanner\",\n description: \"Het inplannen van je week verhoogt jouw kans op succes\",\n image: Images.OnBoardingIcon3,\n icon: Images.CalendarCheckWhiteIcon,\n // bgColor: Colors.bgBlizzardBlue,\n },\n {\n id: 5,\n title: \"Boodschappenlijstjes\",\n description: \"Maak met je geplande maaltijden in no-time een boodschappenlijstje. Nooit meer peinzen bij de super!\",\n image: Images.OnBoardingIcon4,\n icon: Images.ChecklistWhiteIcon,\n // bgColor: Colors.bgTangerine,\n button: true,\n },\n];\n\nexport const CATEGORY_POPULAR = \"POPULAR\";\nexport const CATEGORY_FAVOURITE = \"FAVOURITE\";\nexport const CATEGORY_OWN_RECIPE = \"OWN_RECIPE\";\n\nexport enum RecipeCategory {\n POPULAR = \"POPULAR\",\n FAVOURITE = \"FAVOURITE\",\n OWN_RECIPE = \"OWN_RECIPE\",\n}\n\nexport enum SourceProvider {\n WEEKMEALS = \"WEEKMEALS\",\n USER_GENERATED = \"USER_GENERATED\",\n}\n\n// TODO: we need to figure out a way to generate the enums from the API\nexport enum RecipeTag {\n BREAD = \"BREAD\",\n BURGER = \"BURGER\",\n COUSCOUS_AND_QUINOA = \"COUSCOUS_AND_QUINOA\",\n DAIRY = \"DAIRY\",\n DIPS_AND_SPREADS = \"DIPS_AND_SPREADS\",\n KETO = \"KETO\",\n PANCAKES_AND_OMELETTES = \"PANCAKES_AND_OMELETTES\",\n PASTA = \"PASTA\",\n POTATO = \"POTATO\",\n RICE_AND_NOODLES = \"RICE_AND_NOODLES\",\n SALAD = \"SALAD\",\n SNACKS_AND_BAKES = \"SNACKS_AND_BAKES\",\n SOUP = \"SOUP\",\n VEGAN = \"VEGAN\",\n WRAP = \"WRAP\",\n}\n\nexport const MACRO_NAMES: MacroName[] = [\"kcal\", \"protein\", \"carbohydrates\", \"fat\"];\n\nexport enum MealType {\n BREAKFAST = \"BREAKFAST\",\n LUNCH = \"LUNCH\",\n DINNER = \"DINNER\",\n SNACK = \"SNACK\",\n ALL = \"ALL\",\n}\n\nconst homeData = [\n {\n id: 1,\n image: Images.HomeFoodImage1,\n title: \"Magere kwark met stukjes fruit\",\n time: \"5m\",\n },\n {\n id: 2,\n image: Images.HomeFoodImage1,\n title: \"Stracciatella kwark\",\n time: \"5m\",\n },\n {\n id: 3,\n image: Images.HomeFoodImage1,\n title: \"Magere kwark met stukjes fruit\",\n time: \"15m\",\n },\n];\nconst homeCarouselData = [\n {\n id: 1,\n image: Images.HomeFoodImage1,\n title: \"Caesar salade met cherry tomaatjes1\",\n time: \"15m\",\n },\n {\n id: 2,\n image: Images.HomeFoodImage1,\n title: \"Caesar salade met cherry tomaatjes2\",\n time: \"15m\",\n },\n {\n id: 3,\n image: Images.HomeFoodImage1,\n title: \"Caesar salade met cherry tomaatjes3\",\n time: \"15m\",\n },\n];\n\nconst DiaryItem = [\n {\n id: 1,\n mealType: \"Breakfast\",\n mealList: [\n // {\n // id: 1,\n // type: \"Organic corn-flakes with milk\",\n // icon: Images.Diary1,\n // checked: false,\n // item: \"placeholder\",\n // amount: \"placeholder\",\n // },\n // {\n // id: 2,\n // type: \"Quark with strawberries\",\n // icon: Images.Diary1,\n // checked: false,\n // item: \"placeholder\",\n // amount: \"placeholder\",\n // },\n // { id: 3, item: \"Candy Bar\", amount: \"150g\", checked: false, type: \"placeholder\" },\n // { id: 4, item: \"Banana\", amount: \"1 stuk\", checked: false, type: \"placeholder\" },\n // { id: 1, type: \"Organic corn-flakes with milk\", icon: Images.Diary1, checked: false },\n // { id: 2, type: \"Quark with strawberries\", icon: Images.Diary1, checked: false },\n // { id: 3, item: \"Candy Bar\", amount: \"150g\", checked: false },\n // { id: 4, item: \"Banana\", amount: \"1 stuk\", checked: false },\n ],\n },\n { id: 2, mealType: \"Lunch\" },\n { id: 3, mealType: \"Snack\" },\n { id: 4, mealType: \"Dinner\" },\n { id: 5, mealType: \"Pre-bed\" },\n];\n\nconst Ingredients = [\n {\n id: 1,\n name: \"Bio. cornflakes\",\n kcal: 88,\n protein: 4,\n },\n {\n id: 2,\n name: \"Honing\",\n kcal: 131,\n protein: 1,\n },\n {\n id: 3,\n name: \"Vanille stokje\",\n kcal: 9,\n protein: 0,\n },\n {\n id: 4,\n name: \"Biologische melk [longer name]\",\n kcal: 101,\n protein: 4,\n },\n];\n\nconst RecipeMacrosItems = [\n {\n id: 1,\n label: \"Calories\",\n progress: 0,\n total: 716,\n unit: \"kCal\",\n },\n {\n id: 2,\n label: \"Protein\",\n progress: 0,\n total: 18,\n unit: \"g\",\n },\n];\n\nconst faces = [\n { id: 1, icon: Images.AngryIcon, selected: false },\n { id: 2, icon: Images.SadIcon, selected: false },\n { id: 3, icon: Images.OkIcon, selected: false },\n { id: 4, icon: Images.SatisfiedIcon, selected: false },\n { id: 5, icon: Images.HappyIcon, selected: false },\n];\n\nconst timeLineForProfile = [\n { id: 1, time: \"5 Feb - 12 Feb\", absolute: \"-0.8 kg\", wtLost: \"-0.7%\" },\n { id: 2, time: \"13 Feb - 19 Feb\", absolute: \"-0.8 kg\", wtLost: \"-0.5%\" },\n { id: 3, time: \"20 Feb - 26 Feb\", absolute: \"-0.8 kg\", wtLost: \"-1.1%\" },\n { id: 4, time: \"20 Feb - 26 Feb\", absolute: \"-0.8 kg\", wtLost: \"-1.1%\" },\n];\n\n// eslint-disable-next-line import/prefer-default-export\nexport {\n DiaryItem,\n faces,\n homeCarouselData,\n homeData,\n Ingredients,\n RecipeMacrosItems,\n timeLineForProfile,\n walkThroughList,\n};\n","import type { UserProfile } from \"../../services/backendTypes\";\nimport { type OnboardingState, DEFAULT_MEAL_TIMES, determineWeeklyGoal } from \"../../slices/onboardingSlice\";\nimport { MacrosPreferenceEnum, WeeklyGoalEnum } from \"../../types\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport function createOnboardingState(userProfile: UserProfile): OnboardingState {\n const DEFAULT_HEIGHT = 170;\n const DEFAULT_WEIGHT = 70;\n const DEFAULT_GOAL_WEIGHT = 65;\n const DEFAULT_WEEKLY_GOAL = WeeklyGoalEnum.LOSE_0_25_KG_PER_WEEK;\n\n const weeklyGoal = userProfile.goal_weekly_change_in_kg\n ? determineWeeklyGoal(userProfile.goal_weekly_change_in_kg)\n : DEFAULT_WEEKLY_GOAL;\n\n return {\n goal: userProfile.main_goal || \"LOSE_WEIGHT\",\n activityLevel: userProfile.activity,\n biometricData: {\n age: userProfile.age || 25,\n gender: userProfile.gender,\n },\n physicalStats: {\n heightInCm: userProfile.height_in_cm || DEFAULT_HEIGHT,\n weightInKg: userProfile.weight || DEFAULT_WEIGHT,\n goalWeight: userProfile.goal_weight_in_kg || DEFAULT_GOAL_WEIGHT,\n },\n weeklyGoal,\n dietPreferences: {\n dietType: MacrosPreferenceEnum.RECOMMENDED,\n intolerances: [],\n ingredientDislikes: [],\n mealTimes: DEFAULT_MEAL_TIMES,\n },\n preferences: {\n usesImperialUnitsForRecipes: userProfile.uses_imperial_measurements_for_recipes || false,\n usesImperialUnitsForHeight: userProfile.uses_imperial_measurements_for_height || false,\n personalWeightUnit: userProfile.personal_weight_unit || \"KILOGRAMS\",\n },\n menstrualCycle: {\n lastMenstrualPeriodStartDate: userProfile.last_menstrual_period_start_date,\n menstrualCycleLength: userProfile.menstrual_cycle_length,\n },\n };\n}\n","// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport Constants, { AppOwnership, ExecutionEnvironment } from \"expo-constants\";\nimport * as Device from \"expo-device\";\nimport * as Localization from \"expo-localization\";\nimport { Locale } from \"locale-enum\";\nimport _ from \"lodash\";\nimport type { Moment } from \"moment\";\nimport moment from \"moment\";\nimport numeral from \"numeral\";\nimport platform from \"platform-detect\";\nimport type { TFunction } from \"react-i18next\";\nimport { Linking, Platform } from \"react-native\";\n\nimport appJson from \"../../../app.json\";\nimport { DEFAULT_LANGUAGE, Images, IS_MOBILE_PLATFORM, isDesktopScreen } from \"../constants\";\nimport type { GeneratedRecipeMeal, MealMomentEnum, RecipeMeal, SlimClient, User } from \"../services/backendTypes\";\n\nexport const formatMomentAsBackendFormatDateString = (date: Moment): string => date.format(\"YYYY-MM-DD\");\nexport const getMomentFromBackendFormatDateString = (dateString: string): Moment => moment(dateString, \"YYYY-MM-DD\");\n\n/**\n * Format: \"Wed Aug 14\"\n * @param date\n * @returns\n */\nexport function formatDate(date: Moment): string {\n // TODO: use locale\n return date.format(\"ddd MMM D\");\n}\n\nexport const isMobilePlatform = (): boolean => IS_MOBILE_PLATFORM;\n\nexport const isIosWeb = (): boolean => platform.ios;\nexport const isMacOriOSWeb = (): boolean => Platform.OS === \"web\" && (platform.ios || platform.macos);\n\nexport const formatMealType = (mealType: MealMomentEnum, t: TFunction<\"translation\", undefined>): string =>\n _.capitalize(t(`general.meal_types.${mealType}`));\n\nexport const getRecipeMealImage = (\n recipeMeal: RecipeMeal | GeneratedRecipeMeal\n // React native has a terminal error if the uri field of the source of an image is not a string\n // This error occurs on android for our default image because of the way the image is loaded (i.e using a require)\n // This code prevents that but the return type any is not ideal\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): { source: { uri: string }; usedDefaultImage: boolean } => {\n let source = Images.DefaultRecipeImage;\n let usedDefaultImage = true;\n\n if (recipeMeal.recipe_template.image) {\n source = { uri: recipeMeal.recipe_template.image };\n usedDefaultImage = false;\n }\n\n return {\n source,\n usedDefaultImage,\n };\n};\n\nexport const formatNumberAsWholeNumber = (number: number): string => numeral(number).format(\"0\");\n\n/**\n * Always round up.\n * @param number\n * @returns\n */\nexport const formatNumberAsWholeNumberForGroceryList = (number: number): string => String(Math.ceil(number));\n\nexport const formatNumberToDecimalPlaces = (number: number, decimalPlaces = 1): string =>\n (Math.round(number * 100) / 100).toFixed(decimalPlaces);\n\nexport const formatNumberAsDecimal = (number: number, decimalPlaces = 1): string =>\n String(_.round(number, decimalPlaces));\n\n/**\n *\n * @param number (Assumes 0 = 0% and 1 = 100%)\n * @returns\n */\nexport const formatNumberAsPercentage = (number: number): string => numeral(number).format(\"0%\");\n\nexport const isIos = (): boolean => Platform.OS === \"ios\";\n\nexport const isExpoGo = Constants.appOwnership === AppOwnership.Expo;\n\n/**\n * Note that we used to not show the intercom launcher on mobile screen sizes,\n * because we thought it might take up too much space. But now we have decided we do want to do this.\n * @returns\n */\nexport const shouldStartIntercomLauncherHidden = (): boolean => false;\n\nexport const IS_ANDROID_WEB = Device.osName === \"Android\" && Platform.OS === \"web\";\nexport const IS_IOS_WEB = Device.osName === \"iOS\" && Platform.OS === \"web\";\nexport const IS_MOBILE_WEB = IS_IOS_WEB || IS_ANDROID_WEB;\nexport const IS_EXPO_GO = Constants.executionEnvironment === ExecutionEnvironment.StoreClient;\n\nexport const formatUserForDisplay = (user: User | SlimClient): string =>\n user.first_name && user.last_name ? `${user.first_name} ${user.last_name}` : user.email;\n\n// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-explicit-any\nexport function apiCallErrorHandler(): ((reason: any) => void | PromiseLike) | null | undefined {\n return (error: string | { status: number; data: { string: string[] } }) => {\n if (typeof error === \"string\") {\n throw new Error(error);\n } else if (\"data\" in error) {\n Object.entries(error.data).forEach(([key, value]) => {\n value.forEach((errorMessage) => {\n const errorDescription = `${key}: ${errorMessage}`;\n alert(errorDescription);\n\n // TODO: This is also not working. This will cause a crash if it executes.\n // toast.show({\n // description: errorDescription,\n // placement: \"top\",\n // bgColor: \"red.400\",\n // });\n });\n });\n } else {\n throw new Error(error);\n }\n };\n}\n\n/*\n * Form helpers\n */\n\n// TODO: This needs to be changed to work properly with Yup\nexport const transformEuropeanStyleNumber = (currentValue: string, value: string): string | number | null => {\n if (!value || typeof value !== \"string\") return value;\n\n if (value.includes(\".\")) {\n return null;\n }\n return +value.replace(/,/, \".\");\n};\n\nexport const openURL = (url: string): void => {\n Linking.canOpenURL(url)\n .then(async (supported) => {\n if (supported) {\n await Linking.openURL(url);\n } else {\n Sentry.captureException(new Error(`Cannot open url: ${url}`));\n }\n })\n .catch((e) => {\n console.log(\"cannot open url\", e);\n\n Sentry.captureException(e);\n });\n};\n\n/**\n * A wrapper function which takes another function and wraps it in a try/catch\n * This is to avoid having to wrap every function in a try/catch\n *\n * @param fn\n * @returns\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function tryCatchWrapper any>(fn: T): T {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return ((...args: any[]) => {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return fn(...args);\n } catch (e) {\n // NOTE: This is not an error per se and we may downgrade it to be captureMessage if desired\n Sentry.captureException(e);\n\n return undefined;\n }\n }) as T;\n}\n\nexport function getDeviceLanguage(): Locale {\n const { locale } = Localization;\n\n if (locale.toLowerCase().startsWith(\"nl\")) {\n return Locale.nl;\n }\n return Locale.en;\n}\n\nexport function getLocalizedDay(dateAsString: string, userLocaleFromStore: Locale | undefined): string {\n const internationalizedDayString = moment(dateAsString)\n // userLocaleFromStore is only set when the user changes their language,\n // so if they have not then it will be the default\n .lang(userLocaleFromStore || getDeviceLanguage() || DEFAULT_LANGUAGE)\n .format(\"dddd\");\n\n return _.capitalize(internationalizedDayString);\n}\n\nexport const safeGet = (list: T[], index: number): T | null | undefined =>\n list.length > index ? list[index] : null;\n\nexport function getAppName(): string {\n const appName = appJson.expo.name;\n\n return appName;\n}\n\nexport function getAppIconPath(): string {\n const appIconPath = appJson.expo.icon;\n\n return appIconPath;\n}\n\nexport const getNumberOfDaysUntilNextMonday = (date: Moment): number => {\n const dayOfWeek = date.isoWeekday();\n const daysUntilNextMonday = 7 - dayOfWeek;\n return daysUntilNextMonday;\n};\n\nexport const isDateInCurrentWeek = (date: Moment): boolean => {\n const startOfWeek = moment().startOf(\"isoWeek\");\n const endOfWeek = moment().endOf(\"isoWeek\");\n return date.isBetween(startOfWeek, endOfWeek, \"day\", \"[]\");\n};\nexport function addOpacityToBaseHexColour(hex: string, opacity: number): string {\n const opacityHex = opacity.toString(16);\n\n return `${hex}${opacityHex}`;\n}\n","// Map of customer subdomains to their Facebook Pixel IDs\n// TODO: Later this should be fetched from the backend\nconst customerPixelMap: Record = {\n killerbody: \"813606730510301\",\n};\n\nexport default customerPixelMap;\n","import type SegmentAnalytics from \"@segment/analytics.js-core\";\nimport type { JsonMap } from \"@segment/analytics-react-native\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport _ from \"lodash\";\nimport platform from \"platform-detect\";\n\nimport analyticsJsonRaw from \"../../../analytics.json\";\nimport customerPixelMap from \"../config/customerPixels\";\nimport type { User } from \"../services/backendTypes\";\nimport type { AnalyticsEventConstants, AnalyticsHelpers } from \"../types\";\nimport { openURL, shouldStartIntercomLauncherHidden } from \"./generalHelpers\";\nimport { getHostname, getManagedCustomerPortalSubdomain } from \"./userHelpers\";\n\n// Flag to control Datadog functionality - set to false to disable\nconst DATADOG_ENABLED = false;\n\nconst SUPPORT_WEBSITE = \"https://help.nutrition-app.com/\";\n\n// Only load datadog snippet if enabled\nif (DATADOG_ENABLED) {\n // eslint-disable-next-line global-require\n require(\"../snippets/datadog_snippet\");\n}\n\nfunction configureDatadogRUMbeforeSend(): void {\n /* eslint-disable @typescript-eslint/ban-ts-comment */\n /* eslint-disable @typescript-eslint/no-unsafe-call */\n\n try {\n // @ts-ignore\n if (window.DD_RUM && window.DD_RUM.init) {\n // @ts-ignore\n window.DD_RUM.init({\n // @ts-ignore\n beforeSend: (event) => {\n // @ts-ignore\n // eslint-disable-next-line no-param-reassign\n event.context.isInsidePWA = platform.pwa;\n\n return true;\n },\n });\n }\n } catch (error) {\n Sentry.captureException(error);\n }\n}\n\n// Only configure Datadog RUM if enabled\nif (DATADOG_ENABLED) {\n configureDatadogRUMbeforeSend();\n}\n\nexport const analyticsJson: AnalyticsEventConstants = analyticsJsonRaw;\n\n/**\n * We do not return the analytics object directly because if it is not loaded then it will not work.\n */\nfunction getAnalytics(): SegmentAnalytics.AnalyticsJS {\n return window.analytics;\n}\n\n// TODO: This is a temporary fix to hide the Intercom launcher for Happy Healthy customers\n// They are currently the only customer who deals with their own customer service.\n// If we were to do this properly it should be fetched from the backend\n// (but I believe that would require a structural refactor of this file)\nconst shouldHideIntercomLauncher =\n shouldStartIntercomLauncherHidden() || getManagedCustomerPortalSubdomain(getHostname()) === \"happyhealthy\";\nif (shouldHideIntercomLauncher) {\n // NOTE: There is actually an `analytics` global variable after the snippet has been loaded\n // eslint-disable-next-line no-undef\n try {\n getAnalytics().page(\n \"\",\n \"\",\n {},\n {\n // NOTE: The segment types apparently does not include Intercom options\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n Intercom: { hideDefaultLauncher: true },\n }\n );\n } catch (error) {\n console.warn(\"Failed to hide Intercom launcher:\", error);\n Sentry.captureException(error);\n }\n}\n\n/**\n * Get the Facebook Pixel ID for the current customer subdomain\n *\n * TODO: Later this should be stored in the DB and fetched from the backend\n */\nexport function getFbPixelIdForSubdomain(): string | undefined {\n const subdomain = getManagedCustomerPortalSubdomain(getHostname());\n return subdomain ? customerPixelMap[subdomain] : undefined;\n}\n\nfunction identifyUserInIntercom(userId: string): void {\n getAnalytics().identify(userId);\n}\n\nfunction resetAnalytics(): void {\n getAnalytics().reset();\n}\n\nfunction identifyUserInSegment(user: User): void {\n getAnalytics().identify(user.id);\n\n // Only set Datadog user if enabled\n if (DATADOG_ENABLED) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (window.DD_RUM && window.DD_RUM.setUser) {\n const userToSendToDatadog = user;\n // TODO: Maybe we should enrich this, ie, with coach data\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.DD_RUM.setUser(userToSendToDatadog);\n }\n }\n}\n\nfunction trackPageView(pageName: string, properties?: JsonMap): void {\n getAnalytics().page(pageName, properties);\n}\n\nfunction openIntercomMessenger(): void {\n if (_.isFunction(window.Intercom)) {\n window.Intercom(\"show\");\n } else {\n // Intercom is not loaded, so we open the support website instead\n window.open(SUPPORT_WEBSITE, \"_blank\");\n openURL(SUPPORT_WEBSITE);\n\n Sentry.captureMessage(\"Intercom is not loaded\");\n }\n}\n\nfunction trackEvent(eventName: string, properties?: JsonMap): void {\n getAnalytics().track(eventName, properties);\n}\n\nfunction isIntercomLoaded(): boolean {\n return _.isFunction(window.Intercom);\n}\n\n/**\n * We use the same interface for analyticsHelpers.ts and analyticsHelpers.native.ts\n */\nconst analyticsInterface: AnalyticsHelpers = Object.freeze({\n identifyUserInIntercom,\n resetAnalytics,\n identifyUserInSegment,\n trackPageOrScreenView: trackPageView,\n trackEvent,\n openIntercomMessenger,\n isIntercomLoaded,\n getCurrentFacebookPixelId: getFbPixelIdForSubdomain,\n});\n\nexport default analyticsInterface;\n","// TODO: Rename to helperFunctions.ts\n\nimport \"@expo/match-media\";\n\nimport React from \"react\";\nimport { Dimensions, EmitterSubscription, Keyboard, Platform } from \"react-native\";\nimport { getStatusBarHeight } from \"react-native-status-bar-height\";\n\nconst { width, height } = Dimensions.get(\"window\");\n\nconst guidelineBaseWidth = 375;\nconst guidelineBaseHeight = 812;\n\nconst guidelineBaseWidthDesktop = 1440;\nconst guidelineBaseHeightDesktop = 1024;\n\nconst MIN_DESKTOP_WIDTH = 900; // min width to determine desktop or laptop\n\nexport const isDesktopScreen = (): boolean => Dimensions.get(\"window\").width > MIN_DESKTOP_WIDTH;\n\nexport const IS_NOT_DESKTOP = width < MIN_DESKTOP_WIDTH;\nexport const Scale = (size: number): number =>\n (width / (IS_NOT_DESKTOP ? guidelineBaseWidth : guidelineBaseWidthDesktop)) * size;\n\nexport const VerticalScale = (size: number): number =>\n (height / (IS_NOT_DESKTOP ? guidelineBaseHeight : guidelineBaseHeightDesktop)) * size;\n\nexport const StatusBarHeight = getStatusBarHeight();\n\nexport { height, width };\n\n/**\n * This function is used to achieve keyboard avoiding functionality with a NativeBase component.\n * From https://github.com/GeekyAnts/NativeBase/issues/3939#issuecomment-1225669616\n * @returns {number} the number of pixels to offset the bottom by\n */\nexport const useKeyboardBottomInset = (): number => {\n const [bottom, setBottom] = React.useState(0);\n const subscriptions = React.useRef([]);\n\n React.useEffect(() => {\n subscriptions.current = [\n Keyboard.addListener(\"keyboardDidHide\", () => setBottom(0)),\n Keyboard.addListener(\"keyboardDidShow\", (e) => {\n if (Platform.OS === \"android\") {\n setBottom(e.endCoordinates.height);\n } else {\n setBottom(Math.max(e.startCoordinates?.height || 0, e.endCoordinates.height));\n }\n }),\n ];\n\n return () => {\n subscriptions.current.forEach((subscription) => {\n subscription.remove();\n });\n };\n }, [setBottom, subscriptions]);\n\n return bottom;\n};\n","import AsyncStorage from \"@react-native-async-storage/async-storage\";\nimport * as Localization from \"expo-localization\";\nimport i18n, { InitOptions } from \"i18next\";\nimport ChainedBackend from \"i18next-chained-backend\";\nimport { Locale } from \"locale-enum\";\nimport _ from \"lodash\";\nimport { initReactI18next } from \"react-i18next\";\n\n// NOTE: This does not work on web, we need to find a solution for web\n// import Phrase from \"react-native-phrase-sdk\";\nimport { DEFAULT_LANGUAGE, PHRASE_DISTRIBUTION_ID, PHRASE_ENVIRONMENT_ID, PRODUCTION } from \"./app/src/constants\";\nimport en from \"./locales/en/translation.json\";\nimport nl from \"./locales/nl/translation.json\";\n\n// TODO: https://www.i18next.com/translation-function/formatting\n// - dates (can we use the in-built moment.js internationalisation?)\n\n// NOTE: This is for later when we use a remote service\n// const phrase = new Phrase(\n// PHRASE_DISTRIBUTION_ID,\n// PHRASE_ENVIRONMENT_ID,\n// APP_VERSION,\n// \"i18next\"\n// );\n\nexport const ASYNC_STORAGE__LANGUAGE_KEY = \"@AppIntl:language\";\n\n// TODO: Add typing\nconst languageDetector = {\n type: \"languageDetector\",\n async: true,\n detect: async (callback: (language: string) => void) => {\n // Fetch the language from the async storage\n // NOTE: We do not use the redux store because it is not available in this file\n const storedLanguage = await AsyncStorage.getItem(ASYNC_STORAGE__LANGUAGE_KEY);\n if (storedLanguage) {\n return callback(storedLanguage);\n }\n\n // If no stored language then we use the device language\n const { locale } = Localization;\n if (locale.toLowerCase().startsWith(\"nl\")) {\n return callback(Locale.nl);\n }\n return callback(Locale.en);\n },\n init: () => _.noop(),\n cacheUserLanguage: () => _.noop(),\n};\n\nconst resources = {\n [Locale.en]: { translation: en },\n [Locale.nl]: { translation: nl },\n};\n\nconst localResources: InitOptions = {\n resources,\n // lng: \"en\", // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources\n // // you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage\n // // if you're using a language detector, do not define the lng option\n\n interpolation: {\n // react already safes from xss\n escapeValue: false,\n },\n fallbackLng: Locale.en,\n compatibilityJSON: \"v3\",\n};\n\ni18n\n .use(ChainedBackend)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .use(languageDetector)\n .use(initReactI18next)\n .init(localResources)\n .catch((err) => {\n if (typeof err === \"string\") {\n throw new Error(err);\n }\n // Otherwise rethrow the error\n throw err;\n });\n\nexport default i18n;\n","// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport Matercolor from \"matercolors\";\nimport type { ITheme } from \"native-base\";\nimport { extendTheme, theme as defaultTheme } from \"native-base\";\n\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport { doesTheUserHaveMenstrualPlanSet, getOrganisation } from \"../helpers/userHelpers\";\nimport type { Brand, User } from \"../services/backendTypes\";\nimport type { OnboardingState } from \"../slices/onboardingSlice\";\n\nconst APP_DEFAULT_PRIMARY_COLOUR = \"#58CA8C\";\n\nexport function createThemeFromColour(colour: string | undefined): ITheme {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n const appDefaultPalette = new Matercolor(APP_DEFAULT_PRIMARY_COLOUR);\n\n let palette = appDefaultPalette;\n\n // If the user's coach (or the coach themselves) has custom branding, use that instead of the default\n if (colour) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n palette = new Matercolor(colour);\n } catch (error) {\n Sentry.captureException(error);\n }\n }\n\n // NOTE: We adjust it because this becomes primary.400, but NativeBase default is 600. So we lighten it a bit.\n // We move all values above 200 down by 2 places if the primary colour is not black\n\n let primaryColourPalette = {\n ...palette,\n };\n\n if (colour !== \"#000000\") {\n primaryColourPalette = {\n ...palette,\n 200: palette[50],\n 300: palette[100],\n 400: palette[200],\n 500: palette[300],\n 600: palette[400],\n 700: palette[500],\n 800: palette[600],\n 900: palette[700],\n };\n }\n\n const theme: ITheme = {\n ...defaultTheme,\n colors: {\n ...defaultTheme.colors,\n primary: primaryColourPalette,\n orange: {\n 50: \"#FFC910\",\n 100: \"#FFC920\",\n 200: \"#FFC930\",\n 300: \"#FFC940\",\n 400: \"#FFC950\",\n 500: \"#FFC960\",\n 600: \"#FFC920\",\n 700: \"#FFC980\",\n 800: \"#FFC990\",\n 900: \"#FFC9A0\",\n },\n amber: {\n 50: \"#fff2db\",\n 100: \"#ffdab0\",\n 200: \"#E9BB91\",\n 300: \"#fbac50\",\n 400: \"#f99420\",\n 500: \"#df7a06\",\n 600: \"#ae5f02\",\n 700: \"#7d4400\",\n 800: \"#4c2800\",\n 900: \"#1e0c00\",\n },\n // NOTE: Some of the old colours that are used frequently are commented here for reference\n muted: {\n 50: \"#e7f5fe\",\n 100: \"#cddce3\", // borderColor = \"#CBD9E0\",\n 200: \"#b1c3cd\",\n 300: \"#94abb8\", // darkgrey2 = \"#A0B5C0\",\n 400: \"#7794a2\", // textColor: \"#718A96\" // greyTextColor = \"#718A96\", // darkGreyTextColor = \"#78909C\",\n 500: \"#5e7a89\",\n 600: \"#475f6b\",\n 700: \"#32444e\", // largeTextColor = \"#28414D\",\n 800: \"#1b2a31\",\n 900: \"#001014\",\n },\n red: {\n 50: \"#ffe7e9\",\n 100: \"#f6bdc2\",\n 200: \"#eb949b\",\n 300: \"#e16b73\",\n 400: \"#d7414a\",\n 500: \"#be2832\",\n 600: \"#b7272f\",\n 700: \"#6b141b\",\n 800: \"#420a0e\",\n 900: \"#1c0002\",\n },\n gray: {\n ...defaultTheme.colors.gray,\n // NOTE: We will need to consolidate when doing later issues\n 50: \"#F7FAFC\", // grey = \"#F7FAFC\",\n 100: \"#E2E9F0\", // greyBgColor = \"#E2E9F0\",\n 200: \"#a1a1aa\",\n 300: \"#A0B5C0\", // smallTextColor = \"#A0B5C0\",\n 500: \"#718A96\", // sectionTextColor = \"#4A5E68\",\n 600: \"#4A5E68\",\n 700: \"#CBD9E0\",\n 900: \"#e5e5e5\",\n },\n blue: {\n ...defaultTheme.colors.blue,\n 100: \"#092939\",\n 200: \"#28414D\", // blueTextColor = \"#5896CA\",\n },\n },\n fontConfig: {\n DMSans: {\n 400: {\n normal: \"DMSans_400Regular\",\n },\n 500: {\n normal: \"DMSans_500Medium\",\n },\n 700: {\n normal: \"DMSans_700Bold\",\n },\n },\n },\n // TODO: Perhaps change this when we use extendTheme\n // fonts: {\n // heading: \"DMSans_700Bold\",\n // body: \"DMSans_400Regular\",\n // mono: \"DMSans_400Regular\",\n // },\n config: {\n initialColorMode: \"light\",\n },\n };\n\n return extendTheme(theme);\n}\n\nexport function shouldWeChangeAppToHormoneTheme(user: User | null, onboardingData: OnboardingState): boolean {\n if (!user || !isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES)) {\n return false;\n }\n\n const isOnHormoneDiet = [\"MENOPAUSE\", \"CYCLE_DIET\"].includes(onboardingData?.dietPreferences?.dietType);\n\n const isOnCycleDiet = Boolean(doesTheUserHaveMenstrualPlanSet(user));\n\n const isOnMenopauseDiet = Boolean(user.intake?.is_on_menopause_diet);\n\n return isOnHormoneDiet || isOnCycleDiet || isOnMenopauseDiet;\n}\n\nexport const getTheme = (\n user: User | null,\n brandIfNotLoggedIn: Brand | undefined,\n onboardingData: OnboardingState\n): ITheme => {\n let primaryColour;\n if (user) {\n const organisation = getOrganisation(user);\n primaryColour = organisation?.primary_colour || undefined;\n\n // FIXME: Also change the icon\n\n if (shouldWeChangeAppToHormoneTheme(user, onboardingData)) {\n primaryColour = HORMONE_HEX_COLOR;\n }\n } else {\n // Not logged in\n primaryColour = brandIfNotLoggedIn?.primary_colour || undefined;\n }\n\n return createThemeFromColour(primaryColour);\n};\n\nexport const HORMONE_HEX_COLOR = \"#AE79AB\";\n\n// Old colours for reference\n// enum Colours {\n// primaryGreenColor = \"#58CA8C\",\n// secondaryGreenColor = \"#8ADAAF\",\n// whiteColor = \"#FFFFFF\",\n// largeTextColor = \"#28414D\",\n// disableButton = \"#E2EBF0\",\n// textColor = \"#718A96\",\n// bgColor = \"#ffffff\",\n// disableColor = \"#A1B5C0\",\n// grey = \"#F7FAFC\",\n// greyTextColor = \"#718A96\",\n// darkGreyTextColor = \"#78909C\",\n// sectionTextColor = \"#4A5E68\",\n// lightBrownColor = \"#E1BD97\",\n// darkgrey2 = \"#A0B5C0\",\n// white = \"#FFF\",\n// bgEmerald = \"#8ADAAF\",\n// bgPurple = \"#9C9BDF\",\n// bgBlizzardBlue = \"#8AD1DA\",\n// bgTangerine = \"#E9BB91\",\n// borderColor = \"#CBD9E0\",\n// descriptionTextColor = \"#092939\",\n// blueTextColor = \"#5896CA\",\n// smallTextColor = \"#A0B5C0\",\n// lightGreen = \"#F3FBF7\",\n// swiperColor = \"#105A49\",\n// grayBorder = \"#EDF4F7\",\n// tipColor = \"#58ca8c1a\",\n// blueColor = \"#2D44A0\",\n// pink = \"#CD8DA5\",\n// greyBgColor = \"#E2E9F0\",\n// }\n","// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\n\nimport logger from \"../services/logger\";\n\nconst FACEBOOK_PIXEL_EVENTS = {\n START_TRIAL: \"StartTrial\",\n PURCHASE: \"Purchase\",\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport function facebookPixelSendStartTrialEvent(): void {\n if (!window.fbq) {\n const errorForSentry = new Error(\"Conversion tracking error - Facebook Pixel is not loaded\");\n Sentry.captureException(errorForSentry);\n } else {\n window.fbq(\"track\", FACEBOOK_PIXEL_EVENTS.START_TRIAL);\n }\n}\n\nexport function wereWeReferredFromStripeCheckout(referrer: string): boolean {\n return referrer.startsWith(\"https://buy.stripe.com/\");\n}\n\nexport function trackStripeCheckoutPurchaseEvent(documentReferrer: string): (() => void) | void {\n try {\n if (wereWeReferredFromStripeCheckout(documentReferrer)) {\n logger.info(\"We were referred from Stripe Checkout\");\n\n const checkFacebookPixelAndFireEvent = (): boolean => {\n if (typeof window.fbq === \"function\") {\n logger.info(\"Facebook Pixel function (fbq) is available.\");\n\n // Fire purchase event\n window.fbq(\"track\", FACEBOOK_PIXEL_EVENTS.PURCHASE, {\n // NOTE: These fields are required by Facebook Pixel\n // We hardcode the rough value of an annual plan (the most popular) because the\n // actual value is not passed through (since we use Stripe's no-code payment links)\n value: 50,\n currency: \"EUR\",\n });\n logger.info(\"Facebook Pixel purchase event fired\");\n return true;\n }\n logger.info(\"Facebook Pixel not loaded yet. Waiting...\");\n return false;\n };\n\n // Try immediately\n if (!checkFacebookPixelAndFireEvent()) {\n logger.info(\"Facebook Pixel not loaded yet. Waiting...\");\n\n // Set up polling to check for Facebook Pixel\n const intervalId = setInterval(() => {\n if (checkFacebookPixelAndFireEvent()) {\n clearInterval(intervalId);\n logger.info(\"Facebook Pixel loaded after waiting\");\n }\n }, 500);\n\n // Clean up interval if component unmounts\n return () => clearInterval(intervalId);\n }\n }\n } catch (error) {\n logger.error(\"Error in Facebook Pixel tracking:\", error);\n Sentry.captureException(error);\n }\n\n return undefined;\n}\n","import { createSelector, createSlice } from \"@reduxjs/toolkit\";\nimport type { Locale } from \"locale-enum\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\n\nimport type { RootState } from \"../../../store\";\nimport { formatMomentAsBackendFormatDateString } from \"../helpers/generalHelpers\";\nimport type { DiyCreateNutritionPlanFormInterface } from \"../screens/New_DIY_form/onboardingHelpers\";\nimport type {\n MealSlotSpecification,\n SlimClient,\n User,\n UserDistance,\n UserFavouriteRecipe,\n UserSleep,\n UserStress,\n UserWeight,\n WeeklyNutritionPlan,\n} from \"../services/backendTypes\";\nimport type { LegacyInput } from \"../services/legacyNutritionCalculations7\";\n\nexport type UserFavouriteRecipeByRecipeTemplateId = {\n [id: number]: UserFavouriteRecipe;\n};\n\nexport type UserDislikeRecipeByRecipeTemplateId = {\n [id: number]: UserFavouriteRecipe;\n};\n\ntype RecipeTemplateIdPayload = {\n recipeTemplateId: number;\n};\n\nexport type UserWeightsByDate = {\n [date: string]: UserWeight[];\n};\n\nexport type UserStressByDate = {\n [date: string]: UserStress[];\n};\n\nexport type UserSleepsByDate = {\n [date: string]: UserSleep[];\n};\n\nexport type UserDistancesByDate = {\n [date: string]: UserDistance[];\n};\n\ntype ClientNutritionPlansByClientId = {\n [clientId: number]: {\n // NOTE: id is optional because it may not exist in the DB yet (-1 is used if there is no id)\n [optionalId: number]: LegacyInput;\n };\n};\n\n/**\n * NOTE: The formValues of this object have been superseded by the onboardingState (these are now deprecated)\n */\nexport type DIYFormInterface = {\n formValues: DiyCreateNutritionPlanFormInterface;\n mss: MealSlotSpecification[];\n};\n\nexport interface UserState {\n token: string;\n user: User | null;\n\n userFavouriteRecipes: {\n byRecipeTemplateId: UserFavouriteRecipeByRecipeTemplateId;\n };\n\n userDislikeRecipes:\n | {\n byRecipeTemplateId: UserDislikeRecipeByRecipeTemplateId;\n }\n | undefined; // Note: this was added later so we allow undefined in order to be defensive\n\n measurements: {\n weightsByDate: UserWeightsByDate;\n stressByDate: UserStressByDate;\n sleepsByDate: UserSleepsByDate;\n distancesByDate: UserDistancesByDate;\n };\n clients: SlimClient[];\n clientMode: boolean;\n\n // Coach functionality\n clientNutritionPlans: ClientNutritionPlansByClientId;\n\n appLastOpenedDateString?: string;\n\n locale?: Locale;\n\n // Coach functionality\n viewAsUser: User | null;\n\n diyForm: DIYFormInterface | undefined;\n\n pwa: {\n deferredPrompt: boolean;\n };\n}\n\nconst initialState: UserState = {\n token: \"\",\n user: null,\n userFavouriteRecipes: { byRecipeTemplateId: {} },\n userDislikeRecipes: { byRecipeTemplateId: {} },\n\n measurements: {\n weightsByDate: {},\n stressByDate: {},\n sleepsByDate: {},\n distancesByDate: {},\n },\n clients: [],\n\n clientMode: false,\n viewAsUser: null,\n\n clientNutritionPlans: {},\n diyForm: undefined,\n pwa: {\n deferredPrompt: false,\n },\n};\n\nexport const NUTRITION_PLAN_WITHOUT_ID = -1;\n\nexport const userSlice = createSlice({\n name: \"user\",\n initialState,\n reducers: {\n storeAuthToken(state: UserState, action: { payload: string }) {\n // eslint-disable-next-line no-param-reassign\n state.token = action.payload;\n },\n storeUser(state: UserState, action: { payload: User }) {\n // eslint-disable-next-line no-param-reassign\n state.user = action.payload;\n },\n storeUserFavouriteRecipe(state: UserState, action: { payload: UserFavouriteRecipeByRecipeTemplateId }) {\n // eslint-disable-next-line no-param-reassign\n\n Object.keys(action.payload).forEach((recipeId) => {\n const userFavouriteRecipe = action.payload[Number(recipeId)];\n if (userFavouriteRecipe) {\n // eslint-disable-next-line no-param-reassign\n state.userFavouriteRecipes.byRecipeTemplateId[Number(recipeId)] = userFavouriteRecipe;\n }\n });\n },\n storeUserDislikeRecipe(state: UserState, action: { payload: UserDislikeRecipeByRecipeTemplateId }) {\n const updatedUserDislikeRecipes = { ...state.userDislikeRecipes?.byRecipeTemplateId, ...action.payload };\n state.userDislikeRecipes = { byRecipeTemplateId: updatedUserDislikeRecipes };\n },\n\n deleteUserFavouriteRecipe(state: UserState, action: { payload: RecipeTemplateIdPayload }) {\n // eslint-disable-next-line no-param-reassign\n delete state.userFavouriteRecipes.byRecipeTemplateId[action.payload.recipeTemplateId];\n },\n deleteUserDislikeRecipe(state: UserState, action: { payload: RecipeTemplateIdPayload }) {\n delete state.userDislikeRecipes?.byRecipeTemplateId[action.payload.recipeTemplateId];\n },\n storeUserWeightMeasurements(state: UserState, action: { payload: UserWeight[] }) {\n const newWeights = _.groupBy(action.payload, (weight: UserWeight) =>\n formatMomentAsBackendFormatDateString(moment(weight.created_at))\n );\n\n // eslint-disable-next-line no-param-reassign\n state.measurements = { ...state.measurements, weightsByDate: newWeights };\n },\n storeUserStressMeasurements(state: UserState, action: { payload: UserStress[] }) {\n const newStress = _.groupBy(action.payload, (stress: UserStress) =>\n formatMomentAsBackendFormatDateString(moment(stress.created_at))\n );\n\n // eslint-disable-next-line no-param-reassign\n state.measurements = { ...state.measurements, stressByDate: newStress };\n },\n storeUserSleepMeasurements(state: UserState, action: { payload: UserSleep[] }) {\n const newSleeps = _.groupBy(action.payload, (sleep: UserSleep) =>\n formatMomentAsBackendFormatDateString(moment(sleep.created_at))\n );\n\n // eslint-disable-next-line no-param-reassign\n state.measurements = { ...state.measurements, sleepsByDate: newSleeps };\n },\n storeUserDistanceMeasurements(state: UserState, action: { payload: UserDistance[] }) {\n const newDistances = _.groupBy(action.payload, (distance: UserDistance) =>\n formatMomentAsBackendFormatDateString(moment(distance.created_at))\n );\n\n // eslint-disable-next-line no-param-reassign\n state.measurements = { ...state.measurements, distancesByDate: newDistances };\n },\n storeClients(state: UserState, action: { payload: SlimClient[] }) {\n // eslint-disable-next-line no-param-reassign\n state.clients = action.payload;\n },\n toggleClientMode(state: UserState) {\n // eslint-disable-next-line no-param-reassign\n state.clientMode = !state.clientMode;\n },\n setViewAsUser(state: UserState, action: { payload: User | null }) {\n // eslint-disable-next-line no-param-reassign\n state.viewAsUser = action.payload;\n },\n\n storeClientNutritionPlan(state: UserState, action: { payload: { clientId: number; plan: LegacyInput } }) {\n if (!state.clientNutritionPlans) {\n state.clientNutritionPlans = {};\n }\n\n if (!state.clientNutritionPlans[action.payload.clientId]) {\n state.clientNutritionPlans[action.payload.clientId] = {};\n }\n\n state.clientNutritionPlans[action.payload.clientId] = {\n ...state.clientNutritionPlans[action.payload.clientId],\n [action.payload.plan.id || NUTRITION_PLAN_WITHOUT_ID]: action.payload.plan,\n };\n },\n\n storeAppLastOpened(state: UserState, action: { payload: string }) {\n // eslint-disable-next-line no-param-reassign\n state.appLastOpenedDateString = action.payload;\n },\n\n storeLocale(state: UserState, action: { payload: Locale }) {\n // eslint-disable-next-line no-param-reassign\n state.locale = action.payload;\n },\n\n storeDiyFormResults(\n state: UserState,\n action: { payload: { formValues: DiyCreateNutritionPlanFormInterface; mss: MealSlotSpecification[] } }\n ) {\n // eslint-disable-next-line no-param-reassign\n state.diyForm = action.payload;\n },\n clearDiyFormResults(state: UserState) {\n // eslint-disable-next-line no-param-reassign\n state.diyForm = undefined;\n },\n deferPwaInstallPrompt(state: UserState) {\n // eslint-disable-next-line no-param-reassign\n state.pwa = { deferredPrompt: true };\n },\n },\n});\n\nconst selectSelf = (state: RootState): UserState => state[userSlice.name];\n\nexport const authTokenSelector = createSelector(selectSelf, (state: UserState): string => state.token);\n\nexport const userSelector = createSelector(selectSelf, (state: UserState): User | null => state.user);\n\nexport const viewAsUserSelector = createSelector(selectSelf, (state: UserState): User | null => state.viewAsUser);\n\nexport const weeklyNutritionPlanSelector = createSelector(\n selectSelf,\n (state: UserState): WeeklyNutritionPlan | undefined | null => state.user?.intake?.weekly_nutrition_plan\n);\n\nexport const viewAsUserWeeklyNutritionPlanSelector = createSelector(\n selectSelf,\n (state: UserState): WeeklyNutritionPlan | undefined | null => state.viewAsUser?.intake?.weekly_nutrition_plan\n);\n\nexport const userFavouriteRecipesSelector = createSelector(\n selectSelf,\n (state: UserState): UserFavouriteRecipeByRecipeTemplateId => state.userFavouriteRecipes.byRecipeTemplateId\n);\n\nexport const userDislikeRecipesSelector = createSelector(\n selectSelf,\n (state: UserState): UserDislikeRecipeByRecipeTemplateId | undefined => state?.userDislikeRecipes?.byRecipeTemplateId\n);\n\nexport const userWeightMeasurementsSelector = createSelector(\n selectSelf,\n (state: UserState): { [date: string]: UserWeight[] } => state.measurements?.weightsByDate || {}\n);\n\nexport const userStressMeasurementsSelector = createSelector(\n selectSelf,\n (state: UserState): { [date: string]: UserStress[] } => state.measurements?.stressByDate || {}\n);\n\nexport const userSleepMeasurementsSelector = createSelector(\n selectSelf,\n (state: UserState): { [date: string]: UserSleep[] } => state.measurements?.sleepsByDate || {}\n);\n\nexport const userWaistCircumferenceMeasurementsSelector = createSelector(\n selectSelf,\n (state: UserState): { [date: string]: UserDistance[] } =>\n state.measurements?.distancesByDate\n ? _.pickBy(state.measurements?.distancesByDate, (distances) => _.filter(distances, { body_area: \"WAIST\" }))\n : {}\n);\n\nexport const clientsSelector = createSelector(selectSelf, (state: UserState): SlimClient[] => state.clients);\n\nexport const clientModeSelector = createSelector(selectSelf, (state: UserState): boolean =>\n state.user?.is_coach ? state.clientMode : true\n);\n\nexport const clientNutritionPlansByIdSelector = createSelector(\n selectSelf,\n (state: UserState): ClientNutritionPlansByClientId => state.clientNutritionPlans\n);\n\nexport const getAppLastOpenedSelector = createSelector(\n selectSelf,\n (state: UserState): string | undefined => state.appLastOpenedDateString\n);\n\nexport const localeSelector = createSelector(selectSelf, (state: UserState): Locale | undefined => state.locale);\n\nexport const diyFormSelector = createSelector(\n selectSelf,\n (state: UserState): DIYFormInterface | undefined => state.diyForm\n);\n\nexport const hasUserDeferredPwaPrompt = createSelector(\n selectSelf,\n (state: UserState): boolean => state?.pwa?.deferredPrompt\n);\n","import { createApi, fetchBaseQuery } from \"@reduxjs/toolkit/query/react\";\nimport * as Localization from \"expo-localization\";\n\nimport type { RootState } from \"../../../store\";\nimport { BACKEND_API_BASE_URL } from \"../constants\";\nimport { authTokenSelector, localeSelector } from \"../slices/userSlice\";\n\nconst DEFAULT_LANGUAGE = \"en\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport const api = createApi({\n baseQuery: fetchBaseQuery({\n baseUrl: BACKEND_API_BASE_URL,\n prepareHeaders: (headers, { getState }) => {\n const state = getState() as RootState;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const token = authTokenSelector(state);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n const userLocaleFromStore = localeSelector(state);\n\n if (token) {\n headers.set(\"Authorization\", `Token ${token}`);\n }\n\n // FIXME: The userLocaleFromStore doesn't appear to work (reliably). Therefore,\n // if the user's browser language is \"en\" then it will get used,\n // even if they have set their language to \"nl\" in the app. However,\n // the i18n-based language setting (for the strings in the app) works correctly.\n\n // NOTE: This can cause issues if trying to find out the user's locale using Accept-Language\n // because we are only using the first part of the locale (e.g. \"en\" instead of \"en-US\")\n const userLocale = userLocaleFromStore || Localization.locale.split(\"-\")[0] || DEFAULT_LANGUAGE;\n\n headers.set(\"Accept-Language\", userLocale);\n\n return headers;\n },\n }),\n endpoints: () => ({}),\n});\n","import { createSelector, createSlice, PayloadAction } from \"@reduxjs/toolkit\";\n\nimport type { RootState } from \"../../../store\";\nimport type { Brand } from \"../services/backendTypes\";\n\nexport interface BrandState {\n brandingWhileLoggedOut?: Brand;\n isLoadingBrand: boolean;\n}\n\nconst initialState: BrandState = {\n brandingWhileLoggedOut: undefined,\n isLoadingBrand: false,\n};\n\nexport const brandSlice = createSlice({\n name: \"brand\",\n initialState,\n reducers: {\n storeBrandWhileLoggedOut: (state, action: PayloadAction) => {\n state.brandingWhileLoggedOut = action.payload;\n },\n setIsLoadingBrand: (state, action: PayloadAction) => {\n state.isLoadingBrand = action.payload;\n },\n },\n});\n\nconst selectSelf = (state: RootState): BrandState => state[brandSlice.name];\n\nexport const getIsLoadingBrandSelector = createSelector(\n selectSelf,\n (state: BrandState): boolean => state.isLoadingBrand\n);\n\nexport const getBrandSelector = createSelector(\n selectSelf,\n (state: BrandState): Brand | undefined => state.brandingWhileLoggedOut\n);\n","import { createSelector, createSlice } from \"@reduxjs/toolkit\";\nimport _ from \"lodash\";\n\nimport type { RootState } from \"../../../store\";\nimport type { Food, GeneratedRecipeMeal, RecipeTemplate } from \"../services/backendTypes\";\n// import logger from \"../services/logger\";\n\nexport type FoodById = { [id: string]: Food };\n\nexport interface FoodState {\n food: {\n byId: FoodById;\n };\n createOwnRecipeTemplate?: RecipeTemplate; // This is the own recipe template that is currently being created\n}\n\n// TODO: Consider using createEntityAdapter (https://redux-toolkit.js.org/api/createEntityAdapter)\nconst initialState: FoodState = {\n food: { byId: {} },\n createOwnRecipeTemplate: undefined,\n};\n\nexport const foodSlice = createSlice({\n name: \"food\",\n initialState,\n reducers: {\n storeFood(state, action: { payload: Food }) {\n const food = action.payload;\n\n if (food.id) {\n // eslint-disable-next-line no-param-reassign\n state.food.byId[food.id] = food;\n }\n },\n setCreateOwnRecipeTemplate(state, action: { payload: RecipeTemplate | undefined }) {\n // eslint-disable-next-line no-param-reassign\n state.createOwnRecipeTemplate = action.payload;\n },\n },\n});\n\nconst selectSelf = (state: RootState): FoodState => state[foodSlice.name];\n\nexport const foodSelector = createSelector(selectSelf, (state: FoodState): FoodById => state?.food?.byId ?? {});\n\nexport const createOwnRecipeTemplateSelector = createSelector(\n selectSelf,\n (state: FoodState): RecipeTemplate | undefined => state?.createOwnRecipeTemplate\n);\n","import { createSelector, createSlice } from \"@reduxjs/toolkit\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\n\nimport type { RootState } from \"../../../store\";\nimport type { CalendarDay, GroceryListListRetrieve as GroceryList } from \"../services/backendTypes\";\n// import logger from \"../services/logger\";\n\nexport type CalendarDayByDate = { [date: string]: CalendarDay };\n\nexport interface PlannerState {\n calendarDays: {\n byDate: CalendarDayByDate;\n };\n groceryLists: GroceryList[];\n currentDayInPlanner: string;\n}\n\n// TODO: Consider using createEntityAdapter (https://redux-toolkit.js.org/api/createEntityAdapter)\nconst initialState: PlannerState = {\n calendarDays: { byDate: {} },\n groceryLists: [],\n currentDayInPlanner: moment().format(),\n};\n\nexport const plannerSlice = createSlice({\n name: \"planner\",\n initialState,\n reducers: {\n storeCalendarDay(state, action: { payload: CalendarDay }) {\n const calendarDay = action.payload;\n\n // eslint-disable-next-line no-param-reassign\n state.calendarDays.byDate[calendarDay.date] = calendarDay;\n },\n resetCalendarDays(state) {\n // eslint-disable-next-line no-param-reassign\n state.calendarDays.byDate = {};\n },\n setGroceryLists(state, action: { payload: GroceryList[] }) {\n // eslint-disable-next-line no-param-reassign\n state.groceryLists = action.payload;\n },\n setCurrentDayInPlanner(state, action: { payload: string }) {\n // eslint-disable-next-line no-param-reassign\n state.currentDayInPlanner = action.payload;\n },\n },\n});\n\nconst selectSelf = (state: RootState): PlannerState => state[plannerSlice.name];\n\nexport const calendarDaysSelector = createSelector(\n selectSelf,\n (state: PlannerState): CalendarDayByDate => state?.calendarDays?.byDate ?? {}\n);\n\nexport const groceryListSelector = createSelector(\n selectSelf,\n (state: PlannerState): GroceryList[] => state?.groceryLists ?? []\n);\n\nexport const currentDayInPlannerSelector = createSelector(\n selectSelf,\n (state: PlannerState): moment.Moment => moment(state?.currentDayInPlanner)\n);\n","import AsyncStorage from \"@react-native-async-storage/async-storage\";\nimport {\n Action,\n AnyAction,\n CombinedState,\n combineReducers,\n configureStore,\n isRejectedWithValue,\n Middleware,\n MiddlewareAPI,\n ThunkAction,\n} from \"@reduxjs/toolkit\";\nimport { setupListeners } from \"@reduxjs/toolkit/query/react\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { FLUSH, PAUSE, PERSIST, PersistConfig, persistReducer, PURGE, REGISTER, REHYDRATE } from \"redux-persist\";\n\nimport { PRODUCTION } from \"./app/src/constants\";\nimport { api } from \"./app/src/services/baseApi\";\nimport logger from \"./app/src/services/logger\";\nimport { brandSlice, BrandState } from \"./app/src/slices/brandSlice\";\nimport { foodSlice, FoodState } from \"./app/src/slices/foodSlice\";\nimport { onboardingSlice, OnboardingState } from \"./app/src/slices/onboardingSlice\";\nimport { plannerSlice, PlannerState } from \"./app/src/slices/plannerSlice\";\nimport { userSlice, UserState } from \"./app/src/slices/userSlice\";\nimport i18n from \"./i18n\";\n\nconst DEFAULT_USER_FACING_GENERIC_ERROR_MESSAGE = \"Oops, something went wrong. Please try again.\";\nconst DEFAULT_USER_FACING_GENERIC_ERROR_MESSAGE_NL = \"Oops, er ging iets mis. Probeer het alsjeblieft opnieuw.\";\n\nlogger.debug(\"process.env.ENVIRONMENT:\", process.env.ENVIRONMENT);\n\nconst RUNNING_IN_CYPRESS = process.env.ENVIRONMENT === \"cypress\";\n\nif (RUNNING_IN_CYPRESS) {\n console.log(\"Running in Cypress.\");\n}\n\n/**\n * We keep this to avoid bombarding the user with multiple error messages in quick succession.\n */\nlet timeOfLastAlertToUser = 0;\n\nconst MIN_PERIOD_BETWEEN_GENERIC_ERRORS_TO_USER = 1000;\n\n/**\n * NOTE: This is brittle and will break if the name of the endpoint changes\n */\nconst GET_MY_USER_INFO_QUERYCACHEKEY = \"usersAuthUsersMeRetrieve(undefined)\";\n\nexport const rtkQueryErrorLogger: Middleware = (middlewareApi: MiddlewareAPI) => (next) => (action) => {\n if (isRejectedWithValue(action)) {\n const { type, payload, meta } = action;\n\n const invalidTokenResponseForGetUserInfo =\n meta &&\n meta.arg &&\n meta.arg.queryCacheKey === GET_MY_USER_INFO_QUERYCACHEKEY &&\n payload &&\n payload.status === 401;\n\n const errorWithCalendarDayCreation =\n meta &&\n meta.arg &&\n meta.arg.endpointName === \"plannerCalendarDayCreate\" &&\n meta.arg.type === \"mutation\" &&\n payload &&\n payload.status === 400;\n\n if (invalidTokenResponseForGetUserInfo) {\n // NOTE: This is handled where the hook is used so we don't need to do anything here.\n logger.warn(\"Invalid token - user should log in again\");\n } else if (errorWithCalendarDayCreation) {\n // NOTE: This error is due to a (relatively rare) race condition and is fixed on the next poll so we ignore it\n } else {\n logger.warn(\"We got a rejected action!\", type);\n if (RUNNING_IN_CYPRESS) {\n console.log(JSON.stringify(payload, null, 2));\n }\n\n logger.warn(\"The payload is:\", payload);\n if (RUNNING_IN_CYPRESS) {\n console.log(JSON.stringify(payload, null, 2));\n }\n\n const errorForSentry = new Error(`${String(type)} - ${JSON.stringify(payload, null, 2)}`);\n Sentry.captureException(errorForSentry);\n\n let errorMessageForUser =\n i18n.language === \"nl\"\n ? DEFAULT_USER_FACING_GENERIC_ERROR_MESSAGE_NL\n : DEFAULT_USER_FACING_GENERIC_ERROR_MESSAGE;\n\n if (payload.status === 400) {\n const { non_field_errors: nonFieldErrors } = payload.data;\n if (nonFieldErrors) {\n [errorMessageForUser] = nonFieldErrors;\n }\n\n const userHasRecentlyReceivedAGenericErrorMessage =\n timeOfLastAlertToUser + MIN_PERIOD_BETWEEN_GENERIC_ERRORS_TO_USER < Date.now();\n if (userHasRecentlyReceivedAGenericErrorMessage) {\n timeOfLastAlertToUser = Date.now();\n // TODO: We should handle this more gracefully with a UI library\n alert(errorMessageForUser);\n // Toast.warn({ title: \"Async error!\", message: action.error.data.message });\n }\n }\n\n // NOTE: This is for debugging the compiled app\n // alert(`Error with action: ${type}\\n${JSON.stringify(payload, null, 2)}`);\n }\n }\n\n return next(action);\n};\n\nconst sentryReduxEnhancer = Sentry.createReduxEnhancer();\n\nconst combinedReducers = combineReducers({\n [api.reducerPath]: api.reducer,\n [plannerSlice.name]: plannerSlice.reducer,\n [userSlice.name]: userSlice.reducer,\n [foodSlice.name]: foodSlice.reducer,\n [brandSlice.name]: brandSlice.reducer,\n [onboardingSlice.name]: onboardingSlice.reducer,\n});\n\nexport const USER_LOGOUT_ACTION = \"USER_LOGOUT\";\n\ntype RootReducerState = CombinedState<{\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n api: CombinedState;\n planner: PlannerState;\n user: UserState;\n food: FoodState;\n brand: BrandState;\n onboarding: OnboardingState;\n}>;\n\nconst rootReducer = (state: RootReducerState | undefined, action: AnyAction): RootReducerState => {\n if (action.type === USER_LOGOUT_ACTION) {\n return combinedReducers(undefined, action);\n }\n\n return combinedReducers(state, action);\n};\n\nconst persistConfig: PersistConfig = {\n key: \"root\",\n version: 1,\n storage: AsyncStorage,\n // NOTE: We believe that allowing this to be persisted causes intermittent errors and thus it should be blacklisted\n blacklist: [api.reducerPath],\n};\n\nexport const store = configureStore({\n devTools: !PRODUCTION,\n reducer: persistReducer(persistConfig, rootReducer),\n middleware: (getDefaultMiddleware) =>\n getDefaultMiddleware({\n serializableCheck: {\n ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER],\n },\n })\n .concat(api.middleware)\n .concat(rtkQueryErrorLogger),\n enhancers: [sentryReduxEnhancer],\n // TODO: Add this for development: https://github.com/leoasis/redux-immutable-state-invariant\n});\n\n// optional, but required for refetchOnFocus/refetchOnReconnect behaviors\n// see `setupListeners` docs - takes an optional callback as the 2nd arg for customization\nsetupListeners(store.dispatch);\n\nexport type AppDispatch = typeof store.dispatch;\nexport type RootState = ReturnType;\nexport type AppThunk = ThunkAction>;\n","import _ from \"lodash\";\n\nfunction isIntercomWebLoaded(): boolean {\n return typeof window !== \"undefined\" && window.Intercom && _.isFunction(window.Intercom);\n}\n\nexport function sendUpdateRequestToIntercom(): void {\n if (isIntercomWebLoaded()) {\n window.Intercom(\"update\");\n }\n}\n\nexport function sendShutdownRequestToIntercom(): void {\n if (isIntercomWebLoaded()) {\n window.Intercom(\"shutdown\");\n }\n}\n","import type { Dispatch } from \"react\";\n\nimport { USER_LOGOUT_ACTION } from \"../../../store\";\nimport analyticsInterface from \"./analyticsHelpers\";\nimport { sendShutdownRequestToIntercom } from \"./intercomHelpers\";\n\nconst { resetAnalytics } = analyticsInterface;\n\n// eslint-disable-next-line import/prefer-default-export\nexport function logout(dispatch: Dispatch): void {\n resetAnalytics();\n sendShutdownRequestToIntercom();\n\n dispatch({ type: USER_LOGOUT_ACTION });\n}\n","import { Button, Text, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { GestureResponderEvent, TextStyle, TouchableOpacity, ViewStyle } from \"react-native\";\n\ntype CommonButtonProps = {\n title: string;\n externalContainerStyle?: ViewStyle;\n onPress?: (event: GestureResponderEvent) => void;\n disable?: boolean;\n externalTextStyle?: TextStyle;\n testID?: string;\n};\n\nconst CommonButton: React.FC = ({\n title,\n onPress,\n disable,\n externalTextStyle,\n externalContainerStyle,\n testID,\n}) => {\n const theme = useTheme();\n\n return (\n \n \n \n {title}\n \n \n \n );\n};\n\nexport default CommonButton;\n","import { Box, Text } from \"native-base\";\nimport React from \"react\";\nimport { Image, ImageSourcePropType, StyleSheet, TextStyle, TouchableOpacity } from \"react-native\";\n\nimport { commonStyles, Scale, VerticalScale } from \"../constants\";\nimport type { CategoryFilter } from \"../types\";\n\nconst styles = StyleSheet.create({\n cardContainer: {\n width: Scale(96),\n height: VerticalScale(105),\n padding: Scale(16),\n textAlign: \"center\",\n marginRight: Scale(8),\n display: \"flex\",\n justifyContent: \"space-around\",\n alignItems: \"center\",\n borderWidth: 1,\n borderStyle: \"solid\",\n // borderColor: Colors.disableColor,\n borderRadius: 8,\n shadowColor: \"#cbd5e0\",\n shadowOpacity: 0.2,\n shadowOffset: {\n width: 4,\n height: 8,\n },\n },\n cardText: {\n textAlign: \"center\",\n fontWeight: \"500\",\n lineHeight: VerticalScale(18),\n marginTop: VerticalScale(8),\n },\n emojiText: {\n textAlign: \"center\",\n fontSize: Scale(32),\n lineHeight: Scale(40),\n },\n image: {\n width: Scale(40),\n height: Scale(40),\n },\n});\n\ntype CommonCategoryCardProps = {\n category: CategoryFilter;\n onPressCard: (value: string) => void;\n isSelected: boolean;\n};\n\nconst CommonCategoryCard = ({ category, isSelected, onPressCard }: CommonCategoryCardProps): JSX.Element => (\n onPressCard(category.label)} testID={`category-card-${category.value}`}>\n \n {category.type === \"emoji\" ? (\n {category.emoji}\n ) : (\n \n )}\n \n {category.label}\n \n \n \n);\n\nexport default CommonCategoryCard;\n","import React from \"react\";\nimport { StyleSheet, TextInput, View } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textBoxContainer: {\n borderWidth: StyleSheet.hairlineWidth,\n paddingHorizontal: Scale(10),\n paddingVertical: Scale(10),\n width: width / 5,\n marginRight: Scale(10),\n alignSelf: \"center\",\n marginTop: Scale(10),\n borderRadius: Scale(5),\n marginBottom: Scale(30),\n flexDirection: \"row\",\n },\n wrapper: {},\n inputContainer: { width: \"100%\" },\n});\n\ntype CommonDateTextInputProps = {\n value: string;\n placeholder: string;\n maxLength: number;\n onChangeText: (text: string) => void;\n};\n\nconst CommonDateTextInput = ({\n value,\n placeholder,\n maxLength,\n onChangeText,\n}: CommonDateTextInputProps): JSX.Element => (\n \n \n \n);\n\nexport default CommonDateTextInput;\n","import React from \"react\";\nimport { StyleSheet, Text, TextInput, TextStyle, View } from \"react-native\";\n\nimport { commonStyles, Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textStyle: {\n // color: Colors.largeTextColor,\n fontSize: Scale(15),\n },\n inputbox: {\n backgroundColor: \"white\",\n borderRadius: Scale(8),\n borderWidth: 1,\n borderStyle: \"solid\",\n // borderColor: Colors.borderColor,\n marginBottom: Scale(20),\n paddingVertical: VerticalScale(12),\n paddingHorizontal: Scale(16),\n marginTop: VerticalScale(8),\n fontSize: 16,\n minHeight: VerticalScale(72),\n },\n});\n\ntype CommonDescriptionInputProps = {\n title: string;\n externalTextStyle?: TextStyle;\n onChangeText: (text: string) => void;\n};\n\nconst CommonDescriptionInput: React.FC = ({ title, externalTextStyle, onChangeText }) => (\n \n {title}\n onChangeText(val)} />\n \n);\n\nexport default CommonDescriptionInput;\n","import React from \"react\";\nimport { Image, ImageSourcePropType, TouchableOpacity, ViewStyle } from \"react-native\";\n\ntype CommonIconButtonProps = {\n onPress?: () => void;\n size?: number;\n source: ImageSourcePropType;\n containerStyle?: ViewStyle;\n testID?: string;\n};\n\nconst CommonIconButton: React.FC = ({ containerStyle, onPress, source, size, testID }) => (\n \n \n \n);\n\nexport default CommonIconButton;\n","import { Text } from \"native-base\";\nimport React from \"react\";\nimport { StyleSheet, TextStyle } from \"react-native\";\n\nimport { Scale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textStyle: {\n // color: Colors.largeTextColor,\n fontSize: Scale(15),\n flexWrap: \"wrap\",\n overflow: \"scroll\",\n },\n});\n\ntype CommonInnerTextProps = {\n title: string;\n externalTextStyle?: TextStyle;\n};\n\nconst CommonInnerText: React.FC = ({ title, externalTextStyle, ...props }): JSX.Element => (\n \n {title}\n \n);\n\nexport default CommonInnerText;\n","import React from \"react\";\nimport { Modal, ModalProps, StyleSheet, TextStyle, View, ViewStyle } from \"react-native\";\n\nimport { Images, Scale, VerticalScale, width } from \"../constants\";\nimport CommonIconButton from \"./CommonIconButton\";\nimport CommonInnerText from \"./CommonInnerText\";\n\nconst styles = StyleSheet.create({\n centeredView: {\n flex: 1,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginTop: VerticalScale(50),\n },\n modalView: {\n backgroundColor: \"white\",\n paddingVertical: VerticalScale(24),\n width: width - Scale(24),\n borderRadius: 20,\n alignItems: \"center\",\n shadowColor: \"#000\",\n shadowOffset: {\n width: 0,\n height: 2,\n },\n shadowOpacity: 0.25,\n shadowRadius: 4,\n elevation: 5,\n },\n textStyle: {\n color: \"white\",\n fontWeight: \"bold\",\n textAlign: \"center\",\n },\n modalText: {\n marginBottom: 15,\n textAlign: \"center\",\n },\n});\n\ntype CommonModalProps = {\n modalRef: React.Ref;\n ModalContent: React.ElementType;\n FooterComponent?: React.ElementType;\n modalHeight?: number;\n onRequestClose: () => void;\n modalProps?: ModalProps;\n title?: string;\n externalModalViewStyle?: ViewStyle;\n titleExternalStyle?: TextStyle;\n};\n\nconst CommonModal = ({\n onRequestClose,\n ModalContent,\n modalHeight,\n modalRef,\n modalProps,\n title,\n externalModalViewStyle,\n titleExternalStyle,\n}: CommonModalProps): JSX.Element => (\n \n \n \n {title ? (\n \n \n \n ) : null}\n\n \n \n \n\n \n {/* NOTE: This library component has a ts compile error which we cannot fix */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n \n \n \n);\n\nexport default CommonModal;\n","import React from \"react\";\nimport { Modalize, ModalizeProps } from \"react-native-modalize\";\n\ntype CommonModalizeProps = {\n modalizeRef: React.Ref;\n ModalContent: React.ElementType;\n FooterComponent?: JSX.Element;\n modalHeight?: number;\n modalizeProps?: ModalizeProps;\n};\n\nconst CommonModalize = ({\n modalizeRef,\n ModalContent,\n FooterComponent,\n modalHeight,\n modalizeProps,\n}: CommonModalizeProps): JSX.Element => (\n FooterComponent && }\n {...modalizeProps}\n >\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n);\n\nexport default CommonModalize;\n","import { useTheme } from \"native-base\";\nimport React from \"react\";\nimport { Text } from \"react-native\";\nimport InputSpinner from \"react-native-input-spinner\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\ntype Props = {\n onChange: (val: number) => void | Promise;\n width?: number;\n value?: string | number | undefined;\n min?: number | undefined;\n step?: number | undefined;\n append?: string;\n testIdPrefix?: string;\n editable?: boolean;\n};\nconst spinnerBtnWidth = 30;\nconst CommonNumberInputWithPlusMinusButtons = ({\n width,\n append,\n min = 1,\n step = 1,\n value,\n testIdPrefix,\n onChange,\n editable = true,\n ...props\n}: Props): JSX.Element => {\n const theme = useTheme();\n\n return (\n {append}}\n value={value}\n {...props}\n />\n );\n};\n\nexport default CommonNumberInputWithPlusMinusButtons;\n","import { Text } from \"native-base\";\nimport React from \"react\";\nimport { StyleSheet, View } from \"react-native\";\n\nimport { Images, Scale, width } from \"../constants\";\nimport CommonIconButton from \"./CommonIconButton\";\n\nconst styles = StyleSheet.create({\n headerContainer: {\n paddingHorizontal: 24,\n paddingVertical: 24,\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: 24,\n },\n backIcon: {\n marginRight: 24,\n },\n textStyle: {\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n fontSize: Scale(20),\n width: width - Scale(100),\n marginLeft: Scale(20),\n },\n headerTitle: {\n fontSize: 16,\n // color: Colors.textColor,\n fontWeight: \"500\",\n },\n});\n\ntype CommonPageHeaderProps = {\n title?: string;\n showBackButton?: boolean;\n onPressBack?: () => void;\n onPressClose?: () => void;\n};\n\nconst CommonPageHeader: React.FC = ({ title, showBackButton, onPressBack, onPressClose }) => (\n \n \n {showBackButton ? : null}\n \n {title}\n \n \n {onPressClose ? : null}\n \n);\n\nexport default CommonPageHeader;\n","/* eslint-disable no-use-before-define */\nimport React from \"react\";\nimport { Image, Pressable, StyleSheet, Text, TextStyle, View } from \"react-native\";\n\nimport { commonStyles, Images, Scale } from \"../constants\";\n\ntype Props = {\n label: string;\n description?: string;\n onPress?: () => void;\n checked?: boolean;\n multipleSelectionsAllowed: boolean;\n};\n\nconst CommonRadioBox = ({ label, description, onPress, checked, multipleSelectionsAllowed }: Props): JSX.Element => (\n \n \n {checked ? : null}\n \n \n {label}\n {Boolean(description) && (\n \n {description}\n \n )}\n \n \n);\n\nexport default CommonRadioBox;\n\nconst styles = StyleSheet.create({\n containerBase: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n // backgroundColor: Colors.grey,\n padding: Scale(16),\n marginBottom: Scale(8),\n borderRadius: 4,\n borderWidth: 2,\n borderColor: \"transparent\",\n },\n checkedContainer: {\n backgroundColor: \"white\",\n // borderColor: Colors.primaryGreenColor,\n borderWidth: 2,\n },\n checkboxBase: {\n width: Scale(28),\n height: Scale(28),\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: 100,\n borderWidth: 2,\n // borderColor: Colors.borderColor,\n backgroundColor: \"white\",\n marginRight: Scale(16),\n },\n checkboxChecked: {\n borderWidth: 2,\n // borderColor: Colors.primaryGreenColor,\n // backgroundColor: Colors.primaryGreenColor,\n },\n multiCheckbox: {\n borderRadius: 4,\n },\n checkedIcon: {\n width: Scale(20),\n height: Scale(20),\n },\n descriptionText: {\n flexShrink: 1,\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n },\n});\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport { Icon, Image, Input } from \"native-base\";\nimport React from \"react\";\nimport { ImageSourcePropType, TouchableOpacity } from \"react-native\";\n\ntype Props = {\n placeholder: string;\n leftIcon?: JSX.Element;\n onChangeText: (text: string) => void;\n value?: string;\n onClearText?: () => void;\n backgroundColour?: string;\n width?: string;\n testID?: string;\n};\n\nconst CommonSearchInput = ({\n placeholder,\n onChangeText,\n onClearText,\n value,\n leftIcon,\n backgroundColour,\n width,\n testID,\n}: Props): JSX.Element => {\n const colour = \"primary.600\";\n return (\n \n \n \n ) : (\n <>\n )\n }\n borderColor={colour}\n placeholderTextColor={colour}\n borderTopWidth=\"1\"\n borderBottomWidth=\"1\"\n borderLeftWidth={\"1\"}\n borderRightWidth={\"1\"}\n borderStyle={\"solid\"}\n onChangeText={onChangeText}\n background={backgroundColour}\n testID={testID}\n />\n );\n};\n\nexport default CommonSearchInput;\n","import { CheckIcon, Select } from \"native-base\";\nimport React from \"react\";\n\ntype SelectOptionType = {\n label: string;\n value: string;\n};\n\ntype Props = {\n selectedValue: string;\n optionsList: SelectOptionType[];\n placeholder: string;\n onValueChange: (item: string) => void;\n width?: number | string;\n testID?: string;\n};\n\nconst CommonSelect = ({\n selectedValue,\n width,\n onValueChange,\n optionsList,\n placeholder,\n testID,\n}: Props): JSX.Element => (\n ,\n }}\n mt={1}\n mr={\"2\"}\n onValueChange={(itemValue) => onValueChange(itemValue)}\n testID={testID}\n >\n {optionsList.map((option: SelectOptionType, index: number) => (\n \n ))}\n \n);\n\nexport default CommonSelect;\n","import React from \"react\";\nimport { StyleSheet, Text, TextStyle } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\ntype CommonSmallTextProps = {\n title: string;\n externalTextStyle?: TextStyle;\n};\nconst styles = StyleSheet.create({\n textStyle: {\n // color: Colors.textColor,\n fontSize: Scale(14),\n lineHeight: Scale(20),\n },\n});\n\nconst CommonSmallText: React.FC = ({ title, externalTextStyle }) => (\n {title}\n);\n\nexport default CommonSmallText;\n","import { Text, View } from \"native-base\";\nimport React from \"react\";\nimport { StyleSheet, TextStyle, ViewStyle } from \"react-native\";\n\nimport { commonStyles, Scale, VerticalScale } from \"../constants\";\n\ntype CommonStepIndexProps = {\n title: string;\n externalStyle?: ViewStyle;\n};\n\nconst styles = StyleSheet.create({\n stepIndexCircle: {\n textAlign: \"center\",\n display: \"flex\",\n justifyContent: \"center\",\n flexDirection: \"row\",\n alignItems: \"center\",\n borderRadius: 100,\n width: Scale(28),\n height: Scale(28),\n // backgroundColor: Colors.primaryGreenColor,\n },\n});\n\nconst CommonStepIndex: React.FC = ({ title, externalStyle }) => (\n \n \n {title}\n \n \n);\n\nexport default CommonStepIndex;\n","import { Text } from \"native-base\";\nimport React from \"react\";\nimport { StyleSheet, TextStyle } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textStyle: {\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n fontSize: Scale(20),\n width: width - Scale(100),\n marginLeft: Scale(20),\n },\n});\n\ntype CommonTextProps = {\n title: string;\n externalTextStyle?: TextStyle;\n};\n\nconst CommonText: React.FC = ({ title, externalTextStyle }) => (\n {title}\n);\n\nexport default CommonText;\n","import React from \"react\";\nimport {\n Image,\n ImageSourcePropType,\n NativeSyntheticEvent,\n StyleSheet,\n Text,\n TextInput,\n TextInputFocusEventData,\n TextInputProps,\n TextStyle,\n TouchableOpacity,\n View,\n ViewStyle,\n} from \"react-native\";\n\nimport { Images, Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n iconContainer: {\n position: \"absolute\",\n right: Scale(8),\n justifyContent: \"center\",\n alignSelf: \"center\",\n },\n eyeIconStyle: {\n height: Scale(22),\n width: Scale(18),\n resizeMode: \"contain\",\n },\n textBoxContainer: {\n borderWidth: StyleSheet.hairlineWidth,\n paddingHorizontal: Scale(10),\n paddingVertical: Scale(10),\n width: width - Scale(40),\n alignSelf: \"center\",\n marginTop: Scale(10),\n borderRadius: Scale(5),\n marginBottom: Scale(30),\n flexDirection: \"row\",\n },\n inputContainer: { width: \"100%\" },\n wrapper: {\n marginHorizontal: Scale(20),\n },\n searchIconStyle: {\n height: Scale(18),\n width: Scale(18),\n resizeMode: \"contain\",\n marginRight: Scale(4),\n },\n});\n\ntype CommonTextInputProps = {\n title?: string;\n externalTextStyle?: TextStyle;\n password?: boolean;\n placeholder: string;\n value?: string | number;\n textWrapperExternalStyle?: TextStyle;\n onChangeText: (text: string) => void;\n onBlur?: (e: NativeSyntheticEvent) => void;\n textBoxContainerExternalStyle?: TextStyle;\n showEyeIcon?: boolean;\n textInputProps?: TextInputProps;\n placeholderTextColor?: string;\n searchIcon?: ImageSourcePropType;\n inputContainerStyle?: ViewStyle;\n onSubmitEditing?: () => void;\n testID?: string;\n};\n\nconst CommonTextInput = ({\n title,\n placeholder,\n onChangeText,\n onBlur,\n password,\n textBoxContainerExternalStyle,\n textWrapperExternalStyle,\n showEyeIcon,\n textInputProps,\n placeholderTextColor,\n searchIcon,\n externalTextStyle,\n inputContainerStyle,\n onSubmitEditing,\n testID,\n}: CommonTextInputProps): JSX.Element => (\n \n {title}\n \n {searchIcon ? : null}\n \n {showEyeIcon ? (\n \n \n \n ) : null}\n \n \n);\n\nexport default CommonTextInput;\n","import React from \"react\";\nimport { Image, ImageBackground, ImageSourcePropType, StyleSheet, Text, View } from \"react-native\";\n\nimport { Images, Scale } from \"../constants\";\nimport CommonSmallText from \"./CommonSmallText\";\n\ntype CommonWhiteContainerProps = {\n title: string;\n image?: ImageSourcePropType;\n time: string;\n};\n\nconst styles = StyleSheet.create({\n timerContainer: {\n flexDirection: \"row\",\n justifyContent: \"flex-start\",\n alignItems: \"center\",\n marginBottom: Scale(5),\n },\n timerStyle: {\n height: Scale(15),\n width: Scale(20),\n resizeMode: \"contain\",\n marginRight: Scale(3),\n },\n backgroundImageStyle: {\n width: Scale(160),\n height: Scale(223),\n overflow: \"hidden\",\n },\n containerStyle: {\n flex: 1,\n marginHorizontal: Scale(15),\n justifyContent: \"space-between\",\n paddingVertical: Scale(10),\n },\n container: {\n height: Scale(223),\n width: Scale(150),\n\n marginHorizontal: Scale(5),\n borderRadius: Scale(3),\n overflow: \"hidden\",\n },\n imageStyleContainer: {\n height: Scale(121),\n width: Scale(160),\n resizeMode: \"contain\",\n },\n wrapperComponent: { marginLeft: Scale(5), marginBottom: Scale(10) },\n});\n\nconst CommonWhiteContainer: React.FC = ({ title, time, image }) => (\n \n \n {image ? : null}\n \n \n \n \n \n \n \n \n \n);\n\nexport default CommonWhiteContainer;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScrollView, StyleSheet, Text, View } from \"react-native\";\n\nimport { CommonButton, CommonDescriptionInput, CommonPageHeader, CommonRadioBox } from \"../commons\";\nimport { commonStyles, Routes, Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n description: {\n marginTop: Scale(32),\n },\n inputbox: {\n backgroundColor: \"white\",\n borderRadius: Scale(8),\n borderWidth: 1,\n borderStyle: \"solid\",\n // borderColor: Colors.borderColor,\n marginBottom: Scale(20),\n paddingVertical: VerticalScale(12),\n paddingHorizontal: Scale(16),\n marginTop: VerticalScale(8),\n fontSize: 16,\n minHeight: VerticalScale(72),\n },\n});\n\ntype OptionItem = {\n id: number;\n label: string;\n description?: string;\n};\n\ntype ParamList = {\n SelectOptionScreen: undefined;\n ProfileStartScreen: undefined;\n AddMainGoalScreen: undefined;\n AddGenderScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n pageTitle?: string;\n pageDescription?: string;\n optionsData: OptionItem[];\n buttonText: string;\n onButtonPress: () => void;\n multipleSelectionsAllowed: boolean;\n inputLabel?: string;\n onChangeText: (text: string) => void;\n};\n\nconst SelectOptionScreen = ({\n navigation,\n optionsData,\n pageTitle,\n pageDescription,\n buttonText,\n onButtonPress,\n inputLabel,\n onChangeText,\n multipleSelectionsAllowed,\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const [selectedOptions, setSelectedOptions] = useState([]);\n\n const onPressItem = (index: number): void => {\n if (multipleSelectionsAllowed) {\n let options = [...selectedOptions];\n if (options.includes(index)) {\n options = options.filter((item) => item !== index);\n } else {\n options.push(index);\n }\n setSelectedOptions(options);\n } else {\n setSelectedOptions([index]);\n }\n };\n\n return (\n \n {\n navigation.goBack();\n }}\n onPressClose={() => {\n navigation.goBack();\n }}\n />\n\n \n \n \n {pageTitle ? {pageTitle} : null}\n {pageDescription ? (\n {pageDescription}\n ) : null}\n \n \n {optionsData.map((optionData, index) => (\n {\n onPressItem(index);\n }}\n multipleSelectionsAllowed={multipleSelectionsAllowed}\n />\n ))}\n \n\n {inputLabel ? (\n onChangeText(val)} />\n ) : null}\n \n \n\n {selectedOptions.length > 0 && (\n \n \n \n )}\n \n );\n};\n\nexport default SelectOptionScreen;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\n\nimport SelectOptionScreen from \"../components/SelectOptionScreen\";\nimport { commonStyles, Routes } from \"../constants\";\n\ntype ParamList = {\n AddGenderScreen: undefined;\n ProfileStartScreen: undefined;\n AddMainGoalScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst optionsData = [\n {\n id: 0,\n label: \"Female\",\n },\n {\n id: 1,\n label: \"Male\",\n },\n];\n\nconst AddGenderScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n {\n navigation.push(Routes.AddMainGoalScreen as keyof ParamList);\n }}\n multipleSelectionsAllowed={false}\n // FIXME:\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n navigation={navigation}\n />\n \n );\n};\nexport default AddGenderScreen;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\n\nimport SelectOptionScreen from \"../components/SelectOptionScreen\";\nimport { commonStyles, Routes } from \"../constants\";\n\ntype ParamList = {\n AddLifeStyleScreen: undefined;\n ProfileStartScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst optionsData = [\n {\n id: 0,\n label: \"Sitting\",\n description: \"office job\",\n },\n {\n id: 1,\n label: \"Light active\",\n description: \"Walking the dog every day, or cycling to \\nwork\",\n },\n {\n id: 2,\n label: \"Active\",\n description: \"Personal trainer or service; most of the\\ntime standing or walking\",\n },\n {\n id: 3,\n label: \"Very Active\",\n description: \"road worker; working intensively with \\n(heavy) materials\",\n },\n];\n\nconst AddLifeStyleScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n {\n navigation.push(Routes.AddMotivationGoalScreen as keyof ParamList);\n }}\n multipleSelectionsAllowed={false}\n // FIXME:\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n navigation={navigation}\n />\n \n );\n};\nexport default AddLifeStyleScreen;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\n\nimport SelectOptionScreen from \"../components/SelectOptionScreen\";\nimport { commonStyles, Routes } from \"../constants\";\n\ntype ParamList = {\n AddMainGoalScreen: undefined;\n ProfileStartScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst optionsData = [\n {\n id: 0,\n label: \"Gain weight\",\n description: \"Focus on building muscle\",\n },\n {\n id: 1,\n label: \"Lose weight\",\n description: \"Focus on losing fat\",\n },\n {\n id: 2,\n label: \"Maintain weight\",\n description: \"\",\n },\n];\n\nconst AddMainGoalScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n {\n navigation.push(Routes.AddMotivationGoalScreen as keyof ParamList);\n }}\n multipleSelectionsAllowed={false}\n // FIXME:\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n navigation={navigation}\n />\n \n );\n};\n\nexport default AddMainGoalScreen;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\n\nimport SelectOptionScreen from \"../components/SelectOptionScreen\";\nimport { commonStyles, Routes } from \"../constants\";\nimport logLevel from \"../services/logger\";\n\ntype ParamList = {\n AddMotivationGoalScreen: undefined;\n ProfileStartScreen: undefined;\n AddCardioSportScreen: undefined;\n RecipeSearchScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst optionsData = [\n {\n id: 0,\n label: \"I want to feel more confident\",\n },\n {\n id: 1,\n label: \"I want to be healthier\",\n },\n {\n id: 2,\n label: \"I want to avoid pain and / or injuries\",\n },\n {\n id: 3,\n label: \"I want to feel stronger\",\n },\n {\n id: 4,\n label: \"I want to look good\",\n },\n {\n id: 5,\n label: \"I want to be better for my loved ones\",\n },\n];\n\nconst AddMotivationGoalScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const [inputText, setInputText] = useState(\"\");\n return (\n \n {\n logLevel.debug(\"onPress button\");\n navigation.push(Routes.RecipeSearchScreen as keyof ParamList);\n }}\n multipleSelectionsAllowed={true}\n // FIXME:\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n navigation={navigation}\n inputLabel={\"Other, namely:\"}\n onChangeText={(text: string) => setInputText(text)}\n />\n \n );\n};\n\nexport default AddMotivationGoalScreen;\n","import convert from \"convert-units\";\nimport _ from \"lodash\";\nimport type { ITheme } from \"native-base\";\nimport React from \"react\";\nimport { Text, View } from \"react-native\";\n\nimport type {\n GeneratedRecipeMealIngredient,\n GroceryListItemUpdate as GroceryListItem,\n Ingredient,\n SuggestedServing,\n User,\n} from \"../services/backendTypes\";\nimport { formatNumberAsDecimal, formatNumberAsWholeNumberForGroceryList } from \"./generalHelpers\";\n\nexport function getIngredientInWeightStringForDisplay(\n ingredientInGrams: string,\n isServingInGrams: boolean,\n shouldWeUseImperial: boolean = false\n): string {\n if (isServingInGrams) {\n // Serving already in grams so we don't want to display it again\n return \"\";\n }\n\n if (!ingredientInGrams) {\n return \"\";\n }\n\n if (shouldWeUseImperial) {\n return \"\";\n }\n\n return ingredientInGrams;\n}\n\n/**\n *\n * @param suggestedServing\n * @param ingredient\n * @returns `{\n servingDescription: '1 tbsp',\n servingInGrams: '17g',\n nonEditableDescription: '2 tbsp',\n ingredientInGrams: '34g'\n }`\n */\nexport function getServingDescriptionText(\n suggestedServing: SuggestedServing,\n ingredient?: Ingredient | GeneratedRecipeMealIngredient,\n shouldWeUseImperial: boolean = false\n): {\n servingInGrams: string;\n nonEditableDescription: string;\n ingredientInGrams: string | undefined;\n isServingInGrams: boolean;\n unit: string;\n} {\n let servingDescription = suggestedServing ? suggestedServing.serving_description : \"\";\n\n const isServingInGrams = servingDescription.endsWith(\" g\");\n\n if (ingredient && servingDescription === ingredient.name) {\n servingDescription = \"\";\n }\n\n const servingInGrams = suggestedServing.one_serving_in_metric_value\n ? `${suggestedServing.one_serving_in_metric_value}g`\n : \"\";\n\n // NOTE: This was previous code for a non-editable description. It is here if it is of use for other functionality\n const quantityOfServingDescription = parseFloat(servingDescription);\n const isQuantityOfServingDescriptionANumber = !Number.isNaN(quantityOfServingDescription);\n\n let unit = _(servingDescription).split(\" \").tail().join(\" \");\n\n // https://regex101.com/r/BStwwN/1\n const GRAMS_SERVING_DESCRIPTION_REGEX = /[0-9]+g$/;\n if (GRAMS_SERVING_DESCRIPTION_REGEX.test(servingDescription)) {\n unit = \"g\";\n }\n\n let nonEditableDescription = servingDescription;\n let ingredientInGrams;\n if (ingredient) {\n if (suggestedServing.one_serving_in_metric_value) {\n ingredientInGrams = `${formatNumberAsDecimal(\n ingredient.quantity * suggestedServing.one_serving_in_metric_value,\n 2\n )}g`;\n }\n\n const quantityForDisplay = parseFloat(formatNumberAsDecimal(ingredient.quantity * quantityOfServingDescription, 2));\n\n nonEditableDescription = !isQuantityOfServingDescriptionANumber\n ? `${ingredient.quantity} ${_.truncate(servingDescription)}`\n : `${quantityForDisplay} ${unit}`;\n\n // NOTE: 0.66 is rounded to 0.67 so we add it here\n const normalNumberFactors = [1, 0.5, 0.25, 0.33, 0.66, 0.67];\n const quantityForDisplayIsNotAUsualNumber = !_.some(\n normalNumberFactors,\n (factor) => quantityForDisplay % factor !== 0\n );\n const quantityForDisplayIsNotAWholeNumber = quantityForDisplay % 1 !== 0;\n\n if (quantityForDisplayIsNotAWholeNumber && quantityForDisplayIsNotAUsualNumber && ingredientInGrams) {\n nonEditableDescription = ingredientInGrams;\n }\n\n const ingredientInWeightStringForDisplay = getIngredientInWeightStringForDisplay(\n ingredientInGrams || \"\",\n isServingInGrams,\n shouldWeUseImperial\n );\n\n if (ingredientInWeightStringForDisplay) {\n nonEditableDescription = `${nonEditableDescription} (${ingredientInWeightStringForDisplay})`;\n }\n }\n\n return { servingInGrams, nonEditableDescription, ingredientInGrams, isServingInGrams, unit };\n}\n\nexport function shouldWeUseImperialForThisUser(user: User): boolean {\n if (user.uses_imperial_measurements || user.is_coach) {\n return Boolean(user.uses_imperial_measurements);\n }\n\n if (!user.coach) {\n return Boolean(user.uses_imperial_measurements);\n }\n\n return Boolean(user.coach.uses_imperial_measurements);\n}\n\nexport function createIngredientDescriptionComponent(\n ingredient: Ingredient | GeneratedRecipeMealIngredient,\n theme: ITheme,\n user: User | null\n): JSX.Element {\n if (!ingredient.suggested_serving) {\n console.warn(\n `Ingredient ${\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n ingredient.id || \"GENERATED_RECIPE_MEAL_INGREDIENT\"\n } does not have a suggested_serving. This is unexpected and should be investigated.`\n );\n\n return <>;\n }\n\n const { unit, ingredientInGrams, isServingInGrams } = getServingDescriptionText(\n ingredient.suggested_serving,\n ingredient\n );\n const doNotShowIngredientInGrams = user ? shouldWeUseImperialForThisUser(user) : false;\n\n return (\n \n {/* NOTE: This empty view is required to make the two elements stack vertically */}\n \n {!isServingInGrams ? (\n \n {_.truncate(unit)}{\" \"}\n \n ) : null}\n {ingredientInGrams && !doNotShowIngredientInGrams ? (\n \n {` (${ingredientInGrams})`}\n \n ) : null}\n \n \n );\n}\n\nexport function groceryListItemIsLiquid(suggestedServing: SuggestedServing): boolean {\n /**\n * NOTE: The backend converts all liquid measurements to ml (because most Foods don't have imperial SuggestedServings)\n */\n\n return suggestedServing.measurement_description === \"ml\";\n}\n\nexport function formatGroceryListItemQuantity(quantity: number): string {\n const formatted = formatNumberAsWholeNumberForGroceryList(quantity);\n\n if (formatted === \"0\") {\n return \"1\";\n }\n\n return formatted;\n}\n\nexport const getGroceryListItemInWeight = (item: GroceryListItem, shouldUseImperial = false): string => {\n // Eg, eggs have no \"unit\"\n const itemWithoutUnit = item.name === item.suggested_serving.measurement_description;\n if (itemWithoutUnit || !item.suggested_serving.one_serving_in_metric_value) return String(item.quantity);\n\n const itemTotalInMetric = item.quantity * item.suggested_serving.one_serving_in_metric_value;\n\n if (shouldUseImperial) {\n if (groceryListItemIsLiquid(item.suggested_serving)) {\n const itemTotalInMetricVolume = convert(itemTotalInMetric).from(\"ml\").to(\"fl-oz\");\n return `${formatGroceryListItemQuantity(itemTotalInMetricVolume)} fl oz`;\n }\n\n const itemTotalInMetricMass = convert(itemTotalInMetric).from(\"g\").to(\"oz\");\n return `${formatGroceryListItemQuantity(itemTotalInMetricMass)} oz`;\n }\n\n return `${formatNumberAsWholeNumberForGroceryList(itemTotalInMetric)} g`;\n};\n\nexport function isInstagramExternalSource(url: string): boolean {\n return url.includes(\"instagram.com\");\n}\n","import { api } from \"./baseApi\";\nconst injectedRtkApi = api.injectEndpoints({\n endpoints: (build) => ({\n checkoutSubscriptionVerificationCreate: build.mutation<\n CheckoutSubscriptionVerificationCreateApiResponse,\n CheckoutSubscriptionVerificationCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/checkout/subscription-verification/`,\n method: \"POST\",\n body: queryArg.subscriptionVerificationRequest,\n }),\n }),\n foodCreateRecipeCreate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/createRecipe/`,\n method: \"POST\",\n body: queryArg.createNewRecipeTemplateRequest,\n }),\n }),\n foodFoodList: build.query({\n query: (queryArg) => ({ url: `/api/food/food/`, params: { page: queryArg.page } }),\n }),\n foodFoodRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/food/${queryArg.id}/` }),\n }),\n foodGenerateMealsList: build.query({\n query: (queryArg) => ({\n url: `/api/food/generateMeals/`,\n params: {\n author: queryArg.author,\n date_to_plan_for: queryArg.dateToPlanFor,\n favourite: queryArg.favourite,\n id: queryArg.id,\n ingredient_search: queryArg.ingredientSearch,\n kcal: queryArg.kcal,\n meal_slot_specification: queryArg.mealSlotSpecification,\n meal_types: queryArg.mealTypes,\n page: queryArg.page,\n page_size: queryArg.pageSize,\n preparation_time_min__gte: queryArg.preparationTimeMinGte,\n preparation_time_min__lte: queryArg.preparationTimeMinLte,\n protein: queryArg.protein,\n published: queryArg.published,\n source_provider: queryArg.sourceProvider,\n tags: queryArg.tags,\n user: queryArg.user,\n },\n }),\n }),\n foodGenerateMealsCreate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/generateMeals/`,\n method: \"POST\",\n body: queryArg.generatedRecipeMealRequest,\n }),\n }),\n foodIngredientList: build.query({\n query: (queryArg) => ({ url: `/api/food/ingredient/`, params: { name: queryArg.name, page: queryArg.page } }),\n }),\n foodIngredientCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/food/ingredient/`, method: \"POST\", body: queryArg.ingredientPostRequest }),\n }),\n foodIngredientRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/ingredient/${queryArg.id}/` }),\n }),\n foodIngredientUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/ingredient/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.ingredientRequest,\n }),\n }),\n foodIngredientPartialUpdate: build.mutation<\n FoodIngredientPartialUpdateApiResponse,\n FoodIngredientPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/ingredient/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedIngredientRequest,\n }),\n }),\n foodIngredientDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/food/ingredient/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodIngredientToAvoidList: build.query({\n query: (queryArg) => ({ url: `/api/food/ingredientToAvoid/`, params: { page: queryArg.page } }),\n }),\n foodIngredientToAvoidRetrieve: build.query<\n FoodIngredientToAvoidRetrieveApiResponse,\n FoodIngredientToAvoidRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/ingredientToAvoid/${queryArg.id}/` }),\n }),\n foodPreferredSuggestedServingsList: build.query<\n FoodPreferredSuggestedServingsListApiResponse,\n FoodPreferredSuggestedServingsListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/preferredSuggestedServings/`,\n params: { organisation_id: queryArg.organisationId, page: queryArg.page, query: queryArg.query },\n }),\n }),\n foodPreferredSuggestedServingsCreate: build.mutation<\n FoodPreferredSuggestedServingsCreateApiResponse,\n FoodPreferredSuggestedServingsCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/preferredSuggestedServings/`,\n method: \"POST\",\n body: queryArg.preferredSuggestedServingRequest,\n }),\n }),\n foodPreferredSuggestedServingsRetrieve: build.query<\n FoodPreferredSuggestedServingsRetrieveApiResponse,\n FoodPreferredSuggestedServingsRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/preferredSuggestedServings/${queryArg.id}/` }),\n }),\n foodPreferredSuggestedServingsUpdate: build.mutation<\n FoodPreferredSuggestedServingsUpdateApiResponse,\n FoodPreferredSuggestedServingsUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/preferredSuggestedServings/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.preferredSuggestedServingRequest,\n }),\n }),\n foodPreferredSuggestedServingsPartialUpdate: build.mutation<\n FoodPreferredSuggestedServingsPartialUpdateApiResponse,\n FoodPreferredSuggestedServingsPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/preferredSuggestedServings/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedPreferredSuggestedServingRequest,\n }),\n }),\n foodPreferredSuggestedServingsDestroy: build.mutation<\n FoodPreferredSuggestedServingsDestroyApiResponse,\n FoodPreferredSuggestedServingsDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/preferredSuggestedServings/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodQuickAddMealList: build.query({\n query: (queryArg) => ({ url: `/api/food/quickAddMeal/`, params: { page: queryArg.page } }),\n }),\n foodQuickAddMealCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/food/quickAddMeal/`, method: \"POST\", body: queryArg.quickAddMealRequest }),\n }),\n foodQuickAddMealRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/quickAddMeal/${queryArg.id}/` }),\n }),\n foodQuickAddMealUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/quickAddMeal/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.quickAddMealRequest,\n }),\n }),\n foodQuickAddMealPartialUpdate: build.mutation<\n FoodQuickAddMealPartialUpdateApiResponse,\n FoodQuickAddMealPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/quickAddMeal/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedQuickAddMealRequest,\n }),\n }),\n foodQuickAddMealDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/food/quickAddMeal/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodRecipeFeedbackLineItemList: build.query<\n FoodRecipeFeedbackLineItemListApiResponse,\n FoodRecipeFeedbackLineItemListApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/recipeFeedbackLineItem/`, params: { page: queryArg.page } }),\n }),\n foodRecipeFeedbackLineItemCreate: build.mutation<\n FoodRecipeFeedbackLineItemCreateApiResponse,\n FoodRecipeFeedbackLineItemCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/recipeFeedbackLineItem/`,\n method: \"POST\",\n body: queryArg.recipeFeedbackLineItemRequest,\n }),\n }),\n foodRecipeFeedbackLineItemRetrieve: build.query<\n FoodRecipeFeedbackLineItemRetrieveApiResponse,\n FoodRecipeFeedbackLineItemRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/recipeFeedbackLineItem/${queryArg.id}/` }),\n }),\n foodRecipeFeedbackLineItemUpdate: build.mutation<\n FoodRecipeFeedbackLineItemUpdateApiResponse,\n FoodRecipeFeedbackLineItemUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/recipeFeedbackLineItem/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.recipeFeedbackLineItemRequest,\n }),\n }),\n foodRecipeFeedbackLineItemPartialUpdate: build.mutation<\n FoodRecipeFeedbackLineItemPartialUpdateApiResponse,\n FoodRecipeFeedbackLineItemPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/recipeFeedbackLineItem/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedRecipeFeedbackLineItemRequest,\n }),\n }),\n foodRecipeFeedbackLineItemDestroy: build.mutation<\n FoodRecipeFeedbackLineItemDestroyApiResponse,\n FoodRecipeFeedbackLineItemDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/recipeFeedbackLineItem/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodRecipeMealList: build.query({\n query: (queryArg) => ({ url: `/api/food/recipeMeal/`, params: { page: queryArg.page } }),\n }),\n foodRecipeMealCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/food/recipeMeal/`, method: \"POST\", body: queryArg.recipeMealRequest }),\n }),\n foodRecipeMealRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/recipeMeal/${queryArg.id}/` }),\n }),\n foodRecipeMealUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/recipeMeal/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.recipeMealRequest,\n }),\n }),\n foodRecipeMealPartialUpdate: build.mutation<\n FoodRecipeMealPartialUpdateApiResponse,\n FoodRecipeMealPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/recipeMeal/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedRecipeMealRequest,\n }),\n }),\n foodRecipeMealDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/food/recipeMeal/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodRecipeTagList: build.query({\n query: (queryArg) => ({ url: `/api/food/recipeTag/`, params: { page: queryArg.page } }),\n }),\n foodRecipeTagRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/recipeTag/${queryArg.id}/` }),\n }),\n foodRecipeTemplateList: build.query({\n query: (queryArg) => ({\n url: `/api/food/recipeTemplate/`,\n params: {\n author: queryArg.author,\n favourite: queryArg.favourite,\n id: queryArg.id,\n ingredient_search: queryArg.ingredientSearch,\n meal_types: queryArg.mealTypes,\n page: queryArg.page,\n preparation_time_min__gte: queryArg.preparationTimeMinGte,\n preparation_time_min__lte: queryArg.preparationTimeMinLte,\n published: queryArg.published,\n source_provider: queryArg.sourceProvider,\n tags: queryArg.tags,\n user: queryArg.user,\n },\n }),\n }),\n foodRecipeTemplateCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/food/recipeTemplate/`, method: \"POST\", body: queryArg.recipeTemplateRequest }),\n }),\n foodRecipeTemplateRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/recipeTemplate/${queryArg.id}/` }),\n }),\n foodRecipeTemplateUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/recipeTemplate/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.recipeTemplateRequest,\n }),\n }),\n foodRecipeTemplatePartialUpdate: build.mutation<\n FoodRecipeTemplatePartialUpdateApiResponse,\n FoodRecipeTemplatePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/recipeTemplate/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedRecipeTemplateRequest,\n }),\n }),\n foodRecipeTemplateDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/food/recipeTemplate/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodSearchList: build.query({\n query: (queryArg) => ({ url: `/api/food/search`, params: { query: queryArg.query } }),\n }),\n foodSearchAutocompleteRetrieve: build.query<\n FoodSearchAutocompleteRetrieveApiResponse,\n FoodSearchAutocompleteRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/search/autocomplete`, params: { query: queryArg.query } }),\n }),\n foodSearchByBarcodeRetrieve: build.query(\n {\n query: (queryArg) => ({ url: `/api/food/search/byBarcode`, params: { barcode: queryArg.barcode } }),\n }\n ),\n foodSingleFoodMealList: build.query({\n query: (queryArg) => ({ url: `/api/food/singleFoodMeal/`, params: { page: queryArg.page } }),\n }),\n foodSingleFoodMealCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/food/singleFoodMeal/`, method: \"POST\", body: queryArg.singleFoodMealRequest }),\n }),\n foodSingleFoodMealRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/food/singleFoodMeal/${queryArg.id}/` }),\n }),\n foodSingleFoodMealUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/food/singleFoodMeal/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.singleFoodMealRequest,\n }),\n }),\n foodSingleFoodMealPartialUpdate: build.mutation<\n FoodSingleFoodMealPartialUpdateApiResponse,\n FoodSingleFoodMealPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/singleFoodMeal/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedSingleFoodMealRequest,\n }),\n }),\n foodSingleFoodMealDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/food/singleFoodMeal/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n foodSuggestedServingList: build.query({\n query: (queryArg) => ({ url: `/api/food/suggestedServing/`, params: { page: queryArg.page } }),\n }),\n foodSuggestedServingRetrieve: build.query<\n FoodSuggestedServingRetrieveApiResponse,\n FoodSuggestedServingRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/suggestedServing/${queryArg.id}/` }),\n }),\n foodSuggestedServingSearchList: build.query<\n FoodSuggestedServingSearchListApiResponse,\n FoodSuggestedServingSearchListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/food/suggestedServingSearch/`,\n params: { food__source_provider: queryArg.foodSourceProvider, page: queryArg.page, query: queryArg.query },\n }),\n }),\n foodSuggestedServingSearchRetrieve: build.query<\n FoodSuggestedServingSearchRetrieveApiResponse,\n FoodSuggestedServingSearchRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/food/suggestedServingSearch/${queryArg.id}/` }),\n }),\n measurementsUserBodyFatPercentageList: build.query<\n MeasurementsUserBodyFatPercentageListApiResponse,\n MeasurementsUserBodyFatPercentageListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserBodyFatPercentage/`,\n params: { page: queryArg.page, user: queryArg.user },\n }),\n }),\n measurementsUserBodyFatPercentageCreate: build.mutation<\n MeasurementsUserBodyFatPercentageCreateApiResponse,\n MeasurementsUserBodyFatPercentageCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserBodyFatPercentage/`,\n method: \"POST\",\n body: queryArg.userBodyFatPercentageRequest,\n }),\n }),\n measurementsUserBodyFatPercentageRetrieve: build.query<\n MeasurementsUserBodyFatPercentageRetrieveApiResponse,\n MeasurementsUserBodyFatPercentageRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserBodyFatPercentage/${queryArg.id}/` }),\n }),\n measurementsUserBodyFatPercentageUpdate: build.mutation<\n MeasurementsUserBodyFatPercentageUpdateApiResponse,\n MeasurementsUserBodyFatPercentageUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserBodyFatPercentage/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userBodyFatPercentageRequest,\n }),\n }),\n measurementsUserBodyFatPercentagePartialUpdate: build.mutation<\n MeasurementsUserBodyFatPercentagePartialUpdateApiResponse,\n MeasurementsUserBodyFatPercentagePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserBodyFatPercentage/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserBodyFatPercentageRequest,\n }),\n }),\n measurementsUserBodyFatPercentageDestroy: build.mutation<\n MeasurementsUserBodyFatPercentageDestroyApiResponse,\n MeasurementsUserBodyFatPercentageDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserBodyFatPercentage/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n measurementsUserDistanceList: build.query<\n MeasurementsUserDistanceListApiResponse,\n MeasurementsUserDistanceListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserDistance/`,\n params: { page: queryArg.page, user: queryArg.user },\n }),\n }),\n measurementsUserDistanceCreate: build.mutation<\n MeasurementsUserDistanceCreateApiResponse,\n MeasurementsUserDistanceCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserDistance/`,\n method: \"POST\",\n body: queryArg.userDistanceRequest,\n }),\n }),\n measurementsUserDistanceRetrieve: build.query<\n MeasurementsUserDistanceRetrieveApiResponse,\n MeasurementsUserDistanceRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserDistance/${queryArg.id}/` }),\n }),\n measurementsUserDistanceUpdate: build.mutation<\n MeasurementsUserDistanceUpdateApiResponse,\n MeasurementsUserDistanceUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserDistance/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userDistanceRequest,\n }),\n }),\n measurementsUserDistancePartialUpdate: build.mutation<\n MeasurementsUserDistancePartialUpdateApiResponse,\n MeasurementsUserDistancePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserDistance/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserDistanceRequest,\n }),\n }),\n measurementsUserDistanceDestroy: build.mutation<\n MeasurementsUserDistanceDestroyApiResponse,\n MeasurementsUserDistanceDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserDistance/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n measurementsUserSleepList: build.query({\n query: (queryArg) => ({\n url: `/api/measurements/UserSleep/`,\n params: { page: queryArg.page, user: queryArg.user },\n }),\n }),\n measurementsUserSleepCreate: build.mutation<\n MeasurementsUserSleepCreateApiResponse,\n MeasurementsUserSleepCreateApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserSleep/`, method: \"POST\", body: queryArg.userSleepRequest }),\n }),\n measurementsUserSleepRetrieve: build.query<\n MeasurementsUserSleepRetrieveApiResponse,\n MeasurementsUserSleepRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserSleep/${queryArg.id}/` }),\n }),\n measurementsUserSleepUpdate: build.mutation<\n MeasurementsUserSleepUpdateApiResponse,\n MeasurementsUserSleepUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserSleep/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userSleepRequest,\n }),\n }),\n measurementsUserSleepPartialUpdate: build.mutation<\n MeasurementsUserSleepPartialUpdateApiResponse,\n MeasurementsUserSleepPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserSleep/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserSleepRequest,\n }),\n }),\n measurementsUserSleepDestroy: build.mutation<\n MeasurementsUserSleepDestroyApiResponse,\n MeasurementsUserSleepDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserSleep/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n measurementsUserStressList: build.query({\n query: (queryArg) => ({\n url: `/api/measurements/UserStress/`,\n params: { page: queryArg.page, user: queryArg.user },\n }),\n }),\n measurementsUserStressCreate: build.mutation<\n MeasurementsUserStressCreateApiResponse,\n MeasurementsUserStressCreateApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserStress/`, method: \"POST\", body: queryArg.userStressRequest }),\n }),\n measurementsUserStressRetrieve: build.query<\n MeasurementsUserStressRetrieveApiResponse,\n MeasurementsUserStressRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserStress/${queryArg.id}/` }),\n }),\n measurementsUserStressUpdate: build.mutation<\n MeasurementsUserStressUpdateApiResponse,\n MeasurementsUserStressUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserStress/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userStressRequest,\n }),\n }),\n measurementsUserStressPartialUpdate: build.mutation<\n MeasurementsUserStressPartialUpdateApiResponse,\n MeasurementsUserStressPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/UserStress/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserStressRequest,\n }),\n }),\n measurementsUserStressDestroy: build.mutation<\n MeasurementsUserStressDestroyApiResponse,\n MeasurementsUserStressDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/UserStress/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n measurementsDeleteMeasurementCreate: build.mutation<\n MeasurementsDeleteMeasurementCreateApiResponse,\n MeasurementsDeleteMeasurementCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/deleteMeasurement/`,\n method: \"POST\",\n body: queryArg.deleteMeasurementRequest,\n }),\n }),\n measurementsUserWeightList: build.query({\n query: (queryArg) => ({\n url: `/api/measurements/userWeight/`,\n params: { page: queryArg.page, user: queryArg.user },\n }),\n }),\n measurementsUserWeightCreate: build.mutation<\n MeasurementsUserWeightCreateApiResponse,\n MeasurementsUserWeightCreateApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/userWeight/`, method: \"POST\", body: queryArg.userWeightRequest }),\n }),\n measurementsUserWeightRetrieve: build.query<\n MeasurementsUserWeightRetrieveApiResponse,\n MeasurementsUserWeightRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/userWeight/${queryArg.id}/` }),\n }),\n measurementsUserWeightUpdate: build.mutation<\n MeasurementsUserWeightUpdateApiResponse,\n MeasurementsUserWeightUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/userWeight/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userWeightRequest,\n }),\n }),\n measurementsUserWeightPartialUpdate: build.mutation<\n MeasurementsUserWeightPartialUpdateApiResponse,\n MeasurementsUserWeightPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/measurements/userWeight/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserWeightRequest,\n }),\n }),\n measurementsUserWeightDestroy: build.mutation<\n MeasurementsUserWeightDestroyApiResponse,\n MeasurementsUserWeightDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/measurements/userWeight/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n plannerAutoPlanDayCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/autoPlanDay`, method: \"POST\", body: queryArg.autoPlannerRequest }),\n }),\n plannerAutoPlanDaysCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/autoPlanDays`, method: \"POST\", body: queryArg.autoPlanDaysRequest }),\n }),\n plannerCalendarDayList: build.query({\n query: (queryArg) => ({\n url: `/api/planner/calendarDay/`,\n params: {\n date__gte: queryArg.dateGte,\n date__lt: queryArg.dateLt,\n date__lte: queryArg.dateLte,\n page: queryArg.page,\n user: queryArg.user,\n },\n }),\n }),\n plannerCalendarDayCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/calendarDay/`, method: \"POST\", body: queryArg.calendarDayRequest }),\n }),\n plannerCalendarDayRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/planner/calendarDay/${queryArg.id}/` }),\n }),\n plannerCalendarDayUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/planner/calendarDay/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.calendarDayRequest,\n }),\n }),\n plannerCalendarDayPartialUpdate: build.mutation<\n PlannerCalendarDayPartialUpdateApiResponse,\n PlannerCalendarDayPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/calendarDay/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedCalendarDayRequest,\n }),\n }),\n plannerCalendarDayDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/calendarDay/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n plannerCalendarItemList: build.query({\n query: (queryArg) => ({\n url: `/api/planner/calendarItem/`,\n params: { calendar_day__user: queryArg.calendarDayUser, page: queryArg.page },\n }),\n }),\n plannerCalendarItemCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/calendarItem/`, method: \"POST\", body: queryArg.calendarItemRequest }),\n }),\n plannerCalendarItemRetrieve: build.query(\n {\n query: (queryArg) => ({ url: `/api/planner/calendarItem/${queryArg.id}/` }),\n }\n ),\n plannerCalendarItemUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/planner/calendarItem/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.calendarItemRequest,\n }),\n }),\n plannerCalendarItemPartialUpdate: build.mutation<\n PlannerCalendarItemPartialUpdateApiResponse,\n PlannerCalendarItemPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/calendarItem/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedCalendarItemRequest,\n }),\n }),\n plannerCalendarItemDestroy: build.mutation(\n {\n query: (queryArg) => ({ url: `/api/planner/calendarItem/${queryArg.id}/`, method: \"DELETE\" }),\n }\n ),\n plannerCopyMealsFromDateCreate: build.mutation<\n PlannerCopyMealsFromDateCreateApiResponse,\n PlannerCopyMealsFromDateCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/copyMealsFromDate/`,\n method: \"POST\",\n body: queryArg.copyFromDateRequest,\n }),\n }),\n plannerCopyMealsToMealMomentCreate: build.mutation<\n PlannerCopyMealsToMealMomentCreateApiResponse,\n PlannerCopyMealsToMealMomentCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/copyMealsToMealMoment/`,\n method: \"POST\",\n body: queryArg.copyMealsToMealMomentRequest,\n }),\n }),\n plannerEditRecipeMealPortionsUpdate: build.mutation<\n PlannerEditRecipeMealPortionsUpdateApiResponse,\n PlannerEditRecipeMealPortionsUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/editRecipeMealPortions/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.recipeMealPotionsRequest,\n }),\n }),\n plannerGroceryListList: build.query({\n query: (queryArg) => ({ url: `/api/planner/groceryList/`, params: { page: queryArg.page, user: queryArg.user } }),\n }),\n plannerGroceryListCreate: build.mutation({\n query: (queryArg) => ({\n url: `/api/planner/groceryList/`,\n method: \"POST\",\n body: queryArg.groceryListUpdateCreateRequest,\n }),\n }),\n plannerGroceryListRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/planner/groceryList/${queryArg.id}/` }),\n }),\n plannerGroceryListUpdate: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/groceryList/${queryArg.id}/`, method: \"PUT\" }),\n }),\n plannerGroceryListPartialUpdate: build.mutation<\n PlannerGroceryListPartialUpdateApiResponse,\n PlannerGroceryListPartialUpdateApiArg\n >({\n query: (queryArg) => ({ url: `/api/planner/groceryList/${queryArg.id}/`, method: \"PATCH\" }),\n }),\n plannerGroceryListDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/planner/groceryList/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n plannerGroceryListItemPartialUpdate: build.mutation<\n PlannerGroceryListItemPartialUpdateApiResponse,\n PlannerGroceryListItemPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/groceryListItem/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedGroceryListItemUpdateRequest,\n }),\n }),\n plannerPlanGeneratedRecipeMealCreate: build.mutation<\n PlannerPlanGeneratedRecipeMealCreateApiResponse,\n PlannerPlanGeneratedRecipeMealCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/planGeneratedRecipeMeal/`,\n method: \"POST\",\n body: queryArg.planGeneratedRecipeMealRequest,\n }),\n }),\n plannerPlanSingleFoodMealCreate: build.mutation<\n PlannerPlanSingleFoodMealCreateApiResponse,\n PlannerPlanSingleFoodMealCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/planSingleFoodMeal/`,\n method: \"POST\",\n body: queryArg.planSingleFoodMealRequest,\n }),\n }),\n plannerSaveAndPlanRecipeMealCreate: build.mutation<\n PlannerSaveAndPlanRecipeMealCreateApiResponse,\n PlannerSaveAndPlanRecipeMealCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/planner/saveAndPlanRecipeMeal/`,\n method: \"POST\",\n body: queryArg.saveAndPlanRecipeTemplateRequest,\n }),\n }),\n schemaRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/schema/`, params: { format: queryArg.format, lang: queryArg.lang } }),\n }),\n usersAuthTokenLoginCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/auth/token/login/`, method: \"POST\", body: queryArg.tokenCreateRequest }),\n }),\n usersAuthTokenLogoutCreate: build.mutation(\n {\n query: () => ({ url: `/api/users/auth/token/logout/`, method: \"POST\" }),\n }\n ),\n usersAuthUsersList: build.query({\n query: (queryArg) => ({ url: `/api/users/auth/users/`, params: { page: queryArg.page } }),\n }),\n usersAuthUsersCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/auth/users/`, method: \"POST\", body: queryArg.customUserCreateRequest }),\n }),\n usersAuthUsersRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/users/auth/users/${queryArg.id}/` }),\n }),\n usersAuthUsersUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/users/auth/users/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userRequest,\n }),\n }),\n usersAuthUsersPartialUpdate: build.mutation<\n UsersAuthUsersPartialUpdateApiResponse,\n UsersAuthUsersPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserRequest,\n }),\n }),\n usersAuthUsersDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/users/auth/users/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersAuthUsersActivationCreate: build.mutation<\n UsersAuthUsersActivationCreateApiResponse,\n UsersAuthUsersActivationCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/activation/`,\n method: \"POST\",\n body: queryArg.activationRequest,\n }),\n }),\n usersAuthUsersMeRetrieve: build.query({\n query: () => ({ url: `/api/users/auth/users/me/` }),\n }),\n usersAuthUsersMeUpdate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/auth/users/me/`, method: \"PUT\", body: queryArg.userRequest }),\n }),\n usersAuthUsersMePartialUpdate: build.mutation<\n UsersAuthUsersMePartialUpdateApiResponse,\n UsersAuthUsersMePartialUpdateApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/auth/users/me/`, method: \"PATCH\", body: queryArg.patchedUserRequest }),\n }),\n usersAuthUsersMeDestroy: build.mutation({\n query: () => ({ url: `/api/users/auth/users/me/`, method: \"DELETE\" }),\n }),\n usersAuthUsersResendActivationCreate: build.mutation<\n UsersAuthUsersResendActivationCreateApiResponse,\n UsersAuthUsersResendActivationCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/resend_activation/`,\n method: \"POST\",\n body: queryArg.sendEmailResetRequest,\n }),\n }),\n usersAuthUsersResetEmailCreate: build.mutation<\n UsersAuthUsersResetEmailCreateApiResponse,\n UsersAuthUsersResetEmailCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/reset_email/`,\n method: \"POST\",\n body: queryArg.sendEmailResetRequest,\n }),\n }),\n usersAuthUsersResetEmailConfirmCreate: build.mutation<\n UsersAuthUsersResetEmailConfirmCreateApiResponse,\n UsersAuthUsersResetEmailConfirmCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/reset_email_confirm/`,\n method: \"POST\",\n body: queryArg.usernameResetConfirmRequest,\n }),\n }),\n usersAuthUsersResetPasswordCreate: build.mutation<\n UsersAuthUsersResetPasswordCreateApiResponse,\n UsersAuthUsersResetPasswordCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/reset_password/`,\n method: \"POST\",\n body: queryArg.sendEmailResetRequest,\n }),\n }),\n usersAuthUsersResetPasswordConfirmCreate: build.mutation<\n UsersAuthUsersResetPasswordConfirmCreateApiResponse,\n UsersAuthUsersResetPasswordConfirmCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/reset_password_confirm/`,\n method: \"POST\",\n body: queryArg.passwordResetConfirmRequest,\n }),\n }),\n usersAuthUsersSetEmailCreate: build.mutation<\n UsersAuthUsersSetEmailCreateApiResponse,\n UsersAuthUsersSetEmailCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/set_email/`,\n method: \"POST\",\n body: queryArg.setUsernameRequest,\n }),\n }),\n usersAuthUsersSetPasswordCreate: build.mutation<\n UsersAuthUsersSetPasswordCreateApiResponse,\n UsersAuthUsersSetPasswordCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/auth/users/set_password/`,\n method: \"POST\",\n body: queryArg.setPasswordRequest,\n }),\n }),\n usersBrandList: build.query({\n query: (queryArg) => ({ url: `/api/users/brand/`, params: { page: queryArg.page } }),\n }),\n usersBrandRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/users/brand/${queryArg.subdomain}/` }),\n }),\n usersCancelDealCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/cancelDeal`, method: \"POST\", body: queryArg.cancelSubscriptionRequest }),\n }),\n usersClientsList: build.query({\n query: () => ({ url: `/api/users/clients/` }),\n }),\n usersClientsCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/clients/`, method: \"POST\", body: queryArg.userRequest }),\n }),\n usersClientsRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/users/clients/${queryArg.id}/` }),\n }),\n usersClientsUpdate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/clients/${queryArg.id}/`, method: \"PUT\", body: queryArg.userRequest }),\n }),\n usersClientsPartialUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/users/clients/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserRequest,\n }),\n }),\n usersClientsDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/users/clients/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersCreateDemoAccountCreate: build.mutation<\n UsersCreateDemoAccountCreateApiResponse,\n UsersCreateDemoAccountCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/createDemoAccount`,\n method: \"POST\",\n body: queryArg.createDemoAccountRequest,\n }),\n }),\n usersCreateLoginSignupPortalCreate: build.mutation<\n UsersCreateLoginSignupPortalCreateApiResponse,\n UsersCreateLoginSignupPortalCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/createLoginSignupPortal/`,\n method: \"POST\",\n body: queryArg.loginSignupPortalRequest,\n }),\n }),\n usersCreateMagicLinkCreate: build.mutation(\n {\n query: (queryArg) => ({\n url: `/api/users/createMagicLink/`,\n method: \"POST\",\n body: queryArg.magicLinkCreateRequest,\n }),\n }\n ),\n usersCreateOtpCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/createOTP/`, method: \"POST\", body: queryArg.sendOtpRequest }),\n }),\n usersCustomerPortalRedirectRetrieve: build.query<\n UsersCustomerPortalRedirectRetrieveApiResponse,\n UsersCustomerPortalRedirectRetrieveApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/customerPortalRedirect/`,\n params: { email: queryArg.email, id: queryArg.id },\n }),\n }),\n usersExerciseInstanceList: build.query({\n query: (queryArg) => ({ url: `/api/users/exerciseInstance/`, params: { page: queryArg.page } }),\n }),\n usersExerciseInstanceCreate: build.mutation<\n UsersExerciseInstanceCreateApiResponse,\n UsersExerciseInstanceCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/exerciseInstance/`,\n method: \"POST\",\n body: queryArg.exerciseInstanceCreateUpdateRequest,\n }),\n }),\n usersExerciseInstanceRetrieve: build.query<\n UsersExerciseInstanceRetrieveApiResponse,\n UsersExerciseInstanceRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/exerciseInstance/${queryArg.id}/` }),\n }),\n usersExerciseInstanceUpdate: build.mutation<\n UsersExerciseInstanceUpdateApiResponse,\n UsersExerciseInstanceUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/exerciseInstance/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.exerciseInstanceCreateUpdateRequest,\n }),\n }),\n usersExerciseInstancePartialUpdate: build.mutation<\n UsersExerciseInstancePartialUpdateApiResponse,\n UsersExerciseInstancePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/exerciseInstance/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedExerciseInstanceCreateUpdateRequest,\n }),\n }),\n usersExerciseInstanceDestroy: build.mutation<\n UsersExerciseInstanceDestroyApiResponse,\n UsersExerciseInstanceDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/exerciseInstance/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersExerciseTemplateList: build.query({\n query: (queryArg) => ({ url: `/api/users/exerciseTemplate/`, params: { page: queryArg.page } }),\n }),\n usersExerciseTemplateRetrieve: build.query<\n UsersExerciseTemplateRetrieveApiResponse,\n UsersExerciseTemplateRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/exerciseTemplate/${queryArg.id}/` }),\n }),\n usersMealSlotSpecificationList: build.query<\n UsersMealSlotSpecificationListApiResponse,\n UsersMealSlotSpecificationListApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/mealSlotSpecification/`, params: { page: queryArg.page } }),\n }),\n usersMealSlotSpecificationCreate: build.mutation<\n UsersMealSlotSpecificationCreateApiResponse,\n UsersMealSlotSpecificationCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/mealSlotSpecification/`,\n method: \"POST\",\n body: queryArg.mealSlotSpecificationRequest,\n }),\n }),\n usersMealSlotSpecificationRetrieve: build.query<\n UsersMealSlotSpecificationRetrieveApiResponse,\n UsersMealSlotSpecificationRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/mealSlotSpecification/${queryArg.id}/` }),\n }),\n usersMealSlotSpecificationUpdate: build.mutation<\n UsersMealSlotSpecificationUpdateApiResponse,\n UsersMealSlotSpecificationUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/mealSlotSpecification/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.mealSlotSpecificationRequest,\n }),\n }),\n usersMealSlotSpecificationPartialUpdate: build.mutation<\n UsersMealSlotSpecificationPartialUpdateApiResponse,\n UsersMealSlotSpecificationPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/mealSlotSpecification/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedMealSlotSpecificationRequest,\n }),\n }),\n usersMealSlotSpecificationDestroy: build.mutation<\n UsersMealSlotSpecificationDestroyApiResponse,\n UsersMealSlotSpecificationDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/mealSlotSpecification/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersNutritionDayPlanList: build.query({\n query: (queryArg) => ({ url: `/api/users/nutritionDayPlan/`, params: { page: queryArg.page } }),\n }),\n usersNutritionDayPlanCreate: build.mutation<\n UsersNutritionDayPlanCreateApiResponse,\n UsersNutritionDayPlanCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/nutritionDayPlan/`,\n method: \"POST\",\n body: queryArg.nutritionDayPlanRequest,\n }),\n }),\n usersNutritionDayPlanRetrieve: build.query<\n UsersNutritionDayPlanRetrieveApiResponse,\n UsersNutritionDayPlanRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/nutritionDayPlan/${queryArg.id}/` }),\n }),\n usersNutritionDayPlanUpdate: build.mutation<\n UsersNutritionDayPlanUpdateApiResponse,\n UsersNutritionDayPlanUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/nutritionDayPlan/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.nutritionDayPlanRequest,\n }),\n }),\n usersNutritionDayPlanPartialUpdate: build.mutation<\n UsersNutritionDayPlanPartialUpdateApiResponse,\n UsersNutritionDayPlanPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/nutritionDayPlan/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedNutritionDayPlanRequest,\n }),\n }),\n usersNutritionDayPlanDestroy: build.mutation<\n UsersNutritionDayPlanDestroyApiResponse,\n UsersNutritionDayPlanDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/nutritionDayPlan/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersOrganisationCreate: build.mutation({\n query: (queryArg) => ({\n url: `/api/users/organisation/`,\n method: \"POST\",\n body: queryArg.updateCreateOrganisationRequest,\n }),\n }),\n usersOrganisationPartialUpdate: build.mutation<\n UsersOrganisationPartialUpdateApiResponse,\n UsersOrganisationPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/organisation/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUpdateCreateOrganisationRequest,\n }),\n }),\n usersOrganisationsBySubdomainList: build.query<\n UsersOrganisationsBySubdomainListApiResponse,\n UsersOrganisationsBySubdomainListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/organisations-by-subdomain/`,\n params: { subdomain: queryArg.subdomain },\n }),\n }),\n usersPaginatedclientsList: build.query({\n query: (queryArg) => ({\n url: `/api/users/paginatedclients/`,\n params: { account_enabled: queryArg.accountEnabled, page: queryArg.page, search: queryArg.search },\n }),\n }),\n usersPaginatedclientsCreate: build.mutation<\n UsersPaginatedclientsCreateApiResponse,\n UsersPaginatedclientsCreateApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/paginatedclients/`, method: \"POST\", body: queryArg.slimClientRequest }),\n }),\n usersPaginatedclientsRetrieve: build.query<\n UsersPaginatedclientsRetrieveApiResponse,\n UsersPaginatedclientsRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/paginatedclients/${queryArg.id}/` }),\n }),\n usersPaginatedclientsUpdate: build.mutation<\n UsersPaginatedclientsUpdateApiResponse,\n UsersPaginatedclientsUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/paginatedclients/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.slimClientRequest,\n }),\n }),\n usersPaginatedclientsPartialUpdate: build.mutation<\n UsersPaginatedclientsPartialUpdateApiResponse,\n UsersPaginatedclientsPartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/paginatedclients/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedSlimClientRequest,\n }),\n }),\n usersPaginatedclientsDestroy: build.mutation<\n UsersPaginatedclientsDestroyApiResponse,\n UsersPaginatedclientsDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/paginatedclients/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersSetIngredientsToAvoidCreate: build.mutation<\n UsersSetIngredientsToAvoidCreateApiResponse,\n UsersSetIngredientsToAvoidCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/setIngredientsToAvoid/`,\n method: \"POST\",\n body: queryArg.setIngredientToAvoidRequest,\n }),\n }),\n usersStripeCustomerPortalCreate: build.mutation<\n UsersStripeCustomerPortalCreateApiResponse,\n UsersStripeCustomerPortalCreateApiArg\n >({\n query: () => ({ url: `/api/users/stripeCustomerPortal/`, method: \"POST\" }),\n }),\n usersUserList: build.query({\n query: (queryArg) => ({ url: `/api/users/user/`, params: { page: queryArg.page } }),\n }),\n usersUserCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/user/`, method: \"POST\", body: queryArg.userRequest }),\n }),\n usersUserRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/users/user/${queryArg.id}/` }),\n }),\n usersUserUpdate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/user/${queryArg.id}/`, method: \"PUT\", body: queryArg.userRequest }),\n }),\n usersUserPartialUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/users/user/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserRequest,\n }),\n }),\n usersUserDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/users/user/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersUserProfileList: build.query({\n query: (queryArg) => ({ url: `/api/users/userProfile/`, params: { page: queryArg.page } }),\n }),\n usersUserProfileCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/userProfile/`, method: \"POST\", body: queryArg.userProfileRequest }),\n }),\n usersUserProfileRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/users/userProfile/${queryArg.id}/` }),\n }),\n usersUserProfileUpdate: build.mutation({\n query: (queryArg) => ({\n url: `/api/users/userProfile/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userProfileRequest,\n }),\n }),\n usersUserProfilePartialUpdate: build.mutation<\n UsersUserProfilePartialUpdateApiResponse,\n UsersUserProfilePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userProfile/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserProfileRequest,\n }),\n }),\n usersUserProfileDestroy: build.mutation({\n query: (queryArg) => ({ url: `/api/users/userProfile/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersUserdislikerecipeList: build.query({\n query: (queryArg) => ({\n url: `/api/users/userdislikerecipe/`,\n params: { page: queryArg.page, recipe: queryArg.recipe, user: queryArg.user },\n }),\n }),\n usersUserdislikerecipeCreate: build.mutation<\n UsersUserdislikerecipeCreateApiResponse,\n UsersUserdislikerecipeCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userdislikerecipe/`,\n method: \"POST\",\n body: queryArg.userDislikeRecipeRequest,\n }),\n }),\n usersUserdislikerecipeRetrieve: build.query<\n UsersUserdislikerecipeRetrieveApiResponse,\n UsersUserdislikerecipeRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/userdislikerecipe/${queryArg.id}/` }),\n }),\n usersUserdislikerecipeUpdate: build.mutation<\n UsersUserdislikerecipeUpdateApiResponse,\n UsersUserdislikerecipeUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userdislikerecipe/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userDislikeRecipeRequest,\n }),\n }),\n usersUserdislikerecipePartialUpdate: build.mutation<\n UsersUserdislikerecipePartialUpdateApiResponse,\n UsersUserdislikerecipePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userdislikerecipe/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserDislikeRecipeRequest,\n }),\n }),\n usersUserdislikerecipeDestroy: build.mutation<\n UsersUserdislikerecipeDestroyApiResponse,\n UsersUserdislikerecipeDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/userdislikerecipe/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersUserfavouriterecipeList: build.query<\n UsersUserfavouriterecipeListApiResponse,\n UsersUserfavouriterecipeListApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userfavouriterecipe/`,\n params: { page: queryArg.page, recipe: queryArg.recipe, user: queryArg.user },\n }),\n }),\n usersUserfavouriterecipeCreate: build.mutation<\n UsersUserfavouriterecipeCreateApiResponse,\n UsersUserfavouriterecipeCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userfavouriterecipe/`,\n method: \"POST\",\n body: queryArg.userFavouriteRecipeRequest,\n }),\n }),\n usersUserfavouriterecipeRetrieve: build.query<\n UsersUserfavouriterecipeRetrieveApiResponse,\n UsersUserfavouriterecipeRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/userfavouriterecipe/${queryArg.id}/` }),\n }),\n usersUserfavouriterecipeUpdate: build.mutation<\n UsersUserfavouriterecipeUpdateApiResponse,\n UsersUserfavouriterecipeUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userfavouriterecipe/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.userFavouriteRecipeRequest,\n }),\n }),\n usersUserfavouriterecipePartialUpdate: build.mutation<\n UsersUserfavouriterecipePartialUpdateApiResponse,\n UsersUserfavouriterecipePartialUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/userfavouriterecipe/${queryArg.id}/`,\n method: \"PATCH\",\n body: queryArg.patchedUserFavouriteRecipeRequest,\n }),\n }),\n usersUserfavouriterecipeDestroy: build.mutation<\n UsersUserfavouriterecipeDestroyApiResponse,\n UsersUserfavouriterecipeDestroyApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/userfavouriterecipe/${queryArg.id}/`, method: \"DELETE\" }),\n }),\n usersVerifyOtpCreate: build.mutation({\n query: (queryArg) => ({ url: `/api/users/verifyOTP/`, method: \"POST\", body: queryArg.verifyOtpRequest }),\n }),\n usersWeeklyNutritionPlanList: build.query<\n UsersWeeklyNutritionPlanListApiResponse,\n UsersWeeklyNutritionPlanListApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/weeklyNutritionPlan/`, params: { page: queryArg.page } }),\n }),\n usersWeeklyNutritionPlanCreate: build.mutation<\n UsersWeeklyNutritionPlanCreateApiResponse,\n UsersWeeklyNutritionPlanCreateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/weeklyNutritionPlan/`,\n method: \"POST\",\n body: queryArg.weeklyNutritionPlanCreateRequest,\n }),\n }),\n usersWeeklyNutritionPlanRetrieve: build.query<\n UsersWeeklyNutritionPlanRetrieveApiResponse,\n UsersWeeklyNutritionPlanRetrieveApiArg\n >({\n query: (queryArg) => ({ url: `/api/users/weeklyNutritionPlan/${queryArg.id}/` }),\n }),\n usersWeeklyNutritionPlanUpdate: build.mutation<\n UsersWeeklyNutritionPlanUpdateApiResponse,\n UsersWeeklyNutritionPlanUpdateApiArg\n >({\n query: (queryArg) => ({\n url: `/api/users/weeklyNutritionPlan/${queryArg.id}/`,\n method: \"PUT\",\n body: queryArg.weeklyNutritionPlanUpdateRequest,\n }),\n }),\n v2SchemaRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/v2/schema/`, params: { format: queryArg.format, lang: queryArg.lang } }),\n }),\n v3SchemaRetrieve: build.query({\n query: (queryArg) => ({ url: `/api/v3/schema/`, params: { format: queryArg.format, lang: queryArg.lang } }),\n }),\n }),\n overrideExisting: false,\n});\nexport { injectedRtkApi as backendApi };\nexport type CheckoutSubscriptionVerificationCreateApiResponse = /** status 200 Subscription verification response */ {\n [key: string]: any;\n};\nexport type CheckoutSubscriptionVerificationCreateApiArg = {\n subscriptionVerificationRequest: SubscriptionVerificationRequest;\n};\nexport type FoodCreateRecipeCreateApiResponse = /** status 201 */ RecipeTemplate;\nexport type FoodCreateRecipeCreateApiArg = {\n createNewRecipeTemplateRequest: CreateNewRecipeTemplateRequest;\n};\nexport type FoodFoodListApiResponse = /** status 200 */ PaginatedFoodList;\nexport type FoodFoodListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodFoodRetrieveApiResponse = /** status 200 */ Food;\nexport type FoodFoodRetrieveApiArg = {\n /** A unique integer value identifying this food. */\n id: number;\n};\nexport type FoodGenerateMealsListApiResponse = /** status 200 */ PaginatedGeneratedRecipeMealList;\nexport type FoodGenerateMealsListApiArg = {\n author?: number;\n dateToPlanFor?: string;\n favourite?: boolean;\n id?: number;\n ingredientSearch?: string;\n kcal?: number;\n mealSlotSpecification: number;\n /** * `BREAKFAST` - BREAKFAST\n * `LUNCH` - LUNCH\n * `DINNER` - DINNER\n * `SNACK` - SNACK */\n mealTypes?: (\"BREAKFAST\" | \"DINNER\" | \"LUNCH\" | \"SNACK\")[];\n /** A page number within the paginated result set. */\n page?: number;\n /** Number of results to return per page. */\n pageSize?: number;\n preparationTimeMinGte?: number;\n preparationTimeMinLte?: number;\n protein?: number;\n published?: boolean;\n /** * `WEEKMEALS` - WEEKMEALS\n * `FATSECRET` - FATSECRET\n * `USER_GENERATED` - USER_GENERATED\n * `BRANDED` - BRANDED */\n sourceProvider?: (\"BRANDED\" | \"FATSECRET\" | \"USER_GENERATED\" | \"WEEKMEALS\")[];\n /** * `ROOT_NODE` - ROOT_NODE\n * `BREAD` - BREAD\n * `BREAKFAST` - BREAKFAST\n * `BURGER` - BURGER\n * `COUSCOUS_AND_QUINOA` - COUSCOUS_AND_QUINOA\n * `DAIRY` - DAIRY\n * `DINNER` - DINNER\n * `DIPS_AND_SPREADS` - DIPS_AND_SPREADS\n * `FAVOURITE` - FAVOURITE\n * `HORMONE` - HORMONE\n * `KETO` - KETO\n * `LOW_VARIANTS` - LOW_VARIANTS\n * `LUNCH` - LUNCH\n * `PANCAKES_AND_OMELETTES` - PANCAKES_AND_OMELETTES\n * `PASTA` - PASTA\n * `POTATO` - POTATO\n * `PRE_BED` - PRE_BED\n * `RICE_AND_NOODLES` - RICE_AND_NOODLES\n * `SALAD` - SALAD\n * `SNACK` - SNACK\n * `SNACKS_AND_BAKES` - SNACKS_AND_BAKES\n * `SOUP` - SOUP\n * `VEGAN` - VEGAN\n * `WRAP` - WRAP\n * `CRUSTACEANS_AND_SHELLFISH` - CRUSTACEANS_AND_SHELLFISH\n * `HALAL` - HALAL\n * `OTHER` - OTHER */\n tags?: (\n | \"BREAD\"\n | \"BREAKFAST\"\n | \"BURGER\"\n | \"COUSCOUS_AND_QUINOA\"\n | \"CRUSTACEANS_AND_SHELLFISH\"\n | \"DAIRY\"\n | \"DINNER\"\n | \"DIPS_AND_SPREADS\"\n | \"FAVOURITE\"\n | \"HALAL\"\n | \"HORMONE\"\n | \"KETO\"\n | \"LOW_VARIANTS\"\n | \"LUNCH\"\n | \"OTHER\"\n | \"PANCAKES_AND_OMELETTES\"\n | \"PASTA\"\n | \"POTATO\"\n | \"PRE_BED\"\n | \"RICE_AND_NOODLES\"\n | \"ROOT_NODE\"\n | \"SALAD\"\n | \"SNACK\"\n | \"SNACKS_AND_BAKES\"\n | \"SOUP\"\n | \"VEGAN\"\n | \"WRAP\"\n )[];\n user?: number;\n};\nexport type FoodGenerateMealsCreateApiResponse = /** status 201 */ RecipeMeal;\nexport type FoodGenerateMealsCreateApiArg = {\n generatedRecipeMealRequest: GeneratedRecipeMealRequest;\n};\nexport type FoodIngredientListApiResponse = /** status 200 */ PaginatedIngredientList;\nexport type FoodIngredientListApiArg = {\n name?: string;\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodIngredientCreateApiResponse = /** status 201 */ IngredientPost;\nexport type FoodIngredientCreateApiArg = {\n ingredientPostRequest: IngredientPostRequest;\n};\nexport type FoodIngredientRetrieveApiResponse = /** status 200 */ Ingredient;\nexport type FoodIngredientRetrieveApiArg = {\n /** A unique integer value identifying this ingredient. */\n id: number;\n};\nexport type FoodIngredientUpdateApiResponse = /** status 200 */ Ingredient;\nexport type FoodIngredientUpdateApiArg = {\n /** A unique integer value identifying this ingredient. */\n id: number;\n ingredientRequest: IngredientRequest;\n};\nexport type FoodIngredientPartialUpdateApiResponse = /** status 200 */ Ingredient;\nexport type FoodIngredientPartialUpdateApiArg = {\n /** A unique integer value identifying this ingredient. */\n id: number;\n patchedIngredientRequest: PatchedIngredientRequest;\n};\nexport type FoodIngredientDestroyApiResponse = unknown;\nexport type FoodIngredientDestroyApiArg = {\n /** A unique integer value identifying this ingredient. */\n id: number;\n};\nexport type FoodIngredientToAvoidListApiResponse = /** status 200 */ PaginatedIngredientToAvoidList;\nexport type FoodIngredientToAvoidListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodIngredientToAvoidRetrieveApiResponse = /** status 200 */ IngredientToAvoid;\nexport type FoodIngredientToAvoidRetrieveApiArg = {\n /** A UUID string identifying this Ingredient to Avoid. */\n id: string;\n};\nexport type FoodPreferredSuggestedServingsListApiResponse = /** status 200 */ PaginatedPreferredSuggestedServingList;\nexport type FoodPreferredSuggestedServingsListApiArg = {\n organisationId?: number;\n /** A page number within the paginated result set. */\n page?: number;\n query?: string;\n};\nexport type FoodPreferredSuggestedServingsCreateApiResponse = /** status 201 */ PreferredSuggestedServing;\nexport type FoodPreferredSuggestedServingsCreateApiArg = {\n preferredSuggestedServingRequest: PreferredSuggestedServingRequest;\n};\nexport type FoodPreferredSuggestedServingsRetrieveApiResponse = /** status 200 */ PreferredSuggestedServing;\nexport type FoodPreferredSuggestedServingsRetrieveApiArg = {\n /** A unique integer value identifying this preferred suggested serving. */\n id: number;\n};\nexport type FoodPreferredSuggestedServingsUpdateApiResponse = /** status 200 */ PreferredSuggestedServing;\nexport type FoodPreferredSuggestedServingsUpdateApiArg = {\n /** A unique integer value identifying this preferred suggested serving. */\n id: number;\n preferredSuggestedServingRequest: PreferredSuggestedServingRequest;\n};\nexport type FoodPreferredSuggestedServingsPartialUpdateApiResponse = /** status 200 */ PreferredSuggestedServing;\nexport type FoodPreferredSuggestedServingsPartialUpdateApiArg = {\n /** A unique integer value identifying this preferred suggested serving. */\n id: number;\n patchedPreferredSuggestedServingRequest: PatchedPreferredSuggestedServingRequest;\n};\nexport type FoodPreferredSuggestedServingsDestroyApiResponse = unknown;\nexport type FoodPreferredSuggestedServingsDestroyApiArg = {\n /** A unique integer value identifying this preferred suggested serving. */\n id: number;\n};\nexport type FoodQuickAddMealListApiResponse = /** status 200 */ PaginatedQuickAddMealList;\nexport type FoodQuickAddMealListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodQuickAddMealCreateApiResponse = /** status 201 */ QuickAddMeal;\nexport type FoodQuickAddMealCreateApiArg = {\n quickAddMealRequest: QuickAddMealRequest;\n};\nexport type FoodQuickAddMealRetrieveApiResponse = /** status 200 */ QuickAddMeal;\nexport type FoodQuickAddMealRetrieveApiArg = {\n /** A unique integer value identifying this quick add meal. */\n id: number;\n};\nexport type FoodQuickAddMealUpdateApiResponse = /** status 200 */ QuickAddMeal;\nexport type FoodQuickAddMealUpdateApiArg = {\n /** A unique integer value identifying this quick add meal. */\n id: number;\n quickAddMealRequest: QuickAddMealRequest;\n};\nexport type FoodQuickAddMealPartialUpdateApiResponse = /** status 200 */ QuickAddMeal;\nexport type FoodQuickAddMealPartialUpdateApiArg = {\n /** A unique integer value identifying this quick add meal. */\n id: number;\n patchedQuickAddMealRequest: PatchedQuickAddMealRequest;\n};\nexport type FoodQuickAddMealDestroyApiResponse = unknown;\nexport type FoodQuickAddMealDestroyApiArg = {\n /** A unique integer value identifying this quick add meal. */\n id: number;\n};\nexport type FoodRecipeFeedbackLineItemListApiResponse = /** status 200 */ PaginatedRecipeFeedbackLineItemList;\nexport type FoodRecipeFeedbackLineItemListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodRecipeFeedbackLineItemCreateApiResponse = /** status 201 */ RecipeFeedbackLineItem;\nexport type FoodRecipeFeedbackLineItemCreateApiArg = {\n recipeFeedbackLineItemRequest: RecipeFeedbackLineItemRequest;\n};\nexport type FoodRecipeFeedbackLineItemRetrieveApiResponse = /** status 200 */ RecipeFeedbackLineItem;\nexport type FoodRecipeFeedbackLineItemRetrieveApiArg = {\n /** A UUID string identifying this Recipe Feedback Line Item. */\n id: string;\n};\nexport type FoodRecipeFeedbackLineItemUpdateApiResponse = /** status 200 */ RecipeFeedbackLineItem;\nexport type FoodRecipeFeedbackLineItemUpdateApiArg = {\n /** A UUID string identifying this Recipe Feedback Line Item. */\n id: string;\n recipeFeedbackLineItemRequest: RecipeFeedbackLineItemRequest;\n};\nexport type FoodRecipeFeedbackLineItemPartialUpdateApiResponse = /** status 200 */ RecipeFeedbackLineItem;\nexport type FoodRecipeFeedbackLineItemPartialUpdateApiArg = {\n /** A UUID string identifying this Recipe Feedback Line Item. */\n id: string;\n patchedRecipeFeedbackLineItemRequest: PatchedRecipeFeedbackLineItemRequest;\n};\nexport type FoodRecipeFeedbackLineItemDestroyApiResponse = unknown;\nexport type FoodRecipeFeedbackLineItemDestroyApiArg = {\n /** A UUID string identifying this Recipe Feedback Line Item. */\n id: string;\n};\nexport type FoodRecipeMealListApiResponse = /** status 200 */ PaginatedRecipeMealList;\nexport type FoodRecipeMealListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodRecipeMealCreateApiResponse = /** status 201 */ RecipeMeal;\nexport type FoodRecipeMealCreateApiArg = {\n recipeMealRequest: RecipeMealRequest;\n};\nexport type FoodRecipeMealRetrieveApiResponse = /** status 200 */ RecipeMeal;\nexport type FoodRecipeMealRetrieveApiArg = {\n /** A unique integer value identifying this recipe meal. */\n id: number;\n};\nexport type FoodRecipeMealUpdateApiResponse = /** status 200 */ RecipeMeal;\nexport type FoodRecipeMealUpdateApiArg = {\n /** A unique integer value identifying this recipe meal. */\n id: number;\n recipeMealRequest: RecipeMealRequest;\n};\nexport type FoodRecipeMealPartialUpdateApiResponse = /** status 200 */ RecipeMeal;\nexport type FoodRecipeMealPartialUpdateApiArg = {\n /** A unique integer value identifying this recipe meal. */\n id: number;\n patchedRecipeMealRequest: PatchedRecipeMealRequest;\n};\nexport type FoodRecipeMealDestroyApiResponse = unknown;\nexport type FoodRecipeMealDestroyApiArg = {\n /** A unique integer value identifying this recipe meal. */\n id: number;\n};\nexport type FoodRecipeTagListApiResponse = /** status 200 */ PaginatedRecipeTagList;\nexport type FoodRecipeTagListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodRecipeTagRetrieveApiResponse = /** status 200 */ RecipeTag;\nexport type FoodRecipeTagRetrieveApiArg = {\n /** A unique integer value identifying this recipe tag. */\n id: number;\n};\nexport type FoodRecipeTemplateListApiResponse = /** status 200 */ PaginatedRecipeTemplateList;\nexport type FoodRecipeTemplateListApiArg = {\n author?: number;\n favourite?: boolean;\n id?: number;\n ingredientSearch?: string;\n /** * `BREAKFAST` - BREAKFAST\n * `LUNCH` - LUNCH\n * `DINNER` - DINNER\n * `SNACK` - SNACK */\n mealTypes?: (\"BREAKFAST\" | \"DINNER\" | \"LUNCH\" | \"SNACK\")[];\n /** A page number within the paginated result set. */\n page?: number;\n preparationTimeMinGte?: number;\n preparationTimeMinLte?: number;\n published?: boolean;\n /** * `WEEKMEALS` - WEEKMEALS\n * `FATSECRET` - FATSECRET\n * `USER_GENERATED` - USER_GENERATED\n * `BRANDED` - BRANDED */\n sourceProvider?: (\"BRANDED\" | \"FATSECRET\" | \"USER_GENERATED\" | \"WEEKMEALS\")[];\n /** * `ROOT_NODE` - ROOT_NODE\n * `BREAD` - BREAD\n * `BREAKFAST` - BREAKFAST\n * `BURGER` - BURGER\n * `COUSCOUS_AND_QUINOA` - COUSCOUS_AND_QUINOA\n * `DAIRY` - DAIRY\n * `DINNER` - DINNER\n * `DIPS_AND_SPREADS` - DIPS_AND_SPREADS\n * `FAVOURITE` - FAVOURITE\n * `HORMONE` - HORMONE\n * `KETO` - KETO\n * `LOW_VARIANTS` - LOW_VARIANTS\n * `LUNCH` - LUNCH\n * `PANCAKES_AND_OMELETTES` - PANCAKES_AND_OMELETTES\n * `PASTA` - PASTA\n * `POTATO` - POTATO\n * `PRE_BED` - PRE_BED\n * `RICE_AND_NOODLES` - RICE_AND_NOODLES\n * `SALAD` - SALAD\n * `SNACK` - SNACK\n * `SNACKS_AND_BAKES` - SNACKS_AND_BAKES\n * `SOUP` - SOUP\n * `VEGAN` - VEGAN\n * `WRAP` - WRAP\n * `CRUSTACEANS_AND_SHELLFISH` - CRUSTACEANS_AND_SHELLFISH\n * `HALAL` - HALAL\n * `OTHER` - OTHER */\n tags?: (\n | \"BREAD\"\n | \"BREAKFAST\"\n | \"BURGER\"\n | \"COUSCOUS_AND_QUINOA\"\n | \"CRUSTACEANS_AND_SHELLFISH\"\n | \"DAIRY\"\n | \"DINNER\"\n | \"DIPS_AND_SPREADS\"\n | \"FAVOURITE\"\n | \"HALAL\"\n | \"HORMONE\"\n | \"KETO\"\n | \"LOW_VARIANTS\"\n | \"LUNCH\"\n | \"OTHER\"\n | \"PANCAKES_AND_OMELETTES\"\n | \"PASTA\"\n | \"POTATO\"\n | \"PRE_BED\"\n | \"RICE_AND_NOODLES\"\n | \"ROOT_NODE\"\n | \"SALAD\"\n | \"SNACK\"\n | \"SNACKS_AND_BAKES\"\n | \"SOUP\"\n | \"VEGAN\"\n | \"WRAP\"\n )[];\n user?: number;\n};\nexport type FoodRecipeTemplateCreateApiResponse = /** status 201 */ RecipeTemplate;\nexport type FoodRecipeTemplateCreateApiArg = {\n recipeTemplateRequest: RecipeTemplateRequest;\n};\nexport type FoodRecipeTemplateRetrieveApiResponse = /** status 200 */ RecipeTemplate;\nexport type FoodRecipeTemplateRetrieveApiArg = {\n /** A unique integer value identifying this recipe template. */\n id: number;\n};\nexport type FoodRecipeTemplateUpdateApiResponse = /** status 200 */ RecipeTemplate;\nexport type FoodRecipeTemplateUpdateApiArg = {\n /** A unique integer value identifying this recipe template. */\n id: number;\n recipeTemplateRequest: RecipeTemplateRequest;\n};\nexport type FoodRecipeTemplatePartialUpdateApiResponse = /** status 200 */ RecipeTemplate;\nexport type FoodRecipeTemplatePartialUpdateApiArg = {\n /** A unique integer value identifying this recipe template. */\n id: number;\n patchedRecipeTemplateRequest: PatchedRecipeTemplateRequest;\n};\nexport type FoodRecipeTemplateDestroyApiResponse = unknown;\nexport type FoodRecipeTemplateDestroyApiArg = {\n /** A unique integer value identifying this recipe template. */\n id: number;\n};\nexport type FoodSearchListApiResponse = /** status 200 */ Food[];\nexport type FoodSearchListApiArg = {\n /** Query string */\n query: string;\n};\nexport type FoodSearchAutocompleteRetrieveApiResponse = /** status 200 */ FoodSearchAutoComplete;\nexport type FoodSearchAutocompleteRetrieveApiArg = {\n /** Query string */\n query: string;\n};\nexport type FoodSearchByBarcodeRetrieveApiResponse = /** status 200 */ Food;\nexport type FoodSearchByBarcodeRetrieveApiArg = {\n /** UPC-A, EAN-13 or EAN-8 formatted barcode */\n barcode: string;\n};\nexport type FoodSingleFoodMealListApiResponse = /** status 200 */ PaginatedSingleFoodMealList;\nexport type FoodSingleFoodMealListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodSingleFoodMealCreateApiResponse = /** status 201 */ SingleFoodMeal;\nexport type FoodSingleFoodMealCreateApiArg = {\n singleFoodMealRequest: SingleFoodMealRequest;\n};\nexport type FoodSingleFoodMealRetrieveApiResponse = /** status 200 */ SingleFoodMeal;\nexport type FoodSingleFoodMealRetrieveApiArg = {\n /** A unique integer value identifying this single food meal. */\n id: number;\n};\nexport type FoodSingleFoodMealUpdateApiResponse = /** status 200 */ SingleFoodMeal;\nexport type FoodSingleFoodMealUpdateApiArg = {\n /** A unique integer value identifying this single food meal. */\n id: number;\n singleFoodMealRequest: SingleFoodMealRequest;\n};\nexport type FoodSingleFoodMealPartialUpdateApiResponse = /** status 200 */ SingleFoodMeal;\nexport type FoodSingleFoodMealPartialUpdateApiArg = {\n /** A unique integer value identifying this single food meal. */\n id: number;\n patchedSingleFoodMealRequest: PatchedSingleFoodMealRequest;\n};\nexport type FoodSingleFoodMealDestroyApiResponse = unknown;\nexport type FoodSingleFoodMealDestroyApiArg = {\n /** A unique integer value identifying this single food meal. */\n id: number;\n};\nexport type FoodSuggestedServingListApiResponse = /** status 200 */ PaginatedSuggestedServingList;\nexport type FoodSuggestedServingListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type FoodSuggestedServingRetrieveApiResponse = /** status 200 */ SuggestedServing;\nexport type FoodSuggestedServingRetrieveApiArg = {\n /** A unique integer value identifying this suggested serving. */\n id: number;\n};\nexport type FoodSuggestedServingSearchListApiResponse = /** status 200 */ PaginatedSuggestedServingSearchList;\nexport type FoodSuggestedServingSearchListApiArg = {\n /** * `WEEKMEALS` - WEEKMEALS\n * `FATSECRET` - FATSECRET\n * `USER_GENERATED` - USER_GENERATED\n * `BRANDED` - BRANDED */\n foodSourceProvider?: \"BRANDED\" | \"FATSECRET\" | \"USER_GENERATED\" | \"WEEKMEALS\";\n /** A page number within the paginated result set. */\n page?: number;\n /** query */\n query?: string;\n};\nexport type FoodSuggestedServingSearchRetrieveApiResponse = /** status 200 */ SuggestedServingSearch;\nexport type FoodSuggestedServingSearchRetrieveApiArg = {\n /** A unique integer value identifying this suggested serving. */\n id: number;\n};\nexport type MeasurementsUserBodyFatPercentageListApiResponse = /** status 200 */ PaginatedUserBodyFatPercentageList;\nexport type MeasurementsUserBodyFatPercentageListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type MeasurementsUserBodyFatPercentageCreateApiResponse = /** status 201 */ UserBodyFatPercentage;\nexport type MeasurementsUserBodyFatPercentageCreateApiArg = {\n userBodyFatPercentageRequest: UserBodyFatPercentageRequest;\n};\nexport type MeasurementsUserBodyFatPercentageRetrieveApiResponse = /** status 200 */ UserBodyFatPercentage;\nexport type MeasurementsUserBodyFatPercentageRetrieveApiArg = {\n /** A unique integer value identifying this user body fat percentage. */\n id: number;\n};\nexport type MeasurementsUserBodyFatPercentageUpdateApiResponse = /** status 200 */ UserBodyFatPercentage;\nexport type MeasurementsUserBodyFatPercentageUpdateApiArg = {\n /** A unique integer value identifying this user body fat percentage. */\n id: number;\n userBodyFatPercentageRequest: UserBodyFatPercentageRequest;\n};\nexport type MeasurementsUserBodyFatPercentagePartialUpdateApiResponse = /** status 200 */ UserBodyFatPercentage;\nexport type MeasurementsUserBodyFatPercentagePartialUpdateApiArg = {\n /** A unique integer value identifying this user body fat percentage. */\n id: number;\n patchedUserBodyFatPercentageRequest: PatchedUserBodyFatPercentageRequest;\n};\nexport type MeasurementsUserBodyFatPercentageDestroyApiResponse = unknown;\nexport type MeasurementsUserBodyFatPercentageDestroyApiArg = {\n /** A unique integer value identifying this user body fat percentage. */\n id: number;\n};\nexport type MeasurementsUserDistanceListApiResponse = /** status 200 */ PaginatedUserDistanceList;\nexport type MeasurementsUserDistanceListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type MeasurementsUserDistanceCreateApiResponse = /** status 201 */ UserDistance;\nexport type MeasurementsUserDistanceCreateApiArg = {\n userDistanceRequest: UserDistanceRequest;\n};\nexport type MeasurementsUserDistanceRetrieveApiResponse = /** status 200 */ UserDistance;\nexport type MeasurementsUserDistanceRetrieveApiArg = {\n /** A unique integer value identifying this user distance. */\n id: number;\n};\nexport type MeasurementsUserDistanceUpdateApiResponse = /** status 200 */ UserDistance;\nexport type MeasurementsUserDistanceUpdateApiArg = {\n /** A unique integer value identifying this user distance. */\n id: number;\n userDistanceRequest: UserDistanceRequest;\n};\nexport type MeasurementsUserDistancePartialUpdateApiResponse = /** status 200 */ UserDistance;\nexport type MeasurementsUserDistancePartialUpdateApiArg = {\n /** A unique integer value identifying this user distance. */\n id: number;\n patchedUserDistanceRequest: PatchedUserDistanceRequest;\n};\nexport type MeasurementsUserDistanceDestroyApiResponse = unknown;\nexport type MeasurementsUserDistanceDestroyApiArg = {\n /** A unique integer value identifying this user distance. */\n id: number;\n};\nexport type MeasurementsUserSleepListApiResponse = /** status 200 */ PaginatedUserSleepList;\nexport type MeasurementsUserSleepListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type MeasurementsUserSleepCreateApiResponse = /** status 201 */ UserSleep;\nexport type MeasurementsUserSleepCreateApiArg = {\n userSleepRequest: UserSleepRequest;\n};\nexport type MeasurementsUserSleepRetrieveApiResponse = /** status 200 */ UserSleep;\nexport type MeasurementsUserSleepRetrieveApiArg = {\n /** A unique integer value identifying this user sleep. */\n id: number;\n};\nexport type MeasurementsUserSleepUpdateApiResponse = /** status 200 */ UserSleep;\nexport type MeasurementsUserSleepUpdateApiArg = {\n /** A unique integer value identifying this user sleep. */\n id: number;\n userSleepRequest: UserSleepRequest;\n};\nexport type MeasurementsUserSleepPartialUpdateApiResponse = /** status 200 */ UserSleep;\nexport type MeasurementsUserSleepPartialUpdateApiArg = {\n /** A unique integer value identifying this user sleep. */\n id: number;\n patchedUserSleepRequest: PatchedUserSleepRequest;\n};\nexport type MeasurementsUserSleepDestroyApiResponse = unknown;\nexport type MeasurementsUserSleepDestroyApiArg = {\n /** A unique integer value identifying this user sleep. */\n id: number;\n};\nexport type MeasurementsUserStressListApiResponse = /** status 200 */ PaginatedUserStressList;\nexport type MeasurementsUserStressListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type MeasurementsUserStressCreateApiResponse = /** status 201 */ UserStress;\nexport type MeasurementsUserStressCreateApiArg = {\n userStressRequest: UserStressRequest;\n};\nexport type MeasurementsUserStressRetrieveApiResponse = /** status 200 */ UserStress;\nexport type MeasurementsUserStressRetrieveApiArg = {\n /** A unique integer value identifying this user stress. */\n id: number;\n};\nexport type MeasurementsUserStressUpdateApiResponse = /** status 200 */ UserStress;\nexport type MeasurementsUserStressUpdateApiArg = {\n /** A unique integer value identifying this user stress. */\n id: number;\n userStressRequest: UserStressRequest;\n};\nexport type MeasurementsUserStressPartialUpdateApiResponse = /** status 200 */ UserStress;\nexport type MeasurementsUserStressPartialUpdateApiArg = {\n /** A unique integer value identifying this user stress. */\n id: number;\n patchedUserStressRequest: PatchedUserStressRequest;\n};\nexport type MeasurementsUserStressDestroyApiResponse = unknown;\nexport type MeasurementsUserStressDestroyApiArg = {\n /** A unique integer value identifying this user stress. */\n id: number;\n};\nexport type MeasurementsDeleteMeasurementCreateApiResponse = /** status 201 */ DeleteMeasurement;\nexport type MeasurementsDeleteMeasurementCreateApiArg = {\n deleteMeasurementRequest: DeleteMeasurementRequest;\n};\nexport type MeasurementsUserWeightListApiResponse = /** status 200 */ PaginatedUserWeightList;\nexport type MeasurementsUserWeightListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type MeasurementsUserWeightCreateApiResponse = /** status 201 */ UserWeight;\nexport type MeasurementsUserWeightCreateApiArg = {\n userWeightRequest: UserWeightRequest;\n};\nexport type MeasurementsUserWeightRetrieveApiResponse = /** status 200 */ UserWeight;\nexport type MeasurementsUserWeightRetrieveApiArg = {\n /** A unique integer value identifying this user weight. */\n id: number;\n};\nexport type MeasurementsUserWeightUpdateApiResponse = /** status 200 */ UserWeight;\nexport type MeasurementsUserWeightUpdateApiArg = {\n /** A unique integer value identifying this user weight. */\n id: number;\n userWeightRequest: UserWeightRequest;\n};\nexport type MeasurementsUserWeightPartialUpdateApiResponse = /** status 200 */ UserWeight;\nexport type MeasurementsUserWeightPartialUpdateApiArg = {\n /** A unique integer value identifying this user weight. */\n id: number;\n patchedUserWeightRequest: PatchedUserWeightRequest;\n};\nexport type MeasurementsUserWeightDestroyApiResponse = unknown;\nexport type MeasurementsUserWeightDestroyApiArg = {\n /** A unique integer value identifying this user weight. */\n id: number;\n};\nexport type PlannerAutoPlanDayCreateApiResponse = unknown;\nexport type PlannerAutoPlanDayCreateApiArg = {\n autoPlannerRequest: AutoPlannerRequest;\n};\nexport type PlannerAutoPlanDaysCreateApiResponse = unknown;\nexport type PlannerAutoPlanDaysCreateApiArg = {\n autoPlanDaysRequest: AutoPlanDaysRequest;\n};\nexport type PlannerCalendarDayListApiResponse = /** status 200 */ PaginatedCalendarDayList;\nexport type PlannerCalendarDayListApiArg = {\n dateGte?: string;\n dateLt?: string;\n dateLte?: string;\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type PlannerCalendarDayCreateApiResponse = /** status 201 */ CalendarDay;\nexport type PlannerCalendarDayCreateApiArg = {\n calendarDayRequest: CalendarDayRequest;\n};\nexport type PlannerCalendarDayRetrieveApiResponse = /** status 200 */ CalendarDay;\nexport type PlannerCalendarDayRetrieveApiArg = {\n /** A unique integer value identifying this calendar day. */\n id: number;\n};\nexport type PlannerCalendarDayUpdateApiResponse = /** status 200 */ CalendarDay;\nexport type PlannerCalendarDayUpdateApiArg = {\n /** A unique integer value identifying this calendar day. */\n id: number;\n calendarDayRequest: CalendarDayRequest;\n};\nexport type PlannerCalendarDayPartialUpdateApiResponse = /** status 200 */ CalendarDay;\nexport type PlannerCalendarDayPartialUpdateApiArg = {\n /** A unique integer value identifying this calendar day. */\n id: number;\n patchedCalendarDayRequest: PatchedCalendarDayRequest;\n};\nexport type PlannerCalendarDayDestroyApiResponse = unknown;\nexport type PlannerCalendarDayDestroyApiArg = {\n /** A unique integer value identifying this calendar day. */\n id: number;\n};\nexport type PlannerCalendarItemListApiResponse = /** status 200 */ PaginatedCalendarItemList;\nexport type PlannerCalendarItemListApiArg = {\n calendarDayUser?: number;\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type PlannerCalendarItemCreateApiResponse = /** status 201 */ CalendarItem;\nexport type PlannerCalendarItemCreateApiArg = {\n calendarItemRequest: CalendarItemRequest;\n};\nexport type PlannerCalendarItemRetrieveApiResponse = /** status 200 */ CalendarItem;\nexport type PlannerCalendarItemRetrieveApiArg = {\n /** A unique integer value identifying this calendar item. */\n id: number;\n};\nexport type PlannerCalendarItemUpdateApiResponse = /** status 200 */ CalendarItem;\nexport type PlannerCalendarItemUpdateApiArg = {\n /** A unique integer value identifying this calendar item. */\n id: number;\n calendarItemRequest: CalendarItemRequest;\n};\nexport type PlannerCalendarItemPartialUpdateApiResponse = /** status 200 */ CalendarItem;\nexport type PlannerCalendarItemPartialUpdateApiArg = {\n /** A unique integer value identifying this calendar item. */\n id: number;\n patchedCalendarItemRequest: PatchedCalendarItemRequest;\n};\nexport type PlannerCalendarItemDestroyApiResponse = unknown;\nexport type PlannerCalendarItemDestroyApiArg = {\n /** A unique integer value identifying this calendar item. */\n id: number;\n};\nexport type PlannerCopyMealsFromDateCreateApiResponse = /** status 201 */ CopyFromDate;\nexport type PlannerCopyMealsFromDateCreateApiArg = {\n copyFromDateRequest: CopyFromDateRequest;\n};\nexport type PlannerCopyMealsToMealMomentCreateApiResponse = /** status 201 */ CopyMealsToMealMoment;\nexport type PlannerCopyMealsToMealMomentCreateApiArg = {\n copyMealsToMealMomentRequest: CopyMealsToMealMomentRequest;\n};\nexport type PlannerEditRecipeMealPortionsUpdateApiResponse = /** status 200 */ RecipeMealPotions;\nexport type PlannerEditRecipeMealPortionsUpdateApiArg = {\n id: string;\n recipeMealPotionsRequest: RecipeMealPotionsRequest;\n};\nexport type PlannerGroceryListListApiResponse = /** status 200 */ PaginatedGroceryListListRetrieveList;\nexport type PlannerGroceryListListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n user?: number;\n};\nexport type PlannerGroceryListCreateApiResponse = /** status 201 */ GroceryListListRetrieve;\nexport type PlannerGroceryListCreateApiArg = {\n groceryListUpdateCreateRequest: GroceryListUpdateCreateRequest;\n};\nexport type PlannerGroceryListRetrieveApiResponse = /** status 200 */ GroceryListListRetrieve;\nexport type PlannerGroceryListRetrieveApiArg = {\n /** A unique integer value identifying this grocery list. */\n id: number;\n};\nexport type PlannerGroceryListUpdateApiResponse = /** status 200 */ GroceryListListRetrieve;\nexport type PlannerGroceryListUpdateApiArg = {\n /** A unique integer value identifying this grocery list. */\n id: number;\n};\nexport type PlannerGroceryListPartialUpdateApiResponse = /** status 200 */ GroceryListListRetrieve;\nexport type PlannerGroceryListPartialUpdateApiArg = {\n /** A unique integer value identifying this grocery list. */\n id: number;\n};\nexport type PlannerGroceryListDestroyApiResponse = unknown;\nexport type PlannerGroceryListDestroyApiArg = {\n /** A unique integer value identifying this grocery list. */\n id: number;\n};\nexport type PlannerGroceryListItemPartialUpdateApiResponse = /** status 200 */ GroceryListItemUpdate;\nexport type PlannerGroceryListItemPartialUpdateApiArg = {\n /** A unique integer value identifying this grocery list item. */\n id: number;\n patchedGroceryListItemUpdateRequest: PatchedGroceryListItemUpdateRequest;\n};\nexport type PlannerPlanGeneratedRecipeMealCreateApiResponse = /** status 201 */ PlanGeneratedRecipeMeal;\nexport type PlannerPlanGeneratedRecipeMealCreateApiArg = {\n planGeneratedRecipeMealRequest: PlanGeneratedRecipeMealRequest;\n};\nexport type PlannerPlanSingleFoodMealCreateApiResponse = /** status 201 */ PlanSingleFoodMeal;\nexport type PlannerPlanSingleFoodMealCreateApiArg = {\n planSingleFoodMealRequest: PlanSingleFoodMealRequest;\n};\nexport type PlannerSaveAndPlanRecipeMealCreateApiResponse = /** status 201 */ SaveAndPlanRecipeTemplate;\nexport type PlannerSaveAndPlanRecipeMealCreateApiArg = {\n saveAndPlanRecipeTemplateRequest: SaveAndPlanRecipeTemplateRequest;\n};\nexport type SchemaRetrieveApiResponse = /** status 200 */ {\n [key: string]: any;\n};\nexport type SchemaRetrieveApiArg = {\n format?: \"json\" | \"yaml\";\n lang?: \"en-us\" | \"nl\";\n};\nexport type UsersAuthTokenLoginCreateApiResponse = /** status 200 */ TokenCreate;\nexport type UsersAuthTokenLoginCreateApiArg = {\n tokenCreateRequest: TokenCreateRequest;\n};\nexport type UsersAuthTokenLogoutCreateApiResponse = unknown;\nexport type UsersAuthTokenLogoutCreateApiArg = void;\nexport type UsersAuthUsersListApiResponse = /** status 200 */ PaginatedUserList;\nexport type UsersAuthUsersListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersAuthUsersCreateApiResponse = /** status 201 */ CustomUserCreate;\nexport type UsersAuthUsersCreateApiArg = {\n customUserCreateRequest: CustomUserCreateRequest;\n};\nexport type UsersAuthUsersRetrieveApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersRetrieveApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersAuthUsersUpdateApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n userRequest: UserRequest;\n};\nexport type UsersAuthUsersPartialUpdateApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersPartialUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n patchedUserRequest: PatchedUserRequest;\n};\nexport type UsersAuthUsersDestroyApiResponse = unknown;\nexport type UsersAuthUsersDestroyApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersAuthUsersActivationCreateApiResponse = /** status 200 */ Activation;\nexport type UsersAuthUsersActivationCreateApiArg = {\n activationRequest: ActivationRequest;\n};\nexport type UsersAuthUsersMeRetrieveApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersMeRetrieveApiArg = void;\nexport type UsersAuthUsersMeUpdateApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersMeUpdateApiArg = {\n userRequest: UserRequest;\n};\nexport type UsersAuthUsersMePartialUpdateApiResponse = /** status 200 */ User;\nexport type UsersAuthUsersMePartialUpdateApiArg = {\n patchedUserRequest: PatchedUserRequest;\n};\nexport type UsersAuthUsersMeDestroyApiResponse = unknown;\nexport type UsersAuthUsersMeDestroyApiArg = void;\nexport type UsersAuthUsersResendActivationCreateApiResponse = /** status 200 */ SendEmailReset;\nexport type UsersAuthUsersResendActivationCreateApiArg = {\n sendEmailResetRequest: SendEmailResetRequest;\n};\nexport type UsersAuthUsersResetEmailCreateApiResponse = /** status 200 */ SendEmailReset;\nexport type UsersAuthUsersResetEmailCreateApiArg = {\n sendEmailResetRequest: SendEmailResetRequest;\n};\nexport type UsersAuthUsersResetEmailConfirmCreateApiResponse = /** status 200 */ UsernameResetConfirm;\nexport type UsersAuthUsersResetEmailConfirmCreateApiArg = {\n usernameResetConfirmRequest: UsernameResetConfirmRequest;\n};\nexport type UsersAuthUsersResetPasswordCreateApiResponse = /** status 200 */ SendEmailReset;\nexport type UsersAuthUsersResetPasswordCreateApiArg = {\n sendEmailResetRequest: SendEmailResetRequest;\n};\nexport type UsersAuthUsersResetPasswordConfirmCreateApiResponse = /** status 200 */ PasswordResetConfirm;\nexport type UsersAuthUsersResetPasswordConfirmCreateApiArg = {\n passwordResetConfirmRequest: PasswordResetConfirmRequest;\n};\nexport type UsersAuthUsersSetEmailCreateApiResponse = /** status 200 */ SetUsername;\nexport type UsersAuthUsersSetEmailCreateApiArg = {\n setUsernameRequest: SetUsernameRequest;\n};\nexport type UsersAuthUsersSetPasswordCreateApiResponse = /** status 200 */ SetPassword;\nexport type UsersAuthUsersSetPasswordCreateApiArg = {\n setPasswordRequest: SetPasswordRequest;\n};\nexport type UsersBrandListApiResponse = /** status 200 */ PaginatedBrandList;\nexport type UsersBrandListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersBrandRetrieveApiResponse = /** status 200 */ Brand;\nexport type UsersBrandRetrieveApiArg = {\n subdomain: string;\n};\nexport type UsersCancelDealCreateApiResponse = /** status 200 */ CancelSubscription;\nexport type UsersCancelDealCreateApiArg = {\n cancelSubscriptionRequest: CancelSubscriptionRequest;\n};\nexport type UsersClientsListApiResponse = /** status 200 */ User[];\nexport type UsersClientsListApiArg = void;\nexport type UsersClientsCreateApiResponse = /** status 201 */ User;\nexport type UsersClientsCreateApiArg = {\n userRequest: UserRequest;\n};\nexport type UsersClientsRetrieveApiResponse = /** status 200 */ User;\nexport type UsersClientsRetrieveApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersClientsUpdateApiResponse = /** status 200 */ User;\nexport type UsersClientsUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n userRequest: UserRequest;\n};\nexport type UsersClientsPartialUpdateApiResponse = /** status 200 */ User;\nexport type UsersClientsPartialUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n patchedUserRequest: PatchedUserRequest;\n};\nexport type UsersClientsDestroyApiResponse = unknown;\nexport type UsersClientsDestroyApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersCreateDemoAccountCreateApiResponse = /** status 200 */ CreateDemoAccountResponse;\nexport type UsersCreateDemoAccountCreateApiArg = {\n createDemoAccountRequest: CreateDemoAccountRequest;\n};\nexport type UsersCreateLoginSignupPortalCreateApiResponse = /** status 200 */ LoginSignupPortalResponse;\nexport type UsersCreateLoginSignupPortalCreateApiArg = {\n loginSignupPortalRequest: LoginSignupPortalRequest;\n};\nexport type UsersCreateMagicLinkCreateApiResponse = /** status 200 */ MagicLinkCreate;\nexport type UsersCreateMagicLinkCreateApiArg = {\n magicLinkCreateRequest: MagicLinkCreateRequest;\n};\nexport type UsersCreateOtpCreateApiResponse = /** status 200 */ SendOtp;\nexport type UsersCreateOtpCreateApiArg = {\n sendOtpRequest: SendOtpRequest;\n};\nexport type UsersCustomerPortalRedirectRetrieveApiResponse = unknown;\nexport type UsersCustomerPortalRedirectRetrieveApiArg = {\n email: string;\n id: string;\n};\nexport type UsersExerciseInstanceListApiResponse = /** status 200 */ PaginatedExerciseInstanceListRetrieveList;\nexport type UsersExerciseInstanceListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersExerciseInstanceCreateApiResponse = /** status 201 */ ExerciseInstanceCreateUpdate;\nexport type UsersExerciseInstanceCreateApiArg = {\n exerciseInstanceCreateUpdateRequest: ExerciseInstanceCreateUpdateRequest;\n};\nexport type UsersExerciseInstanceRetrieveApiResponse = /** status 200 */ ExerciseInstanceCreateUpdate;\nexport type UsersExerciseInstanceRetrieveApiArg = {\n /** A unique integer value identifying this exercise instance. */\n id: number;\n};\nexport type UsersExerciseInstanceUpdateApiResponse = /** status 200 */ ExerciseInstanceCreateUpdate;\nexport type UsersExerciseInstanceUpdateApiArg = {\n /** A unique integer value identifying this exercise instance. */\n id: number;\n exerciseInstanceCreateUpdateRequest: ExerciseInstanceCreateUpdateRequest;\n};\nexport type UsersExerciseInstancePartialUpdateApiResponse = /** status 200 */ ExerciseInstanceCreateUpdate;\nexport type UsersExerciseInstancePartialUpdateApiArg = {\n /** A unique integer value identifying this exercise instance. */\n id: number;\n patchedExerciseInstanceCreateUpdateRequest: PatchedExerciseInstanceCreateUpdateRequest;\n};\nexport type UsersExerciseInstanceDestroyApiResponse = unknown;\nexport type UsersExerciseInstanceDestroyApiArg = {\n /** A unique integer value identifying this exercise instance. */\n id: number;\n};\nexport type UsersExerciseTemplateListApiResponse = /** status 200 */ PaginatedExerciseTemplateList;\nexport type UsersExerciseTemplateListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersExerciseTemplateRetrieveApiResponse = /** status 200 */ ExerciseTemplate;\nexport type UsersExerciseTemplateRetrieveApiArg = {\n /** A unique integer value identifying this exercise template. */\n id: number;\n};\nexport type UsersMealSlotSpecificationListApiResponse = /** status 200 */ PaginatedMealSlotSpecificationList;\nexport type UsersMealSlotSpecificationListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersMealSlotSpecificationCreateApiResponse = /** status 201 */ MealSlotSpecification;\nexport type UsersMealSlotSpecificationCreateApiArg = {\n mealSlotSpecificationRequest: MealSlotSpecificationRequest;\n};\nexport type UsersMealSlotSpecificationRetrieveApiResponse = /** status 200 */ MealSlotSpecification;\nexport type UsersMealSlotSpecificationRetrieveApiArg = {\n /** A unique integer value identifying this meal slot specification. */\n id: number;\n};\nexport type UsersMealSlotSpecificationUpdateApiResponse = /** status 200 */ MealSlotSpecification;\nexport type UsersMealSlotSpecificationUpdateApiArg = {\n /** A unique integer value identifying this meal slot specification. */\n id: number;\n mealSlotSpecificationRequest: MealSlotSpecificationRequest;\n};\nexport type UsersMealSlotSpecificationPartialUpdateApiResponse = /** status 200 */ MealSlotSpecification;\nexport type UsersMealSlotSpecificationPartialUpdateApiArg = {\n /** A unique integer value identifying this meal slot specification. */\n id: number;\n patchedMealSlotSpecificationRequest: PatchedMealSlotSpecificationRequest;\n};\nexport type UsersMealSlotSpecificationDestroyApiResponse = unknown;\nexport type UsersMealSlotSpecificationDestroyApiArg = {\n /** A unique integer value identifying this meal slot specification. */\n id: number;\n};\nexport type UsersNutritionDayPlanListApiResponse = /** status 200 */ PaginatedNutritionDayPlanList;\nexport type UsersNutritionDayPlanListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersNutritionDayPlanCreateApiResponse = /** status 201 */ NutritionDayPlan;\nexport type UsersNutritionDayPlanCreateApiArg = {\n nutritionDayPlanRequest: NutritionDayPlanRequest;\n};\nexport type UsersNutritionDayPlanRetrieveApiResponse = /** status 200 */ NutritionDayPlan;\nexport type UsersNutritionDayPlanRetrieveApiArg = {\n /** A unique integer value identifying this nutrition day plan. */\n id: number;\n};\nexport type UsersNutritionDayPlanUpdateApiResponse = /** status 200 */ NutritionDayPlan;\nexport type UsersNutritionDayPlanUpdateApiArg = {\n /** A unique integer value identifying this nutrition day plan. */\n id: number;\n nutritionDayPlanRequest: NutritionDayPlanRequest;\n};\nexport type UsersNutritionDayPlanPartialUpdateApiResponse = /** status 200 */ NutritionDayPlan;\nexport type UsersNutritionDayPlanPartialUpdateApiArg = {\n /** A unique integer value identifying this nutrition day plan. */\n id: number;\n patchedNutritionDayPlanRequest: PatchedNutritionDayPlanRequest;\n};\nexport type UsersNutritionDayPlanDestroyApiResponse = unknown;\nexport type UsersNutritionDayPlanDestroyApiArg = {\n /** A unique integer value identifying this nutrition day plan. */\n id: number;\n};\nexport type UsersOrganisationCreateApiResponse = /** status 201 */ UpdateCreateOrganisation;\nexport type UsersOrganisationCreateApiArg = {\n updateCreateOrganisationRequest: UpdateCreateOrganisationRequest;\n};\nexport type UsersOrganisationPartialUpdateApiResponse = /** status 200 */ UpdateCreateOrganisation;\nexport type UsersOrganisationPartialUpdateApiArg = {\n /** A unique integer value identifying this organisation. */\n id: number;\n patchedUpdateCreateOrganisationRequest: PatchedUpdateCreateOrganisationRequest;\n};\nexport type UsersOrganisationsBySubdomainListApiResponse = /** status 200 */ UpdateCreateOrganisation[];\nexport type UsersOrganisationsBySubdomainListApiArg = {\n /** The organisation's subdomain to fetch */\n subdomain: string;\n};\nexport type UsersPaginatedclientsListApiResponse = /** status 200 */ PaginatedSlimClientList;\nexport type UsersPaginatedclientsListApiArg = {\n accountEnabled?: boolean;\n /** A page number within the paginated result set. */\n page?: number;\n /** A search term. */\n search?: string;\n};\nexport type UsersPaginatedclientsCreateApiResponse = /** status 201 */ SlimClient;\nexport type UsersPaginatedclientsCreateApiArg = {\n slimClientRequest: SlimClientRequest;\n};\nexport type UsersPaginatedclientsRetrieveApiResponse = /** status 200 */ SlimClient;\nexport type UsersPaginatedclientsRetrieveApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersPaginatedclientsUpdateApiResponse = /** status 200 */ SlimClient;\nexport type UsersPaginatedclientsUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n slimClientRequest: SlimClientRequest;\n};\nexport type UsersPaginatedclientsPartialUpdateApiResponse = /** status 200 */ SlimClient;\nexport type UsersPaginatedclientsPartialUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n patchedSlimClientRequest: PatchedSlimClientRequest;\n};\nexport type UsersPaginatedclientsDestroyApiResponse = unknown;\nexport type UsersPaginatedclientsDestroyApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersSetIngredientsToAvoidCreateApiResponse = /** status 200 */ SetIngredientToAvoid;\nexport type UsersSetIngredientsToAvoidCreateApiArg = {\n setIngredientToAvoidRequest: SetIngredientToAvoidRequest;\n};\nexport type UsersStripeCustomerPortalCreateApiResponse = /** status 201 */ StripeCustomerPortal;\nexport type UsersStripeCustomerPortalCreateApiArg = void;\nexport type UsersUserListApiResponse = /** status 200 */ PaginatedUserList;\nexport type UsersUserListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersUserCreateApiResponse = /** status 201 */ User;\nexport type UsersUserCreateApiArg = {\n userRequest: UserRequest;\n};\nexport type UsersUserRetrieveApiResponse = /** status 200 */ User;\nexport type UsersUserRetrieveApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersUserUpdateApiResponse = /** status 200 */ User;\nexport type UsersUserUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n userRequest: UserRequest;\n};\nexport type UsersUserPartialUpdateApiResponse = /** status 200 */ User;\nexport type UsersUserPartialUpdateApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n patchedUserRequest: PatchedUserRequest;\n};\nexport type UsersUserDestroyApiResponse = unknown;\nexport type UsersUserDestroyApiArg = {\n /** A unique integer value identifying this user. */\n id: number;\n};\nexport type UsersUserProfileListApiResponse = /** status 200 */ PaginatedUserProfileList;\nexport type UsersUserProfileListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersUserProfileCreateApiResponse = /** status 201 */ UserProfile;\nexport type UsersUserProfileCreateApiArg = {\n userProfileRequest: UserProfileRequest;\n};\nexport type UsersUserProfileRetrieveApiResponse = /** status 200 */ UserProfile;\nexport type UsersUserProfileRetrieveApiArg = {\n /** A unique integer value identifying this user profile. */\n id: number;\n};\nexport type UsersUserProfileUpdateApiResponse = /** status 200 */ UserProfile;\nexport type UsersUserProfileUpdateApiArg = {\n /** A unique integer value identifying this user profile. */\n id: number;\n userProfileRequest: UserProfileRequest;\n};\nexport type UsersUserProfilePartialUpdateApiResponse = /** status 200 */ UserProfile;\nexport type UsersUserProfilePartialUpdateApiArg = {\n /** A unique integer value identifying this user profile. */\n id: number;\n patchedUserProfileRequest: PatchedUserProfileRequest;\n};\nexport type UsersUserProfileDestroyApiResponse = unknown;\nexport type UsersUserProfileDestroyApiArg = {\n /** A unique integer value identifying this user profile. */\n id: number;\n};\nexport type UsersUserdislikerecipeListApiResponse = /** status 200 */ PaginatedUserDislikeRecipeList;\nexport type UsersUserdislikerecipeListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n recipe?: number;\n user?: number;\n};\nexport type UsersUserdislikerecipeCreateApiResponse = /** status 201 */ UserDislikeRecipe;\nexport type UsersUserdislikerecipeCreateApiArg = {\n userDislikeRecipeRequest: UserDislikeRecipeRequest;\n};\nexport type UsersUserdislikerecipeRetrieveApiResponse = /** status 200 */ UserDislikeRecipe;\nexport type UsersUserdislikerecipeRetrieveApiArg = {\n /** A unique integer value identifying this user dislike recipe. */\n id: number;\n};\nexport type UsersUserdislikerecipeUpdateApiResponse = /** status 200 */ UserDislikeRecipe;\nexport type UsersUserdislikerecipeUpdateApiArg = {\n /** A unique integer value identifying this user dislike recipe. */\n id: number;\n userDislikeRecipeRequest: UserDislikeRecipeRequest;\n};\nexport type UsersUserdislikerecipePartialUpdateApiResponse = /** status 200 */ UserDislikeRecipe;\nexport type UsersUserdislikerecipePartialUpdateApiArg = {\n /** A unique integer value identifying this user dislike recipe. */\n id: number;\n patchedUserDislikeRecipeRequest: PatchedUserDislikeRecipeRequest;\n};\nexport type UsersUserdislikerecipeDestroyApiResponse = unknown;\nexport type UsersUserdislikerecipeDestroyApiArg = {\n /** A unique integer value identifying this user dislike recipe. */\n id: number;\n};\nexport type UsersUserfavouriterecipeListApiResponse = /** status 200 */ PaginatedUserFavouriteRecipeList;\nexport type UsersUserfavouriterecipeListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n recipe?: number;\n user?: number;\n};\nexport type UsersUserfavouriterecipeCreateApiResponse = /** status 201 */ UserFavouriteRecipe;\nexport type UsersUserfavouriterecipeCreateApiArg = {\n userFavouriteRecipeRequest: UserFavouriteRecipeRequest;\n};\nexport type UsersUserfavouriterecipeRetrieveApiResponse = /** status 200 */ UserFavouriteRecipe;\nexport type UsersUserfavouriterecipeRetrieveApiArg = {\n /** A unique integer value identifying this user favourite recipe. */\n id: number;\n};\nexport type UsersUserfavouriterecipeUpdateApiResponse = /** status 200 */ UserFavouriteRecipe;\nexport type UsersUserfavouriterecipeUpdateApiArg = {\n /** A unique integer value identifying this user favourite recipe. */\n id: number;\n userFavouriteRecipeRequest: UserFavouriteRecipeRequest;\n};\nexport type UsersUserfavouriterecipePartialUpdateApiResponse = /** status 200 */ UserFavouriteRecipe;\nexport type UsersUserfavouriterecipePartialUpdateApiArg = {\n /** A unique integer value identifying this user favourite recipe. */\n id: number;\n patchedUserFavouriteRecipeRequest: PatchedUserFavouriteRecipeRequest;\n};\nexport type UsersUserfavouriterecipeDestroyApiResponse = unknown;\nexport type UsersUserfavouriterecipeDestroyApiArg = {\n /** A unique integer value identifying this user favourite recipe. */\n id: number;\n};\nexport type UsersVerifyOtpCreateApiResponse = /** status 200 */ VerifyOtpResponse;\nexport type UsersVerifyOtpCreateApiArg = {\n verifyOtpRequest: VerifyOtpRequest;\n};\nexport type UsersWeeklyNutritionPlanListApiResponse = /** status 200 */ PaginatedWeeklyNutritionPlanList;\nexport type UsersWeeklyNutritionPlanListApiArg = {\n /** A page number within the paginated result set. */\n page?: number;\n};\nexport type UsersWeeklyNutritionPlanCreateApiResponse = /** status 201 */ WeeklyNutritionPlanCreate;\nexport type UsersWeeklyNutritionPlanCreateApiArg = {\n weeklyNutritionPlanCreateRequest: WeeklyNutritionPlanCreateRequest;\n};\nexport type UsersWeeklyNutritionPlanRetrieveApiResponse = /** status 200 */ WeeklyNutritionPlan;\nexport type UsersWeeklyNutritionPlanRetrieveApiArg = {\n /** A unique integer value identifying this weekly nutrition plan. */\n id: number;\n};\nexport type UsersWeeklyNutritionPlanUpdateApiResponse = /** status 200 */ WeeklyNutritionPlanUpdate;\nexport type UsersWeeklyNutritionPlanUpdateApiArg = {\n /** A unique integer value identifying this weekly nutrition plan. */\n id: number;\n weeklyNutritionPlanUpdateRequest: WeeklyNutritionPlanUpdateRequest;\n};\nexport type V2SchemaRetrieveApiResponse = /** status 200 */ {\n [key: string]: any;\n};\nexport type V2SchemaRetrieveApiArg = {\n format?: \"json\" | \"yaml\";\n lang?: \"en-us\" | \"nl\";\n};\nexport type V3SchemaRetrieveApiResponse = /** status 200 */ {\n [key: string]: any;\n};\nexport type V3SchemaRetrieveApiArg = {\n format?: \"json\" | \"yaml\";\n lang?: \"en-us\" | \"nl\";\n};\nexport type SubscriptionVerificationRequest = {\n email: string;\n};\nexport type RecipeTagNameEnum =\n | \"ROOT_NODE\"\n | \"BREAD\"\n | \"BREAKFAST\"\n | \"BURGER\"\n | \"COUSCOUS_AND_QUINOA\"\n | \"DAIRY\"\n | \"DINNER\"\n | \"DIPS_AND_SPREADS\"\n | \"FAVOURITE\"\n | \"HORMONE\"\n | \"KETO\"\n | \"LOW_VARIANTS\"\n | \"LUNCH\"\n | \"PANCAKES_AND_OMELETTES\"\n | \"PASTA\"\n | \"POTATO\"\n | \"PRE_BED\"\n | \"RICE_AND_NOODLES\"\n | \"SALAD\"\n | \"SNACK\"\n | \"SNACKS_AND_BAKES\"\n | \"SOUP\"\n | \"VEGAN\"\n | \"WRAP\"\n | \"CRUSTACEANS_AND_SHELLFISH\"\n | \"HALAL\"\n | \"OTHER\";\nexport type RecipeTag = {\n id: number;\n name: RecipeTagNameEnum;\n};\nexport type SourceProviderEnum = \"WEEKMEALS\" | \"FATSECRET\" | \"USER_GENERATED\" | \"BRANDED\";\nexport type ContentTypeB41Enum = \"singlefoodmeal\" | \"recipetemplate\" | \"recipemeal\";\nexport type SuggestedServing = {\n id?: number;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n fiber?: number;\n calcium?: number;\n cholesterol?: number;\n iron?: number;\n monounsaturated_fat?: number;\n polyunsaturated_fat?: number;\n potassium?: number;\n saturated_fat?: number;\n sodium?: number;\n sugar?: number;\n vitamin_a?: number;\n vitamin_c?: number;\n food: number;\n order?: number;\n one_serving_in_metric_value?: number | null;\n quantity: number;\n measurement_description: string;\n serving_description: string;\n};\nexport type Ingredient = {\n id?: number;\n name: string;\n content_type: ContentTypeB41Enum;\n suggested_serving?: SuggestedServing;\n created: string;\n modified: string;\n optional?: boolean;\n quantity: number;\n legacy_min_quantity?: number | null;\n legacy_max_quantity?: number | null;\n object_id: number;\n};\nexport type RecipeTemplateDirection = {\n id: number;\n recipe_template: number;\n optional?: boolean;\n order?: number;\n text: string;\n};\nexport type RecipeTemplateStatusEnum = \"DRAFT\" | \"INTERNAL_QC_COMPLETE\" | \"EXTERNAL_QC_COMPLETE\";\nexport type BlankEnum = \"\";\nexport type NullEnum = null;\nexport type RecipeTemplate = {\n id?: number;\n name: string;\n cooking_time_min?: number | null;\n preparation_time_min?: number | null;\n tags: RecipeTag[];\n published?: boolean;\n source_provider: SourceProviderEnum;\n author?: number | null;\n ingredients: Ingredient[];\n directions: RecipeTemplateDirection[];\n image?: string;\n external_url?: string | null;\n status?: (RecipeTemplateStatusEnum | BlankEnum | NullEnum) | null;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n fiber: number;\n};\nexport type RecipeTagRequest = {\n name: RecipeTagNameEnum;\n};\nexport type RecipeTemplateRequest = {\n id?: number;\n name: string;\n cooking_time_min?: number | null;\n preparation_time_min?: number | null;\n tags: RecipeTagRequest[];\n published?: boolean;\n source_provider: SourceProviderEnum;\n author?: number | null;\n image?: Blob;\n external_url?: string | null;\n status?: (RecipeTemplateStatusEnum | BlankEnum | NullEnum) | null;\n};\nexport type SuggestedServingRequest = {\n id?: number;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n fiber?: number;\n calcium?: number;\n cholesterol?: number;\n iron?: number;\n monounsaturated_fat?: number;\n polyunsaturated_fat?: number;\n potassium?: number;\n saturated_fat?: number;\n sodium?: number;\n sugar?: number;\n vitamin_a?: number;\n vitamin_c?: number;\n food: number;\n order?: number;\n one_serving_in_metric_value?: number | null;\n quantity: number;\n};\nexport type GeneratedRecipeMealIngredientRequest = {\n suggested_serving: SuggestedServingRequest;\n name: string;\n quantity: number;\n content_type: number;\n optional?: boolean;\n};\nexport type GeneratedRecipeMealDirectionRequest = {\n text: string;\n};\nexport type CreateNewRecipeTemplateRequest = {\n recipe_template: RecipeTemplateRequest;\n ingredients: GeneratedRecipeMealIngredientRequest[];\n directions: GeneratedRecipeMealDirectionRequest[];\n author: number;\n portions: number;\n kcal: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n fiber: number;\n};\nexport type LegacyMajorMacroEnum = \"PROTEIN\" | \"FAT\" | \"CARBOHYDRATE\" | \"SATIETY\";\nexport type GroceryCategoryEnum =\n | \"ASIAN\"\n | \"BAKING\"\n | \"BREAD\"\n | \"CHIPS\"\n | \"CHOCOLATE\"\n | \"COFFEE\"\n | \"CRACKER\"\n | \"DAIRY\"\n | \"DELI\"\n | \"DRINK\"\n | \"FREEZER\"\n | \"FRUIT\"\n | \"HERB\"\n | \"MEAT\"\n | \"MEXICAN\"\n | \"NUT\"\n | \"OAT\"\n | \"OIL\"\n | \"ONLINE\"\n | \"PASTA\"\n | \"POWERSLIM\"\n | \"PRESERVED\"\n | \"READY\"\n | \"REFRIGERATED\"\n | \"RICE\"\n | \"SAUCE\"\n | \"SEED\"\n | \"SOUP\"\n | \"SPICE\"\n | \"SPREAD\"\n | \"VEGETABLE\"\n | \"WHEAT\"\n | \"WINE\"\n | \"WRAP\"\n | \"OTHER\";\nexport type Name756Enum =\n | \"ANIMAL\"\n | \"BEEF\"\n | \"CHICKEN\"\n | \"COCONUT\"\n | \"CORN\"\n | \"CURRY\"\n | \"DAIRY\"\n | \"EGG\"\n | \"FISH\"\n | \"FRUIT\"\n | \"HARD_CHEESE\"\n | \"HERB\"\n | \"LAMB\"\n | \"LEGUME\"\n | \"LEMON\"\n | \"NUT\"\n | \"OAT\"\n | \"PEA\"\n | \"PORK\"\n | \"POULTRY\"\n | \"POWERSLIM\"\n | \"RICE\"\n | \"SEAFOOD\"\n | \"SEED\"\n | \"SOFT_CHEESE\"\n | \"SOYBEAN\"\n | \"SPICE\"\n | \"TOMATO\"\n | \"TUBER\"\n | \"TURKEY\"\n | \"VEGETABLE\"\n | \"WHEAT\"\n | \"OTHER\";\nexport type Nested = {\n id: number;\n slug: string;\n active?: boolean;\n name: Name756Enum;\n lft: number;\n rght: number;\n tree_id: number;\n level: number;\n parent: Nested;\n};\nexport type FoodCategory = {\n id: number;\n slug: string;\n active?: boolean;\n name: Name756Enum;\n lft: number;\n rght: number;\n tree_id: number;\n level: number;\n parent: Nested;\n};\nexport type Food = {\n id?: number;\n brand_name?: string | null;\n legacy_reference_name?: string;\n legacy_major_macro?: (LegacyMajorMacroEnum | BlankEnum | NullEnum) | null;\n legacy_is_healthy?: number;\n max?: number;\n grocery_category?: (GroceryCategoryEnum | BlankEnum | NullEnum) | null;\n legacy_source_url?: string | null;\n source_provider: SourceProviderEnum;\n source_id: string;\n name: string;\n published?: boolean;\n suggested_servings: SuggestedServing[];\n categories: FoodCategory[];\n};\nexport type PaginatedFoodList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: Food[];\n};\nexport type GeneratedRecipeMealIngredient = {\n suggested_serving: SuggestedServing;\n name: string;\n quantity: number;\n content_type: number;\n optional?: boolean;\n};\nexport type GeneratedRecipeMealDirection = {\n text: string;\n};\nexport type GeneratedRecipeMeal = {\n recipe_template: RecipeTemplate;\n ingredients: GeneratedRecipeMealIngredient[];\n directions: GeneratedRecipeMealDirection[];\n portions: number;\n kcal: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n fiber: number;\n};\nexport type PaginatedGeneratedRecipeMealList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: GeneratedRecipeMeal[];\n};\nexport type RecipeTemplateSlim = {\n id?: number;\n name: string;\n cooking_time_min?: number | null;\n preparation_time_min?: number | null;\n published?: boolean;\n source_provider: SourceProviderEnum;\n author?: number | null;\n image?: string;\n external_url?: string | null;\n tags: RecipeTag[];\n};\nexport type RecipeMealRecipeDirection = {\n id: number;\n optional?: boolean;\n order?: number;\n text: string;\n recipe_meal: number;\n};\nexport type RecipeMeal = {\n id: number;\n recipe_template: RecipeTemplateSlim;\n portions: number;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n fiber: number;\n ingredients: Ingredient[];\n directions: RecipeMealRecipeDirection[];\n};\nexport type GeneratedRecipeMealRequest = {\n recipe_template: RecipeTemplateRequest;\n ingredients: GeneratedRecipeMealIngredientRequest[];\n directions: GeneratedRecipeMealDirectionRequest[];\n portions: number;\n kcal: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n fiber: number;\n};\nexport type PaginatedIngredientList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: Ingredient[];\n};\nexport type IngredientPost = {\n id?: number;\n name: string;\n content_type: ContentTypeB41Enum;\n created: string;\n modified: string;\n optional?: boolean;\n quantity: number;\n legacy_min_quantity?: number | null;\n legacy_max_quantity?: number | null;\n object_id: number;\n suggested_serving: number;\n};\nexport type IngredientPostRequest = {\n id?: number;\n content_type: ContentTypeB41Enum;\n optional?: boolean;\n quantity: number;\n legacy_min_quantity?: number | null;\n legacy_max_quantity?: number | null;\n object_id: number;\n suggested_serving: number;\n};\nexport type IngredientRequest = {\n id?: number;\n content_type: ContentTypeB41Enum;\n suggested_serving?: SuggestedServingRequest;\n optional?: boolean;\n quantity: number;\n legacy_min_quantity?: number | null;\n legacy_max_quantity?: number | null;\n object_id: number;\n};\nexport type PatchedIngredientRequest = {\n id?: number;\n content_type?: ContentTypeB41Enum;\n suggested_serving?: SuggestedServingRequest;\n optional?: boolean;\n quantity?: number;\n legacy_min_quantity?: number | null;\n legacy_max_quantity?: number | null;\n object_id?: number;\n};\nexport type IngredientToAvoid = {\n id: string;\n name: string;\n translations: number[];\n keywords: any;\n emoji: string;\n};\nexport type PaginatedIngredientToAvoidList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: IngredientToAvoid[];\n};\nexport type SuggestedServingSearch = {\n id?: number;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n food_name: string;\n one_serving_in_metric_value?: number | null;\n serving_description: string;\n legacy_reference_name: string | null;\n};\nexport type PreferredSuggestedServing = {\n reference_name_in_recipe: string;\n organisation: number;\n suggested_serving: SuggestedServingSearch;\n};\nexport type PaginatedPreferredSuggestedServingList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: PreferredSuggestedServing[];\n};\nexport type SuggestedServingSearchRequest = {\n id?: number;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n one_serving_in_metric_value?: number | null;\n};\nexport type PreferredSuggestedServingRequest = {\n reference_name_in_recipe: string;\n organisation: number;\n suggested_serving: SuggestedServingSearchRequest;\n};\nexport type PatchedPreferredSuggestedServingRequest = {\n reference_name_in_recipe?: string;\n organisation?: number;\n suggested_serving?: SuggestedServingSearchRequest;\n};\nexport type QuickAddMeal = {\n id: number;\n kcal: number;\n protein?: number;\n carbohydrates?: number;\n fat?: number;\n fiber?: number;\n calcium?: number;\n cholesterol?: number;\n iron?: number;\n monounsaturated_fat?: number;\n polyunsaturated_fat?: number;\n potassium?: number;\n saturated_fat?: number;\n sodium?: number;\n sugar?: number;\n vitamin_a?: number;\n vitamin_c?: number;\n};\nexport type PaginatedQuickAddMealList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: QuickAddMeal[];\n};\nexport type QuickAddMealRequest = {\n kcal: number;\n protein?: number;\n carbohydrates?: number;\n fat?: number;\n fiber?: number;\n calcium?: number;\n cholesterol?: number;\n iron?: number;\n monounsaturated_fat?: number;\n polyunsaturated_fat?: number;\n potassium?: number;\n saturated_fat?: number;\n sodium?: number;\n sugar?: number;\n vitamin_a?: number;\n vitamin_c?: number;\n};\nexport type PatchedQuickAddMealRequest = {\n kcal?: number;\n protein?: number;\n carbohydrates?: number;\n fat?: number;\n fiber?: number;\n calcium?: number;\n cholesterol?: number;\n iron?: number;\n monounsaturated_fat?: number;\n polyunsaturated_fat?: number;\n potassium?: number;\n saturated_fat?: number;\n sodium?: number;\n sugar?: number;\n vitamin_a?: number;\n vitamin_c?: number;\n};\nexport type RecipeFeedbackLineItem = {\n id: string;\n content_type: string;\n object_id: number;\n feedback_text: string;\n resolved?: boolean;\n author_name?: string;\n timestamp: string;\n};\nexport type PaginatedRecipeFeedbackLineItemList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: RecipeFeedbackLineItem[];\n};\nexport type RecipeFeedbackLineItemRequest = {\n content_type: string;\n object_id: number;\n feedback_text: string;\n resolved?: boolean;\n author_name?: string;\n};\nexport type PatchedRecipeFeedbackLineItemRequest = {\n content_type?: string;\n object_id?: number;\n feedback_text?: string;\n resolved?: boolean;\n author_name?: string;\n};\nexport type PaginatedRecipeMealList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: RecipeMeal[];\n};\nexport type RecipeTemplateSlimRequest = {\n id?: number;\n cooking_time_min?: number | null;\n preparation_time_min?: number | null;\n published?: boolean;\n source_provider: SourceProviderEnum;\n author?: number | null;\n image?: Blob;\n external_url?: string | null;\n tags: RecipeTagRequest[];\n};\nexport type RecipeMealRequest = {\n recipe_template: RecipeTemplateSlimRequest;\n portions: number;\n};\nexport type PatchedRecipeMealRequest = {\n recipe_template?: RecipeTemplateSlimRequest;\n portions?: number;\n};\nexport type PaginatedRecipeTagList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: RecipeTag[];\n};\nexport type PaginatedRecipeTemplateList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: RecipeTemplate[];\n};\nexport type PatchedRecipeTemplateRequest = {\n id?: number;\n name?: string;\n cooking_time_min?: number | null;\n preparation_time_min?: number | null;\n tags?: RecipeTagRequest[];\n published?: boolean;\n source_provider?: SourceProviderEnum;\n author?: number | null;\n image?: Blob;\n external_url?: string | null;\n status?: (RecipeTemplateStatusEnum | BlankEnum | NullEnum) | null;\n};\nexport type FoodSearchAutoComplete = {\n suggestions: string[];\n};\nexport type SingleFoodMeal = {\n id?: number;\n ingredient: Ingredient;\n kcal: number;\n protein: number;\n carbohydrates: number;\n fat: number;\n fiber: number;\n};\nexport type PaginatedSingleFoodMealList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: SingleFoodMeal[];\n};\nexport type SingleFoodMealRequest = {\n id?: number;\n};\nexport type PatchedSingleFoodMealRequest = {\n id?: number;\n};\nexport type PaginatedSuggestedServingList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: SuggestedServing[];\n};\nexport type PaginatedSuggestedServingSearchList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: SuggestedServingSearch[];\n};\nexport type UserBodyFatPercentage = {\n id: number;\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PaginatedUserBodyFatPercentageList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserBodyFatPercentage[];\n};\nexport type UserBodyFatPercentageRequest = {\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PatchedUserBodyFatPercentageRequest = {\n created_at?: string;\n value?: number;\n user?: number;\n};\nexport type BodyAreaEnum = \"WAIST\" | \"NECK\" | \"HIPS\" | \"SUPRAILIAC\" | \"UMBILICAL\";\nexport type UserDistance = {\n id: number;\n created_at?: string;\n value: number;\n body_area: BodyAreaEnum;\n user: number;\n};\nexport type PaginatedUserDistanceList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserDistance[];\n};\nexport type UserDistanceRequest = {\n created_at?: string;\n value: number;\n body_area: BodyAreaEnum;\n user: number;\n};\nexport type PatchedUserDistanceRequest = {\n created_at?: string;\n value?: number;\n body_area?: BodyAreaEnum;\n user?: number;\n};\nexport type UserSleep = {\n id: number;\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PaginatedUserSleepList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserSleep[];\n};\nexport type UserSleepRequest = {\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PatchedUserSleepRequest = {\n created_at?: string;\n value?: number;\n user?: number;\n};\nexport type ValueEnum = \"VERY_LOW\" | \"LOW\" | \"MEDIUM\" | \"HIGH\" | \"VERY_HIGH\";\nexport type UserStress = {\n id: number;\n created_at?: string;\n value: ValueEnum;\n user: number;\n};\nexport type PaginatedUserStressList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserStress[];\n};\nexport type UserStressRequest = {\n created_at?: string;\n value: ValueEnum;\n user: number;\n};\nexport type PatchedUserStressRequest = {\n created_at?: string;\n value?: ValueEnum;\n user?: number;\n};\nexport type MeasurementTypeEnum = \"WEIGHT\" | \"WAIST_CIRCUMFERENCE\" | \"SLEEP\" | \"STRESS\";\nexport type DeleteMeasurement = {\n user_id: number;\n measurement_type: MeasurementTypeEnum;\n measurement_id: number;\n};\nexport type DeleteMeasurementRequest = {\n user_id: number;\n measurement_type: MeasurementTypeEnum;\n measurement_id: number;\n};\nexport type UserWeight = {\n id: number;\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PaginatedUserWeightList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserWeight[];\n};\nexport type UserWeightRequest = {\n created_at?: string;\n value: number;\n user: number;\n};\nexport type PatchedUserWeightRequest = {\n created_at?: string;\n value?: number;\n user?: number;\n};\nexport type AutoPlannerRequest = {\n date: string;\n user: number;\n meal_slot_ids?: number[];\n};\nexport type AutoPlanDaysRequest = {\n start_date_inclusive: string;\n num_days: number;\n delete_existing_plans?: boolean;\n};\nexport type CalendarItemStatusEnum = \"PLANNED\" | \"EATEN\" | \"SKIPPED\";\nexport type Meal =\n | ({\n content_type: \"QuickAddMeal\";\n } & QuickAddMeal)\n | ({\n content_type: \"RecipeMeal\";\n } & RecipeMeal)\n | ({\n content_type: \"SingleFoodMeal\";\n } & SingleFoodMeal);\nexport type CalendarItemContentTypeEnum = \"quickaddmeal\" | \"recipemeal\" | \"singlefoodmeal\";\nexport type CalendarItem = {\n id?: number;\n status?: CalendarItemStatusEnum;\n meal_slot: number;\n meal_moment: string;\n meal: Meal;\n content_type: CalendarItemContentTypeEnum;\n calendar_day: number;\n object_id: number;\n modified: string;\n};\nexport type CalendarDay = {\n id?: number;\n user: number;\n date: string;\n calendar_items: CalendarItem[];\n note?: string | null;\n};\nexport type PaginatedCalendarDayList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: CalendarDay[];\n};\nexport type CalendarDayRequest = {\n id?: number;\n user: number;\n date: string;\n note?: string | null;\n};\nexport type PatchedCalendarDayRequest = {\n id?: number;\n user?: number;\n date?: string;\n note?: string | null;\n};\nexport type PaginatedCalendarItemList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: CalendarItem[];\n};\nexport type CalendarItemRequest = {\n id?: number;\n status?: CalendarItemStatusEnum;\n meal_slot: number;\n content_type: CalendarItemContentTypeEnum;\n calendar_day: number;\n object_id: number;\n};\nexport type PatchedCalendarItemRequest = {\n id?: number;\n status?: CalendarItemStatusEnum;\n meal_slot?: number;\n content_type?: CalendarItemContentTypeEnum;\n calendar_day?: number;\n object_id?: number;\n};\nexport type CopyFromDate = {\n user: number;\n from_calendar_day_id: number;\n to_date: string;\n};\nexport type CopyFromDateRequest = {\n user: number;\n from_calendar_day_id: number;\n to_date: string;\n};\nexport type MealMomentEnum =\n | \"BREAKFAST\"\n | \"MORNING_SNACK\"\n | \"LUNCH\"\n | \"AFTERNOON_SNACK\"\n | \"DINNER\"\n | \"SNACK\"\n | \"LATE_SNACK\";\nexport type CopyMealsToMealMoment = {\n user: number;\n from_calendar_day_id: number;\n to_calendar_day: string;\n meal_moment: MealMomentEnum;\n};\nexport type CopyMealsToMealMomentRequest = {\n user: number;\n from_calendar_day_id: number;\n to_calendar_day: string;\n meal_moment: MealMomentEnum;\n};\nexport type RecipeMealPotions = {\n portions: number;\n};\nexport type RecipeMealPotionsRequest = {\n portions: number;\n};\nexport type CategoryEnum =\n | \"ASIAN\"\n | \"BAKING\"\n | \"BREAD\"\n | \"CHIPS\"\n | \"CHOCOLATE\"\n | \"COFFEE\"\n | \"CRACKER\"\n | \"DAIRY\"\n | \"DELI\"\n | \"DRINK\"\n | \"FREEZER\"\n | \"FRUIT\"\n | \"HERB\"\n | \"MEAT\"\n | \"MEXICAN\"\n | \"NUT\"\n | \"OAT\"\n | \"OIL\"\n | \"ONLINE\"\n | \"PASTA\"\n | \"POWERSLIM\"\n | \"PRESERVED\"\n | \"READY\"\n | \"REFRIGERATED\"\n | \"RICE\"\n | \"SAUCE\"\n | \"SEED\"\n | \"SOUP\"\n | \"SPICE\"\n | \"SPREAD\"\n | \"VEGETABLE\"\n | \"WHEAT\"\n | \"WINE\"\n | \"WRAP\"\n | \"OTHER\";\nexport type GroceryListItemUpdate = {\n id: number;\n suggested_serving: SuggestedServing;\n name: string;\n category: CategoryEnum;\n checked?: boolean;\n quantity: number;\n grocery_list: number;\n};\nexport type GroceryListListRetrieve = {\n id: number;\n items: GroceryListItemUpdate[];\n start_date: string;\n end_date: string;\n};\nexport type PaginatedGroceryListListRetrieveList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: GroceryListListRetrieve[];\n};\nexport type GroceryListUpdateCreateRequest = {\n start_date: string;\n end_date: string;\n user: number;\n};\nexport type PatchedGroceryListItemUpdateRequest = {\n suggested_serving?: SuggestedServingRequest;\n name?: string;\n category?: CategoryEnum;\n checked?: boolean;\n quantity?: number;\n grocery_list?: number;\n};\nexport type PlanGeneratedRecipeMeal = {\n recipe_template: RecipeTemplate;\n ingredients: GeneratedRecipeMealIngredient[];\n directions: GeneratedRecipeMealDirection[];\n calendar_day_id: number;\n meal_slot_specification_id: number;\n portions_to_plan?: number;\n portions: number;\n kcal: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n fiber: number;\n};\nexport type PlanGeneratedRecipeMealRequest = {\n recipe_template: RecipeTemplateRequest;\n ingredients: GeneratedRecipeMealIngredientRequest[];\n directions: GeneratedRecipeMealDirectionRequest[];\n calendar_day_id: number;\n meal_slot_specification_id: number;\n portions_to_plan?: number;\n portions: number;\n kcal: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n fiber: number;\n};\nexport type PlanSingleFoodMeal = {\n quantity: number;\n suggested_serving_id: number;\n calendar_day_id: number;\n meal_slot_id: number;\n};\nexport type PlanSingleFoodMealRequest = {\n quantity: number;\n suggested_serving_id: number;\n calendar_day_id: number;\n meal_slot_id: number;\n};\nexport type SaveAndPlanRecipeTemplate = {\n id: number;\n name: string;\n calendar_day_id: number;\n meal_slot_id: number;\n existing_recipe_template_id?: number;\n};\nexport type SaveAndPlanRecipeTemplateRequest = {\n id: number;\n name: string;\n calendar_day_id: number;\n meal_slot_id: number;\n existing_recipe_template_id?: number;\n};\nexport type TokenCreate = {\n magic_link_token: string;\n};\nexport type TokenCreateRequest = {\n magic_link_token: string;\n};\nexport type AggregateUsageEnum = \"last_during_period\" | \"last_ever\" | \"max\" | \"sum\";\nexport type BillingSchemeEnum = \"per_unit\" | \"tiered\";\nexport type IntervalEnum = \"day\" | \"month\" | \"week\" | \"year\";\nexport type TiersModeEnum = \"graduated\" | \"volume\";\nexport type UsageTypeEnum = \"licensed\" | \"metered\";\nexport type DjstripePlan = {\n djstripe_id: number;\n djstripe_created: string;\n djstripe_updated: string;\n id: string;\n livemode?: boolean | null;\n created?: string | null;\n metadata?: any | null;\n description?: string | null;\n active: boolean;\n aggregate_usage?: AggregateUsageEnum | BlankEnum;\n amount?: string | null;\n amount_decimal?: string | null;\n billing_scheme?: BillingSchemeEnum | BlankEnum;\n currency: string;\n interval: IntervalEnum;\n interval_count?: number | null;\n nickname?: string;\n tiers?: any | null;\n tiers_mode?: (TiersModeEnum | BlankEnum | NullEnum) | null;\n transform_usage?: any | null;\n trial_period_days?: number | null;\n usage_type?: UsageTypeEnum;\n djstripe_owner_account?: string | null;\n product?: string | null;\n};\nexport type TypeEnum = \"one_time\" | \"recurring\";\nexport type DjstripePrice = {\n djstripe_id: number;\n djstripe_created: string;\n djstripe_updated: string;\n id: string;\n livemode?: boolean | null;\n created?: string | null;\n metadata?: any | null;\n description?: string | null;\n active: boolean;\n currency: string;\n nickname?: string;\n recurring?: any | null;\n type: TypeEnum;\n unit_amount?: number | null;\n unit_amount_decimal?: string | null;\n billing_scheme?: BillingSchemeEnum | BlankEnum;\n lookup_key?: string | null;\n tiers?: any | null;\n tiers_mode?: (TiersModeEnum | BlankEnum | NullEnum) | null;\n transform_quantity?: any | null;\n djstripe_owner_account?: string | null;\n product: string;\n};\nexport type ProrationBehaviorEnum = \"always_invoice\" | \"create_prorations\" | \"none\";\nexport type DjstripeSubscriptionItem = {\n djstripe_id: number;\n plan: DjstripePlan;\n price: DjstripePrice;\n djstripe_created: string;\n djstripe_updated: string;\n id: string;\n livemode?: boolean | null;\n created?: string | null;\n metadata?: any | null;\n description?: string | null;\n billing_thresholds?: any | null;\n proration_behavior?: ProrationBehaviorEnum | BlankEnum;\n proration_date?: string | null;\n quantity?: number | null;\n djstripe_owner_account?: string | null;\n subscription: string;\n tax_rates?: number[];\n};\nexport type CollectionMethodEnum = \"charge_automatically\" | \"send_invoice\";\nexport type DjstripeSubscriptionStatusEnum =\n | \"active\"\n | \"canceled\"\n | \"incomplete\"\n | \"incomplete_expired\"\n | \"past_due\"\n | \"trialing\"\n | \"unpaid\";\nexport type DjstripeSubscription = {\n djstripe_id: number;\n items: DjstripeSubscriptionItem[];\n djstripe_created: string;\n djstripe_updated: string;\n id: string;\n livemode?: boolean | null;\n created?: string | null;\n metadata?: any | null;\n description?: string | null;\n application_fee_percent?: string | null;\n billing_cycle_anchor?: string | null;\n billing_thresholds?: any | null;\n cancel_at?: string | null;\n cancel_at_period_end?: boolean;\n canceled_at?: string | null;\n collection_method: CollectionMethodEnum;\n current_period_end: string;\n current_period_start: string;\n days_until_due?: number | null;\n discount?: any | null;\n ended_at?: string | null;\n next_pending_invoice_item_invoice?: string | null;\n pause_collection?: any | null;\n pending_invoice_item_interval?: any | null;\n pending_update?: any | null;\n proration_behavior?: ProrationBehaviorEnum | BlankEnum;\n proration_date?: string | null;\n quantity?: number | null;\n start_date?: string | null;\n status: DjstripeSubscriptionStatusEnum;\n trial_end?: string | null;\n trial_start?: string | null;\n djstripe_owner_account?: string | null;\n customer: string;\n default_payment_method?: string | null;\n default_source?: string | null;\n latest_invoice?: string | null;\n pending_setup_intent?: string | null;\n plan?: number | null;\n schedule?: number | null;\n default_tax_rates?: number[];\n};\nexport type TaxExemptEnum = \"exempt\" | \"none\" | \"reverse\";\nexport type DjstripeCustomer = {\n djstripe_id: number;\n subscriptions: DjstripeSubscription[];\n djstripe_created: string;\n djstripe_updated: string;\n id: string;\n livemode?: boolean | null;\n created?: string | null;\n metadata?: any | null;\n description?: string | null;\n address?: any | null;\n balance?: number | null;\n currency?: string;\n delinquent?: boolean | null;\n deleted?: boolean | null;\n coupon_start: string | null;\n coupon_end: string | null;\n discount?: any | null;\n email?: string;\n invoice_prefix?: string;\n invoice_settings?: any | null;\n name?: string;\n phone?: string;\n preferred_locales?: any | null;\n shipping?: any | null;\n tax_exempt?: TaxExemptEnum;\n date_purged: string | null;\n djstripe_owner_account: string | null;\n default_source?: string | null;\n coupon?: number | null;\n default_payment_method?: string | null;\n subscriber: number | null;\n};\nexport type MealTypeEnum = \"BREAKFAST\" | \"LUNCH\" | \"DINNER\" | \"SNACK\";\nexport type MealSlotSpecification = {\n id: number;\n name?: string;\n meal_type: MealTypeEnum;\n order: number;\n meal_moment: MealMomentEnum;\n kcal?: number | null;\n protein?: number | null;\n carbohydrates?: number | null;\n fat?: number | null;\n fiber?: number | null;\n nutrition_day_plan: number;\n};\nexport type NutritionDayPlan = {\n id: number;\n name?: string;\n meal_slot_specifications: MealSlotSpecification[];\n};\nexport type WeeklyNutritionPlan = {\n id: number;\n name?: string;\n monday: NutritionDayPlan;\n tuesday: NutritionDayPlan;\n wednesday: NutritionDayPlan;\n thursday: NutritionDayPlan;\n friday: NutritionDayPlan;\n saturday: NutritionDayPlan;\n sunday: NutritionDayPlan;\n};\nexport type GenderEnum = \"MALE\" | \"FEMALE\";\nexport type ActivityEnum = \"SEDENTARY\" | \"MILDLY_ACTIVE\" | \"ACTIVE\" | \"VERY_ACTIVE\";\nexport type SustainabilityEnum = \"SUSTAINABLE\" | \"OPTIMAL\";\nexport type DietEnum =\n | \"VEGAN\"\n | \"LACTO_VEGETARIAN\"\n | \"OVO_VEGETARIAN\"\n | \"VEGETARIAN\"\n | \"PESCATARIAN\"\n | \"OMNIVORE\"\n | \"HALAL\";\nexport type ExerciseTemplate = {\n id: number;\n exercise_name: string;\n kcal_per_kg_per_min: number;\n};\nexport type ExerciseInstanceListRetrieve = {\n id: number;\n intake: number;\n exercise: ExerciseTemplate;\n minutes_per_session: number;\n sessions_per_week: number;\n};\nexport type MainGoalEnum = \"GAIN_MUSCLE\" | \"LOSE_WEIGHT\" | \"RECOMPOSITION\";\nexport type GoalEnum = \"GAIN_MUSCLE\" | \"LOSE_WEIGHT\" | \"RECOMPOSITION\";\nexport type PersonalWeightUnitEnum = \"KILOGRAMS\" | \"STONES\" | \"POUNDS\";\nexport type UserProfile = {\n id: number;\n weekly_nutrition_plan: WeeklyNutritionPlan | null;\n gender: GenderEnum;\n activity: ActivityEnum;\n sustainability: SustainabilityEnum;\n diet: DietEnum;\n weight: number;\n body_fat_percentage: number;\n food_intolerances_gluten?: boolean;\n food_intolerances_lactose?: boolean;\n food_intolerances_nut?: boolean;\n food_intolerances_crustaceans_shellfish?: boolean;\n exercise_instances: ExerciseInstanceListRetrieve[];\n is_keto_user?: boolean;\n main_goal?: MainGoalEnum;\n goal?: (GoalEnum | NullEnum) | null;\n age?: number | null;\n height_in_cm?: number | null;\n goal_weight_in_kg?: number | null;\n goal_weekly_change_in_kg?: number | null;\n uses_imperial_measurements_for_recipes?: boolean;\n uses_imperial_measurements_for_height?: boolean;\n personal_weight_unit?: PersonalWeightUnitEnum;\n last_menstrual_period_start_date?: string | null;\n menstrual_cycle_length?: number | null;\n is_on_menopause_diet?: boolean;\n};\nexport type ClientAuthenticationMethodEnum = \"MAGIC_LINK\" | \"OTP\";\nexport type Organisation = {\n id: number;\n name: string;\n product_stripe_id: string | null;\n primary_colour?: string | null;\n secondary_colour?: string | null;\n logo?: string;\n logo_visible?: boolean;\n disable_logo_curve?: boolean;\n clients_are_diy?: boolean;\n can_send_email_campaigns?: boolean | null;\n client_authentication_method?: ClientAuthenticationMethodEnum;\n custom_notes_message?: string | null;\n support_url?: string | null;\n support_email?: string | null;\n subdomain?: string | null;\n feature_flag_create_your_own_recipes?: boolean;\n feature_flag_disable_product_logging?: boolean;\n feature_flag_generate_meals_button_in_planner?: boolean;\n auto_plan_initial_meals?: boolean;\n};\nexport type Coach = {\n organisation: Organisation;\n account_enabled?: boolean;\n uses_imperial_measurements?: boolean;\n};\nexport type FeatureFlagsForUser = {\n flags: string[];\n switches: string[];\n samples: string[];\n};\nexport type User = {\n id: number;\n email: string;\n first_name?: string;\n last_name?: string;\n customer: DjstripeCustomer[];\n is_coach?: boolean;\n account_enabled?: boolean;\n payment_status_override?: boolean;\n intake?: UserProfile;\n organisation: Organisation;\n coach: Coach;\n ingredients_to_avoid?: string[];\n uses_imperial_measurements?: boolean;\n feature_flags_for_user: FeatureFlagsForUser;\n};\nexport type PaginatedUserList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: User[];\n};\nexport type CustomUserCreate = {\n id: number;\n email: string;\n first_name: string;\n last_name: string;\n intake: UserProfile;\n};\nexport type UserProfileRequest = {\n user_id?: number;\n gender: GenderEnum;\n activity: ActivityEnum;\n sustainability: SustainabilityEnum;\n diet: DietEnum;\n weight: number;\n body_fat_percentage: number;\n food_intolerances_gluten?: boolean;\n food_intolerances_lactose?: boolean;\n food_intolerances_nut?: boolean;\n food_intolerances_crustaceans_shellfish?: boolean;\n is_keto_user?: boolean;\n main_goal?: MainGoalEnum;\n goal?: (GoalEnum | NullEnum) | null;\n age?: number | null;\n height_in_cm?: number | null;\n goal_weight_in_kg?: number | null;\n goal_weekly_change_in_kg?: number | null;\n uses_imperial_measurements_for_recipes?: boolean;\n uses_imperial_measurements_for_height?: boolean;\n personal_weight_unit?: PersonalWeightUnitEnum;\n last_menstrual_period_start_date?: string | null;\n menstrual_cycle_length?: number | null;\n is_on_menopause_diet?: boolean;\n};\nexport type CustomUserCreateRequest = {\n email: string;\n first_name: string;\n last_name: string;\n intake: UserProfileRequest;\n};\nexport type OrganisationRequest = {\n name: string;\n primary_colour?: string | null;\n secondary_colour?: string | null;\n logo?: Blob;\n logo_visible?: boolean;\n disable_logo_curve?: boolean;\n clients_are_diy?: boolean;\n can_send_email_campaigns?: boolean | null;\n client_authentication_method?: ClientAuthenticationMethodEnum;\n custom_notes_message?: string | null;\n support_url?: string | null;\n support_email?: string | null;\n subdomain?: string | null;\n feature_flag_create_your_own_recipes?: boolean;\n feature_flag_disable_product_logging?: boolean;\n feature_flag_generate_meals_button_in_planner?: boolean;\n auto_plan_initial_meals?: boolean;\n};\nexport type CoachRequest = {\n organisation: OrganisationRequest;\n account_enabled?: boolean;\n uses_imperial_measurements?: boolean;\n};\nexport type UserRequest = {\n email: string;\n first_name?: string;\n last_name?: string;\n is_coach?: boolean;\n account_enabled?: boolean;\n payment_status_override?: boolean;\n intake?: UserProfileRequest;\n organisation: OrganisationRequest;\n coach: CoachRequest;\n ingredients_to_avoid?: string[];\n uses_imperial_measurements?: boolean;\n};\nexport type PatchedUserRequest = {\n email?: string;\n first_name?: string;\n last_name?: string;\n is_coach?: boolean;\n account_enabled?: boolean;\n payment_status_override?: boolean;\n intake?: UserProfileRequest;\n organisation?: OrganisationRequest;\n coach?: CoachRequest;\n ingredients_to_avoid?: string[];\n uses_imperial_measurements?: boolean;\n};\nexport type Activation = {\n uid: string;\n token: string;\n};\nexport type ActivationRequest = {\n uid: string;\n token: string;\n};\nexport type SendEmailReset = {\n email: string;\n};\nexport type SendEmailResetRequest = {\n email: string;\n};\nexport type UsernameResetConfirm = {\n new_email: string;\n};\nexport type UsernameResetConfirmRequest = {\n new_email: string;\n};\nexport type PasswordResetConfirm = {\n uid: string;\n token: string;\n new_password: string;\n};\nexport type PasswordResetConfirmRequest = {\n uid: string;\n token: string;\n new_password: string;\n};\nexport type SetUsername = {\n current_password: string;\n new_email: string;\n};\nexport type SetUsernameRequest = {\n current_password: string;\n new_email: string;\n};\nexport type SetPassword = {\n new_password: string;\n current_password: string;\n};\nexport type SetPasswordRequest = {\n new_password: string;\n current_password: string;\n};\nexport type Brand = {\n support_url: string;\n uses_pwa: boolean;\n logo?: string;\n primary_colour?: string;\n};\nexport type PaginatedBrandList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: Brand[];\n};\nexport type CancelSubscription = {\n user: number;\n deal_cancel_at?: string;\n};\nexport type CancelSubscriptionRequest = {\n user: number;\n deal_cancel_at?: string;\n};\nexport type CreateDemoAccountResponse = {\n organisation_id: number;\n organisation_name: string;\n coach_id: number;\n client_id: number;\n coach_magic_link: string;\n client_magic_link: string;\n organisation_admin_panel_link: string;\n};\nexport type CreateDemoAccountRequest = {\n organisation_name?: string;\n organisation_logo?: string | null;\n organisation_primary_colour?: string;\n recipe_1_name?: string;\n recipe_1_image?: string;\n};\nexport type AuthenticationMethodEnum = \"MAGIC_LINK\" | \"OTP\";\nexport type LoginSignupPortalResponse = {\n authentication_method: AuthenticationMethodEnum;\n};\nexport type LoginSignupPortalRequest = {\n email: string;\n organisation_subdomain: string;\n redirect_url: string;\n};\nexport type MagicLinkCreate = {\n email: string;\n redirect_url: string;\n};\nexport type MagicLinkCreateRequest = {\n email: string;\n redirect_url: string;\n};\nexport type SendOtp = {\n email: string;\n};\nexport type SendOtpRequest = {\n email: string;\n};\nexport type PaginatedExerciseInstanceListRetrieveList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: ExerciseInstanceListRetrieve[];\n};\nexport type ExerciseInstanceCreateUpdate = {\n id: number;\n minutes_per_session: number;\n sessions_per_week: number;\n intake: number;\n exercise: number;\n};\nexport type ExerciseInstanceCreateUpdateRequest = {\n minutes_per_session: number;\n sessions_per_week: number;\n intake: number;\n exercise: number;\n};\nexport type PatchedExerciseInstanceCreateUpdateRequest = {\n minutes_per_session?: number;\n sessions_per_week?: number;\n intake?: number;\n exercise?: number;\n};\nexport type PaginatedExerciseTemplateList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: ExerciseTemplate[];\n};\nexport type PaginatedMealSlotSpecificationList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: MealSlotSpecification[];\n};\nexport type MealSlotSpecificationRequest = {\n name?: string;\n meal_type: MealTypeEnum;\n order: number;\n meal_moment: MealMomentEnum;\n kcal?: number | null;\n protein?: number | null;\n carbohydrates?: number | null;\n fat?: number | null;\n fiber?: number | null;\n nutrition_day_plan: number;\n};\nexport type PatchedMealSlotSpecificationRequest = {\n name?: string;\n meal_type?: MealTypeEnum;\n order?: number;\n meal_moment?: MealMomentEnum;\n kcal?: number | null;\n protein?: number | null;\n carbohydrates?: number | null;\n fat?: number | null;\n fiber?: number | null;\n nutrition_day_plan?: number;\n};\nexport type PaginatedNutritionDayPlanList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: NutritionDayPlan[];\n};\nexport type NutritionDayPlanRequest = {\n name?: string;\n};\nexport type PatchedNutritionDayPlanRequest = {\n name?: string;\n};\nexport type UpdateCreateOrganisation = {\n id?: number;\n name: string;\n primary_colour?: string | null;\n secondary_colour?: string | null;\n logo?: string;\n app_icon?: string | null;\n support_url?: string | null;\n support_email?: string | null;\n subdomain?: string | null;\n logo_visible?: boolean;\n disable_logo_curve?: boolean;\n clients_are_diy?: boolean;\n can_send_email_campaigns?: boolean;\n client_authentication_method?: ClientAuthenticationMethodEnum;\n uses_pwa?: boolean;\n feature_flag_disable_product_logging?: boolean;\n feature_flag_create_your_own_recipes?: boolean;\n feature_flag_generate_meals_button_in_planner?: boolean;\n auto_plan_initial_meals?: boolean;\n is_used_only_for_demos?: boolean;\n product?: number | null;\n whitelisted_recipes?: number[];\n denylist_recipes?: number[];\n};\nexport type UpdateCreateOrganisationRequest = {\n id?: number;\n name: string;\n primary_colour?: string | null;\n secondary_colour?: string | null;\n logo?: Blob;\n app_icon?: Blob | null;\n support_url?: string | null;\n support_email?: string | null;\n subdomain?: string | null;\n logo_visible?: boolean;\n disable_logo_curve?: boolean;\n clients_are_diy?: boolean;\n can_send_email_campaigns?: boolean;\n client_authentication_method?: ClientAuthenticationMethodEnum;\n uses_pwa?: boolean;\n feature_flag_disable_product_logging?: boolean;\n feature_flag_create_your_own_recipes?: boolean;\n feature_flag_generate_meals_button_in_planner?: boolean;\n auto_plan_initial_meals?: boolean;\n is_used_only_for_demos?: boolean;\n product?: number | null;\n whitelisted_recipes?: number[];\n denylist_recipes?: number[];\n};\nexport type PatchedUpdateCreateOrganisationRequest = {\n id?: number;\n name?: string;\n primary_colour?: string | null;\n secondary_colour?: string | null;\n logo?: Blob;\n app_icon?: Blob | null;\n support_url?: string | null;\n support_email?: string | null;\n subdomain?: string | null;\n logo_visible?: boolean;\n disable_logo_curve?: boolean;\n clients_are_diy?: boolean;\n can_send_email_campaigns?: boolean;\n client_authentication_method?: ClientAuthenticationMethodEnum;\n uses_pwa?: boolean;\n feature_flag_disable_product_logging?: boolean;\n feature_flag_create_your_own_recipes?: boolean;\n feature_flag_generate_meals_button_in_planner?: boolean;\n auto_plan_initial_meals?: boolean;\n is_used_only_for_demos?: boolean;\n product?: number | null;\n whitelisted_recipes?: number[];\n denylist_recipes?: number[];\n};\nexport type SlimClient = {\n id: number;\n first_name?: string;\n last_name?: string;\n email: string;\n};\nexport type PaginatedSlimClientList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: SlimClient[];\n};\nexport type SlimClientRequest = {\n first_name?: string;\n last_name?: string;\n email: string;\n};\nexport type PatchedSlimClientRequest = {\n first_name?: string;\n last_name?: string;\n email?: string;\n};\nexport type SetIngredientToAvoid = {\n ingredient_to_avoid_ids: string[];\n};\nexport type SetIngredientToAvoidRequest = {\n ingredient_to_avoid_ids: string[];\n};\nexport type StripeCustomerPortal = {\n portal_url: string;\n};\nexport type PaginatedUserProfileList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserProfile[];\n};\nexport type PatchedUserProfileRequest = {\n user_id?: number;\n gender?: GenderEnum;\n activity?: ActivityEnum;\n sustainability?: SustainabilityEnum;\n diet?: DietEnum;\n weight?: number;\n body_fat_percentage?: number;\n food_intolerances_gluten?: boolean;\n food_intolerances_lactose?: boolean;\n food_intolerances_nut?: boolean;\n food_intolerances_crustaceans_shellfish?: boolean;\n is_keto_user?: boolean;\n main_goal?: MainGoalEnum;\n goal?: (GoalEnum | NullEnum) | null;\n age?: number | null;\n height_in_cm?: number | null;\n goal_weight_in_kg?: number | null;\n goal_weekly_change_in_kg?: number | null;\n uses_imperial_measurements_for_recipes?: boolean;\n uses_imperial_measurements_for_height?: boolean;\n personal_weight_unit?: PersonalWeightUnitEnum;\n last_menstrual_period_start_date?: string | null;\n menstrual_cycle_length?: number | null;\n is_on_menopause_diet?: boolean;\n};\nexport type UserDislikeRecipe = {\n id: number;\n recipe: number;\n user: number;\n};\nexport type PaginatedUserDislikeRecipeList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserDislikeRecipe[];\n};\nexport type UserDislikeRecipeRequest = {\n recipe: number;\n user: number;\n};\nexport type PatchedUserDislikeRecipeRequest = {\n recipe?: number;\n user?: number;\n};\nexport type UserFavouriteRecipe = {\n id: number;\n recipe: number;\n user: number;\n};\nexport type PaginatedUserFavouriteRecipeList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: UserFavouriteRecipe[];\n};\nexport type UserFavouriteRecipeRequest = {\n recipe: number;\n user: number;\n};\nexport type PatchedUserFavouriteRecipeRequest = {\n recipe?: number;\n user?: number;\n};\nexport type VerifyOtpResponse = {\n auth_token: string;\n};\nexport type VerifyOtpRequest = {\n email: string;\n otp: string;\n};\nexport type PaginatedWeeklyNutritionPlanList = {\n count: number;\n next?: string | null;\n previous?: string | null;\n results: WeeklyNutritionPlan[];\n};\nexport type WeeklyNutritionPlanCreate = {\n id: number;\n monday?: number;\n tuesday?: number;\n wednesday?: number;\n thursday?: number;\n friday?: number;\n saturday?: number;\n sunday?: number;\n client_intake?: number;\n};\nexport type WeeklyNutritionPlanCreateRequest = {\n monday?: number;\n tuesday?: number;\n wednesday?: number;\n thursday?: number;\n friday?: number;\n saturday?: number;\n sunday?: number;\n client_intake?: number;\n};\nexport type DaysToUpdateToNutritionDayPlanIdEnum =\n | \"monday\"\n | \"tuesday\"\n | \"wednesday\"\n | \"thursday\"\n | \"friday\"\n | \"saturday\"\n | \"sunday\";\nexport type WeeklyNutritionPlanUpdate = {\n name?: string;\n days_to_update_to_nutrition_day_plan_id: DaysToUpdateToNutritionDayPlanIdEnum[];\n nutrition_day_plan_id: number;\n};\nexport type WeeklyNutritionPlanUpdateRequest = {\n name?: string;\n days_to_update_to_nutrition_day_plan_id: DaysToUpdateToNutritionDayPlanIdEnum[];\n nutrition_day_plan_id: number;\n};\nexport const {\n useCheckoutSubscriptionVerificationCreateMutation,\n useFoodCreateRecipeCreateMutation,\n useFoodFoodListQuery,\n useFoodFoodRetrieveQuery,\n useFoodGenerateMealsListQuery,\n useFoodGenerateMealsCreateMutation,\n useFoodIngredientListQuery,\n useFoodIngredientCreateMutation,\n useFoodIngredientRetrieveQuery,\n useFoodIngredientUpdateMutation,\n useFoodIngredientPartialUpdateMutation,\n useFoodIngredientDestroyMutation,\n useFoodIngredientToAvoidListQuery,\n useFoodIngredientToAvoidRetrieveQuery,\n useFoodPreferredSuggestedServingsListQuery,\n useFoodPreferredSuggestedServingsCreateMutation,\n useFoodPreferredSuggestedServingsRetrieveQuery,\n useFoodPreferredSuggestedServingsUpdateMutation,\n useFoodPreferredSuggestedServingsPartialUpdateMutation,\n useFoodPreferredSuggestedServingsDestroyMutation,\n useFoodQuickAddMealListQuery,\n useFoodQuickAddMealCreateMutation,\n useFoodQuickAddMealRetrieveQuery,\n useFoodQuickAddMealUpdateMutation,\n useFoodQuickAddMealPartialUpdateMutation,\n useFoodQuickAddMealDestroyMutation,\n useFoodRecipeFeedbackLineItemListQuery,\n useFoodRecipeFeedbackLineItemCreateMutation,\n useFoodRecipeFeedbackLineItemRetrieveQuery,\n useFoodRecipeFeedbackLineItemUpdateMutation,\n useFoodRecipeFeedbackLineItemPartialUpdateMutation,\n useFoodRecipeFeedbackLineItemDestroyMutation,\n useFoodRecipeMealListQuery,\n useFoodRecipeMealCreateMutation,\n useFoodRecipeMealRetrieveQuery,\n useFoodRecipeMealUpdateMutation,\n useFoodRecipeMealPartialUpdateMutation,\n useFoodRecipeMealDestroyMutation,\n useFoodRecipeTagListQuery,\n useFoodRecipeTagRetrieveQuery,\n useFoodRecipeTemplateListQuery,\n useFoodRecipeTemplateCreateMutation,\n useFoodRecipeTemplateRetrieveQuery,\n useFoodRecipeTemplateUpdateMutation,\n useFoodRecipeTemplatePartialUpdateMutation,\n useFoodRecipeTemplateDestroyMutation,\n useFoodSearchListQuery,\n useFoodSearchAutocompleteRetrieveQuery,\n useFoodSearchByBarcodeRetrieveQuery,\n useFoodSingleFoodMealListQuery,\n useFoodSingleFoodMealCreateMutation,\n useFoodSingleFoodMealRetrieveQuery,\n useFoodSingleFoodMealUpdateMutation,\n useFoodSingleFoodMealPartialUpdateMutation,\n useFoodSingleFoodMealDestroyMutation,\n useFoodSuggestedServingListQuery,\n useFoodSuggestedServingRetrieveQuery,\n useFoodSuggestedServingSearchListQuery,\n useFoodSuggestedServingSearchRetrieveQuery,\n useMeasurementsUserBodyFatPercentageListQuery,\n useMeasurementsUserBodyFatPercentageCreateMutation,\n useMeasurementsUserBodyFatPercentageRetrieveQuery,\n useMeasurementsUserBodyFatPercentageUpdateMutation,\n useMeasurementsUserBodyFatPercentagePartialUpdateMutation,\n useMeasurementsUserBodyFatPercentageDestroyMutation,\n useMeasurementsUserDistanceListQuery,\n useMeasurementsUserDistanceCreateMutation,\n useMeasurementsUserDistanceRetrieveQuery,\n useMeasurementsUserDistanceUpdateMutation,\n useMeasurementsUserDistancePartialUpdateMutation,\n useMeasurementsUserDistanceDestroyMutation,\n useMeasurementsUserSleepListQuery,\n useMeasurementsUserSleepCreateMutation,\n useMeasurementsUserSleepRetrieveQuery,\n useMeasurementsUserSleepUpdateMutation,\n useMeasurementsUserSleepPartialUpdateMutation,\n useMeasurementsUserSleepDestroyMutation,\n useMeasurementsUserStressListQuery,\n useMeasurementsUserStressCreateMutation,\n useMeasurementsUserStressRetrieveQuery,\n useMeasurementsUserStressUpdateMutation,\n useMeasurementsUserStressPartialUpdateMutation,\n useMeasurementsUserStressDestroyMutation,\n useMeasurementsDeleteMeasurementCreateMutation,\n useMeasurementsUserWeightListQuery,\n useMeasurementsUserWeightCreateMutation,\n useMeasurementsUserWeightRetrieveQuery,\n useMeasurementsUserWeightUpdateMutation,\n useMeasurementsUserWeightPartialUpdateMutation,\n useMeasurementsUserWeightDestroyMutation,\n usePlannerAutoPlanDayCreateMutation,\n usePlannerAutoPlanDaysCreateMutation,\n usePlannerCalendarDayListQuery,\n usePlannerCalendarDayCreateMutation,\n usePlannerCalendarDayRetrieveQuery,\n usePlannerCalendarDayUpdateMutation,\n usePlannerCalendarDayPartialUpdateMutation,\n usePlannerCalendarDayDestroyMutation,\n usePlannerCalendarItemListQuery,\n usePlannerCalendarItemCreateMutation,\n usePlannerCalendarItemRetrieveQuery,\n usePlannerCalendarItemUpdateMutation,\n usePlannerCalendarItemPartialUpdateMutation,\n usePlannerCalendarItemDestroyMutation,\n usePlannerCopyMealsFromDateCreateMutation,\n usePlannerCopyMealsToMealMomentCreateMutation,\n usePlannerEditRecipeMealPortionsUpdateMutation,\n usePlannerGroceryListListQuery,\n usePlannerGroceryListCreateMutation,\n usePlannerGroceryListRetrieveQuery,\n usePlannerGroceryListUpdateMutation,\n usePlannerGroceryListPartialUpdateMutation,\n usePlannerGroceryListDestroyMutation,\n usePlannerGroceryListItemPartialUpdateMutation,\n usePlannerPlanGeneratedRecipeMealCreateMutation,\n usePlannerPlanSingleFoodMealCreateMutation,\n usePlannerSaveAndPlanRecipeMealCreateMutation,\n useSchemaRetrieveQuery,\n useUsersAuthTokenLoginCreateMutation,\n useUsersAuthTokenLogoutCreateMutation,\n useUsersAuthUsersListQuery,\n useUsersAuthUsersCreateMutation,\n useUsersAuthUsersRetrieveQuery,\n useUsersAuthUsersUpdateMutation,\n useUsersAuthUsersPartialUpdateMutation,\n useUsersAuthUsersDestroyMutation,\n useUsersAuthUsersActivationCreateMutation,\n useUsersAuthUsersMeRetrieveQuery,\n useUsersAuthUsersMeUpdateMutation,\n useUsersAuthUsersMePartialUpdateMutation,\n useUsersAuthUsersMeDestroyMutation,\n useUsersAuthUsersResendActivationCreateMutation,\n useUsersAuthUsersResetEmailCreateMutation,\n useUsersAuthUsersResetEmailConfirmCreateMutation,\n useUsersAuthUsersResetPasswordCreateMutation,\n useUsersAuthUsersResetPasswordConfirmCreateMutation,\n useUsersAuthUsersSetEmailCreateMutation,\n useUsersAuthUsersSetPasswordCreateMutation,\n useUsersBrandListQuery,\n useUsersBrandRetrieveQuery,\n useUsersCancelDealCreateMutation,\n useUsersClientsListQuery,\n useUsersClientsCreateMutation,\n useUsersClientsRetrieveQuery,\n useUsersClientsUpdateMutation,\n useUsersClientsPartialUpdateMutation,\n useUsersClientsDestroyMutation,\n useUsersCreateDemoAccountCreateMutation,\n useUsersCreateLoginSignupPortalCreateMutation,\n useUsersCreateMagicLinkCreateMutation,\n useUsersCreateOtpCreateMutation,\n useUsersCustomerPortalRedirectRetrieveQuery,\n useUsersExerciseInstanceListQuery,\n useUsersExerciseInstanceCreateMutation,\n useUsersExerciseInstanceRetrieveQuery,\n useUsersExerciseInstanceUpdateMutation,\n useUsersExerciseInstancePartialUpdateMutation,\n useUsersExerciseInstanceDestroyMutation,\n useUsersExerciseTemplateListQuery,\n useUsersExerciseTemplateRetrieveQuery,\n useUsersMealSlotSpecificationListQuery,\n useUsersMealSlotSpecificationCreateMutation,\n useUsersMealSlotSpecificationRetrieveQuery,\n useUsersMealSlotSpecificationUpdateMutation,\n useUsersMealSlotSpecificationPartialUpdateMutation,\n useUsersMealSlotSpecificationDestroyMutation,\n useUsersNutritionDayPlanListQuery,\n useUsersNutritionDayPlanCreateMutation,\n useUsersNutritionDayPlanRetrieveQuery,\n useUsersNutritionDayPlanUpdateMutation,\n useUsersNutritionDayPlanPartialUpdateMutation,\n useUsersNutritionDayPlanDestroyMutation,\n useUsersOrganisationCreateMutation,\n useUsersOrganisationPartialUpdateMutation,\n useUsersOrganisationsBySubdomainListQuery,\n useUsersPaginatedclientsListQuery,\n useUsersPaginatedclientsCreateMutation,\n useUsersPaginatedclientsRetrieveQuery,\n useUsersPaginatedclientsUpdateMutation,\n useUsersPaginatedclientsPartialUpdateMutation,\n useUsersPaginatedclientsDestroyMutation,\n useUsersSetIngredientsToAvoidCreateMutation,\n useUsersStripeCustomerPortalCreateMutation,\n useUsersUserListQuery,\n useUsersUserCreateMutation,\n useUsersUserRetrieveQuery,\n useUsersUserUpdateMutation,\n useUsersUserPartialUpdateMutation,\n useUsersUserDestroyMutation,\n useUsersUserProfileListQuery,\n useUsersUserProfileCreateMutation,\n useUsersUserProfileRetrieveQuery,\n useUsersUserProfileUpdateMutation,\n useUsersUserProfilePartialUpdateMutation,\n useUsersUserProfileDestroyMutation,\n useUsersUserdislikerecipeListQuery,\n useUsersUserdislikerecipeCreateMutation,\n useUsersUserdislikerecipeRetrieveQuery,\n useUsersUserdislikerecipeUpdateMutation,\n useUsersUserdislikerecipePartialUpdateMutation,\n useUsersUserdislikerecipeDestroyMutation,\n useUsersUserfavouriterecipeListQuery,\n useUsersUserfavouriterecipeCreateMutation,\n useUsersUserfavouriterecipeRetrieveQuery,\n useUsersUserfavouriterecipeUpdateMutation,\n useUsersUserfavouriterecipePartialUpdateMutation,\n useUsersUserfavouriterecipeDestroyMutation,\n useUsersVerifyOtpCreateMutation,\n useUsersWeeklyNutritionPlanListQuery,\n useUsersWeeklyNutritionPlanCreateMutation,\n useUsersWeeklyNutritionPlanRetrieveQuery,\n useUsersWeeklyNutritionPlanUpdateMutation,\n useV2SchemaRetrieveQuery,\n useV3SchemaRetrieveQuery,\n} = injectedRtkApi;\n","import type { PaginatedUserList } from \"./backendTypes\";\nimport { backendApi } from \"./backendTypes\";\n\nexport enum TAGS {\n FAVOURITE = \"FAVOURITE\",\n DISLIKE = \"DISLIKE\",\n OWN_MEAL = \"OWN_MEAL\",\n USER = \"USER\",\n CLIENTS = \"CLIENTS\",\n CALENDAR_DAY = \"CALENDAR_DAY\",\n USER_MEASUREMENT_WEIGHT = \"USER_MEASUREMENT_WEIGHT\",\n USER_MEASUREMENT_SLEEP = \"USER_MEASUREMENT_SLEEP\",\n USER_MEASUREMENT_STRESS = \"USER_MEASUREMENT_STRESS\",\n USER_MEASUREMENT_WAIST_CIRCUMFERENCE = \"USER_MEASUREMENT_WAIST_CIRCUMFERENCE\",\n GENERATE_MEALS = \"GENERATE_MEALS\",\n}\n\n// Spectacular does not recognise custom paginated response properties\nexport interface ExtendedPaginatedUserList extends PaginatedUserList {\n total_pages: number;\n}\n\nconst LIKE_DISLIKE_TAGS = [TAGS.FAVOURITE, TAGS.DISLIKE];\n\nexport default backendApi.enhanceEndpoints({\n addTagTypes: Object.values(TAGS),\n\n endpoints: {\n foodGenerateMealsList: {\n providesTags: [TAGS.FAVOURITE, TAGS.OWN_MEAL, TAGS.GENERATE_MEALS],\n },\n usersClientsList: {\n providesTags: [TAGS.CLIENTS],\n },\n usersPaginatedclientsList: {\n providesTags: [TAGS.CLIENTS],\n },\n plannerCalendarDayList: {\n providesTags: [TAGS.CALENDAR_DAY],\n },\n usersUserfavouriterecipeList: {\n providesTags: [TAGS.FAVOURITE],\n },\n usersUserdislikerecipeList: {\n providesTags: [TAGS.DISLIKE],\n },\n\n plannerCalendarDayPartialUpdate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n\n usersUserfavouriterecipeCreate: {\n invalidatesTags: LIKE_DISLIKE_TAGS,\n },\n usersUserfavouriterecipeDestroy: {\n invalidatesTags: LIKE_DISLIKE_TAGS,\n },\n\n usersUserdislikerecipeCreate: {\n invalidatesTags: [TAGS.DISLIKE, TAGS.FAVOURITE],\n },\n usersUserdislikerecipeDestroy: {\n invalidatesTags: [TAGS.DISLIKE, TAGS.FAVOURITE],\n },\n\n foodRecipeTemplateCreate: {\n invalidatesTags: [TAGS.OWN_MEAL],\n },\n foodRecipeTemplateDestroy: {\n invalidatesTags: [TAGS.OWN_MEAL],\n },\n\n usersAuthUsersCreate: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersUserProfileCreate: {\n invalidatesTags: [TAGS.CLIENTS, TAGS.USER],\n },\n usersAuthUsersMeRetrieve: {\n providesTags: [TAGS.USER],\n },\n usersClientsRetrieve: {\n providesTags: [TAGS.CLIENTS],\n },\n usersOrganisationCreate: {\n invalidatesTags: [TAGS.USER],\n },\n usersOrganisationPartialUpdate: {\n invalidatesTags: [TAGS.USER],\n },\n usersClientsPartialUpdate: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersUserProfileUpdate: {\n invalidatesTags: [TAGS.CLIENTS, TAGS.USER, TAGS.GENERATE_MEALS],\n },\n usersExerciseInstanceCreate: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersExerciseInstanceUpdate: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersExerciseInstancePartialUpdate: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersExerciseInstanceDestroy: {\n invalidatesTags: [TAGS.CLIENTS],\n },\n usersWeeklyNutritionPlanCreate: {\n invalidatesTags: [TAGS.CLIENTS, TAGS.USER, TAGS.CALENDAR_DAY],\n },\n usersWeeklyNutritionPlanUpdate: {\n invalidatesTags: [TAGS.CLIENTS, TAGS.USER],\n },\n foodRecipeTemplatePartialUpdate: {\n invalidatesTags: [TAGS.OWN_MEAL],\n },\n plannerCopyMealsToMealMomentCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n plannerPlanGeneratedRecipeMealCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n plannerSaveAndPlanRecipeMealCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY, TAGS.OWN_MEAL],\n },\n plannerPlanSingleFoodMealCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n\n // useMeasurementsUserWeightListQuery\n measurementsUserWeightList: {\n providesTags: [TAGS.USER_MEASUREMENT_WEIGHT],\n },\n // useMeasurementsUserSleepListQuery\n measurementsUserSleepList: {\n providesTags: [TAGS.USER_MEASUREMENT_SLEEP],\n },\n // useMeasurementsUserStressListQuery\n measurementsUserStressList: {\n providesTags: [TAGS.USER_MEASUREMENT_STRESS],\n },\n // useMeasurementsUserDistanceListQuery\n measurementsUserDistanceList: {\n providesTags: [TAGS.USER_MEASUREMENT_WAIST_CIRCUMFERENCE],\n },\n\n // useMeasurementsUserWeightCreateMutation\n measurementsUserWeightCreate: {\n invalidatesTags: [TAGS.USER_MEASUREMENT_WEIGHT],\n },\n // useMeasurementsUserSleepCreateMutation\n measurementsUserSleepCreate: {\n invalidatesTags: [TAGS.USER_MEASUREMENT_SLEEP],\n },\n // useMeasurementsUserStressCreateMutation\n measurementsUserStressCreate: {\n invalidatesTags: [TAGS.USER_MEASUREMENT_STRESS],\n },\n // useMeasurementsUserDistanceCreateMutation\n measurementsUserDistanceCreate: {\n invalidatesTags: [TAGS.USER_MEASUREMENT_WAIST_CIRCUMFERENCE],\n },\n\n measurementsDeleteMeasurementCreate: {\n invalidatesTags: [\n TAGS.USER_MEASUREMENT_SLEEP,\n TAGS.USER_MEASUREMENT_STRESS,\n TAGS.USER_MEASUREMENT_WAIST_CIRCUMFERENCE,\n TAGS.USER_MEASUREMENT_WEIGHT,\n ],\n },\n\n plannerAutoPlanDayCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n plannerAutoPlanDaysCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n plannerCopyMealsFromDateCreate: {\n invalidatesTags: [TAGS.CALENDAR_DAY],\n },\n },\n});\n","import { AntDesign, EvilIcons, MaterialIcons } from \"@expo/vector-icons\";\nimport { Field, FieldArray, Formik } from \"formik\";\nimport _ from \"lodash\";\nimport {\n AlertDialog,\n Button,\n Checkbox,\n Divider,\n Flex,\n FormControl,\n Icon,\n IconButton,\n Input,\n Link,\n Radio,\n Row,\n ScrollView,\n Spinner,\n Text,\n useTheme,\n View,\n} from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { TextStyle } from \"react-native\";\nimport RNPickerSelect, { PickerStyle } from \"react-native-picker-select\";\nimport { useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { isDesktopScreen, KG_TO_LBS, LBS_TO_KG } from \"../constants\";\nimport { shouldWeUseImperialForThisUser } from \"../helpers/foodHelpers\";\nimport { formatNumberAsDecimal, formatNumberAsWholeNumber } from \"../helpers/generalHelpers\";\nimport { getKcalPerSession } from \"../helpers/userHelpers\";\nimport type { BasicUserInfoFormSchema } from \"../screens/ClientsOverviewScreen\";\nimport backendApi from \"../services/backendApi\";\nimport type { ActivityEnum as Activity, DietEnum as Diet, GenderEnum as Gender, User } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { userSelector } from \"../slices/userSlice\";\nimport { ActivityEnum, DietEnum, GenderEnum, IntolerancesEnum } from \"../types\";\n\nconst { useUsersExerciseTemplateListQuery } = backendApi;\n\nconst HELP_ARTICLE_ON_ACTIVITY_FIELD_URL =\n \"https://help.nutrition-app.com/articles/10594669-how-is-total-daily-calorie-expenditure-calculated\";\nconst HELP_ARTICLE_ON_BODY_FAT_PERCENTAGE = \"https://help.nutrition-app.com/articles/10594700-body-fat-percentage\";\n\nconst DEFAULT_EXERCISE_ID = 1;\nconst DEFAULT_MINUTES_PER_WEEK = 30;\nconst DEFAULT_SESSIONS_PER_WEEK = 1;\n\nconst PLACEHOLDER_NEW_EXERCISE = {\n exercise: DEFAULT_EXERCISE_ID,\n minutes_per_session: DEFAULT_MINUTES_PER_WEEK,\n sessions_per_week: DEFAULT_SESSIONS_PER_WEEK,\n id: null,\n};\n\nconst rnPickerSelectInnerComponentStyle: TextStyle = {\n fontSize: 14,\n paddingVertical: 8,\n paddingHorizontal: 10,\n borderWidth: 1,\n borderColor: \"lightgray\",\n borderRadius: 4,\n backgroundColor: \"white\",\n color: \"black\",\n paddingRight: 30, // to ensure the text is never behind the icon\n};\n\nexport const rnPickerSelectStyle: PickerStyle = {\n inputIOS: rnPickerSelectInnerComponentStyle,\n inputAndroid: rnPickerSelectInnerComponentStyle,\n inputWeb: rnPickerSelectInnerComponentStyle,\n};\n\nconst exerciseInstanceSchema = Yup.object().shape({\n exercise: Yup.number().positive().required(),\n minutes_per_session: Yup.number().positive().default(DEFAULT_MINUTES_PER_WEEK),\n sessions_per_week: Yup.number().positive().default(DEFAULT_SESSIONS_PER_WEEK),\n id: Yup.number().positive().nullable(),\n});\n\nconst userProfileFormSchema = Yup.object().shape({\n gender: Yup.mixed().oneOf(Object.values(GenderEnum)).required(),\n weight: Yup.number().positive().required(),\n weight_in_lbs: Yup.number().positive().required(),\n body_fat_percentage: Yup.number().min(3).max(60).required(),\n diet: Yup.mixed().oneOf(Object.values(DietEnum)).required(),\n // NOTE: This is not currently in scope\n // sustainability: Yup.mixed().oneOf(Object.values(SustainabilityEnum)).required(),\n activity: Yup.mixed().oneOf(Object.values(ActivityEnum)).required(),\n food_intolerances_gluten: Yup.boolean(),\n food_intolerances_lactose: Yup.boolean(),\n food_intolerances_nut: Yup.boolean(),\n food_intolerances_crustaceans_shellfish: Yup.boolean(),\n exercise_instances: Yup.array().of(exerciseInstanceSchema),\n});\n\nexport type UserProfileFormSchema = Yup.InferType;\nexport type ExerciseInstanceFormSchema = Yup.InferType;\n\ntype Props = {\n basicInfoForm?: BasicUserInfoFormSchema;\n client?: User;\n onSubmitUserProfile: (values: UserProfileFormSchema) => Promise;\n submitButtonText: string;\n showLoading?: boolean;\n};\n\nconst EditUserProfileComponent = ({\n onSubmitUserProfile,\n client,\n basicInfoForm,\n submitButtonText,\n showLoading = false,\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const theme = useTheme();\n\n const isDesktop = isDesktopScreen();\n\n const user = useSelector(userSelector);\n\n const { isLoading: isLoadingGetExerciseTemplates, data: exerciseTemplates } = useUsersExerciseTemplateListQuery({});\n\n if (!(client || basicInfoForm)) {\n throw new Error(\"Either client or basicInfoForm must be defined\");\n }\n\n const defaultUserProfileFormValues = {\n gender: GenderEnum.FEMALE,\n diet: DietEnum.OMNIVORE,\n activity: ActivityEnum.SEDENTARY,\n weight: 70,\n weight_in_lbs: 155,\n body_fat_percentage: 20,\n };\n\n const userProfileFormInitialValues = userProfileFormSchema.cast(\n client?.intake\n ? {\n ...client?.intake,\n weight_in_lbs: formatNumberAsDecimal(client.intake.weight * KG_TO_LBS, 2),\n body_fat_percentage: client?.intake?.body_fat_percentage ? client.intake.body_fat_percentage * 100 : 20,\n exercise_instances: client?.intake?.exercise_instances?.map((exerciseInstance) => ({\n ...exerciseInstance,\n exercise: exerciseInstance.exercise.id,\n })),\n }\n : defaultUserProfileFormValues\n );\n\n const userProfileForm = (\n \n \n {({\n isSubmitting,\n handleChange,\n handleBlur,\n setFieldValue,\n handleSubmit,\n values,\n errors,\n initialValues,\n dirty,\n isValid,\n }) => (\n \n \n {/* Previously entered basicInfo */}\n \n \n {`${t(\"coach_mode_create_new_client.full_name_label_text\")}: `}\n \n {`${client?.first_name || basicInfoForm?.firstName || \"\"} ${\n client?.last_name || basicInfoForm?.lastName || \"\"\n }`}\n \n \n\n \n {`${t(\"coach_mode_create_new_client.email_label_text\")}: `}\n \n {client?.email || basicInfoForm?.email || \"\"}\n \n \n \n \n\n \n {/* Gender */}\n \n {t(\"coach_mode_create_new_client.gender_title_text\")}\n \n \n {t(`general.gender.${GenderEnum.MALE}`)}\n \n \n {t(`general.gender.${GenderEnum.FEMALE}`)}\n \n \n\n {errors.gender}\n \n {/* Weight */}\n {user && shouldWeUseImperialForThisUser(user) ? (\n \n \n {t(\"coach_mode_create_new_client.weight_title_text\")}\n {\" (lbs)\"}\n \n {\n const kg = Number(lbs) * LBS_TO_KG;\n setFieldValue(\"weight_in_lbs\", lbs);\n setFieldValue(\"weight\", kg);\n }}\n value={String(values.weight_in_lbs)}\n selectTextOnFocus\n testID=\"addNewClient-weight-input\"\n nativeID={\"editUserProfileFormWeightInput\"}\n />\n {errors.weight}\n \n ) : (\n \n \n {t(\"coach_mode_create_new_client.weight_title_text\")}\n {\" (kg)\"}\n \n \n {errors.weight}\n \n )}\n\n {/* Body fat percentage */}\n \n \n {`${t(\"coach_mode_create_new_client.body_fat_percentage_title_text\")} (%)`}\n \n \n \n {t(\"coach_mode_create_new_client.body_fat_web_examples_link_text\")}\n \n \n \n \n {errors.body_fat_percentage}\n \n {/* Sustainability */}\n {/* NOTE: Not currently in scope */}\n {/* \n {t(\"coach_mode_create_new_client.sustainability_title_text\")}\n setFieldValue(\"sustainability\", itemValue)}\n testID={\"addNewClient-sustainability-select\"}\n >\n {Object.keys(SustainabilityEnum).map((sustainability) => (\n \n ))}\n \n {errors.sustainability}\n */}\n {/* Activity */}\n \n {t(\"coach_mode_create_new_client.activity_title_text\")}\n \n \n {t(\"coach_mode_create_new_client.help_article_about_activity_field_text\")}\n \n \n \n \n ({\n label: t(`general.activity.${activity as ActivityEnum}`),\n value: activity,\n }))}\n placeholder={{}}\n useNativeAndroidPickerStyle={false}\n style={rnPickerSelectStyle}\n />\n \n {errors.activity}\n \n \n {t(\"coach_mode_create_new_client.diet_title_text\")}\n \n ({\n label: t(`general.diets.${diet as DietEnum}`),\n value: diet,\n }))}\n placeholder={{}}\n useNativeAndroidPickerStyle={false}\n style={rnPickerSelectStyle}\n />\n \n\n {errors.diet}\n \n {t(\"coach_mode_create_new_client.intolerances_and_allergies_title_text\")}\n \n setFieldValue(\"food_intolerances_gluten\", itemValue)}\n testID={\"checkbox-foodIntolerancesGluten\"}\n accessibilityLabel={values.food_intolerances_gluten ? \"Checked\" : \"Unchecked\"}\n >\n {t(`general.intolerances_and_allergies.${IntolerancesEnum.GLUTEN}`)}\n \n {errors.food_intolerances_gluten}\n \n \n setFieldValue(\"food_intolerances_lactose\", itemValue)}\n testID={\"checkbox-foodIntolerancesLactose\"}\n >\n {t(`general.intolerances_and_allergies.${IntolerancesEnum.LACTOSE}`)}\n \n {errors.food_intolerances_lactose}\n \n \n setFieldValue(\"food_intolerances_nut\", itemValue)}\n testID={\"checkbox-food_intolerances_nut\"}\n >\n {t(`general.intolerances_and_allergies.${IntolerancesEnum.NUTS}`)}\n \n {errors.food_intolerances_nut}\n \n \n setFieldValue(\"food_intolerances_crustaceans_shellfish\", itemValue)}\n testID={\"checkbox-food_intolerances_crustaceans_shellfish\"}\n >\n {t(`general.intolerances_and_allergies.${IntolerancesEnum.CRUSTACEANS_AND_SHELLFISH}`)}\n \n {errors.food_intolerances_crustaceans_shellfish}\n \n {isLoadingGetExerciseTemplates ? (\n \n ) : (\n \n \n \n {t(\"edit_user_intake.exercises_label_text\")}\n \n\n (\n <>\n {values.exercise_instances?.length\n ? values.exercise_instances.map((exercise, index) => (\n \n \n \n {() => (\n <>\n \n \n arrayHelpers.handleReplace(index, {\n ...exercise,\n exercise: exerciseId,\n })()\n }\n items={_.sortBy(exerciseTemplates?.results, \"exercise_name\").map(\n (exerciseTemplate) => ({\n label: exerciseTemplate.exercise_name,\n value: String(exerciseTemplate.id),\n key: exerciseTemplate.id,\n })\n )}\n placeholder={{}}\n useNativeAndroidPickerStyle={false}\n style={rnPickerSelectStyle}\n />\n \n \n \n arrayHelpers.handleReplace(index, {\n ...exercise,\n // eslint-disable-next-line camelcase\n minutes_per_session,\n })()\n }\n value={String(exercise.minutes_per_session)}\n width=\"50\"\n mt=\"1\"\n testID={`exercise-${index}-minutes_per_session`}\n />\n\n \n {t(\"edit_user_intake.exercise_instance.minutes_per_session_suffix\")}\n \n \n\n \n \n arrayHelpers.handleReplace(index, {\n ...exercise,\n // eslint-disable-next-line camelcase\n sessions_per_week,\n })()\n }\n value={String(exercise.sessions_per_week)}\n width=\"50\"\n mt=\"1\"\n testID={`exercise-${index}-sessions_per_week`}\n />\n \n {t(\"edit_user_intake.exercise_instance.times_per_week_suffix\")}\n \n \n \n )}\n \n \n arrayHelpers.remove(index)}\n icon={}\n testID={\"deleteSport-button\"}\n />\n \n {t(\"edit_user_intake.exercise_instance.kcal_per_session_label\", {\n kcal_per_session: formatNumberAsWholeNumber(\n getKcalPerSession(\n exercise.exercise,\n exercise.minutes_per_session,\n client?.intake?.weight || values.weight,\n exerciseTemplates?.results\n )\n ),\n })}\n \n \n \n \n ))\n : null}\n \n \n arrayHelpers.push(PLACEHOLDER_NEW_EXERCISE)}\n icon={}\n testID={\"addSport-button\"}\n />\n \n \n \n )}\n />\n \n \n )}\n \n \n\n \n handleSubmit()}\n isLoading={isSubmitting || showLoading}\n isDisabled={!isValid}\n testID={\"addNewClientByEmail-submit-button\"}\n nativeID={\"addNewClientByEmailSubmitButton\"}\n >\n {submitButtonText}\n \n \n \n )}\n \n \n );\n\n return userProfileForm;\n};\n\nexport default EditUserProfileComponent;\n","// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport platform from \"platform-detect\";\nimport { useState } from \"react\";\nimport { Linking } from \"react-native\";\n\ninterface UseExternalLinkResult {\n isLoading: string | null;\n error: string | null;\n openLink: (href: string) => Promise;\n}\n\n// eslint-disable-next-line import/prefer-default-export\nexport const useExternalLink = (): UseExternalLinkResult => {\n const [isLoading, setIsLoading] = useState(null);\n const [error, setError] = useState(null);\n\n const openLink = async (href: string): Promise => {\n setIsLoading(href);\n setError(null);\n\n try {\n if (platform.pwa) {\n // Attempt to open the window\n const newWindow = window.open(href, \"_blank\", \"noopener,noreferrer\");\n\n // Check if window.open was successful\n if (!newWindow) {\n // On iOS PWAs, window.open() might return null even when working correctly\n const isIOS = platform.ios;\n\n if (isIOS) {\n console.log(\"iOS PWA detected - window.open() returned null but may still work\");\n // We don't throw an error for iOS PWAs since this behavior is expected\n } else {\n const errorMessage = \"Browser blocked opening the window or popup blocker is enabled\";\n console.error(errorMessage);\n\n // Create a structured error for Sentry with context\n const sentryError = new Error(errorMessage);\n sentryError.name = \"PWALinkOpenError\";\n\n // Add contextual information to the error\n Sentry.withScope((scope) => {\n scope.setContext(\"link_details\", {\n url: href,\n isPWA: platform.pwa,\n userAgent: navigator.userAgent,\n });\n Sentry.captureException(sentryError);\n });\n\n throw sentryError;\n }\n }\n\n // Check if the window was actually focused\n if (newWindow && (newWindow.closed || typeof newWindow.closed === \"undefined\")) {\n const focusError = new Error(\"Window was created but couldn't be focused or was immediately closed\");\n Sentry.captureException(focusError);\n throw focusError;\n }\n } else {\n // Use Linking API for non-PWA context\n await Linking.openURL(href);\n }\n } catch (err) {\n console.error(\"Failed to open URL:\", err);\n\n // Track all errors in Sentry\n Sentry.captureException(err);\n\n // Show user-friendly error message\n setError(\"Failed to open the link. Please try again.\");\n } finally {\n setIsLoading(null);\n }\n };\n\n return { isLoading, error, openLink };\n};\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n emailIconStyle: {\n height: Scale(100),\n width: Scale(100),\n resizeMode: \"contain\",\n marginVertical: Scale(40),\n },\n container: {\n justifyContent: \"center\",\n alignItems: \"center\",\n\n marginTop: Scale(200),\n },\n titleStyle: {\n textAlign: \"center\",\n marginVertical: Scale(30),\n },\n wrapper: {\n // backgroundColor: Colors.white,\n flex: 2,\n },\n middleTextStyle: {\n textAlign: \"center\",\n // color: Colors.textColor,\n fontSize: Scale(14),\n fontWeight: \"500\",\n },\n textStyle: { width: width - Scale(60) },\n emailStyle: {\n // color: Colors.textColor\n },\n lastTextStyle: {\n // color: Colors.textColor,\n fontWeight: \"500\",\n },\n});\n\nexport default styles;\n","import type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Center, Link } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, View } from \"react-native\";\n\nimport { CommonText } from \"../commons\";\nimport CommonInnerText from \"../commons/CommonInnerText\";\nimport { Images, Routes, Scale } from \"../constants\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport styles from \"./MagicLinkSentScreenStyle\";\n\nexport const MAGIC_LINK_HELP_ARTICLE = \"https://help.nutrition-app.com/articles/10532988-trouble-logging-in\";\n\ntype Props = NativeStackScreenProps;\nconst MagicLinkSentScreen = ({\n navigation,\n route: {\n params: { email },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n
\n \n \n \n \n {email}\n \n {t(\"magic_link_sent_screen.message_3\")}\n\n \n \n navigation.goBack()}>{t(\"magic_link_sent_screen.change_email_address_message_text\")}\n\n \n {t(\"login_screen.trouble_logging_in_help\")}\n \n
\n
\n );\n};\nexport default MagicLinkSentScreen;\n","import { Entypo, Ionicons, MaterialIcons } from \"@expo/vector-icons\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport _ from \"lodash\";\nimport { Button, Icon, IIconButtonProps, Image, Link, Text } from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScreenWidth } from \"react-native-elements/dist/helpers\";\nimport { useSelector } from \"react-redux\";\n\nimport { Scale } from \"../constants\";\nimport { IS_NOT_DESKTOP } from \"../constants/helperFunction\";\nimport { useExternalLink } from \"../hooks/useExternalLink\";\nimport { MAGIC_LINK_HELP_ARTICLE } from \"../screens/MagicLinkSentScreen\";\nimport backendApi from \"../services/backendApi\";\nimport type { User } from \"../services/backendTypes\";\nimport { getBrandSelector, getIsLoadingBrandSelector } from \"../slices/brandSlice\";\nimport analyticsInterface, { analyticsJson } from \"./analyticsHelpers\";\nimport { isMobilePlatform, openURL } from \"./generalHelpers\";\nimport { getHostname, getManagedCustomerPortalSubdomain } from \"./userHelpers\";\n\nconst { isIntercomLoaded, trackEvent } = analyticsInterface;\n\nconst SUPPORT_WEBSITE = \"https://help.nutrition-app.com/\";\n\nconst KNOWLEDGE_BASE_URL = \"https://kennisbank.weekmeals.co/docs/\";\n\ntype Props = {\n width?: string;\n ml?: string;\n};\n\nconst { useUsersStripeCustomerPortalCreateMutation, useUsersBrandRetrieveQuery } = backendApi;\n\nexport const KnowledgeBaseLink = (props: Props): JSX.Element => {\n const { t } = useTranslation();\n return (\n openURL(KNOWLEDGE_BASE_URL)}\n leftIcon={}\n mt=\"3\"\n nativeID=\"knowledgeBaseButton\"\n {...props}\n >\n {t(\"general.knowledge_base\")}\n \n );\n};\n\nconst NO_CODE_STRIPE_CUSTOMER_PORTAL_URL = \"https://billing.stripe.com/p/login/eVa6sjehu85DeDmdQQ\";\n\ntype StripeCustomerPortalLinkProps = {\n isDesktop: boolean;\n isUpgradeNowButton?: boolean;\n variant?: string;\n width?: string | number;\n size?: string;\n iconType?: \"ionicons\" | \"material\";\n};\nexport const StripeCustomerPortalLink = ({\n isDesktop,\n isUpgradeNowButton,\n variant = \"solid\",\n width,\n size,\n iconType = \"ionicons\",\n}: StripeCustomerPortalLinkProps & {\n variant?: string;\n width?: string | number;\n size?: string;\n iconType?: \"ionicons\" | \"material\";\n}): JSX.Element => {\n const { t } = useTranslation();\n const [createStripeCustomerPortal, { isLoading: isLoadingPortal }] = useUsersStripeCustomerPortalCreateMutation();\n const { isLoading: isLoadingLink, error, openLink } = useExternalLink();\n const [portalUrl, setPortalUrl] = useState(null);\n const [isFetchingUrl, setIsFetchingUrl] = useState(false);\n const isLoading = Boolean(isLoadingPortal || isLoadingLink || isFetchingUrl);\n\n // Fetch portal URL when component mounts\n useEffect(() => {\n const fetchPortalUrl = async (): Promise => {\n if (portalUrl !== null) return; // Already fetched\n\n try {\n setIsFetchingUrl(true);\n const stripeCustomerPortal = await createStripeCustomerPortal().unwrap();\n setPortalUrl(stripeCustomerPortal.portal_url);\n } catch (e) {\n console.error(\"Failed to prefetch portal URL:\", e);\n Sentry.captureException(e);\n // Set fallback URL on error\n setPortalUrl(NO_CODE_STRIPE_CUSTOMER_PORTAL_URL);\n } finally {\n setIsFetchingUrl(false);\n }\n };\n\n fetchPortalUrl().catch((e) => {\n console.error(\"Error in fetchPortalUrl:\", e);\n Sentry.captureException(e);\n });\n }, [createStripeCustomerPortal, portalUrl]);\n\n const onPress = async (): Promise => {\n if (portalUrl) {\n // We already have the URL, open it directly\n await openLink(portalUrl).catch((err) => {\n console.error(\"Failed to open URL:\", err);\n Sentry.captureException(err);\n });\n } else {\n // Fallback if URL isn't ready yet\n try {\n const stripeCustomerPortal = await createStripeCustomerPortal().unwrap();\n await openLink(stripeCustomerPortal.portal_url).catch((err) => {\n console.error(\"Failed to open URL:\", err);\n Sentry.captureException(err);\n });\n } catch (e) {\n Sentry.captureException(e);\n // Fall back to NO_CODE_STRIPE_CUSTOMER_PORTAL_URL if the API call fails\n await openLink(NO_CODE_STRIPE_CUSTOMER_PORTAL_URL).catch((err) => {\n console.error(\"Failed to open fallback URL:\", err);\n Sentry.captureException(err);\n alert(t(\"general.generic_error_message\"));\n });\n }\n }\n };\n\n const optionalProps: IIconButtonProps = isUpgradeNowButton\n ? { width: isDesktop ? \"10%\" : \"40%\", ml: isDesktop ? \"80%\" : \"30%\", backgroundColor: \"warning.400\" }\n : { width: width || \"auto\" };\n\n let icon;\n if (iconType === \"material\") {\n icon = ;\n } else {\n icon = ;\n }\n\n return (\n \n {t(isUpgradeNowButton ? \"general.upgrade_now_button_text\" : \"general.manage_billing\")}\n \n );\n};\n\nconst HUBSPOT_DEMO_CALENDAR_URL = \"https://meetings.hubspot.com/martin-foley/weekmeals-office-hours\";\n\ntype BookACallLinkProps = {\n isDesktop: boolean;\n email?: string;\n};\nexport const BookACallLink = ({ isDesktop, email }: BookACallLinkProps): JSX.Element => {\n const { t } = useTranslation();\n\n const optionalProps: IIconButtonProps = {\n width: isDesktop ? \"10%\" : \"40%\",\n ml: isDesktop ? \"80%\" : \"30%\",\n mt: \"3\",\n };\n\n const onPressBookACallButton = (): void => {\n trackEvent(analyticsJson.events.click_book_a_demo_button.name);\n openURL(email ? `${HUBSPOT_DEMO_CALENDAR_URL}?email=${encodeURIComponent(email)}` : HUBSPOT_DEMO_CALENDAR_URL);\n };\n\n return (\n }\n nativeID=\"bookACallButton\"\n variant=\"outline\"\n {...optionalProps}\n >\n {t(\"general.get_a_demo\")}\n \n );\n};\n\nconst REFERRAL_PROGRAMME_URL = \"https://referrals.weekmeals.co\";\n\nexport const ReferralProgrammeLink = ({ isDesktop }: { isDesktop: boolean }): JSX.Element => {\n const { t } = useTranslation();\n\n const optionalProps: IIconButtonProps = {\n width: isDesktop ? null : \"60%\",\n ml: isDesktop ? \"70%\" : \"20%\",\n mr: isDesktop ? \"10%\" : null,\n mt: \"3\",\n };\n\n const onPressReferralProgrammeButton = (): void => {\n trackEvent(analyticsJson.events.click_referral_programme_button.name);\n\n openURL(REFERRAL_PROGRAMME_URL);\n };\n\n return (\n }\n nativeID=\"referralProgrammeButton\"\n backgroundColor={\"warning.400\"}\n {...optionalProps}\n >\n {t(\"coach_general.refer_a_friend_button\")}\n \n );\n};\n\ntype ContactSupportLinkProps = {\n user: User | null;\n width?: string | number;\n size?: string;\n mt?: string | number;\n shadow?: number;\n};\n\nexport const ContactSupportLink = ({\n user,\n width = \"60%\",\n size = \"lg\",\n mt = 2,\n shadow = 3,\n}: ContactSupportLinkProps): JSX.Element => {\n const { t } = useTranslation();\n const customSupportSubdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n // NOTE: If we are not using a custom support subdomain then there is no need to retrieve the url\n const { data: brand } = useUsersBrandRetrieveQuery(\n { subdomain: customSupportSubdomain },\n { skip: !customSupportSubdomain }\n );\n\n const onPressContactSupportButton = (): void => {\n const organisationHasCustomSupportUrl = brand && brand?.support_url;\n\n if (!organisationHasCustomSupportUrl) {\n if (isIntercomLoaded()) {\n analyticsInterface.openIntercomMessenger();\n return;\n }\n // If Intercom is not loaded then fallback to the website\n openURL(SUPPORT_WEBSITE);\n return;\n }\n\n openURL(brand?.support_url);\n };\n\n return (\n }\n mt={mt}\n nativeID=\"contactSupportButton\"\n colorScheme=\"primary\"\n shadow={shadow}\n width={width}\n size={size}\n _text={{ fontWeight: \"bold\" }}\n >\n {t(\"my_profile.get_help_button_text\")}\n \n );\n};\n\nexport const TroubleLoggingInLink = (): JSX.Element => {\n const { t } = useTranslation();\n const customSupportSubdomain = getManagedCustomerPortalSubdomain(getHostname());\n\n const {\n data: organisation,\n isError,\n error,\n } = useUsersBrandRetrieveQuery({ subdomain: customSupportSubdomain }, { skip: !customSupportSubdomain });\n const getSupportUrl = (): string => {\n if (organisation && organisation?.support_url) {\n return organisation.support_url;\n }\n\n return MAGIC_LINK_HELP_ARTICLE;\n };\n\n return (\n openURL(getSupportUrl())}>\n {t(\"login_screen.trouble_logging_in_help\")}\n \n );\n};\n\nconst TROUBLE_INSTALLING_PWA_ARTICLE_URL =\n \"https://help.nutrition-app.com/articles/10581245-how-to-install-nutrition-app-on-your-mobile-device\";\n\nexport const TroubleInstallingPWAArticleComponent = (): JSX.Element => {\n const { t } = useTranslation();\n return HelpArticleButton({\n articleUrl: TROUBLE_INSTALLING_PWA_ARTICLE_URL,\n ctaText: t(\"pwa_install_screen.need_help_installing_text\"),\n });\n};\n\nexport const HelpArticleButton = ({ articleUrl, ctaText }: { articleUrl: string; ctaText?: string }): JSX.Element => {\n const { t } = useTranslation();\n\n return (\n openURL(articleUrl)}\n leftIcon={}\n mt=\"10\"\n size=\"lg\"\n bg=\"amber.300\"\n _hover={{ bg: \"amber.500\" }}\n _pressed={{ bg: \"amber.600\" }}\n shadow=\"2\"\n borderRadius=\"lg\"\n height=\"12\"\n >\n \n {ctaText || t(\"general.get_help\")}\n \n \n );\n};\n\nexport const AppImage = (): JSX.Element => {\n const brand = useSelector(getBrandSelector);\n const isLoadingBrand = useSelector(getIsLoadingBrandSelector);\n\n const imageSize = Scale(ScreenWidth * 0.8 * (IS_NOT_DESKTOP ? 0.5 : 0.2));\n\n if (isLoadingBrand) {\n // We return a placeholder div to prevent layout shift\n return (\n \n );\n }\n\n return (\n \n );\n};\n","import { Platform, StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n initialsCircle: {\n width: Scale(32),\n height: Scale(32),\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n backgroundColor: \"#93556B\",\n borderRadius: 100,\n },\n initialsText: {\n color: \"white\",\n },\n routeViewContainer: {\n marginVertical: VerticalScale(24),\n marginHorizontal: Scale(16),\n borderRadius: 8,\n },\n bottomContainer: {\n paddingHorizontal: 20,\n bottom: 40,\n },\n modalButtonContainer: {\n marginTop: VerticalScale(28),\n },\n fabBtnContainer: {\n position: \"absolute\",\n right: Scale(12),\n bottom: VerticalScale(46),\n },\n clientViewContainer: {\n width: \"100%\",\n backgroundColor: \"white\",\n },\n});\n\nexport default styles;\n","import { Ionicons, MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport {\n AlertDialog,\n Box,\n Button,\n Fab,\n Flex,\n FormControl,\n Icon,\n Input,\n Pressable,\n ScrollView,\n Spinner,\n Text,\n useDisclose,\n useTheme,\n View,\n} from \"native-base\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { FlatList, Image, SafeAreaView } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport EditUserProfileComponent, { UserProfileFormSchema } from \"../components/EditUserProfileComponent\";\nimport { commonStyles, Images, isDesktopScreen, Routes, Scale, VerticalScale, width } from \"../constants\";\nimport { formatUserForDisplay, isMobilePlatform } from \"../helpers/generalHelpers\";\nimport { BookACallLink, ReferralProgrammeLink, StripeCustomerPortalLink } from \"../helpers/supportHelpers\";\nimport { doesCustomerHaveAnyTrialingSubscriptions, getOrganisation } from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport type { ExtendedPaginatedUserList } from \"../services/backendApi\";\nimport backendApi from \"../services/backendApi\";\nimport type { SlimClient, User, UsersAuthUsersCreateApiArg } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { clientsSelector, userSelector, userSlice, viewAsUserSelector } from \"../slices/userSlice\";\nimport { ClientsFilterState, SustainabilityEnum } from \"../types\";\nimport styles from \"./ClientsOverviewScreenStyle\";\n\nconst { useUsersAuthUsersCreateMutation, useUsersPaginatedclientsListQuery, useUsersExerciseInstanceCreateMutation } =\n backendApi;\n\n/**\n * NOTE: Because we use tabs a re-poll leads to the content being re-drawn.\n * This can cause problems such as:\n * - losing all data when creating a new recipe (in viewAs mode)\n * - resetting the progress view\n * - resetting the scoll and any modal content when viewing/editing a user's nutrition plan overview\n *\n * We should investigate (and fix) the underlying problem\n */\nconst CLIENTS_LIST_POLLING_INTERVAL = 60 * 1000;\n\n// TODO: Internationalise the errors\nconst basicUserInfoFormSchema = Yup.object().shape({\n email: Yup.string().email().required(\"invalid_email_error\").default(\"\"),\n firstName: Yup.string().trim().required().nullable(false).default(\"\"),\n lastName: Yup.string().trim().required().nullable(false).default(\"\"),\n});\n\nconst basicUserInfoFormInitialValues = basicUserInfoFormSchema.cast({});\nexport type BasicUserInfoFormSchema = Yup.InferType;\n\ntype Props = NativeStackScreenProps;\nconst CoachModeViewClientsScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n\n const theme = useTheme();\n const [page, setPage] = useState(1);\n\n const user = useSelector(userSelector);\n\n const {\n isOpen: isOpenAddNewClientDialog,\n onOpen: onOpenAddNewClientDialog,\n onClose: onCloseAddNewClientDialog,\n } = useDisclose();\n\n const deactivateClientDialogRef = useRef(null);\n\n const isDesktop = isDesktopScreen();\n\n const viewAsUser = useSelector(viewAsUserSelector);\n\n const [searchText, setSearchText] = useState(\"\");\n const [searchTerm, setSearchTerm] = useState(\"\");\n const [clientsFilter, setClientsFilter] = React.useState(ClientsFilterState.ACTIVE_CLIENTS);\n const filterActiveClientsOnly = clientsFilter === ClientsFilterState.ACTIVE_CLIENTS;\n\n const { data: clientsListResponse, isFetching: isFetchingClientsList } = useUsersPaginatedclientsListQuery(\n {\n page,\n search: searchTerm,\n accountEnabled: clientsFilter === ClientsFilterState.ACTIVE_CLIENTS,\n },\n {\n pollingInterval: CLIENTS_LIST_POLLING_INTERVAL,\n // NOTE: The content of the tabs is re-drawn whenever this query is returned.\n // We do this to ensure not to do a poll-related update when we are in viewAs mode\n skip: Boolean(viewAsUser),\n }\n );\n const [createUserBackendCall, { isLoading }] = useUsersAuthUsersCreateMutation();\n const [createExerciseInstanceBackendCall, { isLoading: isLoadingCreateExerciseInstance }] =\n useUsersExerciseInstanceCreateMutation();\n\n useEffect(() => {\n if (clientsListResponse && clientsListResponse.results) {\n dispatch(userSlice.actions.storeClients(clientsListResponse.results));\n }\n }, [clientsListResponse]);\n\n useEffect(() => {\n const delayDebounceFn = setTimeout(() => {\n setSearchTerm(searchText);\n setPage(1);\n }, 1000);\n\n return () => clearTimeout(delayDebounceFn);\n }, [searchText]);\n\n const clients = useSelector(clientsSelector);\n\n const renderClientFlatlistItem = ({ item: client, index }: { item: SlimClient; index: number }): JSX.Element => (\n \n {\n logger.trace(\"Pressed client: \", client);\n navigation.navigate(Routes.CoachModeClientInfoScreen, { clientId: client.id });\n }}\n testID={`client-card-${client.email}`}\n >\n \n\n {/* TODO: This should be `${first_name} ${last_name}` after we update the API to return these fields. */}\n \n {isDesktop\n ? _.truncate(formatUserForDisplay(client), {\n length: 20,\n separator: \" \",\n })\n : formatUserForDisplay(client)}\n \n \n \n );\n\n const clientsListComponent = (\n // NOTE: Implementing the below style will cause the flatlist not to render correctly.\n // \n // \n\n
\n String(item.id)}\n numColumns={isDesktop ? 3 : 1}\n ItemSeparatorComponent={() => }\n contentContainerStyle={{\n marginHorizontal: isDesktop ? \"20%\" : \"5%\",\n marginVertical: 10,\n }}\n columnWrapperStyle={\n isDesktop\n ? {\n width: \"33.333%\",\n }\n : null\n }\n />\n
\n );\n // TODO: Get feedback from the team on how this should be implemented\n // const getNeedsActionRoute = (): JSX.Element => getAllClientsRoute();\n // // TODO: Likewise\n // const getArchiveRoute = (): JSX.Element => ;\n\n const headerComponent = (\n \n \n {t(\"bottom_tabs.clients_tab_name\")}\n \n \n );\n\n const organisation = user ? getOrganisation(user) : undefined;\n\n // TODO: Put this into a Component\n const desktopOnlyNavbar = (\n \n \n \n \n \n );\n\n const activeClientsLabel = t(`clients_overview.status_filter.${ClientsFilterState.ACTIVE_CLIENTS}`);\n const deactivatedClientsLabel = t(`clients_overview.status_filter.${ClientsFilterState.DEACTIVATED_CLIENTS}`);\n const activeClientsTabIndex = 0;\n\n const activeInactiveTabsComponent = (\n \n {[ClientsFilterState.ACTIVE_CLIENTS, ClientsFilterState.DEACTIVATED_CLIENTS].map(\n (filterState: ClientsFilterState, i: number) => {\n const renderingActiveClientsTab = i === activeClientsTabIndex;\n\n const shouldHighlightThisTab = renderingActiveClientsTab ? filterActiveClientsOnly : !filterActiveClientsOnly;\n\n const color = shouldHighlightThisTab ? \"blue.200\" : \"gray.200\";\n const borderColor = shouldHighlightThisTab ? \"primary.600\" : \"coolGray.200\";\n\n return (\n \n {\n setClientsFilter(\n filterActiveClientsOnly ? ClientsFilterState.DEACTIVATED_CLIENTS : ClientsFilterState.ACTIVE_CLIENTS\n );\n }}\n >\n {`${\n renderingActiveClientsTab ? activeClientsLabel : deactivatedClientsLabel\n }`}\n {isFetchingClientsList ? : null}\n \n \n );\n }\n )}\n \n );\n const [validatedBasicInfoFormValues, setValidatedBasicInfoFormValues] = useState<\n BasicUserInfoFormSchema | undefined\n >();\n const onSubmitBasicUserInfo = (values: BasicUserInfoFormSchema): void => setValidatedBasicInfoFormValues(values);\n\n const basicInfoForm = (\n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, errors, dirty, isValid }) => (\n <>\n \n \n \n {t(\"coach_mode_create_new_client.first_name_input_label_text\")}\n \n {errors.lastName}\n \n \n {t(\"coach_mode_create_new_client.last_name_input_label_text\")}\n \n {errors.lastName}\n \n\n {/* Email address */}\n \n {t(\"add_new_client.email_input_label\")}\n \n {errors.email}\n \n \n \n \n handleSubmit()}\n isLoading={isSubmitting}\n isDisabled={!dirty || !isValid}\n testID={\"addNewClientByEmail-submitBasicInfo-button\"}\n >\n {t(\"add_new_client.add_new_client_button_text\")}\n \n \n \n )}\n \n );\n\n const onSubmitUserProfile = async (values: UserProfileFormSchema): Promise => {\n onCloseAddNewClientDialog();\n\n if (\n !validatedBasicInfoFormValues?.email ||\n !validatedBasicInfoFormValues?.firstName ||\n !validatedBasicInfoFormValues?.lastName\n ) {\n throw new Error(\"validated basic info form values were not set\");\n }\n\n setValidatedBasicInfoFormValues(undefined);\n\n const createUserRequestPostBody: UsersAuthUsersCreateApiArg = {\n customUserCreateRequest: {\n email: validatedBasicInfoFormValues.email,\n first_name: validatedBasicInfoFormValues.firstName,\n last_name: validatedBasicInfoFormValues.lastName,\n intake: {\n weight: values.weight,\n body_fat_percentage: values.body_fat_percentage / 100,\n activity: values.activity,\n diet: values.diet,\n gender: values.gender,\n // NOTE: Not currently in scope\n sustainability: SustainabilityEnum.SUSTAINABLE,\n food_intolerances_gluten: values.foodIntolerancesGluten,\n food_intolerances_lactose: values.foodIntolerancesLactose,\n food_intolerances_nut: values.foodIntolerancesNut,\n food_intolerances_crustaceans_shellfish: values.foodIntolerancesCrustaceansShellfish,\n },\n },\n };\n await createUserBackendCall(createUserRequestPostBody)\n .unwrap()\n .then((createdUser) => {\n const exerciseCreationPromises =\n values.exercise_instances && !_.isEmpty(values.exercise_instances)\n ? values.exercise_instances.map((exercise) =>\n createExerciseInstanceBackendCall({\n exerciseInstanceCreateUpdateRequest: {\n ...exercise,\n intake: createdUser.intake.id,\n },\n })\n )\n : [];\n\n return Promise.all(exerciseCreationPromises);\n })\n .catch((error) => {\n if (error?.status === 400) {\n alert(_.values(error?.data));\n }\n });\n\n // TODO: Navigate to client profile page\n setPage(1);\n };\n\n const addNewClientDialog = (\n \n \n \n \n {t(\"add_new_client.add_new_client_dialog_header\")}\n \n\n {!validatedBasicInfoFormValues ? (\n basicInfoForm\n ) : (\n \n \n \n )}\n \n \n );\n\n const pressedCreateNewClientButton = (): void => {\n onOpenAddNewClientDialog();\n };\n\n const floatingAddNewClientButton = (\n }\n testID={\"openAddNewClientDialog-floatingButton\"}\n />\n );\n\n const clientsSearchAndAddNewClientButton = (\n
\n \n }\n />\n {isDesktop ? (\n \n {t(\"clients_overview.add_client_button_text\")}\n \n ) : null}\n \n \n {t(\"clients_overview.number_of_results\", { count: clientsListResponse?.count || 0 })}\n \n
\n );\n\n const isCustomerCurrentlyTrialing = user ? doesCustomerHaveAnyTrialingSubscriptions(user) : false;\n\n const upgradeNowButton =\n isCustomerCurrentlyTrialing && !isMobilePlatform() ? (\n \n ) : null;\n\n const totalPages = (clientsListResponse as ExtendedPaginatedUserList)?.total_pages || 1;\n const paginationComponent = (\n \n {\n if (page > 1) {\n setPage(page - 1);\n }\n }}\n disabled={page === 1}\n >\n \n \n \n {t(\"general.page\")} {page} {t(\"general.of\")} {totalPages}\n \n {\n if (page < totalPages) {\n setPage(page + 1);\n }\n }}\n disabled={page === totalPages}\n >\n \n \n \n );\n\n return (\n \n {isDesktop ? desktopOnlyNavbar : null}\n \n {headerComponent}\n\n {upgradeNowButton}\n {/* {!isMobilePlatform() ? : null} */}\n {isCustomerCurrentlyTrialing ? : null}\n\n {activeInactiveTabsComponent}\n\n {clientsSearchAndAddNewClientButton}\n {clientsListComponent}\n {totalPages > 1 ? paginationComponent : null}\n\n {!isDesktop ? floatingAddNewClientButton : null}\n\n {addNewClientDialog}\n \n \n );\n};\nexport default CoachModeViewClientsScreen;\n\n// NOTE: This is here for future reference\n// const AddClientInExcessOfCurrentSeats = (): JSX.Element => (\n// \n// \n// {t(\"Adding this client will increase your tier from max. 10 clients to max. 15 clients.\")}\n// \n// \n// {t(\"With your current plan this increases your monthly invoice by € 13,50\")}\n// \n\n// \n// {\n// setModalVisible(false);\n// }}\n// />\n// {\n// setModalVisible(false);\n// }}\n// lightMode\n// />\n// \n// \n// );\n","import { useTheme } from \"native-base\";\nimport React from \"react\";\nimport * as Progress from \"react-native-progress\";\n\nimport { Scale } from \"../constants\";\n\nexport default function ProgressBar({\n value,\n warningMargin = 0.15,\n allowedToGoOver = false,\n width = 40,\n}: {\n value: number;\n warningMargin?: number;\n allowedToGoOver?: boolean;\n width?: number;\n}): JSX.Element {\n const theme = useTheme();\n\n const warningValue = 100 * warningMargin;\n\n const valueLteWarningMarginPercent = value <= 100 - warningValue;\n const valueGteWarningMarginPercent = value >= 100 + warningValue;\n const color =\n valueLteWarningMarginPercent || (allowedToGoOver ? false : valueGteWarningMarginPercent)\n ? theme.colors.amber[\"200\"]\n : theme.colors.primary[\"600\"];\n\n return (\n \n );\n}\n","import { Button, Text, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { StyleSheet, Text as NativeText, View } from \"react-native\";\n\nimport ProgressBar from \"../commons/ProgressBar\";\nimport { commonStyles, isDesktopScreen, Scale } from \"../constants\";\nimport { formatNumberAsPercentage, formatNumberAsWholeNumber } from \"../helpers/generalHelpers\";\nimport type { MacroName, RecipeMacrosItemType } from \"../types\";\n\nconst styles = StyleSheet.create({\n rowContainer: {\n flex: 1,\n },\n transformStyle: {\n transform: [{ rotateZ: \"-3deg\" }],\n },\n});\n\ntype Props = {\n macroDetail: RecipeMacrosItemType;\n showLabel?: boolean;\n verticalMode?: boolean;\n excludeDetail?: MacroName[];\n showUnit?: boolean;\n allowedToGoOver?: boolean;\n optionalPercentage?: number;\n showTarget?: boolean;\n showProgress?: boolean;\n};\n\nconst MacroProgressWidget = ({\n macroDetail,\n excludeDetail: exceptItems,\n verticalMode,\n showLabel,\n showUnit = true,\n allowedToGoOver = false,\n optionalPercentage = undefined,\n showTarget = true,\n showProgress = true,\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const theme = useTheme();\n\n const isDesktop = isDesktopScreen();\n\n const macroForDisplay = isDesktop\n ? t(`general.${macroDetail.macroName}`)\n : t(`general.${macroDetail.macroName}_short`);\n\n let progressText = \"\";\n if (exceptItems?.includes(macroDetail.macroName)) {\n // progressText = ` ${macroForDisplay}`;\n progressText = macroDetail.macroName === \"kcal\" ? \"\" : \"g\";\n } else {\n progressText = ` ${macroForDisplay}`;\n if (showTarget) {\n progressText = ` /${macroDetail.total} ${macroForDisplay}`;\n }\n }\n\n return (\n \n {verticalMode ? (\n <>\n {showLabel ? (\n \n {macroForDisplay}\n \n ) : null}\n {/* NOTE: This parent Text component is required in order for things to display correctly */}\n \n \n {macroDetail.progress ? formatNumberAsWholeNumber(macroDetail.progress) : 0}\n \n \n {progressText}\n \n {optionalPercentage ? (\n \n ) : null}\n \n \n ) : (\n \n {showLabel ? (\n \n {macroForDisplay}\n \n ) : null}\n \n \n {macroDetail.progress}\n \n {` /${macroDetail.total}`}\n {showUnit ? (\n \n {macroDetail.unit}\n \n ) : null}\n \n \n )}\n\n \n {exceptItems?.includes(macroDetail.macroName) || !showProgress ? null : (\n \n )}\n \n \n );\n};\n\nexport default MacroProgressWidget;\n","import _ from \"lodash\";\nimport { Text } from \"native-base\";\nimport React from \"react\";\n// NOTE: The whole path is required\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line import/no-unresolved, import/extensions\nimport { Metabolism } from \"tdee-calculator/src/index.js\";\n\nimport MacroProgressWidget from \"../components/RecipeMacrosItem\";\nimport type { MealSlotSpecification, User } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { ActivityEnum, MacroName, Macros } from \"../types\";\n\nconst KCAL_IN_FAT = 9;\nconst KCAL_IN_CARBOHYDRATES = 4;\nconst KCAL_IN_PROTEIN = 4;\n\ntype Macronutrient = \"fat\" | \"carbohydrates\" | \"protein\";\n\nconst KCAL_IN_MACRO_LOOKUP: { [M in Macronutrient]: number } = {\n fat: KCAL_IN_FAT,\n carbohydrates: KCAL_IN_CARBOHYDRATES,\n protein: KCAL_IN_PROTEIN,\n};\n\nexport const calculateDailyTotalForMacro = (\n macro: MacroName,\n mealSlotSpecifications: (MealSlotSpecification | undefined)[]\n): number => Math.round(_.sumBy(mealSlotSpecifications, macro));\n\nfunction calculateMacroPercentageOfDailyTotalEnergy(\n macro: Macronutrient,\n mealSlotSpecifications: MealSlotSpecification[]\n): number {\n return (\n (calculateDailyTotalForMacro(macro, mealSlotSpecifications) * KCAL_IN_MACRO_LOOKUP[macro]) /\n calculateDailyTotalForMacro(\"kcal\", mealSlotSpecifications)\n );\n}\n\nexport function getNutritionDayPlanOverviewComponent(\n mealSlotSpecifications: MealSlotSpecification[],\n showPercentages = false\n): JSX.Element {\n if (_.isEmpty(mealSlotSpecifications)) {\n logger.warn(\"No meal slot specifications provided\");\n\n return {\"Something went wrong\"};\n }\n\n const fatPercentage = calculateMacroPercentageOfDailyTotalEnergy(\"fat\", mealSlotSpecifications);\n\n const carbohydratesPercentage = calculateMacroPercentageOfDailyTotalEnergy(\"carbohydrates\", mealSlotSpecifications);\n\n const proteinPercentage = calculateMacroPercentageOfDailyTotalEnergy(\"protein\", mealSlotSpecifications);\n\n type PercentageObject = {\n [m in MacroName]: number | undefined;\n };\n\n const percentageObject: PercentageObject = {\n fat: fatPercentage,\n carbohydrates: carbohydratesPercentage,\n protein: proteinPercentage,\n kcal: undefined,\n };\n\n return (\n <>\n {Object.keys(Macros).map((macro: string) => {\n const macroName = macro.toLowerCase() as MacroName;\n return (\n \n );\n })}\n \n );\n}\n\nexport const convertActivityEnumToActivityForMetabolism = (activity: ActivityEnum): string => {\n switch (activity) {\n case ActivityEnum.SEDENTARY:\n return \"Sedentary\";\n case ActivityEnum.MILDLY_ACTIVE:\n return \"Light Exercise\";\n case ActivityEnum.ACTIVE:\n return \"Moderate Exercise\";\n case ActivityEnum.VERY_ACTIVE:\n return \"Heavy Exercise\";\n default:\n throw new Error(\"Unknown activity\");\n }\n};\n\nconst KATCH_MCARDLE_FORMULA = \"Katch and McArdle (2001)\";\nconst METRIC = \"Metric\";\nexport const calculateDailyEnergyExpenditure = (client: User): Metabolism => {\n if (!client) {\n throw new Error(\"Client is undefined\");\n }\n\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n // NOTE: This library doesn't have good typing support\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return new Metabolism(\n KATCH_MCARDLE_FORMULA,\n METRIC,\n convertActivityEnumToActivityForMetabolism(client.intake.activity as ActivityEnum),\n {\n bodyfat: client.intake.body_fat_percentage * 100,\n weight: client.intake.weight,\n }\n );\n};\n","/**\n * This is taken from the legacy codebase (`src/components/calculator/macros.js` in the `weekmeals.co` repo)\n *\n * It has been converted from flow to typescript.\n *\n * I have tried to make minimal changes but we use some of our types (from backendTypes)\n * which are the same as the legacy but with only minor differences (ie, uppercase vs lowercase).\n * This was done to help with the conversion.\n */\n\nimport type {\n ActivityEnum as Activity,\n DietEnum as DietName,\n GenderEnum as Gender,\n SustainabilityEnum as Sustainability,\n} from \"./backendTypes.js\";\n\nexport type WeightliftingSession = {\n inactivityFactor: number; // as a percentage (50% => 0.5).\n duration: number; // in minutes.\n weeklyFrequency: number; // in times per week.\n};\n\nexport type CardioSession = {\n id: number;\n activity: string;\n burnRate: number; // in kcal/kg/min.\n};\n\nexport type CardioOption = {\n id: number;\n name: string;\n session: CardioSession;\n netEnergyExpenditure: number; // in kcal/30 min.\n};\n\nexport type CardioInput = {\n session: CardioSession;\n option: CardioOption; // selected cardio option.\n duration: number; // in minutes.\n weeklyFrequency: number; // times per week.\n};\n\nexport type EnergyInput = {\n gender: Gender;\n weight: number; // in kilos.\n bodyFatPercentage: number; // as a percentage (16% => 0.16).\n\n // Thermic effect of diet (0.1 - 0.25). Higher when lean and when diet's rich\n // in whole foods, unsat fats, MCTs, high volume foods, and lots of fiber.\n // For average western diet low in protein, it's 10%.\n thermicEffectOfDiet: number;\n\n lifestyle: Activity;\n\n cardio?: CardioInput[];\n\n weightlifting?: WeightliftingSession;\n};\n\nexport type EnergyExpenditure = {\n leanBodyMass: number;\n\n daily: {\n // Basal energy expenditure, also known as basal metabolic rate (BMR), is\n // the energy used to fuel all other internal processes, such as the\n // maintenance of respiration, heart rate, and kidney function. It is\n // affected by such factors as environmental temperature, as the body will\n // work to maintain its internal temperature of 98.6° F (about 37° C), and\n // muscle mass, as larger muscles have increased energy requirements even\n // when at rest.\n bmr: number;\n\n ree: number;\n\n // Lifestyle physical activities.\n lifestyle: number;\n\n // Planned cardio (and sports).\n cardio: number;\n\n // Planned weightlifting\n weightlifting: number;\n\n // Food digestion and processing.\n foodDigestion: number;\n\n // Total Daily Energy Expenditure (TDEE).\n total: number;\n };\n};\n\nexport type EnergyOptions = {\n energyBalance: number | undefined;\n diet: DietName;\n optimize: Sustainability;\n};\n\nexport function computeLeanBodyMass(input: EnergyInput): number {\n // B13 = B11 * ((100-B12)/100)\n const { weight, bodyFatPercentage } = input;\n return weight * (1 - bodyFatPercentage);\n}\n\nexport function computeBMR(leanBodyMass: number): number {\n // B22 = 370 + 21.6*(if(B21=1,B13,B18))\n // True BF%=1, Estimated BF%=0\n // const {useEstimatedBodyFat, estimatedLeanBodyMass, leanBodyMass} = energy;\n // return (\n // 370 + 21.6 * (useEstimatedBodyFat ? estimatedLeanBodyMass : leanBodyMass)\n // );\n return 370 + 21.6 * leanBodyMass;\n}\n\n// Lifestyle physical activities\n// Men Women Bescription\n// Sedentary 1 1 Office job.\n// Somewhat active 1.11 1.12 Walks the dog several times a day, travels by\n// bicycle.\n// Active 1.25 1.27 Full-time waiter or PT, on your feet whole day.\n// Very active 1.48 1.45 Manual labor, like a construction worker.\nconst lifestyleFactors: { [G in Gender]: { [A in Activity]: number } } = {\n MALE: {\n SEDENTARY: 1.0,\n MILDLY_ACTIVE: 1.11,\n ACTIVE: 1.25,\n VERY_ACTIVE: 1.48,\n },\n FEMALE: {\n SEDENTARY: 1.0,\n MILDLY_ACTIVE: 1.12,\n ACTIVE: 1.27,\n VERY_ACTIVE: 1.45,\n },\n};\n\nexport function computeLifestyle(input: EnergyInput, bmr: number): number {\n // B36 = Lifestyle physical activity factor\n // B78 = BMR\n // B79 = (B36 - 1) * B78\n const { gender, lifestyle } = input;\n return (lifestyleFactors[gender][lifestyle] - 1) * bmr;\n}\n\nexport function computeRestingEnergyExpenditure(input: EnergyInput, bmr: number): number {\n // B36 = Lifestyle physical activity factor\n const { gender, lifestyle, thermicEffectOfDiet } = input;\n const lifestyleFactor = lifestyleFactors[gender][lifestyle];\n // B40 = Thermic effect of diet (1.1 - 1.25)\n // B41 = B36* BMR *B40\n return lifestyleFactor * bmr * (thermicEffectOfDiet + 1);\n}\n\nexport function computeNetEnergyExpenditureForCardio(input: CardioInput, ree: number, lbm: number): number {\n // weekly duration = D61 * E61\n const weeklyDuration = input.duration * input.weeklyFrequency;\n\n // F61 = Total energy exp\n // F61 = IFERROR(B$13*C61*D61*E61,0)\n const total = lbm * input.session.burnRate * weeklyDuration;\n\n // G61 = Basal energy exp\n // G61 = B41/24/60 * D61 * E61\n const basal = (ree / 24 / 60) * weeklyDuration;\n\n // H61 = Net energy exp (-BMR)\n // H61 = F61-G61\n return total - basal;\n}\n\nexport function initializeCardioOption(session: CardioSession, netEnergyExpenditure: number): CardioOption {\n return {\n id: session.id,\n name: session.activity,\n session,\n netEnergyExpenditure,\n };\n}\n\nexport function personalizeCardioOptions(sessions: CardioSession[], ree: number, lbm: number): CardioOption[] {\n return sessions.map((session) =>\n initializeCardioOption(\n session,\n // Compute net energy expenditure (in kcal/30 min).\n Math.round(session.burnRate * lbm * 30 - (ree / 24 / 60) * 30)\n )\n );\n}\n\nexport function computeCardio(input: EnergyInput, ree: number, lbm: number, bmr: number): number {\n if (!input.cardio) return 0.0;\n // Exercise physical activities\n // Total weekly planned cardio energy exp:\n // H62 = sum(H48:H61)\n const weekly = input.cardio\n .map((cardio) => (cardio ? computeNetEnergyExpenditureForCardio(cardio, ree, lbm) : 0))\n // eslint-disable-next-line camelcase\n .reduce((partial_sum, i) => partial_sum + i, 0);\n\n // Average daily planned cardio energy exp:\n // H63 = H62 / 7\n const daily = weekly / 7;\n\n // Planned cardio (and sports):\n // B80 = H63\n return daily;\n}\n\nexport function computeWeightlifting(input: EnergyInput, bmr: number): number {\n // B11 = weight.\n const { weight, weightlifting } = input;\n\n if (!weightlifting) return 0.0;\n\n // TODO is this a constant or user adjustable?\n // C68 = kcal/kg/min\n const burnRate = 0.1;\n\n // Duration (in minutes)\n // E68 = weekly frequency (times per week)\n // inactivity factor as a percentage (where 0% means always active).\n const { duration, weeklyFrequency, inactivityFactor } = weightlifting;\n if (duration <= 0 || weeklyFrequency <= 0 || inactivityFactor < 0) return 0.0;\n\n // Net calories per session (-BMR):\n // F68 = (C68*D68*$B$11)-(($B$22/24/60)*E68)\n const netCaloriesPerSessionMinusBMR =\n burnRate * (1 - inactivityFactor) * duration * weight - (bmr / 24 / 60) * weeklyFrequency;\n\n // Average daily planned weight training energy exp:\n // H70 = F68*(E68/7)\n return netCaloriesPerSessionMinusBMR * (weeklyFrequency / 7);\n}\n\nexport function computeFoodDigestion(input: EnergyInput, energy: EnergyExpenditure): number {\n const { bmr, lifestyle, cardio, weightlifting } = energy.daily;\n return (bmr + lifestyle + cardio + weightlifting) * input.thermicEffectOfDiet;\n}\n\nexport function computeTDEE(energy: EnergyExpenditure): number {\n const { bmr, lifestyle, cardio, weightlifting, foodDigestion } = energy.daily;\n return bmr + lifestyle + cardio + weightlifting + foodDigestion;\n}\n\nexport function computeEnergyExpenditure(input: EnergyInput): EnergyExpenditure | undefined {\n if (!input.gender) return undefined;\n\n const energy: EnergyExpenditure = {\n leanBodyMass: 0.0,\n\n daily: {\n bmr: 0.0,\n ree: 0.0,\n lifestyle: 0.0,\n cardio: 0.0,\n weightlifting: 0.0,\n foodDigestion: 0.0,\n total: 0.0,\n },\n };\n\n const lbm = computeLeanBodyMass(input);\n const bmr = computeBMR(lbm);\n\n // REE (Resting Energy Expenditure):\n // Energy you expend when you do no planned activities.\n // B41 = B36*(if(B38=1,B22,B25))*B40\n const ree = computeRestingEnergyExpenditure(input, bmr);\n\n energy.leanBodyMass = lbm;\n // energy.estimatedLeanBodyMass = computeEstimatedLeanBodyMass(energy);\n\n energy.daily.bmr = bmr;\n energy.daily.ree = ree;\n energy.daily.lifestyle = computeLifestyle(input, bmr);\n energy.daily.cardio = computeCardio(input, ree, lbm, bmr);\n energy.daily.weightlifting = computeWeightlifting(input, bmr);\n energy.daily.foodDigestion = computeFoodDigestion(input, energy);\n energy.daily.total = computeTDEE(energy);\n\n return energy;\n}\n\nfunction getTotalCalorieIntake(energy: EnergyExpenditure, energyBalance: number | undefined): number {\n return energy.daily.total * (energyBalance || 0);\n}\n\nexport const HighTotalCalorieIntakeThreshold = 2000;\n\nexport function hasHighTotalCalorieIntake(energy: EnergyExpenditure, energyBalance: number | undefined): boolean {\n return getTotalCalorieIntake(energy, energyBalance) >= HighTotalCalorieIntakeThreshold;\n}\n\nexport function pickOptimizationGoal(\n energy: EnergyExpenditure | undefined,\n goal: Sustainability,\n energyBalance: number | undefined\n): Sustainability {\n if (!energy) return \"SUSTAINABLE\";\n // Force optimization goal to 'results' when total calorie intake is high.\n // This makes the meals more tasteful by distributing the calories more\n // evenly across protein, fat and carbs. The goal 'lifestyle' will favor\n // more carbs instead of fat, resulting in carb-heavy meals.\n if (hasHighTotalCalorieIntake(energy, energyBalance)) return \"OPTIMAL\";\n\n return goal;\n}\n\nexport type RelativeMacros = { protein: number; fat: number; carbs: number };\n\nexport type LegacyMealType = \"breakfast\" | \"lunch\" | \"snack\" | \"dinner\" | \"pre-bed\";\nexport type Macros = {\n calories: number;\n protein: number;\n carbs: number;\n fat: number;\n fiber: number;\n};\nexport type MealTypeTotalMacros = { [M in LegacyMealType | \"total\"]: Macros };\nexport type MacroDistribution = {\n meals: MealTypeTotalMacros;\n};\n\nexport type MealPreferences = { [M in LegacyMealType]: boolean };\n\ntype PossibleRatioKey =\n | \"\"\n | \"b\"\n | \"l\"\n | \"s\"\n | \"d\"\n | \"p\"\n | \"b_l\"\n | \"b_s\"\n | \"b_d\"\n | \"b_p\"\n | \"l_s\"\n | \"l_d\"\n | \"l_p\"\n | \"s_d\"\n | \"s_p\"\n | \"d_p\"\n | \"b_l_s\"\n | \"b_l_d\"\n | \"b_l_p\"\n | \"b_s_d\"\n | \"b_s_p\"\n | \"b_d_p\"\n | \"l_s_d\"\n | \"l_s_p\"\n | \"l_d_p\"\n | \"s_d_p\"\n | \"b_l_s_d\"\n | \"b_l_s_p\"\n | \"b_l_d_p\"\n | \"b_s_d_p\"\n | \"l_s_d_p\"\n | \"b_l_s_d_p\";\nexport type RatioValue = { [MT in LegacyMealType]?: number };\ntype PossibleRatioValue = RatioValue | undefined;\n\nfunction computeOptimalProtein(input: EnergyInput, energy: EnergyExpenditure, options: EnergyOptions): number {\n const { bodyFatPercentage, weight, gender } = input;\n const lbm = energy.leanBodyMass;\n\n let factor = 1.8;\n if (options.optimize === \"SUSTAINABLE\") {\n factor = {\n MALE: 1.6,\n FEMALE: 1.5,\n }[gender];\n }\n\n // D16 is 'yes' or 'no'.\n // B15 = IF(D16=\"yes\",2*'CEE'!B13,1.8*'CEE'!B11)\n const constrain =\n bodyFatPercentage >\n {\n MALE: 0.2, // if male and bf% > 20%: constrain protein\n FEMALE: 0.3, // if female and bf% > 30%: constrain protein\n }[gender];\n\n let protein = factor * weight;\n\n if (constrain) protein = 2 * lbm;\n\n return protein;\n}\n\nfunction computeOptimalFat(input: EnergyInput, energy: EnergyExpenditure, options: EnergyOptions): number {\n const { gender } = input;\n const { bmr, ree } = energy.daily;\n\n // B17 = if(B16=\"Male\",('CEE'!B39*0.4)/9,('CEE'!B41*0.4)/9)\n let factor;\n if (options.optimize === \"SUSTAINABLE\") factor = 0.25;\n else factor = 0.4;\n\n let fat;\n if (gender === \"MALE\") {\n fat = (bmr * factor) / 9;\n } else {\n fat = (ree * factor) / 9;\n }\n\n return fat;\n}\n\nexport function computeOptimalMacros(\n input: EnergyInput,\n energy: EnergyExpenditure,\n options: EnergyOptions\n): { protein: number; fat: number } {\n const protein = computeOptimalProtein(input, energy, options);\n const fat = computeOptimalFat(input, energy, options);\n\n // TODO\n // Alleen gebruiken bij mensen met overgewicht op een PSMF dieet, of bij hoge\n // uitzondering.\n // B18 = (0.2*B12)/9\n // const minimalFat = (0.2 * calorieIntake) / 9;\n\n return {\n protein,\n fat,\n };\n}\n\nfunction computeDailyMacros(\n optimal: { protein: number; fat: number },\n energy: EnergyExpenditure,\n options: EnergyOptions\n): Macros {\n const calories = getTotalCalorieIntake(energy, options.energyBalance);\n\n const fatAdjustmentFactor = calories > 2800 ? calories / 2600 : 1;\n\n // B28 = if(D21=\"Vegan\",B15*(2.2/1.8),if(D21=\"Vegetarian\",B15*(2/1.8),B15))\n // TODO use 2.2 for vegan when lysine supplements are taken.\n const proteinFactor = {\n VEGAN: 2.4 / 1.8,\n VEGETARIAN: 2 / 1.8,\n OVO_VEGETARIAN: 2 / 1.8,\n LACTO_VEGETARIAN: 2 / 1.8,\n PESCATARIAN: 1,\n OMNIVORE: 1,\n HALAL: 1,\n }[options.diet];\n\n const protein = Math.round(optimal.protein * proteinFactor);\n\n // TODO Implement keto or obese adjustment?\n // B27 = if(B21=0,(B12-(4*B15)-(9*B17))/4,B22)*(1/B13)\n let carbs = Math.round((calories - 4 * protein - 9 * optimal.fat) / 4 / fatAdjustmentFactor);\n\n const keto = false;\n if (keto) carbs = 90;\n\n // TODO Implement fat adjustment?\n // B29 = if(B23=0,B17+((B12-(4*B27)-(4*B28))/9-B17),B24)\n const fat = Math.round((calories - 4 * carbs - 4 * protein) / 9);\n\n return {\n calories: Math.round(carbs * 4 + protein * 4 + fat * 9),\n protein,\n fat,\n carbs,\n fiber: NaN,\n };\n}\n\nexport function computeRelativeMacros(total: Macros): RelativeMacros {\n return {\n protein: ((total.protein * 4) / total.calories) * 100,\n fat: ((total.fat * 9) / total.calories) * 100,\n carbs: ((total.carbs * 4) / total.calories) * 100,\n };\n}\n\nexport function computeRecommendedMacros(\n input: EnergyInput,\n energy: EnergyExpenditure | undefined,\n options: EnergyOptions\n): Macros {\n if (typeof options.energyBalance !== \"number\" || options.energyBalance < 0.01 || !energy) {\n throw new Error(`Invalid energy balance: ${String(options.energyBalance)}`);\n }\n\n const optimal = computeOptimalMacros(input, energy, options);\n return computeDailyMacros(optimal, energy, options);\n}\n\nfunction getMealPreferencesKey(meals: LegacyMealType[]): PossibleRatioKey {\n const getFirstLetter = (mealType: LegacyMealType): PossibleRatioKey => mealType[0] as PossibleRatioKey;\n\n return meals.map(getFirstLetter).join(\"_\") as PossibleRatioKey;\n}\n\ntype LegacyMacroType = \"calories\" | \"protein\" | \"fat\" | \"carbs\" | \"fiber\";\nexport const macroTypes: LegacyMacroType[] = [\"calories\", \"protein\", \"fat\", \"carbs\", \"fiber\"];\nexport const mealTypes: LegacyMealType[] = [\"breakfast\", \"lunch\", \"snack\", \"dinner\", \"pre-bed\"];\n\nexport function computeCalories(macros: Macros): number {\n const factors = {\n calories: NaN,\n protein: 4,\n fat: 9,\n carbs: 4,\n fiber: 2,\n };\n return macroTypes\n .filter((key) => key !== \"calories\")\n .map((type) => factors[type] * macros[type])\n .filter((x) => !Number.isNaN(x))\n .reduce((a, b) => a + b, 0);\n}\n\nfunction computeRemainingMacros(recommended: Macros, meals: MealTypeTotalMacros, last: LegacyMealType): Macros {\n const remaining = { ...recommended };\n\n mealTypes.forEach((mealType) => {\n if (mealType === last.toLowerCase()) return;\n\n macroTypes\n .filter((macro) => !Number.isNaN(meals[mealType][macro]))\n .forEach((macro) => {\n remaining[macro] -= meals[mealType][macro];\n });\n });\n\n remaining.calories = computeCalories(remaining);\n\n return remaining;\n}\n\nexport function scaleMacrosOverMealType(recommended: Macros, ratios: PossibleRatioValue): MealTypeTotalMacros {\n const total = {\n calories: NaN,\n protein: Math.round(recommended.protein),\n fat: Math.round(recommended.fat),\n carbs: Math.round(recommended.carbs),\n fiber: NaN,\n };\n\n const meals: MealTypeTotalMacros = {\n total: { ...total, calories: computeCalories(total) },\n breakfast: {\n calories: 0,\n protein: 0,\n carbs: 0,\n fat: 0,\n fiber: 0,\n },\n lunch: {\n calories: 0,\n protein: 0,\n carbs: 0,\n fat: 0,\n fiber: 0,\n },\n snack: {\n calories: 0,\n protein: 0,\n carbs: 0,\n fat: 0,\n fiber: 0,\n },\n dinner: {\n calories: 0,\n protein: 0,\n carbs: 0,\n fat: 0,\n fiber: 0,\n },\n \"pre-bed\": {\n calories: 0,\n protein: 0,\n carbs: 0,\n fat: 0,\n fiber: 0,\n },\n };\n\n mealTypes.forEach((mealType) => {\n meals[mealType] = {\n calories: 0,\n protein: NaN,\n fat: NaN,\n carbs: NaN,\n fiber: NaN,\n };\n });\n\n mealTypes.forEach((mealType) => {\n if (!ratios) throw new Error(\"Ratio value was undefined - this should never happen.\");\n\n const ratio = ratios[mealType];\n if (!ratio) return;\n\n const macros = {\n calories: NaN,\n protein: Math.round(ratio * recommended.protein),\n fat: Math.round(ratio * recommended.fat),\n carbs: Math.round(ratio * recommended.carbs),\n fiber: NaN,\n };\n\n macros.calories = computeCalories(macros);\n meals[mealType] = macros;\n });\n\n const last = mealTypes\n .filter((mealType) => {\n if (!ratios) throw new Error(\"Ratio value was undefined - this should never happen.\");\n\n return ratios[mealType];\n })\n .slice(-1)[0];\n\n if (!last) throw new Error(\"`last` was undefined - this should never happen.\");\n\n meals[last] = computeRemainingMacros(recommended, meals, last);\n\n return meals;\n}\n\nconst possibleRatios: { [K in PossibleRatioKey]: PossibleRatioValue } = {\n \"\": undefined,\n\n b: { breakfast: 1 },\n l: { lunch: 1 },\n s: { snack: 1 },\n d: { dinner: 1 },\n p: { \"pre-bed\": 1 },\n\n b_l: { breakfast: 0.5, lunch: 0.5 },\n b_s: { breakfast: 0.5, snack: 0.5 },\n b_d: { breakfast: 0.4, dinner: 0.6 },\n b_p: { breakfast: 0.5, \"pre-bed\": 0.5 },\n l_s: { lunch: 0.7, snack: 0.3 },\n l_d: { lunch: 0.4, dinner: 0.6 },\n l_p: { lunch: 0.6, \"pre-bed\": 0.4 },\n s_d: { snack: 0.2, dinner: 0.8 },\n s_p: { snack: 0.5, \"pre-bed\": 0.5 },\n d_p: { dinner: 0.6, \"pre-bed\": 0.4 },\n\n b_l_s: { breakfast: 0.35, lunch: 0.35, snack: 0.3 },\n b_l_d: { breakfast: 0.25, lunch: 0.25, dinner: 0.5 },\n b_l_p: { breakfast: 0.3, lunch: 0.35, \"pre-bed\": 0.35 },\n b_s_d: { breakfast: 0.35, snack: 0.15, dinner: 0.5 },\n b_s_p: { breakfast: 0.35, snack: 0.15, \"pre-bed\": 0.5 },\n b_d_p: { breakfast: 0.3, dinner: 0.5, \"pre-bed\": 0.2 },\n l_s_d: { lunch: 0.35, snack: 0.15, dinner: 0.5 },\n l_s_p: { lunch: 0.45, snack: 0.25, \"pre-bed\": 0.3 },\n l_d_p: { lunch: 0.25, dinner: 0.45, \"pre-bed\": 0.3 },\n s_d_p: { snack: 0.15, dinner: 0.55, \"pre-bed\": 0.3 },\n\n b_l_s_d: { breakfast: 0.25, lunch: 0.25, snack: 0.1, dinner: 0.4 },\n b_l_s_p: { breakfast: 0.3, lunch: 0.3, snack: 0.1, \"pre-bed\": 0.3 },\n b_l_d_p: { breakfast: 0.25, lunch: 0.25, dinner: 0.35, \"pre-bed\": 0.15 },\n b_s_d_p: { breakfast: 0.2, snack: 0.1, dinner: 0.5, \"pre-bed\": 0.2 },\n l_s_d_p: { lunch: 0.3, snack: 0.1, dinner: 0.4, \"pre-bed\": 0.2 },\n\n b_l_s_d_p: {\n breakfast: 0.2,\n lunch: 0.2,\n snack: 0.07,\n dinner: 0.35,\n \"pre-bed\": 0.18,\n },\n};\n\nexport function computeMacroDistribution(recommended: Macros, preferences: MealPreferences): MacroDistribution {\n const meals = mealTypes.filter((mealType) => preferences[mealType]);\n const key = getMealPreferencesKey(meals);\n\n const ratios = possibleRatios[key];\n\n if (!ratios) throw new Error(`unknown combination of meal preferences: ${key}`);\n\n return {\n meals: scaleMacrosOverMealType(recommended, ratios),\n };\n}\n\n// NOTE: This function is not used anymore in the new codebase.\n// It is commented because it has type errors from the original.\n// export function serializeMealMacros(macros: MealTypeTotalMacros): string {\n// // Average day Breakfast Lunch Snack Dinner Pre-bed meal Total\n// // Calories 501 501 0 1001 0 2003\n// // Protein (g) 37 37 74 148\n// // Fat (g) 21 21 41 83\n// // Carbohydrate (g) 42 42 84 167\n// const header = [\"Macronutrient\", \"Breakfast\", \"Lunch\", \"Snack\", \"Dinner\", \"Pre-bed\", \"Total\"];\n\n// const forAll = (fn: (s: string) => void): void => [...mealTypes, \"total\"].forEach(fn);\n\n// const calories = [\"Calories\"];\n// forAll((mealType) => calories.push(macros[mealType].calories));\n\n// const protein = [\"Protein (g)\"];\n// forAll((mealType) => protein.push(macros[mealType].protein));\n\n// const fat = [\"Fat (g)\"];\n// forAll((mealType) => fat.push(macros[mealType].fat));\n\n// const carbs = [\"Carbohydrate (g)\"];\n// forAll((mealType) => carbs.push(macros[mealType].carbs));\n\n// const output = [header, calories, protein, fat, carbs];\n\n// return output.map((row) => row.join(\"\\t\")).join(\"\\n\");\n// }\n","// TODO: This file has been superseded by nutritionCalculations7.ts and should be deleted\n// (after any functions from this file that are still needed have been copied over to nutritionCalculations7.ts)\n\n/*\n * This file is the new codebase-facing service for the legacy nutrition calculations.\n */\n\nimport _ from \"lodash\";\n\nimport type {\n ExerciseInstanceListRetrieve as ExerciseInstance,\n MealMomentEnum,\n MealSlotSpecification,\n MealTypeEnum,\n UserProfile,\n} from \"./backendTypes\";\nimport {\n CardioInput,\n computeEnergyExpenditure,\n computeMacroDistribution,\n computeRecommendedMacros,\n EnergyExpenditure,\n EnergyInput,\n LegacyMealType,\n MacroDistribution,\n Macros,\n MealPreferences,\n} from \"./legacyNutritionCalculations\";\n\nconst thermicEffectOfDiet = 20 / 100;\n\n// Helper functions\nexport const convertLegacyMealTypeToMealType = (legacyMealType: LegacyMealType): MealTypeEnum => {\n switch (legacyMealType) {\n case \"breakfast\":\n return \"BREAKFAST\";\n case \"lunch\":\n return \"LUNCH\";\n case \"snack\":\n return \"SNACK\";\n case \"dinner\":\n return \"DINNER\";\n case \"pre-bed\":\n return \"SNACK\";\n default:\n throw new Error(\"Unknown legacy meal type\");\n }\n};\n\nexport const convertMealTypeToLegacyMealType = (mealType: MealMomentEnum): LegacyMealType => {\n switch (mealType) {\n case \"BREAKFAST\":\n return \"breakfast\";\n case \"MORNING_SNACK\":\n return \"snack\";\n case \"LUNCH\":\n return \"lunch\";\n case \"AFTERNOON_SNACK\":\n return \"snack\";\n case \"DINNER\":\n return \"dinner\";\n case \"SNACK\":\n return \"snack\";\n case \"LATE_SNACK\":\n return \"pre-bed\";\n default:\n throw new Error(\"Unknown meal type\");\n }\n};\n\nconst convertLegacyMacrosToOrdering = (legacyMealType: LegacyMealType): number => {\n switch (legacyMealType) {\n case \"breakfast\":\n return 0;\n case \"lunch\":\n return 1;\n case \"snack\":\n return 2;\n case \"dinner\":\n return 3;\n case \"pre-bed\":\n return 4;\n default:\n throw new Error(`Unknown legacy meal type: ${String(legacyMealType)}`);\n }\n};\n\nconst convertMealSlotSpecificationOrderToMealMoment = (mssOrder: number): MealMomentEnum => {\n switch (mssOrder) {\n case 0:\n return \"BREAKFAST\";\n case 1:\n return \"LUNCH\";\n case 2:\n return \"SNACK\";\n case 3:\n return \"DINNER\";\n case 4:\n return \"LATE_SNACK\";\n default:\n throw new Error(`Unknown mssOrder: ${String(mssOrder)}`);\n }\n};\n\nconst createLegacyCardio = (exerciseInstance: ExerciseInstance): CardioInput => {\n const session = {\n activity: exerciseInstance.exercise.exercise_name,\n burnRate: exerciseInstance.exercise.kcal_per_kg_per_min,\n id: exerciseInstance.exercise.id,\n };\n\n return {\n weeklyFrequency: exerciseInstance.sessions_per_week,\n duration: exerciseInstance.minutes_per_session,\n option: {\n id: exerciseInstance.exercise.id,\n name: exerciseInstance.exercise.exercise_name,\n netEnergyExpenditure: exerciseInstance.exercise.kcal_per_kg_per_min,\n session,\n },\n session,\n };\n};\n\nfunction getCardioInputArray(intake: UserProfile): CardioInput[] {\n return _.map(intake.exercise_instances, createLegacyCardio);\n}\n\nexport const calculateEnergyExpenditure = (intake: UserProfile): EnergyExpenditure | undefined => {\n if (!intake) throw new Error(\"No intake provided\");\n\n const { gender, weight, body_fat_percentage: fatPercentage, activity: lifestyle } = intake;\n\n const cardio = getCardioInputArray(intake);\n\n const input = {\n gender,\n weight,\n bodyFatPercentage: fatPercentage,\n thermicEffectOfDiet,\n lifestyle,\n cardio,\n };\n\n return computeEnergyExpenditure(input);\n};\n\nexport function getEnergyInput(userProfile: UserProfile): EnergyInput {\n return {\n gender: userProfile.gender,\n weight: userProfile.weight, // in kilos.\n bodyFatPercentage: userProfile.body_fat_percentage, // as a percentage (16% => 0.16).\n\n // Thermic effect of diet (0.1 - 0.25). Higher when lean and when diet's rich\n // in whole foods, unsaturated fats, MCTs, high volume foods, and lots of fiber.\n // For average western diet low in protein, it's 10%.\n thermicEffectOfDiet,\n\n lifestyle: userProfile.activity,\n\n cardio: getCardioInputArray(userProfile),\n };\n}\n\n/**\n *\n * @param userProfile\n * @param energyBalance A percentage as a float, ie, 0 = 0%, 1 = 100%, 3 = 300%\n * @returns\n */\nexport function getRecommendedDailyMacronutrientIntake(\n userProfile: UserProfile,\n energyBalance: number\n): Macros | undefined {\n const options = {\n energyBalance,\n diet: userProfile.diet,\n optimize: userProfile.sustainability,\n };\n\n return computeRecommendedMacros(getEnergyInput(userProfile), calculateEnergyExpenditure(userProfile), options);\n}\n\nexport type PossibleMealMoment = MealTypeEnum | \"LATE_SNACK\";\nexport type DesiredMealMoments = {\n [M in PossibleMealMoment]: boolean;\n};\n\nexport const DEFAULT_MEAL_MOMENT_PREFERENCES: DesiredMealMoments = {\n BREAKFAST: true,\n LUNCH: true,\n SNACK: true,\n DINNER: true,\n LATE_SNACK: true,\n};\n\nexport function convertPossibleMealMomentToOrdering(mealMoment: PossibleMealMoment): number {\n switch (mealMoment) {\n case \"BREAKFAST\":\n return 0;\n case \"LUNCH\":\n return 1;\n case \"SNACK\":\n return 2;\n case \"DINNER\":\n return 3;\n case \"LATE_SNACK\":\n return 4;\n default:\n throw new Error(`Unknown meal moment: ${String(mealMoment)}`);\n }\n}\n\nfunction convertToLegacyMealPreferences(desiredMealMoments: DesiredMealMoments): MealPreferences {\n const { BREAKFAST, LUNCH, SNACK, DINNER, LATE_SNACK } = desiredMealMoments;\n\n return {\n breakfast: BREAKFAST,\n lunch: LUNCH,\n snack: SNACK,\n dinner: DINNER,\n \"pre-bed\": LATE_SNACK,\n };\n}\n\nexport function calculateLegacyMacroDistribution(\n userProfile: UserProfile,\n energyBalance: number,\n desiredMealMoments: DesiredMealMoments\n): MacroDistribution {\n const legacyRecommendedMacros = getRecommendedDailyMacronutrientIntake(userProfile, energyBalance);\n if (!legacyRecommendedMacros) throw new Error(\"This should never happen\");\n\n const legacyPreferences = convertToLegacyMealPreferences(desiredMealMoments);\n\n const calculatedLegacyMeals = computeMacroDistribution(legacyRecommendedMacros, legacyPreferences);\n\n return calculatedLegacyMeals;\n}\n\nconst convertLegacyMealMacrosToMealSlotSpecification = ([key, calculatedMacros]: [\n key: LegacyMealType | \"total\",\n calculatedMacros: Macros\n]): MealSlotSpecification | undefined => {\n if (key === \"total\") {\n return undefined;\n }\n if (![\"breakfast\", \"lunch\", \"snack\", \"dinner\", \"pre-bed\"].includes(key)) {\n throw new Error(`Bad type for key: ${String(key)}`);\n }\n\n const order = convertLegacyMacrosToOrdering(key);\n\n const { calories, protein, carbs, fat } = calculatedMacros;\n return {\n kcal: calories,\n protein,\n carbohydrates: carbs,\n fat,\n\n meal_type: convertLegacyMealTypeToMealType(key),\n order,\n meal_moment: convertMealSlotSpecificationOrderToMealMoment(order),\n\n // NOTE: These are required by the type but cannot yet be populated\n id: -1,\n nutrition_day_plan: -1,\n };\n};\n\nfunction convertLegacyMacrosToMealSlotSpecifications(legacyMacros: MacroDistribution): MealSlotSpecification[] {\n const mealSlotSpecifications = Object.entries(legacyMacros.meals)\n // NOTE: Object.entries doesn't realise the key's type is narrower than a string\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .map(convertLegacyMealMacrosToMealSlotSpecification)\n .filter((mss) => mss && mss.kcal && mss.kcal > 0);\n\n // NOTE: The compiler doesn't realise that undefined values are not possible\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return mealSlotSpecifications;\n}\n\nexport function calculateNutritionDayPlan(\n userProfile: UserProfile,\n energyBalance: number,\n desiredMealMoments: DesiredMealMoments = DEFAULT_MEAL_MOMENT_PREFERENCES\n): MealSlotSpecification[] {\n const calculatedLegacyMeals = calculateLegacyMacroDistribution(userProfile, energyBalance, desiredMealMoments);\n\n return convertLegacyMacrosToMealSlotSpecifications(calculatedLegacyMeals);\n}\n\n/*\n * Functions required in our create nutrition day plan flow\n */\n\nexport function getMealTypeFromLegacyMealMoment(legacy: PossibleMealMoment): MealTypeEnum {\n switch (legacy) {\n case \"BREAKFAST\":\n return \"BREAKFAST\";\n case \"LUNCH\":\n return \"LUNCH\";\n case \"DINNER\":\n return \"DINNER\";\n case \"SNACK\":\n case \"LATE_SNACK\":\n return \"SNACK\";\n default:\n throw new Error(`Unknown legacy meal moment: ${String(legacy)}`);\n }\n}\n","function calculateWeightAtGivenBMI(heightInCm: number, bmi: number): number {\n return (heightInCm / 100) ** 2 * bmi;\n}\n\nexport function calculateMinimumHealthyWeight(heightInCm: number): number {\n const MINIMUM_HEALTHY_BMI = 18.5;\n return calculateWeightAtGivenBMI(heightInCm, MINIMUM_HEALTHY_BMI);\n}\n\n/**\n * https://en.wikipedia.org/wiki/Harris%E2%80%93Benedict_equation\n *\n * @param weight\n * @param height\n * @param age\n * @param isMale\n * @returns\n */\nexport function harrisBenedictBMR(weight: number, height: number, age: number, isMale: boolean): number {\n if (isMale) {\n return 66 + 13.7 * weight + 5 * height - 6.8 * age;\n }\n\n return 655 + 9.6 * weight + 1.8 * height - 4.6 * age;\n}\n\n/**\n * https://en.wikipedia.org/wiki/Basal_metabolic_rate#BMR_estimation_formulas\n * https://reference.medscape.com/calculator/846/mifflin-st-jeor-equation\n *\n * @param weight\n * @param height\n * @param age\n * @param isMale\n * @returns\n */\nexport function mifflinStJoerRMR(weight: number, height: number, age: number, isMale: boolean): number {\n if (isMale) {\n return 10 * weight + 6.25 * height - 5 * age + 5;\n }\n return 10 * weight + 6.25 * height - 5 * age - 161;\n}\n","import { isLowProteinOrganisation } from \"../helpers/userHelpers\";\nimport type { DayOfWeekString } from \"../types\";\nimport type { DietEnum, GenderEnum, MealMomentEnum, SustainabilityEnum } from \"./backendTypes\";\n\ntype LegacyMealType = \"breakfast\" | \"lunch\" | \"snack\" | \"dinner\" | \"pre-bed\";\nconst mealTypes: LegacyMealType[] = [\"breakfast\", \"lunch\", \"snack\", \"dinner\", \"pre-bed\"];\n\ntype LegacyMacroType = \"calories\" | \"protein\" | \"fat\" | \"carbs\" | \"fiber\";\nconst legacyMacroTypes: LegacyMacroType[] = [\"calories\", \"protein\", \"fat\", \"carbs\", \"fiber\"];\n\ntype Macros = {\n [M in LegacyMacroType]: number;\n};\n\nexport type LegacyMealState = {\n legacyMealType: LegacyMealType;\n mealMoment: MealMomentEnum;\n size: number;\n macros?: Macros;\n enabled: boolean;\n};\n\nexport type DaysForNutritionPlan = {\n [D in DayOfWeekString]: boolean;\n};\n\nexport type LegacyInput = {\n id?: number;\n name: string;\n computedDailyMacros: Macros;\n adjustedDailyMacros?: Macros;\n energyBalance: string;\n meals: LegacyMealState[];\n days: DaysForNutritionPlan;\n};\n\nexport type LegacyBodyStats = {\n gender: GenderEnum;\n weight: number;\n bodyFatPerc: number;\n leanBodyMass: number;\n tdee: number;\n bmr: number;\n ree: number;\n};\n\nexport type LegacyFoodPreferences = {\n diet: DietEnum;\n optimize: SustainabilityEnum;\n // intolerances: Intolerance[];\n};\n\nconst isValidSize = (total: number): boolean => Math.abs(total - 100) < 1e-3;\n\nconst computeTotalSize = (meals: LegacyMealState[]): number => {\n let totalSize = 0;\n meals.forEach((m) => {\n if (!m.enabled) return;\n totalSize += m.size;\n });\n\n return Math.round(totalSize);\n};\n\nexport const emptyMacros = (): Macros => ({\n calories: 0,\n protein: 0,\n fat: 0,\n carbs: 0,\n fiber: NaN,\n});\n\nconst roundMacros = (macros: Macros): Macros => ({\n calories: Math.round(macros.calories),\n protein: Math.round(macros.protein),\n fat: Math.round(macros.fat),\n carbs: Math.round(macros.carbs),\n fiber: Math.round(macros.fiber),\n});\n\nconst scaleMacros = (macros: Macros, scale: number): Macros => {\n const result = { calories: 0, protein: 0, fat: 0, carbs: 0, fiber: 0 };\n legacyMacroTypes.forEach((type) => {\n const macro = macros[type];\n result[type] = Number.isNaN(macro) ? 0 : scale * macro;\n });\n return result;\n};\n\nfunction computeCalories(macros: Macros): number {\n const factors = {\n calories: NaN,\n protein: 4,\n fat: 9,\n carbs: 4,\n fiber: 2,\n };\n return legacyMacroTypes\n .filter((key) => key !== \"calories\")\n .map((type) => factors[type] * macros[type])\n .filter((x) => !Number.isNaN(x))\n .reduce((a, b) => a + b, 0);\n}\n\nconst updateCalories = (macros: Macros): Macros => ({\n ...macros,\n calories: computeCalories(macros),\n});\n\nconst scaleMealMacros = (meals: LegacyMealState[], daily: Macros): Macros[] => {\n const scaled = meals.map((m) => emptyMacros());\n\n const total = computeTotalSize(meals);\n\n const lastEnabled = meals.map((m) => m.enabled && m.size > 0).lastIndexOf(true);\n\n meals.forEach((m, i) => {\n if (!m.enabled) return;\n\n // Scale the macros using the meal size. Except for the last enabled meal.\n // When the total meal size is not valid, use the scaled version since the\n // remaining macros do not add up to 100%.\n if (i !== lastEnabled || !isValidSize(total)) {\n const macros = roundMacros(scaleMacros(daily, m.size / 100));\n // Re-compute the calories based on the rounded macros. The scaled number\n // of calories is not necessarily the same as the sum of the rounded\n // macros.\n scaled[i] = updateCalories(macros);\n return;\n }\n\n // Subtract all meal macros from total macros. Use the remaining macros for\n // the last enabled meal. This is needed to avoid accumulating rounding\n // errors caused by macro values that are rounded up or down. Subtracting\n // the previous macros from the daily total implies that all macros add up\n // to the total daily macros.\n const rest: Macros = { ...daily };\n\n scaled.forEach((macros) => {\n legacyMacroTypes.forEach((type) => {\n rest[type] -= macros[type];\n });\n });\n\n scaled[i] = rest;\n });\n\n return scaled;\n};\n\nexport const computeTotalMacros = (meals: LegacyMealState[]): Macros => {\n const total: Macros = {\n calories: 0,\n protein: 0,\n fat: 0,\n carbs: 0,\n fiber: NaN,\n };\n\n meals.forEach((m) => {\n if (!m.enabled) return;\n\n legacyMacroTypes.forEach((type) => {\n total[type] += m.macros ? m.macros[type] : 0;\n });\n });\n\n return total;\n};\n\nconst defaultSizes = {\n snack: 10,\n prebed: 20,\n dinnerHigh: 50,\n dinnerMid: 40,\n dinnerLow: 30,\n};\n\nexport const rebalanceSizes = (meals: LegacyMealState[]): LegacyMealState[] => {\n let total = 100;\n\n const counts: { [M in LegacyMealType]: number } = {\n breakfast: 0,\n lunch: 0,\n snack: 0,\n dinner: 0,\n \"pre-bed\": 0,\n };\n // mealTypes.forEach((m) => {\n // counts[m] = 0;\n // });\n\n meals.forEach((m) => {\n if (!m.enabled) return;\n counts[m.legacyMealType] += 1;\n });\n\n // First, subtract the snacks and prebed from the total.\n total -= (counts.snack || 0) * defaultSizes.snack;\n total -= (counts[\"pre-bed\"] || 0) * defaultSizes.prebed;\n\n // Determine dinner size. High size when breakfast and lunch are omitted.\n // Mid size is used when one but not both are defined. Else, use low size.\n let dinnerSize = defaultSizes.dinnerLow;\n if (!counts.lunch && !counts.breakfast) {\n dinnerSize = total;\n // eslint-disable-next-line no-bitwise\n } else if (counts.lunch ^ counts.breakfast || total >= 90) {\n dinnerSize = defaultSizes.dinnerMid;\n }\n\n total -= (counts.dinner || 0) * dinnerSize;\n\n // Split remaining total over breakfast and/or lunch.\n let remainingSize = 0;\n if (counts.lunch || counts.breakfast) {\n remainingSize = total / (counts.lunch + counts.breakfast);\n }\n\n return meals.map((m) => {\n if (!m.enabled) return { ...m, size: 0, macros: emptyMacros() };\n\n const size = {\n // Lunch and breakfast split the remaining total.\n breakfast: remainingSize,\n lunch: remainingSize,\n\n dinner: dinnerSize,\n\n \"pre-bed\": defaultSizes.prebed,\n snack: defaultSizes.snack,\n }[m.legacyMealType];\n\n return {\n ...m,\n size,\n };\n });\n};\n\nexport const getDefaultMeals = (): LegacyMealState[] =>\n rebalanceSizes([\n {\n legacyMealType: \"breakfast\",\n mealMoment: \"BREAKFAST\",\n size: 25,\n enabled: true,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"snack\",\n mealMoment: \"MORNING_SNACK\",\n size: 0,\n enabled: false,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"lunch\",\n mealMoment: \"LUNCH\",\n size: 30,\n enabled: true,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"snack\",\n mealMoment: \"AFTERNOON_SNACK\",\n size: 5,\n enabled: true,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"dinner\",\n mealMoment: \"DINNER\",\n size: 40,\n enabled: true,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"snack\",\n mealMoment: \"SNACK\",\n size: 0,\n enabled: false,\n macros: emptyMacros(),\n },\n {\n legacyMealType: \"pre-bed\",\n mealMoment: \"LATE_SNACK\",\n size: 0,\n enabled: false,\n macros: emptyMacros(),\n },\n ]);\n\nconst computeOptimalProtein = ({\n bodyFatPerc,\n weight,\n gender,\n leanBodyMass,\n optimize,\n}: {\n gender: GenderEnum;\n weight: number;\n bodyFatPerc: number;\n leanBodyMass: number;\n optimize: SustainabilityEnum;\n}): number => {\n const lbm = leanBodyMass;\n\n const lowProtein = isLowProteinOrganisation();\n\n // Default to this protein\n let factor = {\n MALE: 1.6,\n FEMALE: 1.5,\n }[gender];\n\n // https://www.healthcouncil.nl/documents/advisory-reports/2021/03/02/dietary-reference-values-for-proteins\n const proteinPerKg = 0.83;\n\n const leanBodyMassRatio = lbm / weight;\n\n // NOTE: This will be naturally different for males vs females\n const proteinPerLbm = proteinPerKg / leanBodyMassRatio;\n\n if (lowProtein) {\n factor = {\n MALE: proteinPerLbm,\n FEMALE: proteinPerLbm,\n }[gender];\n }\n\n // D16 is 'yes' or 'no'.\n // B15 = IF(D16=\"yes\",2*'CEE'!B13,1.8*'CEE'!B11)\n const constrain =\n bodyFatPerc >\n {\n MALE: 0.2, // if male and bf% > 20%: constrain protein\n FEMALE: 0.3, // if female and bf% > 30%: constrain protein\n }[gender];\n\n let protein = factor * weight;\n\n if (constrain && !lowProtein) protein = 2 * lbm;\n\n return protein;\n};\n\nconst computeOptimalFat = ({\n gender,\n bmr,\n ree,\n optimize,\n}: {\n gender: GenderEnum;\n bmr: number;\n ree: number;\n optimize: SustainabilityEnum;\n}): number => {\n // B17 = if(B16=\"Male\",('CEE'!B39*0.4)/9,('CEE'!B41*0.4)/9)\n let factor;\n if (optimize === \"SUSTAINABLE\") factor = 0.25;\n else factor = 0.4;\n\n let fat;\n if (gender === \"MALE\") {\n fat = (bmr * factor) / 9;\n } else {\n fat = (ree * factor) / 9;\n }\n\n return fat;\n};\n\nconst computeDailyMacros = ({\n tdee,\n energyBalance,\n diet,\n gender,\n weight,\n bodyFatPerc,\n leanBodyMass,\n bmr,\n ree,\n optimize,\n}: {\n tdee: number;\n energyBalance: string;\n diet: DietEnum;\n gender: GenderEnum;\n weight: number;\n bodyFatPerc: number;\n leanBodyMass: number;\n bmr: number;\n ree: number;\n optimize: SustainabilityEnum;\n}): Macros => {\n const energyBalanceValue = parseFloat(energyBalance) / 100;\n if (Number.isNaN(energyBalanceValue)) {\n return {\n calories: NaN,\n protein: NaN,\n fat: NaN,\n carbs: NaN,\n fiber: NaN,\n };\n }\n\n const calories = tdee * energyBalanceValue;\n\n const optimal = {\n protein: computeOptimalProtein({\n gender,\n weight,\n bodyFatPerc,\n leanBodyMass,\n optimize,\n }),\n fat: computeOptimalFat({ gender, bmr, ree, optimize }),\n };\n\n const fatAdjustmentFactor = calories > 2800 ? calories / 2600 : 1;\n\n // B28 = if(D21=\"Vegan\",B15*(2.2/1.8),if(D21=\"Vegetarian\",B15*(2/1.8),B15))\n // TODO use 2.2 for vegan when lysine supplements are taken.\n const proteinFactor = {\n VEGAN: 2.4 / 1.8,\n VEGETARIAN: 2 / 1.8,\n OVO_VEGETARIAN: 2 / 1.8,\n LACTO_VEGETARIAN: 2 / 1.8,\n PESCATARIAN: 1,\n OMNIVORE: 1,\n HALAL: 1,\n }[diet];\n\n const protein = Math.round(optimal.protein * proteinFactor);\n\n // TODO Implement keto or obese adjustment?\n // B27 = if(B21=0,(B12-(4*B15)-(9*B17))/4,B22)*(1/B13)\n let carbs = Math.round((calories - 4 * protein - 9 * optimal.fat) / 4 / fatAdjustmentFactor);\n\n const keto = false;\n if (keto) carbs = 90;\n\n // TODO Implement fat adjustment?\n // B29 = if(B23=0,B17+((B12-(4*B27)-(4*B28))/9-B17),B24)\n const fat = Math.round((calories - 4 * carbs - 4 * protein) / 9);\n\n return {\n calories: Math.round(carbs * 4 + protein * 4 + fat * 9),\n protein,\n fat,\n carbs,\n fiber: NaN,\n };\n};\n\n// const clearAdjustedDailyMacros = (input: LegacyInput): LegacyInput => {\n// const {\n// // Clear adjustedDailyMacros by removing it from the input object.\n// // eslint-disable-next-line no-unused-vars\n// adjustedDailyMacros,\n// ...other\n// } = input;\n// return other;\n// };\n\nexport const updateDailyMacros = (\n input: LegacyInput,\n stats: LegacyBodyStats,\n prefs: LegacyFoodPreferences\n): LegacyInput => {\n const daily =\n input.adjustedDailyMacros ||\n computeDailyMacros({\n energyBalance: input.energyBalance,\n ...stats,\n ...prefs,\n });\n\n const scaled = scaleMealMacros(input.meals, daily);\n\n return {\n ...input,\n computedDailyMacros: daily,\n meals: input.meals.map((m, i) => ({ ...m, macros: scaled[i] })),\n };\n};\n","/*\n * Functions required in our create nutrition day plan flow\n */\n\nimport { body_measurement as bodyMeasurement } from \"health-calculator\";\nimport { Gender as HealthCalculatorGender } from \"health-calculator/lib/util\";\nimport _ from \"lodash\";\n\nimport { harrisBenedictBMR, mifflinStJoerRMR } from \"../helpers/fitnessCalculationHelpers\";\nimport { formatNumberAsWholeNumber } from \"../helpers/generalHelpers\";\nimport type { OnboardingState } from \"../slices/onboardingSlice\";\nimport { NUTRITION_PLAN_WITHOUT_ID } from \"../slices/userSlice\";\nimport { ActivityEnum } from \"../types\";\nimport type { MealMomentEnum, MealSlotSpecification, NutritionDayPlan, UserProfile } from \"./backendTypes\";\nimport { computeCalories, computeEnergyExpenditure, EnergyExpenditure, Macros } from \"./legacyNutritionCalculations\";\nimport {\n DaysForNutritionPlan,\n emptyMacros,\n getDefaultMeals,\n LegacyBodyStats,\n LegacyFoodPreferences,\n LegacyInput,\n LegacyMealState,\n updateDailyMacros,\n} from \"./legacyNutritionCalculations7\";\nimport {\n calculateEnergyExpenditure,\n convertLegacyMealTypeToMealType,\n convertMealTypeToLegacyMealType,\n getEnergyInput,\n getRecommendedDailyMacronutrientIntake,\n} from \"./nutritionCalculations\";\n\nexport const DEFAULT_NUTRITION_PLAN_NAME = \"Standard\";\n\n/*\n * Translation layer functions\n */\n\nfunction convertEnergyBalanceFloatToString(energyBalance: number): string {\n return String(energyBalance * 100);\n}\n\nfunction convertToLegacyInput(\n userProfile: UserProfile,\n daysForNutritionPlan: DaysForNutritionPlan,\n name: string\n): LegacyInput {\n const energyBalanceFloat = 1;\n\n const computedDailyMacros = getRecommendedDailyMacronutrientIntake(userProfile, energyBalanceFloat);\n\n if (!computedDailyMacros) {\n throw new Error(\"Could not calculate daily macros\");\n }\n\n return {\n id: NUTRITION_PLAN_WITHOUT_ID,\n name,\n computedDailyMacros,\n energyBalance: convertEnergyBalanceFloatToString(energyBalanceFloat),\n meals: getDefaultMeals(),\n days: daysForNutritionPlan,\n };\n}\n\nfunction calculateEnergyExpenditureWithoutBodyFat(onboardingState: OnboardingState): EnergyExpenditure {\n if (!onboardingState.biometricData.age) {\n throw new Error(\"Cannot calculate energy expenditure without age\");\n }\n if (!onboardingState.physicalStats.weightInKg) {\n throw new Error(\"Cannot calculate energy expenditure without weight\");\n }\n if (!onboardingState.physicalStats.heightInCm) {\n throw new Error(\"Cannot calculate energy expenditure without height\");\n }\n\n const bmrHarrisBenedict = harrisBenedictBMR(\n onboardingState.physicalStats.weightInKg,\n onboardingState.physicalStats.heightInCm,\n onboardingState.biometricData.age,\n onboardingState.biometricData.gender === \"MALE\"\n );\n\n const rmrMifflinStJour = mifflinStJoerRMR(\n onboardingState.physicalStats.weightInKg,\n onboardingState.physicalStats.heightInCm,\n onboardingState.biometricData.age,\n onboardingState.biometricData.gender === \"MALE\"\n );\n\n const bmi = bodyMeasurement.bmi(onboardingState.physicalStats.weightInKg, onboardingState.physicalStats.heightInCm);\n const bodyFatPercentage =\n bodyMeasurement.bfp(\n onboardingState.biometricData.gender === \"MALE\" ? HealthCalculatorGender.Male : HealthCalculatorGender.Female,\n onboardingState.biometricData.age,\n bmi\n ) / 100.0;\n\n const leanBodyMassInKg =\n onboardingState.physicalStats.weightInKg - onboardingState.physicalStats.weightInKg * bodyFatPercentage;\n\n /**\n * Katch-McArdle multipliers\n * https://www.nasm.org/resources/calorie-calculator\n */\n let physicalActivityLevel = 1.2;\n\n switch (onboardingState.activityLevel) {\n case ActivityEnum.SEDENTARY:\n physicalActivityLevel = 1.2;\n break;\n case ActivityEnum.MILDLY_ACTIVE:\n physicalActivityLevel = 1.375;\n break;\n case ActivityEnum.ACTIVE:\n physicalActivityLevel = 1.55;\n break;\n case ActivityEnum.VERY_ACTIVE:\n physicalActivityLevel = 1.725;\n break;\n default:\n break;\n }\n\n const activityCalories = rmrMifflinStJour * (physicalActivityLevel - 1);\n\n const total = rmrMifflinStJour + activityCalories;\n\n return {\n leanBodyMass: leanBodyMassInKg,\n daily: {\n bmr: bmrHarrisBenedict,\n ree: rmrMifflinStJour,\n lifestyle: activityCalories,\n cardio: 0,\n weightlifting: 0,\n foodDigestion: 0,\n total,\n },\n };\n}\n\nfunction convertToLegacyBodyStats(userProfile: UserProfile, onboardingState?: OnboardingState): LegacyBodyStats {\n let legacyEnergyExpenditure = computeEnergyExpenditure(getEnergyInput(userProfile));\n\n const doNotUseBodyFatToCalculate = Boolean(onboardingState);\n\n if (doNotUseBodyFatToCalculate) {\n if (!onboardingState) {\n throw new Error(\"Cannot calculate energy expenditure without onboarding state\");\n }\n\n legacyEnergyExpenditure = calculateEnergyExpenditureWithoutBodyFat(onboardingState);\n }\n\n if (!legacyEnergyExpenditure) {\n throw new Error(\"Could not calculate energy expenditure\");\n }\n\n return {\n gender: userProfile.gender,\n weight: userProfile.weight,\n bodyFatPerc: userProfile.body_fat_percentage,\n leanBodyMass: legacyEnergyExpenditure?.leanBodyMass,\n tdee: legacyEnergyExpenditure?.daily.total,\n bmr: legacyEnergyExpenditure?.daily.bmr,\n ree: legacyEnergyExpenditure?.daily.ree,\n };\n}\n\nfunction convertToLegacyFoodPreferences(userProfile: UserProfile): LegacyFoodPreferences {\n return {\n diet: userProfile.diet,\n optimize: userProfile.sustainability,\n };\n}\n\nexport function getDefaultLegacyInput(\n userProfile: UserProfile,\n daysForNutritionPlan: DaysForNutritionPlan,\n name: string\n): LegacyInput {\n const legacyInput = convertToLegacyInput(userProfile, daysForNutritionPlan, name);\n\n const legacyBodyStats = convertToLegacyBodyStats(userProfile);\n const legacyFoodPreferences = convertToLegacyFoodPreferences(userProfile);\n\n return updateDailyMacros(legacyInput, legacyBodyStats, legacyFoodPreferences);\n}\n\nexport function updateLegacyInput(\n legacyInput: LegacyInput,\n userProfile: UserProfile,\n onboardingState?: OnboardingState\n): LegacyInput {\n const legacyBodyStats = convertToLegacyBodyStats(userProfile, onboardingState);\n const legacyFoodPreferences = convertToLegacyFoodPreferences(userProfile);\n\n return updateDailyMacros(legacyInput, legacyBodyStats, legacyFoodPreferences);\n}\n\nfunction createMealSlotSpecificationFromLegacyMealState(\n legacyMealState: LegacyMealState,\n index: number\n): MealSlotSpecification | undefined {\n const { legacyMealType, macros, mealMoment, enabled } = legacyMealState;\n\n if (!macros) return undefined;\n\n const { calories, protein, carbs, fat } = macros;\n return {\n kcal: calories,\n protein,\n carbohydrates: carbs,\n fat,\n\n meal_type: convertLegacyMealTypeToMealType(legacyMealType),\n meal_moment: mealMoment,\n order: index,\n\n // NOTE: These are required by the type but cannot yet be populated\n id: -1,\n nutrition_day_plan: -1,\n };\n}\n\n/*\n * Functions required in our create nutrition day plan flow\n */\n\nexport function convertToMealSlotSpecifications(meals: LegacyMealState[]): MealSlotSpecification[] {\n let rawMealSlotSpecificationsWithoutOrder = meals\n .filter((meal) => meal.enabled)\n .map((mss, index) => createMealSlotSpecificationFromLegacyMealState(mss, index));\n rawMealSlotSpecificationsWithoutOrder = rawMealSlotSpecificationsWithoutOrder.filter(Boolean);\n\n // Add order field to each meal slot specification\n const mealSlotSpecifications = rawMealSlotSpecificationsWithoutOrder.map((mealSlotSpecification, index) => ({\n ...mealSlotSpecification,\n order: index,\n }));\n\n // NOTE: The compiler doesn't realise that there cannot be any undefined values in the array\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return mealSlotSpecifications;\n}\n\nexport function getLegacyInputFromMealSlotSpecifications(\n nutritionDayPlan: NutritionDayPlan,\n intake: UserProfile,\n daysForNutritionPlan: DaysForNutritionPlan\n): LegacyInput {\n const mealSlotSpecifications = nutritionDayPlan.meal_slot_specifications;\n const energyExpenditure = calculateEnergyExpenditure(intake);\n\n if (!energyExpenditure) {\n return getDefaultLegacyInput(intake, daysForNutritionPlan, nutritionDayPlan.name || DEFAULT_NUTRITION_PLAN_NAME);\n }\n\n const totalEnergy = _.sumBy(mealSlotSpecifications, \"kcal\");\n const legacyDailyMacros = {\n calories: totalEnergy,\n protein: _.sumBy(mealSlotSpecifications, \"protein\"),\n carbs: _.sumBy(mealSlotSpecifications, \"carbohydrates\"),\n fat: _.sumBy(mealSlotSpecifications, \"fat\"),\n fiber: 0,\n };\n\n const energyBalanceString = formatNumberAsWholeNumber((totalEnergy / energyExpenditure.daily.total) * 100);\n\n const MEAL_MOMENTS: MealMomentEnum[] = [\n \"BREAKFAST\",\n \"MORNING_SNACK\",\n \"LUNCH\",\n \"AFTERNOON_SNACK\",\n \"DINNER\",\n \"SNACK\",\n \"LATE_SNACK\",\n ];\n\n const createLegacyMealState = (mealMoment: MealMomentEnum): LegacyMealState => {\n const mealSlotSpecification = _.find(mealSlotSpecifications, { meal_moment: mealMoment });\n\n if (!mealSlotSpecification) {\n return {\n legacyMealType: convertMealTypeToLegacyMealType(mealMoment),\n mealMoment,\n size: 0,\n enabled: false,\n macros: emptyMacros(),\n };\n }\n\n const { kcal: calories, protein, carbohydrates: carbs, fat } = mealSlotSpecification;\n return {\n macros: {\n calories: calories || 0,\n protein: protein || 0,\n carbs: carbs || 0,\n fat: fat || 0,\n fiber: 0,\n },\n mealMoment,\n enabled: true,\n size: ((calories || 0) / totalEnergy) * 100,\n legacyMealType: convertMealTypeToLegacyMealType(mealMoment),\n };\n };\n const legacyMeals = MEAL_MOMENTS.map(createLegacyMealState);\n\n return {\n id: NUTRITION_PLAN_WITHOUT_ID,\n name: nutritionDayPlan.name || DEFAULT_NUTRITION_PLAN_NAME,\n computedDailyMacros: legacyDailyMacros,\n // NOTE: We have to populate `adjustedDailyMacros` to ensure any coach-inputted difference is preserved\n adjustedDailyMacros: legacyDailyMacros,\n energyBalance: energyBalanceString,\n meals: legacyMeals,\n days: daysForNutritionPlan,\n };\n}\n\nexport function getLegacyInputFromNutritionPlan(\n intake: UserProfile,\n nutritionDayPlan: NutritionDayPlan,\n daysForNutritionPlan: DaysForNutritionPlan\n): LegacyInput {\n if (!intake.weekly_nutrition_plan) {\n return getDefaultLegacyInput(intake, daysForNutritionPlan, nutritionDayPlan.name || DEFAULT_NUTRITION_PLAN_NAME);\n }\n\n return getLegacyInputFromMealSlotSpecifications(nutritionDayPlan, intake, daysForNutritionPlan);\n}\n\nexport const getUpdatedMealSlotSpecificationsFromFormValues = (\n values: {\n [x: string]: {\n protein: number;\n carbs: number;\n fat: number;\n };\n },\n meals: LegacyMealState[]\n): { updatedLegacyMealStateArray: LegacyMealState[]; updatedMealSlotSpecifications: MealSlotSpecification[] } => {\n const updateLegacyMealState = (legacyMealState: LegacyMealState): LegacyMealState => {\n const updatedMacros = values[legacyMealState.mealMoment];\n if (!updatedMacros) {\n return legacyMealState;\n }\n\n return {\n ...legacyMealState,\n macros: legacyMealState.macros\n ? {\n fat: updatedMacros.fat ? parseFloat(String(updatedMacros.fat)) : 0,\n protein: updatedMacros.protein ? parseFloat(String(updatedMacros.protein)) : 0,\n carbs: updatedMacros.carbs ? parseFloat(String(updatedMacros.carbs)) : 0,\n fiber: 0,\n\n // NOTE: Yup & Formik don't always play nicely with typescript\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n calories: computeCalories(updatedMacros) || 0,\n }\n : undefined,\n };\n };\n\n const updatedMeals = _.map(meals, updateLegacyMealState).filter((legacyMealState) => legacyMealState.enabled);\n const updatedMealSlotSpecifications = convertToMealSlotSpecifications(updatedMeals);\n\n return { updatedLegacyMealStateArray: updatedMeals, updatedMealSlotSpecifications };\n};\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n questionMarkImg: {\n width: Scale(21),\n height: Scale(21),\n },\n recipeMacrosContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n externalContainer: {\n backgroundColor: \"white\",\n // borderColor: Colors.disableButton,\n borderWidth: 1,\n marginTop: VerticalScale(10),\n marginLeft: 0,\n marginRight: 0,\n },\n deactiveButton: {\n backgroundColor: \"transparent\",\n // borderColor: Colors.greyTextColor,\n borderWidth: 1,\n marginTop: VerticalScale(10),\n marginLeft: 0,\n marginRight: 0,\n },\n routeViewContainer: {\n marginVertical: VerticalScale(24),\n marginHorizontal: Scale(16),\n borderRadius: 8,\n },\n marginTop24: {\n marginTop: VerticalScale(24),\n },\n marginVertical24: {\n marginVertical: VerticalScale(24),\n },\n settingIcon: {\n width: Scale(24),\n height: Scale(24),\n marginTop: VerticalScale(24),\n },\n modalContainer: {\n width: \"50%\",\n },\n});\n\nexport default styles;\n","import { Image, useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport Svg, { Path } from \"react-native-svg\";\nimport { useSelector } from \"react-redux\";\n\nimport { Scale, VerticalScale, width as deviceWidth } from \"../constants\";\nimport { shouldWeChangeAppToHormoneTheme } from \"../constants/theme\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport { getOrganisation } from \"../helpers/userHelpers\";\nimport type { Organisation } from \"../services/backendTypes\";\nimport { onboardingDataSelector } from \"../slices/onboardingSlice\";\nimport { userSelector } from \"../slices/userSlice\";\n\nconst LogoCurve = ({\n color,\n width,\n}: {\n color: string | undefined;\n width: number | string | undefined;\n}): JSX.Element => (\n \n \n \n);\n\ntype Props = { organisationForPreview?: Organisation | undefined; previewingOnDesktopScreen?: boolean };\nconst CustomBrandingMobileScreenHeader = (props: Props): JSX.Element => {\n const { colors } = useTheme();\n\n const user = useSelector(userSelector);\n const onboardingData = useSelector(onboardingDataSelector);\n\n if (!user) {\n return <>;\n }\n\n const organisation = props?.organisationForPreview || getOrganisation(user);\n\n if (!organisation || !organisation.logo_visible) return <>;\n\n const isHormoneFeatureFlagActive = isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES);\n const isKillerBodyOrganisation = organisation.subdomain === \"killerbody\";\n const shouldUseHormoneLogo =\n isHormoneFeatureFlagActive && shouldWeChangeAppToHormoneTheme(user, onboardingData) && isKillerBodyOrganisation;\n const logoSource = shouldUseHormoneLogo\n ? // TODO: We should replace this require\n // eslint-disable-next-line global-require\n require(\"../resources/killerbody_hormone_logo.png\")\n : { uri: organisation.logo };\n\n return (\n \n {organisation.logo || shouldUseHormoneLogo ? (\n \n ) : (\n \n )}\n {!props?.previewingOnDesktopScreen ? (\n \n {!organisation.disable_logo_curve && (\n \n )}\n \n ) : null}\n \n );\n};\nexport default CustomBrandingMobileScreenHeader;\n","import { Scale } from \".\";\n\nexport const FontSize = {\n h1: Scale(30),\n h2: Scale(28),\n h3: Scale(26),\n h4: Scale(24),\n h5: Scale(22),\n h6: Scale(20),\n title: Scale(18),\n body: Scale(16),\n label: Scale(15),\n small: Scale(14),\n mini: Scale(12),\n micro: Scale(11),\n};\n\nexport const FontFamily = {\n regular: \"DMSans_400Regular\",\n medium: \"DMSans_500Medium\",\n bold: \"DMSans_700Bold\",\n};\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport _ from \"lodash\";\nimport moment, { Moment } from \"moment\";\nimport { Icon, IconButton, Text, View } from \"native-base\";\nimport React from \"react\";\nimport type { TFunction } from \"react-i18next\";\nimport type { AbstractChartConfig } from \"react-native-chart-kit/dist/AbstractChart\";\nimport { Row as TableRow, Table } from \"react-native-table-component\";\n\nimport type { UserDistance, UserSleep, UserStress, UserWeight } from \"../services/backendTypes\";\nimport type { UserDistancesByDate, UserSleepsByDate, UserStressByDate, UserWeightsByDate } from \"../slices/userSlice\";\nimport { MeasurementType, Stress } from \"../types\";\nimport { formatMomentAsBackendFormatDateString, formatNumberAsDecimal } from \"./generalHelpers\";\nimport { getLatestMeasurementForDate } from \"./userHelpers\";\n\ntype UserMeasurementsByDate = UserWeightsByDate | UserSleepsByDate | UserStressByDate | UserDistancesByDate;\ntype UserMeasurement = UserWeight | UserSleep | UserStress | UserDistance;\ntype UserMeasurementArray = UserWeight[] | UserSleep[] | UserStress[] | UserDistance[];\n\ntype PaddedDataPointsArray = (number | null | undefined)[];\n\nconst DATE_FORMAT_FOR_DATE_IN_SHORT_PERIOD = \"D MMM\";\nconst DATE_FORMAT_FOR_DATE_IN_LONG_PERIOD = \"MMM YY\";\n/**\n * Return an array of 4 dates (format \"D MMM\") that are evenly spaced out across the chart\n *\n * @returns {[string, string][]}\n */\nexport const createChartLabelsForLineChart = (numDaysInChart: number): string[] => {\n const fourQuartileIndices = [0, Math.floor(numDaysInChart / 4), Math.floor(numDaysInChart / 2), numDaysInChart];\n\n return fourQuartileIndices.map((index) => {\n const date = moment().subtract(numDaysInChart - index, \"days\");\n\n return date.format(\n numDaysInChart > 60 ? DATE_FORMAT_FOR_DATE_IN_LONG_PERIOD : DATE_FORMAT_FOR_DATE_IN_SHORT_PERIOD\n );\n });\n};\n\nexport const createChartLabelsForBarChart = (numDaysInChart: number): string[] => {\n if (numDaysInChart < 8) {\n return _.range(numDaysInChart).map((index) => {\n const date = moment().subtract(numDaysInChart - index, \"days\");\n\n return date.format(DATE_FORMAT_FOR_DATE_IN_SHORT_PERIOD);\n });\n }\n return createChartLabelsForLineChart(numDaysInChart);\n};\n\nexport const PROGRESS_CHART_CONFIG: AbstractChartConfig = {\n backgroundGradientFrom: \"white\",\n backgroundGradientTo: \"white\",\n useShadowColorFromDataset: true, // optional\n propsForBackgroundLines: {\n strokeDasharray: \"\", // solid background lines with no dashes\n stroke: \"#EDF4F7\",\n strokeWidth: \"1\",\n },\n propsForLabels: {\n fontFamily: \"HelveticaNeue-Light\",\n fontSize: 10,\n },\n};\n\nexport const BAR_CHART_CONFIG: AbstractChartConfig = {\n barPercentage: 0.5,\n useShadowColorFromDataset: false,\n};\n\nexport enum TimePeriod {\n LAST_WEEK = \"LAST_WEEK\",\n LAST_2_WEEKS = \"LAST_2_WEEKS\",\n LAST_MONTH = \"LAST_MONTH\",\n LAST_2_MONTHS = \"LAST_2_MONTHS\",\n SINCE_BEGINNING = \"SINCE_BEGINNING\",\n}\n\nconst NUM_DAYS_FOR_TIME_PERIOD: {\n [key in TimePeriod]: number;\n} = {\n [TimePeriod.LAST_WEEK]: 7,\n [TimePeriod.LAST_2_WEEKS]: 14,\n [TimePeriod.LAST_MONTH]: 30,\n [TimePeriod.LAST_2_MONTHS]: 60,\n [TimePeriod.SINCE_BEGINNING]: 0,\n};\n\nfunction getSortedDates(userMeasurements: UserMeasurementsByDate): string[] {\n return _.sortBy(Object.keys(userMeasurements), (date) => -moment(date));\n}\n\nexport const getNumDaysInChart = (selectedTimePeriod: TimePeriod, userMeasurements: UserMeasurementsByDate): number => {\n if (selectedTimePeriod === TimePeriod.SINCE_BEGINNING && userMeasurements) {\n const sortedDates = getSortedDates(userMeasurements);\n const furthestBackDateWeHaveDataFor = sortedDates[sortedDates.length - 1];\n\n return Math.abs(moment(furthestBackDateWeHaveDataFor).diff(moment(), \"days\")) + 1;\n }\n\n return NUM_DAYS_FOR_TIME_PERIOD[selectedTimePeriod];\n};\n\nconst getStartAndEndDate = (\n selectedTimePeriod: TimePeriod,\n userMeasurements: UserMeasurementsByDate\n): {\n startDate: Moment;\n endDate: Moment;\n} => {\n const numDaysInChart = getNumDaysInChart(selectedTimePeriod, userMeasurements);\n\n return {\n startDate: moment().subtract(numDaysInChart, \"days\"),\n endDate: moment(),\n };\n};\n\nfunction isMeasurementInRange(\n userWeightMeasurementArray: T,\n date: string,\n startDate: moment.Moment,\n endDate: moment.Moment\n): boolean {\n return moment(date).isBetween(startDate, endDate, null, \"[]\");\n}\n\nfunction filterUserMeasurementsForTimePeriod(\n userWeightMeasurements: T,\n startDate: moment.Moment,\n endDate: moment.Moment\n): T {\n const isMeasurementInRangeCurried = (userMeasurementsArray: UserMeasurementArray, date: string): boolean =>\n isMeasurementInRange(userMeasurementsArray, date, startDate, endDate);\n\n return _.pickBy(userWeightMeasurements, isMeasurementInRangeCurried) as unknown as T;\n}\n\nexport function getUserMeasurementsForTimePeriod(\n selectedTimePeriod: TimePeriod,\n userMeasurements: T\n): T {\n const { startDate, endDate } = getStartAndEndDate(selectedTimePeriod, userMeasurements);\n\n return filterUserMeasurementsForTimePeriod(userMeasurements, startDate, endDate);\n}\n\nexport const getDataPointsForChart = (\n userMeasurements: UserMeasurementsByDate,\n numDaysInChart: number\n): (number | null)[] => {\n const getDataPointForHistoricDay = (numDaysInThePast: number): number | null => {\n const formattedDate = formatMomentAsBackendFormatDateString(moment().subtract(numDaysInThePast, \"days\"));\n\n return getLatestMeasurementForDate(userMeasurements, formattedDate) || null;\n };\n\n // For each day in the past 60, get the latest measurement for that day\n return _.range(numDaysInChart).map(getDataPointForHistoricDay).reverse();\n};\n\nexport const getDataPointsForChartWithNullsPadded = (\n userMeasurements: UserMeasurementsByDate,\n numDaysInChart: number\n): PaddedDataPointsArray => {\n const dataPointsForChart = getDataPointsForChart(userMeasurements, numDaysInChart);\n\n const findIndexOfNextNonNullDataPoint = (startingIndex: number): number =>\n _.findIndex(dataPointsForChart, (point) => point !== null, startingIndex);\n\n const findIndexOfPreviousNonNullDataPoint = (startingIndex: number): number =>\n _.findLastIndex(dataPointsForChart, (point) => point !== null, startingIndex);\n\n // pad null values with next non-null value - we do this for continuity on the chart\n const dataPointsForChartWithNullsPadded = dataPointsForChart.map((dataPoint, index) => {\n if (dataPoint === null) {\n const nextNonNullDataPointIndex = findIndexOfNextNonNullDataPoint(index);\n // Interpolate to the next non null value\n if (nextNonNullDataPointIndex !== -1) {\n return dataPointsForChart[nextNonNullDataPointIndex];\n }\n\n // If there is no next non null value, interpolate to the previous non null value\n const lastNonNullDataPointIndex = findIndexOfPreviousNonNullDataPoint(index);\n if (lastNonNullDataPointIndex !== -1) {\n return dataPointsForChart[lastNonNullDataPointIndex];\n }\n\n return 0;\n }\n return dataPoint;\n });\n\n return dataPointsForChartWithNullsPadded;\n};\n\nexport const getDataPointIndicesWithNoData = (dataPointsForChart: PaddedDataPointsArray): number[] => {\n const getIndexIfDataPointIsNull = (value: number, index: number): number | undefined =>\n dataPointsForChart[index] === null ? index : undefined;\n const indicesOfNullDataPoints = _.range(dataPointsForChart.length).map(getIndexIfDataPointIsNull);\n\n return _.compact(indicesOfNullDataPoints);\n};\n\nexport function getYAxisMin(dataPointsForChartWithNullsPadded: PaddedDataPointsArray): number {\n return Math.round(_.min(dataPointsForChartWithNullsPadded) || 50) - 1;\n}\n\nexport function getYAxisMax(dataPointsForChartWithNullsPadded: PaddedDataPointsArray): number {\n return Math.round(_.max(dataPointsForChartWithNullsPadded) || 140) + 1;\n}\n\nexport function getAverageChangeInMeasurementPerWeek(\n userMeasurementsForTimePeriod: T\n): {\n averageWeeklyDelta: number;\n averageWeeklyDeltaAsPercentage: number;\n} {\n const sortedDates = getSortedDates(userMeasurementsForTimePeriod);\n\n const emptyReturnObject = {\n averageWeeklyDelta: 0,\n averageWeeklyDeltaAsPercentage: 0,\n };\n\n if (sortedDates.length < 2) {\n return emptyReturnObject;\n }\n\n const firstDate = sortedDates[sortedDates.length - 1];\n const latestDate = sortedDates[0];\n\n if (firstDate === latestDate || !firstDate || !latestDate) {\n return emptyReturnObject;\n }\n\n const firstMeasurement = getLatestMeasurementForDate(userMeasurementsForTimePeriod, firstDate);\n const latestMeasurement = getLatestMeasurementForDate(userMeasurementsForTimePeriod, latestDate);\n\n if (!firstMeasurement || !latestMeasurement) {\n return emptyReturnObject;\n }\n\n const numWeeks = moment(latestDate).diff(moment(firstDate), \"days\") / 7;\n\n const averageWeeklyDelta = (latestMeasurement - firstMeasurement) / numWeeks;\n const averageWeeklyDeltaAsPercentage = averageWeeklyDelta / latestMeasurement;\n\n return {\n averageWeeklyDelta,\n averageWeeklyDeltaAsPercentage,\n };\n}\n\n// Emoji mapping for stress levels\nexport const getStressEmojis = (t: TFunction): Record => ({\n [Stress.VERY_LOW]: `😌 ${t(\"my_progress.STRESS.VERY_LOW\")}`,\n [Stress.LOW]: `🙂 ${t(\"my_progress.STRESS.LOW\")}`,\n [Stress.MEDIUM]: `😐 ${t(\"my_progress.STRESS.MEDIUM\")}`,\n [Stress.HIGH]: `😟 ${t(\"my_progress.STRESS.HIGH\")}`,\n [Stress.VERY_HIGH]: `😫 ${t(\"my_progress.STRESS.VERY_HIGH\")}`,\n});\n\nfunction formatMeasurementForDisplay(\n userMeasurement: UserMeasurement,\n measurementType: MeasurementType,\n t: TFunction\n): string {\n switch (measurementType) {\n case MeasurementType.WEIGHT:\n if (typeof userMeasurement.value === \"number\") {\n return userMeasurement.value ? `${formatNumberAsDecimal(userMeasurement.value, 2)}` : \"\";\n }\n return userMeasurement.value ? `${userMeasurement.value}` : \"\";\n case MeasurementType.SLEEP:\n return userMeasurement.value ? `${userMeasurement.value} h` : \"\";\n case MeasurementType.STRESS:\n if (!Number.isNaN(userMeasurement.value)) {\n const stressEmojis = getStressEmojis(t);\n return userMeasurement.value\n ? stressEmojis[userMeasurement.value as Stress] || t(`my_progress.STRESS.${userMeasurement.value as Stress}`)\n : \"\";\n }\n throw new Error(\"Invalid stress type\");\n case MeasurementType.WAIST_CIRCUMFERENCE:\n return userMeasurement.value ? `${userMeasurement.value} cm` : \"\";\n default:\n return \"\";\n }\n}\n\nfunction formatDateForDisplay(date: string): string {\n return moment(date).format(\"D MMM YY\");\n}\n\nexport function createTableDisplayingMeasurements({\n userMeasurements,\n measurementType,\n backgroundColor,\n deleteMeasurementForDate,\n t,\n isDesktop,\n}: {\n userMeasurements: UserMeasurementsByDate;\n measurementType: MeasurementType;\n backgroundColor: string;\n deleteMeasurementForDate: (id: number, measurementType: MeasurementType) => Promise;\n t: TFunction;\n isDesktop: boolean;\n}): JSX.Element {\n const createTableRow = (measurementArray: UserMeasurementArray, date: string): [string, JSX.Element, JSX.Element] => {\n const measurement = measurementArray?.[0];\n\n if (!measurement) {\n return [\"\", <>, <>];\n }\n\n const formattedDate = formatDateForDisplay(date);\n\n return [\n formattedDate,\n \n {formatMeasurementForDisplay(measurement, measurementType, t)}\n ,\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n onPress={() => deleteMeasurementForDate(measurement.id, measurementType)}\n testID={`deleteProgressMeasurement-${measurementType}-${measurement.id}-button`}\n />,\n ];\n };\n\n const unsortedTableData = _.map(userMeasurements, createTableRow);\n const tableData = _.sortBy(unsortedTableData, ([dateString]) => -moment(dateString).unix());\n\n return (\n // NOTE: This padding is to leave room for the floating action button\n \n \n {tableData.map((rowData, index) => (\n \n ))}\n
\n
\n );\n}\n","import { StyleSheet } from \"react-native\";\n\nimport { height, Scale, width } from \"../constants\";\nimport { FontFamily, FontSize } from \"../constants/fonts\";\n\nconst styles = StyleSheet.create({\n nameStyle: { color: \"white\", fontSize: Scale(25) },\n topTitleStyle: {\n fontWeight: \"500\",\n marginBottom: Scale(7),\n },\n headerStyle: {\n fontFamily: FontFamily.bold,\n fontSize: FontSize.h4,\n lineHeight: Scale(32),\n },\n separatorStyle: {\n width,\n // backgroundColor: Colors.disableButton,\n height: Scale(3),\n marginVertical: Scale(20),\n },\n profileCircle: {\n height: Scale(64),\n width: Scale(64),\n justifyContent: \"center\",\n alignItems: \"center\",\n // backgroundColor: Colors.blueColor,\n borderRadius: Scale(32),\n marginRight: Scale(20),\n marginVertical: Scale(20),\n marginLeft: Scale(20),\n },\n profileIconStyle: {\n height: Scale(22),\n width: Scale(22),\n resizeMode: \"contain\",\n },\n profileTitleStyle: {\n fontSize: Scale(16),\n fontWeight: \"700\",\n },\n titleStyle: {\n marginLeft: Scale(0),\n // width: 10,\n },\n listTopContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n rightIconStyle: {\n height: Scale(15),\n width: Scale(15),\n resizeMode: \"contain\",\n },\n listContainer: {\n flexDirection: \"row\",\n marginVertical: Scale(7),\n alignItems: \"center\",\n },\n parentlistContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n marginTop: Scale(5),\n },\n iconStyle: { height: Scale(50), width: Scale(50), resizeMode: \"contain\" },\n container: {\n // backgroundColor: Colors.white,\n flex: 1,\n },\n progressTitleContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginTop: Scale(10),\n marginHorizontal: Scale(20),\n },\n topContainer: {\n height: height / 4,\n },\n timeContainer: {\n marginRight: 0,\n width: Scale(200),\n fontSize: Scale(16),\n fontWeight: \"500\",\n // color: Colors.sectionTextColor,\n },\n plusIconContainer: {\n height: Scale(30),\n width: Scale(30),\n },\n wrapperStyle: { flexDirection: \"row\", alignItems: \"center\" },\n labelContainer: { flexDirection: \"row\", marginVertical: Scale(15) },\n timeLabelStyle: {\n marginRight: 0,\n width: Scale(150),\n fontWeight: \"600\",\n fontSize: Scale(17),\n // color: Colors.sectionTextColor,\n },\n innerTextStyle: {\n // color: Colors.textColor,\n },\n rightContainerStyle: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n width: width / 3,\n marginVertical: Scale(7),\n },\n mealBoxText: {\n fontSize: Scale(16),\n lineHeight: Scale(24),\n // color: Colors.greyTextColor,\n marginLeft: Scale(13.34),\n },\n mealBox: {\n marginTop: Scale(20),\n height: Scale(112),\n // backgroundColor: Colors.grey,\n justifyContent: \"center\",\n alignItems: \"center\",\n flexDirection: \"row\",\n marginHorizontal: Scale(20),\n },\n plusIconStyle: {\n // tintColor: Colors.greyTextColor,\n width: Scale(13),\n height: Scale(13),\n },\n\n progressContainer: { flexDirection: \"row\", alignItems: \"center\" },\n spinnerExternalStyle: { width: Scale(130), marginRight: Scale(20) },\n textStyleForProgress: {\n // color: Colors.largeTextColor,\n fontWeight: \"500\",\n fontSize: Scale(16),\n marginRight: Scale(4),\n },\n texContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n marginBottom: Scale(15),\n marginTop: Scale(30),\n\n width: width - Scale(70),\n flexWrap: \"wrap\",\n },\n bottomContainer: {\n marginTop: Scale(40),\n },\n sideTextStyle: {\n // color: Colors.textColor,\n fontWeight: \"500\",\n },\n optionalStyle: {\n // color: Colors.textColor,\n fontSize: Scale(14),\n fontWeight: \"500\",\n },\n});\n\nexport default styles;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport {\n Box,\n Button,\n Center,\n Fab,\n Flex,\n FormControl,\n Icon,\n Input,\n Modal,\n Row,\n ScrollView,\n Select,\n Text,\n useDisclose,\n useTheme,\n View,\n} from \"native-base\";\nimport React, { useEffect } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Dimensions, SafeAreaView } from \"react-native\";\nimport { Calendar } from \"react-native-calendars\";\nimport { BarChart, LineChart } from \"react-native-chart-kit\";\nimport type { ChartData } from \"react-native-chart-kit/dist/HelperTypes\";\nimport type { LineChartData } from \"react-native-chart-kit/dist/line-chart/LineChart\";\nimport { Row as TableRow, Table } from \"react-native-table-component\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport CustomBrandingMobileScreenHeader from \"../components/CustomBrandingMobileScreenHeader\";\nimport type { MarkedDatesType } from \"../components/GroceryListDatePicker\";\nimport { commonStyles, isDesktopScreen, KG_TO_LBS, LBS_TO_KG, Routes } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\nimport { formatMomentAsDateForApi } from \"../helpers/apiHelpers\";\nimport {\n BAR_CHART_CONFIG,\n createChartLabelsForBarChart,\n createChartLabelsForLineChart,\n createTableDisplayingMeasurements,\n getAverageChangeInMeasurementPerWeek,\n getDataPointIndicesWithNoData,\n getDataPointsForChart,\n getDataPointsForChartWithNullsPadded,\n getNumDaysInChart,\n getStressEmojis,\n getUserMeasurementsForTimePeriod,\n getYAxisMax,\n getYAxisMin,\n PROGRESS_CHART_CONFIG,\n TimePeriod,\n} from \"../helpers/chartHelpers\";\nimport { shouldWeUseImperialForThisUser } from \"../helpers/foodHelpers\";\nimport {\n formatMomentAsBackendFormatDateString,\n formatNumberAsDecimal,\n formatNumberAsPercentage,\n formatNumberToDecimalPlaces,\n isIosWeb,\n isMacOriOSWeb,\n} from \"../helpers/generalHelpers\";\nimport { doesTheUserHaveMenstrualPlanSet } from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { UserWeight, ValueEnum as StressValues } from \"../services/backendTypes\";\nimport {\n userSelector,\n userSleepMeasurementsSelector,\n userSlice,\n userStressMeasurementsSelector,\n userWaistCircumferenceMeasurementsSelector,\n userWeightMeasurementsSelector,\n} from \"../slices/userSlice\";\nimport { MeasurementType, Stress } from \"../types\";\nimport styles from \"./MyProfileScreenStyles\";\n\nconst screenWidth = Dimensions.get(\"window\").width;\nconst {\n useMeasurementsUserWeightCreateMutation,\n useMeasurementsUserWeightListQuery,\n useMeasurementsUserSleepCreateMutation,\n useMeasurementsUserSleepListQuery,\n useMeasurementsUserStressCreateMutation,\n useMeasurementsUserStressListQuery,\n useMeasurementsUserDistanceListQuery,\n useMeasurementsUserDistanceCreateMutation,\n useMeasurementsDeleteMeasurementCreateMutation,\n} = backendApi;\n\nconst MEASUREMENT_POLLING_INTERVAL = 1000 * 60;\n\ntype Props = NativeStackScreenProps;\nconst MyProgressScreen = ({ route: { params } }: Props): JSX.Element => {\n const { t } = useTranslation();\n const { colors } = useTheme();\n\n const isDesktop = isDesktopScreen();\n\n const dispatch = useDispatch();\n const userNotViewAs = useSelector(userSelector);\n const viewAsUser = params?.viewAsUser;\n const user = viewAsUser || userNotViewAs;\n\n const userUsesImperialMeasurements = user ? shouldWeUseImperialForThisUser(user) : false;\n\n const userWeightMeasurementsInKg = useSelector(userWeightMeasurementsSelector);\n const userWeightMeasurements = userUsesImperialMeasurements\n ? _.mapValues(userWeightMeasurementsInKg, (measurements): UserWeight[] =>\n measurements.map((measurement) => ({\n ...measurement,\n value: measurement.value * KG_TO_LBS,\n }))\n )\n : userWeightMeasurementsInKg;\n\n const userSleepMeasurements = useSelector(userSleepMeasurementsSelector);\n const userStressMeasurements = useSelector(userStressMeasurementsSelector);\n const userWaistCircumferenceMeasurements = useSelector(userWaistCircumferenceMeasurementsSelector);\n\n const {\n isOpen: isOpenAddUserMeasurementsModal,\n onOpen: onOpenAddUserMeasurementsModal,\n onClose: onCloseAddUserMeasurementsModal,\n } = useDisclose();\n\n // NOTE: We have a bug on Windows which I am unable to replicate.\n // The bug causes the screen to 'jitter' horizontally.\n // Some of the dropdown options do not work and so we default to the one that gives the coach the most information.\n const [selectedTimePeriod, setSelectedTimePeriod] = React.useState(TimePeriod.SINCE_BEGINNING);\n const [selectedMeasurementType, setSelectedMeasurementType] = React.useState(MeasurementType.WEIGHT);\n\n const [inputNewWeightMeasurementOnBackend] = useMeasurementsUserWeightCreateMutation();\n const [inputNewSleepMeasurementOnBackend] = useMeasurementsUserSleepCreateMutation();\n const [inputNewMoodMeasurementOnBackend] = useMeasurementsUserStressCreateMutation();\n const [inputNewUserDistanceMeasurementOnBackend] = useMeasurementsUserDistanceCreateMutation();\n const [deleteMeasurementOnBackend] = useMeasurementsDeleteMeasurementCreateMutation();\n const { data: userWeightMeasurementsResponse, refetch: refetchUserWeightMeasurements } =\n useMeasurementsUserWeightListQuery(\n { user: user?.id },\n { skip: !user, pollingInterval: MEASUREMENT_POLLING_INTERVAL }\n );\n const { data: userSleepMeasurementsResponse, refetch: refetchUserSleepMeasurements } =\n useMeasurementsUserSleepListQuery(\n { user: user?.id },\n { skip: !user, pollingInterval: MEASUREMENT_POLLING_INTERVAL }\n );\n const { data: userStressMeasurementsResponse, refetch: refetchUserStressMeasurements } =\n useMeasurementsUserStressListQuery(\n { user: user?.id },\n { skip: !user, pollingInterval: MEASUREMENT_POLLING_INTERVAL }\n );\n const { data: userDistanceMeasurementsResponse, refetch: refetchUserDistanceMeasurements } =\n useMeasurementsUserDistanceListQuery(\n { user: user?.id },\n { skip: !user, pollingInterval: MEASUREMENT_POLLING_INTERVAL }\n );\n\n // useEffects\n useEffect(() => {\n if (userWeightMeasurementsResponse && userWeightMeasurementsResponse.results) {\n dispatch(userSlice.actions.storeUserWeightMeasurements(userWeightMeasurementsResponse.results));\n }\n }, [userWeightMeasurementsResponse]);\n\n useEffect(() => {\n if (userSleepMeasurementsResponse && userSleepMeasurementsResponse.results) {\n dispatch(userSlice.actions.storeUserSleepMeasurements(userSleepMeasurementsResponse.results));\n }\n }, [userSleepMeasurementsResponse]);\n\n useEffect(() => {\n if (userStressMeasurementsResponse?.results) {\n dispatch(userSlice.actions.storeUserStressMeasurements(userStressMeasurementsResponse.results));\n }\n }, [userStressMeasurementsResponse]);\n\n useEffect(() => {\n if (userDistanceMeasurementsResponse?.results) {\n dispatch(userSlice.actions.storeUserDistanceMeasurements(userDistanceMeasurementsResponse.results));\n }\n }, [userDistanceMeasurementsResponse]);\n\n async function onDeleteProgressMeasurementForDate(\n measurementId: number,\n measurementType: MeasurementType\n ): Promise {\n if (!user) {\n throw new Error(\"User must be populated\");\n }\n\n // NOTE: We allow users to submit multiple measurements for a single day and just display the latest one.\n // As a result, if a user has 2 measurements for the same day and they do a deletion the old one will just come back\n // We should probably allow only 1 measurement for a single day\n await deleteMeasurementOnBackend({\n deleteMeasurementRequest: {\n measurement_id: measurementId,\n measurement_type: measurementType,\n user_id: user.id,\n },\n });\n\n alert(t(\"my_progress.delete_successful_message\"));\n }\n\n // Get emoji mapping for stress levels\n const stressEmojis = getStressEmojis(t);\n\n // Form config\n const formValidationSchema = Yup.object().shape({\n weight: Yup.number()\n // TODO This should be done properly\n // .transform(transformEuropeanStyleNumber)\n .positive()\n .min(1)\n .max(300)\n .typeError(t(\"general.form_errors.number_only\")),\n weight_in_lbs: Yup.number().positive().min(1).max(650),\n stress: Yup.mixed().oneOf(Object.values(Stress)),\n sleep: Yup.number()\n // .transform(transformEuropeanStyleNumber)\n .positive()\n .max(16),\n waistCircumference: Yup.number()\n // .transform(transformEuropeanStyleNumber)\n .positive()\n .max(300),\n // TODO: Translate error\n date: Yup.date().required().max(moment().endOf(\"day\").toDate(), \"Cannot be in future\"),\n });\n type UserMeasurementsSchema = Yup.InferType;\n\n const initialValues = formValidationSchema.cast({\n date: new Date(),\n // NOTE: There are no sensible defaults for sleep and stress unlike weight\n });\n\n const onSubmit = async (values: UserMeasurementsSchema): Promise => {\n if (!user) {\n throw new Error(\"User is not set\");\n }\n\n // NOTE: This is only the correct date in the user's current timezone\n // (it should not be strictly necessary as the client will interpret the ISO8601 date correctly)\n const createdAt = moment(values.date).toISOString();\n\n const requests = [];\n if (values.weight) {\n requests.push(\n inputNewWeightMeasurementOnBackend({\n userWeightRequest: {\n user: user.id,\n value: values.weight,\n created_at: createdAt,\n },\n })\n );\n }\n\n if (values.stress) {\n requests.push(\n inputNewMoodMeasurementOnBackend({\n userStressRequest: {\n user: user.id,\n value: values.stress,\n created_at: createdAt,\n },\n })\n );\n }\n\n if (values.sleep) {\n requests.push(\n inputNewSleepMeasurementOnBackend({\n userSleepRequest: {\n user: user.id,\n value: values.sleep,\n created_at: createdAt,\n },\n })\n );\n }\n\n if (values.waistCircumference) {\n requests.push(\n inputNewUserDistanceMeasurementOnBackend({\n userDistanceRequest: {\n user: user.id,\n body_area: \"WAIST\",\n value: values.waistCircumference,\n created_at: createdAt,\n },\n })\n );\n }\n\n // NOTE: The compiler wrongly thinks the heterogeneous array is a problem\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n await Promise.all(requests);\n\n onCloseAddUserMeasurementsModal();\n };\n\n const getMarkedDatesFromDate = (date: Date): MarkedDatesType => {\n const markedDates: MarkedDatesType = {};\n if (date) {\n markedDates[formatMomentAsBackendFormatDateString(moment(date))] = {\n selected: true,\n };\n }\n\n return markedDates;\n };\n\n const addMeasurementsModal = (\n \n \n \n \n {t(\"my_progress.add_measurement_modal.title\")}\n \n \n {/* `initialValues` is fine but the compiler complains for some reason. */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n {({\n isSubmitting,\n handleChange,\n handleBlur,\n handleSubmit,\n values,\n setFieldValue,\n errors,\n dirty,\n isValid,\n }) => (\n \n handleChange(\"date\")(day.dateString)}\n markedDates={getMarkedDatesFromDate(values.date)}\n theme={{\n textDayFontFamily: FontFamily.medium,\n textMonthFontFamily: FontFamily.bold,\n textDayHeaderFontFamily: FontFamily.medium,\n arrowColor: colors.primary[\"600\"],\n }}\n renderArrow={(direction) => (\n \n )}\n firstDay={1}\n testID=\"progress-datepicker\"\n />\n {user && shouldWeUseImperialForThisUser(user) ? (\n \n {t(\"my_progress.add_measurement_modal.weight_label\")}\n {\n const kg = Number(lbs) * LBS_TO_KG;\n setFieldValue(\"weight_in_lbs\", lbs);\n setFieldValue(\"weight\", kg);\n }}\n value={values.weight ? String(values.weight_in_lbs) : \"\"}\n testID=\"userMeasurements-weight-input\"\n keyboardType={isIosWeb() ? \"decimal-pad\" : \"numeric\"}\n />\n {errors.weight}\n \n ) : (\n \n {t(\"my_progress.add_measurement_modal.weight_label\")}\n setFieldValue(\"weight\", weight.replace(\",\", \".\"))}\n value={values.weight ? String(values.weight) : \"\"}\n testID=\"userMeasurements-weight-input\"\n keyboardType={isIosWeb() ? \"decimal-pad\" : \"numeric\"}\n />\n {errors.weight}\n \n )}\n\n {t(\"my_progress.add_measurement_modal.stress_label\")}\n \n setFieldValue(\"stress\", itemValue)}\n // https://github.com/GeekyAnts/NativeBase/issues/5111\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n selection={isMacOriOSWeb() ? 1 : null}\n testID=\"userMeasurements-stress-input\"\n >\n {Object.keys(Stress).map((stressEnum) => (\n \n ))}\n \n {errors.stress}\n \n\n {/* FIXME: This is not yet hooked up to the backend */}\n {/* Menopause Sweating Tracking */}\n {/* {user && doesTheUserHaveMenstrualPlanSet(user) ? (\n <>\n {t(\"my_progress.add_measurement_modal.sweating_label\")}\n \n setFieldValue(\"sweating\", itemValue)}\n // https://github.com/GeekyAnts/NativeBase/issues/5111\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n selection={isMacOriOSWeb() ? 1 : null}\n testID=\"userMeasurements-sweating-input\"\n placeholder=\"Select sweating level\"\n >\n \n \n \n \n \n \n \n \n ) : null} */}\n\n \n {t(\"my_progress.add_measurement_modal.sleep_label\")}\n setFieldValue(\"sleep\", sleep.replace(\",\", \".\"))}\n value={values.sleep ? String(values.sleep) : \"\"}\n testID=\"userMeasurements-sleep-input\"\n />\n {errors.sleep}\n \n\n \n \n {t(\"my_progress.add_measurement_modal.waist_circumference_label\")}\n \n \n setFieldValue(\"waistCircumference\", waistCircumference.replace(\",\", \".\"))\n }\n value={values.waistCircumference ? String(values.waistCircumference) : \"\"}\n testID=\"userMeasurements-waistCircumference-input\"\n />\n {errors.waistCircumference}\n \n\n \n handleSubmit()}\n isLoading={isSubmitting}\n isDisabled={!dirty || !isValid}\n testID={\"userMeasurements-submit-button\"}\n >\n {t(\"general.submit\")}\n \n \n \n )}\n \n \n \n \n );\n\n const floatingActionButton = (\n }\n testID={\"myProfilePreferences-addMeasurements-button\"}\n />\n );\n\n const chartConfig = {\n ...PROGRESS_CHART_CONFIG,\n color: () => colors.primary[\"600\"],\n labelColor: () => \"black\",\n };\n\n // Max history length is 60 days, min history length is 7 days\n const numDaysInChart = getNumDaysInChart(selectedTimePeriod, userWeightMeasurements);\n const userWeightsForTimePeriod = getUserMeasurementsForTimePeriod(selectedTimePeriod, userWeightMeasurements);\n\n const dataPointsForWeightChartWithNullsPadded = getDataPointsForChartWithNullsPadded(\n userWeightMeasurements,\n numDaysInChart\n );\n\n const xAxisLabelsForLineChart = createChartLabelsForLineChart(numDaysInChart);\n const xAxisLabelsForBarChart = createChartLabelsForBarChart(numDaysInChart);\n\n const yAxisMinWeightChart = getYAxisMin(dataPointsForWeightChartWithNullsPadded);\n const yAxisMaxWeightChart = getYAxisMax(dataPointsForWeightChartWithNullsPadded);\n const dataForWeightChart: LineChartData = {\n datasets: [\n {\n data: _.map(dataPointsForWeightChartWithNullsPadded, (v) => v || 0),\n },\n {\n // NOTE: There is no way to control the max and min y-axis range so we use a hidden dummy dataset as a hack\n key: \"dummy-range-padding\",\n data: [yAxisMinWeightChart, yAxisMaxWeightChart],\n color: () => \"transparent\",\n withDots: false,\n },\n ],\n // NOTE: We deliberately do not show labels because they are not shown if there is no corresponding datapoint and\n // this results in the label for the left hand side date of the X-axis not showing.\n labels: [],\n legend: [`${t(\"my_progress.weight_chart.legend\")} ${userUsesImperialMeasurements ? \"(lbs)\" : \"(kg)\"}`],\n };\n\n const dataPointsForWaistCircumferenceChartWithNullsPadded = getDataPointsForChartWithNullsPadded(\n userWaistCircumferenceMeasurements,\n numDaysInChart\n );\n const yAxisMinWaistCircumferenceChart = getYAxisMin(dataPointsForWaistCircumferenceChartWithNullsPadded);\n const yAxisMaxWaistCircumferenceChart = getYAxisMax(dataPointsForWaistCircumferenceChartWithNullsPadded);\n const dataForWaistCircumferenceChart: LineChartData = {\n datasets: [\n {\n data: _.map(dataPointsForWaistCircumferenceChartWithNullsPadded, (v) => v || 0),\n },\n {\n // NOTE: There is no way to control the max and min y-axis range so we use a hidden dummy dataset as a hack\n key: \"dummy-range-padding\",\n data: [yAxisMinWaistCircumferenceChart, yAxisMaxWaistCircumferenceChart],\n color: () => \"transparent\",\n withDots: false,\n },\n ],\n labels: [],\n legend: [t(\"my_progress.waist_circumference_chart.legend\")],\n };\n\n const dataPointsForSleepChart = getDataPointsForChart(userSleepMeasurements, numDaysInChart);\n const dataForSleepChart: ChartData = {\n datasets: [\n {\n data: _.map(dataPointsForSleepChart, (v) => v || 0),\n },\n ],\n labels: xAxisLabelsForBarChart,\n };\n\n const dataPointsForStressChart = getDataPointsForChart(userStressMeasurements, numDaysInChart);\n const dataForStressChart: ChartData = {\n datasets: [\n {\n data: _.map(dataPointsForStressChart, (v) => v || 0),\n },\n ],\n labels: xAxisLabelsForBarChart,\n };\n\n // Extra information accompanying weight chart\n const { averageWeeklyDeltaAsPercentage, averageWeeklyDelta } =\n getAverageChangeInMeasurementPerWeek(userWeightsForTimePeriod);\n\n const firstWeightValue = _.head(dataPointsForWeightChartWithNullsPadded);\n const latestWeightValue = _.last(dataPointsForWeightChartWithNullsPadded);\n\n const tableOfWeightMeasurementsComponent = createTableDisplayingMeasurements({\n userMeasurements: userWeightsForTimePeriod,\n measurementType: MeasurementType.WEIGHT,\n backgroundColor: colors.primary[\"200\"],\n deleteMeasurementForDate: onDeleteProgressMeasurementForDate,\n t,\n isDesktop,\n });\n\n const weightChartInfoComponent = (\n \n {firstWeightValue && latestWeightValue ? (\n <>\n \n {t(\"my_progress.weight_delta_label\", {\n weight_change: formatNumberAsDecimal(latestWeightValue - firstWeightValue),\n unit: userUsesImperialMeasurements ? \"lbs\" : \"kg\",\n })}\n \n \n ) : null}\n <>\n \n {t(\"my_progress.average_per_week_label\", {\n absolute_change: formatNumberAsDecimal(averageWeeklyDelta),\n percentage_change: formatNumberAsPercentage(averageWeeklyDeltaAsPercentage),\n unit: userUsesImperialMeasurements ? \"lbs\" : \"kg\",\n })}\n \n \n {tableOfWeightMeasurementsComponent}\n \n );\n\n const sleepValuesTable = createTableDisplayingMeasurements({\n userMeasurements: userSleepMeasurements,\n measurementType: MeasurementType.SLEEP,\n backgroundColor: colors.primary[\"200\"],\n deleteMeasurementForDate: onDeleteProgressMeasurementForDate,\n t,\n isDesktop,\n });\n\n const sleepChart = _.some(dataForSleepChart?.datasets?.[0]?.data) ? (\n // NOTE: The `mt` is to make up for the lack of legend in the chart\n \n `${formatNumberAsDecimal(parseInt(value, 10), 1)}`,\n }}\n yAxisSuffix={t(\"my_progress.sleep_chart.suffix\")}\n yAxisLabel=\"\"\n fromZero={true}\n // NOTE: This is required to have a fixed y-axis range\n // (otherwise the y-axis range is determined by the data)\n fromNumber={10}\n />\n {sleepValuesTable}\n \n ) : (\n
\n {t(\"my_progress.no_data_for_period_label\")}\n {/* Add empty space to ensure the FAB has empty space to be shown in */}\n \n
\n );\n\n const stressValuesTable = createTableDisplayingMeasurements({\n userMeasurements: userStressMeasurements,\n measurementType: MeasurementType.STRESS,\n backgroundColor: colors.primary[\"200\"],\n deleteMeasurementForDate: onDeleteProgressMeasurementForDate,\n t,\n isDesktop,\n });\n\n const stressChart = _.some(dataForStressChart?.datasets?.[0]?.data) ? (\n \n \n {stressValuesTable}\n \n ) : (\n
\n {t(\"my_progress.no_data_for_period_label\")}\n {/* Add empty space */}\n \n
\n );\n\n const dataPointIndicesWithNoDataForWeightChart = getDataPointIndicesWithNoData(\n getDataPointsForChart(userWeightMeasurements, numDaysInChart)\n );\n\n const doesWeightChartContainAnyData = _.some(dataPointsForWeightChartWithNullsPadded);\n const weightChart = doesWeightChartContainAnyData ? (\n <>\n formatNumberToDecimalPlaces(Number(value), 1)}\n />\n \n {xAxisLabelsForLineChart.map((label, index) => (\n {label}\n ))}\n \n\n {weightChartInfoComponent}\n \n ) : (\n
\n {t(\"my_progress.no_data_for_period_label\")}\n {/* Add empty space */}\n \n
\n );\n\n const dataPointIndicesWithNoDataForWaistCircumferenceChart = getDataPointIndicesWithNoData(\n getDataPointsForChart(userWaistCircumferenceMeasurements, numDaysInChart)\n );\n\n const waistCircumferencesValuesTable = createTableDisplayingMeasurements({\n userMeasurements: userWaistCircumferenceMeasurements,\n measurementType: MeasurementType.WAIST_CIRCUMFERENCE,\n backgroundColor: colors.primary[\"200\"],\n deleteMeasurementForDate: onDeleteProgressMeasurementForDate,\n t,\n isDesktop,\n });\n\n const waistCircumferenceChart = _.some(dataForWaistCircumferenceChart?.datasets?.[0]?.data) ? (\n <>\n formatNumberToDecimalPlaces(Number(value), 1)}\n />\n \n {xAxisLabelsForLineChart.map((label, index) => (\n {label}\n ))}\n \n {waistCircumferencesValuesTable}\n \n ) : (\n
\n {t(\"my_progress.no_data_for_period_label\")}\n {/* Add empty space */}\n \n
\n );\n\n const getRelevantChart = (measurementType: MeasurementType): JSX.Element => {\n switch (measurementType) {\n case MeasurementType.WEIGHT:\n return weightChart;\n case MeasurementType.SLEEP:\n return sleepChart;\n case MeasurementType.STRESS:\n return stressChart;\n case MeasurementType.WAIST_CIRCUMFERENCE:\n return waistCircumferenceChart;\n default:\n return <>;\n }\n };\n\n const selectedChart = getRelevantChart(selectedMeasurementType);\n\n const chartComponent = (\n <>\n
\n \n setSelectedTimePeriod(itemValue as TimePeriod)}\n width={isDesktop ? \"150\" : \"32\"}\n ml=\"3\"\n testID=\"time-period-select\"\n >\n {Object.values(TimePeriod).map((option, index) => (\n \n ))}\n \n\n setSelectedMeasurementType(itemValue as MeasurementType)}\n width={isDesktop ? \"150\" : \"32\"}\n ml=\"3\"\n testID=\"measurement-type-select\"\n >\n {Object.values(MeasurementType).map((option, index) => (\n \n ))}\n \n \n
\n\n {selectedChart}\n \n );\n\n return (\n \n \n {!isDesktop && !viewAsUser ? : null}\n {viewAsUser ? null : (\n \n {t(\"my_progress.screen_title\")}\n \n )}\n {chartComponent}\n {addMeasurementsModal}\n \n {floatingActionButton}\n \n );\n};\n\nexport default MyProgressScreen;\n","import type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport {\n AlertDialog,\n Button,\n Center,\n Column,\n Divider,\n Flex,\n FormControl,\n HStack,\n Image,\n Input,\n Modal,\n Row,\n ScrollView,\n Spinner,\n Switch,\n Text,\n theme,\n useDisclose,\n View,\n} from \"native-base\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ImageSourcePropType, SafeAreaView, StyleProp, useWindowDimensions, ViewStyle } from \"react-native\";\nimport { NavigationState, Route, SceneMap, SceneRendererProps, TabBar, TabView } from \"react-native-tab-view\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\nimport type { RequiredArraySchema } from \"yup/lib/array\";\nimport type { MixedSchema } from \"yup/lib/mixed\";\nimport type { Assign, ObjectShape, TypeOfShape } from \"yup/lib/object\";\nimport type { RequiredStringSchema } from \"yup/lib/string\";\nimport type { AnyObject } from \"yup/lib/types\";\n\nimport { CommonIconButton } from \"../commons\";\nimport { commonStyles, Images, isDesktopScreen, KG_TO_LBS, Routes, Scale, VerticalScale } from \"../constants\";\nimport { calculateDailyTotalForMacro, getNutritionDayPlanOverviewComponent } from \"../helpers/coachHelpers\";\nimport { shouldWeUseImperialForThisUser } from \"../helpers/foodHelpers\";\nimport {\n formatNumberAsDecimal,\n formatNumberAsPercentage,\n formatNumberAsWholeNumber,\n formatUserForDisplay,\n isMobilePlatform,\n} from \"../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { NutritionDayPlan, User, UserProfile } from \"../services/backendTypes\";\nimport type { DaysForNutritionPlan } from \"../services/legacyNutritionCalculations7\";\nimport logger from \"../services/logger\";\nimport { calculateEnergyExpenditure } from \"../services/nutritionCalculations\";\nimport {\n DEFAULT_NUTRITION_PLAN_NAME,\n getDefaultLegacyInput,\n getLegacyInputFromNutritionPlan,\n} from \"../services/nutritionCalculations7\";\nimport { plannerSlice } from \"../slices/plannerSlice\";\nimport { clientsSelector, userSelector, userSlice } from \"../slices/userSlice\";\nimport type { DayOfWeekString } from \"../types\";\nimport styles from \"./CoachModeClientInfoScreenStyle\";\nimport MyProgressScreen from \"./MyProgressScreen\";\n\nconst {\n useUsersClientsRetrieveQuery,\n useUsersClientsPartialUpdateMutation,\n useUsersWeeklyNutritionPlanUpdateMutation,\n} = backendApi;\n\n// TODO: Use native-base instead\nconst nutritionCardStyle: StyleProp = {\n backgroundColor: \"white\",\n borderRadius: 8,\n borderWidth: 1,\n borderStyle: \"solid\",\n padding: Scale(12),\n marginTop: VerticalScale(24),\n};\n\n// TODO: This should be in a helpers/constants file\nconst ALL_DAYS: DayOfWeekString[] = [\"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\", \"saturday\", \"sunday\"];\n\nconst daysSchema = Yup.object().shape({\n name: Yup.string().required(),\n daysInNutritionPlan: Yup.array()\n .of(Yup.mixed().oneOf(ALL_DAYS).default(\"monday\"))\n .required()\n .min(1)\n .default([]),\n});\n\n// NOTE: Yup recommends using empty interfaces instead of types\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\ninterface DaysSchema extends Yup.InferType {}\n\nconst EVERY_DAY: DaysForNutritionPlan = {\n monday: true,\n tuesday: true,\n wednesday: true,\n thursday: true,\n friday: true,\n saturday: true,\n sunday: true,\n};\n\nconst convertDaysArrayToDaysForNutritionPlan = (days: DayOfWeekString[]): DaysForNutritionPlan => {\n const daysForNutritionPlan: DaysForNutritionPlan = {\n monday: false,\n tuesday: false,\n wednesday: false,\n thursday: false,\n friday: false,\n saturday: false,\n sunday: false,\n };\n\n days.forEach((day) => {\n daysForNutritionPlan[day] = true;\n });\n\n return daysForNutritionPlan;\n};\n\n// TODO: Put in helpers\nconst dayOfWeekStringToIndex = (dayOfWeekString: DayOfWeekString): number => {\n switch (dayOfWeekString) {\n case \"monday\":\n return 1;\n case \"tuesday\":\n return 2;\n case \"wednesday\":\n return 3;\n case \"thursday\":\n return 4;\n case \"friday\":\n return 5;\n case \"saturday\":\n return 6;\n case \"sunday\":\n return 0;\n default:\n throw new Error(\"This should never happen\");\n }\n};\n\nconst createUserProfileFieldComponent = (fieldName: string, fieldValue: string): JSX.Element => (\n \n {`${fieldName}: `}\n \n {fieldValue}\n \n \n);\n\nconst NutritionDayPlanInfoForm = ({\n initialValues,\n onSubmit,\n nutritionDayPlan,\n isCreateNewPlanForm,\n disableDaySwitches = true,\n isLoadingBackendUpdateCall = false,\n}: {\n initialValues: TypeOfShape<\n Assign<\n ObjectShape,\n {\n name: RequiredStringSchema;\n daysInNutritionPlan: RequiredArraySchema<\n MixedSchema,\n AnyObject,\n DayOfWeekString[]\n >;\n }\n >\n >;\n onSubmit: (values: DaysSchema, nutritionDayPlan: NutritionDayPlan) => Promise | void;\n nutritionDayPlan?: NutritionDayPlan;\n isCreateNewPlanForm: boolean;\n disableDaySwitches?: boolean;\n isLoadingBackendUpdateCall?: boolean;\n}): JSX.Element => {\n const { t } = useTranslation();\n\n if (isLoadingBackendUpdateCall) {\n return ;\n }\n\n return (\n onSubmit(values, nutritionDayPlan)}\n >\n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, setFieldValue, errors, dirty, isValid }) => (\n \n
\n \n \n {/* NOTE: This does not work. When the error message appears it causes a re-render\n of the form in its original state */}\n {/* {errors.name} */}\n \n
\n\n \n {ALL_DAYS.map((day) => (\n \n {moment().day(dayOfWeekStringToIndex(day)).format(\"ddd\")}\n {\n const updatedDays = values.daysInNutritionPlan.includes(day)\n ? values.daysInNutritionPlan.filter((d) => d !== day)\n : [...values.daysInNutritionPlan, day];\n\n setFieldValue(\"daysInNutritionPlan\", updatedDays);\n }}\n mr=\"-1\"\n testID={`${day}-switch-${nutritionDayPlan?.id || \"NULL\"}`}\n />\n \n ))}\n \n\n
\n handleSubmit()}\n isDisabled={isSubmitting || !isValid || !dirty}\n isLoading={isLoadingBackendUpdateCall}\n mt=\"2\"\n width=\"40%\"\n testID={`updateDaysOnNutritionPlan-${nutritionDayPlan?.id || \"NULL\"}-button`}\n >\n \n {t(\n isCreateNewPlanForm\n ? \"nutrition_day_plan.create_new_nutrition_plan_button_text\"\n : \"nutrition_day_plan.update_nutrition_plan_button_text\"\n )}\n \n \n
\n
\n )}\n \n );\n};\n\nconst NutritionPlansComponent = ({\n client,\n onPressUpdateOrCreateNutritionDayPlan,\n onOpenAddAdditionalNDPDialog,\n onPressDeleteNutritionPlan,\n onSubmitUpdateNameAndDaysForm,\n isLoadingBackendUpdateCall,\n}: {\n client: User;\n onPressUpdateOrCreateNutritionDayPlan: (\n daysForNutritionPlan: DaysForNutritionPlan,\n name: string,\n nutritionDayPlan?: NutritionDayPlan\n ) => void;\n onOpenAddAdditionalNDPDialog: () => void;\n onSubmitUpdateNameAndDaysForm: (values: DaysSchema, nutritionDayPlan: NutritionDayPlan) => Promise;\n onPressDeleteNutritionPlan: (nutritionPlanId: number) => void;\n isLoadingBackendUpdateCall?: boolean;\n}): JSX.Element => {\n const { t } = useTranslation();\n\n if (!client.intake) return <>;\n\n if (!client.intake?.weekly_nutrition_plan) return <>;\n\n const mondayId = client.intake?.weekly_nutrition_plan?.monday.id;\n if (!mondayId) {\n throw new Error(\"client.intake?.weekly_nutrition_plan?.monday.id was undefined\");\n }\n const getDayId = (day: DayOfWeekString, intake: UserProfile): number =>\n intake.weekly_nutrition_plan?.[day]?.id || mondayId;\n const nutritionPlans: { [D in DayOfWeekString]: number } = {\n monday: mondayId,\n tuesday: getDayId(\"tuesday\", client.intake),\n wednesday: getDayId(\"wednesday\", client.intake),\n thursday: getDayId(\"thursday\", client.intake),\n friday: getDayId(\"friday\", client.intake),\n saturday: getDayId(\"saturday\", client.intake),\n sunday: getDayId(\"sunday\", client.intake),\n };\n\n const nutritionPlanGroupsRaw = _.groupBy(Object.entries(nutritionPlans), ([, nutritionPlanId]) => nutritionPlanId);\n const nutritionPlanGroups = _.mapValues(nutritionPlanGroupsRaw, (array) =>\n _.map(array, ([day]) => day as DayOfWeekString)\n );\n const moreThanOneNutritionPlan = _.size(nutritionPlanGroups) > 1;\n\n const addAnAdditionalNutritionPlanComponent = (\n \n \n {`+ ${t(\"nutrition_day_plan.add_an_additional_nutrition_plan\")}`}\n \n \n );\n\n const createNutritionPlanGroupComponent = (days: DayOfWeekString[], nutritionPlanId: string): JSX.Element => {\n const firstDay = days[0];\n\n if (!firstDay) {\n throw new Error(`No first day found in days array: ${_.toString(days)}`);\n }\n\n if (!client.intake) {\n return <>;\n }\n\n const nutritionDayPlan = client.intake.weekly_nutrition_plan?.[firstDay];\n\n if (!nutritionDayPlan) {\n return <>;\n }\n\n const initialValues = daysSchema.cast({\n name: nutritionDayPlan.name,\n daysInNutritionPlan: days,\n });\n\n return nutritionDayPlan ? (\n \n {t(\"coach_mode_top_tabs.nutrition_plan_tab_name\")}\n
\n \n
\n\n \n {getNutritionDayPlanOverviewComponent(nutritionDayPlan.meal_slot_specifications)}\n \n\n \n onPressUpdateOrCreateNutritionDayPlan(\n convertDaysArrayToDaysForNutritionPlan(days),\n nutritionDayPlan?.name || t(\"nutrition_day_plan.default_nutrition_plan_name\"),\n nutritionDayPlan\n )\n }\n testID={\"editNutritionPlan-button\"}\n >\n {t(\"nutrition_day_plan.edit_button_text\")}\n \n\n {moreThanOneNutritionPlan ? (\n onPressDeleteNutritionPlan(parseInt(nutritionPlanId, 10))}\n testID={`deleteNutritionPlan-${nutritionDayPlan.id || \"THIS_SHOULD_NEVER_HAPPEN\"}-button`}\n >\n {t(\"nutrition_day_plan.delete_nutrition_plan_button_text\")}\n \n ) : null}\n \n ) : (\n <>\n );\n };\n\n const sortedKeys = _.sortBy(_.keys(nutritionPlanGroups));\n\n const calculateTotalEnergyOfNutritionPlan = (daysArray: DayOfWeekString[]): number => {\n if (daysArray.length === 0) {\n return 0;\n }\n const day = daysArray[0];\n\n if (!day) throw new Error(\"day was undefined, this should never happen\");\n\n const nutritionPlan = client?.intake?.weekly_nutrition_plan?.[day];\n\n if (!nutritionPlan?.meal_slot_specifications) return 0;\n const totalEnergyOfNutritionPlan = calculateDailyTotalForMacro(\"kcal\", nutritionPlan?.meal_slot_specifications);\n\n return totalEnergyOfNutritionPlan * _.size(daysArray);\n };\n const averageEnergyIntakeAcrossWeek = _.sum(_.map(nutritionPlanGroups, calculateTotalEnergyOfNutritionPlan)) / 7;\n\n const tdee = calculateEnergyExpenditure(client.intake)?.daily.total;\n\n const averageEnergyIntakeComponent = tdee ? (\n \n
\n \n {t(\"nutrition_day_plan.average_energy_across_week_label\", {\n weekly_average: formatNumberAsWholeNumber(averageEnergyIntakeAcrossWeek),\n })}\n \n \n {t(\"nutrition_day_plan.average_energy_balance_across_week_label\", {\n energy_balance_percentage: formatNumberAsPercentage(averageEnergyIntakeAcrossWeek / tdee),\n })}\n \n
\n
\n ) : (\n <>\n );\n\n return (\n <>\n {moreThanOneNutritionPlan ? averageEnergyIntakeComponent : null}\n {_.map(sortedKeys, (nutritionPlanId) => {\n const daysArray = nutritionPlanGroups[nutritionPlanId];\n\n if (!daysArray) {\n return <>;\n }\n\n return createNutritionPlanGroupComponent(daysArray, nutritionPlanId);\n })}\n {_.size(nutritionPlanGroups) < 2 ? addAnAdditionalNutritionPlanComponent : null}\n \n );\n};\n\ntype Props = NativeStackScreenProps;\nconst CoachModeClientInfoScreen = ({\n navigation,\n route: {\n params: { clientId },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n\n const {\n isOpen: isOpenDeactivateDialog,\n onOpen: onOpenDeactivateDialog,\n onClose: onCloseDeactivateDialog,\n } = useDisclose();\n\n const {\n isOpen: isOpenAddAdditionalNDPDialog,\n onOpen: onOpenAddAdditionalNDPDialog,\n onClose: onCloseAddAdditionalNDPDialog,\n } = useDisclose();\n\n const layout = useWindowDimensions();\n\n const coach = useSelector(userSelector);\n\n const [patchUserBackendCall, { isLoading: isLoadingUpdateUserOnBackend }] = useUsersClientsPartialUpdateMutation();\n const {\n isLoading: isLoadingClientRetrieveQuery,\n error: clientRetrieveQueryError,\n data: client,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } = useUsersClientsRetrieveQuery({ id: clientId });\n\n const [updateWeeklyNutritionPlanOnBackend, { isLoading: isLoadingUpdateWnpOnBackend }] =\n useUsersWeeklyNutritionPlanUpdateMutation();\n const isLoadingBackendUpdateCall = isLoadingUpdateUserOnBackend || isLoadingUpdateWnpOnBackend;\n\n const deactivateClientDialogRef = React.useRef(null);\n\n const [nutritionPlanDeletionId, setNutritionPlanDeletionId] = useState();\n const {\n onOpen: onOpenNutritionPlanDeleteConfirmationModal,\n onClose: onCloseNutritionPlanDeleteConfirmationModal,\n isOpen: isNutritionPlanDeleteConfirmationModalOpen,\n } = useDisclose();\n const nutritionPlanDeleteRef = useRef(null);\n\n const isDesktop = isDesktopScreen();\n\n enum ClientViewTab {\n NUTRITION_PLAN = 0,\n ABOUT = 1,\n PROGRESS = 2,\n SETTINGS = 3,\n }\n const [index, setIndex] = React.useState(ClientViewTab.NUTRITION_PLAN);\n const routes: Route[] = [\n {\n key: String(ClientViewTab.NUTRITION_PLAN),\n title: t(\"coach_mode_top_tabs.nutrition_plan_tab_name\"),\n testID: \"viewClientTab-nutritionPlan\",\n },\n {\n key: String(ClientViewTab.PROGRESS),\n title: t(\"coach_mode_top_tabs.progress_tab_name\"),\n testID: \"viewClientTab-progress\",\n },\n {\n key: String(ClientViewTab.SETTINGS),\n title: t(\"coach_mode_top_tabs.settings_tab_name\"),\n testID: \"viewClientTab-settings\",\n },\n ];\n\n if (!client) {\n // NOTE: This should never happen - send an error to Sentry\n if (isLoadingClientRetrieveQuery && !clientRetrieveQueryError) {\n return ;\n }\n return {\"coach_mode_client_settings.client_not_found_error_text\"};\n }\n\n const DailyEnergyItem = ({\n label,\n value,\n imgSrc,\n }: {\n label: string;\n value: string;\n imgSrc?: ImageSourcePropType;\n }): JSX.Element => (\n \n {\"TDEE-element\"}\n {label}\n {value}\n \n );\n\n const onPressUpdateOrCreateNutritionDayPlan = (\n daysForNutritionPlan: DaysForNutritionPlan,\n name: string,\n nutritionDayPlan?: NutritionDayPlan\n ): void => {\n if (!client) {\n throw new Error(\"Client not found\");\n }\n\n if (!client.intake) {\n throw new Error(\"Client intake not found\");\n }\n\n const initialLegacyInput = nutritionDayPlan\n ? getLegacyInputFromNutritionPlan(client.intake, nutritionDayPlan, daysForNutritionPlan)\n : getDefaultLegacyInput(client.intake, daysForNutritionPlan, name);\n\n dispatch(userSlice.actions.storeClientNutritionPlan({ clientId, plan: initialLegacyInput }));\n\n navigation.navigate(Routes.EditNutritionDayPlanStack, {\n screen: Routes.EnergyBalanceTab1,\n params: { client, nutritionPlanId: initialLegacyInput.id },\n });\n };\n\n const onViewClientPlan = (): void => {\n dispatch(plannerSlice.actions.resetCalendarDays());\n dispatch(userSlice.actions.setViewAsUser(client));\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n navigation.push(Routes.DiaryViewScreen);\n };\n\n let tdee = -1;\n let rmr = -1;\n if (client.intake) {\n // TODO: Add in exercise calories in later MR\n const energyExpenditure = calculateEnergyExpenditure(client.intake);\n\n if (!energyExpenditure) {\n throw new Error(\"No energy expenditure calculated\");\n }\n\n tdee = energyExpenditure.daily.total;\n rmr = energyExpenditure.daily.bmr;\n }\n\n function onPressUpdateUserProfile(): void {\n if (!client) {\n throw new Error(\"Client not found\");\n }\n\n navigation.navigate(Routes.EditUserProfileScreen, { client });\n }\n\n function convertAndFormatWeight(weight: number, usesImperialMeasurements: boolean): string {\n const convertedWeight = weight * (usesImperialMeasurements ? KG_TO_LBS : 1);\n return convertedWeight.toFixed(2);\n }\n\n const MacroProfileRoute = (): JSX.Element => {\n if (!client) {\n throw new Error(\"No client found\");\n }\n\n if (!client.intake) {\n return (\n
\n {\"No intake completed\"}\n\n \n {t(\"coach_mode_view_client.create_user_profile_button_text\")}\n \n
\n );\n }\n\n const userProfileInfoComponent = (\n <>\n \n {t(\"coach_mode_view_client.user_profile_view_heading\")}\n \n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.full_name_label_text\"),\n `${client.first_name || \"\"} ${client.last_name || \"\"}`\n )}\n\n {createUserProfileFieldComponent(t(\"coach_mode_create_new_client.email_label_text\"), client?.email || \"\")}\n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.gender_title_text\"),\n t(`general.gender.${client.intake.gender}`)\n )}\n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.diet_title_text\"),\n t(`general.diets.${client.intake.diet}`)\n )}\n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.activity_title_text\"),\n t(`general.activity.${client.intake.activity}`)\n )}\n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.weight_title_text\"),\n convertAndFormatWeight(client.intake.weight, coach?.uses_imperial_measurements || false)\n )}\n\n {createUserProfileFieldComponent(\n t(\"coach_mode_create_new_client.body_fat_percentage_title_text\"),\n formatNumberAsPercentage(client.intake.body_fat_percentage)\n )}\n \n );\n\n const onSubmitUpdateNameAndDaysForm = async (\n values: DaysSchema,\n nutritionDayPlan: NutritionDayPlan\n ): Promise => {\n const weeklyNutritionPlanId = client?.intake?.weekly_nutrition_plan?.id;\n\n if (!weeklyNutritionPlanId) {\n throw new Error(\"weeklyNutritionPlanId is not set\");\n }\n\n if (!nutritionDayPlan) {\n throw new Error(\"nutritionDayPlan is not set\");\n }\n\n await updateWeeklyNutritionPlanOnBackend({\n id: weeklyNutritionPlanId,\n weeklyNutritionPlanUpdateRequest: {\n name: values.name,\n nutrition_day_plan_id: nutritionDayPlan.id,\n days_to_update_to_nutrition_day_plan_id: values.daysInNutritionPlan,\n },\n });\n };\n\n const onPressDeleteNutritionPlan = (nutritionPlanId: number): void => {\n setNutritionPlanDeletionId(nutritionPlanId);\n onOpenNutritionPlanDeleteConfirmationModal();\n };\n\n const onPressDeleteNutritionPlanAfterConfirmation = async (nutritionPlanId: number): Promise => {\n const weeklyNutritionPlanId = client?.intake?.weekly_nutrition_plan?.id;\n\n if (!weeklyNutritionPlanId) {\n throw new Error(\"weeklyNutritionPlanId is not set\");\n }\n\n await updateWeeklyNutritionPlanOnBackend({\n id: weeklyNutritionPlanId,\n weeklyNutritionPlanUpdateRequest: {\n nutrition_day_plan_id: nutritionPlanId,\n days_to_update_to_nutrition_day_plan_id: [],\n },\n });\n };\n\n const nutritionPlanDeleteConfirmationModal = (\n \n \n \n {t(\"general.dialog_confirmation_question\")}\n\n \n => {\n onCloseNutritionPlanDeleteConfirmationModal();\n\n if (!nutritionPlanDeletionId) {\n throw new Error(\"nutritionPlanDeletionId is not set\");\n }\n\n setNutritionPlanDeletionId(undefined);\n try {\n await onPressDeleteNutritionPlanAfterConfirmation(nutritionPlanDeletionId);\n } catch (error) {\n Sentry.captureException(error);\n\n alert(t(\"nutrition_day_plan.error_while_deleting_nutrition_plan_message\"));\n }\n }}\n bg=\"red.600\"\n testID={\"nutritionPlanDeleteConfirmationModal-confirm-button\"}\n >\n {t(\"nutrition_day_plan.delete_nutrition_plan_button_text\")}\n \n \n \n \n );\n\n const addAdditionalNutritionDayPlanDialog = (\n \n \n \n {t(\"nutrition_day_plan.add_an_additional_nutrition_plan\")}\n\n \n {\n onCloseAddAdditionalNDPDialog();\n\n onPressUpdateOrCreateNutritionDayPlan(\n convertDaysArrayToDaysForNutritionPlan(values.daysInNutritionPlan),\n values.name\n );\n }}\n nutritionDayPlan={undefined}\n disableDaySwitches={false}\n isCreateNewPlanForm={true}\n />\n \n \n
\n );\n\n const clientHasNoWeeklyNutritionPlan = !client?.intake?.weekly_nutrition_plan;\n const createFirstNutritionPlanComponent = (\n \n onPressUpdateOrCreateNutritionDayPlan(EVERY_DAY, DEFAULT_NUTRITION_PLAN_NAME)}\n testID={\"createNutritionPlan-button\"}\n nativeID={\"createNutritionPlanButton\"}\n >\n {`+ ${t(\"nutrition_day_plan.create_button_text\")}`}\n \n \n {t(\"nutrition_day_plan.precreation_comment_text\")}\n \n \n );\n\n const NutritionDayPlanOverviewComponent = (): JSX.Element => (\n \n \n
\n \n {t(\"general.daily_energy_calculation.daily_energy_expenditure\")}\n \n {/* Note: Not in scope */}\n {/* {!isDesktop && (\n \n )} */}\n
\n\n {/* TODO: We need to create the element (Nowak did not create it properly). Perhaps something less fancy? */}\n \n {/* eslint-disable-next-line max-len */}\n {/* */}\n {/* NOTE: Is it really necessary to break this out? */}\n {/* \n \n */}\n \n \n\n \n\n {userProfileInfoComponent}\n\n
\n \n
\n \n\n {!client.intake || clientHasNoWeeklyNutritionPlan ? (\n createFirstNutritionPlanComponent\n ) : (\n \n )}\n\n {addAdditionalNutritionDayPlanDialog}\n
\n );\n\n return isDesktop ? (\n \n \n \n {nutritionPlanDeleteConfirmationModal}\n \n \n ) : (\n <>\n \n {nutritionPlanDeleteConfirmationModal}\n \n );\n };\n const ProgressRoute = (): JSX.Element => (\n \n
\n \n {/* This component is in NavigationStackParams as it is navigated to by the BottomNavigationStack */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n
\n
\n );\n\n const deactivateClientComponent = (\n <>\n \n {t(\n client.account_enabled\n ? \"coach_mode_client_settings.open_deactivate_client_modal_button_text\"\n : \"coach_mode_client_settings.open_activate_client_modal_button_text\"\n )}\n \n {client.account_enabled ? (\n \n {t(\"coach_mode_client_settings.deactivate_client_confirmation_message\")}\n \n ) : null}\n \n );\n\n const isViewingSelf = coach && client.id === coach.id;\n\n const SettingViewMobile = (): JSX.Element => (\n \n {/* TODO: Decide what content is required in here and then delete commented code */}\n {/* {\"settings-icon\"} */}\n {/* \n {t(\"Only the client can change their allergy and diet settings in the profile of their app.\")}\n \n \n {t(\"Personal information\")}\n */}\n
\n \n \n {`${t(\"general.email_address\")}: `}\n \n {client.email}\n \n \n\n \n {`${t(\n \"coach_mode_client_settings.client_active_status_modal.title_text\"\n )}: `}\n \n {`${client.account_enabled ? \"Active\" : \"Inactive\"}`}\n \n \n \n \n\n {isViewingSelf ? null : deactivateClientComponent}\n
\n
\n );\n\n // TODO: Decide what settings are required and then delete commented code. Ideally reuse the mobile component\n // const SettingViewDesktop = (): JSX.Element => (\n // \n // \n // \n // {t(\"Personal information\")}\n // \n // \n // {t(\"E-mail address\")}\n // \n // \n // \n // {t(\"This button will archive the client and de-activate their macro profile:\")}\n // \n // \n // \n // \n // \n // {t(\"Dietary settings\")}\n // \n // \n // {t(\"Only the client can change their allergy and diet settings in the profile of their app.\")}\n // \n // \n // \n // );\n\n const renderScene = SceneMap({\n [ClientViewTab.SETTINGS]: SettingViewMobile,\n [ClientViewTab.NUTRITION_PLAN]: MacroProfileRoute,\n [ClientViewTab.PROGRESS]: ProgressRoute,\n });\n\n // TODO: Not currently in scope. If in scope then replace this with native-base action sheet from the bottom\n // const ModalContent = (): JSX.Element => (\n // \n // \n // \n // {t(\"Calculation method\")}\n // {\n // console.log(\"Inside ModalContent onPress\");\n\n // if (modalizeRef && typeof modalizeRef === \"object\" && modalizeRef.current) {\n // modalizeRef.current.close();\n // } else {\n // logger.error(\"modalizeRef Error\");\n // }\n // }}\n // >\n // {\"close-icon\"}\n // \n // \n // \n // \n // \n // \n // {t(\n // eslint-disable-next-line max-len\n // \"Based on the current personal details of the client. With the Katch & McArdle formula we estimated total calorie expenditure (based on total lean mass).\"\n // )}\n // \n // \n // \n // );\n\n const shouldViewClientPlanOptionBeAvailable = Boolean(client.intake?.weekly_nutrition_plan?.tuesday);\n\n const Header = (): JSX.Element => (\n \n \n navigation.popToTop()}\n source={Images.BackIcon}\n size={24}\n containerStyle={{ marginHorizontal: Scale(20) }}\n testID={\"clientInfoScreen-back-button\"}\n />\n\n {formatUserForDisplay(client)}\n \n\n {shouldViewClientPlanOptionBeAvailable ? (\n \n ) : null}\n \n );\n\n const TabsView = (): JSX.Element => {\n const TabBarView = (\n props: SceneRendererProps & {\n navigationState: NavigationState<{\n key: string;\n title: string;\n }>;\n }\n ): JSX.Element => (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n (\n \n {tabRoute.title}\n \n )}\n />\n );\n\n return (\n (\n <>\n {isDesktop ? (\n \n
\n \n {/* NOTE: The Route type has `title: string | undefined` but we always define it */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n \n ) : (\n // NOTE: The Route type has `title: string | undefined` but we always define it\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n )}\n \n )}\n style={{\n marginTop: VerticalScale(32),\n // backgroundColor: Colors.greyBgColor\n backgroundColor: theme.colors.gray[\"100\"],\n }}\n initialLayout={{ width: layout.width }}\n />\n );\n };\n\n const SelectViewButton = ({ tab, lastButton = false }: { tab: ClientViewTab; lastButton?: boolean }): JSX.Element => (\n {\n setIndex(tab);\n }}\n variant={index === tab ? \"solid\" : \"subtle\"}\n mr={lastButton ? \"0\" : \"2\"}\n testID={`viewClientTab-${_.camelCase(ClientViewTab[tab])}`}\n >\n {/* This works but I am unsure of how to get the compiler to realise it */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n {t(`coach_mode_client_settings.select_view_button.${ClientViewTab[tab]}`)}\n \n );\n\n const ClientInfoWithoutUsingTabs = (): JSX.Element => (\n \n
\n \n
\n \n\n \n \n \n \n \n
\n\n <>\n {index === ClientViewTab.NUTRITION_PLAN ? : null}\n {index === ClientViewTab.SETTINGS ? : null}\n {index === ClientViewTab.PROGRESS ? : null}\n \n
\n );\n\n const headerComponent = isDesktop ? (\n \n \n \n ) : (\n \n {\n logger.debug(\"onPress back button\");\n navigation.popToTop();\n }}\n source={Images.BackIcon}\n size={Scale(20)}\n testID={\"clientInfoScreen-back-button\"}\n />\n {shouldViewClientPlanOptionBeAvailable ? (\n \n ) : null}\n \n );\n\n const tabsComponent = isDesktop ? (\n \n ) : (\n <>\n \n {/* TODO: Decide if we will implement this */}\n {/* eslint-disable-next-line max-len */}\n {/* */}\n {formatUserForDisplay(client)}\n \n \n \n );\n\n const deactivateClientModal = (\n \n \n \n {t(\"coach_mode_client_settings.client_active_status_modal.title_text\")}\n\n \n {client.account_enabled ? (\n \n {t(\"general.dialog_confirmation_question\")}{\" \"}\n {t(\"coach_mode_client_settings.deactivate_client_confirmation_message\")}\n \n ) : null}\n\n \n {\n logger.debug(\"on press Cancel\");\n onCloseDeactivateDialog();\n }}\n variant={\"subtle\"}\n >\n {t(\"general.cancel\")}\n \n\n {\n logger.debug(\"Inside onPress for activate dialog\");\n\n await patchUserBackendCall({\n id: client.id,\n patchedUserRequest: {\n account_enabled: !client.account_enabled,\n },\n });\n\n onCloseDeactivateDialog();\n }}\n ml=\"2\"\n colorScheme={\"danger\"}\n testID={\"deactivateClient-button\"}\n isLoading={isLoadingUpdateUserOnBackend}\n >\n {client.account_enabled\n ? t(\"coach_mode_client_settings.client_active_status_modal.deactivate_button_text\")\n : t(\"coach_mode_client_settings.client_active_status_modal.activate_button_text\")}\n \n \n \n \n \n );\n\n const commonContainerStyle = {\n backgroundColor: \"white\",\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n\n return (\n \n {headerComponent}\n {tabsComponent}\n {deactivateClientModal}\n \n );\n};\nexport default CoachModeClientInfoScreen;\n","import { Divider } from \"native-base\";\nimport React from \"react\";\n\nconst CommonHeaderDivider = (): JSX.Element => ;\n\nexport default CommonHeaderDivider;\n","import type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport { useTheme } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { ImageSourcePropType, Platform, StyleProp, ViewStyle } from \"react-native\";\nimport { FAB, Portal, Provider } from \"react-native-paper\";\nimport { useSelector } from \"react-redux\";\n\nimport { Routes, Scale } from \"../constants\";\nimport Images from \"../constants/images\";\nimport { isMobilePlatform } from \"../helpers/generalHelpers\";\nimport type { OnChooseProduct, RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport type { MealSlotSpecification } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { viewAsUserSelector } from \"../slices/userSlice\";\n\ntype FABGroupAction = {\n icon: ImageSourcePropType;\n label?: string;\n color?: string;\n labelTextColor?: string;\n accessibilityLabel?: string;\n style?: StyleProp;\n labelStyle?: StyleProp;\n small?: boolean;\n onPress: () => void;\n testID?: string;\n};\n\ntype Props = {\n navigation: NativeStackNavigationProp;\n // FIXME: This should be renamed as it has the same name as another function\n addSingleFoodMealToPlanner: OnChooseProduct;\n displayQuickAddModal: () => void;\n mealSlotSpecifications?: MealSlotSpecification[];\n};\n\nconst getQuickOptionsAction = (\n label: string,\n image: ImageSourcePropType,\n onClick: () => void,\n testID: string\n): FABGroupAction => ({\n icon: image,\n label,\n onPress: onClick,\n small: false,\n labelStyle: { backgroundColor: \"transparent\", marginHorizontal: 0 },\n labelTextColor: \"white\",\n style: {\n width: Scale(45),\n height: Scale(45),\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n testID,\n});\n\n// TODO: Rename this to PlannerQuickOptions\nconst FloatingButton = ({\n addSingleFoodMealToPlanner,\n displayQuickAddModal,\n navigation,\n mealSlotSpecifications,\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const [open, setOpen] = useState(false);\n\n const theme = useTheme();\n\n const viewAsUser = useSelector(viewAsUserSelector);\n\n const onChoose: OnChooseProduct = async (product, suggestedServing, quantity, mealSlotSpecificationId) => {\n setOpen(false);\n await addSingleFoodMealToPlanner(product, suggestedServing, quantity, mealSlotSpecificationId);\n\n if (viewAsUser) {\n navigation.pop(1);\n } else {\n navigation.popToTop();\n }\n };\n\n const foodChooseScreenParams = {\n // TODO: This onChoose is passed down many levels: is there a better architecture?\n onChoose,\n chooseMealMoment: true,\n mealSlotSpecifications,\n };\n\n const handleAddProduct = (): void => {\n navigation.push(Routes.AddProductStack, {\n screen: Routes.FoodSearchScreen,\n params: foodChooseScreenParams,\n });\n };\n\n const handleScanProduct = (): void => {\n navigation.push(Routes.AddProductByBarcodeStack, {\n screen: Routes.BarcodeScannerScreen,\n params: foodChooseScreenParams,\n });\n };\n\n const actions = [\n getQuickOptionsAction(\n t(\"planner.quick_options.quick_add_title\"),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n Images.ForkKnifeWhiteIcon,\n displayQuickAddModal,\n \"addQuickMeal-button\"\n ),\n getQuickOptionsAction(\n t(\"planner.quick_options.add_product_title\"),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n Images.AddProductIcon,\n handleAddProduct,\n \"addSingleFoodMeal-button\"\n ),\n ];\n if (isMobilePlatform()) {\n actions.push(\n getQuickOptionsAction(\n t(\"planner.quick_options.scan_barcode_title\"),\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n Images.ScanProductIcon,\n handleScanProduct,\n \"addSingleFoodMealByScanningBarcode-button\"\n )\n );\n }\n\n return (\n \n \n {\n setOpen(!open);\n }}\n testID=\"quickAction-button\"\n />\n \n \n );\n};\n\nexport default FloatingButton;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\n\nconst styles = StyleSheet.create({\n container: { flex: 1, marginBottom: Scale(2) },\n nutrientDiv: {\n width: \"100%\",\n paddingHorizontal: Scale(20),\n height: Scale(30),\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n nutrientHead: {\n fontFamily: FontFamily.medium,\n fontSize: 16,\n lineHeight: Scale(28),\n // color: Colors.darkGreyTextColor,\n },\n nutrientTextDiv: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n nutrientText1: {\n fontFamily: FontFamily.medium,\n fontSize: 12,\n // color: Colors.largeTextColor,\n lineHeight: Scale(28),\n },\n nutrientText2: {\n fontFamily: FontFamily.medium,\n fontSize: 12,\n // color: Colors.darkGreyTextColor,\n lineHeight: Scale(28),\n },\n progressBarDiv: { paddingLeft: 20, width: Scale(10), marginTop: Scale(5) },\n progressBarContainer: { paddingHorizontal: Scale(20) },\n});\n\nexport default styles;\n","import { useTheme } from \"native-base\";\nimport React from \"react\";\nimport { StyleProp, Text, TextStyle, View, ViewStyle } from \"react-native\";\n\nimport ProgressBar from \"../commons/ProgressBar\";\nimport { formatNumberAsWholeNumber } from \"../helpers/generalHelpers\";\nimport styles from \"./MacroTargetInfoStyle\";\n\ntype MacroTargetInfoProps = {\n title: string;\n style?: StyleProp | StyleProp;\n targetValue?: number;\n actualValue?: number;\n showProgressBar?: boolean;\n showTarget?: boolean;\n};\n\nconst MacroTargetInfo = ({\n title,\n style,\n targetValue,\n actualValue,\n showProgressBar = true,\n showTarget = true,\n}: MacroTargetInfoProps): JSX.Element => {\n const theme = useTheme();\n\n return (\n \n \n {title}\n \n \n {formatNumberAsWholeNumber(actualValue || 0)}\n \n {showTarget ? (\n \n /{formatNumberAsWholeNumber(targetValue || 0)}\n \n ) : null}\n \n \n\n {showProgressBar && showTarget ? (\n \n \n \n ) : null}\n \n );\n};\nexport default MacroTargetInfo;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\n\nconst style = StyleSheet.create({\n addMoreContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: Scale(5),\n paddingVertical: Scale(8),\n borderWidth: StyleSheet.hairlineWidth,\n },\n mainContainer: {\n paddingVertical: Scale(20),\n paddingHorizontal: Scale(15),\n // backgroundColor: Colors.whiteColor,\n },\n textContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n marginTop: Scale(5),\n marginBottom: Scale(20),\n },\n head: {\n fontSize: Scale(20),\n // color: Colors.largeTextColor,\n lineHeight: Scale(28),\n fontWeight: \"600\",\n },\n mealBox: {\n marginTop: Scale(20),\n height: Scale(112),\n width: \"100%\",\n // backgroundColor: Colors.grey,\n justifyContent: \"center\",\n alignItems: \"center\",\n flexDirection: \"row\",\n },\n mealBoxText: {\n fontSize: Scale(16),\n lineHeight: Scale(24),\n // color: Colors.greyTextColor,\n marginLeft: Scale(13.34),\n },\n text: {\n fontSize: Scale(12),\n // color: Colors.largeTextColor,\n lineHeight: Scale(16),\n },\n nutrientTextDiv: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n nutrientText1: {\n fontFamily: FontFamily.medium,\n fontSize: 12,\n // color: Colors.largeTextColor,\n lineHeight: Scale(25),\n },\n nutrientText2: {\n fontFamily: FontFamily.medium,\n fontSize: 12,\n // color: Colors.darkGreyTextColor,\n lineHeight: Scale(25),\n },\n titleDiv: { flex: 1, display: \"flex\", flexDirection: \"row\" },\n});\n\nexport default style;\n","import type { Dispatch } from \"@reduxjs/toolkit\";\nimport type { PrefetchOptions } from \"@reduxjs/toolkit/dist/query/core/module\";\nimport _ from \"lodash\";\nimport type { Moment } from \"moment\";\n// eslint-disable-next-line import/no-named-default\nimport { default as MomentLib } from \"moment\";\nimport { extendMoment } from \"moment-range\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { USER_LOGOUT_ACTION } from \"../../../store\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n CalendarDay,\n CalendarItem,\n CalendarItemContentTypeEnum,\n Food,\n IngredientPostRequest,\n Meal,\n MealMomentEnum,\n MealSlotSpecification,\n NutritionDayPlan,\n PaginatedCalendarDayList,\n PlannerCalendarDayListApiArg,\n SuggestedServing,\n User,\n WeeklyNutritionPlan,\n} from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { FoodById, foodSlice } from \"../slices/foodSlice\";\nimport { CalendarDayByDate, currentDayInPlannerSelector, plannerSlice } from \"../slices/plannerSlice\";\nimport { authTokenSelector, userSelector, viewAsUserSelector } from \"../slices/userSlice\";\nimport type {\n CreateSingleFoodMeal,\n DayOfWeekString,\n FoodIngredientCreate,\n MacroName,\n PlannerCalendarDayCreate,\n PlannerCalendarItemCreate,\n PlannerPlanSingleFoodMealCreateMutation,\n} from \"../types\";\nimport { formatMomentAsBackendFormatDateString } from \"./generalHelpers\";\nimport { logout } from \"./logout\";\nimport { isUserLoggedIn } from \"./userHelpers\";\n\nconst { usePlannerCalendarDayCreateMutation, usePlannerCalendarDayListQuery, useUsersAuthUsersMeRetrieveQuery } =\n backendApi;\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const moment = extendMoment(MomentLib);\n\nconst getPlannerArgs = (\n startDate: Moment\n): {\n dateGte?: string | undefined;\n dateLt?: string | undefined;\n} => ({\n dateGte: formatMomentAsBackendFormatDateString(startDate),\n dateLt: formatMomentAsBackendFormatDateString(moment(startDate).add(1, \"days\")),\n});\n\nfunction createBlankCalendarDay(date: Moment, user: User, weeklyNutritionPlan: WeeklyNutritionPlan): CalendarDay {\n return {\n user: user?.id,\n date: formatMomentAsBackendFormatDateString(date),\n calendar_items: [],\n };\n}\n\n// FIXME: Make this function take an object parameter, not individual parameters\nexport const createCalendarDay = async (\n date: Moment,\n createNewCalendarDay: PlannerCalendarDayCreate,\n dispatch: Dispatch,\n user: User,\n weeklyNutritionPlan: WeeklyNutritionPlan,\n calendarDaysInStore: CalendarDayByDate,\n isLoadingCreateNewCalendarDay: boolean,\n isLoadingCalendarDayList: boolean\n): Promise => {\n logger.debug(\"Inside createCalendarDay\");\n const calendarDayToBeCreated = createBlankCalendarDay(date, user, weeklyNutritionPlan);\n\n const isCalendarDayNotInStore = calendarDaysInStore[calendarDayToBeCreated.date] === undefined;\n logger.debug(\n `isCalendarDayNotInStore for ${moment(calendarDayToBeCreated.date).format(\"DD-MM-YYYY\")}:`,\n isCalendarDayNotInStore\n );\n\n const isPayloadValid = calendarDayToBeCreated.user !== undefined;\n\n const notInFlight = !isLoadingCreateNewCalendarDay || !isLoadingCalendarDayList;\n\n logger.debug(\"Before usePlannerCalendarDayCreateMutation()\");\n if (isPayloadValid && isCalendarDayNotInStore && notInFlight) {\n // logger.debug(\"Creating new calendarDay for date: \", calendarDayToBeCreated.date);\n logger.debug(\"Creating new calendar day:\", calendarDayToBeCreated);\n const calendarDay = await createNewCalendarDay({\n calendarDayRequest: calendarDayToBeCreated,\n }).unwrap();\n logger.debug(\"Got calendarDay: \", calendarDay);\n dispatch(plannerSlice.actions.storeCalendarDay(calendarDay));\n }\n logger.debug(\"After usePlannerCalendarDayCreateMutation()\");\n return undefined;\n};\n\nconst CALENDAR_DAY_POLLING_INTERVAL_MS = 30 * 1000;\nexport function getPlannerData(): {\n isLoadingCalendarDayList: boolean;\n isFetchingCalendarDayList: boolean;\n isLoadingCreateNewCalendarDay: boolean;\n refetchCalendarDays: () => void;\n calendarDayListResponse: PaginatedCalendarDayList | undefined;\n plannerArgs: PlannerCalendarDayListApiArg;\n createNewCalendarDay: PlannerCalendarDayCreate;\n user: User | null;\n} {\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const calendarFetchStartDate = useSelector(currentDayInPlannerSelector);\n\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const viewAsUser = useSelector(viewAsUserSelector);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const realUser = useSelector(userSelector);\n const user = viewAsUser || realUser;\n\n const plannerArgs = getPlannerArgs(calendarFetchStartDate);\n\n // TODO: To avoid awkward logic and race condition we should create a getOrCreate endpoint for the CalendarDay model\n const {\n isLoading: isLoadingCalendarDayList,\n isFetching: isFetchingCalendarDayList,\n data: calendarDayListResponse,\n error: errorRetrivingCalendarDayList,\n refetch: refetchCalendarDays,\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n } = usePlannerCalendarDayListQuery(\n { ...plannerArgs, user: user?.id },\n { skip: !isUserLoggedIn(user), pollingInterval: CALENDAR_DAY_POLLING_INTERVAL_MS }\n );\n\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const [createNewCalendarDay, { isLoading: isLoadingCreateNewCalendarDay }] = usePlannerCalendarDayCreateMutation();\n\n return {\n isLoadingCalendarDayList,\n isFetchingCalendarDayList,\n refetchCalendarDays,\n calendarDayListResponse,\n plannerArgs,\n createNewCalendarDay,\n user,\n isLoadingCreateNewCalendarDay,\n };\n}\n\nexport async function createCalendarDays(\n calendarDayListResponse: PaginatedCalendarDayList,\n dispatch: Dispatch,\n plannerArgs: PlannerCalendarDayListApiArg,\n createNewCalendarDay: PlannerCalendarDayCreate,\n user: User,\n weeklyNutritionPlan: WeeklyNutritionPlan,\n isLoadingCreateNewCalendarDay: boolean,\n isLoadingCalendarDayList: boolean,\n calendarDaysInStore: CalendarDayByDate\n): Promise {\n if (isLoadingCalendarDayList) {\n return;\n }\n\n _.forEach(calendarDayListResponse?.results, (calendarDay) => {\n dispatch(plannerSlice.actions.storeCalendarDay(calendarDay));\n });\n // TODO: The calendar logic should be separated into a different function\n const { dateGte, dateLt } = plannerArgs;\n const rangeByDate = moment.range(moment(dateGte), moment(dateLt).subtract(1, \"days\")).by(\"days\");\n const days = Array.from(rangeByDate);\n const dates = days.map((m) => moment(m.format(\"YYYY-MM-DD\")));\n logger.trace(\"dates from planner args: \", dates);\n // TODO: Abstract this logic into a function\n const datesWithoutCalendarDays: Moment[] = _.filter(\n dates,\n (date: Moment) =>\n !_.find(\n calendarDayListResponse?.results,\n (calendarDay: CalendarDay) => calendarDay.date === formatMomentAsBackendFormatDateString(date)\n )\n );\n logger.trace(\"datesWithoutCalendarDays: \", datesWithoutCalendarDays);\n // TODO: Make sure the days are separate days and there is no overlap\n // eslint-disable-next-line no-restricted-syntax\n for (const date of datesWithoutCalendarDays) {\n logger.debug(\"Creating calendarDay for date: \", date.format(\"YYYY-MM-DD\"));\n // eslint-disable-next-line no-await-in-loop\n await createCalendarDay(\n date,\n createNewCalendarDay,\n dispatch,\n user,\n weeklyNutritionPlan,\n // TODO: Just pass in useSelector so the function can fetch its own data\n calendarDaysInStore,\n isLoadingCreateNewCalendarDay,\n isLoadingCalendarDayList\n );\n }\n}\n\n// TODO: This should be in a userHelpers or generalHelpers file\nexport function getUserData(): { user: User | undefined; isLoadingUserQuery: boolean; refetchUser: () => void } {\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const authToken = useSelector(authTokenSelector);\n\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const dispatch = useDispatch();\n\n const {\n isLoading: isLoadingUserQuery,\n error,\n data: returnedUser,\n refetch: refetchUser,\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n } = useUsersAuthUsersMeRetrieveQuery(undefined, { skip: !authToken });\n\n const is401Error = error && \"status\" in error && error.status === 401;\n if (is401Error) {\n logger.debug(\"Error retrieving current user: \", error);\n logout(dispatch);\n }\n\n return { isLoadingUserQuery, user: returnedUser, refetchUser };\n}\n\n// TODO: moment.js uses capitalised day strings by default, should we follow this convention in our code?\nexport const getDayOfWeekAsString = (day: Moment): DayOfWeekString =>\n day.locale(\"en\").format(\"dddd\").toLowerCase() as DayOfWeekString;\n\nexport async function addMealToPlanner({\n currentCalendarDay,\n mealSlot,\n meal,\n mealContentType,\n createCalendarItem,\n refetchCalendarDays,\n}: {\n currentCalendarDay: CalendarDay;\n meal: Meal;\n mealContentType: CalendarItemContentTypeEnum;\n mealSlot: MealSlotSpecification;\n createCalendarItem: PlannerCalendarItemCreate;\n refetchCalendarDays: () => void;\n}): Promise {\n if (!currentCalendarDay) {\n throw new Error(\"No calendarDay provided\");\n }\n if (!mealSlot) {\n throw new Error(\"No mealSlot provided\");\n }\n\n if (!meal.id) {\n throw new Error(\"No meal.id provided\");\n }\n\n if (!currentCalendarDay.id) {\n throw new Error(\"No currentCalendarDay.id provided\");\n }\n\n const calendarItemToCreate: CalendarItem = {\n meal_slot: mealSlot.id,\n meal_moment: mealSlot.meal_moment,\n meal,\n object_id: meal.id,\n content_type: mealContentType,\n calendar_day: currentCalendarDay.id,\n // NOTE: This is just to make the type compiler happy, the backend will auto-populate this field\n modified: \"\",\n };\n await createCalendarItem({ calendarItemRequest: calendarItemToCreate }).unwrap();\n refetchCalendarDays();\n}\n\nexport async function addSingleFoodMealToPlanner({\n food,\n currentCalendarDay,\n suggestedServing,\n quantity,\n mealSlot,\n planSingleFoodMealBackendCall,\n dispatch,\n}: {\n food: Food;\n suggestedServing: SuggestedServing;\n quantity: number;\n currentCalendarDay: CalendarDay;\n mealSlot: MealSlotSpecification;\n refetchCalendarDays: () => void;\n dispatch: Dispatch;\n planSingleFoodMealBackendCall: PlannerPlanSingleFoodMealCreateMutation;\n}): Promise {\n if (currentCalendarDay === undefined) {\n logger.error(\"calendarDay is undefined\");\n // TODO: Surface error to user\n }\n\n dispatch(foodSlice.actions.storeFood(food));\n\n if (!currentCalendarDay.id) {\n return Promise.reject(new Error(\"No calendar day id\"));\n }\n if (!suggestedServing.id) {\n return Promise.reject(new Error(\"No suggested serving id\"));\n }\n\n await planSingleFoodMealBackendCall({\n planSingleFoodMealRequest: {\n calendar_day_id: currentCalendarDay.id,\n meal_slot_id: mealSlot.id,\n quantity,\n suggested_serving_id: suggestedServing.id,\n },\n });\n return Promise.resolve();\n}\n\nexport const getActualValueForMacro = (calendarItems: CalendarItem[], macro: MacroName): number =>\n _.sumBy(calendarItems, (calendarItem) => _.get(calendarItem.meal, macro, 0));\n\nexport const getTargetValueForMacro = (nutritionPlan: NutritionDayPlan, macro: MacroName): number =>\n _.sumBy(nutritionPlan?.meal_slot_specifications, (mealSlotSpecification) => mealSlotSpecification[macro] || 0);\n\nexport const findMatchingSuggestedServing = (f: Food, suggestedServingId: number): SuggestedServing | undefined =>\n _.find(f?.suggested_servings, { id: suggestedServingId });\n\nexport const findFoodBySuggestedServingId = (suggestedServingId: number, foodsById: FoodById): Food | undefined =>\n _.find(foodsById, (f) => Boolean(findMatchingSuggestedServing(f, suggestedServingId)));\n\nconst RANKED_MEAL_MOMENTS: { [M in MealMomentEnum]: number } = {\n BREAKFAST: 1,\n MORNING_SNACK: 2,\n LUNCH: 3,\n AFTERNOON_SNACK: 4,\n DINNER: 5,\n SNACK: 6,\n LATE_SNACK: 7,\n};\n\nexport const sortMealSlotSpecificationsByMealMoment = (\n mealSlotSpecifications: MealSlotSpecification[]\n): MealSlotSpecification[] => _.sortBy(mealSlotSpecifications, (mss) => RANKED_MEAL_MOMENTS[mss.meal_moment]);\n\nexport const generateMealsPrefetchOptions: PrefetchOptions = {\n ifOlderThan: 60 * 60 * 1000, // 1 hour\n};\n\n/**\n * Returns a date string, format \"YYYY-MM-DD\",\n * of the last date there are meals planned with the same nutrition day plan id\n */\nexport const findLastDateThereAreMealsPlannedWithThisNutritionDayPlan = (\n nutritionPlanForCurrentDay: NutritionDayPlan | undefined,\n weeklyNutritionPlan: WeeklyNutritionPlan | null | undefined,\n currentDayInPlanner: Moment,\n calendarDaysInStore: CalendarDayByDate\n): CalendarDay | undefined => {\n const maximumHowManyDaysToLookBack = 14;\n\n const todaysNutritionDayPlanId = nutritionPlanForCurrentDay?.id;\n if (!todaysNutritionDayPlanId) {\n return undefined;\n }\n\n if (!weeklyNutritionPlan) {\n return undefined;\n }\n\n // use a while loop to loop over the past maximumHowManyDaysToLookBack days\n // and check if there are any days with the same nutrition day plan id\n // if there are then return that day\n\n let i = 1;\n while (i < maximumHowManyDaysToLookBack) {\n const dateToCheck = moment(currentDayInPlanner).subtract(i, \"days\");\n const dateToCheckFormattedAsString = formatMomentAsBackendFormatDateString(dateToCheck);\n const calendarDayToCheck = calendarDaysInStore[dateToCheckFormattedAsString];\n\n const dayOfWeekForDate = getDayOfWeekAsString(moment(dateToCheck));\n\n const isThisDayTheSameNDPAsToday = weeklyNutritionPlan[dayOfWeekForDate]?.id === todaysNutritionDayPlanId;\n\n if (isThisDayTheSameNDPAsToday) {\n if (calendarDayToCheck?.calendar_items && calendarDayToCheck?.calendar_items.length > 0) {\n return calendarDayToCheck;\n }\n }\n\n i += 1;\n }\n\n return undefined;\n};\n","import type { RecipeMeal } from \"../services/backendTypes\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport function getTestIDForRecipeMeal(recipeMeal: RecipeMeal): string {\n return `planned-recipeMeal-${recipeMeal.recipe_template.source_provider}-${\n recipeMeal.recipe_template.id || \"MISSING_ID\"\n }`;\n}\n","import { AntDesign, Ionicons, MaterialCommunityIcons, MaterialIcons } from \"@expo/vector-icons\";\nimport { Button, Icon, IconButton, Image, Spinner, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Pressable, Text, TouchableOpacity, View } from \"react-native\";\nimport { useSelector } from \"react-redux\";\n\nimport { isDesktopScreen, Scale } from \"../constants\";\nimport { HORMONE_HEX_COLOR } from \"../constants/theme\";\nimport { findFoodBySuggestedServingId, findMatchingSuggestedServing } from \"../helpers/diaryHelpers\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport { getServingDescriptionText } from \"../helpers/foodHelpers\";\nimport { getRecipeMealImage } from \"../helpers/generalHelpers\";\nimport { getTestIDForRecipeMeal } from \"../helpers/testHelpers\";\nimport { doesOrganisationHaveManagedPlanning, getOrganisation } from \"../helpers/userHelpers\";\nimport styles from \"../screens/DiaryViewScreenStyles\";\nimport type {\n CalendarItemContentTypeEnum,\n CalendarItemStatusEnum,\n Meal,\n QuickAddMeal,\n RecipeMeal,\n SingleFoodMeal,\n} from \"../services/backendTypes\";\nimport { FoodById, foodSelector } from \"../slices/foodSlice\";\nimport { userSelector, viewAsUserSelector } from \"../slices/userSlice\";\n\ntype CalendarItemComponentBaseProps = {\n onPress: () => void;\n onLongPress: () => void;\n // NOTE: This is kept because it may be used in the near future\n // eslint-disable-next-line react-redux/no-unused-prop-types\n testID?: string;\n onPressCalendarItemPlannedStatus?: () => void;\n editable?: boolean;\n};\n\ninterface CalendarItemComponentProps extends CalendarItemComponentBaseProps {\n meal: Meal;\n status: CalendarItemStatusEnum;\n onSwap?: () => Promise;\n contentType: CalendarItemContentTypeEnum;\n isLoading: boolean;\n editable?: boolean;\n onListAlternativesPress: () => void;\n}\n\ninterface SingleFoodOrQuickAddMealPlannerItemProps extends CalendarItemComponentBaseProps {\n isEaten: boolean;\n title: string;\n description: string;\n}\n\ninterface RecipeMealPlannerItemProps extends CalendarItemComponentBaseProps {\n isEaten: boolean;\n recipeMeal: RecipeMeal;\n isLoading: boolean;\n onSwap?: () => void;\n onPressCalendarItemPlannedStatus: () => void;\n onListAlternativesPress: () => void;\n}\n\nconst CheckboxComponent = ({\n onPress,\n checked,\n testID,\n}: {\n onPress: () => void;\n checked: boolean;\n testID?: string;\n}): JSX.Element => {\n const theme = useTheme();\n\n const [submitted, setSubmitted] = React.useState(false);\n\n const onPressCheckbox = (): void => {\n setSubmitted(true);\n onPress();\n\n setTimeout(() => {\n setSubmitted(false);\n }, 750);\n };\n\n return (\n // NOTE: The Checkbox does not update when the checked prop changes\n // (probably something to do with it being a controlled form component).\n // As such, we wrap it in a View for use in the tests\n <>\n {!submitted ? (\n \n \n \n ) : (\n \n )}\n \n );\n};\n\nconst RecipeMealPlannerItem = ({\n isEaten,\n recipeMeal,\n onPress,\n onSwap,\n onLongPress,\n onPressCalendarItemPlannedStatus,\n onListAlternativesPress,\n isLoading = false,\n editable = true,\n}: RecipeMealPlannerItemProps): JSX.Element => {\n const theme = useTheme();\n const { t } = useTranslation();\n const user = useSelector(userSelector);\n\n const hasHormoneTag = recipeMeal.recipe_template.tags?.some((tag) => tag.name === \"HORMONE\");\n const showHormoneIndicator = hasHormoneTag && isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES);\n\n return (\n \n \n \n\n {/* Hormone indicator */}\n {showHormoneIndicator ? (\n \n \n \n ) : null}\n\n {/* Dark overlay for text readability */}\n \n\n {/* Loading spinner overlay */}\n {isLoading ? (\n \n \n \n ) : null}\n\n {/* Text overlay */}\n \n \n {recipeMeal.recipe_template.name}\n \n \n {`${Math.round(recipeMeal.kcal)} kcal • ${recipeMeal.recipe_template.preparation_time_min} min`}\n \n \n \n\n {/* Buttons below the image */}\n \n }\n isLoading={isLoading}\n testID={`delete-recipeMeal-${recipeMeal.id}`}\n variant=\"outline\"\n flex={1}\n colorScheme=\"gray\"\n size=\"md\"\n borderRadius={8}\n _text={{ fontWeight: \"medium\", color: \"gray.600\" }}\n >\n {t(\"general.delete\")}\n \n\n }\n isLoading={isLoading}\n testID={`swap-recipeMeal-${recipeMeal.id}`}\n variant=\"solid\"\n flex={1}\n colorScheme=\"primary\"\n size=\"md\"\n borderRadius={8}\n _text={{ fontWeight: \"medium\" }}\n >\n {t(\"planner.recipe.replace\")}\n \n \n \n );\n};\n\nconst SingleFoodOrQuickAddMealPlannerItem = ({\n isEaten,\n title,\n description,\n onLongPress,\n onPress,\n onPressCalendarItemPlannedStatus,\n testID,\n editable = true,\n}: SingleFoodOrQuickAddMealPlannerItemProps): JSX.Element => {\n const theme = useTheme();\n return (\n \n \n \n {title}\n \n \n {description}\n \n \n {editable ? (\n \n onPressCalendarItemPlannedStatus && onPressCalendarItemPlannedStatus()}\n checked={isEaten}\n testID={`calendarItem-${isEaten ? \"EATEN\" : \"PLANNED\"}-singleFoodMealOrQuickAddMeal-NO_ID_PROVIDED`}\n />\n \n ) : null}\n\n }\n onPress={onLongPress}\n accessibilityLabel=\"Delete item\"\n style={{ marginHorizontal: 10 }}\n />\n \n );\n};\n\nconst CalendarItemComponent = ({\n meal,\n status,\n contentType,\n onPress,\n onSwap,\n onLongPress,\n onPressCalendarItemPlannedStatus,\n onListAlternativesPress,\n editable = true,\n isLoading = false,\n}: CalendarItemComponentProps): JSX.Element | null => {\n const { t } = useTranslation();\n const foodsById: FoodById = useSelector(foodSelector);\n const checkIsEatenStatus = (statusValue: CalendarItemStatusEnum): boolean => statusValue === \"EATEN\";\n\n const createSingleFoodMealPlannerItem = (): JSX.Element | null => {\n const singleFoodMeal: SingleFoodMeal = meal as SingleFoodMeal;\n let suggestedServing = singleFoodMeal.ingredient.suggested_serving;\n let foodName = singleFoodMeal.ingredient.name;\n\n if (typeof suggestedServing === \"number\") {\n const suggestedServingId = suggestedServing;\n // NOTE: Food is sometimes undefined when diaryscreen loads\n const food = findFoodBySuggestedServingId(suggestedServingId, foodsById);\n if (food) {\n foodName = food.name;\n suggestedServing = findMatchingSuggestedServing(food, suggestedServingId);\n }\n }\n\n if (suggestedServing) {\n const { nonEditableDescription } = getServingDescriptionText(suggestedServing, singleFoodMeal.ingredient);\n\n return (\n \n );\n }\n return null;\n };\n\n const createQuickAddMealPlannerItem = (): JSX.Element | null => {\n const quickAddMeal: QuickAddMeal = meal as QuickAddMeal;\n\n return (\n \n );\n };\n\n switch (contentType) {\n case \"singlefoodmeal\":\n return createSingleFoodMealPlannerItem();\n case \"recipemeal\":\n // eslint-disable-next-line no-case-declarations\n const recipeMeal: RecipeMeal = meal as RecipeMeal;\n\n if (!onPressCalendarItemPlannedStatus) {\n throw new Error(\"onPressCalendarItemPlannedStatus is required for RecipeMeal CalendarItem\");\n }\n\n return (\n \n );\n case \"quickaddmeal\":\n return createQuickAddMealPlannerItem();\n default:\n return null;\n }\n};\n\nexport default CalendarItemComponent;\n","import { Entypo } from \"@expo/vector-icons\";\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { AlertDialog, Button, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Button as NativeButton, Text, View } from \"react-native\";\nimport { useSelector } from \"react-redux\";\n\nimport ProgressBar from \"../commons/ProgressBar\";\nimport { Routes, Scale } from \"../constants\";\nimport { formatMomentAsBackendFormatDateString, formatNumberAsWholeNumber, isIos } from \"../helpers/generalHelpers\";\nimport {\n doesOrganisationHaveManagedPlanning,\n FeatureFlag,\n getOrganisation,\n isFeatureFlagEnabled,\n} from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n CalendarDay,\n CalendarItem,\n CalendarItemStatusEnum,\n Meal,\n MealSlotSpecification,\n RecipeMeal,\n SingleFoodMeal,\n} from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { currentDayInPlannerSelector } from \"../slices/plannerSlice\";\nimport { userSelector, viewAsUserSelector } from \"../slices/userSlice\";\nimport styles from \"./MacroTargetInfoStyle\";\nimport style from \"./MealsCategoryCardStyles\";\nimport CalendarItemComponent from \"./PlannerItem\";\n\nconst {\n usePlannerCalendarItemDestroyMutation,\n usePlannerCalendarItemPartialUpdateMutation,\n useFoodIngredientPartialUpdateMutation,\n usePlannerAutoPlanDayCreateMutation,\n} = backendApi;\n\ntype Props = {\n title?: string;\n color?: string;\n actualValue: number;\n targetValue: number;\n currentCalendarDay: CalendarDay;\n calendarItems?: CalendarItem[];\n mealSlotSpecification: MealSlotSpecification;\n navigation: NativeStackNavigationProp;\n onPressPlannedStatus: (arg0: number, arg1?: string) => void;\n refetchCalendarDays: () => void;\n onPressAddMoreComponent: () => void;\n onPressPlanNewMeal: () => void;\n onPressMenu: () => void;\n showTarget?: boolean;\n};\n\nconst MealSlotInPlanner = ({\n title,\n color,\n actualValue,\n targetValue,\n currentCalendarDay,\n calendarItems,\n mealSlotSpecification,\n navigation,\n onPressPlannedStatus,\n refetchCalendarDays,\n onPressAddMoreComponent,\n onPressPlanNewMeal,\n onPressMenu,\n showTarget = true,\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const theme = useTheme();\n\n const [autoPlanDay, { isLoading: isLoadingAutoPlanDay }] = usePlannerAutoPlanDayCreateMutation();\n const currentDayInPlanner = useSelector(currentDayInPlannerSelector);\n const viewAsUser = useSelector(viewAsUserSelector);\n const realUser = useSelector(userSelector);\n const user = viewAsUser || realUser;\n\n const organisation = user ? getOrganisation(user) : null;\n const productLoggingIsDisabled = isFeatureFlagEnabled(organisation || null, FeatureFlag.DisableProductLogging);\n\n const [updateCalendarItem, { isLoading: isLoadingUpdateCalendarItem }] =\n usePlannerCalendarItemPartialUpdateMutation();\n const [updateSingleFoodMealIngredient, { isLoading: isLoadingUpdateSingleFoodMealIngredient }] =\n useFoodIngredientPartialUpdateMutation();\n\n const [calendarItemToDeleteId, setCalendarItemToDeleteId] = React.useState(undefined);\n const [isOpenDeleteMenu, setIsOpenDeleteMenu] = React.useState(false);\n\n const createPlannerItemFromCalendarItem = ({\n content_type: contentType,\n meal,\n meal_slot: mealSlot,\n status,\n id,\n }: CalendarItem): JSX.Element => {\n const onPressCalendarItemPlannedStatus = async (): Promise => {\n if (!id) {\n throw new Error(\"id is undefined\");\n }\n if (!meal.id) {\n throw new Error(\"meal.id is undefined\");\n }\n\n onPressPlannedStatus(meal.id, title);\n\n const newStatus: CalendarItemStatusEnum = status === \"PLANNED\" ? \"EATEN\" : \"PLANNED\";\n await updateCalendarItem({ id, patchedCalendarItemRequest: { status: newStatus } }).unwrap();\n return refetchCalendarDays();\n };\n\n const onSwapCalendarItem = async (): Promise => {\n // Note: We only swap recipemeals\n if (contentType !== \"recipemeal\") {\n return;\n }\n\n if (!user) {\n throw new Error(\"user is undefined\");\n }\n\n await autoPlanDay({\n autoPlannerRequest: {\n date: formatMomentAsBackendFormatDateString(currentDayInPlanner),\n user: user.id,\n meal_slot_ids: [mealSlot],\n },\n });\n };\n\n const onPressCalendarItem = (): void => {\n if (contentType === \"recipemeal\") {\n const recipeMealEditable = !isFeatureFlagEnabled(organisation || null, FeatureFlag.DisableProductLogging);\n\n navigation.push(Routes.AddRecipeTemplateStack, {\n // NOTE: We are probably defining the screen types wrong\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n screen: Routes.RecipeDetailScreen,\n params: {\n recipeMeal: meal,\n mealSlotSpecification,\n mealType: \"RecipeMeal\",\n viewOnly: true,\n editable: recipeMealEditable,\n portionsEditable: true,\n },\n });\n } else if (contentType === \"singlefoodmeal\") {\n if (!(meal as SingleFoodMeal).ingredient || !(meal as SingleFoodMeal).ingredient.id) {\n throw new Error(\"meal.ingredient.id is undefined\");\n }\n\n navigation.push(Routes.AddProductStack, {\n screen: Routes.AddIngredientScreen,\n params: {\n onChoose: async (product, suggestedServing, quantity) => {\n await updateSingleFoodMealIngredient({\n // We explicitly check that id is not undefined above\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n id: (meal as SingleFoodMeal).ingredient.id,\n patchedIngredientRequest: {\n suggested_serving: suggestedServing,\n quantity,\n },\n }).unwrap();\n navigation.pop(1);\n refetchCalendarDays();\n },\n ingredient: (meal as SingleFoodMeal).ingredient,\n },\n });\n }\n };\n\n const handleListAlternativesPress = (): void => {\n navigation.push(Routes.RecipeSearchScreen, {\n mealSlotSpecification,\n currentCalendarDay,\n calendarItemToReplace: id,\n });\n };\n\n const onLongPressCalendarItem = (): void => {\n logger.debug(\"onLongPressCalendarItem\");\n setIsOpenDeleteMenu(true);\n\n setCalendarItemToDeleteId(id);\n };\n\n // TODO: Memoize this (but it is difficult to use the useCallback\n // hook because we are inside a function (not a react component))\n return (\n handleListAlternativesPress()}\n isLoading={isLoadingAutoPlanDay || isLoadingUpdateCalendarItem}\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n onPressCalendarItemPlannedStatus={onPressCalendarItemPlannedStatus}\n status={status || \"PLANNED\"}\n contentType={contentType}\n editable={!productLoggingIsDisabled}\n />\n );\n };\n const [deleteCalendarItemOnBackend, { isLoading: isLoadingDeleteCalendarItemOnBackend }] =\n usePlannerCalendarItemDestroyMutation();\n const deleteCalendarItem = async (calendarItemId: number): Promise => {\n if (!calendarItemId) {\n throw new Error(\"calendarItemId is undefined\");\n }\n\n if (calendarItemId) {\n await deleteCalendarItemOnBackend({ id: calendarItemId }).unwrap();\n setIsOpenDeleteMenu(false);\n refetchCalendarDays();\n }\n };\n\n const onClose = (): void => setIsOpenDeleteMenu(false);\n const cancelRef = React.useRef(null);\n const deleteMealComponent = (\n \n \n \n {t(\"planner.delete_meal_confirm_button_text\")}\n \n \n \n {\n if (!calendarItemToDeleteId) throw new Error(\"calendarItemToDeleteId is undefined\");\n await deleteCalendarItem(calendarItemToDeleteId);\n }}\n testID=\"delete-planned-meal-modal-confirm-button\"\n >\n {t(\"general.delete\")}\n \n \n \n \n \n );\n\n const disablePlanMealAction = !currentCalendarDay;\n\n const planMealComponent = (\n \n \n \n );\n\n // TODO: memo() or useCallback()?\n const renderItemFunction = (index: number, calendarItem: CalendarItem): JSX.Element =>\n createPlannerItemFromCalendarItem(calendarItem);\n\n // TODO: We should consider sorting by created_at but this property does not exist on the model\n const headerComponent = (\n \n <>\n \n {title}\n \n \n \n {/* NOTE: This View is necessary for the styling */}\n \n \n {formatNumberAsWholeNumber(actualValue)}\n \n {showTarget ? `/${formatNumberAsWholeNumber(targetValue)} ${t(\"general.kcal\")}` : ` ${t(\"general.kcal\")}`}\n \n \n {showTarget ? (\n \n \n \n ) : null}\n \n \n );\n\n const sortedCalendarItems = _.sortBy(calendarItems, [(item) => (item.content_type === \"recipemeal\" ? 0 : 1), \"id\"]);\n\n return (\n \n {headerComponent}\n {!_.isEmpty(calendarItems) ? (\n <>\n {sortedCalendarItems.map((item, index) => renderItemFunction(index, item))}\n\n {organisation && doesOrganisationHaveManagedPlanning(organisation) ? null : (\n \n \n \n )}\n \n ) : (\n planMealComponent\n )}\n {deleteMealComponent}\n \n );\n};\n\nexport default MealSlotInPlanner;\n","import { Formik } from \"formik\";\nimport { Button, FormControl, Input, Select, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport * as Yup from \"yup\";\n\nimport { formatMealType } from \"../helpers/generalHelpers\";\nimport type { MealSlotSpecification } from \"../services/backendTypes\";\nimport styles from \"./QuickAddModalStyles\";\n\nconst QuickAddModal = ({\n mealSlotSpecifications,\n createQuickAddMeal,\n}: {\n mealSlotSpecifications: MealSlotSpecification[];\n createQuickAddMeal: ({\n mealSlotSpecificationId,\n calories,\n protein,\n fat,\n carbohydrates,\n }: {\n mealSlotSpecificationId: number;\n calories: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n }) => Promise;\n}): JSX.Element => {\n const { t } = useTranslation();\n // TODO: We should improve the logic for this default at a later date\n const defaultSelectedMealSlotSpecificationId = mealSlotSpecifications?.[0]?.id || 0;\n\n const quickAddSchema = Yup.object().shape({\n // NOTE: Description is not in scope for the initial release\n // description: Yup.string().required(\"Required\"),\n mealSlotSpecificationId: Yup.number().positive().integer().required(t(\"general.required\")),\n calories: Yup.number().positive().required(t(\"general.required\")),\n protein: Yup.number().positive(),\n fat: Yup.number().positive(),\n carbohydrates: Yup.number().positive(),\n });\n\n interface QuickAddFormValues {\n mealSlotSpecificationId: number;\n calories: string;\n protein: string;\n fat: string;\n carbohydrates: string;\n }\n\n const onSubmitWrapper = async ({\n mealSlotSpecificationId,\n calories,\n protein,\n fat,\n carbohydrates,\n }: QuickAddFormValues): Promise =>\n createQuickAddMeal({\n mealSlotSpecificationId,\n calories: Number(calories),\n protein: Number(protein),\n fat: Number(fat),\n carbohydrates: Number(carbohydrates),\n });\n\n return (\n \n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, setFieldValue, errors, dirty, isValid }) => (\n <>\n {/* NOTE: Description is not in scope for the initial release */}\n {/* \n {t(\"Description\")}\n \n {errors.description}\n */}\n \n setFieldValue(\"mealSlotSpecificationId\", itemValue)}\n >\n {mealSlotSpecifications?.map((mealSlotSpecification) => (\n \n ))}\n \n {errors.mealSlotSpecificationId}\n \n \n {t(\"planner.quick_add_modal.input_form_title\")}\n \n {errors.calories}\n \n\n \n \n {errors.protein}\n \n\n \n \n {errors.fat}\n \n\n \n \n {errors.carbohydrates}\n \n\n handleSubmit()}\n testID=\"quickMealSubmit\"\n >\n {t(\"general.add\")}\n \n \n )}\n \n \n );\n};\n\nexport default QuickAddModal;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale } from \"../constants\";\n\nexport default StyleSheet.create({\n calendar: { flex: 1 },\n dropDown: { position: \"absolute\", top: Scale(55), right: Scale(108) },\n dropDownImg: { width: Scale(10), height: Scale(5) },\n grid: { position: \"absolute\", top: Scale(45), right: Scale(24) },\n gridImg: { width: Scale(24), height: Scale(24) },\n dateNumberStyle: {\n marginTop: Scale(3),\n fontSize: 12,\n },\n dayContainerStyle: {\n borderRadius: Scale(8),\n width: Scale(30),\n height: Scale(44),\n marginBottom: Scale(20),\n backgroundColor: \"white\",\n },\n highlightDateContainerStyle: {\n borderRadius: 8,\n },\n highlightDateNumberStyle: {\n marginTop: Scale(3),\n fontSize: 13,\n color: \"white\",\n },\n dateNameStyle: {\n // color: Colors.greyTextColor,\n fontSize: 12,\n },\n});\n","import type moment from \"moment\";\nimport { useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { StyleSheet } from \"react-native\";\nimport CalendarStrip from \"react-native-calendar-strip\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { Scale } from \"../constants\";\nimport { currentDayInPlannerSelector, plannerSlice } from \"../slices/plannerSlice\";\nimport baseStyles from \"./SlidingCalendarStyle\";\n\nconst CalenderView = ({\n // TODO: This should be picked up from the state\n leaveRoomForCustomBrandingHeader = false,\n currentDayInPlanner,\n}: {\n leaveRoomForCustomBrandingHeader?: boolean;\n currentDayInPlanner: moment.Moment;\n}): JSX.Element => {\n const { i18n } = useTranslation();\n const dispatch = useDispatch();\n\n const theme = useTheme();\n\n const styles = StyleSheet.create({\n ...baseStyles,\n calendarStripStyle: { padding: Scale(1), height: Scale(115), marginTop: leaveRoomForCustomBrandingHeader ? 15 : 0 },\n calendarHeaderStyle: { color: theme.colors.gray[\"400\"] },\n dateNumberStyle: { ...baseStyles.dateNumberStyle, color: theme.colors.gray[\"400\"] },\n dateNameStyle: { ...baseStyles.dateNameStyle, color: theme.colors.gray[\"400\"] },\n highlightDateNameStyle: { color: \"white\" },\n highlightDateContainerStyle: {\n ...baseStyles.highlightDateContainerStyle,\n backgroundColor: theme.colors.primary[\"600\"],\n },\n iconStyle: { tintColor: theme.colors.gray[\"400\"] },\n });\n\n const onDateSelected = (date: moment.Moment): void => {\n if (date) {\n dispatch(plannerSlice.actions.setCurrentDayInPlanner(date.format()));\n }\n };\n\n return (\n <>\n \n\n {/* NOTE: This is functionality that has been removed from the initial release */}\n {/* \n {\n navigation.navigate(Routes.ThreeDaysScreen as keyof RootStackParamList);\n }}\n source={Images.GridIcon}\n size={24}\n />\n */}\n \n );\n};\nexport default CalenderView;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Button, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Calendar, DateData } from \"react-native-calendars\";\nimport type { MarkingProps } from \"react-native-calendars/src/calendar/day/marking\";\nimport * as Yup from \"yup\";\n\nimport type { MarkedDatesType } from \"../components/GroceryListDatePicker\";\nimport { Scale } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\nimport backendApi from \"../services/backendApi\";\nimport type { CalendarDay, User } from \"../services/backendTypes\";\n\nconst { usePlannerCopyMealsFromDateCreateMutation } = backendApi;\n\ntype Props = {\n user: User | null;\n onClose: () => void;\n currentCalendarDay: CalendarDay | undefined;\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const CopyDayModal = ({ user, onClose, currentCalendarDay }: Props): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n\n const [copyFromDate, { isLoading: isLoadingCopyFromDate }] = usePlannerCopyMealsFromDateCreateMutation();\n\n interface CopyDayToValues {\n toCalendarDays: string[];\n }\n\n const onSubmitWrapper = async ({ toCalendarDays }: CopyDayToValues): Promise => {\n if (!user) {\n throw new Error(\"User is not set\");\n }\n if (!currentCalendarDay) {\n throw new Error(\"Current calendar day is not set\");\n }\n if (!currentCalendarDay.id) {\n throw new Error(\"Current calendar day id is not set\");\n }\n\n // Store the id in a variable that will be captured in the closure\n const fromCalendarDayId = currentCalendarDay.id;\n\n const copyDayPromises = _.map(toCalendarDays, (toCalendarDay: string) =>\n copyFromDate({\n copyFromDateRequest: {\n user: user.id,\n from_calendar_day_id: fromCalendarDayId,\n to_date: toCalendarDay,\n },\n })\n );\n\n await Promise.all(copyDayPromises);\n onClose();\n };\n\n const copyDayToSchema = Yup.object().shape({\n toCalendarDays: Yup.array(Yup.string()).required(t(\"general.required\")),\n });\n\n const markedDateBaseProperties: MarkingProps = {\n color: theme.colors.primary[\"600\"],\n textColor: \"white\",\n };\n\n const defaultSelectedDates: string[] = [];\n\n const getMarkedDates = (dates: string[]): MarkedDatesType => {\n const markedDates: MarkedDatesType = {};\n dates.forEach((dateString) => {\n markedDates[dateString] = markedDateBaseProperties;\n });\n return markedDates;\n };\n\n return (\n <>\n \n {({ isSubmitting, handleSubmit, values, isValid, setFieldValue }) => (\n <>\n {\n const toCalendarDays = new Set(values.toCalendarDays);\n if (toCalendarDays.has(toCalendarDay.dateString)) {\n toCalendarDays.delete(toCalendarDay.dateString);\n } else {\n toCalendarDays.add(toCalendarDay.dateString);\n }\n\n setFieldValue(\"toCalendarDays\", [...toCalendarDays]);\n }}\n renderArrow={(direction) => (\n \n )}\n theme={{\n textDayFontFamily: FontFamily.medium,\n textMonthFontFamily: FontFamily.bold,\n textDayHeaderFontFamily: FontFamily.medium,\n textDayFontSize: Scale(14),\n textMonthFontSize: Scale(16),\n textDayHeaderFontSize: Scale(16),\n arrowColor: theme.colors.primary[\"600\"],\n }}\n />\n handleSubmit()}\n testID=\"copyDaySubmitButton\"\n >\n {t(\"planner.copy_meals_to_modal.copy_to\")}\n \n \n )}\n \n \n );\n};\n","import type { Moment } from \"moment\";\n\n// eslint-disable-next-line import/prefer-default-export\nexport const formatMomentAsDateForApi = (moment: Moment): string => moment.format(\"YYYY-MM-DD\");\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport moment, { Moment } from \"moment\";\nimport { Button, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Calendar, DateData } from \"react-native-calendars\";\nimport type { MarkingProps } from \"react-native-calendars/src/calendar/day/marking\";\nimport * as Yup from \"yup\";\n\nimport type { MarkedDatesType } from \"../components/GroceryListDatePicker\";\nimport { Scale } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\nimport { formatMomentAsDateForApi } from \"../helpers/apiHelpers\";\nimport backendApi from \"../services/backendApi\";\nimport type { CalendarDay, MealMomentEnum, User } from \"../services/backendTypes\";\n\nconst { usePlannerCopyMealsToMealMomentCreateMutation } = backendApi;\n\ntype Props = {\n user: User | null;\n onClose: () => void;\n currentCalendarDay: CalendarDay | undefined;\n mealMoment: MealMomentEnum;\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const CopyMealsModal = ({ user, onClose, currentCalendarDay, mealMoment }: Props): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n\n const [copyMealMomentToDate, { isLoading: isCopyingMealMomentToDate }] =\n usePlannerCopyMealsToMealMomentCreateMutation();\n\n interface CopyMealMomentToValues {\n toCalendarDays: string[];\n }\n\n const onSubmitWrapper = async ({ toCalendarDays }: CopyMealMomentToValues): Promise => {\n if (!user) {\n throw new Error(\"User is not set\");\n }\n if (!currentCalendarDay) {\n throw new Error(\"Current calendar day is not set\");\n }\n if (!currentCalendarDay.id) {\n throw new Error(\"Current calendar day id is not set\");\n }\n if (currentCalendarDay.id === undefined) {\n throw new Error(\"Current calendar day id is undefined\");\n }\n\n // ts-ignore\n const copyMealMomentToPromises = _.map(toCalendarDays, (toCalendarDay: string) =>\n copyMealMomentToDate({\n copyMealsToMealMomentRequest: {\n user: user.id,\n // NOTE: the conditional checks above should prevent currentCalendarDay.id from being undefined\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n from_calendar_day_id: currentCalendarDay.id,\n to_calendar_day: toCalendarDay,\n meal_moment: mealMoment,\n },\n })\n );\n\n // NOTE: This array has different types and th typescript compiled complains.\n // However, this does not matter as they are all promises\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n await Promise.all(copyMealMomentToPromises);\n onClose();\n };\n\n const copyMealMomentToSchema = Yup.object().shape({\n toCalendarDays: Yup.array(Yup.string()).required(t(\"general.required\")),\n });\n\n const markedDateBaseProperties: MarkingProps = {\n color: theme.colors.primary[\"600\"],\n textColor: \"white\",\n };\n\n const defaultSelectedDates: string[] = [];\n\n const getMarkedDates = (dates: string[]): MarkedDatesType => {\n const markedDates: MarkedDatesType = {};\n dates.forEach((dateString) => {\n const dateToMark = moment(dateString);\n markedDates[formatMomentAsDateForApi(dateToMark)] = markedDateBaseProperties;\n });\n return markedDates;\n };\n\n return (\n <>\n \n {({ isSubmitting, handleChange, handleSubmit, values, isValid, setFieldValue }) => (\n <>\n {\n const toCalendarDays = new Set(values.toCalendarDays);\n if (toCalendarDays.has(toCalendarDay.dateString)) {\n toCalendarDays.delete(toCalendarDay.dateString);\n } else {\n toCalendarDays.add(toCalendarDay.dateString);\n }\n\n setFieldValue(\"toCalendarDays\", [...toCalendarDays]);\n }}\n renderArrow={(direction) => (\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n /* @ts-ignore */\n \n )}\n theme={{\n textDayFontFamily: FontFamily.medium,\n textMonthFontFamily: FontFamily.bold,\n textDayHeaderFontFamily: FontFamily.medium,\n textDayFontSize: Scale(14),\n textMonthFontSize: Scale(16),\n textDayHeaderFontSize: Scale(16),\n arrowColor: theme.colors.primary[\"600\"],\n }}\n />\n handleSubmit()}\n testID=\"copyMealMomentFromSubmit\"\n >\n {t(\"planner.copy_meals_to_modal.copy_meals\")}\n \n \n )}\n \n \n );\n};\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, width } from \"../constants/helperFunction\";\n\nconst styles = StyleSheet.create({\n checkedSmallCircle: {\n height: Scale(6),\n width: Scale(6),\n // backgroundColor: \"primary.300\",\n borderRadius: Scale(5),\n // textDecorationLine: \"line-through\",\n marginHorizontal: Scale(10),\n },\n unCheckedSmallCircle: {\n height: Scale(6),\n width: Scale(6),\n // backgroundColor: Colors.textColor,\n borderRadius: Scale(5),\n\n marginHorizontal: Scale(10),\n },\n checkboxStyle: {\n height: Scale(26),\n resizeMode: \"contain\",\n width: Scale(26),\n },\n flexContainer: {\n flexDirection: \"row\",\n\n marginBottom: Scale(15),\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n imageStyle: {\n height: Scale(70),\n width: Scale(70),\n resizeMode: \"contain\",\n marginRight: Scale(10),\n },\n singleProductMealWrapper: {\n flexDirection: \"row\",\n marginBottom: Scale(10),\n justifyContent: \"space-between\",\n },\n recipeImage: { width: 80, height: 80, borderRadius: 5, marginRight: 10 },\n recipeMealPlannerItem: {\n flex: 1,\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n marginBottom: 10,\n alignItems: \"center\",\n },\n macroOverviewTargetContainer: { flexDirection: \"row\", marginTop: 8 },\n proteinForTheDayText: { fontSize: 14 },\n});\n\nexport default styles;\n","import { Ionicons, MaterialCommunityIcons, MaterialIcons, SimpleLineIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { Formik } from \"formik\";\nimport type { TFunction } from \"i18next\";\nimport _ from \"lodash\";\n// eslint-disable-next-line import/no-named-default\nimport { default as MomentLib } from \"moment\";\nimport { extendMoment } from \"moment-range\";\nimport {\n Actionsheet,\n Badge,\n Button,\n Center,\n Flex,\n Icon,\n IconButton,\n Modal,\n Spinner,\n TextArea,\n useDisclose,\n useTheme,\n} from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView, ScrollView, Text, View, ViewStyle } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport CommonHeaderDivider from \"../commons/CommonHeaderDivider\";\nimport CustomBrandingMobileScreenHeader from \"../components/CustomBrandingMobileScreenHeader\";\nimport FloatingButton from \"../components/FloatingButton\";\nimport MacroTargetInfo from \"../components/MacroTargetInfo\";\nimport MealSlotInPlanner from \"../components/MealSlotInPlanner\";\nimport QuickAddModal from \"../components/QuickAddModal\";\nimport CalendarStripComponent from \"../components/SlidingCalendar\";\nimport { commonStyles, isDesktopScreen, Routes, Scale } from \"../constants\";\nimport { HORMONE_HEX_COLOR } from \"../constants/theme\";\nimport {\n addMealToPlanner,\n addSingleFoodMealToPlanner,\n createCalendarDays,\n findLastDateThereAreMealsPlannedWithThisNutritionDayPlan,\n generateMealsPrefetchOptions,\n getActualValueForMacro,\n getDayOfWeekAsString,\n getPlannerData,\n getTargetValueForMacro,\n} from \"../helpers/diaryHelpers\";\nimport { FeatureFlag as FeatureFlagProper, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport {\n formatMealType,\n formatMomentAsBackendFormatDateString,\n formatUserForDisplay,\n getLocalizedDay,\n getNumberOfDaysUntilNextMonday,\n isDateInCurrentWeek,\n} from \"../helpers/generalHelpers\";\nimport {\n areWeAnOpinionatedRecipeInspirationApp,\n doesOrganisationHaveManagedPlanning,\n doesTheUserHaveMenstrualPlanSet,\n FeatureFlag,\n getCurrentMenstrualCyclePhaseFromUser,\n getOrganisation,\n isFeatureFlagEnabled,\n isUserDiy,\n isUserInPaymentRequiredOrganisation,\n MenstrualCyclePhase,\n shouldB2CCustomerHavePaidAccess,\n shouldHaveAccessToGenerateMeals,\n} from \"../helpers/userHelpers\";\nimport { useExternalLink } from \"../hooks/useExternalLink\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n CalendarDay,\n CalendarItem,\n Food,\n FoodGenerateMealsListApiArg,\n MealMomentEnum,\n MealSlotSpecification,\n Organisation,\n SuggestedServing,\n User,\n} from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { calendarDaysSelector, currentDayInPlannerSelector, plannerSlice } from \"../slices/plannerSlice\";\nimport {\n localeSelector,\n userSlice,\n viewAsUserSelector,\n viewAsUserWeeklyNutritionPlanSelector,\n weeklyNutritionPlanSelector,\n} from \"../slices/userSlice\";\nimport { CopyDayModal } from \"./CopyDayModal\";\nimport { CopyMealsModal } from \"./CopyMealsModal\";\nimport styles from \"./DiaryViewScreenStyles\";\n\nconst {\n useFoodQuickAddMealCreateMutation,\n usePlannerCalendarItemCreateMutation,\n // NOTE: There is a scoping problem with usePrefetch, I don't know why\n // eslint-disable-next-line @typescript-eslint/unbound-method\n usePrefetch,\n usePlannerCalendarDayPartialUpdateMutation,\n usePlannerPlanSingleFoodMealCreateMutation,\n usePlannerAutoPlanDayCreateMutation,\n usePlannerCopyMealsFromDateCreateMutation,\n} = backendApi;\n\n// NOTE: The library has a typescript error in it which we cannot fix\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const moment = extendMoment(MomentLib);\n\nconst noteSchema = Yup.object().shape({\n // NOTE: A workaround for this issue: https://github.com/jquense/yup/issues/1367\n note: Yup.string().trim().required().nullable(false) as Yup.StringSchema,\n});\ntype NoteFormSchema = Yup.InferType;\n\nconst areTwoCalendarItemsEqual = (a: CalendarItem, b: CalendarItem): boolean => {\n if (\"ingredient\" in a.meal && \"ingredient\" in b.meal) {\n // SingleFoodMeal\n if (a.meal.ingredient.modified !== b.meal.ingredient.modified) {\n return false;\n }\n }\n\n return Boolean(a.id === b.id && a.modified && b.modified && a.modified === b.modified);\n};\n\nconst areTwoCalendarItemsArraysEqual = (a: CalendarItem[], b: CalendarItem[]): boolean =>\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n a.every((ci, i) => b && b[i] && areTwoCalendarItemsEqual(ci, b[i]));\n\nconst MemoizedMealSlotInPlanner = React.memo(MealSlotInPlanner, (prevProps, nextProps) =>\n Boolean(\n prevProps.mealSlotSpecification.id === nextProps.mealSlotSpecification.id &&\n prevProps.calendarItems?.length === nextProps.calendarItems?.length &&\n prevProps.currentCalendarDay === nextProps.currentCalendarDay &&\n prevProps.calendarItems &&\n nextProps.calendarItems &&\n areTwoCalendarItemsArraysEqual(prevProps.calendarItems, nextProps.calendarItems)\n )\n);\n\nconst NutritionOverviewForTheDay = ({\n actualKcalsForTheDay,\n targetKcalsForTheDay,\n actualProteinForTheDay,\n targetProteinForTheDay,\n actualFatForTheDay,\n targetFatForTheDay,\n actualCarbsForTheDay,\n targetCarbsForTheDay,\n t,\n shouldShowTargetMacros,\n}: {\n actualKcalsForTheDay: number;\n targetKcalsForTheDay: number;\n actualProteinForTheDay: number;\n targetProteinForTheDay: number;\n actualFatForTheDay: number;\n targetFatForTheDay: number;\n actualCarbsForTheDay: number;\n targetCarbsForTheDay: number;\n t: TFunction;\n shouldShowTargetMacros: boolean;\n}): JSX.Element => (\n \n \n \n \n \n\n \n \n \n \n \n);\n\nconst MemoizedNutritionOverviewForTheDay = React.memo(NutritionOverviewForTheDay);\n\ntype Props = NativeStackScreenProps;\n\nconst MenstrualCyclePhaseIndicator = ({\n user,\n date,\n}: {\n user: User | null;\n date: moment.Moment;\n}): JSX.Element | null => {\n const { openLink } = useExternalLink();\n const { t } = useTranslation();\n\n if (!user) return null;\n\n // Convert moment date to JavaScript Date object\n const jsDate = date.toDate();\n\n // Pass the date to getCurrentMenstrualCyclePhaseFromUser\n const phase = getCurrentMenstrualCyclePhaseFromUser(user, jsDate);\n if (!phase) return null;\n\n const getPhaseInfoUrl = (cyclePhase: MenstrualCyclePhase): string =>\n \"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\";\n\n const phaseColor = HORMONE_HEX_COLOR;\n const phaseInfoUrl = getPhaseInfoUrl(phase);\n\n return (\n \n {/* Empty view for left side spacing */}\n \n\n {/* Phase indicator with background - centered */}\n \n \n \n {t(`general.menstrual_cycle_phases.${phase}`)}\n \n \n\n {/* Information button with outline style - right aligned */}\n {\n openLink(phaseInfoUrl).catch((err) => {\n console.error(\"Failed to open cycle phase info URL:\", err);\n Sentry.captureException(err);\n });\n }}\n testID=\"cycle-phase-info-button\"\n />\n \n );\n};\n\n// Create a reusable button style object with fixed height and width\nconst mealActionButtonStyle: ViewStyle = {\n borderRadius: 10,\n paddingVertical: 10,\n paddingHorizontal: 20,\n alignSelf: \"center\",\n marginTop: 20,\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: 48,\n width: \"95%\",\n};\n\nconst DiaryViewScreen = ({ navigation, route }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const getOrganisationForBrandingPreview = route?.params?.getOrganisationForBrandingPreview;\n\n const theme = useTheme();\n\n const dispatch = useDispatch();\n const isDesktop = isDesktopScreen();\n\n const [createCalendarItem] = usePlannerCalendarItemCreateMutation();\n const [createQuickAddMealBackendCall] = useFoodQuickAddMealCreateMutation();\n const [partialUpdateCalendarDayBackendCall, { isLoading: isLoadingPartialUpdateCalendarDay }] =\n usePlannerCalendarDayPartialUpdateMutation();\n const [planSingleFoodMealBackendCall] = usePlannerPlanSingleFoodMealCreateMutation();\n const [autoPlanDay, { isLoading: isLoadingAutoPlanDay }] = usePlannerAutoPlanDayCreateMutation();\n const [copyFromDate, { isLoading: isLoadingCopyFromDate }] = usePlannerCopyMealsFromDateCreateMutation();\n\n const [mealSlotForActionSheetItems, setMealSlotForActionSheetItems] = useState(\"BREAKFAST\");\n\n const { isOpen: isOpenQuickAdd, onOpen: onOpenQuickAdd, onClose: onCloseQuickAdd } = useDisclose();\n const { isOpen: isOpenNoteDialog, onOpen: onOpenNoteDialog, onClose: onCloseNoteDialog } = useDisclose();\n const { isOpen: isOpenCopyMealsTo, onOpen: onOpenCopyMealsTo, onClose: onCloseCopyMealsTo } = useDisclose();\n const { isOpen: isOpenCopyDay, onOpen: onOpenCopyDay, onClose: onCloseCopyDay } = useDisclose();\n const {\n isOpen: isOpenMealSlotAddMore,\n onOpen: onOpenMealSlotAddMore,\n onClose: onCloseMealSlotAddMore,\n } = useDisclose();\n const { isOpen: isOpenMealSlotMenu, onOpen: onOpenMealSlotMenu, onClose: onCloseMealSlotMenu } = useDisclose();\n\n const viewAsUser = useSelector(viewAsUserSelector);\n const weeklyNutritionPlan = useSelector(\n viewAsUser ? viewAsUserWeeklyNutritionPlanSelector : weeklyNutritionPlanSelector\n );\n\n const currentDayInPlanner = useSelector(currentDayInPlannerSelector);\n\n const calendarDaysInStore = useSelector(calendarDaysSelector);\n\n const userLocaleFromStore = useSelector(localeSelector);\n\n // TODO: Refactor the below to make it more readable\n const {\n refetchCalendarDays,\n calendarDayListResponse,\n plannerArgs,\n createNewCalendarDay,\n user,\n isLoadingCreateNewCalendarDay,\n isLoadingCalendarDayList,\n isFetchingCalendarDayList,\n } = getPlannerData();\n\n // Put the returned data for the CalendarDays in the store\n _.forEach(calendarDayListResponse?.results, (calendarDay) => {\n dispatch(plannerSlice.actions.storeCalendarDay(calendarDay));\n });\n\n // TODO: Prefetch USER_GENERATED meals search\n const foodGenerateMealsListPrefetch = usePrefetch(\"foodGenerateMealsList\");\n\n useEffect(() => {\n // NOTE: Do not to call this on every time appLastOpenedDateString is updated - this will trigger an infinite loop\n dispatch(userSlice.actions.storeAppLastOpened(moment().toISOString()));\n }, [dispatch]);\n\n const currentCalendarDay = calendarDaysInStore[formatMomentAsBackendFormatDateString(currentDayInPlanner)];\n\n const day = getDayOfWeekAsString(currentDayInPlanner);\n if (weeklyNutritionPlan && !(day in weeklyNutritionPlan)) {\n throw new Error(`\"${day}\" not found in weekly nutrition plan`);\n }\n const nutritionPlanForCurrentDay = _.get(weeklyNutritionPlan, day);\n\n // NOTE: We need to find all MealSlotSpecification (MSS) objects with the same meal_moment as\n // there can be multiple (same) MSS due to when the NutritionDayPlan (NDP)\n // is updated it will result in entirely new MSS objects. Doing it this way prevents CalendarItems from being lost\n const getCalendarItemsForSlot = (\n mealSlotSpecification: MealSlotSpecification,\n calendarDay: CalendarDay\n ): CalendarItem[] => _.filter(calendarDay.calendar_items, { meal_moment: mealSlotSpecification.meal_moment });\n\n let nutritionOverviewForTheDay = null;\n\n let orderedMealSlotsForTheDay: MealSlotSpecification[] = [];\n if (currentCalendarDay && nutritionPlanForCurrentDay) {\n if (!user) {\n logger.warn(\"No user found\");\n } else {\n const createGenerateMealsArgs = (mss: MealSlotSpecification): FoodGenerateMealsListApiArg => ({\n mealSlotSpecification: mss.id,\n ingredientSearch: \"\",\n favourite: false,\n sourceProvider: [\"WEEKMEALS\"],\n tags: [],\n page: 1,\n user: user.id,\n mealTypes: [mss.meal_type],\n kcal: mss.kcal || 0, // NOTE: this included only for cache busting\n protein: mss.protein || 0, // NOTE: this is included only for cache busting\n });\n\n const createGenerateMealsPrefetchPromise = (mss: MealSlotSpecification): Promise =>\n Promise.resolve(foodGenerateMealsListPrefetch(createGenerateMealsArgs(mss), generateMealsPrefetchOptions));\n\n const prefetchPromises = nutritionPlanForCurrentDay.meal_slot_specifications.map(\n createGenerateMealsPrefetchPromise\n );\n\n Promise.all(prefetchPromises).catch((e) => {\n logger.warn(\"Error prefetching foodGenerateMealsList\", e);\n });\n }\n\n // TODO: Put this in a helper\n const MEAL_MOMENT_TO_ORDERING: { [MME in MealMomentEnum]: number } = {\n BREAKFAST: 0,\n MORNING_SNACK: 1,\n LUNCH: 2,\n AFTERNOON_SNACK: 3,\n DINNER: 4,\n SNACK: 5,\n LATE_SNACK: 6,\n };\n\n const orderMealSlotByMealMoment = (mealSlotSpecification: MealSlotSpecification): number =>\n mealSlotSpecification.meal_moment ? MEAL_MOMENT_TO_ORDERING[mealSlotSpecification.meal_moment] : 100;\n\n orderedMealSlotsForTheDay = _.orderBy(\n nutritionPlanForCurrentDay.meal_slot_specifications,\n orderMealSlotByMealMoment\n );\n\n const getCalendarItemsForSlotCurried = (mealSlotSpecification: MealSlotSpecification): CalendarItem[] =>\n getCalendarItemsForSlot(mealSlotSpecification, currentCalendarDay);\n\n const calendarItemsForToday = _.map(\n nutritionPlanForCurrentDay.meal_slot_specifications,\n getCalendarItemsForSlotCurried\n ).flat();\n\n const actualKcalsForTheDay = getActualValueForMacro(calendarItemsForToday, \"kcal\");\n const actualProteinForTheDay = getActualValueForMacro(calendarItemsForToday, \"protein\");\n\n const targetKcalsForTheDay = getTargetValueForMacro(nutritionPlanForCurrentDay, \"kcal\");\n const targetProteinForTheDay = getTargetValueForMacro(nutritionPlanForCurrentDay, \"protein\");\n\n const actualFatForTheDay = getActualValueForMacro(calendarItemsForToday, \"fat\");\n const targetFatForTheDay = getTargetValueForMacro(nutritionPlanForCurrentDay, \"fat\");\n\n const actualCarbsForTheDay = getActualValueForMacro(calendarItemsForToday, \"carbohydrates\");\n const targetCarbsForTheDay = getTargetValueForMacro(nutritionPlanForCurrentDay, \"carbohydrates\");\n\n let shouldShowTargetMacros = true;\n if (user) {\n const organisation = getOrganisation(user || viewAsUser);\n if (organisation) {\n shouldShowTargetMacros = !areWeAnOpinionatedRecipeInspirationApp(organisation);\n }\n }\n\n nutritionOverviewForTheDay = (\n \n );\n }\n\n /** The if statement if(user || viewAsUser) does not prevent a type error\n * when calling getOrganisation. Only by assigning the variable does the type checker realise\n * that the result of If(user || viewAsUser) cannot be null. * */\n let organisation: Organisation | undefined;\n const orgUser = user || viewAsUser;\n if (orgUser) {\n organisation = getOrganisation(orgUser);\n }\n\n const findMealSlotSpecification = (mealMoment: MealMomentEnum): MealSlotSpecification | undefined =>\n nutritionPlanForCurrentDay\n ? _.find(nutritionPlanForCurrentDay.meal_slot_specifications, {\n meal_moment: mealMoment,\n })\n : undefined;\n\n const onPressPlanNewMeal = (mealMoment: MealMomentEnum): void => {\n const mealSlotSpecification = findMealSlotSpecification(mealMoment);\n if (!mealSlotSpecification) {\n throw new Error(\"Could not find meal slot specification\");\n }\n\n navigation.push(Routes.AddRecipeTemplateStack, {\n // NOTE: We are probably defining the types wrong\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n screen: Routes.RecipeSearchScreen,\n params: { mealSlotSpecification, currentCalendarDay },\n });\n };\n\n const createMealSlotInPlanner = (mealSlot: MealSlotSpecification): JSX.Element | null => {\n // NOTE: The same number of hooks must be created every time so the return statement must go after\n if (!currentCalendarDay) {\n return null;\n }\n\n const calendarItemsForMealSlot = getCalendarItemsForSlot(mealSlot, currentCalendarDay);\n let shouldShowTargetMacros = true;\n if (user) {\n if (organisation) {\n shouldShowTargetMacros = !areWeAnOpinionatedRecipeInspirationApp(organisation);\n }\n }\n\n return (\n logger.debug(\"onPress MealCategoryCard with item:\", item)}\n refetchCalendarDays={refetchCalendarDays}\n onPressAddMoreComponent={() => {\n if (!mealSlot.meal_moment) throw new Error(\"meal_moment is not defined\");\n\n setMealSlotForActionSheetItems(mealSlot.meal_moment);\n onOpenMealSlotAddMore();\n }}\n onPressPlanNewMeal={() => {\n if (!mealSlot.meal_moment) throw new Error(\"meal_moment is not defined\");\n onPressPlanNewMeal(mealSlot.meal_moment);\n }}\n onPressMenu={() => {\n if (!mealSlot.meal_moment) throw new Error(\"Meal slot has no meal moment\");\n\n setMealSlotForActionSheetItems(mealSlot.meal_moment);\n onOpenMealSlotMenu();\n }}\n showTarget={shouldShowTargetMacros}\n />\n );\n };\n\n const diaryComponent = _.map(orderedMealSlotsForTheDay, createMealSlotInPlanner);\n\n const noWeeklyNutritionPlanMessage = (\n // TODO: center not working\n
\n \n {t(\"planner.no_weekly_nutrition_plan_message\")}\n \n
\n );\n\n // FIXME: This should not be hardcoded but chosen based on logic for what time of day it is\n const getMealSlotForQuickButtons = (): MealSlotSpecification | undefined =>\n nutritionPlanForCurrentDay ? nutritionPlanForCurrentDay.meal_slot_specifications[0] : undefined;\n\n const addSingleFoodMealToPlannerWrapper = (\n food: Food,\n suggestedServing: SuggestedServing,\n quantity: number,\n mealSlot: MealSlotSpecification | undefined = getMealSlotForQuickButtons()\n ): Promise => {\n if (!currentCalendarDay) {\n return Promise.reject(new Error(\"No current calendar day\"));\n }\n if (!mealSlot) {\n return Promise.reject(new Error(\"No meal slot\"));\n }\n\n return addSingleFoodMealToPlanner({\n food,\n suggestedServing,\n quantity,\n currentCalendarDay,\n mealSlot,\n refetchCalendarDays,\n dispatch,\n planSingleFoodMealBackendCall,\n });\n };\n\n const floatingButton = !isFeatureFlagEnabled(organisation || null, FeatureFlag.DisableProductLogging) ? (\n \n ) : null;\n const resetViewAsUser = (): void => {\n dispatch(plannerSlice.actions.resetCalendarDays());\n dispatch(userSlice.actions.setViewAsUser(null));\n navigation.goBack();\n };\n\n const viewAsUserBackButtonIcon = {\n as: MaterialIcons,\n name: \"arrow-back\",\n color: \"white\",\n };\n\n const viewAsUserHeaderComponent = viewAsUser ? (\n \n \n \n\n {/* TODO: Ideally this banner would appear above all screens\n while performing a view as user, but the diary screen is fine for now */}\n \n
\n \n {t(\"planner.view_as_user_banner_title\", {\n username: viewAsUser ? formatUserForDisplay(viewAsUser) : \"THIS_SHOULD_NEVER_HAPPEN\",\n })}\n \n
\n
\n
\n
\n ) : null;\n\n const createQuickAddMeal = async ({\n mealSlotSpecificationId,\n calories,\n protein,\n fat,\n carbohydrates,\n }: {\n mealSlotSpecificationId: number;\n calories: number;\n protein: number;\n fat: number;\n carbohydrates: number;\n }): Promise => {\n if (!currentCalendarDay) {\n throw new Error(\"currentCalendarDay is not set\");\n }\n\n onCloseQuickAdd();\n\n const quickAddMeal = await createQuickAddMealBackendCall({\n quickAddMealRequest: {\n kcal: Number(calories),\n protein: Number(protein),\n fat: Number(fat),\n carbohydrates: Number(carbohydrates),\n },\n }).unwrap();\n\n if (!nutritionPlanForCurrentDay) {\n throw new Error(\"nutritionPlanForCurrentDay is not set\");\n }\n const mealSlot = _.find(nutritionPlanForCurrentDay.meal_slot_specifications, {\n id: Number(mealSlotSpecificationId),\n });\n\n if (!mealSlot) {\n throw new Error(\"Could not find meal slot\");\n }\n\n await addMealToPlanner({\n currentCalendarDay,\n mealSlot,\n mealContentType: \"quickaddmeal\",\n meal: { ...quickAddMeal, content_type: \"QuickAddMeal\", id: quickAddMeal.id },\n createCalendarItem,\n refetchCalendarDays,\n });\n };\n\n const quickAddModal = nutritionPlanForCurrentDay ? (\n \n \n \n \n {t(\"planner.quick_options.quick_add_title\")}\n \n \n \n \n \n \n ) : null;\n\n const copyMealsToModalComponent = (\n \n \n \n \n {t(\"planner.copy_meals_to_modal.title\", {\n mealMoment: formatMealType(mealSlotForActionSheetItems, t).toLowerCase(),\n })}\n \n \n \n \n \n \n );\n\n const mealSlotMoreMenuButtonActionSheet = (\n \n \n {\n onCloseMealSlotMenu();\n onOpenCopyMealsTo();\n }}\n testID={\"mealSlotMenu-actionsheet-copy-meals-button\"}\n backgroundColor=\"white\"\n _pressed={{ backgroundColor: theme.colors.primary[\"600\"] }}\n >\n {t(\"planner.copy_meals_to_modal.copy_to\")}\n \n \n \n );\n\n const addMoreComponent = (\n \n \n {\n onCloseMealSlotAddMore();\n onOpenQuickAdd();\n }}\n testID={\"addMoreActionSheet-quickAdd-button\"}\n backgroundColor=\"white\"\n _pressed={{ backgroundColor: theme.colors.primary[\"600\"] }}\n >\n {t(\"planner.quick_options.quick_add_title\")}\n \n {\n onCloseMealSlotAddMore();\n navigation.push(Routes.AddProductStack, {\n screen: Routes.FoodSearchScreen,\n params: {\n onChoose: async (product, suggestedServing, quantity) => {\n if (!nutritionPlanForCurrentDay) {\n throw new Error(\"nutritionPlanForCurrentDay is not set\");\n }\n\n const mealSlotSpecification = findMealSlotSpecification(mealSlotForActionSheetItems);\n\n if (!mealSlotSpecification) {\n throw new Error(\"Could not find meal slot\");\n }\n\n // NOTE: The below function is used in two places and is difficult to define before its use\n // eslint-disable-next-line no-use-before-define\n await addSingleFoodMealToPlannerWrapper(product, suggestedServing, quantity, mealSlotSpecification);\n\n navigation.pop(1);\n },\n },\n });\n }}\n backgroundColor=\"white\"\n _pressed={{ backgroundColor: theme.colors.primary[\"600\"] }}\n >\n {t(\"planner.quick_options.add_product_title\")}\n \n {\n onCloseMealSlotAddMore();\n onPressPlanNewMeal(mealSlotForActionSheetItems);\n }}\n testID={\"addMoreActionSheet-recipe-button\"}\n backgroundColor=\"white\"\n _pressed={{ backgroundColor: theme.colors.primary[\"600\"] }}\n >\n {t(\"planner.quick_options.add_recipe_title\")}\n \n \n \n );\n\n const copyDayModalComponent = (\n \n \n \n \n {t(\"planner.copy_meals_to_modal.copy_meals\")}\n \n \n \n \n \n \n );\n\n const shouldShowPreviewedBrandingHeader = Boolean(getOrganisationForBrandingPreview);\n\n const organisationForPreview = shouldShowPreviewedBrandingHeader\n ? getOrganisationForBrandingPreview()\n : { id: 1, name: \"PLACEHOLDER_ORG\", product_stripe_id: \"prod_1234\" };\n\n const showCustomBrandingHeader = shouldShowPreviewedBrandingHeader || (!isDesktop && !viewAsUser);\n\n const calendarStrip = React.useCallback(\n () => (\n \n ),\n [showCustomBrandingHeader, currentDayInPlanner]\n );\n\n const noteComponent = (\n \n {currentCalendarDay && currentCalendarDay.note ? (\n \n {\"1\"}\n \n ) : null}\n\n {user && isUserDiy(user) ? null : (\n \n )}\n \n );\n\n const onPressGenerateCurrentDay = async (): Promise => {\n if (!user) {\n throw new Error(\"user is not set\");\n }\n\n await autoPlanDay({\n autoPlannerRequest: {\n date: formatMomentAsBackendFormatDateString(currentDayInPlanner),\n user: user.id,\n },\n });\n };\n\n const generateMealsComponent = (\n \n {\n // If there are any CalendarItems then give user a confirm dialog (use vanilla JS for the dialog)\n const areThereCalendarItemsForCurrentDay =\n currentCalendarDay && currentCalendarDay.calendar_items && currentCalendarDay.calendar_items.length > 0;\n\n if (areThereCalendarItemsForCurrentDay) {\n // eslint-disable-next-line no-restricted-globals\n if (confirm(t(\"planner.generate_meals_confirm_text\"))) {\n await onPressGenerateCurrentDay();\n }\n } else {\n await onPressGenerateCurrentDay();\n }\n }}\n leftIcon={}\n isLoading={isLoadingAutoPlanDay}\n disabled={!user || !currentDayInPlanner}\n testID=\"inside-planner-view-generate-meals-button\"\n >\n \n {t(\"planner.auto_generate_meals_button_text\")}\n \n \n \n );\n\n const onSubmitNote = async (values: NoteFormSchema): Promise => {\n onCloseNoteDialog();\n\n if (!currentCalendarDay) {\n throw new Error(\"currentCalendarDay is not set\");\n }\n\n if (!currentCalendarDay.id) {\n throw new Error(\"currentCalendarDay.id is not set\");\n }\n\n await partialUpdateCalendarDayBackendCall({\n id: currentCalendarDay.id,\n patchedCalendarDayRequest: {\n note: values.note,\n },\n });\n };\n\n const noteDialog = (): JSX.Element => (\n \n \n \n \n {t(\"planner.note_dialog.title\")}\n \n \n \n {organisation?.custom_notes_message\n ? organisation?.custom_notes_message\n : t(\"planner.note_dialog.information_label\")}\n \n\n \n {({ handleSubmit, handleChange, values, dirty, isValid, isSubmitting }) => (\n <>\n \n\n handleSubmit()}\n mt=\"3\"\n testID=\"note-submit-button\"\n >\n {t(\"planner.note_dialog.save_button\")}\n \n \n )}\n \n \n \n \n );\n\n const hasMealsPlanned = (): boolean =>\n Boolean(currentCalendarDay && currentCalendarDay.calendar_items && currentCalendarDay.calendar_items.length > 0);\n\n const hasRecipeMealsPlanned = (): boolean => {\n if (!currentCalendarDay || !currentCalendarDay.calendar_items) return false;\n\n return currentCalendarDay.calendar_items.some((item) => item.content_type === \"recipemeal\");\n };\n\n const bodyIfCalendarDayExists = (\n <>\n {hasMealsPlanned() &&\n hasRecipeMealsPlanned() &&\n user &&\n isFeatureFlagActive(user, FeatureFlagProper.FF_COPY_MEALS_TO_ANOTHER_DAY) ? (\n \n }\n style={mealActionButtonStyle}\n >\n \n {t(\"planner.copy_day.copy_to_another_day_button_text\")}\n \n \n \n ) : null}\n\n {noteComponent}\n {diaryComponent}\n \n );\n\n const onPressCreateEmptyDay = async (): Promise => {\n if (!user || !calendarDayListResponse || !weeklyNutritionPlan) {\n throw new Error(\"user, calendarDayListResponse or weeklyNutritionPlan is not set\");\n }\n\n await createCalendarDays(\n calendarDayListResponse,\n // No specific generic provided, which should be fine\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n dispatch,\n plannerArgs,\n createNewCalendarDay,\n user,\n weeklyNutritionPlan,\n isLoadingCreateNewCalendarDay,\n isLoadingCalendarDayList,\n calendarDaysInStore\n );\n };\n\n const lastDateThereAreMealsPlannedWithThisNutritionDayPlan = findLastDateThereAreMealsPlannedWithThisNutritionDayPlan(\n nutritionPlanForCurrentDay,\n weeklyNutritionPlan,\n currentDayInPlanner,\n calendarDaysInStore\n );\n\n const onPressCopyFromLastRelevantDate = async (): Promise => {\n if (\n !lastDateThereAreMealsPlannedWithThisNutritionDayPlan ||\n !lastDateThereAreMealsPlannedWithThisNutritionDayPlan.id\n ) {\n throw new Error(\"lastDateThereAreMealsPlannedWithThisNutritionDayPlan is not set\");\n }\n\n if (!user) {\n throw new Error(\"user is not set\");\n }\n\n await copyFromDate({\n copyFromDateRequest: {\n user: user.id,\n from_calendar_day_id: lastDateThereAreMealsPlannedWithThisNutritionDayPlan.id,\n to_date: formatMomentAsBackendFormatDateString(currentDayInPlanner),\n },\n });\n };\n\n const bodyIfNoCalendarDay = (\n <>\n
\n }\n testID=\"create-empty-day-button\"\n isDisabled={!user || !calendarDayListResponse || !weeklyNutritionPlan}\n style={mealActionButtonStyle}\n >\n \n {t(\"planner.new_day.generate_empty_day_button_text\")}\n \n \n\n {lastDateThereAreMealsPlannedWithThisNutritionDayPlan ? (\n }\n style={mealActionButtonStyle}\n >\n \n {t(\"planner.new_day.copy_from_day_button_text\", {\n day: getLocalizedDay(lastDateThereAreMealsPlannedWithThisNutritionDayPlan.date, userLocaleFromStore),\n })}\n \n \n ) : null}\n
\n \n );\n\n // Add this useEffect hook to check the subscription when the screen loads\n useEffect(() => {\n const verifySubscription = (): void => {\n if (!shouldB2CCustomerHavePaidAccess(user)) {\n navigation.navigate(Routes.BillingIssueScreen);\n }\n };\n\n verifySubscription();\n }, [user]);\n\n // Determine if we should show the loading spinner\n const showLoadingSpinner = isLoadingCalendarDayList || isFetchingCalendarDayList;\n\n return (\n \n {showCustomBrandingHeader ? (\n \n ) : null}\n {viewAsUserHeaderComponent}\n {/* Keep CalendarStrip visible during fetch */}\n {calendarStrip()}\n \n {showLoadingSpinner ? ( // Use the combined loading state\n
\n \n
\n ) : (\n <>\n {/* Wrap the dynamic content area */}\n \n {/* Removed calendarStrip() and CommonHeaderDivider */}\n\n {!weeklyNutritionPlan ? noWeeklyNutritionPlanMessage : null}\n {nutritionOverviewForTheDay}\n\n {user && doesTheUserHaveMenstrualPlanSet(user) ? (\n \n ) : null}\n\n {shouldHaveAccessToGenerateMeals(organisation) && !hasRecipeMealsPlanned() ? generateMealsComponent : null}\n\n \n {!currentCalendarDay ? bodyIfNoCalendarDay : bodyIfCalendarDayExists}\n \n \n {/* Modals and Floating Button remain outside the ScrollView */}\n {!weeklyNutritionPlan ? null : floatingButton}\n {quickAddModal}\n {addMoreComponent}\n {mealSlotMoreMenuButtonActionSheet}\n {copyMealsToModalComponent}\n {copyDayModalComponent}\n {noteDialog()}\n \n )}\n
\n );\n};\n\nexport default DiaryViewScreen;\n","import React from \"react\";\nimport { Image, StyleSheet, TouchableOpacity, View } from \"react-native\";\n\nimport { CommonInnerText, CommonText } from \"../commons\";\nimport { Images, Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n emailsStyle: {\n color: \"#4A5E68\",\n },\n externalTextStyle: { alignItems: \"center\", textAlign: \"center\" },\n\n textStyle: {\n // color: Colors.greyTextColor,\n fontWeight: \"bold\",\n },\n mainContainerStyle: {\n flex: 1,\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n },\n container: {\n flex: 1,\n // backgroundColor: Colors.whiteColor,\n },\n iconStyle: {\n height: Scale(100),\n width: Scale(100),\n },\n iconContainer: {\n justifyContent: \"center\",\n alignItems: \"center\",\n // backgroundColor: Colors.primaryGreenColor,\n height: Scale(90),\n width: Scale(90),\n borderRadius: Scale(100),\n },\n titleStyle: {\n marginTop: Scale(35),\n },\n discriptionContainer: {\n marginTop: Scale(35),\n justifyContent: \"center\",\n alignItems: \"center\",\n marginBottom: Scale(15),\n alignSelf: \"center\",\n },\n bottomContainer: {\n flex: 1 / 2,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n\n bottomTextComponetStyle: {\n marginLeft: 0,\n marginTop: Scale(30),\n textAlign: \"center\",\n fontSize: Scale(16),\n },\n});\n\ntype Props = {\n // FIXME: This is to be fixed on another branch\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigation?: any;\n};\n\nconst EmailConfirmationSent: React.FC = ({ navigation }) => {\n const handleNavigation = (): void => {\n // navigation.navigate(\"EmailConfirmed\");\n };\n\n return (\n \n \n \n\n \n\n \n \n \n \n\n \n \n \n \n\n \n \n\n \n \n \n \n \n );\n};\n\nexport default EmailConfirmationSent;\n","import React from \"react\";\nimport { Image, StyleSheet, View } from \"react-native\";\n\nimport { CommonButton, CommonText } from \"../commons\";\nimport { Images, Scale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n bottomContainer: {\n flex: 1 / 4,\n },\n container: {\n justifyContent: \"center\",\n alignItems: \"center\",\n flex: 2,\n },\n wrapper: {\n flex: 1,\n // backgroundColor: Colors.whiteColor,\n },\n icon: {\n height: Scale(100),\n width: Scale(100),\n marginBottom: Scale(25),\n },\n\n titleStyle: {\n textAlign: \"center\",\n },\n});\n\ntype Props = {\n // FIXME: This is to be fixed on another branch\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n navigation?: any;\n};\n\nconst EmailConfirmed: React.FC = ({ navigation }) => {\n const handleNavigation = (): void => {\n // navigation.navigate(\"Welcome\");\n };\n\n return (\n \n \n \n\n \n \n \n \n \n \n );\n};\n\nexport default EmailConfirmed;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { TFunction } from \"i18next\";\nimport _ from \"lodash\";\nimport { Icon, Text, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { StyleSheet, TouchableOpacity } from \"react-native\";\n\nimport { VerticalScale } from \"../constants\";\nimport type { Food } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\n\nconst styles = StyleSheet.create({\n rowContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n backgroundColor: \"white\",\n paddingVertical: VerticalScale(12),\n borderRadius: 8,\n },\n});\n\ntype Props = {\n food: Food;\n onPress: (data: Food) => void;\n index: number;\n};\n\nfunction getFoodDescriptionForSearchResult(food: Food, t: TFunction): string {\n const suggestedServing100g = _.find(food.suggested_servings, { serving_description: \"100 g\" });\n const suggestedServing = suggestedServing100g ?? food.suggested_servings[0];\n\n if (!suggestedServing) {\n logger.error(\"Missing suggested serving\", { food });\n return \"\";\n }\n\n return `${suggestedServing.kcal} ${t(\"general.kcal\")} per ${suggestedServing.serving_description}`;\n}\n\nconst FoodSearchResult = ({ food, onPress, index }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n let searchResultText = food.name;\n\n if (food.brand_name) {\n searchResultText = `${searchResultText} (${food.brand_name})`;\n }\n\n return (\n onPress(food)}\n >\n \n \n {searchResultText}\n \n \n {getFoodDescriptionForSearchResult(food, t)}\n \n \n \n \n \n \n );\n};\nexport default FoodSearchResult;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Center, Flex, Icon, IconButton, Input, Spinner, Text, View } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { FlatList, SafeAreaView } from \"react-native\";\n\nimport FoodSearchResult from \"../components/FoodSearchResult\";\nimport { commonStyles, Routes } from \"../constants\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { Food, FoodSearchListApiResponse, SuggestedServing } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport styles from \"./IngredientSearchScreenStyle\";\n\nconst { useFoodSearchListQuery, usePlannerCalendarDayPartialUpdateMutation } = backendApi;\n\n// TODO: Rename this\ntype FlatListItem = {\n id: number;\n label: string;\n description: string;\n};\n\n// TODO: Remove, unused?\nfunction convertFoodSearchResultsForFlatList(foods: FoodSearchListApiResponse | undefined): FlatListItem[] {\n const getDescriptionFromSuggestedServing = (firstSuggestedServing: SuggestedServing, food: Food): string =>\n // FIXME: Adjust the backend serializer to give back the serving_description\n `${firstSuggestedServing.kcal} kCal per ${firstSuggestedServing.quantity} ${food.name}`;\n\n const convertFoodToSearchResult = (food: Food): FlatListItem => {\n const firstSuggestedServing: SuggestedServing = _.get(food, \"suggested_servings[0]\");\n\n let description = \"\";\n if (!firstSuggestedServing) {\n logger.warn(\"No suggested servings found for food\", food);\n } else {\n description = getDescriptionFromSuggestedServing(firstSuggestedServing, food);\n }\n\n if (!food.id) {\n throw new Error(\"Food id is missing\");\n }\n\n return {\n id: food.id,\n label: food.name,\n description,\n };\n };\n\n return _.map(foods, convertFoodToSearchResult);\n}\n\ntype Props = NativeStackScreenProps;\n\nconst IngredientSearchScreen = ({\n navigation,\n route: {\n params: { onChoose, chooseMealMoment, mealSlotSpecifications },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const [searchQuery, setSearchQuery] = useState(\"\");\n // NOTE: We will use the commented code below when we implement the edit meal feature\n // const [postMealToCalendarBody, setPostMealToCalendarBody] =\n // useState(skipToken);\n\n const onPressBack = (): void => {\n navigation.goBack();\n };\n\n type FoodFlatListItemProp = {\n item: Food;\n index: number;\n };\n\n // const onItemPress = (item: IngredientSearchListItemType): void => {\n // logger.debug(\"Inside onItemPress with\", item);\n // // navigation.navigate(Routes.AddIngredientScreen as keyof IngredientSearchScreenParamList, item);\n\n // // FIXME: Get calendarDay\n // const postBody: PlannerCalendarDayPartialUpdateApiArg = { id: calendarDay.id };\n // logger.debug(\"Updating postBody with\", postBody);\n // setPostMealToCalendarBody(postBody);\n // };\n\n // logger.trace(\"Inside IngredientSearchScreen with postMealToCalendarBody\", postMealToCalendarBody);\n // usePlannerCalendarDayPartialUpdateMutation(postMealToCalendarBody);\n\n // TODO: We probably shouldn't trigger an API request if the query is empty\n const {\n data: foods,\n error,\n isLoading,\n } = useFoodSearchListQuery({ query: searchQuery }, { skip: searchQuery.length === 0 });\n\n if (error) {\n logger.error(error);\n }\n\n return (\n \n \n }\n size={\"md\"}\n color={\"gray.300\"}\n testID=\"food-search-screen-back-button\"\n />\n {\n setSearchQuery(text);\n }}\n value={searchQuery}\n testID=\"foodSearchInput\"\n nativeID=\"foodSearchInput\"\n />\n\n {/* TODO: Barcode scanner: To be implemented */}\n {/* alert(\"not implemented\")}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n icon={}\n testID={\"addOwnRecipeAddIngredientByBarcode-button\"}\n disabled={!values.name}\n /> */}\n \n\n \n {!_.isEmpty(foods) ? (\n (\n {\n const params = { food: foodInner, onChoose, chooseMealMoment, mealSlotSpecifications };\n\n navigation.navigate(Routes.AddIngredientScreen, params);\n }}\n />\n )}\n keyboardShouldPersistTaps=\"handled\"\n />\n ) : (\n \n
\n {isLoading ? : null}\n {searchQuery.length > 0 && foods && !foods.length && !isLoading ? (\n {t(\"general.no_search_results\")}\n ) : null}\n
\n
\n )}\n
\n
\n );\n};\n\nexport default IngredientSearchScreen;\n","import { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n headerImg: {\n width: \"100%\",\n height: \"40%\",\n },\n title: {\n fontSize: 24,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n greenTitle: {\n fontSize: 24,\n // color: Colors.primaryGreenColor,\n fontWeight: \"bold\",\n },\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: 24,\n },\n avatarImg: {\n width: 40,\n height: 40,\n marginHorizontal: 12,\n },\n rowContainer: {\n // backgroundColor: Colors.grey,\n flexDirection: \"row\",\n paddingVertical: 16,\n alignItems: \"center\",\n },\n roleText: {\n fontSize: 12,\n // color: Colors.textColor\n },\n nameText: {\n fontSize: 16,\n fontWeight: \"600\",\n // color: Colors.largeTextColor\n },\n descriptionText: {\n // color: Colors.textColor,\n fontSize: 20,\n fontWeight: \"500\",\n },\n bottomContainer: {\n bottom: 40,\n },\n startBtn: {\n // backgroundColor: Colors.primaryGreenColor,\n height: 48,\n borderRadius: 8,\n },\n startText: { fontSize: 18, fontWeight: \"500\", color: \"white\" },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport * as React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, View } from \"react-native\";\n\nimport { CommonButton } from \"../commons\";\nimport { Images, Routes } from \"../constants\";\nimport styles from \"./GetStartedScreenStyle\";\n\ntype GetStartedScreenParamList = {\n GetStaredScreen: undefined;\n PlanScreen: undefined;\n};\ntype GetStartedScreenProps = {\n navigation: NativeStackNavigationProp;\n};\n\nconst GetStartedScreen = ({ navigation }: GetStartedScreenProps): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n \n \n \n \n \n {\"Hoi Lisa\"}, \n {\"let`s get started!\"}\n \n \n \n \n \n {\"Jouw coach\"}\n Kevin Matisse\n \n \n \n \n {\"Je coach heeft je doel en voedings- plan al voor je klaargezet– datscheelt! We nemen je erin mee.\"}\n \n \n \n \n navigation.push(Routes.PlanScreen as keyof GetStartedScreenParamList)}\n />\n \n \n \n );\n};\n\nexport default GetStartedScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst loginStyles = StyleSheet.create({\n titleStyle: {\n marginBottom: Scale(20),\n },\n externalTextStyle: {\n fontSize: Scale(16),\n },\n container: {\n flex: 3,\n },\n wrapper: {\n flex: 1,\n alignItems: \"center\",\n },\n loginContainer: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"flex-end\",\n },\n loginTouchableContainer: {\n position: \"absolute\",\n right: Scale(20),\n width: Scale(110),\n },\n bottomStyle: {\n flex: 1,\n justifyContent: \"flex-end\",\n marginBottom: Scale(30),\n },\n imageStyle: {\n height: Scale(200),\n width: Scale(200),\n resizeMode: \"contain\",\n },\n externalBoldTextStyle: {\n width: width / 2,\n fontSize: Scale(24),\n textAlign: \"center\",\n marginBottom: Scale(10),\n fontWeight: \"700\",\n },\n boldContainerWrapper: {\n marginBottom: Scale(40),\n width: width / 2,\n },\n smallTextStyle: {\n textAlign: \"center\",\n width: width - Scale(60),\n // color: Colors.textColor,\n fontSize: Scale(14),\n },\n});\n\nexport default loginStyles;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport * as Linking from \"expo-linking\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Box, Button, Center, FormControl, Icon, Input, KeyboardAvoidingView, Text, VStack } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Platform, View } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Images, IS_MOBILE_PLATFORM, Routes } from \"../constants\";\nimport { AppImage, TroubleLoggingInLink } from \"../helpers/supportHelpers\";\nimport { getHostname, getManagedCustomerPortalSubdomain } from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { ClientAuthenticationMethodEnum } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { userSlice } from \"../slices/userSlice\";\nimport styles from \"./LoginScreenStyles\";\n\nconst { useUsersCreateMagicLinkCreateMutation } = backendApi;\nconst { useUsersCreateLoginSignupPortalCreateMutation } = backendApi;\n\nconst magicLinkFormSchema = Yup.object().shape({\n // TODO: This should be refactored to allow use of translated keys\n email: Yup.string().trim().email(\"Invalid email\").required(\"Required\"),\n});\n\nexport interface MagicLinkFormValues {\n email: string;\n}\n\nconst APP_STORE_REVIEW_EMAIL = \"apple-review@weekmeals.co\";\nconst APP_STORE_REVIEW_ACCOUNT_AUTH_TOKEN = \"ee796cdd54495c94762346d5a64eca88f93bf65b\";\n\nconst hostname = getHostname();\nconst subdomainWeAreCurrentlyOn = getManagedCustomerPortalSubdomain(hostname);\n\ntype Props = NativeStackScreenProps;\nconst LoginScreen = ({ navigation, route }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const dispatch = useDispatch();\n\n const [sendMagicLinkToEmailPost, { isLoading, error, isError }] = useUsersCreateMagicLinkCreateMutation();\n // Note: This is doing getOrCreate on user and the sending a magic link (as normal)\n const [sendLoginSignupPost] = useUsersCreateLoginSignupPortalCreateMutation();\n\n const submitForm = async (values: MagicLinkFormValues): Promise => {\n // NOTE: This is required because app store review cannot log in to the email account\n if (values.email === APP_STORE_REVIEW_EMAIL) {\n dispatch(userSlice.actions.storeAuthToken(APP_STORE_REVIEW_ACCOUNT_AUTH_TOKEN));\n }\n\n // NOTE: This needs to be a \"valid\" url to pass validation on the backend\n const redirectUrlString = Platform.OS === \"web\" ? \"/\" : \"login.me\";\n\n // NOTE: This is for debugging the compiled app\n // alert(`redirectUrlString: ${redirectUrlString}`);\n\n const redirectUrl = Linking.createURL(redirectUrlString);\n // NOTE: This is for debugging the compiled app\n // alert(`redirectUrl: ${redirectUrl}`);\n\n // NOTE: This is for debugging the compiled app\n // alert(`magicLinkToEmailPostBody: ${JSON.stringify(magicLinkToEmailPostBody, null, 2)}`);\n\n let authenticationMethod: ClientAuthenticationMethodEnum = \"MAGIC_LINK\";\n\n try {\n if (subdomainWeAreCurrentlyOn && !IS_MOBILE_PLATFORM) {\n // Note: This is doing getOrCreate on user and the sending a magic link (as normal)\n const response = await sendLoginSignupPost({\n loginSignupPortalRequest: {\n email: values.email,\n redirect_url: redirectUrl,\n organisation_subdomain: subdomainWeAreCurrentlyOn,\n },\n }).unwrap();\n\n authenticationMethod = response?.authentication_method;\n } else {\n await sendMagicLinkToEmailPost({\n magicLinkCreateRequest: {\n email: values.email,\n redirect_url: redirectUrl,\n },\n }).unwrap();\n }\n } catch (e: unknown) {\n // Type guard to check if the error matches expected structure\n interface BackendError {\n data?: {\n error?: string;\n };\n }\n\n const err = e as BackendError;\n // Check if it's a backend error response\n if (err.data?.error) {\n alert(err.data.error);\n } else {\n alert(t(\"login_screen.failure_recovery\"));\n }\n return;\n }\n\n // Only navigate to the sent screen if there has been no error\n switch (authenticationMethod) {\n case \"OTP\":\n navigation.navigate(Routes.EnterOTPScreen, { email: values.email });\n break;\n default:\n navigation.navigate(Routes.MagicLinkSentScreen, { email: values.email });\n }\n };\n\n const initialValues: MagicLinkFormValues = { email: \"\" };\n\n return (\n \n \n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, errors, dirty, isValid }) => (\n \n \n \n \n\n \n {t(\"login_screen.heading\")}\n \n \n\n \n \n \n
\n {errors.email}\n
\n
\n\n handleSubmit()}\n testID=\"magicLinkButton\"\n mt=\"2\"\n >\n {t(\"login_screen.send_magic_link_button_text\")}\n \n
\n\n
\n \n
\n
\n
\n )}\n
\n
\n
\n );\n};\nexport default LoginScreen;\n","import { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n itemContainer: {\n marginVertical: 8,\n },\n labelText: {\n // color: Colors.textColor,\n fontSize: 16,\n fontWeight: \"bold\",\n },\n caloriesLabelText: {\n // color: Colors.textColor,\n fontSize: 12,\n fontWeight: \"bold\",\n },\n caloriesValueText: {\n // color: Colors.largeTextColor,\n fontSize: 14,\n textAlign: \"center\",\n },\n valueText: {\n // color: Colors.textColor,\n fontSize: 16,\n textAlign: \"center\",\n },\n imgContainer: {\n paddingHorizontal: 15,\n paddingVertical: 5,\n // backgroundColor: Colors.grey,\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n marginRight: 10,\n },\n});\n\nexport default styles;\n","import { Flex } from \"native-base\";\nimport * as React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, ImageSourcePropType, Text, View } from \"react-native\";\n\nimport { Images } from \"../constants\";\nimport type { NutritionType } from \"../types\";\nimport styles from \"./NutritionPlanRowItemStyle\";\n\ntype MacronutrientItemProps = {\n label: string;\n value: string;\n};\n\nconst MacronutrientItem = ({ label, value }: MacronutrientItemProps): JSX.Element => (\n \n {label}\n {value}\n \n);\n\ntype NutritionPlanRowItemProps = {\n imgSrc: ImageSourcePropType;\n label: string;\n nutrition: NutritionType;\n};\n\nconst NutritionPlanRowItem: React.FC = ({ imgSrc, label, nutrition }) => {\n const { t } = useTranslation();\n return (\n \n \n \n \n \n \n {label}\n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default NutritionPlanRowItem;\n","import { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n planTitle: {\n fontSize: 24,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n greenTitle: {\n fontSize: 20,\n // color: Colors.primaryGreenColor,\n fontWeight: \"bold\",\n },\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n labelText: {\n // color: Colors.sectionTextColor,\n fontSize: 16,\n marginBottom: 6,\n },\n labelTextBold: {\n // color: Colors.sectionTextColor,\n fontSize: 16,\n fontWeight: \"bold\",\n marginBottom: 6,\n },\n valueText: {\n // color: Colors.textColor,\n fontSize: 16,\n lineHeight: 24,\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: 24,\n },\n avatarImg: {\n width: 40,\n height: 40,\n marginHorizontal: 24,\n },\n rowContainer: {\n flexDirection: \"row\",\n paddingVertical: 16,\n alignItems: \"center\",\n },\n bodyText: {\n fontSize: 16,\n fontWeight: \"normal\",\n // color: Colors.textColor\n },\n roleText: {\n fontSize: 12,\n // color: Colors.textColor\n },\n nameText: {\n fontSize: 16,\n fontWeight: \"600\",\n // color: Colors.largeTextColor\n },\n bottomContainer: {\n paddingHorizontal: 20,\n bottom: 40,\n },\n contentContainer: {\n paddingBottom: 40,\n },\n headerImg: {\n width: \"100%\",\n height: \"40%\",\n },\n sectionTitle: {\n fontSize: 20,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n itemContainer: {\n marginVertical: 16,\n },\n itemRowContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n marginVertical: 16,\n },\n sportImg: {\n marginRight: 12,\n },\n descriptionText: {\n // color: Colors.greyTextColor,\n fontSize: 20,\n fontWeight: \"500\",\n },\n startBtn: {\n // backgroundColor: Colors.primaryGreenColor,\n height: 48,\n borderRadius: 8,\n },\n startText: { fontSize: 18, fontWeight: \"500\", color: \"white\" },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport { Divider, Flex, ScrollView } from \"native-base\";\nimport React, { useRef } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, TouchableOpacity, View } from \"react-native\";\nimport type { Modalize } from \"react-native-modalize\";\n\nimport { CommonButton, CommonIconButton } from \"../commons\";\nimport CommonModalize from \"../commons/CommonModalize\";\nimport NutritionPlanRowItem from \"../components/NutritionPlanRowItem\";\nimport { commonStyles, height, Images, Routes } from \"../constants\";\nimport logger from \"../services/logger\";\nimport type { NutritionType } from \"../types\";\nimport styles from \"./NutritionPlanScreenStyle\";\n\nconst NutritionPlanRows = [\n {\n label: \"Ontbijt\",\n image: Images.FoodIcon1,\n nutrition: {\n calories: \"716 kCal\",\n fat: \"27g\",\n protein: \"18g\",\n carbohydrates: \"33g\",\n },\n },\n {\n label: \"Lunch\",\n image: Images.FoodIcon2,\n nutrition: {\n calories: \"716 kCal\",\n fat: \"27g\",\n protein: \"18g\",\n carbohydrates: \"33g\",\n },\n },\n {\n label: \"Avondeten\",\n image: Images.FoodIcon3,\n nutrition: {\n calories: \"716 kCal\",\n fat: \"27g\",\n protein: \"18g\",\n carbohydrates: \"33g\",\n },\n },\n];\n\ntype FooterComponentProps = {\n modalizeRef: React.Ref;\n};\n\nconst FooterComponent = ({ modalizeRef }: FooterComponentProps): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n {\n if (modalizeRef && typeof modalizeRef === \"object\" && modalizeRef.current) {\n modalizeRef.current.close();\n } else {\n logger.error(\"modalizeRef Error\");\n }\n }}\n />\n \n );\n};\n\ntype ModalContentProps = {\n modalizeRef: React.Ref;\n};\n\nconst ModalContent = ({ modalizeRef }: ModalContentProps): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n \n {\"Je dag doel\"}\n {\n if (modalizeRef && typeof modalizeRef === \"object\" && modalizeRef.current) {\n modalizeRef.current.close();\n } else {\n logger.error(\"modalizeRef Error\");\n }\n }}\n size={16}\n />\n \n \n \n \n {\n \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lacus consectetur id tristique odio eget quam varius neque dui. Ipsum tellus est bibendum eu at. Urna et facilisi praesent sed.\"\n }\n \n \n {\n \"At quis turpis blandit tellus sit nulla. Cursus in mauris risus ipsum, tincidunt et, neque, pharetra, lacinia. Odio sit malesuada elementum donec eros sociis et at. Ornare dolor ornare amet viverra massa sed massa. Morbi adipiscing nulla aenean quam massa at. Bibendum est ipsum est tincidunt vitae eu sed blandit.\"\n }\n \n \n {\"Sed elit, interdum turpis netus. Tempus purus commodo tellus hac luctus pellentesque magna in ultricies.\"}\n \n \n \n );\n};\n\ntype NutritionPlanScreenParamList = {\n NutritionPlanScreen: undefined;\n ProfileStartScreen: undefined;\n};\ntype NutritionPlanScreenProps = {\n navigation: NativeStackNavigationProp;\n};\n\nconst NutritionPlanScreen = ({ navigation }: NutritionPlanScreenProps): JSX.Element => {\n const { t } = useTranslation();\n const modalizeRef = useRef(null);\n const onOpen = (): void => {\n modalizeRef.current?.open();\n };\n\n const planData = {\n calories: \"2150 kCal\",\n protein: \"56g\",\n fat: \"80g\",\n carbohydrates: \"99g\",\n };\n const descriptionText =\n \"Om jouw doel te behalen heeft je coach een persoonlijk voedingsplan voor je opgesteld met daarin per maaltijd je energie-behoefte. Wij houden dit allemaal voor je bij.\";\n\n const AvatarHeader = (): JSX.Element => (\n \n \n \n \n {\"Jouw coach\"}\n {\"Kevin Matisse\"}\n \n \n \n );\n\n type DailyGoalRowProps = {\n // TODO: Use generated nutrition plan type instead\n data: NutritionType;\n };\n\n const DailyGoalRow = ({ data }: DailyGoalRowProps): JSX.Element => {\n const { calories, fat, protein, carbohydrates } = data;\n return (\n \n \n {t(\"general.calories\")}\n {calories}\n \n \n {t(\"general.protein\")}\n {protein}\n \n \n {t(\"general.fat\")}\n {fat}\n \n \n {t(\"general.carbohydrates\")}\n {carbohydrates}\n \n \n );\n };\n\n const DailyGoalModalButton = (): JSX.Element => (\n \n \n {\"Je dag doel\"}\n \n \n \n );\n\n const Header = (): JSX.Element => (\n <>\n \n {\"Voedingsplan\"}\n \n \n {descriptionText}\n \n \n );\n return (\n \n \n \n \n \n \n
\n \n \n \n {NutritionPlanRows.map((nutritionPlanRow) => (\n \n ))}\n \n \n \n \n \n navigation.push(Routes.ProfileStartScreen as keyof NutritionPlanScreenParamList)}\n />\n \n\n \n \n );\n};\n\nexport default NutritionPlanScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { height, Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n paginationStyle: {\n position: \"absolute\",\n bottom: Scale(120),\n },\n externalTextStyle: {\n fontSize: Scale(16),\n width: Scale(100),\n textAlign: \"right\",\n },\n loginTouchableContainer: {\n position: \"absolute\",\n right: Scale(20),\n },\n loginContainer: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n alignItems: \"center\",\n },\n walkThroughListContainer: {\n flex: 1,\n alignItems: \"center\",\n },\n buttonContainer: {\n position: \"absolute\",\n bottom: Scale(30),\n },\n activeDotStyle: {\n width: Scale(8),\n height: Scale(8),\n // backgroundColor: Colors.primaryGreenColor,\n borderRadius: Scale(5),\n },\n dotStyle: {\n width: Scale(8),\n height: Scale(8),\n // backgroundColor: Colors.greyTextColor,\n borderRadius: 4,\n marginHorizontal: Scale(3),\n },\n swipeImages: {\n height: width / 2,\n width: width / 4,\n resizeMode: \"contain\",\n marginBottom: Scale(20),\n },\n swiperAlign: {\n flex: 1,\n justifyContent: \"center\",\n // backgroundColor: Colors.whiteColor,\n },\n titleText: {\n textAlign: \"center\",\n },\n discriptionText: {\n textAlign: \"center\",\n // color: Colors.textColor,\n marginTop: Scale(20),\n width: width - width / 3,\n fontSize: Scale(14),\n },\n badgeStyle: {\n // backgroundColor: Colors.greyTextColor,\n },\n dotsWrapperStyle: {\n marginTop: Scale(150),\n },\n imageBackground: {\n position: \"absolute\",\n left: width / 4,\n top: height / 4,\n width: width / 2,\n height: width / 2,\n borderRadius: width / 2,\n },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport { getLogger } from \"loglevel\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, TouchableOpacity, View } from \"react-native\";\nimport Swiper from \"react-native-web-swiper\";\n\nimport CommonButton from \"../commons/CommonButtons\";\nimport CommonText from \"../commons/CommonText\";\nimport { constants, Routes, walkThroughList, width } from \"../constants\";\nimport backendApi from \"../services/backendApi\";\nimport logger from \"../services/logger\";\nimport styles from \"./OnBoardingScreenStyle\";\n\nconst { useFoodFoodListQuery } = backendApi;\n\ntype ParamList = {\n LoginScreen: undefined;\n OnboardingScreen: undefined;\n};\n\ntype OnboardingProps = {\n navigation: NativeStackNavigationProp;\n};\n\nconst OnboardingScreen = ({ navigation }: OnboardingProps): JSX.Element => {\n const { t } = useTranslation();\n const [activeIndex, setActiveIndex] = useState(0);\n\n const handleNavigation = (): void => {\n navigation.navigate(Routes.LoginScreen as keyof ParamList);\n };\n\n // TODO: This is just here for testing purposes\n const { data, error, isLoading } = useFoodFoodListQuery({});\n\n if (isLoading) {\n logger.debug(\"Loading...\");\n } else if (error) {\n logger.debug(\"FoodList error: \", error);\n } else {\n logger.debug(\"FoodList result: \", data);\n }\n\n return (\n \n \n \n \n \n \n \n {/* {\n setActiveIndex(index);\n }}\n >\n {walkThroughList.map((item) => (\n \n \n \n {item.description}\n {item?.button && (\n \n )}\n \n ))}\n */}\n \n );\n};\n\nexport default OnboardingScreen;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Text, View } from \"react-native\";\n\nimport { CommonButton, CommonDateTextInput, CommonPageHeader, CommonTextInput } from \"../commons\";\nimport { commonStyles, Routes, VerticalScale } from \"../constants\";\n\ntype ParamList = {\n PersonalDetailsScreen: undefined;\n ProfileStartScreen: undefined;\n AddGenderScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst PersonalDetailsScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n const [values, setValues] = useState({\n firstName: \"\",\n lastName: \"\",\n birthYear: \"\",\n birthMonth: \"\",\n birthDay: \"\",\n weight: 70,\n });\n\n const handleChange = (name: string, value: string | boolean): void => {\n setValues({ ...values, [name]: value });\n };\n\n const { firstName, lastName, birthYear, birthMonth, birthDay, weight } = values;\n\n return (\n \n {\n navigation.goBack();\n }}\n onPressClose={() => {\n navigation.navigate(Routes.ProfileStartScreen as keyof ParamList);\n }}\n />\n \n \n {\"Your personal details\"}\n \n\n handleChange(\"firstName\", val)}\n textWrapperExternalStyle={{ marginHorizontal: 0 }}\n />\n\n handleChange(\"firstName\", val)}\n textWrapperExternalStyle={{ marginHorizontal: 0 }}\n />\n\n \n {\"Birthday\"}\n \n {\n handleChange(\"birthDay\", val);\n }}\n />\n\n {\n handleChange(\"birthMonth\", val);\n }}\n />\n\n {\n handleChange(\"birthYear\", val);\n }}\n />\n \n \n\n handleChange(\"weight\", val)}\n textWrapperExternalStyle={{ marginHorizontal: 0 }}\n textInputProps={{\n keyboardType: \"number-pad\",\n returnKeyType: \"done\",\n }}\n />\n \n \n {\n navigation.push(Routes.AddGenderScreen as keyof ParamList);\n }}\n />\n \n \n );\n};\n\nexport default PersonalDetailsScreen;\n","import * as React from \"react\";\nimport { StyleSheet, Text, View } from \"react-native\";\n\nconst styles = StyleSheet.create({\n itemContainer: {\n marginVertical: 16,\n },\n labelText: {\n // color: Colors.sectionTextColor,\n fontSize: 16,\n marginBottom: 6,\n },\n valueText: {\n // color: Colors.textColor,\n fontSize: 16,\n },\n});\n\ntype PlanRowItemProps = {\n label: string;\n value: string;\n};\n\nconst PlanRowItem = ({ label, value }: PlanRowItemProps): JSX.Element => (\n \n {label}\n {value}\n \n);\n\nexport default PlanRowItem;\n","import { StyleSheet } from \"react-native\";\n\nconst styles = StyleSheet.create({\n avatarHeader: {\n marginTop: 50,\n },\n headerImg: {\n width: \"100%\",\n height: \"40%\",\n },\n planTitle: {\n fontSize: 24,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n\n sectionTitle: {\n fontSize: 20,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n greenTitle: {\n fontSize: 24,\n // color: Colors.primaryGreenColor,\n fontWeight: \"bold\",\n },\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n itemContainer: {\n marginVertical: 16,\n },\n itemRowContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n marginVertical: 16,\n },\n labelText: {\n // color: Colors.sectionTextColor,\n fontSize: 16,\n marginBottom: 6,\n },\n valueText: {\n // color: Colors.textColor,\n fontSize: 16,\n },\n sportImg: {\n marginRight: 12,\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: 24,\n },\n avatarImg: {\n width: 40,\n height: 40,\n marginHorizontal: 24,\n },\n rowContainer: {\n flexDirection: \"row\",\n paddingVertical: 16,\n alignItems: \"center\",\n },\n roleText: {\n fontSize: 12,\n // color: Colors.textColor\n },\n nameText: {\n fontSize: 16,\n fontWeight: \"600\",\n // color: Colors.largeTextColor\n },\n descriptionText: {\n // color: Colors.textColor,\n fontSize: 20,\n fontWeight: \"500\",\n },\n bottomContainer: {\n paddingHorizontal: 24,\n bottom: 40,\n },\n startBtn: {\n // backgroundColor: Colors.primaryGreenColor,\n height: 48,\n borderRadius: 8,\n },\n startText: { fontSize: 18, fontWeight: \"500\", color: \"white\" },\n contentContainer: {\n paddingBottom: 40,\n },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport { Divider, Flex, ScrollView } from \"native-base\";\nimport * as React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, View } from \"react-native\";\n\nimport { CommonButton } from \"../commons\";\nimport PlanRowItem from \"../components/PlanRowItem\";\nimport { Images, Routes } from \"../constants\";\nimport styles from \"./PlanScreenStyle\";\n\nconst SportsDataList = [\n {\n id: 1,\n label: \"30 minuten fietsen naar werk\",\n value: \"3x per week\",\n image: Images.BicycleIcon,\n },\n {\n id: 2,\n label: \"60 minuten workout met coach\",\n value: \"2x per week\",\n image: Images.LiftIcon,\n },\n];\n\ntype ParamList = {\n PlanScreen: undefined;\n NutritionPlanScreen: undefined;\n};\ntype PlanScreenProps = {\n navigation: NativeStackNavigationProp;\n};\n\nconst PlanScreen = ({ navigation }: PlanScreenProps): JSX.Element => {\n const { t } = useTranslation();\n const coachName = \"Kevin Matisse\";\n const age = \"35 jaar\";\n const weight = \"70 kilogram\";\n const fatPercent = \"15%\";\n const lifeStyle = \"Licht actief\";\n\n const AvatarHeader = (): JSX.Element => (\n \n \n \n {\"Jouw coach\"}\n {coachName}\n \n \n );\n\n const SportListView = (): JSX.Element => (\n \n \n {\"Sport\"}\n \n \n {SportsDataList.map((item, index) => (\n \n \n \n {item.label}\n {item.value}\n \n \n ))}\n \n );\n\n const UserDataView = (): JSX.Element => (\n \n \n {\"Jouw gegevens\"}\n \n \n \n \n \n \n \n );\n\n const MainGoalView = (): JSX.Element => (\n \n \n {\"Belangrijkste doel\"}\n \n \n \n {\"10 kilogram afvallen\"}\n \n \n );\n\n return (\n \n \n \n \n \n\n \n\n \n \n \n {\"Juow plan\"}\n \n \n \n \n \n \n \n\n \n navigation.push(Routes.NutritionPlanScreen as keyof ParamList)}\n />\n \n \n );\n};\nexport default PlanScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst ImageSize = Scale(160);\n\nconst styles = StyleSheet.create({\n titleText: {\n fontSize: 24,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: Scale(24),\n },\n descriptionText: {\n // color: Colors.textColor,\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: VerticalScale(24),\n },\n bottomContainer: {\n bottom: 40,\n },\n profileAvatarImg: { width: ImageSize, height: ImageSize, borderRadius: 100 },\n editIconContainer: {\n // backgroundColor: Colors.primaryGreenColor,\n borderRadius: 50,\n width: Scale(50),\n height: Scale(50),\n display: \"flex\",\n justifyContent: \"center\",\n alignItems: \"center\",\n position: \"absolute\",\n top: 0,\n right: 0,\n },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport * as ImagePicker from \"expo-image-picker\";\nimport { Flex } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, Text, TouchableOpacity, View } from \"react-native\";\n\nimport { CommonButton, CommonIcon, CommonPageHeader } from \"../commons\";\nimport { height, Images, Routes, Scale, VerticalScale, width } from \"../constants\";\nimport styles from \"./ProfilePictureScreenStyle\";\n\nconst ImageSize = Scale(160);\n\ntype ParamList = {\n ProfilePictureScreen: undefined;\n ProfileStartScreen: undefined;\n PersonalDetailsScreen: undefined;\n};\ntype Props = {\n navigation: NativeStackNavigationProp;\n};\n\nconst ProfilePictureScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n const [image, setImage] = useState(\"\");\n\n const pickImage = async (): Promise => {\n const imagePickerOptions: ImagePicker.ImagePickerOptions = {\n mediaTypes: ImagePicker.MediaTypeOptions.All,\n allowsEditing: true,\n aspect: [4, 3],\n quality: 1,\n };\n const result = await ImagePicker.launchImageLibraryAsync(imagePickerOptions);\n\n // if (!result.cancelled) {\n // NOTE: The signature of this library function is now different in an updated version\n // setImage(result.uri);\n // }\n };\n\n const ImageUploadView = (): JSX.Element => (\n \n {/* {image && }\n \n {image ? (\n \n ) : (\n \n )}\n */}\n \n );\n\n const onSkipBtn = (): void => {\n navigation.navigate(Routes.PersonalDetailsScreen as keyof ParamList);\n };\n return (\n \n {\n navigation.goBack();\n }}\n onPressClose={() => {\n navigation.navigate(Routes.ProfileStartScreen as keyof ParamList);\n }}\n />\n \n \n \n {\"Voeg een profielfoto toe\"}\n \n \n \n {/* */}\n navigation.navigate(Routes.BottomNavigationTab as keyof ParamList)}\n />\n \n \n \n \n );\n};\n\nexport default ProfilePictureScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n headerImg: {\n width: \"100%\",\n height: \"40%\",\n },\n titleText: {\n fontSize: 24,\n // color: Colors.largeTextColor,\n fontWeight: \"bold\",\n },\n greenTitle: {\n fontSize: 24,\n // color: Colors.primaryGreenColor,\n fontWeight: \"bold\",\n },\n container: {\n flex: 1,\n backgroundColor: \"white\",\n },\n mainContainer: {\n flex: 1,\n paddingHorizontal: Scale(24),\n },\n rowContainer: {\n // backgroundColor: Colors.grey,\n flexDirection: \"row\",\n paddingVertical: 16,\n alignItems: \"center\",\n },\n roleText: {\n fontSize: 12,\n // color: Colors.textColor\n },\n nameText: {\n fontSize: 16,\n fontWeight: \"600\",\n // color: Colors.largeTextColor\n },\n descriptionText: {\n // color: Colors.textColor,\n fontSize: 16,\n fontWeight: \"500\",\n lineHeight: VerticalScale(24),\n },\n bottomContainer: {\n bottom: 40,\n },\n startBtn: {\n // backgroundColor: Colors.primaryGreenColor,\n height: 48,\n borderRadius: 8,\n },\n skipBtn: { backgroundColor: \"white\", height: 48, borderRadius: 8 },\n startText: { fontSize: 18, fontWeight: \"500\", color: \"white\" },\n skipText: { fontSize: 18, fontWeight: \"500\", color: \"black\" },\n colorBlack: { color: \"black\" },\n});\n\nexport default styles;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textWrapperContainer: { flexDirection: \"row\", justifyContent: \"center\", alignItems: \"center\" },\n bottomTextComponent: {\n flexDirection: \"row\",\n // backgroundColor: Colors.whiteColor,\n position: \"absolute\",\n zIndex: 1,\n right: Scale(30),\n bottom: Scale(50),\n justifyContent: \"center\",\n alignItems: \"center\",\n height: Scale(35),\n paddingHorizontal: Scale(5),\n borderRadius: Scale(4),\n },\n dotsWrapperStyle: {\n marginVertical: Scale(20),\n width: Scale(8),\n borderRadius: Scale(5),\n position: \"absolute\",\n left: Scale(22),\n },\n badgeStyle: {\n backgroundColor: \"#CCEFDC\",\n },\n\n smallComponent: { width: Scale(60) },\n swiperTopTimerTextStyle: {\n marginLeft: Scale(7),\n fontSize: Scale(15),\n width: Scale(30),\n },\n timerStyle: {\n height: Scale(18),\n width: Scale(18),\n resizeMode: \"contain\",\n // tintColor: Colors.largeTextColor,\n },\n topSwiperTimerComponent: {\n flexDirection: \"row\",\n // backgroundColor: Colors.whiteColor,\n position: \"absolute\",\n zIndex: 1,\n right: Scale(30),\n top: Scale(30),\n justifyContent: \"center\",\n alignItems: \"center\",\n height: Scale(35),\n paddingHorizontal: Scale(5),\n borderRadius: Scale(4),\n },\n dotStyle: {\n width: Scale(8),\n height: Scale(8),\n backgroundColor: \"#ccefdc\",\n borderRadius: 4,\n marginHorizontal: Scale(3),\n },\n paginationStyle: {\n justifyContent: \"flex-start\",\n marginHorizontal: Scale(20),\n\n position: \"absolute\",\n bottom: Scale(10),\n },\n activeDotStyle: {\n width: Scale(8),\n height: Scale(8),\n // backgroundColor: Colors.primaryGreenColor,\n borderRadius: Scale(5),\n },\n swiperContainer: {\n height: Scale(348),\n },\n imageStyle: {\n height: Scale(250),\n width: Scale(350),\n resizeMode: \"contain\",\n marginVertical: Scale(20),\n },\n textStyleForSwiper: {\n marginHorizontal: Scale(20),\n fontWeight: \"500\",\n // color: Colors.swiperColor,\n },\n topContainer: {\n // backgroundColor: Colors.lightGreen,\n paddingVertical: Scale(20),\n },\n textInputStyle: {\n // borderColor: Colors.primaryGreenColor,\n borderWidth: Scale(1),\n },\n externalTextInputStyle: {\n // color: Colors.primaryGreenColor,\n },\n wrapper: {\n // backgroundColor: Colors.whiteColor,\n flex: 1,\n },\n listWrapper: {\n marginTop: Scale(20),\n },\n titleContainer: {\n flexDirection: \"row\",\n\n justifyContent: \"space-between\",\n marginHorizontal: Scale(20),\n marginBottom: Scale(20),\n },\n leftTextStyle: {\n marginLeft: 0,\n marginRight: Scale(15),\n\n fontSize: Scale(19),\n fontWeight: \"700\",\n // color: colors.largeTextColor,\n },\n middleTextStyle: {\n borderWidth: StyleSheet.hairlineWidth,\n // borderColor: Colors.largeTextColor,\n fontSize: Scale(12),\n textAlign: \"center\",\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: Scale(5),\n paddingTop: Scale(2),\n paddingHorizontal: Scale(5),\n // color: Colors.largeTextColor,\n },\n rightTextStyle: {\n marginLeft: 0,\n marginRight: 0,\n // color: Colors.primaryGreenColor,\n fontSize: Scale(16),\n fontWeight: \"600\",\n width: Scale(160),\n\n textAlign: \"right\",\n },\n topStyle: {\n marginTop: Scale(40),\n },\n firstTitleContainer: {\n flexDirection: \"row\",\n\n width: width / 2,\n },\n scrollViewStyle: {\n paddingHorizontal: Scale(10),\n },\n});\n\nexport default styles;\n","// NOTE: This file is not used\n\nimport { Box, HStack } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ImageSourcePropType, ScrollView } from \"react-native\";\n\nimport { CommonText, CommonWhiteContainer } from \"../commons\";\nimport CommonSmallText from \"../commons/CommonSmallText\";\nimport styles from \"../screens/RecipeInspirationScreenStyle\";\n\ntype RecipeInspirationCarouselProps = {\n // TODO: Use the RecipeMeal type from the backend\n recipes: { id: number; title: string; time: string; image: ImageSourcePropType }[];\n mealTitle: string;\n};\nconst RecipeInspirationCarousel = ({ recipes, mealTitle }: RecipeInspirationCarouselProps): JSX.Element => {\n const { t } = useTranslation();\n return (\n \n \n \n \n \n \n\n \"} externalTextStyle={styles.rightTextStyle} />\n \n \n {recipes.map((i) => (\n \n ))}\n \n \n );\n};\n\nexport default RecipeInspirationCarousel;\n","// NOTE: This file is not currently used\n\nimport { Box, Flex, HStack, VStack } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScrollView, View } from \"react-native\";\nimport Swiper from \"react-native-web-swiper\";\n\nimport { CommonText, CommonTextInput } from \"../commons\";\nimport HomeScreenCarousel from \"../components/RecipeInspirationScreenCarousel\";\nimport RecipeInspirationCarousel from \"../components/RecipeInspirationScreenListItems\";\nimport { homeCarouselData, homeData, Images } from \"../constants\";\nimport styles from \"./RecipeInspirationScreenStyle\";\n\nconst RecipeInspirationScreen = (): JSX.Element => {\n const { t } = useTranslation();\n const [searchText, setSearchText] = useState(\"\");\n\n const handleSearchText = (val: string): void => {\n setSearchText(val);\n };\n\n const featuredRecipesComponent = (\n \n \n \n {/* \n {homeCarouselData.map((i) => (\n \n ))}\n */}\n \n \n );\n\n const recipesForDifferentMealTypes = (\n \n \n \n \n \n \n );\n\n return (\n \n \n \n handleSearchText(val)}\n />\n \n\n {/* NOTE: This component is for a future release. */}\n {/* {featuredRecipesComponent} */}\n\n {recipesForDifferentMealTypes}\n \n \n );\n};\n\nexport default RecipeInspirationScreen;\n","import { AntDesign, Ionicons, MaterialIcons } from \"@expo/vector-icons\";\nimport { Icon, useTheme } from \"native-base\";\nimport React from \"react\";\nimport { Image, StyleSheet, Text, TouchableOpacity, View } from \"react-native\";\nimport { useSelector } from \"react-redux\";\n\nimport { Scale, VerticalScale } from \"../constants\";\nimport { HORMONE_HEX_COLOR } from \"../constants/theme\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport { getRecipeMealImage } from \"../helpers/generalHelpers\";\nimport type { GeneratedRecipeMeal, MealSlotSpecification } from \"../services/backendTypes\";\nimport { userSelector } from \"../slices/userSlice\";\nimport MacroProgressWidget from \"./RecipeMacrosItem\";\n\nexport const styles = StyleSheet.create({\n cardContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n marginBottom: VerticalScale(24),\n marginHorizontal: Scale(12),\n },\n contentContainer: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n height: \"100%\",\n paddingLeft: Scale(16),\n },\n contentWrapper: {\n paddingTop: VerticalScale(8),\n flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n },\n\n cardImg: {\n width: Scale(120),\n height: VerticalScale(120),\n borderRadius: 4,\n },\n ownRecipeImg: {\n width: Scale(78),\n height: VerticalScale(78),\n },\n descriptionText: {\n fontWeight: \"500\",\n },\n clockIcon: {\n width: Scale(15),\n height: Scale(15),\n marginRight: Scale(6),\n },\n timeViewContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n marginTop: VerticalScale(8),\n },\n nextBtn: {\n width: Scale(32),\n height: Scale(32),\n },\n nextBtnView: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n paddingBottom: Scale(1),\n },\n durationText: {\n // color: Colors.smallTextColor,\n fontSize: 14,\n },\n imageContainer: {\n // borderColor: Colors.borderColor,\n borderRadius: 8,\n borderWidth: 1,\n padding: Scale(20),\n },\n recipeMacrosContainer: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n descriptionContainer: {\n flex: 1,\n marginLeft: Scale(12),\n },\n menuIcon: {\n width: Scale(20),\n height: Scale(20),\n },\n menuIconContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"flex-end\",\n },\n imageWrapper: {\n position: \"relative\",\n borderWidth: 2,\n borderRadius: 8,\n borderColor: \"transparent\",\n },\n hormoneIconContainer: {\n position: \"absolute\",\n bottom: 8,\n left: 8,\n backgroundColor: \"rgba(255, 255, 255, 0.9)\",\n borderRadius: 16,\n padding: 6,\n shadowColor: \"#000\",\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.3,\n shadowRadius: 3,\n elevation: 5,\n borderWidth: 1.5,\n borderColor: HORMONE_HEX_COLOR,\n },\n});\n\ntype RecipeCardProps = {\n recipeMeal: GeneratedRecipeMeal;\n index: number;\n mealSlotSpecification: MealSlotSpecification;\n onButtonPress: () => void;\n onOpenAction?: () => void;\n};\n\nconst RecipeMealCard = ({\n recipeMeal,\n index,\n onButtonPress,\n onOpenAction,\n mealSlotSpecification,\n}: RecipeCardProps): JSX.Element => {\n const theme = useTheme();\n\n const user = useSelector(userSelector);\n\n // Check if recipe has HORMONE tag and if the hormone feature flag is active\n const hasHormoneTag = recipeMeal.recipe_template.tags?.some((tag) => tag.name === \"HORMONE\");\n const showHormoneIndicator = hasHormoneTag && isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES);\n\n return (\n \n \n \n \n {showHormoneIndicator ? (\n \n \n \n ) : null}\n \n \n \n {recipeMeal.recipe_template.name}\n\n {Boolean(recipeMeal?.recipe_template?.preparation_time_min) && (\n \n \n \n {recipeMeal.recipe_template.preparation_time_min}\n {\"m\"}\n \n \n )}\n\n {/* kcal and protein for this meal vs MealSlotSpecification */}\n \n <>\n \n \n \n \n\n \n \n \n \n \n \n \n );\n};\n\nexport default RecipeMealCard;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n pageHeader: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingHorizontal: Scale(24),\n paddingVertical: VerticalScale(12),\n },\n createRecipe: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n marginVertical: VerticalScale(24),\n },\n titleText: {\n marginLeft: Scale(11),\n },\n tickIcon: {\n width: Scale(20),\n height: Scale(20),\n },\n descriptionText: {\n marginLeft: Scale(8),\n },\n recipesListContainer: {},\n statusViewContainer: {},\n statusTextContainer: {\n marginTop: VerticalScale(30),\n },\n modalButtonContainer: {\n marginTop: VerticalScale(48),\n },\n});\n\nexport default styles;\n","import { useActionSheet } from \"@expo/react-native-action-sheet\";\nimport { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Center, Icon, IconButton, Spinner, useTheme } from \"native-base\";\nimport queryString from \"query-string\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { FlatList, Image, Modal, SafeAreaView, ScrollView, Text, TouchableOpacity, View } from \"react-native\";\nimport { useSelector } from \"react-redux\";\nimport * as URI from \"uri-js\";\n\nimport { store } from \"../../../store\";\nimport { CommonCategoryCard, CommonSearchInput, CommonSelect } from \"../commons\";\nimport CommonHeaderDivider from \"../commons/CommonHeaderDivider\";\nimport RecipeMealCard from \"../components/RecipeCard\";\nimport { commonStyles, Images, Routes, Scale, width } from \"../constants\";\nimport { MealType, RecipeCategory, RecipeTag, SourceProvider } from \"../constants/data\";\nimport { addMealToPlanner, generateMealsPrefetchOptions, getPlannerData } from \"../helpers/diaryHelpers\";\nimport { formatMealType } from \"../helpers/generalHelpers\";\nimport {\n FeatureFlag,\n getOrganisation,\n isFeatureFlagEnabled,\n shouldHaveAccessToCreateYourOwnRecipes,\n} from \"../helpers/userHelpers\";\nimport type { RecipeSearchScreenParams, RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n FoodGenerateMealsListApiArg,\n GeneratedRecipeMeal,\n MealTypeEnum,\n RecipeMeal,\n RecipeMealRequest,\n RecipeTemplate,\n RecipeTemplateRequest,\n} from \"../services/backendTypes\";\nimport { api } from \"../services/baseApi\";\nimport logger from \"../services/logger\";\nimport { userSelector, viewAsUserSelector } from \"../slices/userSlice\";\nimport type { CategoryFilter, RecipeMacrosItemType, RecipeTagOrCategory } from \"../types\";\nimport styles from \"./RecipeSearchScreenStyle\";\n\n// NOTE: There is a scoping problem with usePrefetch, I don't know why\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst {\n useFoodRecipeMealCreateMutation,\n useFoodGenerateMealsListQuery,\n usePlannerCalendarItemCreateMutation,\n usePlannerPlanGeneratedRecipeMealCreateMutation,\n usePlannerCalendarItemDestroyMutation,\n} = backendApi;\n\nconst RECIPE_TAG_TO_NAME = {\n [RecipeTag.BREAD]: \"Bread\",\n [RecipeTag.BURGER]: \"Burger\",\n [RecipeTag.COUSCOUS_AND_QUINOA]: \"Couscous and quinoa\",\n [RecipeTag.DAIRY]: \"Dairy\",\n [RecipeTag.DIPS_AND_SPREADS]: \"Dips and spreads\",\n [RecipeTag.KETO]: \"Keto\",\n [RecipeTag.PANCAKES_AND_OMELETTES]: \"Pancakes and omelettes\",\n [RecipeTag.PASTA]: \"Pasta\",\n [RecipeTag.POTATO]: \"Potato\",\n [RecipeTag.RICE_AND_NOODLES]: \"Rice and noodles\",\n [RecipeTag.SALAD]: \"Salad\",\n [RecipeTag.SNACKS_AND_BAKES]: \"Snacks and cakes\",\n [RecipeTag.SOUP]: \"Soup\",\n [RecipeTag.VEGAN]: \"Vegan\",\n [RecipeTag.WRAP]: \"Wrap\",\n};\n\nconst TAG_CATEGORY_LIST: CategoryFilter[] = (Object.keys(RecipeTag) as Array).map((tag, i) => ({\n id: `${i}_tag`,\n label: RECIPE_TAG_TO_NAME[RecipeTag[tag]],\n value: RecipeTag[tag],\n type: \"image\",\n image: Images.CategoryBrood, // FIXME: use appropriate image\n}));\n\nenum SelectedMealPreparationTime {\n LTE_5 = \"5 min. or less\",\n LTE_10 = \"10 min. or less\",\n LTE_15 = \"15 min. or less\",\n LTE_20 = \"20 min. or less\",\n LTE_30 = \"30 min. or less\",\n GTE_30 = \"30 min. or more\",\n ALL = \"All preparation times\",\n}\n\nconst SELECTED_MEAL_PREPARATION_TIME_TO_QUERY_ARGS = {\n [SelectedMealPreparationTime.LTE_5]: { preparationTimeMinLte: 5 },\n [SelectedMealPreparationTime.LTE_10]: { preparationTimeMinLte: 10 },\n [SelectedMealPreparationTime.LTE_15]: { preparationTimeMinLte: 15 },\n [SelectedMealPreparationTime.LTE_20]: { preparationTimeMinLte: 20 },\n [SelectedMealPreparationTime.LTE_30]: { preparationTimeMinLte: 30 },\n [SelectedMealPreparationTime.GTE_30]: { preparationTimeMinGte: 30 },\n [SelectedMealPreparationTime.ALL]: undefined,\n};\n\n// TODO: Put these in a data file\nconst sampleMacrosForDisplay: RecipeMacrosItemType[] = [\n {\n macroName: \"kcal\",\n progress: 630,\n total: 716,\n unit: \"kcal\",\n },\n {\n macroName: \"protein\",\n progress: 8,\n total: 18,\n unit: \"g\",\n },\n {\n macroName: \"fat\",\n progress: 23,\n total: 27,\n unit: \"g\",\n },\n {\n macroName: \"carbohydrates\",\n progress: 16,\n total: 33,\n unit: \"g\",\n },\n];\n\ntype ModalContentProps = {\n modalizeRef: React.Ref;\n};\n\ntype RecipeMealSearchByPageInternal = { [number: number]: GeneratedRecipeMeal[] };\ntype RecipeMealSearchByPage = { byPage: RecipeMealSearchByPageInternal };\n\ntype Props = {\n navigation: NativeStackNavigationProp;\n route: {\n params: RecipeSearchScreenParams;\n };\n};\n\nconst recipeMealSearchInitialState = { byPage: {} };\n\nconst MemoizedRecipeMealCard = React.memo(\n RecipeMealCard,\n (prevProps, nextProps) => prevProps.recipeMeal.recipe_template.id === nextProps.recipeMeal.recipe_template.id\n);\n\nconst GENERATE_MEALS_ENDPOINT_NAME = \"foodGenerateMealsList\";\n\nconst RecipeSearchScreen = ({\n navigation,\n route: {\n params: { mealSlotSpecification, currentCalendarDay, calendarItemToReplace },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const CATEGORY_TO_NAME = {\n [RecipeCategory.POPULAR]: \"Popular\",\n [RecipeCategory.FAVOURITE]: t(\"recipe_search.category_favourite\"),\n [RecipeCategory.OWN_RECIPE]: t(\"recipe_search.category_own\"),\n };\n\n const POPULAR_CATEGORY = {\n id: `${1}_category`,\n label: CATEGORY_TO_NAME[RecipeCategory.POPULAR],\n value: RecipeCategory.POPULAR,\n image: Images.CategoryMostChosen,\n };\n const FAVOURITE_CATEGORY: CategoryFilter = {\n id: `${2}_category`,\n label: CATEGORY_TO_NAME[RecipeCategory.FAVOURITE],\n value: RecipeCategory.FAVOURITE,\n type: \"image\",\n image: Images.CategoryFavourite,\n };\n const OWN_MEAL_CATEGORY: CategoryFilter = {\n id: `${3}_category`,\n label: CATEGORY_TO_NAME[RecipeCategory.OWN_RECIPE],\n value: RecipeCategory.OWN_RECIPE,\n type: \"image\",\n image: Images.CategoryOwnRecipe,\n };\n\n const CATEGORY_LIST = [POPULAR_CATEGORY, FAVOURITE_CATEGORY, OWN_MEAL_CATEGORY];\n\n // NOTE: We are not showing these filters because they are out of scope for the current release\n const CATEGORY_FILTERS = [...CATEGORY_LIST, ...TAG_CATEGORY_LIST];\n\n const theme = useTheme();\n\n const MEAL_TYPE_LIST = (Object.keys(MealType) as Array).map((mealType, i) => ({\n id: i,\n label: formatMealType(MealType[mealType as MealTypeEnum], t),\n value: MealType[mealType],\n }));\n\n const viewAsUser = useSelector(viewAsUserSelector);\n const realUser = useSelector(userSelector);\n const user = viewAsUser || realUser;\n if (!user) {\n throw new Error(\"User is not set\");\n }\n\n const organisation = getOrganisation(user);\n const productLoggingIsDisabled = isFeatureFlagEnabled(organisation || null, FeatureFlag.DisableProductLogging);\n const recipeTemplateEditable = !productLoggingIsDisabled;\n const ownMealsAvailable = !productLoggingIsDisabled || shouldHaveAccessToCreateYourOwnRecipes(user);\n\n const CREATE_RECIPE_CATEGORY: CategoryFilter = {\n id: \"create_recipe\",\n label: t(\"planner.create_your_own_recipe_button_text\"),\n value: \"CREATE_RECIPE\",\n type: \"emoji\",\n emoji: \"👩‍🍳\",\n };\n\n const FILTERS_TO_SHOW = ownMealsAvailable\n ? [CREATE_RECIPE_CATEGORY, FAVOURITE_CATEGORY, OWN_MEAL_CATEGORY]\n : [FAVOURITE_CATEGORY];\n\n const [page, setPage] = useState(1);\n const [recipeMealsByPage, setRecipeMealsByPage] = useState(recipeMealSearchInitialState);\n const [searchText, setSearchText] = useState(\"\");\n const [selectedTags, setSelectedTags] = useState([]);\n const [selectedMealType, setSelectedMealType] = useState(MealType[mealSlotSpecification.meal_type]);\n const [selectedMealPreparationTime, setSelectedMealPreparationTime] = useState(\n SelectedMealPreparationTime.ALL\n );\n const [selectFavourites, setSelectFavourites] = useState(false);\n const [sourceProvider, setSourceProvider] = useState([SourceProvider.WEEKMEALS]);\n const [ownRecipeModalVisible, setOwnRecipeModalVisible] = useState(false);\n const { showActionSheetWithOptions } = useActionSheet();\n const setRecipeMealSearch = ({ results }: { results: GeneratedRecipeMeal[] }): void => {\n setRecipeMealsByPage({\n byPage: {\n ...recipeMealsByPage.byPage,\n [page]: results,\n },\n });\n };\n\n // NOTE: This is here to set the state of the search results dirty so we can use useEffect properly\n const [searchCounter, setSearchCounter] = useState(0);\n const resetPage = (): void => {\n setPage(1);\n setSearchCounter(searchCounter + 1);\n };\n\n const resetRecipeMealSearch = (): void => {\n resetPage();\n setRecipeMealsByPage(recipeMealSearchInitialState);\n };\n\n let mealGenerateQueryArgs: FoodGenerateMealsListApiArg = {\n mealSlotSpecification: mealSlotSpecification.id,\n ingredientSearch: searchText,\n favourite: selectFavourites,\n sourceProvider,\n tags: selectedTags,\n page,\n user: user.id,\n kcal: mealSlotSpecification.kcal || 0, // NOTE: this is included only for cache busting\n protein: mealSlotSpecification.protein || 0, // NOTE: this is included only for cache busting\n };\n\n if (selectedMealPreparationTime) {\n mealGenerateQueryArgs = {\n ...mealGenerateQueryArgs,\n ...SELECTED_MEAL_PREPARATION_TIME_TO_QUERY_ARGS[selectedMealPreparationTime],\n };\n }\n\n if (sourceProvider.includes(SourceProvider.USER_GENERATED) && user) {\n mealGenerateQueryArgs.author = user.id;\n }\n\n if (selectedMealType !== MealType.ALL) {\n mealGenerateQueryArgs.mealTypes = [selectedMealType];\n }\n\n const allFoodSearchArgs = [\n selectedTags,\n selectedMealType,\n selectedMealPreparationTime,\n selectFavourites,\n sourceProvider,\n ];\n\n useEffect(() => {\n resetRecipeMealSearch();\n }, allFoodSearchArgs);\n\n const {\n data,\n error,\n isLoading: isLoadingFirstTime,\n isFetching,\n } = useFoodGenerateMealsListQuery(mealGenerateQueryArgs);\n\n // Prefetching\n const onFirstPage = page === 1;\n const moreDataAvailable = Boolean(data?.next);\n const onSubsequentPageButMoreDataAvailable = moreDataAvailable && page > 1;\n const searchingForWeekmealsRecipes = sourceProvider.includes(SourceProvider.WEEKMEALS);\n const searchQueryEmpty = searchText === \"\";\n const searchingForOriginalMealType = selectedMealType === MealType[mealSlotSpecification.meal_type];\n const searchingForOriginalPrepTime = selectedMealPreparationTime === SelectedMealPreparationTime.ALL;\n\n const isOriginalQuery =\n !selectFavourites &&\n searchingForWeekmealsRecipes &&\n searchQueryEmpty &&\n searchingForOriginalMealType &&\n searchingForOriginalPrepTime;\n\n const shouldPrefetchNextPage =\n moreDataAvailable && Boolean((onFirstPage && isOriginalQuery) || onSubsequentPageButMoreDataAvailable);\n\n const pageToPrefetch = shouldPrefetchNextPage ? page + 1 : page;\n\n // NOTE: We do the prefetch off the critical path to speed up load times\n useEffect(() => {\n if (!shouldPrefetchNextPage) return;\n\n const prefetchRequestOptions = {\n ...mealGenerateQueryArgs,\n page: pageToPrefetch,\n };\n\n store.dispatch(\n // The compiler is wrong here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n api.util.prefetch(GENERATE_MEALS_ENDPOINT_NAME, prefetchRequestOptions, generateMealsPrefetchOptions)\n );\n }, [shouldPrefetchNextPage]);\n\n useEffect(() => {\n if (!isFetching && data?.results) {\n setRecipeMealSearch({ results: data.results });\n }\n }, [data, searchCounter]);\n\n const onPressBack = (): void => {\n navigation.goBack();\n };\n\n const onSearchTextChange = (value: string): void => {\n resetPage();\n setSearchText(value);\n };\n\n const onCategoryCardChange = (value: RecipeCategory | RecipeTag): void => {\n logger.debug(\"onCategoryCard\", value);\n resetPage();\n\n switch (value) {\n case RecipeCategory.FAVOURITE: {\n setSelectFavourites(!selectFavourites);\n return;\n }\n case RecipeCategory.OWN_RECIPE: {\n let updatedSourceProvider = [SourceProvider.USER_GENERATED];\n if (sourceProvider.includes(SourceProvider.USER_GENERATED)) {\n updatedSourceProvider = [];\n }\n\n setSourceProvider(updatedSourceProvider);\n return;\n }\n case RecipeCategory.POPULAR: {\n setSelectedTags([]);\n return;\n }\n default: {\n // This is a RecipeTag\n setSelectedTags([value]);\n }\n }\n };\n\n const [createCalendarItemFromGeneratedMeal] = usePlannerPlanGeneratedRecipeMealCreateMutation();\n const [createRecipeMealFromRecipeTemplate] = useFoodRecipeMealCreateMutation();\n\n const [deleteCalendarItemOnBackend] = usePlannerCalendarItemDestroyMutation();\n\n const [createCalendarItem] = usePlannerCalendarItemCreateMutation();\n const { refetchCalendarDays } = getPlannerData();\n\n const addRecipeMealToCalendar = async (recipeMeal: RecipeMeal): Promise => {\n await addMealToPlanner({\n currentCalendarDay,\n mealSlot: mealSlotSpecification,\n mealContentType: \"recipemeal\",\n meal: { ...recipeMeal, content_type: \"RecipeMeal\", id: recipeMeal.id },\n createCalendarItem,\n refetchCalendarDays,\n });\n\n refetchCalendarDays();\n };\n\n const createRecipeMealFromRecipeTemplateWrapper = async (\n recipeTemplate: RecipeTemplate,\n doNotPlan = false\n ): Promise => {\n const recipeTemplateWithImageRemoved = _.omit(recipeTemplate, [\"image\"]);\n const recipeTemplateRequest: RecipeTemplateRequest = recipeTemplateWithImageRemoved;\n const recipeMealRequest: RecipeMealRequest = {\n recipe_template: recipeTemplateRequest,\n portions: 1,\n };\n\n const recipeMeal = await createRecipeMealFromRecipeTemplate({\n recipeMealRequest,\n }).unwrap();\n\n if (!doNotPlan) {\n await addRecipeMealToCalendar(recipeMeal);\n }\n\n navigation.pop(1);\n };\n\n const createRecipeMealFromGeneratedMealWrapper = async (\n generatedRecipeMeal: GeneratedRecipeMeal,\n portions: number\n ): Promise => {\n if (!currentCalendarDay.id) {\n throw new Error(\"currentCalendarDay is not set\");\n }\n\n if (calendarItemToReplace) {\n // NOTE: Since this is used for the \"list alternates\" feature\n // if there is a calendarItemToReplace, we need to delete it first\n await deleteCalendarItemOnBackend({ id: calendarItemToReplace });\n }\n\n // NOTE: To speed this up even further this should return the updated CalendarDay on success\n await createCalendarItemFromGeneratedMeal({\n planGeneratedRecipeMealRequest: {\n ...generatedRecipeMeal,\n portions_to_plan: portions,\n // NOTE: we need to remove generatedRecipeMeal.recipe_template.image, note the\n // difference between RecipeTemplateRequest.image (blob) and RecipeTemplate.image (string)\n recipe_template: _.omit(generatedRecipeMeal.recipe_template, \"image\"),\n calendar_day_id: currentCalendarDay.id,\n meal_slot_specification_id: mealSlotSpecification.id,\n },\n });\n\n // NOTE: We do 2 here because there is the RecipeSearch screen also in the stack\n navigation.pop(2);\n };\n\n const onRecipeMealPress = (generatedRecipeMeal: GeneratedRecipeMeal): void => {\n navigation.push(Routes.AddRecipeTemplateStack, {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n screen: Routes.RecipeDetailScreen,\n params: {\n recipeMeal: generatedRecipeMeal,\n mealSlotSpecification,\n mealType: selectedMealType,\n recipeTemplateEditable,\n onSelect: (portions: number) => createRecipeMealFromGeneratedMealWrapper(generatedRecipeMeal, portions),\n },\n });\n };\n\n const onOpenActionSheet = (): void => {\n const options = [\"Edit\", \"Remove\", \"Cancel\"];\n const editBtnIndex = 0;\n const removeButtonIndex = 1;\n const cancelButtonIndex = 2;\n\n showActionSheetWithOptions(\n {\n options,\n cancelButtonIndex,\n destructiveButtonIndex: editBtnIndex,\n },\n (buttonIndex) => {\n if (buttonIndex === editBtnIndex) {\n logger.debug(\"Pressed Edit mode\");\n } else if (buttonIndex === removeButtonIndex) {\n logger.debug(\"Pressed Remove mode\");\n }\n // Do something here depending on the button index selected\n }\n );\n };\n\n const ownMealsFilterSelected =\n sourceProvider?.includes(SourceProvider.USER_GENERATED) && sourceProvider?.length === 1;\n\n // TODO: These should be in a helpers file when this file is refactored\n const isARecipeTag = (rt: RecipeTagOrCategory): rt is RecipeTag =>\n Object.values(RecipeTag).includes(rt as unknown as RecipeTag);\n const isARecipeCategory = (rc: RecipeTagOrCategory): rc is RecipeCategory =>\n Object.values(RecipeCategory).includes(rc as unknown as RecipeCategory);\n\n const isPopularSelected = selectedTags === undefined;\n\n const isCategoryFilterSelected = (category: CategoryFilter): boolean => {\n const isMyCategorySelected = isARecipeTag(category.value) && selectedTags?.includes(category.value);\n\n return (\n isMyCategorySelected ||\n (selectFavourites ? category.value === RecipeCategory.FAVOURITE : false) ||\n (isPopularSelected && !selectFavourites && !ownMealsFilterSelected\n ? category.value === RecipeCategory.POPULAR\n : false) ||\n (ownMealsFilterSelected ? category.value === RecipeCategory.OWN_RECIPE : false)\n );\n };\n\n const createCategoryCard = (category: CategoryFilter): JSX.Element => {\n const isCreateRecipeCard = category.value === \"CREATE_RECIPE\";\n\n return (\n {\n if (isCreateRecipeCard) {\n navigation.push(Routes.RecipeAddOwnStack, {\n screen: Routes.RecipeAddOwnScreen,\n params: {\n mealSlotSpecification,\n onSave: async (recipeTemplate: RecipeTemplate, doNotPlan?: boolean): Promise => {\n await createRecipeMealFromRecipeTemplateWrapper(recipeTemplate, doNotPlan);\n navigation.goBack();\n },\n submitMessage: t(\"recipe_create.save_as_meal_button_text\", {\n meal: formatMealType(mealSlotSpecification.meal_type, t),\n }),\n },\n });\n } else {\n if (category.value === \"CREATE_RECIPE\") {\n throw new Error(\"CREATE_RECIPE should not be a category\");\n }\n\n const selectedCategory = isARecipeCategory(category.value)\n ? RecipeCategory[category.value]\n : RecipeTag[category.value];\n\n onCategoryCardChange(selectedCategory);\n }\n }}\n />\n );\n };\n\n const headerComponent = React.useMemo(\n () => (\n \n \n }\n />\n \n {formatMealType(mealSlotSpecification.meal_type, t)}\n \n \n\n \n\n \n {/* NOTE: It is not advised to put a ScrollView (ie, FlatList) inside another ScrollView\n As such this is disabled for now. */}\n {/* */}\n \n \n }\n testID={\"recipe-search-input\"}\n />\n \n {/* NOTE: The filters (except own meals) are not in scope for the initial release */}\n {/* \n {CATEGORY_FILTERS.map(createCategoryCard)}\n {/* NOTE: Only offer the own meal (and favourites) filter */}\n \n {FILTERS_TO_SHOW.map(createCategoryCard)}\n \n {/* NOTE: This is not required because we do not use the RecipeTag filters at the moment */}\n \n setSelectedMealType(MealType[itemValue as MealTypeEnum])}\n testID=\"meal-type-select\"\n />\n\n \n ).map((value, index) => ({\n id: index,\n label: t(`recipe_search.preparation_time_filter_options.${value}`),\n value,\n }))}\n selectedValue={selectedMealPreparationTime || \"\"}\n placeholder={t(\"recipe_search.preparation_time_filter_text\")}\n onValueChange={(itemValue) => {\n setSelectedMealPreparationTime(itemValue as SelectedMealPreparationTime);\n }}\n testID={\"preparationTime-select\"}\n width={width * 0.4}\n />\n \n\n {!ownMealsFilterSelected ? (\n \n \n \n {t(\"recipe_search.autofitted_macros_message\")}\n \n \n ) : (\n \n )}\n\n \n \n \n \n ),\n [\n selectedMealType,\n selectedMealPreparationTime,\n selectedTags,\n selectFavourites,\n sourceProvider,\n // NOTE: The below should not be necessary\n // onPressBack,\n // mealSlotSpecification,\n // t,\n // onSearchTextChange,\n // createCategoryCard,\n // MEAL_TYPE_LIST,\n // navigation,\n // createRecipeMealFromRecipeTemplateWrapper,\n ]\n );\n\n const searchResultsList = _.map(Object.values(recipeMealsByPage.byPage).flat(), (recipeMeal) => ({\n ...recipeMeal,\n key: recipeMeal.recipe_template.id,\n }));\n\n const loadingAnotherPage = !isLoadingFirstTime && isFetching && page > 1;\n\n /**\n * This safely parses the next page value and then sets the next page.\n *\n * Note: If we just did setPage(page + 1) then we could get into a loop\n * due to the scroll constantly triggering `onEndReachedThreshold` - this logic prevents that\n *\n */\n const onEndReachedFunc = (): void => {\n if (data?.next) {\n const parsedNextUrl = URI.parse(data.next);\n\n if (parsedNextUrl.query) {\n const parsedUrlQuery = queryString.parse(parsedNextUrl.query);\n\n if (parsedUrlQuery.page && typeof parsedUrlQuery.page === \"string\") {\n const pageAsNumber = parseInt(parsedUrlQuery.page, 10);\n\n const pageAsNumberIsValid = Number.isInteger(pageAsNumber) && pageAsNumber > 1;\n if (pageAsNumberIsValid) {\n setPage(pageAsNumber);\n return;\n }\n }\n }\n\n throw new Error(`Failed to parse next url:${data.next}`);\n }\n };\n\n const renderItemFunction = ({\n item: generatedRecipeMeal,\n index,\n }: {\n item: GeneratedRecipeMeal;\n index: number;\n }): JSX.Element => (\n onRecipeMealPress(generatedRecipeMeal)}\n onOpenAction={onOpenActionSheet}\n mealSlotSpecification={mealSlotSpecification}\n index={index}\n />\n );\n\n return (\n \n : null}\n data={searchResultsList}\n style={{ backgroundColor: \"white\" }}\n onEndReached={onEndReachedFunc}\n onEndReachedThreshold={0.2}\n bounces\n renderItem={renderItemFunction}\n keyExtractor={(item) => String(item.recipe_template.id)}\n showsVerticalScrollIndicator={false}\n ListEmptyComponent={() => (\n <>\n
\n {isFetching || isLoadingFirstTime ? (\n \n ) : (\n {t(\"general.no_search_results\")}\n )}\n
\n \n )}\n keyboardShouldPersistTaps=\"handled\"\n testID={\"recipeResults-list\"}\n nativeID=\"recipeResults-list\"\n />\n
\n );\n};\nexport default RecipeSearchScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, width } from \"../constants\";\n\nconst RegisterStyles = StyleSheet.create({\n titleStyle: {\n marginBottom: Scale(20),\n },\n textBoxContainerExternalStyle: {\n marginBottom: Scale(10),\n },\n strongPasswordStyle: {\n height: Scale(4),\n width: width / 7,\n // backgroundColor: Colors.greyTextColor,\n borderRadius: Scale(2),\n marginRight: Scale(4),\n },\n strongPasswordContainer: {\n flexDirection: \"row\",\n marginHorizontal: Scale(20),\n },\n lightGrayColor: {\n // backgroundColor: Colors.greyTextColor,\n },\n textBoxContainerStyle: {\n marginRight: 0,\n width: 10,\n },\n checkboxTextStyle: {\n fontSize: Scale(14),\n fontWeight: \"500\",\n },\n checkboxStyle: {\n height: Scale(20),\n resizeMode: \"contain\",\n width: Scale(20),\n },\n checkBoxContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n height: Scale(20),\n },\n externalTextStyle: {\n fontSize: Scale(16),\n },\n container: {\n flex: 2,\n justifyContent: \"space-between\",\n },\n wrapper: {\n flex: 1,\n // backgroundColor: Colors.whiteColor,\n },\n logginContainer: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"flex-end\",\n },\n loginTouchableContainer: {\n position: \"absolute\",\n right: Scale(20),\n width: Scale(100),\n },\n bottomStyle: {\n flex: 1,\n justifyContent: \"flex-end\",\n marginBottom: Scale(30),\n },\n});\n\nexport default RegisterStyles;\n","// NOTE: This file is not currently used\n\nimport type { NativeStackNavigationProp } from \"@react-navigation/native-stack\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, TouchableOpacity, View } from \"react-native\";\nimport { CheckBox } from \"react-native-elements\";\n\nimport { CommonButton, CommonText, CommonTextInput } from \"../commons\";\nimport { Images, Routes, Scale } from \"../constants\";\nimport styles from \"./RegisterStyles\";\n\ntype RegisterParamList = {\n Register: {\n email: string;\n password: string;\n confirmPassword: string;\n checkBox: boolean;\n };\n\n LoginScreen: undefined;\n};\n\ninterface RegisterProps {\n navigation: NativeStackNavigationProp;\n}\n\nconst RegisterScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const [values, setValues] = useState({\n email: \"\",\n password: \"\",\n confirmPassword: \"\",\n checkBox: false,\n });\n\n const { email, password, confirmPassword, checkBox } = values;\n const handleNavigation = (): void => {\n navigation.navigate(Routes.LoginScreen as keyof RegisterParamList);\n };\n\n // Added\n const handleButtonNavigation = (): void => {\n // navigation.navigate(\"EmailConfirmationSent\");\n };\n\n const handleChange = (name: string, value: string | boolean): void => {\n setValues({ ...values, [name]: value });\n };\n\n // TODO: Name this better\n const checkDisableCondition = (): boolean => !(password === confirmPassword && checkBox);\n const renderStrongPassword = (): JSX.Element => (\n \n = 2 &&\n {\n // backgroundColor: Colors.primaryGreenColor,\n },\n ]}\n />\n = 3 &&\n {\n // backgroundColor: Colors.primaryGreenColor,\n },\n ]}\n />\n = 5 &&\n {\n // backgroundColor: Colors.primaryGreenColor,\n },\n ]}\n />\n = 7 &&\n {\n // backgroundColor: Colors.primaryGreenColor,\n },\n ]}\n />\n \n );\n\n const makeYourAccountButtonStyle = checkDisableCondition() ? styles.lightGrayColor : undefined;\n\n return (\n \n \n \n \n \n \n \n \n handleChange(\"email\", val)}\n />\n \n handleChange(\"password\", val)}\n password={true}\n textBoxContainerExternalStyle={styles.textBoxContainerExternalStyle}\n showEyeIcon={true}\n />\n {renderStrongPassword()}\n \n handleChange(\"confirmPassword\", val)}\n password={true}\n showEyeIcon={true}\n />\n \n }\n uncheckedIcon={}\n checked={checkBox}\n onPress={() => handleChange(\"checkBox\", !checkBox)}\n />\n \n \n \n \n \n \n \n );\n};\n\nexport default RegisterScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n addItemContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n marginTop: VerticalScale(32),\n },\n textBoxContainerExternalStyle: {\n width: \"50%\",\n },\n titleContainer: {\n marginTop: VerticalScale(24),\n },\n amountContainer: {\n flex: 1,\n },\n unitContainer: {\n flex: 2,\n marginRight: Scale(10),\n },\n textInputContainer: {\n marginTop: 6,\n },\n RecipeMacros: {\n marginTop: VerticalScale(32),\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n});\n\nexport default styles;\n","import type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Button, CheckIcon, Flex, FormControl, Input, Select, Text, View } from \"native-base\";\nimport React, { memo, useCallback } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport type { NativeSyntheticEvent, TextInputFocusEventData } from \"react-native\";\nimport { SafeAreaView } from \"react-native\";\nimport * as Yup from \"yup\";\n\nimport { CommonPageHeader } from \"../commons\";\nimport { commonStyles, Routes } from \"../constants\";\nimport { sortMealSlotSpecificationsByMealMoment } from \"../helpers/diaryHelpers\";\nimport { getServingDescriptionText } from \"../helpers/foodHelpers\";\nimport { formatMealType, formatNumberAsWholeNumber } from \"../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { Food, SuggestedServing } from \"../services/backendTypes\";\nimport styles from \"./AddIngredientScreenStyle\";\n\nconst { useFoodFoodRetrieveQuery } = backendApi;\n\ntype Props = NativeStackScreenProps;\n\nconst QuantityInput = memo(\n ({\n value,\n onChangeText,\n onBlur,\n error,\n t,\n }: {\n value: string;\n onChangeText: (text: string) => void;\n onBlur: (e: NativeSyntheticEvent) => void;\n error?: string;\n t: (key: string) => string;\n }) => {\n const [localValue, setLocalValue] = React.useState(value);\n\n const handleLocalChange = (text: string): void => {\n setLocalValue(text);\n };\n\n const handleBlur = (e: NativeSyntheticEvent): void => {\n onChangeText(localValue);\n onBlur(e);\n };\n\n return (\n \n {t(\"general.amount\")}\n \n {error}\n \n );\n }\n);\n\nQuantityInput.displayName = \"QuantityInput\";\n\nconst AddIngredientScreen = ({\n route: {\n params: { food: initialFood, ingredient, onChoose, chooseMealMoment, mealSlotSpecifications },\n },\n navigation,\n}: Props): JSX.Element | null => {\n const { t } = useTranslation();\n\n const {\n isLoading: isLoadingFoodQuery,\n error,\n data: returnedFood,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } = useFoodFoodRetrieveQuery({ id: ingredient?.suggested_serving.food }, { skip: initialFood });\n\n const [food, setFood] = React.useState(initialFood);\n\n React.useEffect(\n () =>\n // NOTE: Return the function to unsubscribe from the event so it gets removed on unmount\n navigation.addListener(\"focus\", () => {\n // TODO: Pre-select the amount input\n }),\n [navigation]\n );\n\n React.useEffect(() => {\n if (returnedFood && !isLoadingFoodQuery) {\n setFood(returnedFood);\n }\n }, [returnedFood]);\n\n const handleQuantityChange = useCallback(\n (setFieldValue: (field: string, value: number | string) => void) =>\n (quantity: string): void => {\n setFieldValue(\"quantity\", quantity.replace(\",\", \".\"));\n },\n []\n );\n\n if (!food && !ingredient) {\n throw new Error(\"No Food\");\n }\n\n if (chooseMealMoment && !mealSlotSpecifications) {\n throw new Error(\"No meal slot specifications found\");\n }\n\n const schemaShapeObject = {\n quantity: Yup.number().positive().required(t(\"general.required\")),\n suggestedServingId: Yup.number().positive().integer().required(t(\"general.required\")),\n };\n\n if (chooseMealMoment) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n schemaShapeObject.mealSlotSpecificationId = Yup.number().positive().integer();\n }\n\n if (!food) {\n return null;\n }\n if (!food.suggested_servings) {\n return null;\n }\n\n const header = (\n {\n navigation.goBack();\n }}\n onPressClose={() => {\n // NOTE: This leaves the current stack\n navigation.getParent()?.goBack();\n }}\n />\n );\n\n const ingredientSchema = Yup.object().shape(schemaShapeObject);\n\n type IngredientSchema = Yup.InferType;\n\n const getSuggestedServingFromForm = (values: IngredientSchema): SuggestedServing | undefined =>\n _.find(food?.suggested_servings, { id: Number(values.suggestedServingId) });\n\n const onSubmit = async (values: IngredientSchema): Promise => {\n const suggestedServing = getSuggestedServingFromForm(values);\n\n if (!suggestedServing) {\n throw new Error(`Could not find the suggested serving with id: ${values.suggestedServingId}`);\n }\n\n if (chooseMealMoment) {\n if (!mealSlotSpecifications) {\n throw new Error(\"No meal slot specifications provided to choose from\");\n }\n\n const mealSlot = _.find(mealSlotSpecifications, {\n id: Number(values.mealSlotSpecificationId),\n });\n\n if (!mealSlot) {\n throw new Error(\"Could not find meal slot\");\n }\n\n await onChoose(food, suggestedServing, values.quantity, mealSlot);\n } else {\n await onChoose(food, suggestedServing, values.quantity);\n }\n };\n\n const initialValueSuggestedServingId = ingredient?.suggested_serving?.id || food.suggested_servings[0]?.id || 0;\n const initialQuantity = ingredient?.quantity || 1;\n const initialValues = ingredientSchema.cast({\n quantity: initialQuantity,\n suggestedServingId: initialValueSuggestedServingId,\n });\n\n return (\n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, setFieldValue, errors, isValid }) => {\n const getIndividualMacroForDisplay = (value: number): string =>\n formatNumberAsWholeNumber(value * values.quantity);\n\n const suggestedServing = getSuggestedServingFromForm(values);\n\n const kcalDescription = `${getIndividualMacroForDisplay(suggestedServing?.kcal || 0)} ${t(\"general.kcal\")}`;\n const proteinDescription = `${getIndividualMacroForDisplay(suggestedServing?.protein || 0)}g ${t(\n \"general.protein\"\n )}`;\n const carbsDescription = `${getIndividualMacroForDisplay(suggestedServing?.carbohydrates || 0)}g ${t(\n \"general.carbohydrates\"\n )}`;\n const fatDescription = `${getIndividualMacroForDisplay(suggestedServing?.fat || 0)}g ${t(\"general.fat\")}`;\n const macrosDescription = `${kcalDescription}, ${proteinDescription}, ${carbsDescription}, ${fatDescription}`;\n\n const servingInGrams = suggestedServing ? getServingDescriptionText(suggestedServing).servingInGrams : \"\";\n\n return (\n \n {header}\n \n \n {food.name}\n \n\n {/* TODO: Only show this if we are editing a recipe */}\n {/* \n {recipeMacros?.map((item: RecipeMacrosItemType, index: number) => (\n \n ))}\n */}\n\n \n \n \n {t(\"general.unit\")}\n ,\n }}\n onValueChange={(itemValue) => setFieldValue(\"suggestedServingId\", itemValue)}\n testID={\"unit-select\"}\n >\n {food?.suggested_servings?.map((ss: SuggestedServing) => (\n \n ))}\n \n {errors.suggestedServingId}\n \n \n \n handleBlur(\"quantity\")}\n error={errors.quantity}\n t={t}\n />\n \n \n\n \n {servingInGrams ? (\n \n {`(${servingInGrams})`}\n \n ) : null}\n \n\n {chooseMealMoment && mealSlotSpecifications && !_.isEmpty(mealSlotSpecifications) ? (\n \n \n {t(\"recipe_search.meal_type_filter_text\")}\n setFieldValue(\"mealSlotSpecificationId\", itemValue)}\n testID={\"chooseMealMomentForProduct-select\"}\n >\n {sortMealSlotSpecificationsByMealMoment(mealSlotSpecifications).map((mealSlotSpecification) => (\n \n ))}\n \n {errors.mealSlotSpecificationId}\n \n \n ) : null}\n\n {suggestedServing ? (\n \n {macrosDescription}\n \n ) : null}\n \n\n \n handleSubmit()}\n testID={\"foodSearchSubmit\"}\n nativeID={\"foodSearchSubmit\"}\n >\n {t(\"general.add\")}\n \n \n \n );\n }}\n \n );\n};\n\nexport default AddIngredientScreen;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { skipToken } from \"@reduxjs/toolkit/dist/query\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { BarCodeScanner, PermissionStatus } from \"expo-barcode-scanner\";\nimport _ from \"lodash\";\nimport { IconButton } from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Button, StyleSheet, Text, View } from \"react-native\";\n\nimport { Routes } from \"../constants\";\nimport type { OnChooseProduct, RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { Food, MealSlotSpecification } from \"../services/backendTypes\";\n\nconst { useFoodSearchByBarcodeRetrieveQuery } = backendApi;\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n flexDirection: \"column\",\n justifyContent: \"center\",\n },\n backButton: {\n position: \"absolute\",\n top: 50,\n left: 30,\n right: 0,\n bottom: 0,\n height: 50,\n width: 50,\n },\n});\n\ntype Props = NativeStackScreenProps;\n\nexport default function BarcodeScanner({\n navigation,\n route: {\n params: { onChoose, chooseMealMoment, mealSlotSpecifications },\n },\n}: Props): JSX.Element {\n const { t } = useTranslation();\n const [hasPermission, setHasPermission] = useState(false);\n const [scanned, setScanned] = useState(false);\n\n const [barcode, setBarcode] = useState(\"\");\n\n // NOTE: For dev purposes use barcodes found here: https://www.buycott.com/brand/40186/jumbo-upc\n // https://www.buycott.com/upc/8711715891228\n const {\n isError,\n isLoading,\n data: food,\n error,\n } = useFoodSearchByBarcodeRetrieveQuery({ barcode }, { skip: barcode === \"\" });\n\n if (!isError && !isLoading && food) {\n // console.log(\"currentData: \", currentData);\n // navigation.navigate(Routes.FoodDetail, { food: data });\n\n if (_.isEmpty(food)) {\n alert(\"Could not find a food with that barcode.\");\n } else {\n const params: {\n food: Food;\n onChoose: OnChooseProduct;\n chooseMealMoment?: boolean;\n mealSlotSpecifications?: MealSlotSpecification[];\n } = { food, onChoose };\n\n if (chooseMealMoment) {\n params.chooseMealMoment = chooseMealMoment;\n }\n\n if (mealSlotSpecifications) {\n params.mealSlotSpecifications = mealSlotSpecifications;\n }\n\n navigation.navigate(Routes.AddIngredientScreen, params);\n }\n } else if (isError) {\n Sentry.captureException(error);\n\n alert(`Error: ${JSON.stringify(error)}`);\n }\n\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n const { status } = await BarCodeScanner.requestPermissionsAsync();\n setHasPermission(status === PermissionStatus.GRANTED);\n })();\n }, []);\n\n const handleBarCodeScanned = ({ data }: { data: string }): void => {\n setScanned(true);\n setBarcode(data);\n };\n\n if (hasPermission === null) {\n return {t(\"system_permissions.request_camera_permissions_text\")};\n }\n if (hasPermission === false) {\n return {t(\"system_permissions.camera_permission_not_granted_text\")};\n }\n\n return (\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n\n navigation.goBack()}\n />\n\n {scanned ? \n \n \n
\n \n \n {t(\"checkout.main.already_have_account\")}\n \n \n
\n \n \n \n \n )}\n \n \n );\n};\n\nconst CheckoutScreen = ({ route, navigation }: Props): JSX.Element => (\n \n);\n\nexport default CheckoutScreen;\n","import { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Button, Divider, Flex, FormControl, Input, Switch, Text } from \"native-base\";\nimport React from \"react\";\nimport { TFunction, useTranslation } from \"react-i18next\";\nimport * as Yup from \"yup\";\n\nimport { VerticalScale } from \"../../constants\";\nimport type { DesiredMealMoments, PossibleMealMoment } from \"../../services/nutritionCalculations\";\n\nexport const PossibleMealMomentComponent = ({\n mealMoment,\n setMealMomentPreferences,\n}: {\n mealMoment: PossibleMealMoment;\n setMealMomentPreferences: React.Dispatch>;\n}): JSX.Element => {\n const { t } = useTranslation();\n\n function onChangeSwitch(): void {\n setMealMomentPreferences((prevState) => {\n const newState = { ...prevState };\n newState[mealMoment] = !newState[mealMoment];\n return newState;\n });\n }\n\n return (\n <>\n \n \n {t(`general.meal_types.${mealMoment}`)}\n \n \n \n \n \n );\n};\n\n// type MacroItemEditRowProps = {\n// category: string;\n// onChangeText?: () => void;\n// pertentage?: number;\n// diff: number;\n// description?: string;\n// amount?: number;\n// rowIndex?: number;\n// };\n// const MacroItemEditRow = ({\n// category,\n// onChangeText,\n// pertentage,\n// diff,\n// description,\n// amount,\n// rowIndex,\n// }: MacroItemEditRowProps): JSX.Element => (\n// <>\n// \n// \n// {t(category)}\n// \n// \n// {amount ? (\n// \n// {amount}\n// \n// ) : (\n// logger.debug(\"onProteinChange\", val)}\n// placeholder={\"\"}\n// />\n// )}\n// \n// \n// {pertentage ? `${pertentage}%` : \"\"}\n// {diff}\n// \n// \n// {description ? (\n// {t(description)}\n// ) : null}\n// \n// \n// );\n\nexport const targetMacrosFormSchema = Yup.object().shape({\n protein: Yup.number().positive().required(),\n carbs: Yup.number().positive().required(),\n fat: Yup.number().positive().required(),\n});\nexport type TargetMacrosFormSchema = Yup.InferType;\n\nexport const TargetMacronutrientsComponent = ({\n onSubmit,\n t,\n initialValues,\n}: {\n initialValues: TargetMacrosFormSchema;\n t: TFunction;\n onSubmit: (formValues: TargetMacrosFormSchema) => void;\n}): JSX.Element => (\n \n {({ handleChange, handleSubmit, values, errors, isValid }) => (\n <>\n \n {/* TODO: Use MacroItemEditRow to provide coach with extra info (eg, the diff from the calculated macro) */}\n {/* */}\n\n \n {t(\"general.protein\")}\n \n {errors.protein}\n \n\n \n {t(\"general.fat\")}\n \n {errors.fat}\n \n\n \n {t(\"general.carbohydrates\")}\n \n {errors.carbs}\n \n \n\n handleSubmit()}\n mt=\"2\"\n testID=\"targetMacros-submit\"\n nativeID=\"targetMacrosSubmit\"\n >\n {t(\"general.save_button_text\")}\n \n \n )}\n \n);\n\nexport const EDIT_NUTRITION_PLAN_TABS_BACK_BUTTON_TESTID = \"editNutritionPlanTabs-backButton\";\n","import _ from \"lodash\";\nimport { useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport type { MealSlotSpecification, MealTypeEnum, User } from \"../../services/backendTypes\";\nimport type { LegacyInput } from \"../../services/legacyNutritionCalculations7\";\nimport { clientNutritionPlansByIdSelector, clientsSelector, NUTRITION_PLAN_WITHOUT_ID } from \"../../slices/userSlice\";\n\n/**\n * 0 = 0%\n */\nexport const DEFAULT_ENERGY_BALANCE = parseInt(\"100\", 10);\ntype OTHER_ENERGY_BALANCE_TYPE = \"-12361781\";\nexport const OTHER_ENERGY_BALANCE: OTHER_ENERGY_BALANCE_TYPE = \"-12361781\";\nexport type EnergyBalanceOption = \"80\" | \"90\" | \"100\" | \"105\" | \"110\" | OTHER_ENERGY_BALANCE_TYPE;\nexport const energyBalanceChoices: EnergyBalanceOption[] = [\"80\", \"90\", \"100\", \"105\", \"110\"];\n\nexport const energyBalanceFormSchema = Yup.object().shape({\n // TODO: For some reason \"\" (incorrectly) passes form validation\n energyBalance: Yup.number().min(10).max(500).required().default(DEFAULT_ENERGY_BALANCE),\n protein: Yup.number().min(0),\n fat: Yup.number().min(0),\n carbohydrates: Yup.number().min(0),\n});\nexport type EnergyBalanceFormSchema = Yup.InferType;\n\nexport const getDefaultMealType = (order: number): MealTypeEnum => {\n if (order === 0) {\n return \"BREAKFAST\";\n }\n if (order === 2) {\n return \"LUNCH\";\n }\n if (order === 4) {\n return \"DINNER\";\n }\n\n return \"SNACK\";\n};\n\nexport function getClientNutritionPlan(client: User, id: number = NUTRITION_PLAN_WITHOUT_ID): LegacyInput {\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const clientNutritionPlansByClientId = useSelector(clientNutritionPlansByIdSelector);\n\n if (!client) {\n throw new Error(\"Client not found\");\n }\n\n const clientNutritionPlans = _.get(clientNutritionPlansByClientId, client.id);\n\n const clientNutritionPlan = _.find(clientNutritionPlans, { id });\n\n if (!clientNutritionPlan) {\n throw new Error(`Client nutrition plan \"${id}\" not found`);\n }\n\n return clientNutritionPlan;\n}\n\nexport function calculateKcalForMealSlot(mealSlotSpecification: MealSlotSpecification): number {\n const { protein, fat, carbohydrates } = mealSlotSpecification;\n return (protein || 0) * 4 + (fat || 0) * 9 + (carbohydrates || 0) * 4;\n}\n","import { Entypo, MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Button, Flex, Icon, IconButton, Switch, Text, useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\n\nimport { commonStyles, isDesktopScreen, Routes } from \"../../constants\";\nimport { IS_MOBILE_WEB, isMobilePlatform } from \"../../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../../navigation/NavigationStackParams\";\nimport { LegacyMealState, rebalanceSizes } from \"../../services/legacyNutritionCalculations7\";\nimport { updateLegacyInput } from \"../../services/nutritionCalculations7\";\nimport { userSlice } from \"../../slices/userSlice\";\nimport { EDIT_NUTRITION_PLAN_TABS_BACK_BUTTON_TESTID } from \"./helperComponents\";\nimport { getClientNutritionPlan } from \"./helperFunctions\";\n\ntype Props = NativeStackScreenProps;\nconst ChooseMealMomentsTab2 = ({\n navigation,\n route: {\n params: { client, nutritionPlanId },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n const dispatch = useDispatch();\n const isDesktop = isDesktopScreen();\n\n const clientNutritionPlan7Edit = getClientNutritionPlan(client, nutritionPlanId);\n\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n const nextButtonEnabled = _.some(clientNutritionPlan7Edit.meals, \"enabled\");\n\n function toggleMealMoment(legacyMealStateToToggle: LegacyMealState): void {\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n const updatedMealState = { ...legacyMealStateToToggle, enabled: !legacyMealStateToToggle.enabled };\n\n const updatedMeals = clientNutritionPlan7Edit.meals.map((legacyMealState) =>\n legacyMealState.mealMoment === legacyMealStateToToggle.mealMoment ? updatedMealState : legacyMealState\n );\n\n const legacyInputAfterMealMomentToggled = { ...clientNutritionPlan7Edit, meals: rebalanceSizes(updatedMeals) };\n\n const updatedLegacyInput = updateLegacyInput(legacyInputAfterMealMomentToggled, client.intake);\n\n dispatch(\n userSlice.actions.storeClientNutritionPlan({\n clientId: client.id,\n plan: updatedLegacyInput,\n })\n );\n }\n\n const onNext = (): void => {\n navigation.push(Routes.EditMealMomentsTab3, { client, nutritionPlanId: clientNutritionPlan7Edit.id });\n };\n\n const onBack = (): void => navigation.goBack();\n\n const isNotLastListItem = (index: number): boolean =>\n index !== Object.keys(clientNutritionPlan7Edit.meals).length - 1;\n\n const mealMoments = clientNutritionPlan7Edit.meals.map((legacyMealState: LegacyMealState, i) => (\n \n \n toggleMealMoment(legacyMealState)}\n offTrackColor=\"coolGray.100\"\n testID={`mealMomentSwitch-${legacyMealState.mealMoment}`}\n nativeID={`mealMomentSwitch-${legacyMealState.mealMoment}`}\n />\n \n {t(`general.meal_types.${legacyMealState.mealMoment}`)}\n \n \n \n ));\n\n const nextButton = (\n \n {t(\"general.next_button_text\")}\n \n );\n\n const quitEditingNutritionPlan = (): void => {\n navigation.push(Routes.CoachModeClientInfoScreen, { clientId: client.id });\n };\n\n const commonContainerStyle = {\n flex: 1,\n backgroundColor: \"white\",\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n\n const webWidth = IS_MOBILE_WEB ? \"100%\" : \"50%\";\n const flexWidth = isMobilePlatform() ? \"100%\" : webWidth;\n return (\n \n \n \n \n \n \n \n }\n testID={EDIT_NUTRITION_PLAN_TABS_BACK_BUTTON_TESTID}\n />\n \n\n {mealMoments}\n\n {!isDesktop && nextButton}\n \n\n {isDesktop ? {nextButton} : null}\n \n \n );\n};\n\nexport default ChooseMealMomentsTab2;\n","import { Entypo, MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Button, Column, Flex, Icon, IconButton, Text, useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\n\nimport { CommonNumberInputWithPlusMinusButtons } from \"../../commons\";\nimport { commonStyles, isDesktopScreen, Routes, Scale } from \"../../constants\";\nimport { formatNumberAsPercentage, formatNumberAsWholeNumber } from \"../../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../../navigation/NavigationStackParams\";\nimport type { LegacyMealState } from \"../../services/legacyNutritionCalculations7\";\nimport logger from \"../../services/logger\";\nimport { updateLegacyInput } from \"../../services/nutritionCalculations7\";\nimport { userSlice } from \"../../slices/userSlice\";\nimport { getClientNutritionPlan } from \"./helperFunctions\";\n\ntype Props = NativeStackScreenProps;\nconst EditMealMomentsTab3 = ({\n navigation,\n route: {\n params: { client, nutritionPlanId },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const theme = useTheme();\n const isDesktop = isDesktopScreen();\n const isMobileScreen = !isDesktop;\n\n const clientNutritionPlan7Edit = getClientNutritionPlan(client, nutritionPlanId);\n\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n const enabledMeals = _.filter(clientNutritionPlan7Edit.meals, \"enabled\");\n\n const isNotLastListItem = (index: number): boolean => index !== enabledMeals.length - 1;\n\n const createMealMomentComponent = (legacyMealState: LegacyMealState, i: number): JSX.Element => {\n const kcalForMealMoment = `${legacyMealState.macros?.calories || 0} ${t(\"general.kcal\")}`;\n const proteinForMealMoment = `${legacyMealState.macros?.protein || 0}g ${t(\"general.protein\")}`;\n\n const kcalAndProteinDescription = `${kcalForMealMoment}, ${proteinForMealMoment}`;\n\n const onChangeLegacyMealStateSize = (updatedValue: number): void => {\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n // TODO: Do we need to do any validation?\n const updatedMealState = { ...legacyMealState, size: updatedValue };\n\n const updatedMeals = clientNutritionPlan7Edit.meals.map((legacyMealStateBeingIterated) =>\n legacyMealStateBeingIterated.mealMoment === legacyMealState.mealMoment\n ? updatedMealState\n : legacyMealStateBeingIterated\n );\n\n const legacyInputAfterMealMomentSizeUpdated = { ...clientNutritionPlan7Edit, meals: updatedMeals };\n\n dispatch(\n userSlice.actions.storeClientNutritionPlan({\n clientId: client.id,\n plan: updateLegacyInput(legacyInputAfterMealMomentSizeUpdated, client.intake),\n })\n );\n };\n\n return (\n \n \n \n \n {t(`general.meal_types.${legacyMealState.mealMoment}`)}\n \n \n {kcalAndProteinDescription}\n \n \n\n \n \n \n );\n };\n const mealMomentsComponent = enabledMeals.map(createMealMomentComponent);\n\n const totalEnergyBalanceOfChosenSizes = _.sumBy(clientNutritionPlan7Edit.meals, \"size\");\n const totalEnergyBalanceOfChosenSizesPercentageForDisplay = formatNumberAsPercentage(\n totalEnergyBalanceOfChosenSizes / 100\n );\n\n const shouldNextButtonBeDisabled =\n totalEnergyBalanceOfChosenSizes === 0 || _.some(clientNutritionPlan7Edit.meals, { enabled: true, size: 0 });\n\n const totalComponent = (\n \n {/* FIXME: Use a proper translation */}\n \n {\"Total:\"}{\" \"}\n \n \n {totalEnergyBalanceOfChosenSizesPercentageForDisplay}\n \n \n );\n\n const onNext = (): void => {\n navigation.push(Routes.FineTuningTab4, { client, nutritionPlanId: clientNutritionPlan7Edit.id });\n };\n\n const onBack = (): void => navigation.goBack();\n\n const nextButton = (\n \n {t(\"general.next_button_text\")}\n \n );\n\n const quitEditingNutritionPlan = (): void => {\n navigation.push(Routes.CoachModeClientInfoScreen, { clientId: client.id });\n };\n\n const commonContainerStyle = {\n backgroundColor: \"white\",\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n\n return (\n \n \n \n \n \n \n \n }\n />\n \n \n {totalComponent}\n {mealMomentsComponent}\n \n {!isDesktop && nextButton}\n \n\n {isDesktop ? {nextButton} : null}\n \n \n );\n};\n\nexport default EditMealMomentsTab3;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n checkedContainer: {\n backgroundColor: \"white\",\n // borderColor: Colors.primaryGreenColor,\n borderWidth: 2,\n },\n checkboxBase: {\n width: Scale(28),\n height: Scale(28),\n justifyContent: \"center\",\n alignItems: \"center\",\n borderRadius: 100,\n borderWidth: 2,\n // borderColor: Colors.borderColor,\n backgroundColor: \"white\",\n marginRight: Scale(16),\n },\n checkboxChecked: {\n borderWidth: 2,\n // borderColor: Colors.primaryGreenColor,\n // backgroundColor: Colors.primaryGreenColor,\n },\n multiCheckbox: {\n borderRadius: 4,\n },\n checkedIcon: {\n width: Scale(20),\n height: Scale(20),\n },\n descriptionText: {\n flexShrink: 1,\n display: \"flex\",\n flexDirection: \"row\",\n flexWrap: \"wrap\",\n },\n recipeMacrosContainer: {\n flex: 1,\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n textInputStyle: {\n width: \"100%\",\n marginBottom: 10,\n marginTop: 0,\n },\n externalTextInputStyle: {\n width: \"100%\",\n maxWidth: 200,\n marginHorizontal: 0,\n marginVertical: 0,\n paddingVertical: 0,\n },\n externalContainer: {\n backgroundColor: \"white\",\n // borderColor: Colors.disableButton,\n borderWidth: 1,\n marginTop: VerticalScale(5),\n },\n});\n\nexport default styles;\n","/* eslint-disable max-len */\nimport { Entypo, Feather, MaterialCommunityIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport {\n Actionsheet,\n Button,\n Center,\n Flex,\n FormControl,\n Icon,\n IconButton,\n Input,\n Pressable,\n ScrollView,\n Text,\n theme,\n useDisclose,\n View,\n} from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\n\nimport CommonHeaderDivider from \"../../commons/CommonHeaderDivider\";\nimport { commonStyles, Routes } from \"../../constants\";\nimport { useKeyboardBottomInset } from \"../../constants/helperFunction\";\nimport { getNutritionDayPlanOverviewComponent } from \"../../helpers/coachHelpers\";\nimport {\n formatNumberAsPercentage,\n formatNumberAsWholeNumber,\n IS_MOBILE_WEB,\n isMobilePlatform,\n} from \"../../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../../navigation/NavigationStackParams\";\nimport type { MealSlotSpecification } from \"../../services/backendTypes\";\nimport type { LegacyInput } from \"../../services/legacyNutritionCalculations7\";\nimport logger from \"../../services/logger\";\nimport { calculateEnergyExpenditure } from \"../../services/nutritionCalculations\";\nimport { convertToMealSlotSpecifications, updateLegacyInput } from \"../../services/nutritionCalculations7\";\nimport { userSlice } from \"../../slices/userSlice\";\nimport styles from \"../MacroProfilesEditDayScreenStyle\";\nimport { TargetMacronutrientsComponent, TargetMacrosFormSchema, targetMacrosFormSchema } from \"./helperComponents\";\nimport {\n DEFAULT_ENERGY_BALANCE,\n energyBalanceChoices,\n EnergyBalanceFormSchema,\n energyBalanceFormSchema,\n EnergyBalanceOption,\n getClientNutritionPlan,\n OTHER_ENERGY_BALANCE,\n} from \"./helperFunctions\";\n\nfunction getEnergyBalanceOptionFromEnergyBalanceValue(energyBalanceValue: string): EnergyBalanceOption {\n switch (energyBalanceValue) {\n case \"80\":\n return \"80\";\n case \"90\":\n return \"90\";\n case \"100\":\n return \"100\";\n case \"105\":\n return \"105\";\n case \"110\":\n return \"110\";\n default:\n return OTHER_ENERGY_BALANCE;\n }\n}\n\ntype Props = NativeStackScreenProps;\nconst EnergyBalanceTab1 = ({\n navigation,\n route: {\n params: { client, nutritionPlanId },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const dispatch = useDispatch();\n\n const clientNutritionPlan = getClientNutritionPlan(client, nutritionPlanId);\n\n // NOTE: We do this up here to avoid rendering a different number of hooks\n const [inputState, setInputState] = useState<{\n optionSelected: EnergyBalanceOption;\n legacyInput: LegacyInput;\n }>({\n legacyInput: clientNutritionPlan,\n optionSelected: getEnergyBalanceOptionFromEnergyBalanceValue(\n clientNutritionPlan?.energyBalance || String(DEFAULT_ENERGY_BALANCE)\n ),\n });\n const [haveTargetMacrosBeenProvided, setHaveTargetMacrosBeenProvided] = useState(false);\n\n const {\n isOpen: isOpenTargetMacrosActionsheet,\n onClose: onCloseTargetMacrosActionsheet,\n onOpen: onOpenTargetMacrosActionsheet,\n } = useDisclose();\n\n // NOTE: This function has hooks inside it\n const bottomInset = useKeyboardBottomInset();\n\n if (!client) {\n throw new Error(\"Client not found\");\n }\n\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n const energyExpenditure = calculateEnergyExpenditure(client.intake);\n if (!energyExpenditure) {\n throw new Error(\"No energy expenditure calculated\");\n }\n\n const tdee = energyExpenditure.daily.total;\n\n // TODO: Put this into a helpers file\n const getEnergyBalanceChoiceString = (percentage: number): string =>\n `${formatNumberAsWholeNumber(tdee * percentage)} ${t(\"general.kcal\")}`;\n\n // NOTE: This is handled with another button: we should probably combine them\n const onSubmitEnergyBalanceForm = (submittedValues: EnergyBalanceFormSchema): void => {\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n const updatedEnergyBalance = String(submittedValues.energyBalance);\n\n const hasEnergyBalanceBeenUpdated = updatedEnergyBalance !== clientNutritionPlan.energyBalance;\n const isFormDirty = hasEnergyBalanceBeenUpdated || haveTargetMacrosBeenProvided;\n\n if (isFormDirty) {\n const updatedLegacyInput = updateLegacyInput(\n {\n ...inputState.legacyInput,\n energyBalance: updatedEnergyBalance,\n },\n client.intake\n );\n\n dispatch(\n userSlice.actions.storeClientNutritionPlan({\n clientId: client.id,\n plan: updatedLegacyInput,\n })\n );\n }\n\n navigation.push(Routes.ChooseMealMomentsTab2, { client, nutritionPlanId: inputState.legacyInput.id });\n };\n\n const energyBalanceFormInitialValues = energyBalanceFormSchema.cast({\n energyBalance: inputState.legacyInput\n ? parseInt(inputState.legacyInput?.energyBalance, 10) || DEFAULT_ENERGY_BALANCE\n : DEFAULT_ENERGY_BALANCE,\n });\n\n const onBack = (): void => {\n navigation.goBack();\n };\n const commonContainerStyle = {\n flex: 1,\n backgroundColor: \"white\",\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n // eslint-disable-next-line no-nested-ternary\n const flexWidth = isMobilePlatform() ? \"100%\" : IS_MOBILE_WEB ? \"100%\" : \"50%\";\n return (\n \n \n \n \n \n
\n \n {`${t(\n \"general.daily_energy_calculation.daily_energy_expenditure\"\n )}: `}\n {`${formatNumberAsWholeNumber(tdee)} `}\n {` ${t(\"general.kcal\")}`}\n \n
\n\n \n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, errors, isValid, dirty }) => {\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n function onUserUpdateEnergyBalance(updatedValue: string, usingOtherInput = false): void {\n if (!client) {\n throw new Error(\"Client not found\");\n }\n\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n handleChange(\"energyBalance\")(updatedValue);\n\n const updatedLegacyInput = updateLegacyInput(\n {\n // NOTE: This is deliberately not using inputState.legacyInput because any of those tweaks should be removed by adjusting the energy balance\n ...clientNutritionPlan,\n\n // When the user selects a new energy balance it overwrites any target macros that were previously provided\n adjustedDailyMacros: undefined,\n energyBalance: String(updatedValue),\n },\n client.intake\n );\n\n setInputState({\n legacyInput: updatedLegacyInput,\n optionSelected: usingOtherInput\n ? OTHER_ENERGY_BALANCE\n : getEnergyBalanceOptionFromEnergyBalanceValue(updatedValue),\n });\n }\n\n const isOtherChecked = inputState.optionSelected === OTHER_ENERGY_BALANCE;\n\n // TODO: Perhaps this should update clientNutritionPlan7Edit instead\n const legacyInputUpdated = {\n ...inputState.legacyInput,\n energyBalance: String(values.energyBalance),\n };\n\n let calculatedMealSlotSpecifications: MealSlotSpecification[] = [];\n if (inputState.legacyInput) {\n const updatedLegacyInput = updateLegacyInput(legacyInputUpdated, client.intake);\n calculatedMealSlotSpecifications = convertToMealSlotSpecifications(updatedLegacyInput.meals);\n }\n\n const setTargetMacros = (formValues: TargetMacrosFormSchema): void => {\n if (!client.intake) {\n throw new Error(\"Client does not have an intake\");\n }\n\n onCloseTargetMacrosActionsheet();\n\n // NOTE: The schema is for a number but the formValues are strings because they come from the form\n const protein = parseInt(String(formValues.protein), 10);\n const carbs = parseInt(String(formValues.carbs), 10);\n const fat = parseInt(String(formValues.fat), 10);\n\n const adjustedLegacyInput = updateLegacyInput(\n {\n ...inputState.legacyInput,\n adjustedDailyMacros: {\n fiber: 0,\n protein,\n fat,\n carbs,\n calories: Math.round(carbs * 4 + protein * 4 + fat * 9),\n },\n },\n client.intake\n );\n\n setHaveTargetMacrosBeenProvided(true);\n setInputState({\n ...inputState,\n legacyInput: adjustedLegacyInput,\n });\n };\n\n const macrosTargetComponent = (\n \n \n \n \n \n );\n\n return (\n <>\n {macrosTargetComponent}\n \n \n \n <>\n \n \n {energyBalanceChoices.map((energyBalanceDelta: EnergyBalanceOption): JSX.Element => {\n // FIXME: This does not work very nicely on back\n // const isChecked = energyBalanceOptionChecked === energyBalanceDelta;\n // NOTE: We do this because values.energyBalance is actually a string!\n // const isChecked =\n // !isOtherChecked && String(values.energyBalance) === String(energyBalanceDelta);\n const isChecked = inputState.optionSelected === energyBalanceDelta;\n\n return (\n \n \n {\n onUserUpdateEnergyBalance(String(energyBalanceDelta));\n }}\n testID={`energyBalanceOption-${energyBalanceDelta}`}\n nativeID={`energyBalanceOption-${energyBalanceDelta}`}\n >\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n \n {formatNumberAsPercentage(parseFloat(energyBalanceDelta) / 100)}\n \n \n \n {getEnergyBalanceChoiceString(parseFloat(energyBalanceDelta) / 100)}\n \n
\n );\n })}\n\n \n \n \n onUserUpdateEnergyBalance(String(DEFAULT_ENERGY_BALANCE), true)}\n >\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n {t(\"nutrition_day_plan.edit_energy_balance.other_input_label\")}\n \n onUserUpdateEnergyBalance(String(DEFAULT_ENERGY_BALANCE), true)}\n maxWidth=\"25%\"\n borderColor={theme.colors.gray[\"700\"]}\n borderWidth=\"1\"\n // TODO: Create a helper function the formats energyBalance for display\n value={isOtherChecked ? String(values.energyBalance) : \"\"}\n onChangeText={(updatedValue) => onUserUpdateEnergyBalance(updatedValue, true)}\n InputRightElement={\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n } size={4} mr=\"1\" color=\"gray.300\" />\n }\n testID=\"energyBalance-other-input\"\n />\n \n \n {errors.energyBalance}\n \n \n \n \n {getNutritionDayPlanOverviewComponent(calculatedMealSlotSpecifications, true)}\n \n \n \n \n {t(\"nutrition_day_plan.adjust_macronutrients_button_text\")}\n \n \n \n handleSubmit()}\n testID={\"energyBalanceTab-nextButton\"}\n nativeID={\"energyBalanceTabNextButton\"}\n >\n {t(\"general.next_button_text\")}\n \n \n \n \n \n );\n }}\n \n \n
\n );\n};\n\nexport default EnergyBalanceTab1;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Button, Flex, Icon, IconButton, ScrollView, Text, useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { CommonNumberInputWithPlusMinusButtons } from \"../../commons\";\nimport { commonStyles, Routes, Scale, VerticalScale } from \"../../constants\";\nimport { getNutritionDayPlanOverviewComponent } from \"../../helpers/coachHelpers\";\nimport {\n formatMealType,\n formatNumberAsWholeNumber,\n IS_ANDROID_WEB,\n IS_MOBILE_WEB,\n isMobilePlatform,\n} from \"../../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../../navigation/NavigationStackParams\";\nimport backendApi from \"../../services/backendApi\";\nimport type {\n DaysToUpdateToNutritionDayPlanIdEnum,\n MealMomentEnum,\n NutritionDayPlan,\n} from \"../../services/backendTypes\";\nimport type { LegacyMealState } from \"../../services/legacyNutritionCalculations7\";\nimport logger from \"../../services/logger\";\nimport {\n getLegacyInputFromMealSlotSpecifications,\n getUpdatedMealSlotSpecificationsFromFormValues,\n} from \"../../services/nutritionCalculations7\";\nimport { NUTRITION_PLAN_WITHOUT_ID, userSlice } from \"../../slices/userSlice\";\nimport type { MacroName } from \"../../types\";\nimport { getClientNutritionPlan } from \"./helperFunctions\";\n\nconst {\n useUsersNutritionDayPlanCreateMutation,\n useUsersWeeklyNutritionPlanUpdateMutation,\n useUsersMealSlotSpecificationCreateMutation,\n useUsersWeeklyNutritionPlanCreateMutation,\n} = backendApi;\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst getMealStateSchema = () =>\n Yup.object().shape({\n protein: Yup.number().moreThan(-1).required(),\n carbs: Yup.number().moreThan(-1).required(),\n fat: Yup.number().moreThan(-1).required(),\n });\n\nconst mealStateSchema = getMealStateSchema();\ntype MealStateFormSchema = Yup.InferType;\n\ntype HandleChange = {\n (e: React.ChangeEvent): void;\n >(field: T): T extends React.ChangeEvent\n ? void\n : (e: string | React.ChangeEvent) => void;\n};\n\ntype Props = NativeStackScreenProps;\nconst FineTuningTab4 = ({\n navigation,\n route: {\n params: { client, nutritionPlanId },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n const dispatch = useDispatch();\n\n const [updateWeeklyNutritionPlanOnBackend, { isLoading: isLoadingUpdateWnpOnBackend }] =\n useUsersWeeklyNutritionPlanUpdateMutation();\n const [createWeeklyNutritionPlanOnBackend, { isLoading: isLoadingCreateWnpOnBackend }] =\n useUsersWeeklyNutritionPlanCreateMutation();\n const [createNutritionDayPlanOnBackend, { isLoading: isLoadingCreatingNdpOnBackend }] =\n useUsersNutritionDayPlanCreateMutation();\n const [createMealSlotSpecificationOnBackend, { isLoading: isLoadingCreateMssOnBackend }] =\n useUsersMealSlotSpecificationCreateMutation();\n\n const clientNutritionPlan7Edit = getClientNutritionPlan(client, nutritionPlanId);\n\n const convertMacroNameToLegacy = (macroName: MacroName): string => {\n switch (macroName) {\n case \"protein\":\n case \"fat\":\n return macroName;\n case \"carbohydrates\":\n return \"carbs\";\n default:\n logger.warn(\"Unknown macro name: \", macroName);\n return \"\";\n }\n };\n\n const MacroComponent = ({\n value,\n macroName,\n mealMoment,\n handleChange,\n }: {\n value: string;\n mealMoment: MealMomentEnum;\n macroName: MacroName;\n handleChange: HandleChange;\n }): JSX.Element => (\n <>\n {t(`general.${macroName}`)} \n\n {\n handleChange(`${mealMoment}.${convertMacroNameToLegacy(macroName)}`)(String(updatedValue));\n }}\n testIdPrefix={`${mealMoment}-${macroName}`}\n />\n \n );\n\n const MealMomentDetailsComponent = ({\n values,\n mealMoment,\n handleChange,\n }: {\n values: MealStateFormSchema;\n mealMoment: MealMomentEnum;\n handleChange: HandleChange;\n }): JSX.Element => (\n <>\n \n \n \n \n \n \n \n \n \n \n );\n\n const MealMoment = ({\n legacyMealState,\n values,\n handleChange,\n }: {\n legacyMealState: LegacyMealState;\n values: MealStateFormSchema;\n handleChange: HandleChange;\n }): JSX.Element => (\n \n \n \n \n {formatMealType(legacyMealState.mealMoment, t)}{\" \"}\n \n \n \n {`${formatNumberAsWholeNumber(legacyMealState.macros ? legacyMealState.macros.calories : 0)} kCal`}\n \n \n \n \n );\n\n const enabledMeals = _.filter(\n clientNutritionPlan7Edit.meals,\n (legacyMealState: LegacyMealState) => legacyMealState.enabled\n );\n\n const mealStateArrayShape = _.fromPairs(\n Object.values(enabledMeals).map((legacyMealState: LegacyMealState) => [\n legacyMealState.mealMoment,\n getMealStateSchema(),\n ])\n );\n\n const mealMomentsFormSchema = Yup.object().shape(mealStateArrayShape);\n type MealMomentsFormSchema = Yup.InferType;\n\n async function onSubmit(values: MealMomentsFormSchema): Promise {\n if (!client.intake) {\n throw new Error(\"Client intake is not defined\");\n }\n // TODO: This should probably be in formik submit code so we can tie it up with the button's submitting status\n\n const { updatedMealSlotSpecifications: mealSlotSpecifications } = getUpdatedMealSlotSpecificationsFromFormValues(\n values,\n clientNutritionPlan7Edit.meals\n );\n\n // TODO: Abstract this logic into a function\n const updatedNutritionDayPlan: NutritionDayPlan = {\n id: clientNutritionPlan7Edit.id || NUTRITION_PLAN_WITHOUT_ID,\n name: clientNutritionPlan7Edit.name,\n meal_slot_specifications: mealSlotSpecifications,\n };\n\n const updatedLegacyInput = getLegacyInputFromMealSlotSpecifications(\n updatedNutritionDayPlan,\n client.intake,\n clientNutritionPlan7Edit.days\n );\n // NOTE: We do this to ensure it is recreated with the new values when next used\n dispatch(userSlice.actions.storeClientNutritionPlan({ clientId: client.id, plan: updatedLegacyInput }));\n\n // Create new NutritionDayPlan\n const createdNutritionDayPlan = await createNutritionDayPlanOnBackend({\n nutritionDayPlanRequest: {\n name: clientNutritionPlan7Edit.name,\n },\n }).unwrap();\n\n if (_.isEmpty(mealSlotSpecifications)) {\n throw new Error(\"No meal slots to update or create\");\n }\n\n const createPromises = _.map(mealSlotSpecifications, (mealSlot) =>\n createMealSlotSpecificationOnBackend({\n mealSlotSpecificationRequest: {\n ...mealSlot,\n nutrition_day_plan: createdNutritionDayPlan.id,\n },\n })\n );\n\n await Promise.all(createPromises);\n\n const updateExistingWeeklyNutritionPlan = Boolean(client.intake.weekly_nutrition_plan);\n // NOTE: We do this afterwards so that the meal slot specifications are created before we update the WNP\n // This results in all the data always being up to date when the call is made to fetch new data\n if (updateExistingWeeklyNutritionPlan) {\n // TODO: Abstract into same function as code in client overview screen and re-use\n const daysToUpdate: DaysToUpdateToNutritionDayPlanIdEnum[] = _.compact([\n updatedLegacyInput.days.monday ? \"monday\" : undefined,\n updatedLegacyInput.days.tuesday ? \"tuesday\" : undefined,\n updatedLegacyInput.days.wednesday ? \"wednesday\" : undefined,\n updatedLegacyInput.days.thursday ? \"thursday\" : undefined,\n updatedLegacyInput.days.friday ? \"friday\" : undefined,\n updatedLegacyInput.days.saturday ? \"saturday\" : undefined,\n updatedLegacyInput.days.sunday ? \"sunday\" : undefined,\n ]);\n\n if (!client?.intake?.weekly_nutrition_plan?.id) {\n throw new Error(\"Client intake weekly nutrition plan id is not defined\");\n }\n\n await updateWeeklyNutritionPlanOnBackend({\n id: client?.intake?.weekly_nutrition_plan?.id,\n weeklyNutritionPlanUpdateRequest: {\n nutrition_day_plan_id: createdNutritionDayPlan.id,\n days_to_update_to_nutrition_day_plan_id: daysToUpdate,\n },\n }).unwrap();\n } else {\n await createWeeklyNutritionPlanOnBackend({\n weeklyNutritionPlanCreateRequest: {\n // Since this is the first nutrition plan we are creating we populate every day\n monday: createdNutritionDayPlan.id,\n tuesday: createdNutritionDayPlan.id,\n wednesday: createdNutritionDayPlan.id,\n thursday: createdNutritionDayPlan.id,\n friday: createdNutritionDayPlan.id,\n saturday: createdNutritionDayPlan.id,\n sunday: createdNutritionDayPlan.id,\n\n client_intake: client.intake.id,\n },\n }).unwrap();\n }\n\n navigation.push(Routes.CoachModeClientInfoScreen, { clientId: client.id });\n }\n\n const mealMomentsInitialValues = _.fromPairs(\n Object.values(enabledMeals).map((legacyMealState: LegacyMealState) => [\n legacyMealState.mealMoment,\n legacyMealState.macros || {\n fat: 0,\n carbohydrates: 0,\n protein: 0,\n },\n ])\n );\n\n const mealMomentsComponent = (\n \n {({\n isSubmitting,\n handleChange,\n handleBlur,\n setFieldValue,\n handleSubmit,\n values,\n errors,\n initialValues,\n dirty,\n isValid,\n }) => (\n \n {/* Overview of nutrition day plan for the coach's reference */}\n {/* NOTE: Because we load all tabs at the start sometimes this will not be populated */}\n {!_.isEmpty(\n getUpdatedMealSlotSpecificationsFromFormValues(values, clientNutritionPlan7Edit.meals)\n .updatedMealSlotSpecifications\n ) ? (\n \n {getNutritionDayPlanOverviewComponent(\n getUpdatedMealSlotSpecificationsFromFormValues(values, clientNutritionPlan7Edit.meals)\n .updatedMealSlotSpecifications,\n true\n )}\n \n ) : null}\n\n <>\n \n {_.map(\n getUpdatedMealSlotSpecificationsFromFormValues(values, clientNutritionPlan7Edit.meals)\n .updatedLegacyMealStateArray,\n (legacyMealState: LegacyMealState) => (\n // eslint-disable-next-line react/prop-types\n \n {/* eslint-disable-next-line react/prop-types */}\n {legacyMealState.enabled ? (\n \n ) : null}\n \n )\n )}\n \n\n handleSubmit()}\n testID={\"fineTuningTab-saveButton\"}\n nativeID={\"fineTuningTabSaveButton\"}\n >\n {t(\"general.save_button_text\")}\n \n \n \n )}\n \n );\n\n const onBack = (): void => navigation.goBack();\n\n const commonContainerStyle = {\n backgroundColor: \"white\",\n flex: 1,\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n\n const webWidth = IS_MOBILE_WEB ? \"100%\" : \"50%\";\n const flexWidth = isMobilePlatform() ? \"100%\" : webWidth;\n return (\n \n \n \n \n \n }\n />\n \n {mealMomentsComponent}\n \n \n \n \n );\n};\n\nexport default FineTuningTab4;\n","import { Entypo } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Center, Flex, IconButton, ScrollView, Text, useTheme, View } from \"native-base\";\nimport { useTranslation } from \"react-i18next\";\nimport React, { SafeAreaView } from \"react-native\";\nimport { useSelector } from \"react-redux\";\n\nimport EditUserProfileComponent, {\n ExerciseInstanceFormSchema,\n UserProfileFormSchema,\n} from \"../components/EditUserProfileComponent\";\nimport { isDesktopScreen, Routes } from \"../constants\";\nimport { apiCallErrorHandler, isMobilePlatform } from \"../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { ExerciseInstanceListRetrieve as ExerciseInstance, SustainabilityEnum } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { clientsSelector } from \"../slices/userSlice\";\nimport styles from \"./CoachModeClientInfoScreenStyle\";\n\nconst {\n useUsersUserProfileUpdateMutation,\n useUsersUserProfileCreateMutation,\n useUsersExerciseInstanceCreateMutation,\n useUsersExerciseInstanceUpdateMutation,\n useUsersExerciseInstanceDestroyMutation,\n} = backendApi;\n\ntype Props = NativeStackScreenProps;\n\nconst EditUserProfileScreen = ({\n navigation,\n route: {\n params: { client },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n const isDesktop = isDesktopScreen();\n\n const [updateUserProfileOnBackend, { isLoading: isLoadingUpdateUserProfileOnBackend }] =\n useUsersUserProfileUpdateMutation();\n const [createExerciseInstanceBackendCall, { isLoading: isLoadingCreateExerciseInstance }] =\n useUsersExerciseInstanceCreateMutation();\n const [updateExerciseInstanceBackendCall, { isLoading: isLoadingUpdateExerciseInstance }] =\n useUsersExerciseInstanceUpdateMutation();\n const [createUserProfileOnBackend, { isLoading: isLoadingCreateUserProfileOnBackend }] =\n useUsersUserProfileCreateMutation();\n const [deleteExerciseInstanceBackendCall, { isLoading: isLoadingDeleteExerciseInstance }] =\n useUsersExerciseInstanceDestroyMutation();\n const showLoading =\n isLoadingUpdateUserProfileOnBackend ||\n isLoadingCreateExerciseInstance ||\n isLoadingUpdateExerciseInstance ||\n isLoadingDeleteExerciseInstance ||\n isLoadingCreateUserProfileOnBackend;\n\n const onSubmitUserProfile = async (values: UserProfileFormSchema): Promise => {\n // NOTE: sustainability is currently not implemented so we add it\n const sustainability: SustainabilityEnum = \"SUSTAINABLE\";\n const userProfileRequest = { ...values, body_fat_percentage: values.body_fat_percentage / 100, sustainability };\n\n const updateOrCreatePromise = client.intake?.id\n ? updateUserProfileOnBackend({ id: client.intake.id, userProfileRequest })\n : createUserProfileOnBackend({\n userProfileRequest: {\n ...userProfileRequest,\n user_id: client.id,\n },\n });\n\n await updateOrCreatePromise\n .unwrap()\n .then((clientIntake) => {\n const clientIntakeId = clientIntake.id;\n\n /**\n * NOTE: If an exerciseInstance does not have an id it means that it is a new instance that needs to be created\n *\n * @param exerciseInstance\n * @returns\n */\n const doesExerciseInstanceHaveId = (exerciseInstance: ExerciseInstanceFormSchema): boolean =>\n exerciseInstance.id !== null;\n\n const exerciseInstancesThatAlreadyExist = values.exercise_instances?.filter(doesExerciseInstanceHaveId);\n const exerciseInstancesThatDoNotExist = values.exercise_instances?.filter(\n (ei) => !doesExerciseInstanceHaveId(ei)\n );\n\n const exerciseCreationPromises = exerciseInstancesThatDoNotExist?.map((exercise) =>\n createExerciseInstanceBackendCall({\n exerciseInstanceCreateUpdateRequest: {\n ...exercise,\n intake: clientIntakeId,\n },\n })\n );\n\n const exerciseUpdatePromises = exerciseInstancesThatAlreadyExist?.map((exercise) => {\n if (!exercise.id) {\n throw new Error(\"Exercise instance id is not set\");\n }\n\n return updateExerciseInstanceBackendCall({\n id: exercise.id,\n exerciseInstanceCreateUpdateRequest: {\n ...exercise,\n intake: clientIntakeId,\n },\n });\n });\n\n const isExerciseToBeDeleted = (exerciseInstance: ExerciseInstance): boolean =>\n !_.some(\n exerciseInstancesThatAlreadyExist,\n (exerciseInstanceToBeUpdated) => exerciseInstanceToBeUpdated.id === exerciseInstance.id\n );\n\n const exerciseInstancesToBeDeleted = _.filter(client?.intake?.exercise_instances, isExerciseToBeDeleted);\n\n const exerciseDeletionPromises = exerciseInstancesToBeDeleted.map((exerciseInstance) => {\n if (typeof exerciseInstance === \"number\") {\n throw new Error(\"Exercise instance id is not set\");\n }\n if (!exerciseInstance.id) {\n throw new Error(\"Exercise instance id is not set\");\n }\n\n return deleteExerciseInstanceBackendCall({\n id: exerciseInstance.id,\n });\n });\n\n // The compiler does not like concatenating heterogeneous promises but there is no problem here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return Promise.all(_.concat(exerciseCreationPromises, exerciseUpdatePromises, exerciseDeletionPromises));\n })\n .then(() => {\n // alert(t(\"general.updated_successfully\"));\n // TODO: This is not working for some reason. This will cause a crash if it executes.\n // toast.show({\n // description: t(\"general.updated_successfully\"),\n // placement: \"top\",\n // bgColor: \"green.400\",\n // });\n })\n .catch(apiCallErrorHandler());\n\n navigation.goBack();\n };\n\n const headerComponent = (\n \n \n navigation.pop()}\n />\n \n \n );\n\n const commonContainerStyle = {\n backgroundColor: \"white\",\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n };\n\n return (\n \n {headerComponent}\n
\n \n \n \n
\n
\n );\n};\n\nexport default EditUserProfileScreen;\n","import type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport { Box, Button, Center, FormControl, Image, Input, KeyboardAvoidingView, Text, VStack } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\nimport { useDispatch } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport type { Routes } from \"../constants\";\nimport images from \"../constants/images\";\nimport { TroubleLoggingInLink } from \"../helpers/supportHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport { userSlice } from \"../slices/userSlice\";\nimport styles from \"./MagicLinkSentScreenStyle\";\n\nconst { useUsersVerifyOtpCreateMutation } = backendApi;\n\ninterface VerifyOTPFormValues {\n email: string;\n otp: string;\n}\n\ntype Props = NativeStackScreenProps;\nconst EnterOTPScreen = ({\n navigation,\n route: {\n params: { email },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const [verifyOTP] = useUsersVerifyOtpCreateMutation();\n\n const verifyOTPFormSchema = Yup.object().shape({\n email: Yup.string().trim().email(t(\"onboarding.registration_screen.invalid_email\")).required(t(\"general.required\")),\n otp: Yup.string()\n .required(t(\"general.required\"))\n .matches(/^[0-9]{4}$/, t(\"enter_otp_screen.yup_otp_validation_message\")),\n });\n\n const initialValues: VerifyOTPFormValues = { email, otp: \"\" };\n const submitForm = async (values: VerifyOTPFormValues): Promise => {\n try {\n const response = await verifyOTP({\n verifyOtpRequest: {\n email: values.email,\n otp: values.otp,\n },\n }).unwrap();\n\n const authToken = response?.auth_token;\n dispatch(userSlice.actions.storeAuthToken(authToken));\n } catch (e: unknown) {\n // Capture the error in Sentry with context\n Sentry.captureException(e, {\n tags: {\n screen: \"EnterOTPScreen\",\n action: \"verifyOTP\",\n },\n extra: {\n email: values.email,\n // Not including OTP for security reasons\n },\n });\n\n console.error(\"OTP verification error:\", e);\n\n // Extract specific error message from backend if available, otherwise show generic message\n const errorMessage = (e as { data?: { error?: string } })?.data?.error || t(\"login_screen.failure_recovery\");\n alert(errorMessage);\n }\n };\n\n return (\n \n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, errors, dirty, isValid }) => (\n \n
\n \n \n \n \n \n {t(\"enter_otp_screen.heading\")}\n \n {t(\"enter_otp_screen.subheading\", { email })}\n\n \n \n
\n {errors.otp}\n
\n
\n\n handleSubmit()}\n w=\"full\"\n testID=\"otpButton\"\n >\n {t(\"enter_otp_screen.submit_button\")}\n \n\n
\n \n
\n\n \n
\n
\n
\n
\n
\n )}\n
\n
\n );\n};\nexport default EnterOTPScreen;\n","import { StyleSheet } from \"react-native\";\n\nimport { height, Scale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n // backgroundColor: Colors.white,\n },\n\n titleContainer: {\n flex: 0.39,\n\n alignItems: \"center\",\n textAlign: \"center\",\n justifyContent: \"flex-end\",\n },\n headingFirst: {\n textAlign: \"center\",\n\n // color: Colors.textColor,\n fontStyle: \"italic\",\n fontWeight: \"500\",\n\n width: width / 1.7,\n lineHeight: 32,\n letterSpacing: 1,\n },\n headingSecond: {\n textAlign: \"center\",\n\n // color: Colours.primaryGreenColor,\n paddingVertical: Scale(10),\n },\n headingThird: {\n alignSelf: \"center\",\n textAlign: \"center\",\n // color: Colors.textColor,\n fontWeight: \"700\",\n },\n\n meditationIcon: {\n flex: 0.6,\n height: height * 0.8,\n width: width * 0.8,\n resizeMode: \"contain\",\n alignSelf: \"center\",\n },\n buttonContainer: {\n marginBottom: Scale(50),\n },\n});\n\nexport default styles;\n","// NOTE: THIs file is not used\n\nimport type { NativeStackNavigationProp, NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, View } from \"react-native\";\n\nimport { CommonButton, CommonText } from \"../commons\";\nimport { Images, Routes } from \"../constants\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport styles from \"./FinishPlanningStyles\";\n\ntype Props = NativeStackScreenProps;\n\nconst FinishPlanningScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const handleNavigation = (): void => {\n // navigation.navigate(Routes.GroceriesList);\n };\n return (\n \n \n \n \n \n \n \n\n \n \n \n \n );\n};\n\nexport default FinishPlanningScreen;\n","import { Image, View } from \"native-base\";\nimport React from \"react\";\nimport { StyleSheet } from \"react-native\";\nimport { CheckBox } from \"react-native-elements\";\n\nimport { Images, Scale } from \"../constants\";\n\nconst styles = StyleSheet.create({\n textBoxContainerStyle: {\n padding: Scale(0),\n marginLeft: Scale(0),\n },\n uncheckedBox: {\n height: Scale(28),\n width: Scale(28),\n // backgroundColor: Colors.whiteColor,\n borderWidth: 1,\n borderStyle: \"solid\",\n // borderColor: Colors.borderColor,\n borderRadius: Scale(4),\n },\n checkedBox: {\n width: Scale(28),\n height: Scale(28),\n // backgroundColor: Colors.primaryGreenColor,\n borderRadius: Scale(4),\n },\n});\n\ntype comProps = {\n checked: boolean;\n onSelect: () => void;\n};\nconst CheckBoxCom: React.FC = (props: comProps) => (\n }\n uncheckedIcon={}\n checked={props.checked}\n onPress={props.onSelect}\n />\n);\n\nexport default CheckBoxCom;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport _ from \"lodash\";\n// eslint-disable-next-line import/no-named-default\nimport { default as MomentLib } from \"moment\";\nimport { extendMoment } from \"moment-range\";\nimport { Button, useTheme, View } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Calendar, DateData, LocaleConfig } from \"react-native-calendars\";\nimport type { MarkingProps } from \"react-native-calendars/src/calendar/day/marking\";\n\nimport { Scale } from \"../constants\";\nimport { FontFamily } from \"../constants/fonts\";\nimport { formatMomentAsBackendFormatDateString } from \"../helpers/generalHelpers\";\nimport logger from \"../services/logger\";\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nconst moment = extendMoment(MomentLib);\n\n// Populate LocaleConfig for English and Dutch\nLocaleConfig.locales.en = {\n monthNames: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n dayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n today: \"Today\",\n};\n\nLocaleConfig.locales.nl = {\n monthNames: [\n \"Januari\",\n \"Februari\",\n \"Maart\",\n \"April\",\n \"Mei\",\n \"Juni\",\n \"Juli\",\n \"Augustus\",\n \"September\",\n \"Oktober\",\n \"November\",\n \"December\",\n ],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mrt\", \"Apr\", \"Mei\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Dec\"],\n dayNames: [\"Zondag\", \"Maandag\", \"Dinsdag\", \"Woensdag\", \"Donderdag\", \"Vrijdag\", \"Zaterdag\"],\n dayNamesShort: [\"Zo\", \"Ma\", \"Di\", \"Wo\", \"Do\", \"Vr\", \"Za\"],\n today: \"Vandaag\",\n};\nLocaleConfig.defaultLocale = \"en\";\n\n/**\n * This is from the react-native-calendars library but we defined it ourselves because it is not exported.\n */\nexport type MarkedDatesType = {\n [key: string]: MarkingProps;\n};\n\nconst DEFAULT_NUM_DAY_FOR_GROCERY_LIST = 7;\n\nconst AddDateRange = (props: {\n createGroceryList: (startDate: moment.Moment, endDate: moment.Moment) => Promise;\n}): JSX.Element => {\n const { t, i18n } = useTranslation();\n const { colors } = useTheme();\n\n const { createGroceryList } = props;\n\n const language = i18n.language.split(\"-\")[0]; // Use the primary language code (e.g., 'en' from 'en-US')\n LocaleConfig.defaultLocale = LocaleConfig.locales[language] ? language : \"en\";\n\n const initialStartDate = moment();\n // NOTE: Minus 1 because people expect it to be exclusive, not inclusive (ie, Monday - Sunday, not Monday - Monday)\n const initialEndDate = moment().add(DEFAULT_NUM_DAY_FOR_GROCERY_LIST - 1, \"days\");\n const [startDate, setStartDate] = useState(initialStartDate);\n const [endDate, setEndDate] = useState(initialEndDate);\n const [submitting, setSubmitting] = useState(false);\n\n const markedDateBaseProperties: MarkingProps = {\n color: colors.primary[\"600\"],\n textColor: \"white\",\n };\n\n const initialGroceryListRange = moment.range(moment(initialStartDate), moment(initialEndDate)).by(\"days\");\n const defaultMarkedDates: MarkedDatesType = _.fromPairs(\n Array.from(initialGroceryListRange).map((m) => [m.format(\"YYYY-MM-DD\"), { ...markedDateBaseProperties }])\n );\n\n const [markedDates, setMarkedDates] = useState(defaultMarkedDates);\n\n const onDayPress = (day: DateData): void => {\n if (!startDate || (startDate && endDate)) {\n const updatedMarkedDates: MarkedDatesType = {\n [day.dateString]: { ...markedDateBaseProperties },\n };\n setMarkedDates(updatedMarkedDates);\n setEndDate(undefined);\n setStartDate(moment(day.dateString));\n } else {\n const updatedMarkedDates = _.cloneDeep(markedDates);\n const calculatedEndDate = moment(day.dateString);\n const numDaysInPeriod = calculatedEndDate.diff(startDate, \"days\");\n\n const startDateCopy = moment(startDate);\n const markDayInRange = (index: number): void => {\n // NOTE: Deliberate mutation\n const tempDate = startDateCopy.add(1, \"day\");\n\n if (index < numDaysInPeriod) {\n updatedMarkedDates[formatMomentAsBackendFormatDateString(tempDate)] = markedDateBaseProperties;\n } else {\n updatedMarkedDates[formatMomentAsBackendFormatDateString(tempDate)] = {\n ...markedDateBaseProperties,\n // NOTE: I think the styling looks better with the startingDay and endingDay rounding effect\n // endingDay: true,\n };\n }\n };\n\n if (numDaysInPeriod > 0) {\n _.range(1, numDaysInPeriod + 1).forEach(markDayInRange);\n\n setMarkedDates(updatedMarkedDates);\n setEndDate(calculatedEndDate);\n } else {\n // A date before the startDate was picked, thus reset the startDate\n setStartDate(moment(day.dateString));\n setEndDate(undefined);\n setMarkedDates({\n [day.dateString]: { ...markedDateBaseProperties },\n });\n }\n }\n };\n\n const shouldShowCreateButton = startDate && endDate;\n const disableArrowLeft = true;\n return (\n \n {/* TODO: Localise this component? */}\n (\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n /* @ts-ignore */\n \n )}\n disableArrowLeft={disableArrowLeft}\n firstDay={1}\n />\n {/* TODO: Perhaps we should use formik to validate this? */}\n {shouldShowCreateButton ? (\n {\n if (!startDate) {\n // TODO: Create helper function that will throw an error but also surface an alert to the user\n throw new Error(\"Start date is not set\");\n }\n if (!endDate) {\n throw new Error(\"End date is not set\");\n }\n setSubmitting(true);\n setTimeout(() => {\n setSubmitting(false);\n }, 1000);\n\n await createGroceryList(startDate, endDate);\n setSubmitting(false);\n }}\n testID={\"createGroceryListDatePicker-button\"}\n isLoading={submitting}\n >\n {t(\"grocery_list.create_list_button\")}\n \n ) : null}\n \n );\n};\nexport default AddDateRange;\n\n// NOTE: This is here for future reference\n// const styles = StyleSheet.create({\n// header: {\n// flexDirection: \"row\",\n// justifyContent: \"space-between\",\n// borderTopWidth: Scale(1),\n// paddingVertical: Scale(20),\n// paddingLeft: Scale(14),\n// paddingRight: Scale(20),\n// borderTopColor: Colors.disableButton,\n// borderBottomColor: Colors.disableButton,\n// borderBottomWidth: Scale(1),\n// },\n// headerText: {\n// fontFamily: FontFamily.medium,\n// fontSize: Scale(16),\n// },\n// });\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale } from \"../constants\";\nimport { FontFamily, FontSize } from \"../constants/fonts\";\n\nconst styles = StyleSheet.create({\n container: {\n // flex: 1,\n // backgroundColor: Colors.whiteColor,\n },\n headerTextStyle: {\n fontFamily: FontFamily.medium,\n fontSize: FontSize.body,\n lineHeight: Scale(24),\n // color: Colors.darkgrey2,\n marginLeft: 0,\n },\n itemsTextStyle: {\n fontFamily: FontFamily.medium,\n fontSize: FontSize.body,\n lineHeight: Scale(24),\n // color: Colors.greyTextColor,\n },\n headerContainer: {},\n checkedTextStyle: {\n fontFamily: FontFamily.medium,\n fontSize: FontSize.body,\n textDecorationLine: \"line-through\",\n lineHeight: Scale(24),\n // color: Colors.bgEmerald,\n },\n listMainView: {\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n marginTop: Scale(3),\n },\n listSubView: {\n flexDirection: \"row\",\n flex: 1,\n alignItems: \"center\",\n },\n kebabImageView: {\n alignSelf: \"center\",\n },\n allDoneView: {\n alignItems: \"center\",\n justifyContent: \"center\",\n height: Scale(192),\n // backgroundColor: \"#F7FDFA\",\n borderStyle: \"solid\",\n borderWidth: Scale(2),\n // borderColor: \"#B9E9CF\",\n borderRadius: Scale(8),\n },\n allDoneText: {\n textAlign: \"center\",\n marginTop: Scale(13),\n marginRight: Scale(13),\n fontFamily: FontFamily.bold,\n fontSize: FontSize.h6,\n lineHeight: Scale(28),\n // color: Colors.primaryGreenColor,\n },\n headerStyle: {\n fontFamily: FontFamily.bold,\n fontSize: FontSize.h4,\n lineHeight: Scale(32),\n // color: Colors.largeTextColor,\n },\n calenderView: {\n marginVertical: Scale(24),\n flexDirection: \"row\",\n },\n hyphenView: {\n marginHorizontal: Scale(12),\n borderWidth: Scale(1),\n // borderColor: Colors.borderColor,\n height: Scale(2),\n width: Scale(8),\n alignSelf: \"center\",\n },\n partitionLine: {\n // backgroundColor: Colors.borderColor,\n marginBottom: Scale(40),\n marginHorizontal: Scale(-30),\n height: Scale(1),\n },\n emptyStateContainer: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n marginVertical: 40,\n },\n emptyStateText: {\n marginTop: 16,\n textAlign: \"center\",\n color: \"gray.500\",\n fontSize: 16,\n },\n});\n\nexport default styles;\n","import { AntDesign, MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\n// eslint-disable-next-line import/no-named-default\nimport { default as MomentLib } from \"moment\";\nimport { extendMoment } from \"moment-range\";\nimport {\n AlertDialog,\n Button,\n Icon,\n IconButton,\n Modal,\n Pressable,\n Row,\n ScrollView,\n Spinner,\n Text,\n useDisclose,\n useTheme,\n View,\n} from \"native-base\";\nimport React, { useEffect } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport CheckBoxCom from \"../components/checkBox\";\nimport CustomBrandingMobileScreenHeader from \"../components/CustomBrandingMobileScreenHeader\";\nimport GroceryListDatePicker from \"../components/GroceryListDatePicker\";\nimport { commonStyles, isDesktopScreen, Routes, Scale } from \"../constants\";\nimport { formatMomentAsDateForApi } from \"../helpers/apiHelpers\";\nimport { getGroceryListItemInWeight, shouldWeUseImperialForThisUser } from \"../helpers/foodHelpers\";\nimport { formatDate } from \"../helpers/generalHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { CategoryEnum, GroceryListItemUpdate as GroceryListItem } from \"../services/backendTypes\";\nimport { groceryListSelector, plannerSlice } from \"../slices/plannerSlice\";\nimport { userSelector } from \"../slices/userSlice\";\nimport styles from \"./GroceriesViewScreenStyle\";\n\nconst {\n usePlannerGroceryListCreateMutation,\n usePlannerGroceryListDestroyMutation,\n usePlannerGroceryListItemPartialUpdateMutation,\n usePlannerGroceryListListQuery,\n} = backendApi;\n\n// NOTE: This is an internal type error with MomentLib\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\nexport const moment = extendMoment(MomentLib);\n\ntype Props = NativeStackScreenProps;\n\nconst GroceryListScreen = (props: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const dispatch = useDispatch();\n // TODO: This functionality is not currently used but when it is this hook should be called safely\n // const user = useSelector(viewAsUserSelector) || useSelector(userSelector);\n const user = useSelector(userSelector);\n\n const isDesktop = isDesktopScreen();\n\n const { onOpen, isOpen, onClose } = useDisclose();\n const cancelRef = React.useRef(null);\n\n const theme = useTheme();\n\n const groceryLists = useSelector(groceryListSelector);\n\n const {\n isOpen: isOpenGroceryListDatePicker,\n onOpen: onOpenGroceryListDatePicker,\n onClose: onCloseGroceryListDatePicker,\n } = useDisclose();\n\n if (!user) {\n throw new Error(\"User is not set\");\n }\n\n // NOTE: We assume the user only ever has 1 grocery list at a time and we always fetch the last created\n const groceryList = _.chain(groceryLists).sortBy(\"id\").reverse().head().value();\n\n const [updateGroceryListItemOnBackend, { isLoading: isLoadingUpdateGroceryListItem }] =\n usePlannerGroceryListItemPartialUpdateMutation();\n const {\n data: groceryListsDataFromApi,\n refetch: refetchGroceryLists,\n isLoading: isLoadingGroceryLists,\n } = usePlannerGroceryListListQuery({\n user: user.id,\n });\n\n useEffect(() => {\n if (groceryListsDataFromApi?.results) {\n dispatch(plannerSlice.actions.setGroceryLists(groceryListsDataFromApi?.results));\n }\n }, [groceryListsDataFromApi]);\n\n const toggleCheckedStatusOnGroceryListItem = async (item: GroceryListItem): Promise => {\n if (!item.id) {\n throw new Error(\"Grocery list item id is not defined\");\n }\n\n await updateGroceryListItemOnBackend({\n id: item.id,\n patchedGroceryListItemUpdateRequest: {\n checked: !item.checked,\n },\n });\n };\n\n const onPressGroceryListItem = async (item: GroceryListItem): Promise => {\n await toggleCheckedStatusOnGroceryListItem(item);\n refetchGroceryLists();\n };\n\n const markAllAsChecked = async (): Promise => {\n const allUncheckedItems = _.reject(groceryList?.items, \"checked\");\n\n await Promise.all(allUncheckedItems.map(toggleCheckedStatusOnGroceryListItem));\n\n refetchGroceryLists();\n };\n\n const [createGroceryListOnBackend, { isLoading: isLoadingCreateGroceryListOnBackend }] =\n usePlannerGroceryListCreateMutation();\n const [deleteGroceryListOnBackend, { isLoading: isLoadingDeleteGroceryList }] =\n usePlannerGroceryListDestroyMutation();\n\n const onPressCreateGroceryListButton = (): void => onOpenGroceryListDatePicker();\n\n const createGroceryList = async (startDate: moment.Moment, endDate: moment.Moment): Promise => {\n await createGroceryListOnBackend({\n groceryListUpdateCreateRequest: {\n start_date: formatMomentAsDateForApi(startDate),\n end_date: formatMomentAsDateForApi(endDate),\n user: user.id,\n },\n });\n\n onCloseGroceryListDatePicker();\n refetchGroceryLists();\n };\n\n const deleteGroceryList = async (): Promise => {\n onClose();\n\n await deleteGroceryListOnBackend({\n id: groceryList.id,\n });\n refetchGroceryLists();\n };\n const shouldUseImperial = shouldWeUseImperialForThisUser(user);\n const createGroceryListItemComponent = (item: GroceryListItem): JSX.Element => (\n \n onPressGroceryListItem(item)}\n testID={`grocery-list-item-${item.checked ? \"checked\" : \"unchecked\"}-${item.id}`}\n >\n \n {!item.checked ? (\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n onPressGroceryListItem(item)} />\n ) : (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n onPressGroceryListItem(item)}\n name=\"checksquare\"\n size={28}\n style={{ paddingRight: 14 }}\n color={theme.colors.primary[\"600\"]}\n />\n )}\n \n \n \n {item.name}\n \n \n \n {getGroceryListItemInWeight(item, shouldUseImperial)}\n \n \n \n \n \n );\n\n const allGroceryItems = groceryList?.items || [];\n const groupedAllGroceryItems = _.groupBy(\n allGroceryItems,\n (groceryListItem): CategoryEnum => groceryListItem?.category || \"OTHER\"\n );\n\n const groceryItems = (\n <>\n {allGroceryItems.length > 0 && (\n \n \n {/* \n {t(\"bottom_tabs.groceries_tab_name\")}\n */}\n {isLoadingUpdateGroceryListItem ? : null}\n \n \n )}\n {Object.keys(groupedAllGroceryItems).map((category) => (\n \n \n {t(`general.grocery_categories.${category as CategoryEnum}`)}\n \n {_.get(groupedAllGroceryItems, category).map(createGroceryListItemComponent)}\n \n ))}\n \n );\n\n const markAllCheckedButton = (\n \n \n {t(\"grocery_list.mark_all_as_checked_button_text\")}\n \n \n );\n\n const datePickerModal = (\n \n \n \n \n {t(\"grocery_list.select_date_range_label_text\")}\n \n \n \n \n \n \n );\n\n const createGroceryListButtonComponent = (\n \n \n {t(\"grocery_list.create_new_grocery_list_button_text\")}\n \n \n );\n const areAllItemsChecked = _.every(allGroceryItems, \"checked\");\n const listOfGroceriesComponent = (\n <>\n \n \n \n {formatDate(moment(groceryList?.start_date))}\n {\" — \"}\n {formatDate(moment(groceryList?.end_date))}\n \n\n {isLoadingDeleteGroceryList ? (\n \n ) : (\n }\n onPress={onOpen}\n testID={\"deleteGroceryList-button\"}\n />\n )}\n \n \n\n {allGroceryItems.length === 0 ? (\n {t(\"grocery_list.this_grocery_list_is_empty_label_text\")}\n ) : (\n <>\n {areAllItemsChecked ? (\n \n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n {t(\"grocery_list.all_done_label\")}\n \n \n ) : null}\n {/* NOTE: If we want to have grocery categories (ie, the different aisles, bread, dairy, vegetable)\nthen we need to populate the food field on the suggested_serving on the serializer.\nI suggest we leave this for now. */}\n {groceryItems}\n {!areAllItemsChecked && markAllCheckedButton}\n \n )}\n \n );\n const groceryListComponent = (\n \n \n \n\n {_.isEmpty(groceryLists) ? (\n \n \n {t(\"grocery_list.empty_state_message\")}\n \n ) : (\n listOfGroceriesComponent\n )}\n {createGroceryListButtonComponent}\n \n \n );\n\n const deleteConfirmationDialog = (\n \n \n \n \n {t(\"general.dialog_confirmation_question\")}\n \n \n \n {t(\"general.delete\")}\n \n \n \n \n );\n\n return (\n \n \n {!isDesktop && }\n <>\n {groceryListComponent}\n {datePickerModal}\n \n \n {deleteConfirmationDialog}\n \n );\n};\nexport default GroceryListScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { LinearGradient } from \"expo-linear-gradient\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Image, SafeAreaView, StyleSheet, Text, View } from \"react-native\";\nimport { Button } from \"react-native-elements\";\n\nimport { Images, Routes } from \"../../constants\";\n\ninterface SignUpScreenProps {\n navigation: NavigationProp;\n brand: { name: string; logo: string };\n}\n\nconst SignUpScreen: React.FC = ({ navigation, brand }) => {\n const { t } = useTranslation();\n // TODO: Abstract this into a helper function\n const brandName = brand?.name || \"NutriAI\";\n\n return (\n \n \n \n \n \n \n {brandName}\n {t(\"onboarding.onboarding_1_sign_up_screen.reach_your_goals\")}\n {t(\"onboarding.onboarding_1_sign_up_screen.build_healthy_eating_habits\")}\n navigation.navigate(Routes.DIY1GoalScreen)}\n />\n {t(\"onboarding.onboarding_1_sign_up_screen.already_have_account\")}\n navigation.navigate(Routes.LoginScreen, { screen: Routes.LoginScreen })}\n />\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n topContainer: {\n flex: 1,\n position: \"relative\",\n },\n bottomContainer: {\n flex: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n padding: 16,\n },\n gradientOverlay: {\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n },\n image: {\n flex: 1,\n width: \"100%\",\n },\n brandName: {\n fontSize: 32,\n fontWeight: \"bold\",\n textAlign: \"center\",\n marginBottom: 16,\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n subtitle: {\n fontSize: 16,\n color: \"#666\",\n textAlign: \"center\",\n marginBottom: 32,\n },\n startButton: {\n borderRadius: 30,\n paddingVertical: 16,\n paddingHorizontal: 32,\n marginBottom: 16,\n },\n startButtonText: {\n fontSize: 18,\n fontWeight: \"bold\",\n color: \"#fff\",\n },\n loginPrompt: {\n fontSize: 16,\n color: \"#666\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n loginButton: {\n borderRadius: 30,\n paddingVertical: 16,\n paddingHorizontal: 32,\n },\n loginButtonTitle: {\n fontSize: 18,\n fontWeight: \"bold\",\n },\n});\n\nexport default SignUpScreen;\n","import { Image } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView, StyleSheet, Text, TouchableOpacity, useWindowDimensions, View } from \"react-native\";\nimport { Button, Icon, useTheme } from \"react-native-elements\";\nimport { useSelector } from \"react-redux\";\n\nimport { Scale, VerticalScale } from \"../../constants\";\nimport { getOrganisation } from \"../../helpers/userHelpers\";\nimport { userSelector } from \"../../slices/userSlice\";\n\nexport interface Option {\n label: string;\n description: string;\n value: string;\n icon?: string;\n iconType?: string;\n testID?: string;\n}\n\ntype IconProps = {\n name: string;\n type: string; // Optional, if not provided, it's an emoji\n};\n\ntype SetSelectedOptionsFunctionType = (options: string[]) => void;\n\ninterface SelectionScreenProps {\n title: string;\n subtitle: string;\n options: Option[];\n multipleSelection?: boolean;\n selectedOptions: string[];\n setSelectedOptions: SetSelectedOptionsFunctionType;\n icon?: IconProps;\n onPressNext: () => void;\n onPressBack?: () => void;\n errorMessage?: string | string[];\n submitButtonLoading?: boolean;\n nextButtonDisabled?: boolean;\n}\n\nconst DEFAULT_ICON: IconProps = { name: \"robot\", type: \"material-community\" };\n\nconst SelectionScreen: React.FC = ({\n title,\n subtitle,\n options,\n multipleSelection = false,\n selectedOptions,\n setSelectedOptions,\n icon = DEFAULT_ICON,\n onPressNext,\n onPressBack,\n errorMessage,\n submitButtonLoading = false,\n nextButtonDisabled = false,\n}) => {\n const { t } = useTranslation();\n\n const { width } = useWindowDimensions();\n const { theme } = useTheme();\n const primaryColor = theme.colors?.primary;\n const selectedOptionBackgroundColor = theme.colors?.searchBg;\n\n const user = useSelector(userSelector);\n const organisation = user ? getOrganisation(user) : undefined;\n const logoUri = organisation?.logo;\n\n const isDesktop = width >= 1024;\n\n const toggleSelection = (option: string): void => {\n if (multipleSelection) {\n const newSelectedOptions = selectedOptions.includes(option)\n ? selectedOptions.filter((item) => item !== option)\n : [...selectedOptions, option];\n\n setSelectedOptions(newSelectedOptions);\n } else {\n setSelectedOptions([option]);\n }\n };\n\n return (\n \n \n {onPressBack ? (\n \n ) : null}\n {/* 10% Complete */}\n \n \n {logoUri ? (\n \n ) : (\n \n )}\n {title}\n {subtitle}\n {options.map((option) => (\n toggleSelection(option.value)}\n testID={option.testID || `selection-option-${option.value}`}\n >\n {option.icon && option.iconType ? (\n \n ) : (\n {option.icon}\n )}\n \n \n {option.label}\n \n {option.description}\n \n {selectedOptions.includes(option.value) && (\n \n )}\n \n ))}\n {errorMessage ? {errorMessage} : null}\n {nextButtonDisabled ? null : (\n \n )}\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n headerDesktop: {\n paddingHorizontal: \"20%\",\n },\n progressText: {\n marginLeft: 16,\n fontWeight: \"bold\",\n },\n content: {\n flex: 1,\n alignItems: \"center\",\n padding: 16,\n },\n contentDesktop: {\n paddingHorizontal: \"20%\",\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n marginTop: 16,\n textAlign: \"center\",\n },\n subtitle: {\n fontSize: 16,\n color: \"#777\",\n textAlign: \"center\",\n marginVertical: 16,\n },\n option: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n borderRadius: 8,\n borderWidth: 1,\n borderColor: \"#ddd\",\n marginVertical: 8,\n width: \"100%\",\n maxWidth: 600,\n },\n optionTextContainer: {\n flex: 1,\n marginLeft: 16,\n },\n optionLabel: {\n fontSize: 18,\n fontWeight: \"bold\",\n },\n optionDescription: {\n fontSize: 14,\n color: \"#777\",\n },\n errorText: {\n color: \"red\",\n marginTop: 8,\n textAlign: \"center\",\n },\n nextButton: {\n paddingVertical: 12,\n paddingHorizontal: 32,\n marginTop: 16,\n marginBottom: 24,\n borderRadius: 8,\n width: \"80%\",\n alignSelf: \"center\",\n },\n emoji: {\n fontSize: 24,\n },\n});\n\nexport default SelectionScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { Formik } from \"formik\";\nimport React, { useEffect } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScrollView } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Routes } from \"../../constants\";\nimport {\n hasUserCompletedTheirDiyNutritionPlanningFormCompletely,\n shouldB2CCustomerHavePaidAccess,\n} from \"../../helpers/userHelpers\";\nimport type { MainGoalEnum } from \"../../services/backendTypes\";\nimport { onboardingDataSelector, setGoal } from \"../../slices/onboardingSlice\";\nimport { userSelector } from \"../../slices/userSlice\";\nimport { GoalEnum } from \"../../types\";\nimport SelectionScreen, { Option } from \"./SelectionScreen\";\n\ninterface GoalSelectionScreenProps {\n navigation: NavigationProp;\n}\n\nconst GoalSelectionScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const user = useSelector(userSelector);\n const onboardingData = useSelector(onboardingDataSelector);\n\n useEffect(() => {\n const verifySubscription = (): void => {\n if (!shouldB2CCustomerHavePaidAccess(user)) {\n navigation.navigate(Routes.BillingIssueScreen);\n }\n };\n\n verifySubscription();\n }, [user]);\n\n const goals: Option[] = [\n {\n label: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.LOSE_WEIGHT}`),\n description: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.LOSE_WEIGHT}_description`),\n value: GoalEnum.LOSE_WEIGHT,\n icon: \"🔥\",\n testID: `goal-option-${GoalEnum.LOSE_WEIGHT}`,\n },\n {\n label: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.GAIN_MUSCLE}`),\n description: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.GAIN_MUSCLE}_description`),\n value: GoalEnum.GAIN_MUSCLE,\n icon: \"💪\",\n testID: `goal-option-${GoalEnum.GAIN_MUSCLE}`,\n },\n {\n label: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.RECOMPOSITION}`),\n description: t(`onboarding.onboarding_2_goal_screen.${GoalEnum.RECOMPOSITION}_description`),\n value: GoalEnum.RECOMPOSITION,\n icon: \"⚖️\",\n testID: `goal-option-${GoalEnum.RECOMPOSITION}`,\n },\n ];\n\n const validationSchema = Yup.object().shape({\n selectedGoal: Yup.mixed().required(t(\"onboarding.onboarding_2_goal_screen.select_at_least_one_goal\")),\n });\n\n type FormSchema = Yup.InferType;\n\n const onSubmit = (values: FormSchema): void => {\n dispatch(setGoal(values.selectedGoal as MainGoalEnum));\n navigation.navigate(Routes.ActivityLevelScreen);\n };\n\n return (\n \n {({ handleSubmit, setFieldValue, errors, touched, values }) => (\n \n {\n setFieldValue(\"selectedGoal\", options[0]);\n }}\n onPressNext={handleSubmit}\n onPressBack={\n user && hasUserCompletedTheirDiyNutritionPlanningFormCompletely(user)\n ? () => navigation.goBack()\n : undefined\n }\n errorMessage={errors.selectedGoal && touched.selectedGoal ? errors.selectedGoal : \"\"}\n />\n \n )}\n \n );\n};\n\nexport default GoalSelectionScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { Formik } from \"formik\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Routes } from \"../../constants\";\nimport { onboardingDataSelector, setActivityLevel } from \"../../slices/onboardingSlice\";\nimport { ActivityEnum as Activity } from \"../../types\";\nimport type { Option } from \"./SelectionScreen\";\nimport SelectionScreen from \"./SelectionScreen\";\n\ninterface ActivityLevelScreenProps {\n navigation: NavigationProp;\n}\n\nconst ActivityLevelScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n\n const onboardingData = useSelector(onboardingDataSelector);\n\n const activityLevels: Option[] = [\n {\n label: t(\"onboarding.onboarding_3_activity_level_screen.not_very_active\"),\n description: t(\"onboarding.onboarding_3_activity_level_screen.spend_most_day_sitting\"),\n value: Activity.SEDENTARY,\n icon: \"🪑\", // Chair\n testID: `activity-option-${Activity.SEDENTARY}`,\n },\n {\n label: t(\"onboarding.onboarding_3_activity_level_screen.lightly_active\"),\n description: t(\"onboarding.onboarding_3_activity_level_screen.spend_good_part_day_feet\"),\n value: Activity.MILDLY_ACTIVE,\n icon: \"🚶\", // Person walking\n testID: `activity-option-${Activity.MILDLY_ACTIVE}`,\n },\n {\n label: t(\"onboarding.onboarding_3_activity_level_screen.active\"),\n description: t(\"onboarding.onboarding_3_activity_level_screen.most_part_day_feet\"),\n value: Activity.ACTIVE,\n icon: \"🏃\", // Person running\n testID: `activity-option-${Activity.ACTIVE}`,\n },\n {\n label: t(\"onboarding.onboarding_3_activity_level_screen.very_active\"),\n description: t(\"onboarding.onboarding_3_activity_level_screen.most_part_day_heavy_work\"),\n value: Activity.VERY_ACTIVE,\n icon: \"🏋️\", // Person lifting weights\n testID: `activity-option-${Activity.VERY_ACTIVE}`,\n },\n ];\n\n const validationSchema = Yup.object().shape({\n selectedActivity: Yup.mixed().required(\n t(\"onboarding.onboarding_3_activity_level_screen.select_at_least_one_activity\")\n ),\n });\n\n type FormSchema = Yup.InferType;\n\n const onSubmit = (values: FormSchema): void => {\n dispatch(setActivityLevel(values.selectedActivity as Activity));\n navigation.navigate(Routes.BiometricDataScreen);\n };\n\n return (\n \n {({ handleSubmit, setFieldValue, values, errors, touched }) => (\n {\n setFieldValue(\"selectedActivity\", options[0]);\n }}\n onPressNext={handleSubmit}\n onPressBack={() => navigation.goBack()}\n errorMessage={errors.selectedActivity && touched.selectedActivity ? errors.selectedActivity : \"\"}\n />\n )}\n \n );\n};\n\nexport default ActivityLevelScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { Formik } from \"formik\";\nimport { Image } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView, StyleSheet, Text, TextInput, TouchableOpacity, View } from \"react-native\";\nimport { Button, Icon, useTheme } from \"react-native-elements\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Routes, Scale, VerticalScale } from \"../../constants\";\nimport { getOrganisation } from \"../../helpers/userHelpers\";\nimport { onboardingDataSelector, setBiometricData } from \"../../slices/onboardingSlice\";\nimport { userSelector } from \"../../slices/userSlice\";\nimport { GenderEnum } from \"../../types\";\n\ninterface BiometricDataScreenProps {\n navigation: NavigationProp;\n}\n\nconst BiometricDataScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const { theme } = useTheme();\n const dispatch = useDispatch();\n\n const onboardingData = useSelector(onboardingDataSelector);\n\n const user = useSelector(userSelector);\n const organisation = user ? getOrganisation(user) : undefined;\n const logoUri = organisation?.logo;\n\n const validationSchema = Yup.object().shape({\n age: Yup.number().min(18).max(120).required(t(\"onboarding.onboarding_4_biometric_data_screen.valid_age\")),\n gender: Yup.mixed()\n .oneOf(Object.values(GenderEnum))\n .required(t(\"onboarding.onboarding_4_biometric_data_screen.select_gender\")),\n });\n\n type FormSchema = Yup.InferType;\n\n const onSubmit = (values: FormSchema): void => {\n dispatch(setBiometricData({ age: values.age, gender: values.gender }));\n\n navigation.navigate(Routes.PhysicalStatsScreen);\n };\n\n const selectedOptionBackgroundColor = theme.colors?.searchBg || `${theme.colors?.primary}20`; // 20 is the hex for 12.5% opacity\n\n return (\n \n {({ handleSubmit, setFieldValue, values, errors, touched }) => {\n const isMale = values.gender === GenderEnum.MALE;\n const isFemale = !isMale;\n\n const handleGenderPress = (gender: GenderEnum): void => {\n setFieldValue(\"gender\", gender);\n };\n\n return (\n \n \n navigation.goBack()}\n tvParallaxProperties={undefined}\n testID=\"back-button\"\n />\n \n \n {logoUri ? (\n \n ) : (\n \n )}\n\n {t(\"onboarding.onboarding_4_biometric_data_screen.subtitle\")}\n\n \n {t(\"onboarding.onboarding_4_biometric_data_screen.age_label\")}\n \n setFieldValue(\"age\", text)}\n selectTextOnFocus\n testID=\"age-input\"\n />\n {errors.age && touched.age ? (\n \n {errors.age}\n \n ) : null}\n\n \n {t(\"onboarding.onboarding_4_biometric_data_screen.gender_label\")}\n \n \n handleGenderPress(GenderEnum.MALE)}\n testID={`gender-option-${GenderEnum.MALE}`}\n >\n {\"👨 \"}\n \n {t(\"onboarding.onboarding_4_biometric_data_screen.male\")}\n \n \n handleGenderPress(GenderEnum.FEMALE)}\n testID={`gender-option-${GenderEnum.FEMALE}`}\n >\n {\"👩 \"}\n \n {t(\"onboarding.onboarding_4_biometric_data_screen.female\")}\n \n \n \n {errors.gender && touched.gender ? (\n \n {errors.gender}\n \n ) : null}\n\n handleSubmit()}\n testID=\"next-button\"\n />\n \n \n );\n }}\n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n progressText: {\n marginLeft: 16,\n fontWeight: \"bold\",\n },\n content: {\n flex: 1,\n alignItems: \"center\",\n padding: 16,\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n marginTop: 16,\n textAlign: \"center\",\n },\n subtitle: {\n fontSize: 16,\n color: \"#777\",\n textAlign: \"center\",\n marginVertical: 16,\n },\n label: {\n fontSize: 16,\n color: \"#333\",\n marginVertical: 8,\n },\n boldLabel: {\n fontWeight: \"bold\",\n },\n input: {\n borderWidth: 1,\n borderColor: \"#ddd\",\n borderRadius: 8,\n width: \"80%\",\n padding: 8,\n marginVertical: 8,\n textAlign: \"center\",\n },\n ageInput: {\n width: \"40%\",\n },\n genderContainer: {\n flexDirection: \"row\",\n justifyContent: \"space-around\",\n width: \"100%\",\n marginVertical: 16,\n },\n genderOption: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n borderRadius: 8,\n borderWidth: 1,\n borderColor: \"#ddd\",\n width: \"40%\",\n justifyContent: \"center\",\n },\n genderLabel: {\n fontSize: 16,\n marginLeft: 8,\n },\n genderEmoji: {\n fontSize: 24,\n },\n errorText: {\n color: \"red\",\n marginTop: 8,\n textAlign: \"center\",\n },\n nextButton: {\n paddingVertical: 12,\n paddingHorizontal: 32,\n marginTop: 16,\n borderRadius: 8,\n width: \"80%\",\n alignSelf: \"center\",\n },\n});\n\nexport default BiometricDataScreen;\n","/* eslint-disable import/prefer-default-export */\n\nimport type { UserProfile } from \"../services/backendTypes\";\nimport type { LegacyInput } from \"../services/legacyNutritionCalculations7\";\nimport { updateLegacyInput } from \"../services/nutritionCalculations7\";\n\nconst MAX_CARBS = 100;\n/**\n * Discussed and agreed with Oscar Helm.\n */\nexport const MAX_CARBS_FOR_KETO = 40;\n\nexport function adjustLegacyInputCarbs(\n userProfile: UserProfile,\n legacyInput: LegacyInput,\n maxCarbs: number\n): LegacyInput {\n const { fat, carbs, protein, calories } = legacyInput.computedDailyMacros;\n\n const extraCarbs = Math.max(carbs - maxCarbs, 0);\n\n if (extraCarbs === 0) {\n return legacyInput;\n }\n\n const updatedFat = fat + Math.round((extraCarbs * 4) / 9);\n const updatedCarbs = carbs - extraCarbs;\n\n const adjustedLegacyInput = updateLegacyInput(\n {\n ...legacyInput,\n adjustedDailyMacros: {\n fiber: 0,\n protein,\n fat: updatedFat,\n carbs: updatedCarbs,\n calories,\n },\n },\n userProfile\n );\n\n return adjustedLegacyInput;\n}\n\nexport function adjustLegacyInputFats(\n userProfile: UserProfile,\n legacyInput: LegacyInput,\n maxFats: number\n): LegacyInput {\n const { fat, carbs, protein, calories } = legacyInput.computedDailyMacros;\n\n const extraFats = Math.max(fat - maxFats, 0);\n\n if (extraFats === 0) {\n return legacyInput;\n }\n\n const updatedCarbs = carbs + Math.round((extraFats * 9) / 4);\n const updatedFat = fat - extraFats;\n\n const adjustedLegacyInput = updateLegacyInput(\n {\n ...legacyInput,\n adjustedDailyMacros: {\n fiber: 0,\n protein,\n fat: updatedFat,\n carbs: updatedCarbs,\n calories,\n },\n },\n userProfile\n );\n\n return adjustedLegacyInput;\n}\n","// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { body_measurement as bodyMeasurement } from \"health-calculator\";\nimport { Gender as HealthCalculatorGender } from \"health-calculator/lib/util\";\nimport _ from \"lodash\";\nimport moment from \"moment\";\nimport type { Dispatch } from \"react\";\n\nimport { formatMomentAsDateForApi } from \"../../helpers/apiHelpers\";\nimport { adjustLegacyInputCarbs, adjustLegacyInputFats, MAX_CARBS_FOR_KETO } from \"../../helpers/diyFormHelpers\";\nimport { harrisBenedictBMR, mifflinStJoerRMR } from \"../../helpers/fitnessCalculationHelpers\";\nimport { apiCallErrorHandler } from \"../../helpers/generalHelpers\";\nimport { isBamifitSubdomain } from \"../../helpers/userHelpers\";\nimport type {\n DaysToUpdateToNutritionDayPlanIdEnum,\n IngredientToAvoid,\n MainGoalEnum as Goal,\n MealMomentEnum as MealMoment,\n MealSlotSpecification,\n PaginatedIngredientToAvoidList,\n PersonalWeightUnitEnum,\n User,\n UserProfile,\n UsersUserProfileCreateApiArg,\n} from \"../../services/backendTypes\";\nimport type { Macros } from \"../../services/legacyNutritionCalculations\";\nimport { type LegacyInput, type LegacyMealState, rebalanceSizes } from \"../../services/legacyNutritionCalculations7\";\nimport {\n convertToMealSlotSpecifications,\n getDefaultLegacyInput,\n getUpdatedMealSlotSpecificationsFromFormValues,\n updateLegacyInput,\n} from \"../../services/nutritionCalculations7\";\nimport type { OnboardingState } from \"../../slices/onboardingSlice\";\nimport { type DIYFormInterface, userSlice } from \"../../slices/userSlice\";\nimport {\n type WeeklyGoal,\n AutoPlanDaysOnBackendMutation,\n CreateMealSlotSpecificationOnBackend,\n CreateNutritionDayPlanOnBackend,\n CreateUserProfileOnBackend,\n CreateWeeklyNutritionPlanOnBackend,\n GenderEnum,\n GoalEnum,\n ingredientDislikeToBackendIdentifier,\n MacrosPreference,\n MacrosPreferenceEnum,\n MealMomentEnum,\n SetIngredientsToAvoidMutation,\n SustainabilityEnum,\n UpdateUserProfileOnBackend,\n UpdateWeeklyNutritionPlanOnBackend,\n WeeklyGoalEnum,\n} from \"../../types\";\n\nexport interface DiyCreateNutritionPlanFormInterface {\n goal: Goal;\n mealMoments: MealMoment[];\n macrosPreference: MacrosPreference;\n}\n\nexport const diyCreateNutritionPlanFormInitialValues: DiyCreateNutritionPlanFormInterface = {\n goal: GoalEnum.LOSE_WEIGHT,\n mealMoments: [MealMomentEnum.BREAKFAST, MealMomentEnum.LUNCH, MealMomentEnum.AFTERNOON_SNACK, MealMomentEnum.DINNER],\n macrosPreference: MacrosPreferenceEnum.RECOMMENDED,\n};\n\nfunction calculateBodyFatPercentage(onboardingData: OnboardingState): number {\n if (\n !onboardingData.physicalStats.weightInKg ||\n !onboardingData.physicalStats.heightInCm ||\n !onboardingData.biometricData.age\n ) {\n throw new Error(\"Invalid onboarding data\");\n }\n\n const bmi = bodyMeasurement.bmi(onboardingData.physicalStats.weightInKg, onboardingData.physicalStats.heightInCm);\n\n const bodyFatPercentage =\n bodyMeasurement.bfp(\n onboardingData.biometricData.gender === GenderEnum.MALE\n ? HealthCalculatorGender.Male\n : HealthCalculatorGender.Female,\n onboardingData.biometricData.age,\n bmi\n ) / 100.0;\n\n return bodyFatPercentage;\n}\n\nexport function createUserProfileFromOnboardingData(onboardingData: OnboardingState): UserProfile {\n if (!onboardingData) {\n throw new Error(\"onboardingData is not set\");\n }\n\n return {\n id: -1,\n weekly_nutrition_plan: null,\n gender: onboardingData.biometricData.gender!,\n activity: onboardingData.activityLevel,\n sustainability: SustainabilityEnum.SUSTAINABLE,\n diet: onboardingData.dietPreferences.dietaryPreference || \"OMNIVORE\",\n weight: onboardingData.physicalStats.weightInKg!,\n body_fat_percentage: calculateBodyFatPercentage(onboardingData),\n food_intolerances_gluten: onboardingData.dietPreferences.intolerances.includes(\"GLUTEN\"),\n food_intolerances_lactose: onboardingData.dietPreferences.intolerances.includes(\"LACTOSE\"),\n food_intolerances_nut: onboardingData.dietPreferences.intolerances.includes(\"NUTS\"),\n food_intolerances_crustaceans_shellfish:\n onboardingData.dietPreferences.intolerances.includes(\"CRUSTACEANS_AND_SHELLFISH\"),\n exercise_instances: [],\n is_keto_user: onboardingData.dietPreferences.dietType === MacrosPreferenceEnum.KETO,\n main_goal: onboardingData.goal,\n age: onboardingData.biometricData.age,\n height_in_cm: onboardingData.physicalStats.heightInCm,\n uses_imperial_measurements_for_recipes: onboardingData.preferences.usesImperialUnitsForRecipes,\n uses_imperial_measurements_for_height: onboardingData.preferences.usesImperialUnitsForHeight,\n personal_weight_unit: onboardingData.preferences.personalWeightUnit,\n\n last_menstrual_period_start_date: onboardingData?.menstrualCycle?.lastMenstrualPeriodStartDate || null,\n menstrual_cycle_length: onboardingData?.menstrualCycle?.menstrualCycleLength || null,\n is_on_menopause_diet: onboardingData?.dietPreferences.dietType === MacrosPreferenceEnum.MENOPAUSE,\n };\n}\n\nexport function createAnonymousUser(onboardingData: OnboardingState): User {\n const anonymousUser: User = {\n id: -1,\n email: `anonymous${_.uniqueId()}@nutriaiplatform.com`,\n first_name: \"\",\n last_name: \"\",\n is_coach: false,\n account_enabled: true,\n payment_status_override: false,\n intake: createUserProfileFromOnboardingData(onboardingData),\n // These fields are not relevant for any nutrition calculations\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n customer: undefined,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n organisation: undefined,\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n coach: undefined,\n };\n\n return anonymousUser;\n}\n\nexport const ALL_DAYS_OF_THE_WEEK: DaysToUpdateToNutritionDayPlanIdEnum[] = [\n \"monday\",\n \"tuesday\",\n \"wednesday\",\n \"thursday\",\n \"friday\",\n \"saturday\",\n \"sunday\",\n];\n\n/**\n * We calculate the energy deficit required to achieve the desired weight loss\n */\nexport function calculateEnergyBalanceMatchingGoal(onboardingState: OnboardingState, tdee: number): string {\n const kcalsToLoseOneKg = 7700; // Approximate kcal deficit needed to lose 1 kg of body weight\n let weeklyDeficit = 0;\n\n if (onboardingState.weeklyGoal) {\n switch (onboardingState.weeklyGoal) {\n case \"LOSE_0_25_KG_PER_WEEK\":\n weeklyDeficit = 0.25 * kcalsToLoseOneKg;\n break;\n case \"LOSE_0_5_KG_PER_WEEK\":\n weeklyDeficit = 0.5 * kcalsToLoseOneKg;\n break;\n case \"LOSE_0_75_KG_PER_WEEK\":\n weeklyDeficit = 0.75 * kcalsToLoseOneKg;\n break;\n case \"LOSE_1_KG_PER_WEEK\":\n weeklyDeficit = 1 * kcalsToLoseOneKg;\n break;\n default:\n console.error(\"Unsupported weekly goal \", onboardingState.weeklyGoal);\n }\n }\n\n const dailyDeficit = weeklyDeficit / 7;\n const energyBalance = 100 - (dailyDeficit / tdee) * 100;\n\n return String(Math.round(energyBalance));\n}\n\nexport function createMealSlotSpecificationFromDiyForm(\n user: User,\n onboardingState: OnboardingState\n): MealSlotSpecification[] {\n if (!user.intake) {\n throw new Error(\"user intake is not set - this should never happen\");\n }\n\n // Create nutrition plan\n const defaultLegacyInput = getDefaultLegacyInput(\n user.intake,\n {\n monday: true,\n tuesday: true,\n wednesday: true,\n thursday: true,\n friday: true,\n saturday: true,\n sunday: true,\n },\n \"diy-nutrition-plan\"\n );\n\n let energyBalance;\n if (onboardingState.goal === GoalEnum.RECOMPOSITION) {\n energyBalance = String(100);\n } else if (onboardingState.goal === GoalEnum.LOSE_WEIGHT) {\n energyBalance = String(90);\n if (onboardingState.goal) {\n energyBalance = calculateEnergyBalanceMatchingGoal(\n onboardingState,\n defaultLegacyInput.computedDailyMacros.calories\n );\n }\n } else {\n energyBalance = String(110);\n }\n\n const legacyInputForUpdateCalculation: LegacyInput = {\n ...defaultLegacyInput,\n energyBalance,\n };\n if (onboardingState.dietPreferences.dietType === \"CHOOSE_YOUR_OWN\") {\n if (!onboardingState.dietPreferences.userProvidedMacros) {\n throw new Error(\"User provided macros are not set\");\n }\n\n legacyInputForUpdateCalculation.adjustedDailyMacros = {\n calories: onboardingState.dietPreferences.userProvidedMacros?.calories,\n fat: onboardingState.dietPreferences.userProvidedMacros?.fat,\n carbs: onboardingState.dietPreferences.userProvidedMacros?.carbohydrates,\n protein: onboardingState.dietPreferences.userProvidedMacros?.protein,\n fiber: 0,\n };\n }\n\n const legacyInputWithEnergyBalance = updateLegacyInput(legacyInputForUpdateCalculation, user.intake, onboardingState);\n\n // Now add meal moments\n const updatedMeals = legacyInputWithEnergyBalance.meals.map((legacyMealState: LegacyMealState) => ({\n ...legacyMealState,\n enabled: onboardingState.dietPreferences.mealTimes\n ? onboardingState.dietPreferences.mealTimes.includes(legacyMealState.mealMoment)\n : legacyMealState.enabled,\n }));\n\n const updatedAndRebalancedMeals = { ...legacyInputWithEnergyBalance, meals: rebalanceSizes(updatedMeals) };\n let updatedLegacyInput = updateLegacyInput(updatedAndRebalancedMeals, user.intake, onboardingState);\n\n function calculateGramsOfCarbsForLowCarb(legacyInput: LegacyInput): number {\n // Calculate the total grams of grabs by getting the TDEE and dividing by 16\n return legacyInput.computedDailyMacros.calories / 16;\n }\n\n if (isBamifitSubdomain()) {\n if (onboardingState.dietPreferences.dietType === \"RECOMMENDED\") {\n const PERCENTAGE_OF_TDEE_FOR_FATS_FOR_BAMIFIT_USERS = 0.3;\n const tdee = updatedLegacyInput.computedDailyMacros.calories;\n const fatsKcal = tdee * PERCENTAGE_OF_TDEE_FOR_FATS_FOR_BAMIFIT_USERS;\n\n const fatsG = fatsKcal / 9;\n\n updatedLegacyInput = adjustLegacyInputFats(user.intake, updatedLegacyInput, fatsG);\n }\n }\n\n if (onboardingState.dietPreferences.dietType === \"KETO\") {\n updatedLegacyInput = adjustLegacyInputCarbs(user.intake, updatedLegacyInput, MAX_CARBS_FOR_KETO);\n } else if (onboardingState.dietPreferences.dietType === \"LOW_CARB\") {\n const gramsOfCarbs = calculateGramsOfCarbsForLowCarb(updatedLegacyInput);\n updatedLegacyInput = adjustLegacyInputCarbs(user.intake, updatedLegacyInput, gramsOfCarbs);\n }\n\n const mealSlotSpecifications = convertToMealSlotSpecifications(updatedLegacyInput.meals);\n\n return mealSlotSpecifications;\n}\n\nexport function createMealSlotSpecificationFromAnonymousUser(onboardingData: OnboardingState): MealSlotSpecification[] {\n const anonymousUser = createAnonymousUser(onboardingData);\n\n const mss = createMealSlotSpecificationFromDiyForm(anonymousUser, onboardingData);\n\n return mss;\n}\n\n/**\n * Rounds numeric meal slot specification values to integers\n */\nfunction sanitizeMealSlotSpecification(mealSlot: MealSlotSpecification): MealSlotSpecification {\n return {\n ...mealSlot,\n kcal: mealSlot.kcal ? Math.round(mealSlot.kcal) : mealSlot.kcal,\n carbohydrates: mealSlot.carbohydrates ? Math.round(mealSlot.carbohydrates) : mealSlot.carbohydrates,\n fat: mealSlot.fat ? Math.round(mealSlot.fat) : mealSlot.fat,\n protein: mealSlot.protein ? Math.round(mealSlot.protein) : mealSlot.protein,\n };\n}\n\nexport async function doOrRedoNutritionPreferencesOnBackend(\n user: User,\n onboardingData: OnboardingState,\n updateUserProfileOnBackend: UpdateUserProfileOnBackend,\n createUserProfileOnBackend: CreateUserProfileOnBackend,\n updateWeeklyNutritionPlanOnBackend: UpdateWeeklyNutritionPlanOnBackend,\n createNutritionDayPlanOnBackend: CreateNutritionDayPlanOnBackend,\n createMealSlotSpecificationOnBackend: CreateMealSlotSpecificationOnBackend,\n createWeeklyNutritionPlanOnBackend: CreateWeeklyNutritionPlanOnBackend,\n setIngredientsToAvoidMutation: SetIngredientsToAvoidMutation,\n ingredientToAvoidObjectsFromBackend: PaginatedIngredientToAvoidList | undefined,\n autoPlanDaysOnBackend: AutoPlanDaysOnBackendMutation\n): Promise {\n const updatedUserProfile = createUserProfileFromOnboardingData(onboardingData);\n\n // Update a user's intake on the backend\n const userProfileCreateBody: UsersUserProfileCreateApiArg = {\n userProfileRequest: {\n ...updatedUserProfile,\n },\n };\n\n const updateOrCreatePromise = user.intake?.id\n ? updateUserProfileOnBackend({ ...userProfileCreateBody, id: user.intake.id })\n : createUserProfileOnBackend({\n userProfileRequest: {\n ...userProfileCreateBody.userProfileRequest,\n user_id: user.id,\n },\n });\n\n const userProfileUpdated = await updateOrCreatePromise.unwrap().catch(apiCallErrorHandler());\n\n // Update a user's meal slot specification\n // Create new NutritionDayPlan\n const createdNutritionDayPlan = await createNutritionDayPlanOnBackend({\n nutritionDayPlanRequest: {\n name: \"DIY nutrition plan\",\n },\n }).unwrap();\n\n // NOTE: We need to do this because if it is the first time through there is no intake\n const mss = createMealSlotSpecificationFromAnonymousUser(onboardingData);\n if (!mss) {\n throw new Error(\"Meal slot specification is not set\");\n }\n\n const createPromises = _.map(mss, (mealSlot) =>\n createMealSlotSpecificationOnBackend({\n mealSlotSpecificationRequest: {\n ...sanitizeMealSlotSpecification(mealSlot),\n nutrition_day_plan: createdNutritionDayPlan.id,\n },\n })\n );\n\n await Promise.all(createPromises);\n\n const updateExistingWeeklyNutritionPlan = Boolean(user.intake?.weekly_nutrition_plan);\n // NOTE: We do this afterwards so that the meal slot specifications are created before we update the WNP\n // This results in all the data always being up to date when the call is made to fetch new data\n if (updateExistingWeeklyNutritionPlan) {\n if (!user?.intake?.weekly_nutrition_plan?.id) {\n throw new Error(\"Client intake weekly nutrition plan id is not defined\");\n }\n\n await updateWeeklyNutritionPlanOnBackend({\n id: user?.intake?.weekly_nutrition_plan?.id,\n weeklyNutritionPlanUpdateRequest: {\n nutrition_day_plan_id: createdNutritionDayPlan.id,\n days_to_update_to_nutrition_day_plan_id: ALL_DAYS_OF_THE_WEEK,\n },\n }).unwrap();\n } else {\n if (!userProfileUpdated) {\n throw new Error(\"User profile is not defined\");\n }\n\n await createWeeklyNutritionPlanOnBackend({\n weeklyNutritionPlanCreateRequest: {\n // Since this is the first nutrition plan we are creating we populate every day\n monday: createdNutritionDayPlan.id,\n tuesday: createdNutritionDayPlan.id,\n wednesday: createdNutritionDayPlan.id,\n thursday: createdNutritionDayPlan.id,\n friday: createdNutritionDayPlan.id,\n saturday: createdNutritionDayPlan.id,\n sunday: createdNutritionDayPlan.id,\n\n client_intake: userProfileUpdated.id,\n },\n }).unwrap();\n }\n\n const ingredientDislikesInBackendFormat = onboardingData.dietPreferences.ingredientDislikes.map(\n (ingredient) => ingredientDislikeToBackendIdentifier[ingredient]\n );\n\n // If the data from the backend is empty then do not do this\n const ingredientToAvoidIds = ingredientToAvoidObjectsFromBackend?.results\n ? ingredientToAvoidObjectsFromBackend.results\n .filter((ingredient: IngredientToAvoid) => ingredientDislikesInBackendFormat.includes(ingredient.name))\n .map((ingredient: IngredientToAvoid) => ingredient.id)\n : [];\n\n // Set ingredients to avoid\n await setIngredientsToAvoidMutation({\n setIngredientToAvoidRequest: {\n ingredient_to_avoid_ids: ingredientToAvoidIds,\n },\n })\n .unwrap()\n .catch((error) => {\n Sentry.captureException(error);\n console.error(\"Failed to set ingredients to avoid:\", error);\n });\n\n // Only disable auto-planning if the organisation explicitly sets auto_plan_initial_meals to false\n const shouldAutoPlanMeals = user?.coach?.organisation?.auto_plan_initial_meals !== false;\n console.log(\"shouldAutoPlanMeals\", shouldAutoPlanMeals);\n\n if (shouldAutoPlanMeals) {\n const todayDateStringForApiRequest = formatMomentAsDateForApi(moment());\n await autoPlanDaysOnBackend({\n autoPlanDaysRequest: {\n num_days: 7,\n start_date_inclusive: todayDateStringForApiRequest,\n delete_existing_plans: true,\n },\n });\n }\n}\n\nfunction calculateTDEE(onboardingState: OnboardingState): number {\n const userProfile = createUserProfileFromOnboardingData(onboardingState);\n\n const defaultLegacyInput = getDefaultLegacyInput(\n userProfile,\n {\n monday: true,\n tuesday: true,\n wednesday: true,\n thursday: true,\n friday: true,\n saturday: true,\n sunday: true,\n },\n \"diy-nutrition-plan\"\n );\n\n return defaultLegacyInput.computedDailyMacros.calories;\n}\n\nfunction calculateTdeeForWeeklyGoal(onboardingState: OnboardingState, weeklyGoal: WeeklyGoal): number {\n const tdee = calculateTDEE(onboardingState);\n\n const energyBalance = calculateEnergyBalanceMatchingGoal({ ...onboardingState, weeklyGoal }, tdee);\n\n const deficitTdee = (tdee * Number(energyBalance)) / 100;\n\n return deficitTdee;\n}\n\nconst MIN_DAILY_CALORIES = 1250;\n\n/**\n * Define maximum caloric deficit possible for safety\n *\n * NOTE: This is currently only for the Bamifit organisation.\n * Later this should be added to the Organisation schema but for now we just implement it hardcoded.\n */\nconst BAMIFIT_MAX_CALORIC_DEFICIT = 500;\n\n/**\n * Some of these goals are too aggressive if the person is too small and has too little activity.\n * There should never be daily kcals under 1500, no matter what.\n *\n */\nexport function appropriateWeeklyGoalsForSafety(onboardingData: OnboardingState): WeeklyGoal[] {\n const isBamifit = isBamifitSubdomain();\n\n const maxCaloricDeficit = isBamifit ? BAMIFIT_MAX_CALORIC_DEFICIT : null;\n\n const tdee = calculateTDEE(onboardingData);\n\n let minCalories = MIN_DAILY_CALORIES;\n\n if (maxCaloricDeficit) {\n const minKcalBasedOnDeficit = tdee - maxCaloricDeficit;\n minCalories = Math.max(minCalories, minKcalBasedOnDeficit);\n }\n\n const isGoalSafe = (goal: WeeklyGoal): boolean => {\n const goalTdee = calculateTdeeForWeeklyGoal(onboardingData, goal);\n\n return goalTdee >= minCalories;\n };\n\n return Object.values(WeeklyGoalEnum).filter(isGoalSafe);\n}\n\nexport function getBalancedMacros(kcal: number, onboardingState: OnboardingState): Macros {\n if (!onboardingState.physicalStats.weightInKg) {\n throw new Error(\"Weight is not defined\");\n }\n if (!onboardingState.biometricData.gender) {\n throw new Error(\"Gender is not defined\");\n }\n if (!onboardingState.physicalStats.heightInCm) {\n throw new Error(\"Height is not defined\");\n }\n if (!onboardingState.biometricData.age) {\n throw new Error(\"Age is not defined\");\n }\n\n const protein = onboardingState.physicalStats.weightInKg * 1.6;\n\n const rmr = mifflinStJoerRMR(\n onboardingState.physicalStats.weightInKg,\n onboardingState.physicalStats.heightInCm,\n onboardingState.biometricData.age,\n onboardingState.biometricData.gender === \"MALE\"\n );\n const bmr = harrisBenedictBMR(\n onboardingState.physicalStats.weightInKg,\n onboardingState.physicalStats.heightInCm,\n onboardingState.biometricData.age,\n onboardingState.biometricData.gender === \"MALE\"\n );\n\n let fat;\n if (onboardingState.biometricData.gender === \"MALE\") {\n fat = (bmr * 0.25) / 9;\n } else {\n fat = (rmr * 0.25) / 9;\n }\n\n const MINIMUM_FAT = 40;\n\n if (fat < MINIMUM_FAT) {\n fat = MINIMUM_FAT;\n }\n\n return {\n protein,\n fat,\n carbs: (kcal - protein * 4 - fat * 9) / 4,\n calories: kcal,\n // NOTE: Fiber is not currently use so we just put a healthy default\n fiber: 40,\n };\n}\n\nexport function getMealSlotSpecificationsFromDesiredMacros(\n onboardingState: OnboardingState,\n desiredMacros: Macros\n): MealSlotSpecification[] {\n const anonymousUser = createAnonymousUser(onboardingState);\n\n if (!anonymousUser.intake) {\n throw new Error(\"Could not create anonymous user\");\n }\n\n const defaultLegacyInput = getDefaultLegacyInput(\n anonymousUser.intake,\n {\n monday: true,\n tuesday: true,\n wednesday: true,\n thursday: true,\n friday: true,\n saturday: true,\n sunday: true,\n },\n \"diy-nutrition-plan\"\n );\n\n const updatedLegacyInput = updateLegacyInput(\n {\n ...defaultLegacyInput,\n computedDailyMacros: desiredMacros,\n },\n anonymousUser.intake,\n onboardingState\n );\n\n const meals = updatedLegacyInput.meals.map((meal) => ({\n ...meal,\n enabled: onboardingState.dietPreferences.mealTimes\n ? onboardingState.dietPreferences.mealTimes.includes(meal.mealMoment)\n : meal.enabled,\n }));\n\n const values = meals.reduce((acc, meal) => {\n const newAcc = { ...acc };\n newAcc[meal.mealMoment] = {\n protein: desiredMacros.protein * (meal.size / 100),\n carbs: desiredMacros.carbs * (meal.size / 100),\n fat: desiredMacros.fat * (meal.size / 100),\n };\n return newAcc;\n }, {} as { [x: string]: { protein: number; carbs: number; fat: number } });\n\n const { updatedMealSlotSpecifications } = getUpdatedMealSlotSpecificationsFromFormValues(values, meals);\n\n return updatedMealSlotSpecifications;\n}\n\nexport function createUpdatedFormValues(onboardingData: OnboardingState): DIYFormInterface {\n const formValues = diyCreateNutritionPlanFormInitialValues;\n const mss = createMealSlotSpecificationFromAnonymousUser(onboardingData);\n\n return { formValues, mss };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function updateMacrosInState(dispatch: Dispatch, onboardingState: OnboardingState): void {\n const updatedFormValues = createUpdatedFormValues(onboardingState);\n\n dispatch(userSlice.actions.storeDiyFormResults(updatedFormValues));\n}\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport convert from \"convert-units\";\nimport { Formik, FormikErrors, FormikProps, FormikTouched } from \"formik\";\nimport { Image } from \"native-base\";\nimport React, { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Modal, SafeAreaView, ScrollView, StyleSheet, Text, TouchableOpacity, View } from \"react-native\";\nimport { Button, Icon, Input, useTheme } from \"react-native-elements\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Routes, Scale, VerticalScale } from \"../../constants\";\nimport { calculateMinimumHealthyWeight } from \"../../helpers/fitnessCalculationHelpers\";\nimport { getOrganisation } from \"../../helpers/userHelpers\";\nimport type { PersonalWeightUnitEnum } from \"../../services/backendTypes\";\nimport {\n onboardingDataSelector,\n OnboardingState,\n setPhysicalStats,\n setPreferences,\n} from \"../../slices/onboardingSlice\";\nimport { userSelector } from \"../../slices/userSlice\";\nimport { updateMacrosInState } from \"./onboardingHelpers\";\n\ninterface PhysicalStatsScreenProps {\n navigation: NavigationProp;\n}\n\n// FIXME: Can this be taken from the model.py auto-generated types instead?\nenum HeightUnit {\n CENTIMETRES = \"cm\",\n FEET_INCHES = \"ftin\",\n}\n\ninterface WeightUnitModalProps {\n visible: boolean;\n onClose: () => void;\n currentUnit: PersonalWeightUnitEnum;\n onSelect: (unit: PersonalWeightUnitEnum) => void;\n currentKg: number;\n currentGoalKg: number;\n setFieldValue: FormikProps<{\n heightInCm: number;\n weightInKg: number;\n goalWeight: number;\n }>[\"setFieldValue\"];\n}\n\nconst PhysicalStatsScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n const { theme } = useTheme();\n\n const onboardingData = useSelector(onboardingDataSelector);\n\n const user = useSelector(userSelector);\n const organisation = user ? getOrganisation(user) : undefined;\n const logoUri = organisation?.logo;\n\n const [heightUnit, setHeightUnit] = useState(HeightUnit.CENTIMETRES);\n const [weightUnit, setWeightUnit] = useState(\"KILOGRAMS\");\n const [weightUnitModalVisible, setWeightUnitModalVisible] = useState(false);\n\n // Create variables to store the appropriate error messages based on the current unit system\n const heightMinErrorMessage =\n heightUnit === HeightUnit.CENTIMETRES\n ? t(\"onboarding.onboarding_5_physical_stats_screen.min_height\")\n : t(\"onboarding.onboarding_5_physical_stats_screen.min_height_imperial\");\n\n const heightMaxErrorMessage =\n heightUnit === HeightUnit.CENTIMETRES\n ? t(\"onboarding.onboarding_5_physical_stats_screen.max_height\")\n : t(\"onboarding.onboarding_5_physical_stats_screen.max_height_imperial\");\n\n const weightMinErrorMessage =\n weightUnit === \"KILOGRAMS\"\n ? t(\"onboarding.onboarding_5_physical_stats_screen.min_weight\")\n : t(\"onboarding.onboarding_5_physical_stats_screen.min_weight_imperial\");\n\n const weightMaxErrorMessage =\n weightUnit === \"KILOGRAMS\"\n ? t(\"onboarding.onboarding_5_physical_stats_screen.max_weight\")\n : t(\"onboarding.onboarding_5_physical_stats_screen.max_weight_imperial\");\n\n const goalWeightMaxErrorMessage =\n weightUnit === \"KILOGRAMS\"\n ? t(\"onboarding.onboarding_5_physical_stats_screen.max_goal_weight\")\n : t(\"onboarding.onboarding_5_physical_stats_screen.max_goal_weight_imperial\");\n\n // Validation schema that uses the unit-appropriate error messages\n const validationSchema = Yup.object().shape({\n heightInCm: Yup.number()\n .required(t(\"onboarding.onboarding_5_physical_stats_screen.valid_height\"))\n .positive(t(\"onboarding.onboarding_5_physical_stats_screen.positive_height\"))\n .min(120, heightMinErrorMessage)\n .max(250, heightMaxErrorMessage),\n weightInKg: Yup.number()\n .required(t(\"onboarding.onboarding_5_physical_stats_screen.valid_weight\"))\n .positive(t(\"onboarding.onboarding_5_physical_stats_screen.positive_weight\"))\n .min(45, weightMinErrorMessage)\n .max(300, weightMaxErrorMessage),\n goalWeight: Yup.number()\n .required(t(\"onboarding.onboarding_5_physical_stats_screen.valid_goal_weight\"))\n .positive(t(\"onboarding.onboarding_5_physical_stats_screen.positive_goal_weight\"))\n .test(\"minGoalWeight\", t(\"onboarding.onboarding_5_physical_stats_screen.min_goal_weight\"), function (value) {\n const { heightInCm } = this.parent;\n return (value || 0) >= calculateMinimumHealthyWeight(heightInCm as number);\n })\n .max(300, goalWeightMaxErrorMessage),\n });\n\n type FormSchema = Yup.InferType;\n\n const [heightFt, setHeightFt] = useState(\"\");\n const [heightInches, setHeightInches] = useState(\"\");\n\n const [weightStones, setWeightStones] = useState(\"\");\n const [weightPounds, setWeightPounds] = useState(\"\");\n const usesImperialUnitsForRecipes = weightUnit === \"POUNDS\";\n\n const [goalWeightStones, setGoalWeightStones] = useState(\"\");\n const [goalWeightPounds, setGoalWeightPounds] = useState(\"\");\n\n const onSubmit = (values: FormSchema): void => {\n dispatch(setPhysicalStats(values));\n\n dispatch(\n setPreferences({\n ...onboardingData.preferences,\n usesImperialUnitsForRecipes,\n personalWeightUnit: weightUnit,\n usesImperialUnitsForHeight: heightUnit === HeightUnit.FEET_INCHES,\n })\n );\n\n const updatedOnboardingData: OnboardingState = {\n ...onboardingData,\n physicalStats: values,\n };\n\n updateMacrosInState(dispatch, updatedOnboardingData);\n\n // If the goal is weight loss then we need to know their target for weight loss\n // FIXME: Ensure that the logic that is currently done on the weekly goal screen is\n // done here if need be (or at least triggered)\n const nextScreen = onboardingData.goal === \"LOSE_WEIGHT\" ? Routes.WeeklyGoalScreen : Routes.NutritionalPlanScreen;\n navigation.navigate(nextScreen);\n };\n\n // Helper conversion functions using convert-units\n const convertFtInToCm = (ftStr: string, inchesStr: string): number => {\n const ftNum = parseFloat(ftStr) || 0;\n const inNum = parseFloat(inchesStr) || 0;\n const totalInches = ftNum * 12 + inNum;\n return Math.round(convert(totalInches).from(\"in\").to(\"cm\"));\n };\n\n const convertKgToLbs = (kg: number): number => convert(kg).from(\"kg\").to(\"lb\");\n\n const convertLbsToKg = (lbs: number): number => convert(lbs).from(\"lb\").to(\"kg\");\n\n const convertStonesToKg = (stones: string, pounds: string): number => {\n const totalPounds = (parseFloat(stones) || 0) * 14 + (parseFloat(pounds) || 0);\n return convert(totalPounds).from(\"lb\").to(\"kg\");\n };\n\n const convertKgToStonesPounds = (kg: number): { stones: string; pounds: string } => {\n const totalPounds = convert(kg).from(\"kg\").to(\"lb\");\n const stones = Math.floor(totalPounds / 14);\n const pounds = Math.round(totalPounds % 14);\n return { stones: String(stones), pounds: String(pounds) };\n };\n\n const getErrorMessage = (\n isGoalWeight: boolean,\n errors: FormikErrors,\n touched: FormikTouched\n ): string => {\n if (isGoalWeight) {\n return errors.goalWeight && touched.goalWeight ? errors.goalWeight : \"\";\n }\n return errors.weightInKg && touched.weightInKg ? errors.weightInKg : \"\";\n };\n\n const WeightUnitModal: React.FC = ({\n visible,\n onClose,\n currentUnit,\n onSelect,\n currentKg,\n currentGoalKg,\n setFieldValue,\n }) => {\n const handleUnitSelection = (selectedUnit: PersonalWeightUnitEnum): void => {\n const currentKgValue = parseFloat(String(currentKg)) || 0;\n const currentGoalKgValue = parseFloat(String(currentGoalKg)) || 0;\n const stonesAndPounds = convertKgToStonesPounds(currentKgValue);\n const goalStonesAndPounds = convertKgToStonesPounds(currentGoalKgValue);\n\n // Handle unit conversion based on selection\n if (selectedUnit === \"POUNDS\") {\n // No need to do anything special for pounds\n } else if (selectedUnit === \"STONES\") {\n setWeightStones(stonesAndPounds.stones);\n setWeightPounds(stonesAndPounds.pounds);\n setGoalWeightStones(goalStonesAndPounds.stones);\n setGoalWeightPounds(goalStonesAndPounds.pounds);\n } else if (selectedUnit === \"KILOGRAMS\") {\n // Round to 1 decimal place for kg\n setFieldValue(\"weightInKg\", Math.round(currentKgValue * 10) / 10);\n setFieldValue(\"goalWeight\", Math.round(currentGoalKgValue * 10) / 10);\n }\n\n onSelect(selectedUnit);\n onClose();\n };\n\n return (\n \n \n true}>\n \n {t(\"onboarding.onboarding_5_physical_stats_screen.select_weight_unit\")}\n \n\n handleUnitSelection(\"KILOGRAMS\")}\n testID=\"weight-unit-option-KILOGRAMS\"\n >\n \n {currentUnit === \"KILOGRAMS\" && }\n \n {t(\"general.kilograms\")}\n \n\n handleUnitSelection(\"POUNDS\")}\n testID=\"weight-unit-option-POUNDS\"\n >\n \n {currentUnit === \"POUNDS\" && }\n \n {t(\"general.pounds\")}\n \n\n handleUnitSelection(\"STONES\")}\n testID=\"weight-unit-option-STONES\"\n >\n \n {currentUnit === \"STONES\" && }\n \n {t(\"general.stones\")}\n \n\n \n \n );\n }}\n \n \n \n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n contentWrapper: {\n flexGrow: 1,\n },\n content: {\n alignItems: \"center\",\n padding: 16,\n },\n titleContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n marginTop: 16,\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n marginTop: 16,\n textAlign: \"center\",\n },\n description: {\n fontSize: 16,\n textAlign: \"center\",\n marginVertical: 8,\n },\n calendarContainer: {\n width: \"100%\",\n marginTop: 16,\n },\n nextButton: {\n marginTop: 20,\n paddingVertical: 12,\n paddingHorizontal: 32,\n borderRadius: 8,\n width: \"100%\",\n },\n});\n\nexport default MenstrualCycleDatesScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { Formik } from \"formik\";\nimport React, { useEffect, useRef } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView, ScrollView, StyleSheet, Text, TouchableOpacity, View } from \"react-native\";\nimport { Button, Icon, useTheme } from \"react-native-elements\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { Routes } from \"../../constants\";\nimport { onboardingDataSelector, setMenstrualCycle } from \"../../slices/onboardingSlice\";\n\ninterface MenstrualCycleSpacingScreenProps {\n navigation: NavigationProp;\n}\n\nconst MenstrualCycleSpacingScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const { theme } = useTheme();\n const dispatch = useDispatch();\n const onboardingData = useSelector(onboardingDataSelector);\n const scrollViewRef = useRef(null);\n\n // Generate array of possible cycle lengths from 21 to 45\n const cycleLengthOptions = Array.from({ length: 25 }, (_, i) => i + 21);\n\n const validationSchema = Yup.object().shape({\n knowsCycleLength: Yup.boolean().required(\n t(\"onboarding.onboarding_menstrual_cycle_spacing_screen.validation_error\")\n ),\n cycleLength: Yup.number()\n .min(21)\n .max(35)\n .when(\"knowsCycleLength\", {\n is: true,\n then: Yup.number().required(t(\"onboarding.onboarding_menstrual_cycle_spacing_screen.validation_error\")),\n }),\n });\n\n type FormSchema = Yup.InferType;\n\n const initialValues = { knowsCycleLength: true, cycleLength: 28 } as FormSchema;\n\n useEffect(() => {\n // Scroll to default value (28) when component mounts\n if (scrollViewRef.current) {\n // Calculate position to scroll to (28 - 21 = index 7)\n // Each option height is approximately 60 (adjust based on your styling)\n const defaultIndex = 7; // Index for 28 days\n const optionHeight = 60;\n // Scroll to position with 2 items above the default value\n scrollViewRef.current.scrollTo({ y: (defaultIndex - 2) * optionHeight, animated: false });\n }\n }, []);\n\n const onSubmit = (values: FormSchema): void => {\n // Get the menstrual cycle length based on user input\n const cycleLength = values.knowsCycleLength ? values.cycleLength : 28; // Default to 28 if user doesn't know\n\n // Update the menstrual cycle data in the Redux store\n dispatch(\n setMenstrualCycle({\n // Preserve existing values from previous screen\n lastMenstrualPeriodStartDate: onboardingData.menstrualCycle.lastMenstrualPeriodStartDate,\n // Add the cycle length from this screen\n menstrualCycleLength: cycleLength,\n })\n );\n\n // Navigate to the next screen\n navigation.navigate(Routes.MenstrualCycleDetailsScreen);\n };\n\n return (\n \n {({ handleSubmit, setFieldValue, values, errors, touched }) => (\n \n \n navigation.goBack()}\n tvParallaxProperties={undefined}\n testID=\"back-button\"\n />\n \n \n \n \n \n\n {t(\"onboarding.onboarding_menstrual_cycle_spacing_screen.title\")}\n\n {/* Cycle length options with scroll view */}\n \n {/* Top fade effect */}\n \n\n {\n // Calculate which option is centered\n const { y } = event.nativeEvent.contentOffset;\n const optionHeight = 60;\n // +2 because we show 2 items above the selected one\n const selectedIndex = Math.round(y / optionHeight) + 2;\n const selectedValue = cycleLengthOptions[selectedIndex] || 28;\n setFieldValue(\"cycleLength\", selectedValue);\n }}\n >\n {/* Add empty views at the beginning for padding */}\n \n \n\n {cycleLengthOptions.map((days) => (\n {\n setFieldValue(\"knowsCycleLength\", true);\n setFieldValue(\"cycleLength\", days);\n\n // Scroll to center the selected option\n if (scrollViewRef.current) {\n const index = cycleLengthOptions.indexOf(days);\n const optionHeight = 60;\n scrollViewRef.current.scrollTo({\n y: (index - 2) * optionHeight,\n animated: true,\n });\n }\n }}\n testID={`cycle-option-${days}`}\n >\n \n {days} Days\n \n \n ))}\n\n {/* Add empty views at the end for padding */}\n \n \n \n\n {/* Bottom fade effect */}\n \n\n {/* Selection indicator */}\n \n \n\n \n handleSubmit()}\n testID=\"next-button\"\n />\n\n {\n setFieldValue(\"knowsCycleLength\", false);\n setFieldValue(\"cycleLength\", 28);\n handleSubmit();\n }}\n testID=\"not-sure-button\"\n >\n NOT SURE\n \n \n \n \n )}\n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n content: {\n flex: 1,\n alignItems: \"center\",\n padding: 16,\n },\n iconContainer: {\n marginTop: 20,\n marginBottom: 16,\n },\n iconBackground: {\n width: 80,\n height: 80,\n borderRadius: 40,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n marginTop: 16,\n marginBottom: 40,\n textAlign: \"center\",\n },\n scrollContainer: {\n height: 300,\n width: \"100%\",\n alignItems: \"center\",\n position: \"relative\",\n },\n scrollView: {\n width: \"100%\",\n height: 300,\n },\n fadeTop: {\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n height: 120,\n backgroundColor: \"rgba(255,255,255,0.9)\",\n zIndex: 1,\n pointerEvents: \"none\",\n },\n fadeBottom: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n height: 120,\n backgroundColor: \"rgba(255,255,255,0.9)\",\n zIndex: 1,\n pointerEvents: \"none\",\n },\n selectionIndicator: {\n position: \"absolute\",\n left: \"10%\",\n right: \"10%\",\n height: 60,\n top: 120,\n borderTopWidth: 1,\n borderBottomWidth: 1,\n borderColor: \"#e0e0e0\",\n zIndex: 0,\n pointerEvents: \"none\",\n },\n cycleOption: {\n width: \"100%\",\n height: 60,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n emptyOption: {\n width: \"100%\",\n height: 60,\n },\n selectedOption: {\n // Visual indicator for selected option\n },\n cycleOptionText: {\n fontSize: 18,\n color: \"#777\",\n },\n selectedOptionText: {\n fontSize: 20,\n fontWeight: \"bold\",\n color: \"#333\",\n },\n buttonContainer: {\n width: \"100%\",\n marginTop: \"auto\",\n paddingBottom: 20,\n },\n nextButton: {\n paddingVertical: 12,\n paddingHorizontal: 32,\n marginTop: 16,\n borderRadius: 8,\n width: \"80%\",\n alignSelf: \"center\",\n },\n notSureButton: {\n alignItems: \"center\",\n padding: 16,\n marginTop: 12,\n },\n notSureText: {\n fontSize: 16,\n color: \"#777\",\n },\n});\n\nexport default MenstrualCycleSpacingScreen;\n","import { Text } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Dimensions, StyleSheet, View } from \"react-native\";\nimport Svg, { Circle, Text as SvgText } from \"react-native-svg\";\n\nexport interface MenstrualCycleDiagramProps {\n numberOfDaysInCycle: number;\n numberOfMenstruationDays: number;\n currentDayInCycle: number;\n daysUntilNextPeriod: number;\n}\n\nconst MenstrualCycleDiagram: React.FC = ({\n numberOfDaysInCycle = 28,\n numberOfMenstruationDays = 5,\n currentDayInCycle = 1,\n daysUntilNextPeriod = null,\n}) => {\n const { t } = useTranslation();\n\n const { width } = Dimensions.get(\"window\");\n const size = width * 0.7; // 80% of screen width\n const strokeWidth = size / 20; // Thinner stroke for a cleaner look\n const radius = size / 2 - strokeWidth / 2; // Ensure the radius accounts for stroke width\n const circleCircumference = 2 * Math.PI * radius;\n const notchPosition = 270; // Position in degrees\n const notchSize = 0.05 * circleCircumference; // Size of the notch\n\n // Smaller indicator for menstruation start\n const menstruationCircleSize = strokeWidth / 3;\n const menstruationCirclePosition = 0; // Position in degrees\n\n // Calculate the position of the menstruation circle\n const menstruationCircleX = size / 2 + radius * Math.cos((menstruationCirclePosition - 90) * (Math.PI / 180));\n const menstruationCircleY = size / 2 + radius * Math.sin((menstruationCirclePosition - 90) * (Math.PI / 180));\n\n // Calculate the size and offset of the menstruation segment\n const menstruationSegmentSize = (numberOfMenstruationDays / numberOfDaysInCycle) * circleCircumference;\n const menstruationSegmentOffset = -circleCircumference * ((menstruationCirclePosition - 90) / 360);\n\n // Calculate the position of the fertile window circle and segment\n const numberOfFertileWindowDays = 6;\n const startDayOfFertileWindow = 8;\n const fertileWindowStartAngle = (startDayOfFertileWindow * 360) / numberOfDaysInCycle - 90;\n const fertileWindowCircleOffset = -circleCircumference * (fertileWindowStartAngle / 360);\n const fertileWindowSegmentSize = (numberOfFertileWindowDays / numberOfDaysInCycle) * circleCircumference;\n\n // Calculate the position of the ovulation circle\n const ovulationDay = 13;\n const ovulationCircleSize = strokeWidth / 3; // Smaller ovulation indicator\n const ovulationCirclePosition = (ovulationDay * 360) / numberOfDaysInCycle - 90;\n\n const ovulationCircleX = size / 2 + radius * Math.cos(ovulationCirclePosition * (Math.PI / 180));\n const ovulationCircleY = size / 2 + radius * Math.sin(ovulationCirclePosition * (Math.PI / 180));\n\n // Calculate the position of the current day of cycle circle\n const currentDayOfCycleAngle = currentDayInCycle * (360 / numberOfDaysInCycle);\n const currentDayOfCycleCircleSize = strokeWidth * 1.5; // Slightly larger for better visibility\n\n const currentDayOfCycleCircleX = size / 2 + radius * Math.cos((currentDayOfCycleAngle - 90) * (Math.PI / 180));\n const currentDayOfCycleCircleY = size / 2 + radius * Math.sin((currentDayOfCycleAngle - 90) * (Math.PI / 180));\n\n // Function to generate day markers around the circle\n const generateDayMarkers = (): JSX.Element[] => {\n const markers = [];\n for (let i = 1; i <= numberOfDaysInCycle; i += 1) {\n const angle = i * (360 / numberOfDaysInCycle) - 90;\n const markerX = size / 2 + (radius + strokeWidth / 2 + 5) * Math.cos(angle * (Math.PI / 180));\n const markerY = size / 2 + (radius + strokeWidth / 2 + 5) * Math.sin(angle * (Math.PI / 180));\n\n markers.push();\n }\n return markers;\n };\n\n return (\n \n \n {/* Base circle - lighter gray */}\n \n\n {/* Day markers around the circle */}\n {generateDayMarkers()}\n\n {/* Menstruation Segment - lighter pink */}\n \n\n {/* Menstruation Start Circle - red dot */}\n \n\n {/* Fertile Window Segment - lighter blue */}\n \n\n {/* Fertile day indicator - blue droplet */}\n \n\n {/* Current Day of Cycle Circle - clean white circle with subtle border */}\n \n\n {/* Day number - centered and clean */}\n \n {currentDayInCycle}\n \n \n\n {/* Text inside the donut - simplified to match Clue */}\n \n {daysUntilNextPeriod !== null && daysUntilNextPeriod !== undefined && (\n \n {daysUntilNextPeriod}{\" \"}\n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.days_until_your_next_period\")}\n \n )}\n\n {/* NOTE: We do not currently shown this */}\n {/* Potential fertile day text\n {currentDayInCycle >= startDayOfFertileWindow &&\n currentDayInCycle <= startDayOfFertileWindow + numberOfFertileWindowDays && (\n {t(\"Potential fertile day\")}\n )} */}\n \n \n );\n};\n\nconst styles = StyleSheet.create({\n chartContainer: {\n alignItems: \"center\",\n justifyContent: \"center\",\n paddingTop: 40,\n },\n textContainer: {\n position: \"absolute\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"80%\",\n },\n daysUntilText: {\n fontSize: 18,\n fontWeight: \"bold\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n fertileText: {\n fontSize: 14,\n color: \"#80a0ff\",\n textAlign: \"center\",\n },\n});\n\nexport default MenstrualCycleDiagram;\n","import { Ionicons, MaterialCommunityIcons } from \"@expo/vector-icons\";\nimport type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { Button, Image, Text, useTheme, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Dimensions, Linking, SafeAreaView, ScrollView, StyleSheet } from \"react-native\";\nimport { Icon } from \"react-native-elements\";\nimport { useSelector } from \"react-redux\";\n\nimport MenstrualCycleDiagram from \"../../components/MenstrualCycleDiagram\";\nimport { Routes, Scale, VerticalScale } from \"../../constants\";\nimport { HORMONE_HEX_COLOR } from \"../../constants/theme\";\nimport {\n dateOfNextMenstruation,\n getCurrentMenstrualCycleDay,\n getMenstrualCycleProps,\n getNumberOfDaysOfMenstruation,\n getOrganisation,\n} from \"../../helpers/userHelpers\";\nimport { useExternalLink } from \"../../hooks/useExternalLink\";\nimport { onboardingDataSelector } from \"../../slices/onboardingSlice\";\nimport { userSelector } from \"../../slices/userSlice\";\n\ninterface MenstrualCycleDetailsScreenProps {\n navigation: NavigationProp;\n}\n\nconst HELP_ARTICLE_URL_FOR_MENSTRUAL_CYCLE_DETAILS_SCREEN =\n \"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\";\n\nconst MenstrualCycleDetailsScreen: React.FC = ({ navigation }) => {\n const { colors } = useTheme();\n\n const { isLoading, error, openLink } = useExternalLink();\n\n const user = useSelector(userSelector);\n const onboardingData = useSelector(onboardingDataSelector);\n const { t, i18n } = useTranslation();\n\n const organisation = user ? getOrganisation(user) : undefined;\n const logoUri = organisation?.logo;\n\n // Get menstrual cycle props using the helper function\n const menstrualCycleProps = getMenstrualCycleProps(onboardingData);\n\n return (\n \n \n navigation.goBack()}\n tvParallaxProperties={undefined}\n testID=\"back-button\"\n />\n \n \n \n {logoUri ? (\n \n ) : (\n \n )}\n\n \n\n \n \n \n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.personalizedCycleBasedDiets\")}\n \n {\n openLink(HELP_ARTICLE_URL_FOR_MENSTRUAL_CYCLE_DETAILS_SCREEN).catch((err) => {\n console.error(\"Failed to open URL:\", err);\n Sentry.captureException(err);\n });\n }}\n tvParallaxProperties={undefined}\n containerStyle={styles.infoIconContainer}\n />\n \n \n \n \n \n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.lutealPhase\")}\n \n \n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.lutealPhaseDescription\")}\n \n \n \n \n \n \n \n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.follicularPhase\")}\n \n \n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.follicularPhaseDescription\")}\n \n \n \n \n {\n navigation.navigate(Routes.MealTimesScreen);\n }}\n testID=\"menstrualCycleDetailsScreen-nextButton\"\n >\n {t(\"onboarding.onboarding_menstrual_cycle_details_screen.nextButton\")}\n \n \n \n \n \n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n scrollContent: {\n flexGrow: 1,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n content: {\n alignItems: \"center\",\n padding: 16,\n },\n chartContainer: {\n alignItems: \"center\",\n justifyContent: \"center\",\n paddingTop: 40,\n },\n logo: {\n width: 160, // Adjust width as needed\n height: 60, // Adjust height as needed\n marginBottom: 20, // Space between logo and chart\n },\n textContainer: {\n position: \"absolute\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"80%\",\n },\n daysUntilText: {\n fontSize: 18,\n fontWeight: \"bold\",\n textAlign: \"center\",\n marginBottom: 8,\n },\n fertileText: {\n fontSize: 14,\n color: \"#80a0ff\",\n textAlign: \"center\",\n },\n headerText: {\n fontSize: 18,\n fontWeight: \"bold\",\n textAlign: \"center\",\n marginBottom: 16,\n },\n bottomSection: {\n marginTop: 20,\n paddingHorizontal: 16,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n marginBottom: 16,\n paddingHorizontal: 16,\n },\n column: {\n flex: 1,\n padding: 8,\n },\n placeholderImage: {\n width: 100,\n height: 100,\n marginBottom: 8,\n },\n phaseTitle: {\n fontSize: 16,\n fontWeight: \"bold\",\n textAlign: \"left\",\n padding: 8,\n marginBottom: 4,\n borderRadius: 8,\n color: \"#fff\",\n },\n phaseDescription: {\n fontSize: 14,\n textAlign: \"left\",\n color: \"#333\",\n },\n nextButtonContainer: {\n marginTop: 20,\n alignItems: \"center\",\n padding: 16,\n backgroundColor: \"white\",\n },\n nextButton: {\n marginTop: 20,\n paddingVertical: 12,\n paddingHorizontal: 32,\n borderRadius: 8,\n width: \"100%\",\n },\n titleContainer: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n marginTop: 16,\n marginBottom: 16,\n },\n infoIconContainer: {\n marginLeft: 8,\n },\n});\n\nexport default MenstrualCycleDetailsScreen;\n","import type { NavigationProp, ParamListBase } from \"@react-navigation/native\";\nimport { Formik } from \"formik\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView, ScrollView, StyleSheet, Text, View } from \"react-native\";\nimport { Button, CheckBox, Icon, Input, useTheme } from \"react-native-elements\";\nimport * as Yup from \"yup\";\n\nimport { Routes } from \"../../constants\";\n\ninterface RegistrationScreenProps {\n navigation: NavigationProp;\n}\n\nconst RegistrationScreen: React.FC = ({ navigation }) => {\n const { t } = useTranslation();\n const { theme } = useTheme();\n const primaryColor = theme.colors?.primary || \"#4CAF50\";\n\n const validationSchema = Yup.object().shape({\n firstName: Yup.string().required(t(\"onboarding.registration_screen.enter_first_name\")),\n lastName: Yup.string().required(t(\"onboarding.registration_screen.enter_last_name\")),\n email: Yup.string()\n .email(t(\"onboarding.registration_screen.invalid_email\"))\n .required(t(\"onboarding.registration_screen.enter_email\")),\n // FIXME: Link to actual terms\n termsAccepted: Yup.boolean().oneOf([true], t(\"onboarding.registration_screen.accept_terms\")),\n });\n\n return (\n {\n // FIXME: Add logic to actually update the user\n navigation.navigate(Routes.NutritionalPlanScreen);\n }}\n >\n {({ handleSubmit, setFieldValue, values, errors, touched }) => (\n \n \n navigation.goBack()} tvParallaxProperties={undefined} />\n \n \n \n {t(\"onboarding.registration_screen.register_to_get_results\")}\n setFieldValue(\"firstName\", text)}\n containerStyle={styles.inputContainer}\n inputStyle={styles.input}\n errorMessage={errors.firstName && touched.firstName ? errors.firstName : \"\"}\n autoCompleteType={\"off\"}\n />\n setFieldValue(\"lastName\", text)}\n containerStyle={styles.inputContainer}\n inputStyle={styles.input}\n errorMessage={errors.lastName && touched.lastName ? errors.lastName : \"\"}\n autoCompleteType={\"off\"}\n />\n setFieldValue(\"email\", text)}\n keyboardType=\"email-address\"\n containerStyle={styles.inputContainer}\n inputStyle={styles.input}\n errorMessage={errors.email && touched.email ? errors.email : \"\"}\n autoCompleteType={\"off\"}\n />\n \n {t(\"onboarding.registration_screen.accept_terms_prefix\")}\n {/* TODO: Do we need to add a space here? */}\n {}}>\n {t(\"onboarding.registration_screen.terms_and_conditions\")}\n \n \n }\n checked={values.termsAccepted}\n onPress={() => setFieldValue(\"termsAccepted\", !values.termsAccepted)}\n containerStyle={styles.checkboxContainer}\n />\n {errors.termsAccepted && touched.termsAccepted ? (\n {errors.termsAccepted}\n ) : null}\n handleSubmit()}\n />\n \n \n )}\n \n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n header: {\n flexDirection: \"row\",\n alignItems: \"center\",\n padding: 16,\n },\n content: {\n alignItems: \"center\",\n padding: 16,\n paddingBottom: 32,\n },\n title: {\n fontSize: 24,\n fontWeight: \"bold\",\n marginTop: 16,\n textAlign: \"center\",\n marginBottom: 24,\n },\n inputContainer: {\n width: \"100%\",\n marginBottom: 16,\n },\n input: {\n color: \"#333\",\n },\n checkboxContainer: {\n backgroundColor: \"#fff\",\n borderWidth: 0,\n marginBottom: 24,\n width: \"100%\",\n },\n errorText: {\n color: \"red\",\n marginBottom: 16,\n textAlign: \"center\",\n },\n nextButton: {\n paddingVertical: 12,\n paddingHorizontal: 32,\n borderRadius: 8,\n width: \"80%\",\n alignSelf: \"center\",\n },\n});\n\nexport default RegistrationScreen;\n","import { Entypo, Feather, MaterialIcons } from \"@expo/vector-icons\";\nimport isWebview from \"is-ua-webview\";\nimport {\n Box,\n Button,\n Center,\n Heading,\n Image,\n KeyboardAvoidingView,\n PresenceTransition,\n Row,\n Stack,\n Text,\n View as NBView,\n} from \"native-base\";\nimport platform from \"platform-detect\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { View } from \"react-native\";\nimport { ScreenWidth } from \"react-native-elements/dist/helpers\";\nimport { useDispatch } from \"react-redux\";\n\nimport { Images, Scale } from \"../constants\";\nimport { getAppName } from \"../helpers/generalHelpers\";\nimport { AppImage, TroubleInstallingPWAArticleComponent } from \"../helpers/supportHelpers\";\nimport { userSlice } from \"../slices/userSlice\";\nimport styles from \"./LoginScreenStyles\";\n\n// TODO: Make use of automatic install prompt (not available on iOS): beforeinstallprompt\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeinstallprompt_event\n\n// TODO: Use Launch Handler API (Chrome only) to add a magic link token to obviate the need for sign in\n// https://developer.chrome.com/docs/web-platform/launch-handler/\n\n// TODO: On Safari mobile, make a tooltip to show the user how to add the app to the home screen\n// https://stackoverflow.com/a/61974926\n\n// Flow:\n// Android:\n// [In the Instagram browser]\n// - \"tap the 3 dots in the top right corner\"\n// - \"tap 'Open in Chrome'\" (Dutch: \"Openen in Chrome\")\n// - [Detect they are not in the Instagram browser]\n// - \"tap the 3 dots in the top right corner\"\n// - \"tap 'Add to home screen'\" (Dutch: \"Toevoegen aan startscherm\") (\"App installeren\" on safari)\n\nconst appName = getAppName();\n\n/* \n {`areWeInsideAWebview: ${areWeInsideAWebview},\n isiOS: ${isiOS},\n pwa: ${platform.pwa},\n userAgent: ${userAgent}`}\n */\nconst InstallInstructionsBox = (): JSX.Element => {\n const { t } = useTranslation();\n const { userAgent } = navigator;\n const areWeInsideAWebview = isWebview(userAgent);\n const isiOS = platform.ios;\n\n const getInstructionsText = (): string => {\n if (areWeInsideAWebview) {\n if (isiOS) {\n return t(\"pwa_install_screen.box.instagram_instructions_part_1_ios\");\n }\n // Android\n return t(\"pwa_install_screen.box.instagram_instructions_part_1_android\");\n }\n\n // Outside webview (in normal browser)\n if (isiOS) {\n if (platform.chrome) {\n return t(\"pwa_install_screen.box.install_instructions_part_1_ios_chrome\");\n }\n\n // Safari\n return t(\"pwa_install_screen.box.install_instructions_part_1_ios_safari\");\n }\n\n // Android\n return t(\"pwa_install_screen.box.install_instructions_part_1_android\");\n };\n\n const getInstructionsIcon = (): JSX.Element => {\n if (areWeInsideAWebview) {\n if (isiOS) {\n return ;\n }\n // Android\n return ;\n }\n\n // Outside webview (in normal browser)\n if (isiOS) {\n return ;\n }\n return ;\n };\n\n const getInstructionsPart2 = (): string => {\n if (areWeInsideAWebview) {\n if (isiOS) {\n return t(\"pwa_install_screen.box.instagram_instructions_part_2_ios\");\n }\n // Android\n return t(\"pwa_install_screen.box.instagram_instructions_part_2_android_webview\");\n }\n\n // Outside webview (in normal browser)\n if (isiOS) {\n if (platform.chrome) {\n return t(\"pwa_install_screen.box.install_instructions_part_2_ios_chrome\");\n }\n return t(\"pwa_install_screen.box.install_instructions_part_2_ios_safari\");\n }\n\n return t(\"pwa_install_screen.box.install_instructions_part_2_android\");\n };\n\n return (\n \n \n \n \n \n {t(\"pwa_install_screen.box.heading\", { appName })}\n \n \n\n \n \n {/* Tap on */}\n \n {getInstructionsText()}\n \n {/* [SHARE ICON] */}\n {getInstructionsIcon()}\n {/* \"then 'Open in external browser'\" */}\n \n \n {getInstructionsPart2()}\n \n \n \n \n \n );\n};\nconst PWASignupScreen = (): JSX.Element => {\n const { t } = useTranslation();\n const dispatch = useDispatch();\n\n const imageSize = Scale(ScreenWidth * 0.8 * 0.5);\n\n function onSubmitDeferPwaInstallPrompt(): void {\n dispatch(userSlice.actions.deferPwaInstallPrompt());\n }\n\n return (\n \n \n \n \n
\n \n\n \n \n \n\n \n \n \n\n \n \n \n
\n
\n
\n
\n );\n};\n\nexport default PWASignupScreen;\n","import React from \"react\";\nimport { StyleSheet, View } from \"react-native\";\n\nimport { Scale, VerticalScale } from \"../constants\";\nimport type { RecipeMacrosItemType } from \"../types\";\nimport MacroProgressWidget from \"./RecipeMacrosItem\";\n\nconst styles = StyleSheet.create({\n horizontalMode: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n backgroundColor: \"white\",\n paddingHorizontal: Scale(10),\n paddingVertical: VerticalScale(12),\n },\n verticalMode: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n backgroundColor: \"white\",\n paddingHorizontal: Scale(10),\n paddingVertical: VerticalScale(12),\n // borderColor: Colors.grayBorder,\n borderWidth: 1,\n borderRadius: 8,\n borderStyle: \"solid\",\n },\n transformStyle: {\n transform: [{ rotateZ: \"-3deg\" }],\n },\n});\n\ntype RecipeMacrosProps = {\n RecipeMacrosItems: RecipeMacrosItemType[];\n isTransformed?: boolean;\n verticalMode?: boolean;\n showLabel?: boolean;\n showUnits?: boolean;\n};\n\nconst RecipeMacros = ({\n RecipeMacrosItems,\n verticalMode,\n isTransformed,\n showLabel = true,\n showUnits = true,\n}: RecipeMacrosProps): JSX.Element => (\n \n {RecipeMacrosItems.map((statusItem, index) => (\n \n ))}\n
\n);\nexport default RecipeMacros;\n","import { StyleSheet } from \"react-native\";\n\nimport { Scale, VerticalScale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n titleContainer: {\n marginTop: VerticalScale(17),\n },\n titleInputContainer: {\n width: VerticalScale(47),\n height: VerticalScale(47),\n padding: 5,\n alignItems: \"center\",\n borderWidth: 1,\n borderRadius: 8,\n // borderColor: Colors.borderColor,\n },\n titleInputWrapper: {\n flex: 1,\n marginLeft: Scale(6),\n },\n addIngredientsContainer: {\n marginTop: VerticalScale(47),\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n },\n recipeImg: {\n width: Scale(35),\n height: Scale(35),\n borderRadius: 8,\n },\n modalButtonContainer: {\n marginTop: VerticalScale(48),\n },\n});\n\nexport default styles;\n","import { StyleSheet } from \"react-native\";\n\nimport { commonStyles, Scale, VerticalScale, width } from \"../constants\";\n\nconst styles = StyleSheet.create({\n imgViewContainer: {\n width,\n height: width,\n justifyContent: \"center\",\n alignItems: \"center\",\n },\n defaultImgContainer: {\n width: width * 0.7,\n height: width * 0.7,\n },\n imgContainer: {\n width,\n height: width,\n },\n imgContainerDesktop: {\n width,\n height: 400,\n },\n closeIconContaier: {\n position: \"absolute\",\n zIndex: 1000,\n right: Scale(16),\n top: VerticalScale(60),\n },\n closeIcon: {\n width: Scale(32),\n height: Scale(32),\n },\n editIconContaier: {\n // position: \"absolute\",\n // zIndex: 1000,\n // right: Scale(16),\n // top: VerticalScale(60),\n },\n editIcon: {\n width: Scale(32),\n height: Scale(32),\n },\n favouriteIconContainer: {\n position: \"absolute\",\n zIndex: 1000,\n right: Scale(16),\n bottom: VerticalScale(10),\n },\n prepTimeContainer: {\n display: \"flex\",\n alignItems: \"center\",\n flexDirection: \"row\",\n marginTop: VerticalScale(32),\n },\n clockIcon: {\n width: Scale(15),\n height: Scale(15),\n marginRight: Scale(6),\n },\n titleText: {\n marginTop: VerticalScale(8),\n marginBottom: VerticalScale(24),\n },\n recipeMacrosContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n },\n tabViewContainer: {\n marginTop: VerticalScale(35),\n },\n ingredientRow: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginVertical: VerticalScale(8),\n },\n addIngredientBtn: {\n backgroundColor: \"#FFF\",\n borderRadius: 8,\n // borderColor: Colors.disableButton,\n borderWidth: 1,\n borderStyle: \"solid\",\n width: width - Scale(48),\n },\n stepContainer: {\n marginVertical: VerticalScale(8),\n flexDirection: \"row\",\n alignItems: \"center\",\n marginRight: Scale(15),\n },\n tipContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n // backgroundColor: Colors.tipColor,\n paddingVertical: VerticalScale(13),\n paddingHorizontal: Scale(12),\n },\n tipIcon: { width: Scale(24), height: Scale(24), marginRight: Scale(12) },\n noteOnRecipe: {\n paddingHorizontal: Scale(15),\n paddingVertical: Scale(12),\n borderWidth: 1,\n // borderColor: Colors.disableButton,\n marginTop: VerticalScale(30),\n },\n helpfulMessageContainer: {\n marginTop: VerticalScale(16),\n padding: Scale(12),\n backgroundColor: \"#E6F7FF\", // Light blue color\n borderRadius: 8,\n },\n helpfulMessageText: {\n ...commonStyles.bodyText14,\n color: \"#0066CC\", // Dark blue color\n },\n});\n\nexport default styles;\n","import { Ionicons, MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport _ from \"lodash\";\nimport { Button, Icon, IconButton, Input, Spinner, useTheme, View } from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { TFunction, useTranslation } from \"react-i18next\";\nimport type { ViewStyle } from \"react-native\";\nimport {\n ActivityIndicator,\n Image,\n ScrollView,\n StyleProp,\n Text,\n TouchableOpacity,\n useWindowDimensions,\n} from \"react-native\";\nimport { NavigationState, Route, SceneRendererProps, TabBar } from \"react-native-tab-view\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { CommonNumberInputWithPlusMinusButtons, CommonStepIndex } from \"../commons\";\nimport MacroProgressWidget from \"../components/RecipeMacrosItem\";\nimport { commonStyles, Images, IS_MOBILE_PLATFORM, isDesktopScreen, Routes, Scale, VerticalScale } from \"../constants\";\nimport { MACRO_NAMES } from \"../constants/data\";\nimport { HORMONE_HEX_COLOR } from \"../constants/theme\";\nimport { getPlannerData } from \"../helpers/diaryHelpers\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport {\n createIngredientDescriptionComponent,\n getServingDescriptionText,\n isInstagramExternalSource,\n} from \"../helpers/foodHelpers\";\nimport {\n formatMealType,\n formatNumberAsDecimal,\n formatNumberAsWholeNumber,\n getRecipeMealImage,\n openURL,\n} from \"../helpers/generalHelpers\";\nimport { getDislikedRecipe, getFavouritedRecipe } from \"../helpers/userHelpers\";\nimport { useExternalLink } from \"../hooks/useExternalLink\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n Food,\n GeneratedRecipeMeal,\n GeneratedRecipeMealIngredient,\n Ingredient,\n IngredientPostRequest,\n RecipeMeal,\n SuggestedServing,\n UserFavouriteRecipe,\n} from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport {\n userDislikeRecipesSelector,\n userFavouriteRecipesSelector,\n userSelector,\n userSlice,\n viewAsUserSelector,\n} from \"../slices/userSlice\";\nimport type { MacroName, RecipeMacrosItemType } from \"../types\";\nimport styles from \"./RecipeDetailScreenStyle\";\n\nconst {\n useUsersUserfavouriterecipeCreateMutation,\n useUsersUserdislikerecipeCreateMutation,\n useUsersUserfavouriterecipeDestroyMutation,\n useUsersUserdislikerecipeDestroyMutation,\n useUsersUserfavouriterecipeListQuery,\n useUsersUserdislikerecipeListQuery,\n useFoodIngredientPartialUpdateMutation,\n useFoodRecipeMealRetrieveQuery,\n useFoodIngredientCreateMutation,\n useFoodIngredientDestroyMutation,\n useFoodRecipeMealPartialUpdateMutation,\n useFoodRecipeTemplatePartialUpdateMutation,\n usePlannerEditRecipeMealPortionsUpdateMutation,\n} = backendApi;\n\ntype GeneratedOrRealIngredient = GeneratedRecipeMealIngredient | Ingredient;\n\nconst areIngredientsEqual = (a: GeneratedOrRealIngredient, b: GeneratedOrRealIngredient): boolean => {\n if (\"modified\" in a && \"modified\" in b) {\n // Ingredient, not GeneratedRecipeMealIngredient\n return a.id === b.id && a.modified === b.modified;\n }\n\n if (a.quantity !== b.quantity) {\n return false;\n }\n\n if (a.suggested_serving !== b.suggested_serving) {\n return false;\n }\n\n return true;\n};\n\ntype IngredientComponentProps = {\n ingredientIndex: number;\n ingredient: GeneratedRecipeMealIngredient | Ingredient;\n portions: number;\n editable: boolean;\n onEditIngredientQuantity?: (ingredient: Ingredient, quantity: number) => Promise;\n t: TFunction;\n quantityInputState: string;\n setQuantityInputState: (value: string) => void;\n onPressIngredientSwapButton: () => void;\n isLoading: boolean;\n};\nexport const IngredientComponent = ({\n ingredientIndex,\n ingredient,\n portions,\n editable,\n onEditIngredientQuantity,\n t,\n quantityInputState,\n setQuantityInputState,\n onPressIngredientSwapButton,\n isLoading,\n}: // NOTE: This is not in scope for the initial release\n// onSwapIngredient: () => void\nIngredientComponentProps): JSX.Element => {\n const theme = useTheme();\n\n const user = useSelector(userSelector);\n\n if (!ingredient.suggested_serving) {\n throw new Error(\"Suggested serving is missing\");\n }\n\n const getIndividualMacroForDisplay = (value: number): string =>\n formatNumberAsWholeNumber(value * ingredient.quantity);\n\n const kcalDescription = `${getIndividualMacroForDisplay(ingredient.suggested_serving.kcal)} ${t(\"general.kcal\")}`;\n const proteinDescription = `${getIndividualMacroForDisplay(ingredient.suggested_serving.protein)}g ${t(\n \"general.protein\"\n )}`;\n const macrosDescription = `${kcalDescription}, ${proteinDescription}`;\n\n const { servingInGrams, nonEditableDescription, ingredientInGrams, isServingInGrams } = getServingDescriptionText(\n ingredient.suggested_serving,\n ingredient\n );\n\n const onBlurIngredientInput = async (): Promise => {\n if (!quantityInputState) {\n // NOTE: An empty string means there has been no change\n return;\n }\n\n const quantity = parseFloat(quantityInputState.replace(\",\", \".\"));\n\n if (Number.isNaN(quantity)) {\n alert(t(\"recipe_detail.ingredient_quantity_input.not_a_number_error_text\"));\n return;\n }\n\n if (quantity === 0) {\n alert(t(\"recipe_detail.ingredient_quantity_input.delete_with_delete_button_error_text\"));\n return;\n }\n\n // TODO: we only edit RecipeMeals, not GeneratedRecipeMeals so\n // ingredient not of type GeneratedRecipeMealIngredient\n // It would be good if we could enforce a type check when this screen loads\n if (!onEditIngredientQuantity) throw new Error(\"onEditIngredientQuantity undefined\");\n\n await onEditIngredientQuantity(ingredient as Ingredient, quantity);\n };\n\n const onPressDeleteIngredient = async (): Promise => {\n if (!onEditIngredientQuantity) {\n throw new Error(\"onEditIngredientQuantity undefined\");\n }\n await onEditIngredientQuantity(ingredient as Ingredient, 0);\n };\n\n return (\n \n \n \n {ingredient.name}\n \n \n {macrosDescription}\n \n \n\n \n {/* NOTE: This is currently not in scope */}\n {/* */}\n {editable ? (\n <>\n setQuantityInputState(text.replace(\",\", \".\"))}\n InputRightElement={\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n onPress={onPressDeleteIngredient}\n testID={`ingredient-${ingredientIndex}-delete-button`}\n />\n }\n InputLeftElement={\n \n }\n />\n {createIngredientDescriptionComponent(ingredient, theme, user)}\n \n ) : (\n \n {nonEditableDescription}\n \n )}\n \n \n );\n};\n\nexport const MemoizedIngredientComponent = React.memo(IngredientComponent, (prevProps, nextProps): boolean =>\n areIngredientsEqual(prevProps.ingredient, nextProps.ingredient)\n);\n\ntype MealForEditScreenBase = GeneratedRecipeMeal | RecipeMeal;\ntype MealForEditScreen = MealForEditScreenBase & {\n portions_to_plan?: number;\n};\n\ntype IngredientsRouteProps = {\n editable: boolean;\n portionsEditable: boolean;\n bufferedRecipeMeal: MealForEditScreen;\n onEditPortions: (portions: number) => Promise;\n onEditIngredientQuantity: (ingredient: Ingredient, quantity: number) => Promise;\n handleAddIngredient: () => void;\n handleEditIngredient: (ingredient: Ingredient) => void;\n showLoading: boolean;\n};\n\nconst IngredientsRoute = ({\n editable,\n portionsEditable,\n bufferedRecipeMeal,\n onEditPortions,\n onEditIngredientQuantity,\n handleAddIngredient,\n handleEditIngredient,\n showLoading,\n}: IngredientsRouteProps): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n\n const [allIngredientQuantityInputState, setAllIngredientQuantityInputState] = useState<{\n [ingredientIndex: number]: string;\n }>({});\n\n return (\n // NOTE: Not implemented yet\n // const onSwapIngredient = (): void => {\n // navigation.push(Routes.FoodSearchScreen, {\n // searchBarTitle: \"Search for replacement\",\n // });\n // };\n\n \n \n \n {t(\"recipe_detail.number_of_people_title\")}\n \n\n {portionsEditable ? (\n \n ) : (\n \n {bufferedRecipeMeal.portions_to_plan || bufferedRecipeMeal.portions}\n \n )}\n \n\n \n {t(\"recipe_detail.ingredients_tab_title\")}\n \n\n \n {/* NOTE: I think the props code is correct (and VSCode correctly picks it up)\n but eslint on the command line throws an error */}\n {/* eslint-disable-next-line react/prop-types */}\n {bufferedRecipeMeal?.ingredients.map((ingredient, ingredientIndex) => {\n const quantityInputState = allIngredientQuantityInputState[ingredientIndex] || \"\";\n\n const setQuantityInputState = (newQuantityInputState: string): void => {\n setAllIngredientQuantityInputState({\n ...allIngredientQuantityInputState,\n [ingredientIndex]: newQuantityInputState,\n });\n };\n\n return (\n // TODO: Memoize this but be careful with the input state\n handleEditIngredient(ingredient as Ingredient),\n isLoading: showLoading,\n }}\n />\n );\n })}\n \n\n {editable ? (\n \n {`+ ${t(\n \"recipe_detail.add_an_ingredient_button_text\"\n )}`}\n \n ) : null}\n \n );\n};\n\nconst areIngredientsArrayEqual = (\n ingredientsA: GeneratedRecipeMealIngredient[] | Ingredient[],\n ingredientsB: GeneratedRecipeMealIngredient[] | Ingredient[]\n): boolean => {\n if (ingredientsA.length !== ingredientsB.length) {\n return false;\n }\n\n return _.every(ingredientsA, (ingredientA: GeneratedRecipeMealIngredient | Ingredient, ingredientIndex: number) => {\n const ingredientB = ingredientsB[ingredientIndex];\n\n if (!ingredientB) return false;\n\n return areIngredientsEqual(ingredientA, ingredientB);\n });\n};\n\n// NOTE: There still appear to be some additional re-renders despite the use of React.memo.\nconst MemoizedIngredientsRoute = React.memo(\n IngredientsRoute,\n (prevProps, nextProps) =>\n // NOTE: This is because `id` does not exist on GeneratedRecipeMeal\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n prevProps.bufferedRecipeMeal.id &&\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n prevProps.bufferedRecipeMeal.id === nextProps.bufferedRecipeMeal.id &&\n (prevProps.bufferedRecipeMeal.portions_to_plan || prevProps.bufferedRecipeMeal.portions) ===\n (nextProps.bufferedRecipeMeal.portions_to_plan || nextProps.bufferedRecipeMeal.portions) &&\n areIngredientsArrayEqual(prevProps.bufferedRecipeMeal.ingredients, nextProps.bufferedRecipeMeal.ingredients)\n);\n\ntype Props = NativeStackScreenProps;\nconst RecipeDetailScreen = ({\n navigation,\n route: {\n params: {\n recipeMeal,\n mealSlotSpecification,\n onSelect,\n viewOnly = false,\n editable = false,\n recipeTemplateEditable = false,\n portionsEditable = false,\n },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n // TODO: This is commented out because it is not implemented yet\n // const [searchText, setSearchText] = useState(\"\");\n // const [, setSelectedCategory] = useState();\n // const [, setModalVisible] = useState(false);\n\n const theme = useTheme();\n\n const dispatch = useDispatch();\n // TODO: This should be removed to avoid potential errors but it is working at the moment\n const viewAsUser = useSelector(viewAsUserSelector);\n const realUser = useSelector(userSelector);\n const user = viewAsUser || realUser;\n\n const favouritedRecipes = useSelector(userFavouriteRecipesSelector);\n const dislikedRecipes = useSelector(userDislikeRecipesSelector);\n\n const layout = useWindowDimensions();\n const isDesktop = isDesktopScreen();\n const recipeTemplate = recipeMeal.recipe_template;\n\n let userFavouriteRecipe: UserFavouriteRecipe | undefined;\n let userDislikeRecipe: UserFavouriteRecipe | undefined;\n\n if (!recipeTemplate.id) {\n logger.error(\"Recipe template id is missing for recipeMeal:\", recipeMeal);\n } else {\n userFavouriteRecipe = getFavouritedRecipe(favouritedRecipes, recipeTemplate.id);\n\n userDislikeRecipe = getDislikedRecipe(dislikedRecipes || [], recipeTemplate.id);\n }\n\n // eslint-disable-next-line no-prototype-builtins\n if (editable && !recipeMeal.hasOwnProperty(\"id\")) {\n throw new Error(\"Tried to display not editable recipe details in edit mode\");\n }\n\n const [index, setIndex] = useState(0);\n\n if (!user) {\n throw new Error(\"user is undefined\");\n }\n\n const {\n isFetching: isLoadingUserFavoriteRecipe,\n data: paginatedUserFavouriteRecipeList,\n error: errorUserFavouriteRecipeList,\n refetch: refetchUserFavouriteRecipeList,\n } = useUsersUserfavouriterecipeListQuery({\n user: user.id,\n recipe: recipeTemplate.id,\n });\n\n const {\n isFetching: isLoadingUserDislikeRecipe,\n data: paginatedUserDislikeRecipeList,\n error: errorUserDislikeRecipeList,\n refetch: refetchUserDislikeRecipeList,\n } = useUsersUserdislikerecipeListQuery({\n user: user.id,\n recipe: recipeTemplate.id,\n });\n\n const [deleteUserFavouriteRecipeOnBackend, { isLoading: isLoadingFavDelete }] =\n useUsersUserfavouriterecipeDestroyMutation();\n const [createNewUserFavouriteRecipe, { isLoading: isLoadingFavCreate }] = useUsersUserfavouriterecipeCreateMutation();\n const [deleteUserDislikeRecipeOnBackend, { isLoading: isLoadingDislikeDelete }] =\n useUsersUserdislikerecipeDestroyMutation();\n const [createNewUserDislikeRecipe, { isLoading: isLoadingDislikeCreate }] = useUsersUserdislikerecipeCreateMutation();\n\n const [updateRecipeMealIngredient, { isLoading: isLoadingIngredientUpdate }] =\n useFoodIngredientPartialUpdateMutation();\n const [updateRecipeMeal, { isLoading: isLoadingRecipeMealUpdate }] = useFoodRecipeMealPartialUpdateMutation();\n const { refetchCalendarDays } = getPlannerData();\n const [createIngredient, { isLoading: isLoadingIngredientCreate }] = useFoodIngredientCreateMutation();\n const [deleteIngredient, { isLoading: isLoadingIngredientDelete }] = useFoodIngredientDestroyMutation();\n const [updateRecipeTemplate, { isLoading: isLoadingRecipeTemplateUpdate }] =\n useFoodRecipeTemplatePartialUpdateMutation();\n const [updateRecipeMealPortions, { isLoading: isLoadingUpdateRecipeMealPortions }] =\n usePlannerEditRecipeMealPortionsUpdateMutation();\n\n // TODO: rename\n const [bufferedRecipeMeal, setBufferedRecipeMeal] = useState(recipeMeal);\n\n const isAuserGeneratedMeal = bufferedRecipeMeal.recipe_template.source_provider === \"USER_GENERATED\";\n\n const DUTCH_MIGRATED_LEGACY_MEAL_DIRECTION = \"Zelfgemaakte maaltijd\";\n const ENGLISH_MIGRATED_LEGACY_MEAL_DIRECTION = \"Self-created meal\";\n\n const isMigratedLegacyMeal =\n _.size(bufferedRecipeMeal.directions) === 1 &&\n [DUTCH_MIGRATED_LEGACY_MEAL_DIRECTION, ENGLISH_MIGRATED_LEGACY_MEAL_DIRECTION].includes(\n bufferedRecipeMeal.directions?.[0]?.text || \"\"\n );\n\n const hasDirections = !_.isEmpty(bufferedRecipeMeal.directions);\n\n const shouldShowPreparationSteps = hasDirections && !isMigratedLegacyMeal;\n\n const {\n isFetching: isLoadingRecipeMealQuery,\n error: errorRetrievingRecipeMeal,\n data: recipeMealOnBackend,\n refetch: refetchRecipeMeal,\n } = useFoodRecipeMealRetrieveQuery(\n // TODO: How can we legitimately define a hook when bufferedRecipeMeal may not\n // have an id\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n { id: bufferedRecipeMeal.id },\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n { skip: !bufferedRecipeMeal.id }\n );\n\n const shouldShowLoadingSpinner =\n isLoadingFavDelete ||\n isLoadingFavCreate ||\n isLoadingDislikeDelete ||\n isLoadingDislikeCreate ||\n isLoadingIngredientUpdate ||\n isLoadingRecipeMealUpdate ||\n isLoadingIngredientCreate ||\n isLoadingIngredientDelete ||\n isLoadingRecipeMealQuery ||\n isLoadingRecipeTemplateUpdate ||\n isLoadingUserFavoriteRecipe ||\n isLoadingUserDislikeRecipe ||\n isLoadingUpdateRecipeMealPortions;\n\n useEffect(() => {\n if (recipeMealOnBackend && recipeMealOnBackend.id) {\n setBufferedRecipeMeal(recipeMealOnBackend);\n }\n }, [recipeMealOnBackend]);\n\n useEffect(() => {\n if (!isLoadingUserFavoriteRecipe && !errorUserFavouriteRecipeList && recipeTemplate.id) {\n if (\n paginatedUserFavouriteRecipeList &&\n paginatedUserFavouriteRecipeList.results &&\n paginatedUserFavouriteRecipeList.results[0]\n ) {\n dispatch(\n userSlice.actions.storeUserFavouriteRecipe({\n [recipeTemplate.id]: paginatedUserFavouriteRecipeList.results[0],\n })\n );\n } else {\n dispatch(userSlice.actions.deleteUserFavouriteRecipe({ recipeTemplateId: recipeTemplate.id }));\n }\n }\n }, [paginatedUserFavouriteRecipeList]);\n\n useEffect(() => {\n if (!isLoadingUserDislikeRecipe && !errorUserDislikeRecipeList && recipeTemplate.id) {\n if (\n paginatedUserDislikeRecipeList &&\n paginatedUserDislikeRecipeList.results &&\n paginatedUserDislikeRecipeList.results[0]\n ) {\n dispatch(\n userSlice.actions.storeUserDislikeRecipe({\n [recipeTemplate.id]: paginatedUserDislikeRecipeList.results[0],\n })\n );\n } else {\n dispatch(userSlice.actions.deleteUserDislikeRecipe({ recipeTemplateId: recipeTemplate.id }));\n }\n }\n }, [paginatedUserDislikeRecipeList]);\n\n const refreshRecipeMealData = (): void => {\n // NOTE: refetching calendar data is an expensive operation to do for simply updating a recipeMeal,\n // but we do it for now and can rethink this later if there is a performance issue\n refetchRecipeMeal();\n refetchCalendarDays(); // TODO: do we need invalidate anything before doing this?\n };\n\n const onEditPortions = async (portions: number): Promise => {\n if (!(bufferedRecipeMeal as RecipeMeal).id || !portionsEditable) {\n setBufferedRecipeMeal({ ...bufferedRecipeMeal, portions_to_plan: portions });\n return;\n }\n\n await updateRecipeMealPortions({\n id: String((bufferedRecipeMeal as RecipeMeal).id),\n recipeMealPotionsRequest: {\n portions,\n },\n });\n\n refreshRecipeMealData();\n };\n\n const onEditIngredientQuantity = async (ingredient: Ingredient, quantity: number): Promise => {\n if (!ingredient.id || !editable) {\n throw new Error(\"Tried to edit a non editable Ingredient or GeneratedRecipeMealIngredient\");\n }\n\n if (isLoadingRecipeMealQuery) {\n logger.warn(\"Tried to edit an ingredient quantity while recipeMeal is still loading\");\n return;\n }\n\n if (!quantity) {\n await deleteIngredient({ id: ingredient.id });\n } else {\n await updateRecipeMealIngredient({\n id: ingredient.id,\n patchedIngredientRequest: {\n quantity: Math.round(quantity * 20) / 20,\n },\n });\n }\n\n refreshRecipeMealData();\n };\n\n const onFavouriteButtonPress = async (): Promise => {\n if (!isLoadingUserFavoriteRecipe) {\n if (recipeTemplate.id) {\n if (userFavouriteRecipe) {\n await deleteUserFavouriteRecipeOnBackend({ id: userFavouriteRecipe.id }).unwrap();\n } else {\n await createNewUserFavouriteRecipe({\n userFavouriteRecipeRequest: { recipe: recipeTemplate.id, user: user.id },\n }).unwrap();\n }\n refetchUserFavouriteRecipeList();\n }\n }\n };\n\n const onDislikeButtonPress = async (): Promise => {\n if (!isLoadingUserDislikeRecipe) {\n if (recipeTemplate.id) {\n if (userDislikeRecipe) {\n await deleteUserDislikeRecipeOnBackend({ id: userDislikeRecipe.id }).unwrap();\n } else {\n await createNewUserDislikeRecipe({\n userDislikeRecipeRequest: { recipe: recipeTemplate.id, user: user.id },\n }).unwrap();\n }\n refetchUserDislikeRecipeList();\n }\n }\n };\n\n const onCloseBtn = (): void => {\n navigation.goBack();\n };\n\n const onChooseProduct = async (\n ingredient: Ingredient | undefined,\n product: Food,\n suggestedServing: SuggestedServing,\n quantity: number\n ): Promise => {\n if (!(bufferedRecipeMeal as RecipeMeal).id || !editable) {\n throw new Error(\"Tried to edit a non editable RecipeMeal or GeneratedRecipeMeal\");\n }\n\n if (!suggestedServing.id) {\n throw new Error(\"Suggested serving is not set\");\n }\n\n const ingredientPostRequest: IngredientPostRequest = {\n quantity,\n object_id: (bufferedRecipeMeal as RecipeMeal).id,\n content_type: \"recipemeal\",\n suggested_serving: suggestedServing.id,\n };\n\n if (ingredient && ingredient.id) {\n // Update the ingredient\n await updateRecipeMealIngredient({\n id: ingredient.id,\n patchedIngredientRequest: {\n quantity,\n suggested_serving: suggestedServing,\n },\n });\n } else {\n await createIngredient({ ingredientPostRequest });\n }\n refreshRecipeMealData();\n navigation.goBack();\n };\n\n const handleAddIngredient = (): void => {\n navigation.push(Routes.AddProductStack, {\n screen: Routes.FoodSearchScreen,\n params: {\n onChoose: async (product, suggestedServing, quantity) =>\n onChooseProduct(undefined, product, suggestedServing, quantity),\n },\n });\n };\n\n const handleEditIngredient = (ingredient: Ingredient): void => {\n if (!editable || !ingredient) {\n throw new Error(\"Tried to edit a non editable Ingredient or GeneratedRecipeMealIngredient\");\n }\n\n navigation.push(Routes.AddProductStack, {\n screen: Routes.AddIngredientScreen,\n params: {\n ingredient,\n onChoose: async (product, suggestedServing, quantity) =>\n onChooseProduct(ingredient, product, suggestedServing, quantity),\n },\n });\n };\n\n const PreparationStepsRoute = (): JSX.Element => (\n \n \n {t(\"recipe_detail.preparation_steps_tab_title\")}\n \n \n {/* NOTE: I think the props code is correct (and VSCode correctly picks it up)\n but eslint on the command line throws an error */}\n {/* eslint-disable-next-line react/prop-types */}\n {bufferedRecipeMeal?.directions?.map((direction, directionIndex) => (\n \n \n \n {direction.text}\n \n \n ))}\n\n {/* TODO: We will need to consider extending the recipe model to\n allow for user tips and user notes on a given recipe */}\n {/* \n \n {t(\"Tip: Add sweetener to taste\")}\n \n \n {\"Note on recipe?\"}\n */}\n \n \n );\n\n const ingredientsListRoute = (\n \n );\n\n const isAUserGeneratedMeal = bufferedRecipeMeal.recipe_template.source_provider === \"USER_GENERATED\";\n\n const createMacroItem = (macroName: MacroName): RecipeMacrosItemType => {\n let progress = bufferedRecipeMeal[macroName];\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (isAUserGeneratedMeal && !bufferedRecipeMeal.id) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n progress = bufferedRecipeMeal.recipe_template[macroName] || 0;\n }\n\n return {\n id: macroName,\n macroName,\n total: mealSlotSpecification[macroName] ?? 0,\n progress,\n unit: macroName === \"kcal\" ? \"kcal\" : \"g\",\n };\n };\n const nutritionalInformationForRecipe = _.map(MACRO_NAMES, createMacroItem);\n\n const [submitted, setSubmitted] = useState(false);\n\n const onEditRecipeTemplate = (): void => {\n navigation.push(Routes.RecipeAddOwnStack, {\n screen: Routes.RecipeAddOwnScreen,\n params: {\n mealSlotSpecification,\n initialRecipeMeal: bufferedRecipeMeal,\n onSave: async () => {\n // Unpublish initial recipe template\n // TODO: while we should have this guard is there a better way to\n // prevent WEEKMEALS recipe templates being unpublished? Could we enforce that better?\n if (\n bufferedRecipeMeal.recipe_template.source_provider === \"USER_GENERATED\" &&\n bufferedRecipeMeal.recipe_template.id\n ) {\n await updateRecipeTemplate({\n id: bufferedRecipeMeal.recipe_template.id,\n patchedRecipeTemplateRequest: {\n published: false,\n },\n }).unwrap();\n }\n },\n },\n });\n };\n const isDefaultImg = getRecipeMealImage(recipeMeal).usedDefaultImage;\n const imageStyle = isDefaultImg ? styles.defaultImgContainer : styles.imgContainer;\n\n const recipeImageComponent = React.useCallback(\n () => (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ),\n [\n bufferedRecipeMeal.recipe_template.id,\n isDesktop,\n isLoadingFavDelete,\n isLoadingUserFavoriteRecipe,\n userFavouriteRecipe,\n isLoadingDislikeDelete,\n isLoadingUserDislikeRecipe,\n userDislikeRecipe,\n ]\n );\n\n const handleInstagramIconPress = (url: string): void => {\n openURL(url);\n };\n\n const { isLoading: isLoadingExternalLink, error: externalLinkError, openLink } = useExternalLink();\n\n const shouldShowHormoneRecipeInfo =\n bufferedRecipeMeal?.recipe_template.tags?.some((tag) => tag.name === \"HORMONE\") &&\n isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES);\n\n const recipeInformationComponent = (\n \n {Boolean(bufferedRecipeMeal?.recipe_template?.preparation_time_min) && (\n \n \n\n \n {bufferedRecipeMeal?.recipe_template.preparation_time_min}m\n \n \n )}\n \n {bufferedRecipeMeal?.recipe_template.name}\n\n {recipeTemplateEditable ? (\n \n \n \n \n \n ) : null}\n \n\n {/* Hormone recipe information */}\n {shouldShowHormoneRecipeInfo ? (\n \n \n \n {t(\"recipe_detail.hormone_recipe_info\")}\n\n {/* FIXME: Later we will add this link when we know what it is */}\n {/* {\n // FIXME: Don't hardcode this\n openLink(\"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\").catch((err) => {\n console.error(\"Failed to open URL:\", err);\n Sentry.captureException(err);\n });\n }}\n testID=\"hormone-info-link\"\n disabled={\n // FIXME: Don't hardcode this\n isLoadingExternalLink === \"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\"\n }\n >\n \n \n {t(\"recipe_detail.learn_more_about_hormones\")}\n \n {isLoadingExternalLink === \"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\" ? (\n \n ) : (\n \n )}\n \n */}\n {/* {externalLinkError ? (\n {externalLinkError}\n ) : null} */}\n \n \n ) : null}\n\n \n {isInstagramExternalSource(bufferedRecipeMeal?.recipe_template?.external_url || \"\") ? (\n handleInstagramIconPress(bufferedRecipeMeal?.recipe_template?.external_url || \"\")}\n leftIcon={}\n variant=\"link\"\n testID=\"instagramButton\"\n >\n {t(\"recipe_detail.view_on_instagram\")}\n \n ) : null}\n \n\n \n {nutritionalInformationForRecipe.map((macroDetail, macroDetailIndex: number) => (\n \n ))}\n \n \n );\n\n const ROW_HEIGHT = 100;\n const calculatedHeight = Math.min(bufferedRecipeMeal.ingredients.length * ROW_HEIGHT, 700);\n\n let ingredientsAndDirectionsTabsComponentStyle: StyleProp = { marginTop: VerticalScale(35) };\n if (IS_MOBILE_PLATFORM) {\n ingredientsAndDirectionsTabsComponentStyle = {\n ...ingredientsAndDirectionsTabsComponentStyle,\n height: isDesktop ? calculatedHeight : undefined,\n };\n }\n\n const ingredientsAndDirectionsTabsComponent = (\n \n {ingredientsListRoute}\n {shouldShowPreparationSteps ? (\n \n \n \n ) : null}\n \n );\n\n const chooseMealComponent = (\n \n \n {\n setSubmitted(true);\n await onSelect(bufferedRecipeMeal.portions_to_plan || 1);\n }}\n isLoading={submitted}\n testID=\"choose-meal\"\n >\n {t(\"recipe_search.choose_for_meal_button_text\", {\n meal: formatMealType(mealSlotSpecification.meal_type, t),\n })}\n \n \n {/* NOTE: This is not yet implemented */}\n {/* {\n navigation.goBack();\n }}\n/> */}\n \n );\n\n return (\n \n \n {recipeImageComponent()}\n {recipeInformationComponent}\n {ingredientsAndDirectionsTabsComponent}\n \n\n {!viewOnly && {chooseMealComponent}}\n \n );\n};\nexport default RecipeDetailScreen;\n","import { AntDesign } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Formik } from \"formik\";\nimport _ from \"lodash\";\nimport {\n AlertDialog,\n Button,\n Center,\n Flex,\n FormControl,\n IconButton,\n Input,\n ScrollView,\n Text,\n useDisclose,\n useTheme,\n View,\n} from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Button as NativeButton, SafeAreaView, View as NativeView } from \"react-native\";\nimport { useSelector } from \"react-redux\";\nimport * as Yup from \"yup\";\n\nimport { CommonModal, CommonPageHeader, CommonPureTextInput } from \"../commons\";\nimport CommonHeaderDivider from \"../commons/CommonHeaderDivider\";\nimport RecipeMacros from \"../components/RecipeMacros\";\nimport { commonStyles, height, Images, isDesktopScreen, Routes, Scale, VerticalScale, width } from \"../constants\";\nimport {\n formatMealType,\n formatMomentAsBackendFormatDateString,\n formatNumberAsWholeNumber,\n isIos,\n} from \"../helpers/generalHelpers\";\nimport type { RecipeAddOwnScreenParams, RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type {\n Ingredient,\n IngredientPost,\n IngredientPostRequest,\n PlannerSaveAndPlanRecipeMealCreateApiArg,\n RecipeTagRequest,\n RecipeTemplate,\n RecipeTemplateRequest,\n SuggestedServing,\n} from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { calendarDaysSelector, currentDayInPlannerSelector } from \"../slices/plannerSlice\";\nimport { userSelector, viewAsUserSelector } from \"../slices/userSlice\";\nimport type { RecipeItemType, RecipeMacrosItemType } from \"../types\";\nimport styles from \"./RecipeAddOwnScreenStyle\";\nimport { IngredientComponent, MemoizedIngredientComponent } from \"./RecipeDetailScreen\";\n\nconst {\n useFoodRecipeTemplateCreateMutation,\n useFoodIngredientCreateMutation,\n useFoodRecipeTemplatePartialUpdateMutation,\n useFoodIngredientDestroyMutation,\n useFoodIngredientPartialUpdateMutation,\n useFoodRecipeTemplateDestroyMutation,\n useFoodCreateRecipeCreateMutation,\n usePlannerSaveAndPlanRecipeMealCreateMutation,\n} = backendApi;\n\ntype Props = NativeStackScreenProps;\n\nconst RecipeAddOwnScreen = ({\n navigation,\n route: {\n params: { mealSlotSpecification, onSave, initialRecipeMeal, submitMessage },\n },\n}: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const [allIngredientQuantityInputState, setAllIngredientQuantityInputState] = useState<{\n [ingredientIndex: number]: string;\n }>({});\n\n const currentDayInPlanner = useSelector(currentDayInPlannerSelector);\n const calendarDaysInStore = useSelector(calendarDaysSelector);\n const currentCalendarDay = calendarDaysInStore[formatMomentAsBackendFormatDateString(currentDayInPlanner)];\n\n const theme = useTheme();\n\n const viewAsUser = useSelector(viewAsUserSelector);\n const realUser = useSelector(userSelector);\n const user = viewAsUser || realUser;\n\n const [newOwnRecipeTemplate, setNewOwnRecipeTemplate] = useState(undefined);\n\n const [createRecipeTemplate] = useFoodRecipeTemplateCreateMutation();\n const [deleteRecipeTemplate, { isLoading: isLoadingDeleteRecipeTemplate }] = useFoodRecipeTemplateDestroyMutation();\n const [updateRecipeTemplate, { isLoading: isLoadingUpdateRecipeTemplate }] =\n useFoodRecipeTemplatePartialUpdateMutation();\n const [updateRecipeTemplateIngredient, { isLoading: isLoadingIngredientUpdate }] =\n useFoodIngredientPartialUpdateMutation();\n const [createNewRecipeTemplateFromExisting, { isLoading: isLoadingCreateRecipeTemplate }] =\n useFoodCreateRecipeCreateMutation();\n const [saveAndPlanRecipeTemplate, { isLoading: isLoadingSaveAndPlanRecipeTemplate }] =\n usePlannerSaveAndPlanRecipeMealCreateMutation();\n\n const [createIngredient] = useFoodIngredientCreateMutation();\n const [deleteIngredient, { isLoading: isLoadingDeleteIngredient }] = useFoodIngredientDestroyMutation();\n const [updateIngredient, { isLoading: isLoadingUpdateIngredient }] = useFoodIngredientPartialUpdateMutation();\n // const [bulkCreateIngredient, { isLoading: isLoadingBulkUpdateIngredient }] = useFoodBulkIngredientCreateMutation();\n\n const [exitModalVisible, setExitModalVisible] = useState(false);\n const { isOpen: isOpenDeleteDialog, onOpen: onOpenDeleteDialog, onClose: onCloseDeleteDialog } = useDisclose();\n\n const cancelRef = React.useRef(null);\n\n const recipeMacrosItems: RecipeMacrosItemType[] = [\n {\n macroName: \"kcal\",\n progress: Number(formatNumberAsWholeNumber(newOwnRecipeTemplate?.kcal || 0)),\n total: Number(formatNumberAsWholeNumber(mealSlotSpecification.kcal || 0)),\n unit: \"kcal\",\n },\n {\n macroName: \"protein\",\n progress: Number(formatNumberAsWholeNumber(newOwnRecipeTemplate?.protein || 0)),\n total: Number(formatNumberAsWholeNumber(mealSlotSpecification.protein || 0)),\n unit: \"g\",\n },\n ];\n\n const handleDeleteRecipeTemplate = async (): Promise => {\n if (initialRecipeMeal && initialRecipeMeal.recipe_template && initialRecipeMeal.recipe_template.id) {\n await updateRecipeTemplate({\n id: initialRecipeMeal.recipe_template.id,\n patchedRecipeTemplateRequest: {\n published: false,\n },\n }).unwrap();\n } else {\n throw new Error(\"\");\n }\n\n onCloseDeleteDialog();\n navigation.pop(2);\n };\n\n const deleteRecipeTemplateModal = (\n \n \n \n \n {t(\"general.dialog_confirmation_question\")}\n \n \n \n {t(\"general.delete\")}\n \n \n \n \n );\n\n const getNewRecipeTemplateNameFromInitialRecipeMeal = (): string => {\n if (!initialRecipeMeal) {\n throw new Error(\"No initial recipe meal was provided\");\n }\n\n return initialRecipeMeal?.recipe_template.source_provider === \"WEEKMEALS\"\n ? t(\"recipe_detail.user_generated_meal_display_name\", { mealName: initialRecipeMeal.recipe_template.name })\n : initialRecipeMeal.recipe_template.name || \"\";\n };\n\n const ownRecipeTemplateSchema = Yup.object().shape({\n name: Yup.string().default(\"\").required(t(\"general.required\")),\n alsoPlanAsMeal: Yup.boolean().default(false),\n });\n\n type OwnRecipeTemplateSchema = Yup.InferType;\n\n const initialValues = ownRecipeTemplateSchema.cast({\n name: initialRecipeMeal ? getNewRecipeTemplateNameFromInitialRecipeMeal() : \"\",\n });\n\n // TODO: To implement\n // const onBarcodeScanButtonPress = (): void => {\n // logger.debug(\"TODO: onBarcodeScanButtonPress\");\n // navigation.navigate(Routes.BarcodeScannerScreen);\n // };\n\n const onCloseButton = (): void => {\n setExitModalVisible(true);\n };\n\n const onSubmit = async (values: OwnRecipeTemplateSchema): Promise => {\n if (newOwnRecipeTemplate && newOwnRecipeTemplate.id) {\n if (values.alsoPlanAsMeal) {\n if (!mealSlotSpecification) {\n throw new Error(\"No meal slot specification was provided\");\n }\n if (!currentCalendarDay?.id) {\n throw new Error(\"No calendar day was provided\");\n }\n\n const payload: PlannerSaveAndPlanRecipeMealCreateApiArg = {\n saveAndPlanRecipeTemplateRequest: {\n id: newOwnRecipeTemplate.id,\n name: values.name,\n calendar_day_id: currentCalendarDay.id,\n meal_slot_id: mealSlotSpecification.id,\n },\n };\n\n if (initialRecipeMeal) {\n // To unpublish the existing (now outdated) RecipeTemplate\n payload.saveAndPlanRecipeTemplateRequest.existing_recipe_template_id = initialRecipeMeal.recipe_template.id;\n }\n\n await saveAndPlanRecipeTemplate(payload);\n } else {\n const recipeTemplate = await updateRecipeTemplate({\n id: newOwnRecipeTemplate.id,\n patchedRecipeTemplateRequest: {\n published: true,\n name: values.name,\n },\n }).unwrap();\n\n await onSave(recipeTemplate, true);\n }\n\n let screensToPop = viewAsUser ? 2 : 3;\n // NOTE: If we are using the \"Create new own recipe\" (as opposed to the create new own recipe from existing) flow\n // then we need to pop an additional screen\n if (viewAsUser && initialRecipeMeal) {\n screensToPop += 1;\n }\n\n // NOTE: This is used instead of navigating directly to DiaryViewScreen\n // because doing that caused errors in cypress tests\n navigation.pop(screensToPop);\n } else {\n throw new Error(\"Error with recipe creation\");\n }\n };\n\n const getOrCreateRecipeTemplate = async ({ name }: { name: string }, publish = false): Promise => {\n let recipeTemplate;\n if (!newOwnRecipeTemplate) {\n if (!user) {\n throw new Error(\"User is not set\");\n }\n\n const tags: RecipeTagRequest[] = [\n {\n name: mealSlotSpecification.meal_type,\n },\n ];\n\n const recipeTemplateRequest: RecipeTemplateRequest = {\n name,\n author: user.id,\n source_provider: \"USER_GENERATED\",\n published: publish,\n tags,\n };\n recipeTemplate = await createRecipeTemplate({\n recipeTemplateRequest,\n }).unwrap();\n } else {\n recipeTemplate = newOwnRecipeTemplate;\n }\n return recipeTemplate;\n };\n\n const addIngredientToRecipeTemplate = async (\n quantity: number,\n recipeTemplate: RecipeTemplate,\n suggestedServing: SuggestedServing | undefined\n ): Promise => {\n if (!recipeTemplate.id) throw new Error(\"RecipeTemplate has no id\");\n if (!suggestedServing || !suggestedServing.id) throw new Error(\"SuggestedServing has no id\");\n\n const ingredientPostRequest: IngredientPostRequest = {\n quantity,\n object_id: recipeTemplate.id,\n content_type: \"recipetemplate\",\n suggested_serving: suggestedServing.id,\n };\n\n const newIngredient = await createIngredient({ ingredientPostRequest }).unwrap();\n return newIngredient;\n };\n\n const updateRecipeTemplateMacros = (recipeTemplate: RecipeTemplate): RecipeTemplate => {\n const kcal = recipeTemplate.ingredients.reduce((acc, ingredient) => {\n if (!ingredient.suggested_serving) return 0;\n\n return acc + ingredient.suggested_serving.kcal * ingredient.quantity;\n }, 0);\n\n const protein = recipeTemplate.ingredients.reduce((acc, ingredient) => {\n if (!ingredient.suggested_serving) return 0;\n return acc + ingredient.suggested_serving.protein * ingredient.quantity;\n }, 0);\n\n const updatedRecipeTemplate = {\n ...recipeTemplate,\n kcal,\n protein,\n };\n\n return updatedRecipeTemplate;\n };\n\n const addOrEditRecipeTemplateIngredient = (\n recipeTemplate: RecipeTemplate,\n updatedOrCreatedIngredient: Ingredient\n ): RecipeTemplate => {\n const updatedIngredients = _.map(\n _.unionBy(recipeTemplate.ingredients, [updatedOrCreatedIngredient], \"id\"),\n (currentIngredient) => {\n if (currentIngredient.id === updatedOrCreatedIngredient.id) {\n return updatedOrCreatedIngredient;\n }\n return currentIngredient;\n }\n );\n\n const updatedRecipeTemplate = {\n ...recipeTemplate,\n ingredients: updatedIngredients,\n };\n return updateRecipeTemplateMacros(updatedRecipeTemplate);\n };\n\n const deleteRecipeTemplateIngredient = (recipeTemplate: RecipeTemplate, ingredientId: number): RecipeTemplate => {\n const updatedIngredients = _.filter(\n recipeTemplate.ingredients,\n (currentIngredient) => currentIngredient.id !== ingredientId\n );\n\n const updatedRecipeTemplate = {\n ...recipeTemplate,\n ingredients: updatedIngredients,\n };\n return updateRecipeTemplateMacros(updatedRecipeTemplate);\n };\n\n const onChooseProduct = async (\n ingredient: Ingredient | undefined,\n suggestedServing: SuggestedServing,\n quantity: number,\n formValues: OwnRecipeTemplateSchema\n ): Promise => {\n const recipeTemplate = await getOrCreateRecipeTemplate(formValues);\n\n if (!recipeTemplate.id) {\n throw new Error(\"Recipe template is not set\");\n }\n\n if (!suggestedServing.id) {\n throw new Error(\"Suggested serving is not set\");\n }\n\n let updatedOrCreatedIngredient: Ingredient;\n\n if (ingredient && ingredient.id) {\n // Update the ingredient\n updatedOrCreatedIngredient = await updateRecipeTemplateIngredient({\n id: ingredient.id,\n patchedIngredientRequest: {\n quantity,\n suggested_serving: suggestedServing,\n },\n }).unwrap();\n } else {\n updatedOrCreatedIngredient = (await addIngredientToRecipeTemplate(\n quantity,\n recipeTemplate,\n suggestedServing\n )) as unknown as Ingredient;\n }\n\n const updatedRecipeTemplate = addOrEditRecipeTemplateIngredient(recipeTemplate, updatedOrCreatedIngredient);\n setNewOwnRecipeTemplate(updatedRecipeTemplate);\n navigation.goBack();\n };\n\n const handleAddProduct = (formValues: OwnRecipeTemplateSchema): void => {\n navigation.push(Routes.AddProductStack, {\n screen: Routes.FoodSearchScreen,\n params: {\n onChoose: async (product, suggestedServing, quantity) =>\n onChooseProduct(undefined, suggestedServing, quantity, formValues),\n },\n });\n };\n\n const handleEditIngredient = (ingredient: Ingredient, formValues: OwnRecipeTemplateSchema): void => {\n if (!ingredient) {\n throw new Error(\"Tried to edit a non editable Ingredient or GeneratedRecipeMealIngredient\");\n }\n\n navigation.push(Routes.AddProductStack, {\n screen: Routes.AddIngredientScreen,\n params: {\n ingredient,\n onChoose: async (product, suggestedServing, quantity) => {\n await onChooseProduct(ingredient, suggestedServing, quantity, formValues);\n },\n },\n });\n };\n\n const onEditIngredientQuantity = async (ingredient: Ingredient, quantity: number): Promise => {\n if (!ingredient.id) {\n throw new Error(\"Tried to edit a non editable Ingredient\");\n }\n\n if (!newOwnRecipeTemplate || !newOwnRecipeTemplate.id) {\n throw new Error(\"Tried to edit a non editable recipe\");\n }\n\n let editedRecipeTemplate;\n if (!quantity) {\n await deleteIngredient({ id: ingredient.id });\n editedRecipeTemplate = deleteRecipeTemplateIngredient(newOwnRecipeTemplate, ingredient.id);\n } else {\n const updatedIngredient = await updateIngredient({\n id: ingredient.id,\n patchedIngredientRequest: {\n quantity,\n },\n }).unwrap();\n editedRecipeTemplate = addOrEditRecipeTemplateIngredient(newOwnRecipeTemplate, updatedIngredient);\n }\n\n setNewOwnRecipeTemplate(editedRecipeTemplate);\n };\n\n const createRecipeTemplateFromRecipeMeal = async (): Promise => {\n if (!initialRecipeMeal) {\n throw new Error(\"No initialRecipeMeal was provided\");\n }\n\n if (!user) {\n throw new Error(\"No user was provided\");\n }\n\n return createNewRecipeTemplateFromExisting({\n createNewRecipeTemplateRequest: {\n ...initialRecipeMeal,\n author: user.id,\n recipe_template: { ...initialRecipeMeal.recipe_template, tags: [], image: undefined },\n // NOTE: The compiler thinks an ingredient could be a number (ie, the id) or a GeneratedRecipeMealIngredient\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n ingredients: initialRecipeMeal.ingredients,\n },\n })\n .unwrap()\n .then((newRecipeTemplate) => {\n const newIngredients = newRecipeTemplate.ingredients;\n\n setNewOwnRecipeTemplate({\n ...newRecipeTemplate,\n ingredients: newIngredients as unknown as Ingredient[],\n });\n })\n .catch((error) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n throw new Error(error);\n });\n };\n\n useEffect(() => {\n if (!initialRecipeMeal) return;\n\n // NOTE: This is an async function but it needs to be used in a useEffect\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n (async () => {\n await createRecipeTemplateFromRecipeMeal();\n })();\n }, [initialRecipeMeal]);\n\n const onAbandonRecipeTemplate = async (): Promise => {\n if (newOwnRecipeTemplate && newOwnRecipeTemplate.id) {\n await deleteRecipeTemplate({ id: newOwnRecipeTemplate.id });\n }\n setExitModalVisible(false);\n navigation.goBack();\n };\n\n const ModalContent = (): JSX.Element => (\n <>\n \n {t(\"recipe_create.stop_editing_recipe_confirmation_text\")}\n \n \n onAbandonRecipeTemplate()}\n testID={\"addOwnRecipeExitConfirm-button\"}\n >\n {t(\"general.dialog_confirmation\")}\n \n\n {\n setExitModalVisible(false);\n }}\n testID={\"addOwnRecipeExitCancel-button\"}\n mt=\"2\"\n >\n {t(\"general.back_button_text\")}\n \n \n \n );\n const isDesktop = isDesktopScreen();\n\n const headerComponent = React.useCallback(\n () => (\n {\n navigation.goBack();\n }}\n onPressClose={() => {\n onCloseButton();\n }}\n />\n ),\n [t]\n );\n\n const recipeMacrosComponent = React.useCallback(\n () => ,\n [recipeMacrosItems]\n );\n\n return (\n \n \n {({ handleChange, handleBlur, handleSubmit, values, setFieldValue, errors }) => (\n \n {headerComponent()}\n\n \n {recipeMacrosComponent()}\n \n\n \n \n \n {t(\"recipe_create.name_label\")}\n \n\n {errors.name}\n \n \n\n {/* Delete button */}\n {initialRecipeMeal?.recipe_template.published &&\n initialRecipeMeal.recipe_template.source_provider === \"USER_GENERATED\" ? (\n \n {\n onOpenDeleteDialog();\n }}\n color={isIos() ? \"white\" : theme.colors.primary[\"600\"]}\n testID={\"addOwnRecipeDelete-button\"}\n />\n \n ) : null}\n\n {Boolean(values.name) && (\n <>\n \n {t(\"recipe_detail.ingredients_tab_title\")}\n \n handleAddProduct(values)}\n icon={}\n testID={\"addOwnRecipeAddIngredient-button\"}\n disabled={!values.name}\n nativeID=\"RecipeAddOwnAddIngredientButton\"\n />\n \n \n\n <>\n {newOwnRecipeTemplate?.ingredients.map((ingredient, ingredientIndex) => {\n const quantityInputState = allIngredientQuantityInputState[ingredientIndex] || \"\";\n\n const setQuantityInputState = (newQuantityInputState: string): void => {\n setAllIngredientQuantityInputState({\n ...allIngredientQuantityInputState,\n [ingredientIndex]: newQuantityInputState,\n });\n };\n\n return (\n // TODO: Fix MemoizedIngredientComponent and readd\n handleEditIngredient(ingredient, values),\n isLoading: isLoadingDeleteIngredient || isLoadingUpdateIngredient,\n }}\n />\n );\n })}\n \n \n )}\n \n\n {newOwnRecipeTemplate && newOwnRecipeTemplate.ingredients.length > 0 ? (\n \n {\n setFieldValue(\"alsoPlanAsMeal\", true);\n handleSubmit();\n }}\n testID={\"addOwnRecipeSaveAndPlan-button\"}\n nativeID=\"RecipeAddOwnSaveAndPlanButton\"\n mt=\"3\"\n >\n {t(\"recipe_create.save_and_plan_button_text\", {\n meal: formatMealType(mealSlotSpecification.meal_moment, t),\n })}\n \n\n handleSubmit()}\n testID={\"addOwnRecipeSave-button\"}\n mt=\"3\"\n >\n {submitMessage || t(\"general.save_button_text\")}\n \n \n ) : null}\n\n setExitModalVisible(false)}\n />\n \n )}\n \n {deleteRecipeTemplateModal}\n \n );\n};\nexport default RecipeAddOwnScreen;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport { Center, Heading, Icon, View } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useSelector } from \"react-redux\";\n\nimport { isDesktopScreen, Routes } from \"../constants\";\nimport { isMobilePlatform } from \"../helpers/generalHelpers\";\nimport { ContactSupportLink, HelpArticleButton, StripeCustomerPortalLink } from \"../helpers/supportHelpers\";\nimport { isUserInPaymentRequiredOrganisation } from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport { userSelector } from \"../slices/userSlice\";\nimport styles from \"./LoginScreenStyles\";\n\ntype Props = NativeStackScreenProps;\n\nconst HELP_ARTICLE_CANT_FIND_SUBSCRIPTION_URL =\n \"https://help.nutrition-app.com/articles/10531609-we-can-t-find-your-subscription\";\n\nconst BillingIssueScreen = ({ route, navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n const isDesktop = isDesktopScreen();\n\n const user = useSelector(userSelector);\n const isCoach = user?.is_coach;\n const isWeb = !isMobilePlatform();\n const isPaymentRequired = user ? isUserInPaymentRequiredOrganisation(user) : false;\n\n const renderContent = (): JSX.Element => {\n if (isCoach) {\n return (\n \n {t(\"billing_issue_screen.subscription_error\")}\n {isWeb ? : null}\n \n \n );\n }\n\n // Else, we are a client\n if (isPaymentRequired) {\n return (\n \n
\n \n {t(\"billing_issue_screen.diy_customer_subscription_error\")}\n \n \n \n
\n
\n );\n }\n\n return (\n \n {t(\"billing_issue_screen.client_subscription_error\")}\n \n \n );\n };\n\n return (\n \n \n \n
{renderContent()}
\n
\n
\n
\n );\n};\n\nexport default BillingIssueScreen;\n","import { Ionicons } from \"@expo/vector-icons\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport * as DocumentPicker from \"expo-document-picker\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { Formik, FormikProps } from \"formik\";\nimport _ from \"lodash\";\nimport {\n AlertDialog,\n Button,\n Flex,\n FormControl,\n Icon,\n IconButton,\n Image,\n Input,\n Modal,\n NativeBaseProvider,\n ScrollView,\n Text,\n useDisclose,\n View,\n} from \"native-base\";\nimport React, { useRef } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { TouchableOpacity } from \"react-native\";\nimport { useSelector } from \"react-redux\";\nimport ColorPicker, { Panel3, Preview, returnedResults, Swatches } from \"reanimated-color-picker\";\nimport * as Yup from \"yup\";\n\nimport { commonStyles, isDesktopScreen, Routes, Scale, VerticalScale } from \"../constants\";\nimport { createThemeFromColour } from \"../constants/theme\";\nimport { IS_MOBILE_WEB, isMobilePlatform } from \"../helpers/generalHelpers\";\nimport { getOrganisation } from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport type { UsersOrganisationCreateApiArg, UsersOrganisationPartialUpdateApiArg } from \"../services/backendTypes\";\nimport { userSelector } from \"../slices/userSlice\";\nimport DiaryViewScreen from \"./DiaryViewScreen\";\n\nconst organisationFormSchema = Yup.object().shape({\n organisationName: Yup.string().required().default(\"\"),\n // primaryColor should be a hex code and validated as such\n // TODO: Use https://www.npmjs.com/package/validate-color\n primaryColor: Yup.string().required().default(\"#00bcd4\"),\n logoAsBase64: Yup.string().default(\"\"),\n});\n\nconst { useUsersOrganisationCreateMutation, useUsersOrganisationPartialUpdateMutation } = backendApi;\n\nexport type OrganisationFormSchema = Yup.InferType;\n\ntype Props = NativeStackScreenProps;\nconst CoachModeAccountScreen = ({ navigation }: Props): JSX.Element => {\n const { t } = useTranslation();\n\n const { isOpen: isOpenPreviewDialog, onOpen: onOpenPreviewDialog, onClose: onClosePreviewDialog } = useDisclose();\n\n const [createOrganisation] = useUsersOrganisationCreateMutation();\n const [partialUpdateOrganisation] = useUsersOrganisationPartialUpdateMutation();\n\n const [showColourPickerModal, setShowColourPickerModal] = React.useState(false);\n\n const user = useSelector(userSelector);\n const organisation = user ? getOrganisation(user) : undefined;\n const formRef = React.useRef>(null);\n\n const organisationFormInitialValues = organisationFormSchema.cast({\n organisationName: organisation?.name ?? \"\",\n primaryColor: organisation?.primary_colour ?? \"\",\n });\n\n const commonContainerStyle = {\n backgroundColor: \"white\",\n flex: 1,\n };\n\n const mobileContainerStyle = {\n ...commonContainerStyle,\n flex: 1,\n backgroundColor: \"white\",\n };\n\n const onSubmitOrganisation = async (values: OrganisationFormSchema): Promise => {\n // TODO: Update if exists\n if (!organisation) {\n const payload: UsersOrganisationCreateApiArg = {\n updateCreateOrganisationRequest: {\n name: values.organisationName,\n primary_colour: values.primaryColor,\n // NOTE: The type is incorrect here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n logo: values.logoAsBase64,\n },\n };\n\n try {\n await createOrganisation(payload).unwrap();\n } catch (error) {\n Sentry.captureException(error);\n alert(t(\"general.generic_error_message\"));\n return;\n }\n } else {\n const payload: UsersOrganisationPartialUpdateApiArg = {\n id: organisation.id,\n patchedUpdateCreateOrganisationRequest: {\n name: values.organisationName,\n primary_colour: values.primaryColor,\n },\n };\n\n if (values.logoAsBase64) {\n // NOTE: The type is incorrect here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n payload.patchedUpdateCreateOrganisationRequest.logo = values.logoAsBase64;\n }\n\n try {\n await partialUpdateOrganisation(payload).unwrap();\n } catch (error) {\n Sentry.captureException(error);\n alert(t(\"general.generic_error_message\"));\n return;\n }\n }\n\n alert(t(\"general.updated_successfully\"));\n };\n\n const deactivateClientDialogRef = useRef(null);\n const addPreviewDialog = (\n {\n onClosePreviewDialog();\n }}\n size={\"xl\"}\n >\n \n \n {t(\"coach_mode_account.preview\")}\n \n \n ({\n id: organisation?.id || 1,\n name: formRef.current?.values.organisationName || \"\",\n primary_colour: formRef.current?.values.primaryColor,\n logo: formRef.current?.values.logoAsBase64 || organisation?.logo,\n product_stripe_id: organisation?.product_stripe_id || null,\n }),\n },\n }}\n />\n \n \n \n \n );\n const flexWidth = isMobilePlatform() || IS_MOBILE_WEB ? \"100%\" : \"50%\";\n\n const headerComponent = (\n \n \n {t(\"coach_mode_account.branding_header\")}\n \n \n );\n\n const onPressPreview = (): void => onOpenPreviewDialog();\n return (\n \n {headerComponent}\n\n \n \n {({ isSubmitting, handleChange, handleBlur, handleSubmit, values, errors, dirty, isValid }) => {\n const selectLogoFile = async (): Promise => {\n const documentResult = await DocumentPicker.getDocumentAsync({\n copyToCacheDirectory: true,\n type: \"image/*\",\n });\n\n // Check file size is less than 1MB and show alert if not\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (documentResult.size > 1000000) {\n alert(t(\"coach_mode_account.logo_file_size_error\"));\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n handleChange(\"logoAsBase64\")(documentResult.uri);\n };\n\n return (\n <>\n \n \n \n {/* TODO: The preview button should be in a better place */}\n \n \n \n \n\n {/* TODO: Change this to be \"Brand name\" */}\n \n {t(\"coach_mode_account.business_name\")}\n \n {errors.organisationName}\n \n\n \n {t(\"coach_mode_account.primary_color\")}\n\n \n setShowColourPickerModal(true)}\n mt={2}\n mr={2}\n mb={2}\n rightIcon={}\n nativeID=\"openColourPickerButton\"\n testID={\"openColourPickerButton\"}\n style={{ width: \"8%\" }}\n >\n\n \n \n setShowColourPickerModal(false)}>\n \n \n \n \n {\n handleChange(\"primaryColor\")(colors.hex);\n }}\n style={{ width: \"100%\" }}\n >\n \n \n \n \n \n \n \n\n {errors.primaryColor}\n \n\n \n {t(\"coach_mode_account.logo_field_label\")}\n {organisation?.logo || values.logoAsBase64 ? (\n \n ) : null}\n\n }\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n onPress={selectLogoFile}\n color={\"white\"}\n testID={\"uploadLogo-button\"}\n >\n {t(\"coach_mode_account.upload_your_logo\")}\n \n {errors.logo}\n \n handleSubmit()}\n isLoading={isSubmitting}\n isDisabled={!dirty || !isValid}\n testID={\"organisationForm-submitButton\"}\n >\n {t(\"coach_mode_account.save\")}\n \n \n \n \n );\n }}\n \n {addPreviewDialog}\n \n \n );\n};\nexport default CoachModeAccountScreen;\n","import { Ionicons } from \"@expo/vector-icons\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport { Box, HStack, Icon, Pressable, Text, VStack } from \"native-base\";\nimport React from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { ActivityIndicator } from \"react-native\";\n\nimport { HORMONE_HEX_COLOR } from \"../constants/theme\";\nimport { useExternalLink } from \"../hooks/useExternalLink\";\n\nconst BlogLinksDropdown = (): JSX.Element => {\n const { t } = useTranslation();\n const { isLoading, error, openLink } = useExternalLink();\n\n const blogs = [\n {\n label: t(\"my_profile.blogs.menopause\"),\n href: \"https://killerbodyfood.com/blogs/voedingstips/tagged/menopause\",\n },\n {\n label: t(\"my_profile.blogs.cycle\"),\n href: \"https://killerbodyfood.com/blogs/voedingstips/tagged/menstruatiecyclus\",\n },\n {\n label: t(\"my_profile.blogs.weightloss\"),\n href: \"https://killerbodyfood.com/blogs/voedingstips\",\n },\n ];\n\n return (\n \n \n {t(\"my_profile.blogs.title\")}\n \n\n {error ? (\n \n {error}\n \n ) : null}\n\n {blogs.map((blog) => (\n {\n openLink(blog.href).catch((err) => {\n console.error(\"Failed to open URL:\", err);\n Sentry.captureException(err);\n });\n }}\n testID={`blog-link-${blog.label}`}\n >\n {({ isPressed }) => (\n \n \n \n \n\n \n {blog.label}\n \n\n {isLoading === blog.href ? (\n \n ) : (\n \n \n \n )}\n \n )}\n \n ))}\n \n );\n};\n\nexport default BlogLinksDropdown;\n","import { Entypo, FontAwesome5, Ionicons, MaterialIcons } from \"@expo/vector-icons\";\nimport AsyncStorage from \"@react-native-async-storage/async-storage\";\nimport type { NativeStackScreenProps } from \"@react-navigation/native-stack\";\nimport * as WebBrowser from \"expo-web-browser\";\nimport { Locale } from \"locale-enum\";\nimport {\n Box,\n Button,\n Center,\n Circle,\n Divider,\n Heading,\n HStack,\n Icon,\n Image,\n Pressable,\n Progress,\n Radio,\n ScrollView,\n Select,\n Text,\n View,\n VStack,\n} from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SafeAreaView } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport * as URI from \"uri-js\";\n\nimport { ASYNC_STORAGE__LANGUAGE_KEY } from \"../../../i18n\";\nimport { USER_LOGOUT_ACTION } from \"../../../store\";\nimport BlogLinksDropdown from \"../components/BlogLinksDropdown\";\nimport CustomBrandingMobileScreenHeader from \"../components/CustomBrandingMobileScreenHeader\";\nimport MenstrualCycleDiagram from \"../components/MenstrualCycleDiagram\";\nimport { BUILD_NUMBER, commonStyles, Images, isDesktopScreen, Routes, width as deviceWidth } from \"../constants\";\nimport { Scale, VerticalScale, width } from \"../constants/helperFunction\";\nimport { calculateDailyTotalForMacro } from \"../helpers/coachHelpers\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport { apiCallErrorHandler, isMobilePlatform } from \"../helpers/generalHelpers\";\nimport { logout } from \"../helpers/logout\";\nimport { ContactSupportLink, StripeCustomerPortalLink } from \"../helpers/supportHelpers\";\nimport {\n doesTheUserHaveMenstrualPlanSet,\n getMenstrualCyclePropsFromUser,\n hasUserCompletedTheirDiyNutritionPlanningFormCompletely,\n isUserDiy,\n isUserInPaymentRequiredOrganisation,\n organisationIsDiyBillingForUsers,\n} from \"../helpers/userHelpers\";\nimport type { RootStackParamList } from \"../navigation/NavigationStackParams\";\nimport backendApi from \"../services/backendApi\";\nimport logger from \"../services/logger\";\nimport { onboardingSlice } from \"../slices/onboardingSlice\";\nimport { clientModeSelector, userSelector, userSlice } from \"../slices/userSlice\";\nimport styles from \"./MyProfileScreenStyles\";\n\nconst {\n useUsersUserDestroyMutation,\n useCheckoutSubscriptionVerificationCreateMutation,\n useUsersUserProfileUpdateMutation,\n} = backendApi;\n\ntype SupportedLanguage = Locale.en | Locale.nl;\nconst LANGUAGE_OPTIONS: SupportedLanguage[] = [Locale.en, Locale.nl];\n\ntype Props = NativeStackScreenProps;\nconst MyProfileScreen = ({ navigation }: Props): JSX.Element => {\n const { t, i18n } = useTranslation();\n const dispatch = useDispatch();\n\n const isDesktop = isDesktopScreen();\n const isWeb = !isMobilePlatform();\n\n const user = useSelector(userSelector);\n const clientMode = useSelector(clientModeSelector);\n\n const [deleteUserOnBackend] = useUsersUserDestroyMutation();\n\n const [updateUserProfile, { isLoading: isUpdatingUserProfile }] = useUsersUserProfileUpdateMutation();\n\n // NOTE: This feature was here for app store compliance.\n // Since we are not updating our app store app this is here only for reference.\n const deleteAccountButtonPress = async (): Promise => {\n if (!user) {\n throw new Error(\"User is not defined\");\n }\n\n const proceedToNextStep = window.confirm(t(\"delete_account.warning\"));\n\n if (!proceedToNextStep) {\n return;\n }\n\n const confirmKeyword = t(\"delete_account.confirm_keyword\");\n const returnValue = prompt(t(\"delete_account.input_confirmation\", { confirmKeyword }));\n\n if (returnValue === confirmKeyword) {\n await deleteUserOnBackend({\n id: user.id,\n });\n\n logout(dispatch);\n } else {\n alert(t(\"delete_account.abandon\", { confirmKeyword }));\n }\n };\n\n const swapMode = (): void => {\n dispatch(userSlice.actions.toggleClientMode());\n };\n\n const swapModeButton = (\n }\n mt={2}\n onPress={swapMode}\n testID={\"swapMode-Button\"}\n nativeID={\"swapModeButton\"}\n >\n {t(\"coach_mode_settings.swap_mode_button_text\", {\n modeName: t(`coach_mode_settings.${clientMode ? \"coach_mode_label_text\" : \"client_mode_label_text\"}`),\n })}\n \n );\n\n const formatLanguage = (language: SupportedLanguage): string => t(`general.locales.${language}`);\n\n const switchLanguage = async (language: Locale): Promise => {\n await i18n.changeLanguage(language);\n\n await AsyncStorage.setItem(ASYNC_STORAGE__LANGUAGE_KEY, language);\n dispatch(userSlice.actions.storeLocale(language));\n };\n\n const redoNutritionPlanningButton = (\n }\n mt={4}\n mb={2}\n onPress={() => {\n if (!user) {\n throw new Error(\"User is not defined\");\n }\n if (!user.intake) {\n throw new Error(\"User intake is not defined\");\n }\n // This ensures that the state used for the questions will be set appropriately\n dispatch(onboardingSlice.actions.setUserProfileData(user.intake));\n\n navigation.push(Routes.DIY1GoalScreen);\n }}\n testID={\"redoNutritionPlanning-Button\"}\n nativeID={\"redoNutritionPlanningButton\"}\n colorScheme=\"primary\"\n size=\"md\"\n width=\"100%\"\n >\n {t(\"my_profile.redo_nutrition_planning_button_text\")}\n \n );\n\n const shouldShowStripeCustomerPortalLink =\n (!clientMode && user && isWeb) || (user && organisationIsDiyBillingForUsers(user));\n\n // Format food intolerances for display\n const formatIntolerances = (): string => {\n const intolerances = [];\n\n if (user?.intake?.food_intolerances_gluten) {\n intolerances.push(t(\"general.intolerances_and_allergies.GLUTEN\"));\n }\n if (user?.intake?.food_intolerances_lactose) {\n intolerances.push(t(\"general.intolerances_and_allergies.LACTOSE\"));\n }\n if (user?.intake?.food_intolerances_nut) {\n intolerances.push(t(\"general.intolerances_and_allergies.NUTS\"));\n }\n if (user?.intake?.food_intolerances_crustaceans_shellfish) {\n intolerances.push(t(\"general.intolerances_and_allergies.CRUSTACEANS_AND_SHELLFISH\"));\n }\n\n if (intolerances.length === 0) {\n return t(\"onboarding.onboarding_9_intolerance_screen.no_intolerance\");\n }\n\n return intolerances.join(\", \");\n };\n\n // Format disliked ingredients for display\n const formatDislikedIngredients = (): string => {\n if (!user?.ingredients_to_avoid || user.ingredients_to_avoid.length === 0) {\n return t(\"general.none\");\n }\n\n return user.ingredients_to_avoid.join(\", \");\n };\n\n // Get dietary preference display name\n const getDietaryPreference = (): string => {\n if (!user?.intake?.diet) {\n return t(\"general.diets.OMNIVORE\");\n }\n return t(`general.diets.${user.intake.diet}`);\n };\n\n const isOnMenopauseDiet = (): boolean => !!user?.intake?.is_on_menopause_diet;\n\n // Get goal display name\n const getGoal = (): string | undefined => {\n if (user?.intake?.main_goal) {\n return t(`general.goals.${user.intake.main_goal}`);\n }\n return undefined;\n };\n\n // Helper function to format height according to user preferences\n const formatHeight = (): string => {\n if (!user?.intake?.height_in_cm) return \"-\";\n\n // Check if user prefers imperial units for height\n const usesImperial = user.intake.uses_imperial_measurements_for_height;\n\n if (usesImperial) {\n // Convert cm to feet and inches\n const heightInInches = user.intake.height_in_cm / 2.54;\n const feet = Math.floor(heightInInches / 12);\n const inches = Math.round(heightInInches % 12);\n\n // Handle the case where inches is 12 (should roll over to next foot)\n if (inches === 12) {\n return `${feet + 1}' 0\"`;\n }\n\n return `${feet}' ${inches}\"`;\n }\n // Display in centimeters\n return `${user.intake.height_in_cm} ${t(\"onboarding.onboarding_5_physical_stats_screen.centimeters\")}`;\n };\n\n // Helper function to format weight according to user preferences\n const formatWeight = (weightInKg: number | undefined | null): string => {\n if (!weightInKg) return \"-\";\n\n const weightUnit = user?.intake?.personal_weight_unit || \"KILOGRAMS\";\n\n if (weightUnit === \"POUNDS\") {\n const pounds = Math.round(weightInKg * 2.20462);\n return `${pounds} ${t(\"general.pounds\")}`;\n }\n if (weightUnit === \"STONES\") {\n const totalPounds = weightInKg * 2.20462;\n const stones = Math.floor(totalPounds / 14);\n const pounds = Math.round(totalPounds % 14);\n return `${stones} st ${pounds} ${t(\"general.pounds\")}`;\n }\n return `${weightInKg} ${t(\"onboarding.onboarding_5_physical_stats_screen.kilograms\")}`;\n };\n\n const handleRecipeUnitChange = async (useImperial: boolean): Promise => {\n if (!user || !user.intake) return;\n\n try {\n const userProfileRequest = {\n ...user.intake,\n uses_imperial_measurements_for_recipes: useImperial,\n };\n\n await updateUserProfile({\n id: user.intake.id,\n userProfileRequest,\n })\n .unwrap()\n .then(() => {\n alert(t(\"my_profile.recipe_units_updated_successfully\"));\n })\n .catch(apiCallErrorHandler());\n } catch (error) {\n logger.error(\"Failed to update recipe units preference\", error);\n }\n };\n\n const menstrualCycleProps = user ? getMenstrualCyclePropsFromUser(user) : undefined;\n\n async function handlePeriodStartedEarly(): Promise {\n if (!user || !user.intake) return;\n\n const today = new Date();\n const formattedDate = today.toISOString().split(\"T\")[0]; // Format as YYYY-MM-DD\n\n try {\n const userProfileRequest = {\n ...user.intake,\n last_menstrual_period_start_date: formattedDate,\n };\n\n await updateUserProfile({\n id: user.intake.id,\n userProfileRequest,\n })\n .unwrap()\n .then(() => {\n alert(t(\"my_profile.menstrual_cycle.period_start_date_updated\"));\n })\n .catch(apiCallErrorHandler());\n } catch (error) {\n logger.error(\"Failed to update menstrual period start date\", error);\n }\n }\n\n const UserProfile = (): JSX.Element => (\n \n {/* Header Section */}\n \n {/* NOTE: We do not currently populate the user's name in the payment flow so this is never available */}\n {/* \n \n {`${user?.first_name} ${user?.last_name}`}\n \n */}\n\n {/* Blog Links Dropdown */}\n {isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES) ? (\n \n \n \n ) : null}\n\n {/* Compact Help Button */}\n \n \n \n\n {/* Language Selector with Label */}\n \n \n {t(\"my_profile.language_chooser.section_title\")}\n {\":\"}\n \n \n switchLanguage(language as Locale)}\n testID=\"language-selector\"\n >\n {LANGUAGE_OPTIONS?.map((language) => (\n \n ))}\n \n \n \n \n\n \n\n {/* Nutrition Section */}\n \n \n {t(\"my_profile.macros_heading\")}\n \n \n\n {user?.intake ? (\n \n {/* Macros display */}\n \n {/* Calories Box */}\n \n \n {t(\"general.calories\")}\n \n \n {user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n ? calculateDailyTotalForMacro(\n \"kcal\",\n user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n )\n : \"-\"}\n \n 🔥\n \n\n {/* Protein Box */}\n \n \n {t(\"general.protein_short\")}\n \n \n {user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n ? calculateDailyTotalForMacro(\n \"protein\",\n user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n )\n : \"-\"}\n \n 💪\n \n\n {/* Fat Box */}\n \n \n {t(\"general.fat\")}\n \n \n {user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n ? calculateDailyTotalForMacro(\n \"fat\",\n user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n )\n : \"-\"}\n \n 🥑\n \n\n {/* Carbs Box */}\n \n \n {t(\"general.carbohydrates_short\")}\n \n \n {user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n ? calculateDailyTotalForMacro(\n \"carbohydrates\",\n user.intake.weekly_nutrition_plan?.monday.meal_slot_specifications\n )\n : \"-\"}\n \n 🍞\n \n \n \n ) : null}\n \n\n {/* Goal & Biometrics Section */}\n \n \n {t(\"my_profile.profile_heading\")}\n \n \n\n \n \n {t(\"general.email_address\")}\n {user?.email}\n \n\n {getGoal() ? (\n \n {t(\"coach_mode_create_new_client.goal_title_text\")}\n {getGoal()}\n \n ) : null}\n\n {/* NOTE: I don't think this is useful to show to the user */}\n {/* \n {t(\"general.activity.ACTIVE\")}\n {getActivityLevel()}\n */}\n\n \n {t(\"coach_mode_create_new_client.gender_title_text\")}\n {user?.intake?.gender ? t(`general.gender.${user.intake.gender}`) : \"-\"}\n \n\n \n {t(\"coach_mode_create_new_client.age_title_text\")}\n {user?.intake?.age || \"-\"}\n \n\n \n {t(\"coach_mode_create_new_client.height_title_text\")}\n {formatHeight()}\n \n\n \n {t(\"coach_mode_create_new_client.weight_title_text\")}\n {formatWeight(user?.intake?.weight)}\n \n\n {/* NOTE: I am not sure this is stored on the DB for everyone */}\n {/* This is not relevant for everyone because some people want to maintain their weight */}\n {user?.intake?.goal_weight_in_kg ? (\n \n {t(\"onboarding.onboarding_5_physical_stats_screen.goal_weight_title\")}\n {formatWeight(user?.intake?.goal_weight_in_kg)}\n \n ) : null}\n \n \n\n {/* Dietary Preferences Section */}\n \n \n {t(\"coach_mode_create_new_client.diet_title_text\")}\n \n \n \n \n {t(\"coach_mode_create_new_client.diet_title_text\")}\n {getDietaryPreference()}\n \n\n {isOnMenopauseDiet() && (\n \n {t(\"onboarding.onboarding_7_nutrition_plan_screen.menopause\")}\n {t(\"onboarding.onboarding_menstrual_cycle_spacing_screen.yes\")}\n \n )}\n\n \n {t(\"coach_mode_create_new_client.intolerances_and_allergies_title_text\")}\n \n {formatIntolerances()}\n \n \n\n \n {t(\"onboarding.onboarding_10_ingredient_dislikes_screen.title\")}\n \n {formatDislikedIngredients()}\n \n \n \n \n\n {/* Menstrual Cycle Section - Only shown if relevant */}\n {user && doesTheUserHaveMenstrualPlanSet(user) ? (\n \n \n {t(\"my_profile.menstrual_cycle.heading\")}\n \n \n\n {/* Add the cycle diagram */}\n {user && menstrualCycleProps !== undefined ? (\n \n \n \n ) : null}\n\n \n {user?.intake?.last_menstrual_period_start_date ? (\n \n {t(\"my_profile.menstrual_cycle.last_period_start\")}\n \n {new Date(user.intake.last_menstrual_period_start_date).toLocaleDateString(\n i18n.language.startsWith(\"nl\") ? \"nl-NL\" : \"en-US\",\n { year: \"numeric\", month: \"short\", day: \"numeric\" }\n )}\n \n \n ) : null}\n\n {user?.intake?.menstrual_cycle_length ? (\n \n {t(\"my_profile.menstrual_cycle.cycle_length\")}\n \n {user.intake.menstrual_cycle_length}{\" \"}\n {t(\"onboarding.onboarding_menstrual_cycle_spacing_screen.days\").toLowerCase()}\n \n \n ) : null}\n\n {/* Period Started Early Button - Only shown for users on cycle diet */}\n {user && doesTheUserHaveMenstrualPlanSet(user) ? (\n }\n onPress={() => {\n handlePeriodStartedEarly().catch((err) => {\n logger.error(\"Failed to update menstrual period start date\", err);\n alert(t(\"general.generic_error_message\"));\n throw err;\n });\n }}\n testID=\"period-started-early-button\"\n >\n {t(\"my_profile.menstrual_cycle.period_started_early\")}\n \n ) : null}\n \n \n ) : null}\n\n {/* Units & Preferences Section - with radio button toggle */}\n \n \n {t(\"my_profile.units_heading\")}\n \n \n \n \n {t(\"my_profile.recipe_units\")}\n handleRecipeUnitChange(value === \"imperial\")}\n isDisabled={isUpdatingUserProfile}\n >\n \n \n {t(\"my_profile.metric_units\")}\n \n \n {t(\"my_profile.imperial_units\")}\n \n \n \n {isUpdatingUserProfile ? : null}\n \n \n \n\n {/* Redo Nutrition Planning Button */}\n {user && isUserDiy(user) && clientMode && hasUserCompletedTheirDiyNutritionPlanningFormCompletely(user) ? (\n {redoNutritionPlanningButton}\n ) : null}\n\n {/* Standalone Subscription Button */}\n {shouldShowStripeCustomerPortalLink ? (\n \n \n \n ) : null}\n\n {/* Standalone Coach Mode Button */}\n {user?.is_coach ? {swapModeButton} : null}\n\n {/* Logout Button - Standalone */}\n logout(dispatch)}\n testID={\"logout-button\"}\n nativeID={\"logoutButton\"}\n width=\"100%\"\n variant=\"outline\"\n colorScheme=\"gray\"\n size=\"md\"\n my={4}\n leftIcon={}\n >\n {t(\"general.logout\")}\n \n\n {/* NOTE: This was more relevant when we maintained a mobile app */}\n {/*
\n \n {BUILD_NUMBER}\n \n
*/}\n
\n );\n\n return (\n \n {!isDesktop && }\n\n \n \n \n \n );\n};\n\nexport default MyProfileScreen;\n","import { MaterialIcons } from \"@expo/vector-icons\";\nimport { BottomTabNavigationOptions, createBottomTabNavigator } from \"@react-navigation/bottom-tabs\";\nimport type { TFunction } from \"i18next\";\nimport _ from \"lodash\";\nimport { Icon, useTheme } from \"native-base\";\nimport React, { useEffect, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useSelector } from \"react-redux\";\n\nimport { Routes } from \"../constants\";\nimport { FontFamily, FontSize } from \"../constants/fonts\";\nimport { FeatureFlag, isFeatureFlagActive } from \"../helpers/featureFlags\";\nimport {\n areWeAnOpinionatedRecipeInspirationApp,\n getOrganisation,\n hasUserCompletedTheirDiyNutritionPlanningFormCompletely,\n isUserDiy,\n isUserInPaymentRequiredOrganisation,\n shouldB2CCustomerHavePaidAccess,\n userAccountIsDisabledOrHasInValidSubscription,\n} from \"../helpers/userHelpers\";\nimport { CoachModeViewClientsScreen } from \"../screens\";\nimport BillingIssueScreen from \"../screens/BillingIssueScreen\";\nimport CoachModeAccountScreen from \"../screens/CoachModeAccountScreen\";\nimport DiaryViewScreen from \"../screens/DiaryViewScreen\";\nimport GroceryListScreen from \"../screens/GroceryListScreen\";\nimport MyProfileScreen from \"../screens/MyProfileScreen\";\nimport MyProgressScreen from \"../screens/MyProgressScreen\";\nimport DIY1GoalScreen from \"../screens/New_DIY_form/Onboarding_2_GoalScreen\";\nimport NutritionalPlanScreen from \"../screens/New_DIY_form/Onboarding_7_NutritionPlanScreen\";\nimport backendApi from \"../services/backendApi\";\nimport type { User } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { clientModeSelector, userSelector } from \"../slices/userSlice\";\nimport type { BottomNavigationTabOptions } from \"./NavigationStackParams\";\n\nconst { useCheckoutSubscriptionVerificationCreateMutation } = backendApi;\n\nconst DELINQUENT_SUBSCRIPTION_SCREENS = [Routes.BillingIssueScreen];\n\nconst CLIENT_VIEW_SCREENS: BottomNavigationTabOptions[] = [\n Routes.MyProgressScreen,\n Routes.DiaryViewScreen,\n Routes.GroceryListScreen,\n Routes.MyProfileScreen,\n Routes.BillingIssueScreen,\n];\n\nconst COACH_VIEW_SCREENS: BottomNavigationTabOptions[] = [\n Routes.CoachModeViewClientsScreen,\n Routes.CoachModeAccountScreen,\n Routes.MyProfileScreen,\n Routes.BillingIssueScreen,\n];\n\nconst ICONS_LOOKUP: { [B in BottomNavigationTabOptions]: string } = {\n [Routes.DiaryViewScreen]: \"calendar-today\",\n [Routes.MyProgressScreen]: \"bar-chart\",\n [Routes.MyProfileScreen]: \"person\",\n [Routes.CoachModeAccountScreen]: \"person\",\n [Routes.GroceryListScreen]: \"shopping-basket\",\n\n // Coach-mode\n [Routes.CoachModeViewClientsScreen]: \"group\",\n [Routes.BillingIssueScreen]: \"work\",\n\n // Diy\n [Routes.DIY1GoalScreen]: \"restaurant-menu\",\n [Routes.NutritionalPlanScreen]: \"restaurant-menu\",\n};\n\nconst SELECTED_COLOUR = \"primary.600\";\nconst UNSELECTED_COLOUR = \"gray.400\";\n\nfunction getTabIcon(screenName: BottomNavigationTabOptions, focused: boolean): JSX.Element {\n return (\n \n );\n}\n\nfunction getTitleForTab(route: BottomNavigationTabOptions, t: TFunction): string {\n switch (route) {\n // Client-mode screens\n case Routes.DiaryViewScreen:\n return t(\"bottom_tabs.planner_tab_name\");\n // NOTE: Not currently implemented\n // case Routes.RecipesScreen:\n // return t(\"Recipes\");\n case Routes.MyProgressScreen:\n return t(\"bottom_tabs.progress_tab_name\");\n case Routes.GroceryListScreen:\n return t(\"bottom_tabs.groceries_tab_name\");\n case Routes.MyProfileScreen:\n return t(\"bottom_tabs.my_profile_tab_name\");\n case Routes.CoachModeAccountScreen:\n return t(\"bottom_tabs.account_management_tab_name\");\n case Routes.BillingIssueScreen:\n return t(\"bottom_tabs.billing_issue_tab_name\");\n\n // Coach-mode screens\n case Routes.CoachModeViewClientsScreen:\n return t(\"bottom_tabs.clients_tab_name\");\n\n case Routes.DIY1GoalScreen:\n return t(\"general.welcome\");\n case Routes.NutritionalPlanScreen:\n // NOTE: This is valid for the initial onboarding flow but not subsequently -\n // we may want to change this but there is no state that we can use to detect this at the moment.\n return t(\"general.welcome\");\n\n default:\n throw new Error(`Route \"${String(route)}\" is not implemented for BottomTabNavigator`);\n }\n}\n\nconst doNotDisplayTab = { tabBarButton: () => null };\n\nfunction hasUserCompletedUserProfileButDoesNotHaveWeeklyNutritionPlan(user: User): boolean {\n return Boolean(user.intake && !user.intake.weekly_nutrition_plan);\n}\n\nconst BottomTab = createBottomTabNavigator();\nconst BottomNavigationStack = (): JSX.Element => {\n const { t } = useTranslation();\n const theme = useTheme();\n\n const clientMode = useSelector(clientModeSelector);\n const user = useSelector(userSelector);\n\n const [checkSubscription] = useCheckoutSubscriptionVerificationCreateMutation();\n const [subscriptionInvalid, setSubscriptionInvalid] = useState(false);\n\n // TODO: This should re-fetch every 30 seconds\n useEffect(() => {\n const verifySubscription = (): void => {\n const shouldUserHavePaidAccess = shouldB2CCustomerHavePaidAccess(user);\n setSubscriptionInvalid(!shouldUserHavePaidAccess);\n };\n\n verifySubscription();\n }, [user]);\n\n const invalidAccount = userAccountIsDisabledOrHasInValidSubscription(user) || subscriptionInvalid;\n\n if (!user) {\n console.error(\"user is not set in BottomNavigationStack - this should not happen\");\n return <>;\n }\n\n const isUserDiyAndInClientMode = isUserDiy(user) && clientMode;\n\n const organisation = getOrganisation(user);\n const areWeInAnOpinionatedRecipeInspirationApp = areWeAnOpinionatedRecipeInspirationApp(organisation || null);\n\n const shouldHideTab = (screenName: BottomNavigationTabOptions): boolean => {\n if (!clientMode) {\n // Ie, coach mode\n return !COACH_VIEW_SCREENS.includes(screenName);\n }\n if (isUserDiyAndInClientMode && !hasUserCompletedTheirDiyNutritionPlanningFormCompletely(user)) {\n if (hasUserCompletedUserProfileButDoesNotHaveWeeklyNutritionPlan(user)) {\n return screenName !== Routes.NutritionalPlanScreen;\n }\n return screenName !== Routes.DIY1GoalScreen;\n }\n\n if (screenName === Routes.MyProgressScreen) {\n if (isFeatureFlagActive(user, FeatureFlag.FF_FEMALE_HORMONES)) {\n return false;\n }\n\n if (areWeInAnOpinionatedRecipeInspirationApp) {\n return true;\n }\n }\n return !CLIENT_VIEW_SCREENS.includes(screenName);\n };\n\n const getScreenOptions = (screenName: string): BottomTabNavigationOptions => ({\n tabBarIcon: ({ focused }) => getTabIcon(screenName as BottomNavigationTabOptions, focused),\n tabBarActiveTintColor: theme.colors.primary[\"600\"],\n tabBarInactiveTintColor: theme.colors.gray[\"400\"],\n headerShown: false,\n tabBarLabelStyle: {\n fontSize: FontSize.mini,\n fontFamily: FontFamily.medium,\n },\n title: getTitleForTab(screenName as BottomNavigationTabOptions, t),\n tabBarTestID: `bottomTab-${screenName}`,\n });\n\n let initialRouteName;\n if (invalidAccount) {\n initialRouteName = Routes.BillingIssueScreen;\n } else if (clientMode) {\n if (isUserDiyAndInClientMode) {\n if (hasUserCompletedUserProfileButDoesNotHaveWeeklyNutritionPlan(user)) {\n initialRouteName = Routes.NutritionalPlanScreen;\n } else if (!hasUserCompletedTheirDiyNutritionPlanningFormCompletely(user)) {\n initialRouteName = Routes.DIY1GoalScreen;\n } else {\n initialRouteName = Routes.DiaryViewScreen;\n }\n } else {\n initialRouteName = Routes.DiaryViewScreen;\n }\n } else {\n initialRouteName = Routes.CoachModeViewClientsScreen;\n }\n\n return (\n // NOTE: This is a known bug due to a react version update: https://stackoverflow.com/questions/71788254/react-18-typescript-children-fc/71809927#71809927\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n {\n const name = nameAsString as BottomNavigationTabOptions;\n\n // if help screen then display\n if (name === Routes.MyProfileScreen) {\n return getScreenOptions(name);\n }\n\n if (invalidAccount && !DELINQUENT_SUBSCRIPTION_SCREENS.includes(name)) {\n return doNotDisplayTab;\n }\n\n if (shouldHideTab(name) || (!invalidAccount && DELINQUENT_SUBSCRIPTION_SCREENS.includes(name))) {\n return doNotDisplayTab;\n }\n\n return getScreenOptions(name);\n }}\n initialRouteName={initialRouteName}\n >\n \n {/* DIY screens */}\n \n \n \n \n \n \n \n {/* NOTE: This is out of scope for the initial release */}\n {/* */}\n \n \n );\n};\n\nexport default BottomNavigationStack;\n","import { connectActionSheet } from \"@expo/react-native-action-sheet\";\nimport { NavigationContainer, useNavigationContainerRef } from \"@react-navigation/native\";\nimport { createNativeStackNavigator } from \"@react-navigation/native-stack\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as Sentry from \"@sentry/react\";\nimport type { EventType } from \"expo-linking\";\nimport * as Linking from \"expo-linking\";\nimport moment from \"moment\";\nimport { Text } from \"native-base\";\nimport platform from \"platform-detect\";\nimport React, { useEffect, useRef } from \"react\";\nimport type { EmitterSubscription } from \"react-native\";\nimport { useDispatch, useSelector } from \"react-redux\";\n\nimport { isDesktopScreen, Routes } from \"../constants\";\nimport analyticsInterface from \"../helpers/analyticsHelpers\";\nimport { getAppName } from \"../helpers/generalHelpers\";\nimport { sendUpdateRequestToIntercom } from \"../helpers/intercomHelpers\";\nimport { logout } from \"../helpers/logout\";\nimport { getHostname, getManagedCustomerPortalSubdomain, isUserLoggedIn } from \"../helpers/userHelpers\";\nimport {\n AddGenderScreen,\n AddLifeStyleScreen,\n AddMainGoalScreen,\n AddMotivationGoalScreen,\n CoachModeClientInfoScreen,\n CoachModeViewClientsScreen,\n DiaryViewScreen,\n EmailConfirmationSent,\n EmailConfirmed,\n GetStartedScreen,\n IngredientSearchScreen,\n LoginScreen,\n NutritionPlanScreen,\n OnboardingScreen,\n PersonalDetailsScreen,\n PlanScreen,\n RecipeInspirationScreen,\n RecipeSearchScreen,\n RegisterScreen,\n} from \"../screens\";\nimport AddIngredientScreen from \"../screens/AddIngredientScreen\";\nimport BarcodeScannerScreen from \"../screens/BarcodeScannerScreen\";\nimport CheckoutFailureScreen from \"../screens/checkout/CheckoutFailureScreen\";\nimport CheckoutScreen from \"../screens/checkout/CheckoutSceen\";\nimport {\n CHECKOUT_PRICE_ID_PARAM_NAME,\n CHECKOUT_QUERY_PARAM_NAME,\n CheckoutFlowState,\n CheckoutParamStates,\n CheckoutState,\n} from \"../screens/checkout/constants\";\nimport ChooseMealMomentsTab2 from \"../screens/createNutritionDayPlan/ChooseMealMomentsTab2\";\nimport EditMealMomentsTab3 from \"../screens/createNutritionDayPlan/EditMealMomentsTab3\";\nimport EnergyBalanceTab1 from \"../screens/createNutritionDayPlan/EnergyBalanceTab1\";\nimport FineTuningTab4 from \"../screens/createNutritionDayPlan/FineTuningTab4\";\nimport EditUserProfileScreen from \"../screens/EditUserProfileScreen\";\nimport EnterOTPScreen from \"../screens/EnterOTPScreen\";\nimport FinishPlanningScreen from \"../screens/FinishPlanningScreen\";\nimport GroceryListScreen from \"../screens/GroceryListScreen\";\nimport MagicLinkSentScreen from \"../screens/MagicLinkSentScreen\";\nimport SignUpScreen from \"../screens/New_DIY_form/Onboarding_1_SignUpScreen\";\nimport DIY1GoalScreen from \"../screens/New_DIY_form/Onboarding_2_GoalScreen\";\nimport ActivityLevelScreen from \"../screens/New_DIY_form/Onboarding_3_ActivityLevelScreen\";\nimport BiometricDataScreen from \"../screens/New_DIY_form/Onboarding_4_BiometricDataScreen\";\nimport PhysicalStatsScreen from \"../screens/New_DIY_form/Onboarding_5_PhysicalStatsScreen\";\nimport WeeklyGoalScreen from \"../screens/New_DIY_form/Onboarding_6_WeeklyGoalScreen\";\nimport ModifyNutritionalPlanScreen from \"../screens/New_DIY_form/Onboarding_7_ModifyNutritionPlanScreen\";\nimport NutritionalPlanScreen from \"../screens/New_DIY_form/Onboarding_7_NutritionPlanScreen\";\nimport MealTimesScreen from \"../screens/New_DIY_form/Onboarding_8_MealTimesScreen\";\nimport DietSelectionScreen from \"../screens/New_DIY_form/Onboarding_8b_DietSelectionScreen\";\nimport IntoleranceScreen from \"../screens/New_DIY_form/Onboarding_9_IntoleranceScreen\";\nimport IngredientDislikesScreen from \"../screens/New_DIY_form/Onboarding_10_IngredientDislikesScreen\";\nimport PostOnboardingScreen from \"../screens/New_DIY_form/Onboarding_11_PostOnboardingScreen\";\nimport MenstrualCycleDatesScreen from \"../screens/New_DIY_form/Onboarding_MenstrualCycle_1_DatesScreen\";\nimport OnboardingMenstrualCycleSpacingScreen from \"../screens/New_DIY_form/Onboarding_MenstrualCycle_2_Spacing\";\nimport MenstrualCycleDetailsScreen from \"../screens/New_DIY_form/Onboarding_MenstrualCycle_3_DetailsScreen\";\nimport RegistrationScreen from \"../screens/New_DIY_form/RegistrationScreen\";\nimport PWASignupScreen from \"../screens/PWASignupScreen\";\nimport RecipeAddOwnScreen from \"../screens/RecipeAddOwnScreen\";\nimport RecipeDetailScreen from \"../screens/RecipeDetailScreen\";\nimport backendApi from \"../services/backendApi\";\nimport type { TokenCreate } from \"../services/backendTypes\";\nimport logger from \"../services/logger\";\nimport { brandSlice } from \"../slices/brandSlice\";\nimport { plannerSlice } from \"../slices/plannerSlice\";\nimport {\n authTokenSelector,\n diyFormSelector,\n getAppLastOpenedSelector,\n hasUserDeferredPwaPrompt,\n userSelector,\n userSlice,\n} from \"../slices/userSlice\";\nimport BottomNavigationStack from \"./BottomNavigationStack\";\nimport type { RootStackParamList } from \"./NavigationStackParams\";\n\nconst { useUsersAuthTokenLoginCreateMutation, useUsersAuthUsersMeRetrieveQuery, useUsersBrandRetrieveQuery } =\n backendApi;\n\nconst { identifyUserInSegment, identifyUserInIntercom } = analyticsInterface;\n\nconst customSupportSubdomain = getManagedCustomerPortalSubdomain(getHostname());\n\nconst Stack = createNativeStackNavigator();\nconst AddProductStack = createNativeStackNavigator();\nconst AddProductByBarcodeStack = createNativeStackNavigator();\nconst AddRecipeTemplateStack = createNativeStackNavigator();\nconst CreateOwnRecipeTemplateStack = createNativeStackNavigator();\nconst EditNutritionPlanStack = createNativeStackNavigator();\n\nconst defaultScreenOptions = { headerShown: false };\n\nconst appName = getAppName();\nconst parentStackNavigatorScreenOptions = { ...defaultScreenOptions, title: appName };\n\ntype UrlConfig = {\n queryParams: {\n magic_link_token: string;\n [CHECKOUT_QUERY_PARAM_NAME]: CheckoutParamStates;\n [CHECKOUT_PRICE_ID_PARAM_NAME]: string;\n };\n};\n\nconst TIMEOUT_FOR_ANALYTICS_TO_LOAD_IN_MS = 2000;\n\nfunction NavigationStackComponent(): JSX.Element {\n const dispatch = useDispatch();\n\n const [checkoutState, setCheckoutState] = React.useState(CheckoutState.NotInCheckout);\n // TODO: Once we fix deep linking for the checkout, this should just be passed using the Linking API.\n const [checkoutPriceId] = React.useState(\"\");\n\n // NOTE: If we are not using a custom support subdomain then there is no need to retrieve the url\n const {\n data: brand,\n isError,\n isLoading: isLoadingBrandQuery,\n error,\n } = useUsersBrandRetrieveQuery({ subdomain: customSupportSubdomain }, { skip: !customSupportSubdomain });\n\n if (isError) {\n console.error(error);\n\n Sentry.captureException(error);\n }\n\n useEffect(() => {\n if (brand) {\n dispatch(brandSlice.actions.storeBrandWhileLoggedOut(brand));\n }\n\n dispatch(brandSlice.actions.setIsLoadingBrand(isLoadingBrandQuery));\n }, [brand, isLoadingBrandQuery]);\n\n // NOTE: This is the self-service checkout. It is disabled for now.\n // const inCheckoutFlow = checkoutState !== CheckoutState.NotInCheckout;\n const inCheckoutFlow = false;\n\n const navigationRef = useNavigationContainerRef();\n const routeNameRef = useRef(\"\");\n\n function dispatchAuthTokenToStoreIfPresent(authTokenResponse: TokenCreate): void {\n if (authTokenResponse) {\n // NOTE: TokenCreate is the wrong response, we should fix the OpenAPI schema generation\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const authTokenFromRequest: string = authTokenResponse?.auth_token;\n dispatch(userSlice.actions.storeAuthToken(authTokenFromRequest));\n }\n }\n\n // TODO: We should add a spinner/loading component on this screen.\n // In fact, we should probably add a generic one which can be used on all screens\n const [getAuthTokenFromMagicLinkPost, { isLoading: isLoadingMagicTokenExchange, data: authTokenResponse }] =\n useUsersAuthTokenLoginCreateMutation();\n\n const eventListenerAddedResultRef = useRef(null);\n\n async function handleUrlParams(url: Linking.ParsedURL): Promise {\n // logger.debug(\"Inside handleUrlParams with: \", url);\n\n if (eventListenerAddedResultRef && eventListenerAddedResultRef.current) {\n eventListenerAddedResultRef.current.remove();\n } else {\n Sentry.captureMessage(\"eventListenerAddedResultRef.current was null\");\n }\n\n if (!url.queryParams) {\n console.log(\"No query params found in url\");\n return;\n }\n\n const hasCheckoutQueryParam = Boolean(url.queryParams[CHECKOUT_QUERY_PARAM_NAME]);\n if (\"magic_link_token\" in url.queryParams) {\n if (typeof url.queryParams.magic_link_token !== \"string\") {\n console.log(\"The magic link token is not a string\");\n return;\n }\n\n await getAuthTokenFromMagicLinkPost({\n tokenCreateRequest: { magic_link_token: url.queryParams.magic_link_token },\n });\n } else if (hasCheckoutQueryParam) {\n const checkoutQueryParamValue = url.queryParams[CHECKOUT_QUERY_PARAM_NAME];\n\n if (Array.isArray(checkoutQueryParamValue)) {\n Sentry.captureException(new Error(\"The checkout query param is an array\"));\n return;\n }\n if (typeof checkoutQueryParamValue !== \"string\") {\n Sentry.captureException(new Error(\"The checkout query param is not a string\"));\n return;\n }\n // Check checkoutQueryParamValue is a valid CheckoutState\n // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n if (checkoutQueryParamValue !== CheckoutParamStates.CHECKOUT) {\n Sentry.captureException(new Error(\"The checkout query param is not a valid CheckoutParamStates\"));\n return;\n }\n\n setCheckoutState(checkoutQueryParamValue);\n } else {\n console.log(\"No magic link token or checkout param found in url\");\n }\n }\n\n // NOTE: The magic link logic has been broken up into many functions to facilitate error logging in the compiled app.\n async function handleRedirectUrl(url: string | null): Promise {\n if (!url) {\n return;\n }\n\n let urlData: Linking.ParsedURL | null = null;\n try {\n urlData = Linking.parse(url);\n } catch (e) {\n logger.error(\"Error parsing url:\", e);\n // NOTE: This is for debugging in the compiled app\n // alert(`Error parsing url: ${e.url}`);\n // alert(`Error with event: ${JSON.stringify(url, null, 2)}`);\n }\n\n if (urlData) {\n await handleUrlParams(urlData);\n }\n }\n\n function handleRedirect(event: EventType): Promise {\n logger.debug(\"Inside handleRedirect with event:\", event);\n\n if (!event.url) {\n logger.error(\"No url on event:\", event);\n // NOTE: This is for debugging the compiled app\n // alert(`No url on event: ${event}`);\n // alert(`Event: ${JSON.stringify(event, null, 2)}`);\n\n return Promise.resolve(undefined);\n }\n\n return handleRedirectUrl(event.url);\n }\n\n const userLoggedIn = isUserLoggedIn(useSelector(userSelector));\n const authToken = useSelector(authTokenSelector);\n const hasUserDeferredPwaInstallPrompt = useSelector(hasUserDeferredPwaPrompt);\n\n const {\n isLoading: isLoadingUserQuery,\n error: userError,\n data: user,\n // FIXME: When this fires it causes a complete re-render of all components\n // This breaks any flow that is currently in operation (e.g create recipe, food search) as it resets the\n // For now we set the timeout to a high value so updates are eventually done but don't commonly happen.\n // states of components to their initial values.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n } = useUsersAuthUsersMeRetrieveQuery(undefined, { skip: !authToken, pollingInterval: 30 * 60 * 1000 });\n\n const is401Error = userError && \"status\" in userError && userError.status === 401;\n if (is401Error) {\n logger.debug(\"Error retrieving current user: \", userError);\n logout(dispatch);\n }\n\n // TODO: We are not cleaning (some of) up these properly and it leads to re-rendering issues\n useEffect(() => {\n // Listener for when app is already open\n Linking.getInitialURL()\n .then(handleRedirectUrl)\n .catch((err) => {\n logger.error(err);\n // NOTE: This is for debugging the compiled app\n // alert(\"Error after Linking.getInitialURL()\");\n // alert(error);\n // alert(JSON.stringify(error, null, 2));\n });\n\n // Listener for when app is not open\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n eventListenerAddedResultRef.current = Linking.addEventListener(\"url\", handleRedirect);\n\n dispatch(userSlice.actions.setViewAsUser(null));\n }, [dispatch]);\n\n const appLastOpenedDateString = useSelector(getAppLastOpenedSelector);\n\n // On first load, set the date last opened to now\n useEffect(() => {\n const hasAppBeenOpenedRecently = moment().diff(moment(appLastOpenedDateString), \"minutes\") < 15;\n if (appLastOpenedDateString && !hasAppBeenOpenedRecently) {\n dispatch(plannerSlice.actions.setCurrentDayInPlanner(moment().format()));\n }\n }, [appLastOpenedDateString, dispatch]);\n\n useEffect(() => {\n if (authTokenResponse) {\n dispatchAuthTokenToStoreIfPresent(authTokenResponse);\n }\n }, [authTokenResponse]);\n\n useEffect(() => {\n // NOTE: We also check is authToken is present to avoid re-populating the state on a logout call\n if (user && authToken) {\n if (user.id) {\n const userId = String(user.id);\n identifyUserInSegment(user);\n // NOTE: This is for the native library (which is not a snippet and so does not require any waiting to load)\n try {\n identifyUserInIntercom(userId);\n } catch (e) {\n Sentry.captureException(new Error(\"Error identifying user in Intercom\"));\n }\n\n // This is a backup in case analytics is not loaded when the above is called\n setTimeout(() => {\n identifyUserInSegment(user);\n sendUpdateRequestToIntercom();\n }, TIMEOUT_FOR_ANALYTICS_TO_LOAD_IN_MS);\n\n // NOTE: Intercom does not always identify correctly so we force an update\n setTimeout(() => {\n sendUpdateRequestToIntercom();\n }, TIMEOUT_FOR_ANALYTICS_TO_LOAD_IN_MS * 2);\n\n Sentry.setUser({ id: userId, username: user.email });\n } else {\n Sentry.captureException(new Error(\"User id is not present\"));\n }\n\n dispatch(userSlice.actions.storeUser(user));\n }\n }, [user, authToken]);\n\n // NOTE: This was tried but caused a blank screen on load\n const LoginGroup = (): JSX.Element => (\n \n \n \n \n \n );\n\n const LoginStack = createNativeStackNavigator();\n const LoginNestedStack = (): JSX.Element => (\n \n \n \n \n \n );\n\n const AddProductNestedStack = (): JSX.Element => (\n \n \n \n \n );\n\n const AddRecipeNestedStack = (): JSX.Element => (\n // NOTE: This library component has a ts compile error which we cannot fix\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n \n \n \n );\n\n const CreateOwnRecipeTemplateNestedStack = (): JSX.Element => (\n // NOTE: This library component has a ts compile error which we cannot fix\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n \n \n \n \n );\n\n const AddSingleProductByBarcodeNestedStack = (): JSX.Element => (\n // NOTE: This library component has a ts compile error which we cannot fix\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n \n \n \n );\n\n const EditNutritionPlanNestedStack = (): JSX.Element => (\n // NOTE: This library component has a ts compile error which we cannot fix\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n \n \n \n \n \n \n );\n\n const prefix = Linking.createURL(\"/\");\n\n const linking = {\n prefixes: [prefix],\n // Custom function to get the URL which was used to open the app\n // async getInitialURL() {\n // // First, you would need to get the initial URL from your third-party integration\n // // The exact usage depend on the third-party SDK you use\n // // For example, to get to get the initial URL for Firebase Dynamic Links:\n // const { isAvailable } = utils().playServicesAvailability;\n\n // if (isAvailable) {\n // const initialLink = await dynamicLinks().getInitialLink();\n\n // if (initialLink) {\n // return initialLink.url;\n // }\n // }\n\n // // As a fallback, you may want to do the default deep link handling\n // const url = await Linking.getInitialURL();\n\n // return url;\n // },\n\n // Custom function to subscribe to incoming links\n // subscribe(listener) {\n // // Listen to incoming links from Firebase Dynamic Links\n // const unsubscribeFirebase = dynamicLinks().onLink(({ url }) => {\n // listener(url);\n // });\n\n // // Listen to incoming links from deep linking\n // const linkingSubscription = Linking.addEventListener(\"url\", ({ url }) => {\n // listener(url);\n // });\n\n // return () => {\n // // Clean up the event listeners\n // unsubscribeFirebase();\n // linkingSubscription.remove();\n // };\n // },\n\n // config: {\n // // Deep link configuration\n // },\n };\n\n function getCheckoutFlowScreen(): JSX.Element {\n switch (checkoutState) {\n case CheckoutParamStates.CHECKOUT:\n return (\n \n );\n default:\n console.error(\"Unknown checkout state\");\n Sentry.captureException(new Error(`Unknown checkout state: ${checkoutState}`));\n\n return ;\n }\n }\n\n const initialScreenIfNotLoggedIn = inCheckoutFlow ? (\n getCheckoutFlowScreen()\n ) : (\n \n );\n\n const pwaSubdomainSignupScreen = ;\n\n /**\n * If the organisation is a PWA-based organisation (ie, organisation.uses_pwa = true), then we\n * want the user to be encouraged to install the PWA. We do this by putting up a (dismissable) message on installing.\n *\n * If the user is on desktop then we don't bother showing this option (there will be so few desktop users and\n * they are much less likely to get caught in their email app's web browser (on mobile)).\n *\n * If we are testing the PWA functionality then we want to have an override based on ENV vars.\n *\n * @returns\n */\n function getShouldShowPWAInstallInfoScreen(): boolean {\n if (hasUserDeferredPwaInstallPrompt) {\n return false;\n }\n\n if (isDesktopScreen()) {\n return false;\n }\n\n // TODO: This is not currently working\n // if (\"Cypress\" in window && window.Cypress?.TESTING_PWA === \"true\") {\n // return true;\n // }\n\n const isOnPWASubdomain = brand?.uses_pwa;\n if (isOnPWASubdomain && !platform.pwa) {\n return true;\n }\n\n return false;\n }\n\n const getInitialScreen = (): JSX.Element => {\n if (userLoggedIn) {\n // If user is DIY and has not completed the onboarding flow, show the onboarding flow\n return ;\n }\n\n if (getShouldShowPWAInstallInfoScreen()) {\n return pwaSubdomainSignupScreen;\n }\n\n return initialScreenIfNotLoggedIn;\n };\n\n const getCurrentRouteName = (): string | null => {\n if (!navigationRef.current) {\n return null;\n }\n\n const currentRoute = navigationRef.current?.getCurrentRoute();\n if (!currentRoute) {\n return null;\n }\n\n return currentRoute.name;\n };\n\n const navigationContainerOnReady = (): void => {\n const currentRouteName = getCurrentRouteName();\n if (currentRouteName) {\n routeNameRef.current = currentRouteName;\n }\n };\n const navigationContainerOnStateChange = (): void => {\n const previousRouteName = routeNameRef.current;\n const currentRouteName = getCurrentRouteName();\n\n if (currentRouteName !== null && previousRouteName !== currentRouteName) {\n // Save the current route name for later comparison\n routeNameRef.current = currentRouteName;\n\n analyticsInterface.trackPageOrScreenView(currentRouteName);\n }\n };\n\n useEffect(() => {\n // Add a new entry to the history stack when the app starts\n window.history.pushState(null, \"\", window.location.href);\n\n const handlePopState = (event: PopStateEvent): void => {\n event.preventDefault();\n\n // Custom logic to handle back navigation within the app\n if (shouldNavigateBack()) {\n navigateBackInApp();\n } else {\n // Optional: Instead of navigating back, you can show a prompt or prevent exiting\n window.history.pushState(null, \"\", window.location.href);\n }\n };\n\n window.addEventListener(\"popstate\", handlePopState);\n\n return () => {\n window.removeEventListener(\"popstate\", handlePopState);\n };\n }, []);\n\n const shouldNavigateBack = (): boolean => {\n // Check we are not on the initial screen\n const currentRouteName = navigationRef.current?.getCurrentRoute()?.name;\n return currentRouteName !== Routes.BottomNavigationTab;\n };\n\n const navigateBackInApp = (): void => {\n if (navigationRef.current) {\n navigationRef.current.goBack();\n }\n };\n\n const navigator = (\n Loading...}\n // See https://reactnavigation.org/docs/screen-tracking/#example\n ref={navigationRef}\n onReady={navigationContainerOnReady}\n onStateChange={navigationContainerOnStateChange}\n >\n \n {getInitialScreen()}\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n\n {/* NOTE: This is the same component but with a different name (to work with our conditional logic above) */}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {/* Coach screens */}\n \n \n \n \n \n {/* NutritionDayPlan screens */}\n {/* NOTE: Not currently used */}\n {/* */}\n {/* */}\n {/* */}\n \n \n );\n\n return navigator;\n}\n\nexport default connectActionSheet(NavigationStackComponent);\n","import \"react-native-gesture-handler\";\nimport \"expo-dev-client\";\nimport \"./i18n\";\nimport \"./intercom-override.css\";\n\nimport { ActionSheetProvider } from \"@expo/react-native-action-sheet\";\nimport {\n DMSans_400Regular as dmSans400Regular,\n DMSans_500Medium as dmSans500Medium,\n DMSans_700Bold as dmSans700Bold,\n useFonts,\n} from \"@expo-google-fonts/dm-sans\";\n// NOTE: Adding @sentry/react to the dependencies causes an error because of dependencies it installs.\n// Our other sentry dependencies (@sentry/react-native) already install @sentry/react so we can ignore this error.\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as SentryReact from \"@sentry/react\";\nimport Constants from \"expo-constants\";\nimport { StatusBar } from \"expo-status-bar\";\nimport Updates from \"expo-updates\";\nimport { FlagsProvider } from \"flagged\";\nimport _ from \"lodash\";\nimport { Button, Center, NativeBaseProvider, Text, View } from \"native-base\";\nimport platform from \"platform-detect\";\nimport React, { Dispatch } from \"react\";\nimport SSRProvider from \"react-bootstrap/SSRProvider\";\nimport { TFunction, useTranslation } from \"react-i18next\";\nimport { Dimensions, LogBox, StyleSheet } from \"react-native\";\nimport { Theme, ThemeProvider } from \"react-native-elements\";\nimport { SafeAreaView } from \"react-native-safe-area-context\";\nimport { enableFreeze } from \"react-native-screens\";\nimport { Provider, useDispatch, useSelector } from \"react-redux\";\nimport { persistStore } from \"redux-persist\";\nimport { PersistGate } from \"redux-persist/integration/react\";\nimport * as Sentry from \"sentry-expo\";\n\nimport { PRODUCTION, SENTRY_DSN } from \"./app/src/constants\";\nimport { getTheme } from \"./app/src/constants/theme\";\nimport { trackStripeCheckoutPurchaseEvent } from \"./app/src/helpers/facebookPixelHelpers\";\nimport { createFeaturesObject, FeatureFlag, isFeatureFlagActive } from \"./app/src/helpers/featureFlags\";\nimport { addOpacityToBaseHexColour } from \"./app/src/helpers/generalHelpers\";\nimport { logout } from \"./app/src/helpers/logout\";\nimport NavigationStack from \"./app/src/navigation/NavigationStack\";\nimport logger from \"./app/src/services/logger\";\nimport { getBrandSelector } from \"./app/src/slices/brandSlice\";\nimport { onboardingDataSelector } from \"./app/src/slices/onboardingSlice\";\nimport { userSelector } from \"./app/src/slices/userSlice\";\nimport { store, USER_LOGOUT_ACTION } from \"./store\";\n\nenableFreeze(true);\n\nconsole.log(\"Loading real Segment snippet because we are on a web platform\");\nrequire(\"./app/src/snippets/segment_snippet\");\nrequire(\"./app/src/snippets/facebook_pixel_snippet\");\n\nconst LOG_MESSAGES_TO_IGNORE = [\"SerializableStateInvariantMiddleware\", \"ImmutableStateInvariantMiddleware\"];\n\nif (!PRODUCTION) {\n LogBox.ignoreLogs(LOG_MESSAGES_TO_IGNORE);\n}\n\nif (SENTRY_DSN) {\n console.log(\"Sentry enabled.\");\n\n Sentry.init({\n dsn: SENTRY_DSN,\n enableInExpoDevelopment: true,\n debug: !PRODUCTION,\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.\n // We recommend adjusting this value in production.\n tracesSampleRate: 0.05,\n beforeSend(event, hint) {\n if (hint) {\n const exception = hint.originalException;\n const errorMessage = exception instanceof Error ? exception.message : exception;\n const MIDDLEWARE_EXCEPTION_NAME = \"api/executeQuery/rejected\";\n if (errorMessage && _.startsWith(errorMessage, MIDDLEWARE_EXCEPTION_NAME)) {\n // NOTE: We do this to avoid Sentry grouping different errors which are captured in the middleware\n\n // eslint-disable-next-line no-param-reassign\n event.fingerprint = [errorMessage];\n }\n }\n\n return event;\n },\n });\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: \"#fff\",\n },\n});\n\nfunction App(): JSX.Element | null {\n const [loaded] = useFonts({\n DMSans_400Regular: dmSans400Regular,\n DMSans_500Medium: dmSans500Medium,\n DMSans_700Bold: dmSans700Bold,\n });\n\n // Add useEffect to verify Facebook Pixel is loaded and fire purchase event\n React.useEffect((): (() => void) | void => trackStripeCheckoutPurchaseEvent(document.referrer), []);\n\n if (!loaded) {\n return null;\n }\n\n // TODO: Consider using this: https://www.npmjs.com/package/@bugsnag/plugin-react-native-unhandled-rejection\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function globalPromiseRejectionHandler(this: WindowEventHandlers, p: PromiseRejectionEvent): any {\n console.log(\"Unhandled Rejection at: Promise\", p);\n console.log(\"promise\", JSON.stringify(p, null, 2));\n\n console.log(\"Reason: \", this);\n }\n\n // Here we assign our handler to the corresponding global, window property\n window.onunhandledrejection = globalPromiseRejectionHandler;\n\n const ErrorBoundaryFallbackComponent = ({\n error,\n resetError,\n t,\n dispatch,\n }: {\n error: Error;\n resetError: () => void;\n t: TFunction;\n dispatch: Dispatch;\n }): JSX.Element => (\n \n \n
\n {t(\"general.error_boundary_generic_error\")}\n
\n {error ? {String(error)} : null}\n
\n\n \n {\n logout(dispatch);\n resetError();\n }}\n mt=\"2\"\n >\n {t(\"general.error_boundary_reset_app_button\")}\n \n \n );\n\n const NativeBaseApp = (): JSX.Element => {\n const user = useSelector(userSelector);\n const brand = useSelector(getBrandSelector);\n\n const dispatch = useDispatch();\n const { t } = useTranslation();\n\n const onboardingData = useSelector(onboardingDataSelector);\n\n const nativeBaseTheme = getTheme(user, brand, onboardingData);\n\n // Helper function to detect if device has home indicator\n const hasHomeIndicator = (): boolean => {\n // Only iOS devices can have home indicator\n if (!platform.ios) return false;\n\n // Check if running in a device with home indicator\n // This detects iPhone X and newer models\n const { height, width } = Dimensions.get(\"window\");\n const deviceRatio = height / width;\n\n // iPhone X, XS, 11 Pro, 12 mini, 13 mini have ratio ~2.17\n // iPhone XR, XS Max, 11, 11 Pro Max, 12/13/14 have higher ratios\n // Earlier iPhones have lower ratios\n return deviceRatio > 2.0;\n };\n\n /**\n * This is to account for the home indicator on iOS\n */\n const shouldHaveExtraPaddingAtBottomToAccountForIosHomeIndicator = hasHomeIndicator();\n\n const rnElementsTheme: Theme = {\n colors: {\n primary: nativeBaseTheme.colors.primary[500],\n // NOTE: `searchBg` is used as a lighter version of the primary colour when needed in the app\n searchBg: addOpacityToBaseHexColour(nativeBaseTheme.colors.primary[500], 12.5),\n },\n };\n\n const features = createFeaturesObject(user);\n\n return (\n \n \n \n \n (\n \n )}\n >\n \n \n \n \n \n \n \n \n \n );\n };\n\n // NOTE: Exposing the store for Cypress tests\n if (\"Cypress\" in window) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n window.store = store;\n }\n\n return (\n \n {/* NOTE: Since updating to Expo SDK 48 the type compiler gives an error on this. */}\n {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}\n {/* @ts-ignore */}\n \n \n \n \n \n \n );\n}\n\nexport default App;\n","import { registerRootComponent } from \"expo\";\n\nimport logger from \"./app/src/services/logger\";\nimport App from \"./AppContent\";\n\nlogger.info(\"Inside App.ts\");\n\nregisterRootComponent(App);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkweb\"] = self[\"webpackChunkweb\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [687], () => (__webpack_require__(2388)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["isUserLoggedIn","user","Boolean","getFavouritedRecipe","userFavouriteRecipeByRecipeTemplateId","recipeTemplateId","getDislikedRecipe","userDislikeRecipeByRecipeTemplateId","getLatestMeasurementForDate","measurements","date","measurementOnDate","orderedMeasurements","_","measurement","measurementValue","value","getOrganisation","_user$coach","coach","organisation","getKcalPerSession","exerciseTemplateIdRaw","minutesPerSession","weight","exerciseTemplates","exerciseTemplateId","Number","exerciseTemplate","id","kcal_per_kg_per_min","getUserSubscriptionStatus","_customer","customer","is_coach","statuses","subscriptions","INVALID_SUBSCRIPTION_STATUSES","userAccountIsDisabledOrHasInValidSubscription","_user$coach2","payment_status_override","account_enabled","validStatuses","status","includes","doesCustomerHaveAnyTrialingSubscriptions","_user$customer","_user$customer$","SELF_SERVICE_PRODUCT_STRIPE_IDS","LEGACY_CUSTOM_BRANDING_PRODUCT_STRIPE_IDS","shouldB2CCustomerHavePaidAccess","_user$customer4","_user$customer4$","_user$customer5","_user$customer5$","isFeatureFlagActive","FeatureFlagProper","FF_B2C_PAYWALL","product_stripe_id","length","subscription","shouldCustomerHaveAccessToAccountManagementFunctionality","productId","product","_user$customer3","_user$customer3$","matchingSubscriptions","items","item","plan","doesCustomerHaveValidSubscription","_user$customer2","_user$customer2$","isCustomerOnOurSelfServicePlan","shouldShowCustomBrandingHeader","_user$coach$organisat","logo_visible","isUserDiy","_getOrganisation","clients_are_diy","hasUserCompletedTheirDiyNutritionPlanningFormCompletely","intake","weekly_nutrition_plan","FeatureFlag","getHostname","window","location","hostname","getManagedCustomerPortalSubdomain","SUBDOMAIN_OVERRIDE","PRODUCTION","subdomain","parse","startsWith","isFeatureFlagEnabled","flag","doesOrganisationHaveManagedPlanning","isUserInPaymentRequiredOrganisation","_organisation$subdoma","toLowerCase","shouldHaveAccessToGenerateMeals","feature_flag_generate_meals_button_in_planner","shouldHaveAccessToCreateYourOwnRecipes","feature_flag_create_your_own_recipes","organisationIsDiyBillingForUsers","_user$coach3","_user$coach3$organisa","areWeAnOpinionatedRecipeInspirationApp","DisableProductLogging","MenstrualCyclePhase","HIGH_PROTEIN_ORGS","isHighProteinOrganisation","isLowProteinOrganisation","isImperialUnitsAllowedOrganisation","isKillerbodySubdomain","isBamifitSubdomain","getCurrentMenstrualCycleDay","onboardingState","menstrualCycle","gender","biometricData","_onboardingState$mens","lastMenstrualPeriodStartDate","menstrualCycleLength","lastPeriodDate","Date","targetDate","Math","floor","getTime","dateOfNextMenstruation","_onboardingState$mens2","daysSinceLastPeriod","completeCycles","nextMenstruationDate","setDate","getDate","getNumberOfDaysOfMenstruation","getMenstrualCycleProps","_onboardingState$mens3","nextPeriodDate","daysUntilNextPeriod","ceil","numberOfDaysInCycle","numberOfMenstruationDays","currentDayInCycle","getMenstrualCyclePropsFromUser","createOnboardingState","getCurrentMenstrualCyclePhase","_onboardingState$mens4","currentDay","ovulationDay","round","ovulationPhaseStart","ovulationPhaseEnd","Menstruation","Follicular","Ovulation","Luteal","getCurrentMenstrualCyclePhaseFromUser","doesTheUserHaveMenstrualPlanSet","_user$intake","last_menstrual_period_start_date","isPlantBasedDiet","dietaryPreference","DietaryPreferenceEnum","VEGAN","VEGETARIAN","h","o","u","n","d","document","q","onReady","c","push","createElement","async","src","getElementsByTagName","parentNode","insertBefore","DD_RUM","init","clientToken","applicationId","site","service","env","ENVIRONMENT","sessionSampleRate","sessionReplaySampleRate","trackUserInteractions","trackResources","trackLongTasks","defaultPrivacyLevel","allowedTracingUrls","DiaryImageUnselected","_jsx","Svg","width","height","fill","xmlns","children","Path","stroke","strokeWidth","strokeMiterlimit","strokeLinecap","strokeLinejoin","DiaryImageSelected","GroceriesImageUnselected","GroceriesImageSelected","ProfileAvatarSvg","viewBox","_jsxs","G","fillRule","NutriAIIcon","require","PadlockIcon","LoginBackground","CheckIcon","UncheckedIcon","EyeIcon","WeekmealsLogo","OnBoardingIcon1","OnBoardingIcon2","OnBoardingIcon3","OnBoardingIcon4","EmailConfirmedIcon","EmailSentIcon","AvatarIcon1","HeaderIcon","BicycleIcon","LiftIcon","PencilIcon","FoodIcon1","FoodIcon2","FoodIcon3","InfoIcon","PlusIconWhite","QuickIcon","CrossIcon","AddProductIcon","ScanProductIcon","GridIcon","Dropdown_Icon","RecipesIcon","DefaultRecipeImage","DefaultSpinner","AvatarIcon2","ProfileStart","ProfileAvatar","BackIcon","CloseIcon","QuestionMarkIcon","FilterIcon","InstagramIcon","PencilIconWhite","ForkKnifeIcon","ForkKnifeWhiteIcon","MicroscopeIcon","MicroscopeWhiteIcon","CalendarCheckIcon","CalendarCheckWhiteIcon","CheckListIcon","ChecklistWhiteIcon","CheckWhite","PlusIconGreen","AddMore","ListDotIcon","KebabIcon","FloatingButtonIcon","PlusIcon","MinusIcon","TickIcon","ClockIcon","ClockGraIcon","NextButtonGreen","CheckCircleIcon","MenuIcon","MenuOption","CloseIconCircle","LikeIconUnchecked","LikeIconChecked","SwapIngredient","SpinnerPlus","SpinnerMinus","LightbulbGreen","BarcodeScan","SearchGray","AddClient","BMR","Cardio","Digestion","LifeStyle","Avatar","CategoryMostChosen","CategoryFavourite","CategoryOwnRecipe","CategoryBrood","Recipe1","Recipe2","Recipe3","Recipe4","Recipe5","Recipe6","BlobImage","OwnRecipe1","OwnRecipe2","HomeFoodImage1","Timer","WhiteBackground","SearchIcon","Diary1","CircularCheckedIcon","UncheckedCircularIcon","AngryIcon","SadIcon","OkIcon","SatisfiedIcon","HappyIcon","RightIcon","SettingIcon","HumanIcon","PerfectPerformance","MagicLink","EmailIcon","MeditationIcon","EditPencilIcon","HappyAvoImage","MenstrualLutealPhase","MenstrualFollicularPhase","f","b","e","t","s","FB_PIXEL_ID","getFbPixelIdForSubdomain","fbq","callMethod","apply","arguments","queue","_fbq","loaded","version","Macros","GenderEnum","ActivityEnum","SustainabilityEnum","DietEnum","Stress","MeasurementType","ClientsFilterState","HALAL","LACTO_VEGETARIAN","OMNIVORE","OVO_VEGETARIAN","PESCATARIAN","WeeklyGoalEnum","LOSE_0_25_KG_PER_WEEK","LOSE_0_5_KG_PER_WEEK","LOSE_0_75_KG_PER_WEEK","LOSE_1_KG_PER_WEEK","MealMomentEnum","BREAKFAST","MORNING_SNACK","LUNCH","AFTERNOON_SNACK","DINNER","SNACK","LATE_SNACK","GoalEnum","GAIN_MUSCLE","LOSE_WEIGHT","RECOMPOSITION","MacrosPreferenceEnum","KETO","RECOMMENDED","CHOOSE_YOUR_OWN","LOW_CARB","MENOPAUSE","CYCLE_DIET","IntolerancesEnum","NO_INTOLERANCE","LACTOSE","CRUSTACEANS_AND_SHELLFISH","GLUTEN","NUTS","IngredientDislikesEnum","BEEF","EGGPLANT","HONEY","CILANTRO","MAYONNAISE","POTATO","MUSHROOM","TOMATO","BRUSSELS_SPROUTS","ingredientDislikeToBackendIdentifier","map","webpackContext","req","webpackContextResolve","__webpack_require__","Error","code","keys","Object","resolve","module","exports","DEFAULT_MEAL_TIMES","determineWeeklyGoal","goalWeeklyChangeInKg","weeklyChangeAbs","abs","initialState","goal","activityLevel","age","undefined","physicalStats","heightInCm","weightInKg","goalWeight","weeklyGoal","dietPreferences","dietType","intolerances","ingredientDislikes","mealTimes","preferences","usesImperialUnitsForRecipes","usesImperialUnitsForHeight","personalWeightUnit","onboardingSlice","createSlice","name","reducers","setGoal","state","action","payload","setActivityLevel","setBiometricData","setPhysicalStats","setWeeklyGoal","setDietPreferences","updatedDietPreferences","_objectSpread","_toConsumableArray","Set","setUserProfileData","_userProfile$uses_imp","_userProfile$uses_imp2","_userProfile$personal","userProfile","defaultPreferences","localeLower","Localization","isUS","isUK","getDefaultMeasurementPreferences","main_goal","activity","height_in_cm","goal_weight_in_kg","goal_weekly_change_in_kg","uses_imperial_measurements_for_recipes","uses_imperial_measurements_for_height","personal_weight_unit","resetOnboardingState","setPreferences","setMenstrualCycle","_onboardingSlice$acti","actions","onboardingDataSelector","createSelector","analytics","initialize","invoked","console","methods","factory","Array","prototype","slice","call","unshift","key","load","type","_loadOptions","_writeKey","SEGMENT_WRITE_KEY_FOR_WEB_SNIPPET","SNIPPET_VERSION","page","logLevel","feature_flags_for_user","_user$feature_flags_f","flags","switches","samples","createFeaturesObject","values","reduce","acc","_defineProperty","ScreenNames","ScreenIndexes","StyleSheet","create","container","flex","backgroundColor","mobileContainer","mainContainer","display","paddingHorizontal","Scale","paddingContainer","paddingVerticalContainer","paddingVertical","VerticalScale","safeAreaContainer","paddingTop","StatusBarHeight","bodyText12","fontSize","fontWeight","lineHeight","bodyText14","bodyText14W500","bodyText16","bodyText16W500","bodyText20","titleText16","titleText16Bold","titleText20Bold","titleText24","titleText24Bold","titleGreenText14","titleGreenText16","titleGreenText16Bold","titleGreenText20","titleGreenText24","descriptionText14","descriptionText16Bold","descriptionText24Bold","descriptionText16","smallText14","sectionText14Bold","sectionText16Bold","blueText14","bottomContainer","bottom","bottomFixedContainer","bottomContainerFixed","position","scrollContentContainer","paddingBottom","PHRASE_DISTRIBUTION_ID","PHRASE_ENVIRONMENT_ID","BACKEND_API_BASE_URL","SENTRY_DSN","SEGMENT_API_KEY_FOR_NATIVE_LIBRARY","logger","info","DEFAULT_LANGUAGE","Locale","nl","IS_MOBILE_PLATFORM","Platform","OS","BUILD_NUMBER","Application","nativeBuildVersion","KG_TO_LBS","LBS_TO_KG","RecipeCategory","SourceProvider","RecipeTag","walkThroughList","title","description","image","Images","icon","button","CATEGORY_POPULAR","CATEGORY_FAVOURITE","CATEGORY_OWN_RECIPE","MealType","MACRO_NAMES","homeData","time","homeCarouselData","DiaryItem","mealType","mealList","Ingredients","kcal","protein","RecipeMacrosItems","label","progress","total","unit","faces","selected","timeLineForProfile","absolute","wtLost","DEFAULT_WEEKLY_GOAL","menstrual_cycle_length","formatMomentAsBackendFormatDateString","format","getMomentFromBackendFormatDateString","dateString","moment","formatDate","isMobilePlatform","isIosWeb","platform","isMacOriOSWeb","formatMealType","getRecipeMealImage","recipeMeal","source","usedDefaultImage","recipe_template","uri","formatNumberAsWholeNumber","number","numeral","formatNumberAsWholeNumberForGroceryList","String","formatNumberToDecimalPlaces","decimalPlaces","toFixed","formatNumberAsDecimal","formatNumberAsPercentage","isIos","isExpoGo","Constants","appOwnership","AppOwnership","Expo","shouldStartIntercomLauncherHidden","IS_ANDROID_WEB","Device","osName","IS_IOS_WEB","IS_MOBILE_WEB","IS_EXPO_GO","executionEnvironment","ExecutionEnvironment","StoreClient","formatUserForDisplay","first_name","last_name","email","apiCallErrorHandler","error","entries","data","forEach","_ref","_ref2","_slicedToArray","errorMessage","alert","transformEuropeanStyleNumber","currentValue","replace","openURL","url","Linking","canOpenURL","then","_ref3","_asyncToGenerator","supported","Sentry","_x","catch","tryCatchWrapper","fn","getDeviceLanguage","en","getLocalizedDay","dateAsString","userLocaleFromStore","internationalizedDayString","lang","safeGet","list","index","getAppName","appJson","getAppIconPath","getNumberOfDaysUntilNextMonday","isoWeekday","isDateInCurrentWeek","startOfWeek","startOf","endOfWeek","endOf","isBetween","addOpacityToBaseHexColour","hex","opacity","toString","killerbody","DATADOG_ENABLED","SUPPORT_WEBSITE","analyticsJson","analyticsJsonRaw","getAnalytics","Intercom","hideDefaultLauncher","customerPixelMap","freeze","identifyUserInIntercom","userId","identify","resetAnalytics","reset","identifyUserInSegment","trackPageOrScreenView","pageName","properties","trackEvent","eventName","track","openIntercomMessenger","open","isIntercomLoaded","getCurrentFacebookPixelId","_Dimensions$get","Dimensions","get","isDesktopScreen","IS_NOT_DESKTOP","size","getStatusBarHeight","useKeyboardBottomInset","_React$useState","React","_React$useState2","setBottom","current","Keyboard","addListener","_e$startCoordinates","endCoordinates","max","startCoordinates","remove","ASYNC_STORAGE__LANGUAGE_KEY","languageDetector","detect","_detect","callback","storedLanguage","AsyncStorage","getItem","cacheUserLanguage","localResources","resources","_resources","translation","interpolation","escapeValue","fallbackLng","compatibilityJSON","i18n","ChainedBackend","use","initReactI18next","err","createThemeFromColour","colour","palette","Matercolor","primaryColourPalette","theme","defaultTheme","colors","primary","orange","amber","muted","red","gray","blue","fontConfig","DMSans","normal","config","initialColorMode","extendTheme","shouldWeChangeAppToHormoneTheme","onboardingData","_onboardingData$dietP","FF_FEMALE_HORMONES","isOnHormoneDiet","isOnCycleDiet","isOnMenopauseDiet","is_on_menopause_diet","HORMONE_HEX_COLOR","FACEBOOK_PIXEL_EVENTS","token","userFavouriteRecipes","byRecipeTemplateId","userDislikeRecipes","weightsByDate","stressByDate","sleepsByDate","distancesByDate","clients","clientMode","viewAsUser","clientNutritionPlans","diyForm","pwa","deferredPrompt","userSlice","storeAuthToken","storeUser","storeUserFavouriteRecipe","recipeId","userFavouriteRecipe","storeUserDislikeRecipe","_state$userDislikeRec","updatedUserDislikeRecipes","deleteUserFavouriteRecipe","deleteUserDislikeRecipe","_state$userDislikeRec2","storeUserWeightMeasurements","newWeights","created_at","storeUserStressMeasurements","newStress","stress","storeUserSleepMeasurements","newSleeps","sleep","storeUserDistanceMeasurements","newDistances","distance","storeClients","toggleClientMode","setViewAsUser","storeClientNutritionPlan","clientId","storeAppLastOpened","appLastOpenedDateString","storeLocale","locale","storeDiyFormResults","clearDiyFormResults","deferPwaInstallPrompt","selectSelf","authTokenSelector","userSelector","viewAsUserSelector","weeklyNutritionPlanSelector","_state$user","_state$user$intake","viewAsUserWeeklyNutritionPlanSelector","_state$viewAsUser","_state$viewAsUser$int","userFavouriteRecipesSelector","userDislikeRecipesSelector","_state$userDislikeRec3","userWeightMeasurementsSelector","_state$measurements","userStressMeasurementsSelector","_state$measurements2","userSleepMeasurementsSelector","_state$measurements3","userWaistCircumferenceMeasurementsSelector","_state$measurements4","_state$measurements5","distances","body_area","clientsSelector","clientModeSelector","_state$user2","clientNutritionPlansByIdSelector","getAppLastOpenedSelector","localeSelector","diyFormSelector","hasUserDeferredPwaPrompt","_state$pwa","api","createApi","baseQuery","fetchBaseQuery","baseUrl","prepareHeaders","headers","getState","set","userLocale","split","endpoints","brandingWhileLoggedOut","isLoadingBrand","brandSlice","storeBrandWhileLoggedOut","setIsLoadingBrand","getIsLoadingBrandSelector","getBrandSelector","food","byId","createOwnRecipeTemplate","foodSlice","storeFood","setCreateOwnRecipeTemplate","foodSelector","_state$food$byId","_state$food","calendarDays","byDate","groceryLists","currentDayInPlanner","plannerSlice","storeCalendarDay","calendarDay","resetCalendarDays","setGroceryLists","setCurrentDayInPlanner","calendarDaysSelector","_state$calendarDays$b","_state$calendarDays","groceryListSelector","_state$groceryLists","currentDayInPlannerSelector","debug","RUNNING_IN_CYPRESS","timeOfLastAlertToUser","rtkQueryErrorLogger","middlewareApi","next","isRejectedWithValue","meta","invalidTokenResponseForGetUserInfo","arg","queryCacheKey","errorWithCalendarDayCreation","endpointName","warn","errorForSentry","JSON","stringify","errorMessageForUser","language","nonFieldErrors","non_field_errors","now","sentryReduxEnhancer","combinedReducers","combineReducers","_combineReducers","reducerPath","reducer","USER_LOGOUT_ACTION","persistConfig","storage","blacklist","store","configureStore","devTools","persistReducer","middleware","getDefaultMiddleware","serializableCheck","ignoredActions","FLUSH","REHYDRATE","PAUSE","PERSIST","PURGE","REGISTER","concat","enhancers","setupListeners","dispatch","isIntercomWebLoaded","sendUpdateRequestToIntercom","analyticsInterface","logout","onPress","disable","externalTextStyle","externalContainerStyle","testID","useTheme","TouchableOpacity","dataElement","dataComponent","dataSourceFile","Button","borderRadius","disabled","marginLeft","marginRight","style","Text","color","styles","cardContainer","padding","textAlign","justifyContent","alignItems","borderWidth","borderStyle","shadowColor","shadowOpacity","shadowOffset","cardText","marginTop","emojiText","category","isSelected","onPressCard","Box","borderColor","bgColor","emoji","Image","resizeMode","textBoxContainer","hairlineWidth","alignSelf","marginBottom","flexDirection","wrapper","inputContainer","placeholder","maxLength","onChangeText","View","TextInput","keyboardType","returnKeyType","textStyle","inputbox","minHeight","commonStyles","multiline","numberOfLines","val","containerStyle","flexWrap","overflow","props","_objectWithoutProperties","_excluded","centeredView","modalView","shadowRadius","elevation","modalText","onRequestClose","ModalContent","modalRef","modalHeight","modalProps","externalModalViewStyle","titleExternalStyle","Modal","animationType","transparent","visible","top","left","CommonInnerText","right","CommonIconButton","modalizeRef","FooterComponent","modalizeProps","Modalize","ref","_FooterComponent","append","_ref$min","min","_ref$step","step","testIdPrefix","onChange","_ref$editable","editable","InputSpinner","inputProps","showBorder","leftButtonProps","rightButtonProps","buttonTextColor","colorPress","headerContainer","backIcon","headerTitle","showBackButton","onPressBack","onPressClose","checked","multipleSelectionsAllowed","Pressable","containerBase","checkedContainer","checkboxBase","checkboxChecked","multiCheckbox","checkedIcon","descriptionText","flexShrink","onClearText","leftIcon","backgroundColour","Input","py","px","InputLeftElement","InputRightElement","Icon","as","MaterialIcons","m","ml","_Fragment","placeholderTextColor","borderTopWidth","borderBottomWidth","borderLeftWidth","borderRightWidth","background","selectedValue","onValueChange","optionsList","Select","accessibilityLabel","_selectedItem","endIcon","mt","mr","itemValue","option","Item","stepIndexCircle","externalStyle","iconContainer","eyeIconStyle","marginHorizontal","searchIconStyle","onBlur","password","textBoxContainerExternalStyle","textWrapperExternalStyle","showEyeIcon","textInputProps","searchIcon","inputContainerStyle","onSubmitEditing","secureTextEntry","timerContainer","timerStyle","backgroundImageStyle","imageStyleContainer","wrapperComponent","ImageBackground","CommonSmallText","navigation","optionsData","pageTitle","pageDescription","buttonText","onButtonPress","inputLabel","_useState","useTranslation","useState","_useState2","selectedOptions","setSelectedOptions","CommonPageHeader","goBack","ScrollView","contentContainerStyle","marginVertical","optionData","CommonRadioBox","options","filter","onPressItem","CommonDescriptionInput","CommonButton","SelectOptionScreen","Routes","AddMainGoalScreen","AddMotivationGoalScreen","setInputText","RecipeSearchScreen","text","getServingDescriptionText","suggestedServing","ingredient","shouldWeUseImperial","servingDescription","serving_description","isServingInGrams","endsWith","servingInGrams","one_serving_in_metric_value","quantityOfServingDescription","parseFloat","isQuantityOfServingDescriptionANumber","isNaN","tail","join","test","ingredientInGrams","nonEditableDescription","quantity","quantityForDisplay","quantityForDisplayIsNotAUsualNumber","factor","ingredientInWeightStringForDisplay","getIngredientInWeightStringForDisplay","shouldWeUseImperialForThisUser","uses_imperial_measurements","createIngredientDescriptionComponent","suggested_serving","_getServingDescriptio","doNotShowIngredientInGrams","formatGroceryListItemQuantity","formatted","getGroceryListItemInWeight","shouldUseImperial","measurement_description","itemTotalInMetric","convert","from","to","TAGS","injectedRtkApi","injectEndpoints","build","checkoutSubscriptionVerificationCreate","mutation","query","queryArg","method","body","subscriptionVerificationRequest","foodCreateRecipeCreate","createNewRecipeTemplateRequest","foodFoodList","params","foodFoodRetrieve","foodGenerateMealsList","author","date_to_plan_for","dateToPlanFor","favourite","ingredient_search","ingredientSearch","meal_slot_specification","mealSlotSpecification","meal_types","mealTypes","page_size","pageSize","preparation_time_min__gte","preparationTimeMinGte","preparation_time_min__lte","preparationTimeMinLte","published","source_provider","sourceProvider","tags","foodGenerateMealsCreate","generatedRecipeMealRequest","foodIngredientList","foodIngredientCreate","ingredientPostRequest","foodIngredientRetrieve","foodIngredientUpdate","ingredientRequest","foodIngredientPartialUpdate","patchedIngredientRequest","foodIngredientDestroy","foodIngredientToAvoidList","foodIngredientToAvoidRetrieve","foodPreferredSuggestedServingsList","organisation_id","organisationId","foodPreferredSuggestedServingsCreate","preferredSuggestedServingRequest","foodPreferredSuggestedServingsRetrieve","foodPreferredSuggestedServingsUpdate","foodPreferredSuggestedServingsPartialUpdate","patchedPreferredSuggestedServingRequest","foodPreferredSuggestedServingsDestroy","foodQuickAddMealList","foodQuickAddMealCreate","quickAddMealRequest","foodQuickAddMealRetrieve","foodQuickAddMealUpdate","foodQuickAddMealPartialUpdate","patchedQuickAddMealRequest","foodQuickAddMealDestroy","foodRecipeFeedbackLineItemList","foodRecipeFeedbackLineItemCreate","recipeFeedbackLineItemRequest","foodRecipeFeedbackLineItemRetrieve","foodRecipeFeedbackLineItemUpdate","foodRecipeFeedbackLineItemPartialUpdate","patchedRecipeFeedbackLineItemRequest","foodRecipeFeedbackLineItemDestroy","foodRecipeMealList","foodRecipeMealCreate","recipeMealRequest","foodRecipeMealRetrieve","foodRecipeMealUpdate","foodRecipeMealPartialUpdate","patchedRecipeMealRequest","foodRecipeMealDestroy","foodRecipeTagList","foodRecipeTagRetrieve","foodRecipeTemplateList","foodRecipeTemplateCreate","recipeTemplateRequest","foodRecipeTemplateRetrieve","foodRecipeTemplateUpdate","foodRecipeTemplatePartialUpdate","patchedRecipeTemplateRequest","foodRecipeTemplateDestroy","foodSearchList","foodSearchAutocompleteRetrieve","foodSearchByBarcodeRetrieve","barcode","foodSingleFoodMealList","foodSingleFoodMealCreate","singleFoodMealRequest","foodSingleFoodMealRetrieve","foodSingleFoodMealUpdate","foodSingleFoodMealPartialUpdate","patchedSingleFoodMealRequest","foodSingleFoodMealDestroy","foodSuggestedServingList","foodSuggestedServingRetrieve","foodSuggestedServingSearchList","food__source_provider","foodSourceProvider","foodSuggestedServingSearchRetrieve","measurementsUserBodyFatPercentageList","measurementsUserBodyFatPercentageCreate","userBodyFatPercentageRequest","measurementsUserBodyFatPercentageRetrieve","measurementsUserBodyFatPercentageUpdate","measurementsUserBodyFatPercentagePartialUpdate","patchedUserBodyFatPercentageRequest","measurementsUserBodyFatPercentageDestroy","measurementsUserDistanceList","measurementsUserDistanceCreate","userDistanceRequest","measurementsUserDistanceRetrieve","measurementsUserDistanceUpdate","measurementsUserDistancePartialUpdate","patchedUserDistanceRequest","measurementsUserDistanceDestroy","measurementsUserSleepList","measurementsUserSleepCreate","userSleepRequest","measurementsUserSleepRetrieve","measurementsUserSleepUpdate","measurementsUserSleepPartialUpdate","patchedUserSleepRequest","measurementsUserSleepDestroy","measurementsUserStressList","measurementsUserStressCreate","userStressRequest","measurementsUserStressRetrieve","measurementsUserStressUpdate","measurementsUserStressPartialUpdate","patchedUserStressRequest","measurementsUserStressDestroy","measurementsDeleteMeasurementCreate","deleteMeasurementRequest","measurementsUserWeightList","measurementsUserWeightCreate","userWeightRequest","measurementsUserWeightRetrieve","measurementsUserWeightUpdate","measurementsUserWeightPartialUpdate","patchedUserWeightRequest","measurementsUserWeightDestroy","plannerAutoPlanDayCreate","autoPlannerRequest","plannerAutoPlanDaysCreate","autoPlanDaysRequest","plannerCalendarDayList","date__gte","dateGte","date__lt","dateLt","date__lte","dateLte","plannerCalendarDayCreate","calendarDayRequest","plannerCalendarDayRetrieve","plannerCalendarDayUpdate","plannerCalendarDayPartialUpdate","patchedCalendarDayRequest","plannerCalendarDayDestroy","plannerCalendarItemList","calendar_day__user","calendarDayUser","plannerCalendarItemCreate","calendarItemRequest","plannerCalendarItemRetrieve","plannerCalendarItemUpdate","plannerCalendarItemPartialUpdate","patchedCalendarItemRequest","plannerCalendarItemDestroy","plannerCopyMealsFromDateCreate","copyFromDateRequest","plannerCopyMealsToMealMomentCreate","copyMealsToMealMomentRequest","plannerEditRecipeMealPortionsUpdate","recipeMealPotionsRequest","plannerGroceryListList","plannerGroceryListCreate","groceryListUpdateCreateRequest","plannerGroceryListRetrieve","plannerGroceryListUpdate","plannerGroceryListPartialUpdate","plannerGroceryListDestroy","plannerGroceryListItemPartialUpdate","patchedGroceryListItemUpdateRequest","plannerPlanGeneratedRecipeMealCreate","planGeneratedRecipeMealRequest","plannerPlanSingleFoodMealCreate","planSingleFoodMealRequest","plannerSaveAndPlanRecipeMealCreate","saveAndPlanRecipeTemplateRequest","schemaRetrieve","usersAuthTokenLoginCreate","tokenCreateRequest","usersAuthTokenLogoutCreate","usersAuthUsersList","usersAuthUsersCreate","customUserCreateRequest","usersAuthUsersRetrieve","usersAuthUsersUpdate","userRequest","usersAuthUsersPartialUpdate","patchedUserRequest","usersAuthUsersDestroy","usersAuthUsersActivationCreate","activationRequest","usersAuthUsersMeRetrieve","usersAuthUsersMeUpdate","usersAuthUsersMePartialUpdate","usersAuthUsersMeDestroy","usersAuthUsersResendActivationCreate","sendEmailResetRequest","usersAuthUsersResetEmailCreate","usersAuthUsersResetEmailConfirmCreate","usernameResetConfirmRequest","usersAuthUsersResetPasswordCreate","usersAuthUsersResetPasswordConfirmCreate","passwordResetConfirmRequest","usersAuthUsersSetEmailCreate","setUsernameRequest","usersAuthUsersSetPasswordCreate","setPasswordRequest","usersBrandList","usersBrandRetrieve","usersCancelDealCreate","cancelSubscriptionRequest","usersClientsList","usersClientsCreate","usersClientsRetrieve","usersClientsUpdate","usersClientsPartialUpdate","usersClientsDestroy","usersCreateDemoAccountCreate","createDemoAccountRequest","usersCreateLoginSignupPortalCreate","loginSignupPortalRequest","usersCreateMagicLinkCreate","magicLinkCreateRequest","usersCreateOtpCreate","sendOtpRequest","usersCustomerPortalRedirectRetrieve","usersExerciseInstanceList","usersExerciseInstanceCreate","exerciseInstanceCreateUpdateRequest","usersExerciseInstanceRetrieve","usersExerciseInstanceUpdate","usersExerciseInstancePartialUpdate","patchedExerciseInstanceCreateUpdateRequest","usersExerciseInstanceDestroy","usersExerciseTemplateList","usersExerciseTemplateRetrieve","usersMealSlotSpecificationList","usersMealSlotSpecificationCreate","mealSlotSpecificationRequest","usersMealSlotSpecificationRetrieve","usersMealSlotSpecificationUpdate","usersMealSlotSpecificationPartialUpdate","patchedMealSlotSpecificationRequest","usersMealSlotSpecificationDestroy","usersNutritionDayPlanList","usersNutritionDayPlanCreate","nutritionDayPlanRequest","usersNutritionDayPlanRetrieve","usersNutritionDayPlanUpdate","usersNutritionDayPlanPartialUpdate","patchedNutritionDayPlanRequest","usersNutritionDayPlanDestroy","usersOrganisationCreate","updateCreateOrganisationRequest","usersOrganisationPartialUpdate","patchedUpdateCreateOrganisationRequest","usersOrganisationsBySubdomainList","usersPaginatedclientsList","accountEnabled","search","usersPaginatedclientsCreate","slimClientRequest","usersPaginatedclientsRetrieve","usersPaginatedclientsUpdate","usersPaginatedclientsPartialUpdate","patchedSlimClientRequest","usersPaginatedclientsDestroy","usersSetIngredientsToAvoidCreate","setIngredientToAvoidRequest","usersStripeCustomerPortalCreate","usersUserList","usersUserCreate","usersUserRetrieve","usersUserUpdate","usersUserPartialUpdate","usersUserDestroy","usersUserProfileList","usersUserProfileCreate","userProfileRequest","usersUserProfileRetrieve","usersUserProfileUpdate","usersUserProfilePartialUpdate","patchedUserProfileRequest","usersUserProfileDestroy","usersUserdislikerecipeList","recipe","usersUserdislikerecipeCreate","userDislikeRecipeRequest","usersUserdislikerecipeRetrieve","usersUserdislikerecipeUpdate","usersUserdislikerecipePartialUpdate","patchedUserDislikeRecipeRequest","usersUserdislikerecipeDestroy","usersUserfavouriterecipeList","usersUserfavouriterecipeCreate","userFavouriteRecipeRequest","usersUserfavouriterecipeRetrieve","usersUserfavouriterecipeUpdate","usersUserfavouriterecipePartialUpdate","patchedUserFavouriteRecipeRequest","usersUserfavouriterecipeDestroy","usersVerifyOtpCreate","verifyOtpRequest","usersWeeklyNutritionPlanList","usersWeeklyNutritionPlanCreate","weeklyNutritionPlanCreateRequest","usersWeeklyNutritionPlanRetrieve","usersWeeklyNutritionPlanUpdate","weeklyNutritionPlanUpdateRequest","v2SchemaRetrieve","v3SchemaRetrieve","overrideExisting","useCheckoutSubscriptionVerificationCreateMutation","useFoodCreateRecipeCreateMutation","useFoodFoodListQuery","useFoodFoodRetrieveQuery","useFoodGenerateMealsListQuery","useFoodGenerateMealsCreateMutation","useFoodIngredientListQuery","useFoodIngredientCreateMutation","useFoodIngredientRetrieveQuery","useFoodIngredientUpdateMutation","useFoodIngredientPartialUpdateMutation","useFoodIngredientDestroyMutation","useFoodIngredientToAvoidListQuery","useFoodIngredientToAvoidRetrieveQuery","useFoodPreferredSuggestedServingsListQuery","useFoodPreferredSuggestedServingsCreateMutation","useFoodPreferredSuggestedServingsRetrieveQuery","useFoodPreferredSuggestedServingsUpdateMutation","useFoodPreferredSuggestedServingsPartialUpdateMutation","useFoodPreferredSuggestedServingsDestroyMutation","useFoodQuickAddMealListQuery","useFoodQuickAddMealCreateMutation","useFoodQuickAddMealRetrieveQuery","useFoodQuickAddMealUpdateMutation","useFoodQuickAddMealPartialUpdateMutation","useFoodQuickAddMealDestroyMutation","useFoodRecipeFeedbackLineItemListQuery","useFoodRecipeFeedbackLineItemCreateMutation","useFoodRecipeFeedbackLineItemRetrieveQuery","useFoodRecipeFeedbackLineItemUpdateMutation","useFoodRecipeFeedbackLineItemPartialUpdateMutation","useFoodRecipeFeedbackLineItemDestroyMutation","useFoodRecipeMealListQuery","useFoodRecipeMealCreateMutation","useFoodRecipeMealRetrieveQuery","useFoodRecipeMealUpdateMutation","useFoodRecipeMealPartialUpdateMutation","useFoodRecipeMealDestroyMutation","useFoodRecipeTagListQuery","useFoodRecipeTagRetrieveQuery","useFoodRecipeTemplateListQuery","useFoodRecipeTemplateCreateMutation","useFoodRecipeTemplateRetrieveQuery","useFoodRecipeTemplateUpdateMutation","useFoodRecipeTemplatePartialUpdateMutation","useFoodRecipeTemplateDestroyMutation","useFoodSearchListQuery","useFoodSearchAutocompleteRetrieveQuery","useFoodSearchByBarcodeRetrieveQuery","useFoodSingleFoodMealListQuery","useFoodSingleFoodMealCreateMutation","useFoodSingleFoodMealRetrieveQuery","useFoodSingleFoodMealUpdateMutation","useFoodSingleFoodMealPartialUpdateMutation","useFoodSingleFoodMealDestroyMutation","useFoodSuggestedServingListQuery","useFoodSuggestedServingRetrieveQuery","useFoodSuggestedServingSearchListQuery","useFoodSuggestedServingSearchRetrieveQuery","useMeasurementsUserBodyFatPercentageListQuery","useMeasurementsUserBodyFatPercentageCreateMutation","useMeasurementsUserBodyFatPercentageRetrieveQuery","useMeasurementsUserBodyFatPercentageUpdateMutation","useMeasurementsUserBodyFatPercentagePartialUpdateMutation","useMeasurementsUserBodyFatPercentageDestroyMutation","useMeasurementsUserDistanceListQuery","useMeasurementsUserDistanceCreateMutation","useMeasurementsUserDistanceRetrieveQuery","useMeasurementsUserDistanceUpdateMutation","useMeasurementsUserDistancePartialUpdateMutation","useMeasurementsUserDistanceDestroyMutation","useMeasurementsUserSleepListQuery","useMeasurementsUserSleepCreateMutation","useMeasurementsUserSleepRetrieveQuery","useMeasurementsUserSleepUpdateMutation","useMeasurementsUserSleepPartialUpdateMutation","useMeasurementsUserSleepDestroyMutation","useMeasurementsUserStressListQuery","useMeasurementsUserStressCreateMutation","useMeasurementsUserStressRetrieveQuery","useMeasurementsUserStressUpdateMutation","useMeasurementsUserStressPartialUpdateMutation","useMeasurementsUserStressDestroyMutation","useMeasurementsDeleteMeasurementCreateMutation","useMeasurementsUserWeightListQuery","useMeasurementsUserWeightCreateMutation","useMeasurementsUserWeightRetrieveQuery","useMeasurementsUserWeightUpdateMutation","useMeasurementsUserWeightPartialUpdateMutation","useMeasurementsUserWeightDestroyMutation","usePlannerAutoPlanDayCreateMutation","usePlannerAutoPlanDaysCreateMutation","usePlannerCalendarDayListQuery","usePlannerCalendarDayCreateMutation","usePlannerCalendarDayRetrieveQuery","usePlannerCalendarDayUpdateMutation","usePlannerCalendarDayPartialUpdateMutation","usePlannerCalendarDayDestroyMutation","usePlannerCalendarItemListQuery","usePlannerCalendarItemCreateMutation","usePlannerCalendarItemRetrieveQuery","usePlannerCalendarItemUpdateMutation","usePlannerCalendarItemPartialUpdateMutation","usePlannerCalendarItemDestroyMutation","usePlannerCopyMealsFromDateCreateMutation","usePlannerCopyMealsToMealMomentCreateMutation","usePlannerEditRecipeMealPortionsUpdateMutation","usePlannerGroceryListListQuery","usePlannerGroceryListCreateMutation","usePlannerGroceryListRetrieveQuery","usePlannerGroceryListUpdateMutation","usePlannerGroceryListPartialUpdateMutation","usePlannerGroceryListDestroyMutation","usePlannerGroceryListItemPartialUpdateMutation","usePlannerPlanGeneratedRecipeMealCreateMutation","usePlannerPlanSingleFoodMealCreateMutation","usePlannerSaveAndPlanRecipeMealCreateMutation","useSchemaRetrieveQuery","useUsersAuthTokenLoginCreateMutation","useUsersAuthTokenLogoutCreateMutation","useUsersAuthUsersListQuery","useUsersAuthUsersCreateMutation","useUsersAuthUsersRetrieveQuery","useUsersAuthUsersUpdateMutation","useUsersAuthUsersPartialUpdateMutation","useUsersAuthUsersDestroyMutation","useUsersAuthUsersActivationCreateMutation","useUsersAuthUsersMeRetrieveQuery","useUsersAuthUsersMeUpdateMutation","useUsersAuthUsersMePartialUpdateMutation","useUsersAuthUsersMeDestroyMutation","useUsersAuthUsersResendActivationCreateMutation","useUsersAuthUsersResetEmailCreateMutation","useUsersAuthUsersResetEmailConfirmCreateMutation","useUsersAuthUsersResetPasswordCreateMutation","useUsersAuthUsersResetPasswordConfirmCreateMutation","useUsersAuthUsersSetEmailCreateMutation","useUsersAuthUsersSetPasswordCreateMutation","useUsersBrandListQuery","useUsersBrandRetrieveQuery","useUsersCancelDealCreateMutation","useUsersClientsListQuery","useUsersClientsCreateMutation","useUsersClientsRetrieveQuery","useUsersClientsUpdateMutation","useUsersClientsPartialUpdateMutation","useUsersClientsDestroyMutation","useUsersCreateDemoAccountCreateMutation","useUsersCreateLoginSignupPortalCreateMutation","useUsersCreateMagicLinkCreateMutation","useUsersCreateOtpCreateMutation","useUsersCustomerPortalRedirectRetrieveQuery","useUsersExerciseInstanceListQuery","useUsersExerciseInstanceCreateMutation","useUsersExerciseInstanceRetrieveQuery","useUsersExerciseInstanceUpdateMutation","useUsersExerciseInstancePartialUpdateMutation","useUsersExerciseInstanceDestroyMutation","useUsersExerciseTemplateListQuery","useUsersExerciseTemplateRetrieveQuery","useUsersMealSlotSpecificationListQuery","useUsersMealSlotSpecificationCreateMutation","useUsersMealSlotSpecificationRetrieveQuery","useUsersMealSlotSpecificationUpdateMutation","useUsersMealSlotSpecificationPartialUpdateMutation","useUsersMealSlotSpecificationDestroyMutation","useUsersNutritionDayPlanListQuery","useUsersNutritionDayPlanCreateMutation","useUsersNutritionDayPlanRetrieveQuery","useUsersNutritionDayPlanUpdateMutation","useUsersNutritionDayPlanPartialUpdateMutation","useUsersNutritionDayPlanDestroyMutation","useUsersOrganisationCreateMutation","useUsersOrganisationPartialUpdateMutation","useUsersOrganisationsBySubdomainListQuery","useUsersPaginatedclientsListQuery","useUsersPaginatedclientsCreateMutation","useUsersPaginatedclientsRetrieveQuery","useUsersPaginatedclientsUpdateMutation","useUsersPaginatedclientsPartialUpdateMutation","useUsersPaginatedclientsDestroyMutation","useUsersSetIngredientsToAvoidCreateMutation","useUsersStripeCustomerPortalCreateMutation","useUsersUserListQuery","useUsersUserCreateMutation","useUsersUserRetrieveQuery","useUsersUserUpdateMutation","useUsersUserPartialUpdateMutation","useUsersUserDestroyMutation","useUsersUserProfileListQuery","useUsersUserProfileCreateMutation","useUsersUserProfileRetrieveQuery","useUsersUserProfileUpdateMutation","useUsersUserProfilePartialUpdateMutation","useUsersUserProfileDestroyMutation","useUsersUserdislikerecipeListQuery","useUsersUserdislikerecipeCreateMutation","useUsersUserdislikerecipeRetrieveQuery","useUsersUserdislikerecipeUpdateMutation","useUsersUserdislikerecipePartialUpdateMutation","useUsersUserdislikerecipeDestroyMutation","useUsersUserfavouriterecipeListQuery","useUsersUserfavouriterecipeCreateMutation","useUsersUserfavouriterecipeRetrieveQuery","useUsersUserfavouriterecipeUpdateMutation","useUsersUserfavouriterecipePartialUpdateMutation","useUsersUserfavouriterecipeDestroyMutation","useUsersVerifyOtpCreateMutation","useUsersWeeklyNutritionPlanListQuery","useUsersWeeklyNutritionPlanCreateMutation","useUsersWeeklyNutritionPlanRetrieveQuery","useUsersWeeklyNutritionPlanUpdateMutation","useV2SchemaRetrieveQuery","useV3SchemaRetrieveQuery","LIKE_DISLIKE_TAGS","FAVOURITE","DISLIKE","backendApi","enhanceEndpoints","addTagTypes","providesTags","OWN_MEAL","GENERATE_MEALS","CLIENTS","CALENDAR_DAY","invalidatesTags","USER","USER_MEASUREMENT_WEIGHT","USER_MEASUREMENT_SLEEP","USER_MEASUREMENT_STRESS","USER_MEASUREMENT_WAIST_CIRCUMFERENCE","PLACEHOLDER_NEW_EXERCISE","exercise","minutes_per_session","sessions_per_week","rnPickerSelectInnerComponentStyle","paddingRight","rnPickerSelectStyle","inputIOS","inputAndroid","inputWeb","exerciseInstanceSchema","Yup","shape","positive","required","default","nullable","userProfileFormSchema","oneOf","weight_in_lbs","body_fat_percentage","diet","food_intolerances_gluten","food_intolerances_lactose","food_intolerances_nut","food_intolerances_crustaceans_shellfish","exercise_instances","of","_client$intake","_client$intake2","_client$intake2$exerc","onSubmitUserProfile","client","basicInfoForm","submitButtonText","_ref$showLoading","showLoading","isDesktop","useSelector","_useUsersExerciseTemp","isLoadingGetExerciseTemplates","isLoading","defaultUserProfileFormValues","FEMALE","SEDENTARY","userProfileFormInitialValues","cast","exerciseInstance","userProfileForm","Formik","initialValues","validationSchema","onSubmit","isSubmitting","handleChange","handleBlur","setFieldValue","handleSubmit","errors","isValid","dirty","persistentScrollbar","showsVerticalScrollIndicator","AlertDialog","Body","Row","bold","firstName","lastName","Divider","nativeID","FormControl","isRequired","isInvalid","Label","Radio","Group","MALE","my","ErrorMessage","lbs","kg","selectTextOnFocus","Link","href","isExternal","underline","EvilIcons","RNPickerSelect","useNativeAndroidPickerStyle","Checkbox","isChecked","food_intolerances_crustaceans_and_shellfish","Spinner","FieldArray","render","arrayHelpers","_values$exercise_inst","_client$intake3","p","Field","exerciseId","handleReplace","results","exercise_name","Flex","IconButton","kcal_per_session","AntDesign","Footer","isDisabled","useExternalLink","setIsLoading","_useState3","_useState4","setError","openLink","newWindow","sentryError","scope","setContext","isPWA","userAgent","navigator","closed","focusError","emailIconStyle","titleStyle","middleTextStyle","emailStyle","lastTextStyle","MAGIC_LINK_HELP_ARTICLE","route","Center","CommonText","NO_CODE_STRIPE_CUSTOMER_PORTAL_URL","StripeCustomerPortalLink","isUpgradeNowButton","_ref$variant","variant","_ref$iconType","iconType","_useUsersStripeCustom","_useUsersStripeCustom2","createStripeCustomerPortal","isLoadingPortal","_useExternalLink","isLoadingLink","portalUrl","setPortalUrl","isFetchingUrl","setIsFetchingUrl","useEffect","fetchPortalUrl","stripeCustomerPortal","unwrap","portal_url","optionalProps","Ionicons","isLoadingText","HUBSPOT_DEMO_CALENDAR_URL","BookACallLink","_ref4","events","click_book_a_demo_button","encodeURIComponent","ContactSupportLink","_ref6","_ref6$width","_ref6$size","_ref6$mt","_ref6$shadow","shadow","customSupportSubdomain","brand","skip","support_url","colorScheme","_text","TroubleLoggingInLink","_useUsersBrandRetriev2","isError","TroubleInstallingPWAArticleComponent","HelpArticleButton","articleUrl","ctaText","_ref7","bg","_hover","_pressed","AppImage","imageSize","ScreenWidth","logo","marginY","initialsCircle","initialsText","routeViewContainer","modalButtonContainer","fabBtnContainer","clientViewContainer","basicUserInfoFormSchema","trim","basicUserInfoFormInitialValues","useDispatch","setPage","_useDisclose","useDisclose","isOpenAddNewClientDialog","isOpen","onOpenAddNewClientDialog","onOpen","onCloseAddNewClientDialog","onClose","deactivateClientDialogRef","useRef","searchText","setSearchText","_useState5","_useState6","searchTerm","setSearchTerm","ACTIVE_CLIENTS","clientsFilter","setClientsFilter","filterActiveClientsOnly","_useUsersPaginatedcli","pollingInterval","clientsListResponse","isFetchingClientsList","isFetching","_useUsersAuthUsersCre","_useUsersAuthUsersCre2","createUserBackendCall","_useUsersExerciseInst","_useUsersExerciseInst2","createExerciseInstanceBackendCall","isLoadingCreateExerciseInstance","delayDebounceFn","setTimeout","clearTimeout","clientsListComponent","FlatList","renderItem","borderTopRightRadius","borderTopLeftRadius","borderBottomRightRadius","borderBottomLeftRadius","trace","navigate","CoachModeClientInfoScreen","separator","keyExtractor","numColumns","ItemSeparatorComponent","columnWrapperStyle","headerComponent","desktopOnlyNavbar","activeClientsLabel","deactivatedClientsLabel","DEACTIVATED_CLIENTS","activeInactiveTabsComponent","filterState","i","renderingActiveClientsTab","shouldHighlightThisTab","_useState7","_useState8","validatedBasicInfoFormValues","setValidatedBasicInfoFormValues","createUserRequestPostBody","sustainability","SUSTAINABLE","foodIntolerancesGluten","foodIntolerancesLactose","foodIntolerancesNut","foodIntolerancesCrustaceansShellfish","createdUser","exerciseCreationPromises","Promise","all","addNewClientDialog","leastDestructiveRef","Content","CloseButton","Header","EditUserProfileComponent","pressedCreateNewClientButton","floatingAddNewClientButton","Fab","placement","renderInPortal","clientsSearchAndAddNewClientButton","mx","count","isCustomerCurrentlyTrialing","upgradeNowButton","totalPages","total_pages","paginationComponent","SafeAreaView","coolGray","ProgressBar","_ref$warningMargin","warningMargin","_ref$allowedToGoOver","allowedToGoOver","_ref$width","warningValue","Progress","unfilledColor","rowContainer","transformStyle","transform","rotateZ","macroDetail","exceptItems","excludeDetail","verticalMode","showLabel","_ref$showUnit","showUnit","_ref$optionalPercenta","optionalPercentage","_ref$showTarget","showTarget","_ref$showProgress","showProgress","macroForDisplay","macroName","progressText","NativeText","KCAL_IN_MACRO_LOOKUP","fat","carbohydrates","calculateDailyTotalForMacro","macro","mealSlotSpecifications","calculateMacroPercentageOfDailyTotalEnergy","getNutritionDayPlanOverviewComponent","showPercentages","percentageObject","MacroProgressWidget","lifestyleFactors","MILDLY_ACTIVE","ACTIVE","VERY_ACTIVE","computeEnergyExpenditure","input","energy","leanBodyMass","daily","bmr","ree","lifestyle","cardio","weightlifting","foodDigestion","lbm","bodyFatPercentage","computeLeanBodyMass","thermicEffectOfDiet","computeRestingEnergyExpenditure","computeLifestyle","weekly","weeklyDuration","duration","weeklyFrequency","session","burnRate","computeNetEnergyExpenditureForCardio","partial_sum","computeCardio","inactivityFactor","computeWeightlifting","_energy$daily","computeFoodDigestion","_energy$daily2","computeTDEE","getTotalCalorieIntake","energyBalance","computeRecommendedMacros","optimal","optimize","computeOptimalProtein","_energy$daily3","computeOptimalFat","computeOptimalMacros","calories","fatAdjustmentFactor","proteinFactor","carbs","fiber","NaN","computeDailyMacros","macroTypes","computeCalories","macros","factors","x","a","convertLegacyMealTypeToMealType","legacyMealType","convertMealTypeToLegacyMealType","createLegacyCardio","netEnergyExpenditure","getCardioInputArray","calculateEnergyExpenditure","getEnergyInput","getRecommendedDailyMacronutrientIntake","harrisBenedictBMR","isMale","mifflinStJoerRMR","legacyMacroTypes","scaleMealMacros","meals","scaled","totalSize","enabled","computeTotalSize","lastEnabled","lastIndexOf","isValidSize","rest","roundMacros","scale","result","scaleMacros","updateCalories","defaultSizes","rebalanceSizes","counts","breakfast","lunch","snack","dinner","dinnerSize","remainingSize","tdee","bodyFatPerc","energyBalanceValue","lowProtein","proteinPerLbm","updateDailyMacros","stats","prefs","adjustedDailyMacros","computedDailyMacros","DEFAULT_NUTRITION_PLAN_NAME","convertToLegacyBodyStats","_legacyEnergyExpendit","_legacyEnergyExpendit2","_legacyEnergyExpendit3","_legacyEnergyExpendit4","legacyEnergyExpenditure","bmrHarrisBenedict","rmrMifflinStJour","bmi","bodyMeasurement","bfp","HealthCalculatorGender","Male","Female","leanBodyMassInKg","physicalActivityLevel","activityCalories","calculateEnergyExpenditureWithoutBodyFat","convertToLegacyFoodPreferences","getDefaultLegacyInput","daysForNutritionPlan","legacyInput","mealMoment","days","convertToLegacyInput","legacyBodyStats","legacyFoodPreferences","updateLegacyInput","convertToMealSlotSpecifications","rawMealSlotSpecificationsWithoutOrder","meal","mss","legacyMealState","meal_type","meal_moment","order","nutrition_day_plan","createMealSlotSpecificationFromLegacyMealState","getLegacyInputFromMealSlotSpecifications","nutritionDayPlan","meal_slot_specifications","energyExpenditure","totalEnergy","legacyDailyMacros","energyBalanceString","legacyMeals","getUpdatedMealSlotSpecificationsFromFormValues","updatedMeals","updatedMacros","updatedLegacyMealStateArray","updatedMealSlotSpecifications","questionMarkImg","recipeMacrosContainer","externalContainer","deactiveButton","marginTop24","marginVertical24","settingIcon","modalContainer","LogoCurve","organisationForPreview","isHormoneFeatureFlagActive","isKillerBodyOrganisation","shouldUseHormoneLogo","logoSource","mb","zIndex","alt","previewingOnDesktopScreen","disable_logo_curve","deviceWidth","TimePeriod","FontSize","h1","h2","h3","h4","h5","h6","small","mini","micro","FontFamily","DATE_FORMAT_FOR_DATE_IN_SHORT_PERIOD","createChartLabelsForLineChart","numDaysInChart","subtract","PROGRESS_CHART_CONFIG","backgroundGradientFrom","backgroundGradientTo","useShadowColorFromDataset","propsForBackgroundLines","strokeDasharray","propsForLabels","fontFamily","BAR_CHART_CONFIG","barPercentage","NUM_DAYS_FOR_TIME_PERIOD","_NUM_DAYS_FOR_TIME_PE","LAST_WEEK","LAST_2_WEEKS","LAST_MONTH","LAST_2_MONTHS","SINCE_BEGINNING","getSortedDates","userMeasurements","getNumDaysInChart","selectedTimePeriod","sortedDates","furthestBackDateWeHaveDataFor","diff","filterUserMeasurementsForTimePeriod","userWeightMeasurements","startDate","endDate","userMeasurementsArray","userWeightMeasurementArray","isMeasurementInRange","getUserMeasurementsForTimePeriod","_getStartAndEndDate","getStartAndEndDate","getDataPointsForChart","numDaysInThePast","formattedDate","reverse","getDataPointsForChartWithNullsPadded","dataPointsForChart","dataPoint","nextNonNullDataPointIndex","startingIndex","point","lastNonNullDataPointIndex","findIndexOfPreviousNonNullDataPoint","getDataPointIndicesWithNoData","indicesOfNullDataPoints","getYAxisMin","dataPointsForChartWithNullsPadded","getYAxisMax","getStressEmojis","VERY_LOW","LOW","MEDIUM","HIGH","VERY_HIGH","formatMeasurementForDisplay","userMeasurement","measurementType","WEIGHT","SLEEP","STRESS","stressEmojis","WAIST_CIRCUMFERENCE","createTableDisplayingMeasurements","deleteMeasurementForDate","unsortedTableData","measurementArray","formatDateForDisplay","tableData","unix","pr","Table","rowData","TableRow","margin","nameStyle","topTitleStyle","headerStyle","separatorStyle","profileCircle","profileIconStyle","profileTitleStyle","listTopContainer","rightIconStyle","listContainer","parentlistContainer","iconStyle","progressTitleContainer","topContainer","timeContainer","plusIconContainer","wrapperStyle","labelContainer","timeLabelStyle","innerTextStyle","rightContainerStyle","mealBoxText","mealBox","plusIconStyle","progressContainer","spinnerExternalStyle","textStyleForProgress","texContainer","sideTextStyle","optionalStyle","screenWidth","MEASUREMENT_POLLING_INTERVAL","_dataForSleepChart$da","_dataForSleepChart$da2","_dataForStressChart$d","_dataForStressChart$d2","_dataForWaistCircumfe","_dataForWaistCircumfe2","userNotViewAs","userUsesImperialMeasurements","userWeightMeasurementsInKg","userSleepMeasurements","userStressMeasurements","userWaistCircumferenceMeasurements","isOpenAddUserMeasurementsModal","onOpenAddUserMeasurementsModal","onCloseAddUserMeasurementsModal","setSelectedTimePeriod","_React$useState3","_React$useState4","selectedMeasurementType","setSelectedMeasurementType","_useMeasurementsUserW","inputNewWeightMeasurementOnBackend","_useMeasurementsUserS","inputNewSleepMeasurementOnBackend","_useMeasurementsUserS3","inputNewMoodMeasurementOnBackend","_useMeasurementsUserD","inputNewUserDistanceMeasurementOnBackend","_useMeasurementsDelet","deleteMeasurementOnBackend","_useMeasurementsUserW3","userWeightMeasurementsResponse","_useMeasurementsUserS5","refetch","userSleepMeasurementsResponse","_useMeasurementsUserS6","userStressMeasurementsResponse","_useMeasurementsUserD3","userDistanceMeasurementsResponse","onDeleteProgressMeasurementForDate","_x2","_onDeleteProgressMeasurementForDate","measurementId","measurement_id","measurement_type","user_id","formValidationSchema","typeError","waistCircumference","toDate","createdAt","toISOString","requests","_x3","getMarkedDatesFromDate","markedDates","addMeasurementsModal","Calendar","onDayPress","day","textDayFontFamily","textMonthFontFamily","textDayHeaderFontFamily","arrowColor","renderArrow","direction","firstDay","selection","stressEnum","floatingActionButton","tintColor","chartConfig","labelColor","userWeightsForTimePeriod","dataPointsForWeightChartWithNullsPadded","xAxisLabelsForLineChart","xAxisLabelsForBarChart","createChartLabelsForBarChart","yAxisMinWeightChart","yAxisMaxWeightChart","dataForWeightChart","datasets","v","withDots","labels","legend","dataPointsForWaistCircumferenceChartWithNullsPadded","yAxisMinWaistCircumferenceChart","yAxisMaxWaistCircumferenceChart","dataForWaistCircumferenceChart","dataPointsForSleepChart","dataForSleepChart","dataPointsForStressChart","dataForStressChart","_getAverageChangeInMe","userMeasurementsForTimePeriod","emptyReturnObject","averageWeeklyDelta","averageWeeklyDeltaAsPercentage","firstDate","latestDate","firstMeasurement","latestMeasurement","getAverageChangeInMeasurementPerWeek","firstWeightValue","latestWeightValue","tableOfWeightMeasurementsComponent","weightChartInfoComponent","weight_change","absolute_change","percentage_change","sleepValuesTable","sleepChart","BarChart","formatYLabel","parseInt","yAxisSuffix","yAxisLabel","fromZero","fromNumber","stressValuesTable","stressChart","segments","yLabel","stressNumber","dataPointIndicesWithNoDataForWeightChart","weightChart","LineChart","bezier","hidePointsAtIndex","withVerticalLines","dataPointIndicesWithNoDataForWaistCircumferenceChart","waistCircumferencesValuesTable","waistCircumferenceChart","selectedChart","getRelevantChart","chartComponent","CustomBrandingMobileScreenHeader","nutritionCardStyle","ALL_DAYS","daysSchema","daysInNutritionPlan","EVERY_DAY","monday","tuesday","wednesday","thursday","friday","saturday","sunday","convertDaysArrayToDaysForNutritionPlan","dayOfWeekStringToIndex","dayOfWeekString","createUserProfileFieldComponent","fieldName","fieldValue","NutritionDayPlanInfoForm","isCreateNewPlanForm","_ref$disableDaySwitch","disableDaySwitches","_ref$isLoadingBackend","isLoadingBackendUpdateCall","minWidth","Column","Switch","onToggle","updatedDays","NutritionPlansComponent","_client$intake2$weekl","_calculateEnergyExpen","onPressUpdateOrCreateNutritionDayPlan","onOpenAddAdditionalNDPDialog","onPressDeleteNutritionPlan","onSubmitUpdateNameAndDaysForm","mondayId","getDayId","_intake$weekly_nutrit","_intake$weekly_nutrit2","nutritionPlans","nutritionPlanGroupsRaw","nutritionPlanGroups","array","moreThanOneNutritionPlan","addAnAdditionalNutritionPlanComponent","sortedKeys","averageEnergyIntakeAcrossWeek","daysArray","_client$intake3$weekl","nutritionPlan","averageEnergyIntakeComponent","weekly_average","energy_balance_percentage","nutritionPlanId","_client$intake$weekly","createNutritionPlanGroupComponent","_ref8","_SceneMap","_client$intake7","_client$intake7$weekl","ClientViewTab","isOpenDeactivateDialog","onOpenDeactivateDialog","onCloseDeactivateDialog","_useDisclose2","isOpenAddAdditionalNDPDialog","onCloseAddAdditionalNDPDialog","layout","useWindowDimensions","_useUsersClientsParti","_useUsersClientsParti2","patchUserBackendCall","isLoadingUpdateUserOnBackend","_useUsersClientsRetri","isLoadingClientRetrieveQuery","clientRetrieveQueryError","_useUsersWeeklyNutrit","_useUsersWeeklyNutrit2","updateWeeklyNutritionPlanOnBackend","isLoadingUpdateWnpOnBackend","nutritionPlanDeletionId","setNutritionPlanDeletionId","_useDisclose3","onOpenNutritionPlanDeleteConfirmationModal","onCloseNutritionPlanDeleteConfirmationModal","isNutritionPlanDeleteConfirmationModalOpen","nutritionPlanDeleteRef","NUTRITION_PLAN","setIndex","routes","PROGRESS","SETTINGS","DailyEnergyItem","_ref9","imgSrc","initialLegacyInput","getLegacyInputFromNutritionPlan","EditNutritionDayPlanStack","screen","EnergyBalanceTab1","onViewClientPlan","DiaryViewScreen","onPressUpdateUserProfile","EditUserProfileScreen","MacroProfileRoute","_client$intake6","usesImperialMeasurements","userProfileInfoComponent","_ref10","_client$intake4","_client$intake4$weekl","weeklyNutritionPlanId","nutrition_day_plan_id","days_to_update_to_nutrition_day_plan_id","onPressDeleteNutritionPlanAfterConfirmation","_ref11","_client$intake5","_client$intake5$weekl","nutritionPlanDeleteConfirmationModal","addAdditionalNutritionDayPlanDialog","clientHasNoWeeklyNutritionPlan","createFirstNutritionPlanComponent","NutritionDayPlanOverviewComponent","ProgressRoute","MyProgressScreen","deactivateClientComponent","isViewingSelf","SettingViewMobile","danger","renderScene","SceneMap","shouldViewClientPlanOptionBeAvailable","HStack","popToTop","SelectViewButton","_ref14","tab","_ref14$lastButton","lastButton","tabsComponent","maxWidth","TabBarView","TabBar","indicatorStyle","activeColor","inactiveColor","renderLabel","_ref13","tabRoute","TabView","navigationState","onIndexChange","renderTabBar","initialLayout","deactivateClientModal","commonContainerStyle","mobileContainerStyle","thickness","getQuickOptionsAction","onClick","labelStyle","labelTextColor","addSingleFoodMealToPlanner","displayQuickAddModal","setOpen","onChoose","mealSlotSpecificationId","pop","_x4","foodChooseScreenParams","chooseMealMoment","AddProductStack","FoodSearchScreen","AddProductByBarcodeStack","BarcodeScannerScreen","Provider","Portal","FAB","fabStyle","onStateChange","nutrientDiv","nutrientHead","nutrientTextDiv","nutrientText1","nutrientText2","progressBarDiv","paddingLeft","progressBarContainer","targetValue","actualValue","_ref$showProgressBar","showProgressBar","addMoreContainer","textContainer","head","titleDiv","extendMoment","MomentLib","createCalendarDay","createNewCalendarDay","weeklyNutritionPlan","calendarDaysInStore","isLoadingCreateNewCalendarDay","isLoadingCalendarDayList","calendarDayToBeCreated","calendar_items","createBlankCalendarDay","isCalendarDayNotInStore","isPayloadValid","notInFlight","_x5","_x6","_x7","_x8","getPlannerData","calendarFetchStartDate","realUser","plannerArgs","add","_usePlannerCalendarDa","isFetchingCalendarDayList","calendarDayListResponse","refetchCalendarDays","_usePlannerCalendarDa2","_usePlannerCalendarDa3","_createCalendarDays","rangeByDate","range","by","dates","datesWithoutCalendarDays","getDayOfWeekAsString","addMealToPlanner","_x18","_addMealToPlanner","currentCalendarDay","mealSlot","mealContentType","createCalendarItem","calendarItemToCreate","meal_slot","object_id","content_type","calendar_day","modified","_addSingleFoodMealToPlanner","planSingleFoodMealBackendCall","calendar_day_id","meal_slot_id","suggested_serving_id","reject","getActualValueForMacro","calendarItems","calendarItem","getTargetValueForMacro","findMatchingSuggestedServing","suggestedServingId","suggested_servings","RANKED_MEAL_MOMENTS","sortMealSlotSpecificationsByMealMoment","generateMealsPrefetchOptions","ifOlderThan","getTestIDForRecipeMeal","CheckboxComponent","submitted","setSubmitted","MaterialCommunityIcons","RecipeMealPlannerItem","_recipeMeal$recipe_te","isEaten","onLongPress","onSwap","onListAlternativesPress","onPressCalendarItemPlannedStatus","_ref2$isLoading","showHormoneIndicator","some","tag","white","textDecorationLine","preparation_time_min","gap","borderTopColor","SingleFoodOrQuickAddMealPlannerItem","_ref3$editable","accessibilityRole","contentType","_ref4$editable","_ref4$isLoading","foodsById","checkIsEatenStatus","statusValue","singleFoodMeal","foodName","findFoodBySuggestedServingId","createSingleFoodMealPlannerItem","quickAddMeal","createQuickAddMealPlannerItem","onPressPlannedStatus","onPressAddMoreComponent","onPressPlanNewMeal","onPressMenu","_usePlannerAutoPlanDa","_usePlannerAutoPlanDa2","autoPlanDay","isLoadingAutoPlanDay","productLoggingIsDisabled","_usePlannerCalendarIt","_usePlannerCalendarIt2","updateCalendarItem","isLoadingUpdateCalendarItem","_useFoodIngredientPar","_useFoodIngredientPar2","updateSingleFoodMealIngredient","calendarItemToDeleteId","setCalendarItemToDeleteId","isOpenDeleteMenu","setIsOpenDeleteMenu","createPlannerItemFromCalendarItem","newStatus","onSwapCalendarItem","meal_slot_ids","CalendarItemComponent","recipeMealEditable","AddRecipeTemplateStack","RecipeDetailScreen","viewOnly","portionsEditable","AddIngredientScreen","_onChoose","calendarItemToReplace","_usePlannerCalendarIt3","_usePlannerCalendarIt4","deleteCalendarItemOnBackend","isLoadingDeleteCalendarItemOnBackend","deleteCalendarItem","_ref5","calendarItemId","cancelRef","deleteMealComponent","space","disablePlanMealAction","planMealComponent","NativeButton","Entypo","sortedCalendarItems","_mealSlotSpecificatio","createQuickAddMeal","defaultSelectedMealSlotSpecificationId","quickAddSchema","integer","onSubmitWrapper","calendar","dropDown","dropDownImg","grid","gridImg","dateNumberStyle","dayContainerStyle","highlightDateContainerStyle","highlightDateNumberStyle","dateNameStyle","_ref$leaveRoomForCust","leaveRoomForCustomBrandingHeader","baseStyles","calendarStripStyle","calendarHeaderStyle","highlightDateNameStyle","CalendarStrip","numDaysInWeek","selectedDate","onDateSelected","calendarColor","iconLeftStyle","iconRightStyle","CopyDayModal","_usePlannerCopyMealsF","_usePlannerCopyMealsF2","copyFromDate","isLoadingCopyFromDate","toCalendarDays","fromCalendarDayId","copyDayPromises","toCalendarDay","from_calendar_day_id","to_date","copyDayToSchema","markedDateBaseProperties","textColor","getMarkedDates","markingType","has","delete","textDayFontSize","textMonthFontSize","textDayHeaderFontSize","formatMomentAsDateForApi","CopyMealsModal","_usePlannerCopyMealsT","_usePlannerCopyMealsT2","copyMealMomentToDate","isCopyingMealMomentToDate","copyMealMomentToPromises","to_calendar_day","copyMealMomentToSchema","dateToMark","checkedSmallCircle","unCheckedSmallCircle","checkboxStyle","flexContainer","imageStyle","singleProductMealWrapper","recipeImage","recipeMealPlannerItem","macroOverviewTargetContainer","proteinForTheDayText","usePrefetch","noteSchema","note","areTwoCalendarItemsArraysEqual","every","ci","areTwoCalendarItemsEqual","MemoizedMealSlotInPlanner","MealSlotInPlanner","prevProps","nextProps","_prevProps$calendarIt","_nextProps$calendarIt","MemoizedNutritionOverviewForTheDay","actualKcalsForTheDay","targetKcalsForTheDay","actualProteinForTheDay","targetProteinForTheDay","actualFatForTheDay","targetFatForTheDay","actualCarbsForTheDay","targetCarbsForTheDay","shouldShowTargetMacros","MacroTargetInfo","MenstrualCyclePhaseIndicator","jsDate","phase","phaseColor","_icon","mealActionButtonStyle","_route$params","_nutritionPlanForCurr","getOrganisationForBrandingPreview","_useFoodQuickAddMealC","createQuickAddMealBackendCall","partialUpdateCalendarDayBackendCall","isLoadingPartialUpdateCalendarDay","_usePlannerPlanSingle","mealSlotForActionSheetItems","setMealSlotForActionSheetItems","isOpenQuickAdd","onOpenQuickAdd","onCloseQuickAdd","isOpenNoteDialog","onOpenNoteDialog","onCloseNoteDialog","isOpenCopyMealsTo","onOpenCopyMealsTo","onCloseCopyMealsTo","_useDisclose4","isOpenCopyDay","onOpenCopyDay","onCloseCopyDay","_useDisclose5","isOpenMealSlotAddMore","onOpenMealSlotAddMore","onCloseMealSlotAddMore","_useDisclose6","isOpenMealSlotMenu","onOpenMealSlotMenu","onCloseMealSlotMenu","_getPlannerData","foodGenerateMealsListPrefetch","nutritionPlanForCurrentDay","getCalendarItemsForSlot","nutritionOverviewForTheDay","orderedMealSlotsForTheDay","prefetchPromises","createGenerateMealsArgs","MEAL_MOMENT_TO_ORDERING","calendarItemsForToday","flat","orgUser","findMealSlotSpecification","diaryComponent","_mealSlot$kcal","calendarItemsForMealSlot","noWeeklyNutritionPlanMessage","addSingleFoodMealToPlannerWrapper","_x19","floatingButton","FloatingButton","viewAsUserBackButtonIcon","viewAsUserHeaderComponent","username","quickAddModal","QuickAddModal","copyMealsToModalComponent","mealSlotMoreMenuButtonActionSheet","Actionsheet","addMoreComponent","copyDayModalComponent","shouldShowPreviewedBrandingHeader","showCustomBrandingHeader","calendarStrip","CalendarStripComponent","noteComponent","Badge","SimpleLineIcons","onPressGenerateCurrentDay","generateMealsComponent","confirm","onSubmitNote","hasRecipeMealsPlanned","bodyIfCalendarDayExists","FF_COPY_MEALS_TO_ANOTHER_DAY","onPressCreateEmptyDay","_x9","_x10","_x11","_x12","_x13","_x14","_x15","_x16","_x17","createCalendarDays","lastDateThereAreMealsPlannedWithThisNutritionDayPlan","todaysNutritionDayPlanId","_weeklyNutritionPlan$","dateToCheck","calendarDayToCheck","findLastDateThereAreMealsPlannedWithThisNutritionDayPlan","onPressCopyFromLastRelevantDate","bodyIfNoCalendarDay","BillingIssueScreen","showLoadingSpinner","CommonHeaderDivider","_organisation2","_organisation3","fontStyle","custom_notes_message","TextArea","autoCompleteType","noteDialog","emailsStyle","mainContainerStyle","discriptionContainer","bottomTextComponetStyle","getFoodDescriptionForSearchResult","suggestedServing100g","searchResultText","brand_name","_ref$route$params","searchQuery","setSearchQuery","_useFoodSearchListQue","foods","autoFocus","FoodSearchResult","foodInner","keyboardShouldPersistTaps","headerImg","greenTitle","avatarImg","roleText","nameText","startBtn","startText","PlanScreen","loginContainer","loginTouchableContainer","bottomStyle","externalBoldTextStyle","boldContainerWrapper","smallTextStyle","magicLinkFormSchema","subdomainWeAreCurrentlyOn","_useUsersCreateMagicL","_useUsersCreateMagicL2","sendMagicLinkToEmailPost","_useUsersCreateMagicL3","_useUsersCreateLoginS","sendLoginSignupPost","submitForm","redirectUrlString","redirectUrl","createURL","authenticationMethod","response","redirect_url","organisation_subdomain","authentication_method","_err$data","EnterOTPScreen","MagicLinkSentScreen","KeyboardAvoidingView","behavior","safeArea","w","VStack","autoCapitalize","autoComplete","textContentType","itemContainer","labelText","caloriesLabelText","caloriesValueText","valueText","imgContainer","MacronutrientItem","nutrition","planTitle","labelTextBold","bodyText","contentContainer","sectionTitle","itemRowContainer","sportImg","NutritionPlanRows","close","_modalizeRef$current","nutritionPlanRow","NutritionPlanRowItem","ProfileStartScreen","CommonModalize","paginationStyle","walkThroughListContainer","buttonContainer","activeDotStyle","dotStyle","swipeImages","swiperAlign","titleText","discriptionText","badgeStyle","dotsWrapperStyle","imageBackground","_useFoodFoodListQuery","LoginScreen","birthYear","birthMonth","birthDay","setValues","CommonTextInput","CommonDateTextInput","AddGenderScreen","avatarHeader","SportsDataList","PlanRowItem","NutritionPlanScreen","ImageSize","profileAvatarImg","editIconContainer","skipBtn","skipText","colorBlack","textWrapperContainer","bottomTextComponent","smallComponent","swiperTopTimerTextStyle","topSwiperTimerComponent","swiperContainer","textStyleForSwiper","textInputStyle","externalTextInputStyle","listWrapper","titleContainer","leftTextStyle","rightTextStyle","topStyle","firstTitleContainer","scrollViewStyle","recipes","mealTitle","horizontal","showsHorizontalScrollIndicator","CommonWhiteContainer","recipesForDifferentMealTypes","RecipeInspirationCarousel","handleSearchText","contentWrapper","cardImg","ownRecipeImg","clockIcon","timeViewContainer","nextBtn","nextBtnView","durationText","imageContainer","descriptionContainer","menuIcon","menuIconContainer","imageWrapper","hormoneIconContainer","_recipeMeal$recipe_te2","onOpenAction","pageHeader","createRecipe","tickIcon","recipesListContainer","statusViewContainer","statusTextContainer","SelectedMealPreparationTime","RECIPE_TAG_TO_NAME","_RECIPE_TAG_TO_NAME","BREAD","BURGER","COUSCOUS_AND_QUINOA","DAIRY","DIPS_AND_SPREADS","PANCAKES_AND_OMELETTES","PASTA","RICE_AND_NOODLES","SALAD","SNACKS_AND_BAKES","SOUP","WRAP","TAG_CATEGORY_LIST","SELECTED_MEAL_PREPARATION_TIME_TO_QUERY_ARGS","_SELECTED_MEAL_PREPAR","LTE_5","LTE_10","LTE_15","LTE_20","LTE_30","GTE_30","ALL","recipeMealSearchInitialState","byPage","MemoizedRecipeMealCard","RecipeMealCard","_CATEGORY_TO_NAME","CATEGORY_TO_NAME","POPULAR","OWN_RECIPE","POPULAR_CATEGORY","FAVOURITE_CATEGORY","OWN_MEAL_CATEGORY","MEAL_TYPE_LIST","recipeTemplateEditable","ownMealsAvailable","CREATE_RECIPE_CATEGORY","FILTERS_TO_SHOW","recipeMealsByPage","setRecipeMealsByPage","selectedTags","setSelectedTags","_useState9","_useState10","selectedMealType","setSelectedMealType","_useState11","_useState12","selectedMealPreparationTime","setSelectedMealPreparationTime","_useState13","_useState14","selectFavourites","setSelectFavourites","_useState15","WEEKMEALS","_useState16","setSourceProvider","_useState17","_useState18","showActionSheetWithOptions","useActionSheet","_useState19","_useState20","searchCounter","setSearchCounter","resetPage","mealGenerateQueryArgs","USER_GENERATED","allFoodSearchArgs","_useFoodGenerateMeals","isLoadingFirstTime","onFirstPage","moreDataAvailable","onSubsequentPageButMoreDataAvailable","searchingForWeekmealsRecipes","searchQueryEmpty","searchingForOriginalMealType","searchingForOriginalPrepTime","shouldPrefetchNextPage","pageToPrefetch","prefetchRequestOptions","util","prefetch","setRecipeMealSearch","onSearchTextChange","_usePlannerPlanGenera","createCalendarItemFromGeneratedMeal","_useFoodRecipeMealCre","createRecipeMealFromRecipeTemplate","addRecipeMealToCalendar","createRecipeMealFromRecipeTemplateWrapper","recipeTemplate","doNotPlan","portions","createRecipeMealFromGeneratedMealWrapper","generatedRecipeMeal","portions_to_plan","meal_slot_specification_id","onOpenActionSheet","cancelButtonIndex","destructiveButtonIndex","buttonIndex","ownMealsFilterSelected","isPopularSelected","isCategoryFilterSelected","rt","createCategoryCard","isCreateRecipeCard","CommonCategoryCard","RecipeAddOwnStack","RecipeAddOwnScreen","onSave","_onSave","submitMessage","updatedSourceProvider","onCategoryCardChange","rc","CommonSearchInput","CommonSelect","searchResultsList","loadingAnotherPage","ListHeaderComponent","ListFooterComponent","onEndReached","parsedNextUrl","URI","parsedUrlQuery","queryString","pageAsNumber","isInteger","onEndReachedThreshold","bounces","onSelect","onRecipeMealPress","ListEmptyComponent","strongPasswordStyle","strongPasswordContainer","lightGrayColor","textBoxContainerStyle","checkboxTextStyle","checkBoxContainer","logginContainer","confirmPassword","checkBox","checkDisableCondition","makeYourAccountButtonStyle","CheckBox","uncheckedIcon","addItemContainer","amountContainer","unitContainer","textInputContainer","RecipeMacros","QuantityInput","memo","localValue","setLocalValue","displayName","_ingredient$suggested","_food$suggested_servi","_ref2$route$params","initialFood","_useFoodFoodRetrieveQ","isLoadingFoodQuery","returnedFood","setFood","handleQuantityChange","useCallback","schemaShapeObject","header","_navigation$getParent","getParent","ingredientSchema","getSuggestedServingFromForm","initialValueSuggestedServingId","initialQuantity","_food$suggested_servi2","getIndividualMacroForDisplay","macrosDescription","ss","backButton","BarcodeScanner","hasPermission","setHasPermission","scanned","setScanned","setBarcode","_useFoodSearchByBarco","BarCodeScanner","requestPermissionsAsync","PermissionStatus","GRANTED","onBarCodeScanned","absoluteFillObject","_useTranslation","Heading","CheckoutParamStates","CheckoutState","CHECKOUT_QUERY_PARAM_NAME","targetMacrosFormSchema","TargetMacronutrientsComponent","DEFAULT_ENERGY_BALANCE","OTHER_ENERGY_BALANCE","energyBalanceChoices","energyBalanceFormSchema","getClientNutritionPlan","clientNutritionPlansByClientId","clientNutritionPlan","clientNutritionPlan7Edit","nextButtonEnabled","mealMoments","borderBottomColor","legacyMealStateToToggle","updatedMealState","updatedLegacyInput","toggleMealMoment","offTrackColor","nextButton","EditMealMomentsTab3","webWidth","flexWidth","pt","marginX","isMobileScreen","enabledMeals","mealMomentsComponent","_legacyMealState$macr","_legacyMealState$macr2","kcalAndProteinDescription","CommonNumberInputWithPlusMinusButtons","updatedValue","legacyMealStateBeingIterated","legacyInputAfterMealMomentSizeUpdated","totalEnergyBalanceOfChosenSizes","totalEnergyBalanceOfChosenSizesPercentageForDisplay","shouldNextButtonBeDisabled","totalComponent","FineTuningTab4","getEnergyBalanceOptionFromEnergyBalanceValue","_inputState$legacyInp","optionSelected","inputState","setInputState","haveTargetMacrosBeenProvided","setHaveTargetMacrosBeenProvided","isOpenTargetMacrosActionsheet","onCloseTargetMacrosActionsheet","onOpenTargetMacrosActionsheet","bottomInset","energyBalanceFormInitialValues","submittedValues","updatedEnergyBalance","ChooseMealMomentsTab2","_inputState$legacyInp2","_inputState$legacyInp3","_inputState$legacyInp4","onUserUpdateEnergyBalance","usingOtherInput","isOtherChecked","legacyInputUpdated","calculatedMealSlotSpecifications","macrosTargetComponent","formValues","adjustedLegacyInput","energyBalanceDelta","percentage","onFocus","Feather","getMealStateSchema","moreThan","_useUsersWeeklyNutrit3","_useUsersWeeklyNutrit4","createWeeklyNutritionPlanOnBackend","isLoadingCreateWnpOnBackend","_useUsersNutritionDay","_useUsersNutritionDay2","createNutritionDayPlanOnBackend","isLoadingCreatingNdpOnBackend","_useUsersMealSlotSpec","_useUsersMealSlotSpec2","createMealSlotSpecificationOnBackend","isLoadingCreateMssOnBackend","MacroComponent","convertMacroNameToLegacy","MealMomentDetailsComponent","MealMoment","mealStateArrayShape","mealMomentsFormSchema","_onSubmit","createdNutritionDayPlan","createPromises","daysToUpdate","client_intake","mealMomentsInitialValues","_useUsersUserProfileU","_useUsersUserProfileU2","updateUserProfileOnBackend","isLoadingUpdateUserProfileOnBackend","_useUsersExerciseInst3","_useUsersExerciseInst4","updateExerciseInstanceBackendCall","isLoadingUpdateExerciseInstance","_useUsersUserProfileC","_useUsersUserProfileC2","createUserProfileOnBackend","isLoadingCreateUserProfileOnBackend","_useUsersExerciseInst5","_useUsersExerciseInst6","deleteExerciseInstanceBackendCall","isLoadingDeleteExerciseInstance","updateOrCreatePromise","clientIntake","_values$exercise_inst2","clientIntakeId","doesExerciseInstanceHaveId","exerciseInstancesThatAlreadyExist","exerciseInstancesThatDoNotExist","ei","exerciseUpdatePromises","exerciseDeletionPromises","exerciseInstanceToBeUpdated","_useUsersVerifyOtpCre","verifyOTP","verifyOTPFormSchema","otp","matches","authToken","auth_token","_data","extra","images","headingFirst","letterSpacing","headingSecond","headingThird","meditationIcon","uncheckedBox","checkedBox","LocaleConfig","locales","monthNames","monthNamesShort","dayNames","dayNamesShort","today","defaultLocale","createGroceryList","initialStartDate","initialEndDate","DEFAULT_NUM_DAY_FOR_GROCERY_LIST","setStartDate","setEndDate","submitting","setSubmitting","initialGroceryListRange","defaultMarkedDates","setMarkedDates","shouldShowCreateButton","disableArrowLeft","monthFormat","updatedMarkedDates","calculatedEndDate","numDaysInPeriod","startDateCopy","tempDate","headerTextStyle","itemsTextStyle","checkedTextStyle","listMainView","listSubView","kebabImageView","allDoneView","allDoneText","calenderView","hyphenView","partitionLine","emptyStateContainer","emptyStateText","isOpenGroceryListDatePicker","onOpenGroceryListDatePicker","onCloseGroceryListDatePicker","groceryList","sortBy","_usePlannerGroceryLis","_usePlannerGroceryLis2","updateGroceryListItemOnBackend","isLoadingUpdateGroceryListItem","_usePlannerGroceryLis3","groceryListsDataFromApi","refetchGroceryLists","toggleCheckedStatusOnGroceryListItem","onPressGroceryListItem","markAllAsChecked","allUncheckedItems","_usePlannerGroceryLis4","_usePlannerGroceryLis5","createGroceryListOnBackend","isLoadingCreateGroceryListOnBackend","_usePlannerGroceryLis6","_usePlannerGroceryLis7","deleteGroceryListOnBackend","isLoadingDeleteGroceryList","start_date","end_date","deleteGroceryList","createGroceryListItemComponent","CheckBoxCom","strikeThrough","allGroceryItems","groupedAllGroceryItems","groceryListItem","groceryItems","markAllCheckedButton","datePickerModal","GroceryListDatePicker","createGroceryListButtonComponent","areAllItemsChecked","listOfGroceriesComponent","groceryListComponent","flexGrow","deleteConfirmationDialog","gradientOverlay","brandName","subtitle","startButton","startButtonText","loginPrompt","loginButton","loginButtonTitle","LinearGradient","locations","buttonStyle","DIY1GoalScreen","DEFAULT_ICON","headerDesktop","content","contentDesktop","optionTextContainer","optionLabel","optionDescription","errorText","_theme$colors","_theme$colors2","_ref$multipleSelectio","multipleSelection","_ref$icon","onPressNext","_ref$submitButtonLoad","submitButtonLoading","_ref$nextButtonDisabl","nextButtonDisabled","primaryColor","selectedOptionBackgroundColor","searchBg","logoUri","tvParallaxProperties","newSelectedOptions","toggleSelection","loading","goals","selectedGoal","ActivityLevelScreen","touched","SelectionScreen","activityLevels","Activity","selectedActivity","BiometricDataScreen","boldLabel","ageInput","genderContainer","genderOption","genderLabel","genderEmoji","_onboardingData$biome","_onboardingData$biome2","PhysicalStatsScreen","_theme$colors3","_theme$colors4","_theme$colors5","_theme$colors6","_theme$colors7","isFemale","handleGenderPress","adjustLegacyInputCarbs","maxCarbs","_legacyInput$computed","extraCarbs","updatedFat","updatedCarbs","diyCreateNutritionPlanFormInitialValues","macrosPreference","calculateBodyFatPercentage","createUserProfileFromOnboardingData","_onboardingData$menst","_onboardingData$menst2","is_keto_user","createAnonymousUser","ALL_DAYS_OF_THE_WEEK","calculateEnergyBalanceMatchingGoal","weeklyDeficit","createMealSlotSpecificationFromDiyForm","defaultLegacyInput","legacyInputForUpdateCalculation","_onboardingState$diet","_onboardingState$diet2","_onboardingState$diet3","_onboardingState$diet4","userProvidedMacros","legacyInputWithEnergyBalance","fatsG","maxFats","_legacyInput$computed2","extraFats","adjustLegacyInputFats","gramsOfCarbs","createMealSlotSpecificationFromAnonymousUser","sanitizeMealSlotSpecification","_doOrRedoNutritionPreferencesOnBackend","setIngredientsToAvoidMutation","ingredientToAvoidObjectsFromBackend","autoPlanDaysOnBackend","_user$intake2","userProfileCreateBody","userProfileUpdated","_user$intake3","_user$intake3$weekly_","_user$intake4","_user$intake4$weekly_","ingredientDislikesInBackendFormat","ingredientToAvoidIds","ingredient_to_avoid_ids","auto_plan_initial_meals","todayDateStringForApiRequest","num_days","start_date_inclusive","delete_existing_plans","calculateTDEE","HeightUnit","appropriateWeeklyGoalsForSafety","maxCaloricDeficit","minCalories","minKcalBasedOnDeficit","goalTdee","calculateTdeeForWeeklyGoal","updateMacrosInState","updatedFormValues","inputWrapper","link","ftInContainer","ftInputWrapper","ftInputContainer","ftInputInnerContainer","ftInRightIcon","unitText","modalOverlay","modalContent","modalTitle","radioOption","radioButton","radioButtonSelected","radioText","modalCloseButton","unitButton","unitButtonText","_onboardingData$physi","_onboardingData$physi2","_onboardingData$physi3","CENTIMETRES","heightUnit","setHeightUnit","weightUnit","setWeightUnit","weightUnitModalVisible","setWeightUnitModalVisible","heightMinErrorMessage","heightMaxErrorMessage","weightMinErrorMessage","weightMaxErrorMessage","goalWeightMaxErrorMessage","calculateWeightAtGivenBMI","calculateMinimumHealthyWeight","this","parent","heightFt","setHeightFt","heightInches","setHeightInches","weightStones","setWeightStones","weightPounds","setWeightPounds","goalWeightStones","setGoalWeightStones","goalWeightPounds","setGoalWeightPounds","convertFtInToCm","ftStr","inchesStr","totalInches","convertStonesToKg","stones","pounds","totalPounds","convertKgToStonesPounds","getErrorMessage","isGoalWeight","WeightUnitModal","currentUnit","currentKg","currentGoalKg","handleUnitSelection","selectedUnit","currentKgValue","currentGoalKgValue","stonesAndPounds","goalStonesAndPounds","activeOpacity","onStartShouldSetResponder","FEET_INCHES","updatedOnboardingData","nextScreen","WeeklyGoalScreen","NutritionalPlanScreen","renderWeightInput","inputStyle","rightIcon","rightIconContainerStyle","newCm","currentCm","feet","inchesVal","_onboardingData$prefe","_onboardingData$prefe2","noGoalsAvailable","UnitEnum","convertMacroInPercentToGrams","percent","macroType","formContainer","updateButton","radioTitle","radioGroupContainer","radioButtonContainer","radioButtonText","radioButtonTextActive","GRAMS","setUnit","diyFormValues","initialMacros","setMacros","macrosAsPercent","grams","handleUnitChange","newUnit","PERCENT","totalCalories","proteinPercent","fatPercent","newProtein","newFat","newCarbs","handleMacroChange","newValue","newCarbohydrates","newFats","handleCaloriesChange","newKcal","oldKcal","balancedMacros","rmr","getBalancedMacros","handlePercentChange","parsedValue","newProteinPercent","newFatPercent","remainingPercent","newProteinGrams","newFatGrams","newCarbGrams","convertMacrosToIntegers","enableReinitialize","scrollContent","macroContainer","macroBox","macroLabel","macroValue","macroEmoji","loadingContainer","loadingText","isPlantBasedApp","FF_PLANT_BASED_APP","disableLowCarbOption","FF_DISABLE_LOW_CARB_OPTION","isThisTheFirstScreenOfTheOnboardingTheUserIsSeeing","setIsThisTheFirstScreenOfTheOnboardingTheUserIsSeeing","showMenstrualDietPlans","selectedPlan","plans","moreInfoUrl","finalFilteredPlans","ActivityIndicator","MenstrualCycleDatesScreen","MealTimesScreen","ModifyNutritionalPlanScreen","mealOptions","selectedMeals","DietSelectionScreen","dietOptions","filteredDietOptions","selectedDiet","IntoleranceScreen","intoleranceOptions","selectedIntolerances","defined","IngredientDislikesScreen","message","additionalInfo","_ref$size","setProgress","messageIndex","setMessageIndex","messages","organisation_name","returnObjects","interval","setInterval","prevProgress","clearInterval","prevIndex","MEAT_OPTIONS","isLoadingAutoPlanDays","_useUsersSetIngredien","_useUsersSetIngredien2","isLoadingSetIngredientsToAvoid","shouldFilterMeatOptions","dislikeOptions","filteredDislikeOptions","selectedDislikes","doOrRedoNutritionPreferencesOnBackend","PostOnboardingScreen","PostOnboardingLoadingInterstitial","viewportWidth","carousel","slide","pagination","dot","activeDot","inactiveDot","leftArrow","rightArrow","arrowText","proceedButton","scrollViewRef","activeSlide","setActiveSlide","slides","goToNextSlide","_scrollViewRef$curren","scrollTo","animated","pagingEnabled","onScroll","event","slideIndex","nativeEvent","contentOffset","scrollEventThrottle","renderSlide","_scrollViewRef$curren2","BottomNavigationTab","calendarContainer","maxSelectableDate","selectedDates","dateKeys","selectedDateStr","isAfter","renderCalendarArrow","renderValidationError","OnboardingMenstrualCycleSpacingScreen","isSubmitDisabled","selectedDayBackgroundColor","selectedDayTextColor","maxDate","iconBackground","scrollContainer","scrollView","fadeTop","pointerEvents","fadeBottom","selectionIndicator","cycleOption","emptyOption","selectedOption","cycleOptionText","selectedOptionText","notSureButton","notSureText","cycleLengthOptions","knowsCycleLength","cycleLength","when","is","y","MenstrualCycleDetailsScreen","snapToInterval","decelerationRate","onMomentumScrollEnd","selectedIndex","indexOf","chartContainer","daysUntilText","fertileText","_ref$numberOfDaysInCy","_ref$numberOfMenstrua","_ref$currentDayInCycl","_ref$daysUntilNextPer","radius","circleCircumference","PI","notchSize","menstruationCircleSize","menstruationCircleX","cos","menstruationCircleY","sin","menstruationSegmentSize","menstruationSegmentOffset","fertileWindowCircleOffset","startDayOfFertileWindow","fertileWindowSegmentSize","ovulationCircleSize","ovulationCirclePosition","ovulationCircleX","ovulationCircleY","currentDayOfCycleAngle","currentDayOfCycleCircleSize","currentDayOfCycleCircleX","currentDayOfCycleCircleY","Circle","cx","cy","r","strokeDashoffset","markers","angle","markerX","markerY","generateDayMarkers","SvgText","textAnchor","alignmentBaseline","headerText","bottomSection","row","column","placeholderImage","phaseTitle","phaseDescription","nextButtonContainer","infoIconContainer","menstrualCycleProps","MenstrualCycleDiagram","checkboxContainer","termsAccepted","appName","InstallInstructionsBox","areWeInsideAWebview","isWebview","isiOS","maxW","rounded","_dark","_web","_light","Stack","NBView","PresenceTransition","initial","animate","transition","delay","horizontalMode","isTransformed","_ref$showLabel","_ref$showUnits","showUnits","statusItem","titleInputContainer","titleInputWrapper","addIngredientsContainer","recipeImg","imgViewContainer","defaultImgContainer","imgContainerDesktop","closeIconContaier","closeIcon","editIconContaier","editIcon","favouriteIconContainer","prepTimeContainer","tabViewContainer","ingredientRow","addIngredientBtn","stepContainer","tipContainer","tipIcon","noteOnRecipe","helpfulMessageContainer","helpfulMessageText","areIngredientsEqual","IngredientComponent","ingredientIndex","onEditIngredientQuantity","quantityInputState","setQuantityInputState","onPressIngredientSwapButton","onBlurIngredientInput","onPressDeleteIngredient","defaultValue","MemoizedIngredientsRoute","bufferedRecipeMeal","onEditPortions","handleAddIngredient","handleEditIngredient","allIngredientQuantityInputState","setAllIngredientQuantityInputState","ingredients","newQuantityInputState","ingredientsA","ingredientsB","ingredientA","ingredientB","_bufferedRecipeMeal$d","_bufferedRecipeMeal$d2","_bufferedRecipeMeal$r","_bufferedRecipeMeal$r2","_bufferedRecipeMeal$r3","userDislikeRecipe","_ref5$route$params","_ref5$route$params$vi","_ref5$route$params$ed","_ref5$route$params$re","_ref5$route$params$po","favouritedRecipes","dislikedRecipes","hasOwnProperty","_useUsersUserfavourit","isLoadingUserFavoriteRecipe","paginatedUserFavouriteRecipeList","errorUserFavouriteRecipeList","refetchUserFavouriteRecipeList","_useUsersUserdisliker","isLoadingUserDislikeRecipe","paginatedUserDislikeRecipeList","errorUserDislikeRecipeList","refetchUserDislikeRecipeList","_useUsersUserfavourit2","_useUsersUserfavourit3","deleteUserFavouriteRecipeOnBackend","isLoadingFavDelete","_useUsersUserfavourit4","_useUsersUserfavourit5","createNewUserFavouriteRecipe","_useUsersUserdisliker2","_useUsersUserdisliker3","deleteUserDislikeRecipeOnBackend","isLoadingDislikeDelete","_useUsersUserdisliker4","_useUsersUserdisliker5","createNewUserDislikeRecipe","updateRecipeMealIngredient","isLoadingIngredientUpdate","_useFoodRecipeMealPar","_useFoodRecipeMealPar2","_useFoodIngredientCre","_useFoodIngredientCre2","createIngredient","_useFoodIngredientDes","_useFoodIngredientDes2","deleteIngredient","isLoadingIngredientDelete","_useFoodRecipeTemplat","_useFoodRecipeTemplat2","updateRecipeTemplate","_usePlannerEditRecipe","_usePlannerEditRecipe2","updateRecipeMealPortions","setBufferedRecipeMeal","isMigratedLegacyMeal","directions","shouldShowPreparationSteps","_useFoodRecipeMealRet","isLoadingRecipeMealQuery","recipeMealOnBackend","refetchRecipeMeal","refreshRecipeMealData","onFavouriteButtonPress","onDislikeButtonPress","onCloseBtn","onChooseProduct","ingredientsListRoute","_onChoose2","isAUserGeneratedMeal","nutritionalInformationForRecipe","recipeImageComponent","shouldShowHormoneRecipeInfo","recipeInformationComponent","initialRecipeMeal","external_url","_bufferedRecipeMeal$r4","handleInstagramIconPress","macroDetailIndex","calculatedHeight","ingredientsAndDirectionsTabsComponentStyle","ingredientsAndDirectionsTabsComponent","_bufferedRecipeMeal$d3","directionIndex","CommonStepIndex","chooseMealComponent","newOwnRecipeTemplate","setNewOwnRecipeTemplate","createRecipeTemplate","_useFoodRecipeTemplat3","_useFoodRecipeTemplat4","deleteRecipeTemplate","isLoadingDeleteRecipeTemplate","_useFoodRecipeTemplat5","_useFoodRecipeTemplat6","isLoadingUpdateRecipeTemplate","updateRecipeTemplateIngredient","_useFoodCreateRecipeC","_useFoodCreateRecipeC2","createNewRecipeTemplateFromExisting","_usePlannerSaveAndPla","_usePlannerSaveAndPla2","saveAndPlanRecipeTemplate","isLoadingSaveAndPlanRecipeTemplate","isLoadingDeleteIngredient","_useFoodIngredientPar3","_useFoodIngredientPar4","updateIngredient","isLoadingUpdateIngredient","exitModalVisible","setExitModalVisible","isOpenDeleteDialog","onOpenDeleteDialog","onCloseDeleteDialog","recipeMacrosItems","handleDeleteRecipeTemplate","deleteRecipeTemplateModal","ownRecipeTemplateSchema","alsoPlanAsMeal","mealName","getNewRecipeTemplateNameFromInitialRecipeMeal","existing_recipe_template_id","screensToPop","getOrCreateRecipeTemplate","publish","addIngredientToRecipeTemplate","updateRecipeTemplateMacros","addOrEditRecipeTemplateIngredient","updatedOrCreatedIngredient","updatedIngredients","currentIngredient","updatedRecipeTemplate","editedRecipeTemplate","updatedIngredient","ingredientId","deleteRecipeTemplateIngredient","createRecipeTemplateFromRecipeMeal","newRecipeTemplate","newIngredients","onAbandonRecipeTemplate","NativeView","recipeMacrosComponent","CommonModal","isCoach","isWeb","isPaymentRequired","organisationFormSchema","organisationName","logoAsBase64","_organisation$name","_organisation$primary","_formRef$current","isOpenPreviewDialog","onOpenPreviewDialog","onClosePreviewDialog","_useUsersOrganisation","createOrganisation","_useUsersOrganisation3","partialUpdateOrganisation","showColourPickerModal","setShowColourPickerModal","formRef","organisationFormInitialValues","primary_colour","onSubmitOrganisation","addPreviewDialog","NativeBaseProvider","_formRef$current2","_formRef$current3","_formRef$current4","onPressPreview","innerRef","selectLogoFile","documentResult","DocumentPicker","copyToCacheDirectory","ColorPicker","onComplete","Preview","hideInitialColor","Panel3","Swatches","blogs","blog","isPressed","LANGUAGE_OPTIONS","_useUsersUserDestroyM","deleteUserOnBackend","updateUserProfile","isUpdatingUserProfile","swapModeButton","confirmKeyword","prompt","modeName","formatLanguage","switchLanguage","changeLanguage","setItem","redoNutritionPlanningButton","shouldShowStripeCustomerPortalLink","formatIntolerances","getDietaryPreference","_user$intake5","_user$intake6","getGoal","_user$intake7","formatHeight","_user$intake8","heightInInches","inches","formatWeight","_user$intake9","handleRecipeUnitChange","useImperial","_handlePeriodStartedEarly","_user$intake$weekly_n","_user$intake$weekly_n2","_user$intake$weekly_n3","_user$intake$weekly_n4","_user$intake$weekly_n5","_user$intake$weekly_n6","_user$intake$weekly_n7","_user$intake$weekly_n8","_user$intake10","_user$intake11","_user$intake12","_user$intake13","_user$intake14","_user$intake15","_user$intake16","_user$intake17","BlogLinksDropdown","ingredients_to_avoid","toLocaleDateString","year","month","handlePeriodStartedEarly","DELINQUENT_SUBSCRIPTION_SCREENS","CLIENT_VIEW_SCREENS","GroceryListScreen","MyProfileScreen","COACH_VIEW_SCREENS","CoachModeViewClientsScreen","CoachModeAccountScreen","ICONS_LOOKUP","_ICONS_LOOKUP","getTitleForTab","doNotDisplayTab","tabBarButton","hasUserCompletedUserProfileButDoesNotHaveWeeklyNutritionPlan","BottomTab","createBottomTabNavigator","_useCheckoutSubscript","subscriptionInvalid","setSubscriptionInvalid","shouldUserHavePaidAccess","verifySubscription","invalidAccount","initialRouteName","isUserDiyAndInClientMode","areWeInAnOpinionatedRecipeInspirationApp","getScreenOptions","screenName","tabBarIcon","focused","getTabIcon","tabBarActiveTintColor","tabBarInactiveTintColor","headerShown","tabBarLabelStyle","tabBarTestID","Navigator","screenOptions","shouldHideTab","Screen","component","createNativeStackNavigator","CreateOwnRecipeTemplateStack","EditNutritionPlanStack","defaultScreenOptions","parentStackNavigatorScreenOptions","connectActionSheet","NotInCheckout","setCheckoutState","_useUsersBrandRetriev","isLoadingBrandQuery","navigationRef","useNavigationContainerRef","routeNameRef","_useUsersAuthTokenLog","_useUsersAuthTokenLog2","getAuthTokenFromMagicLinkPost","_useUsersAuthTokenLog3","authTokenResponse","eventListenerAddedResultRef","_handleUrlParams","queryParams","hasCheckoutQueryParam","magic_link_token","checkoutQueryParamValue","isArray","CHECKOUT","handleRedirectUrl","_handleRedirectUrl","urlData","handleUrlParams","handleRedirect","userLoggedIn","hasUserDeferredPwaInstallPrompt","_useUsersAuthUsersMeR","userError","getInitialURL","addEventListener","hasAppBeenOpenedRecently","authTokenFromRequest","dispatchAuthTokenToStoreIfPresent","TIMEOUT_FOR_ANALYTICS_TO_LOAD_IN_MS","LoginStack","LoginNestedStack","initialScreenIfNotLoggedIn","pwaSubdomainSignupScreen","PWASignupScreen","getCurrentRouteName","_navigationRef$curren","currentRoute","getCurrentRoute","history","pushState","handlePopState","preventDefault","shouldNavigateBack","navigateBackInApp","removeEventListener","_navigationRef$curren2","_navigationRef$curren3","NavigationContainer","fallback","currentRouteName","previousRouteName","BottomNavigationStack","uses_pwa","SignUpScreen","Onboarding_RegistrationScreen","RegistrationScreen","LoginScreenOnCheckout","FinishPlanningScreen","OnboardingScreen","RegisterScreen","EmailConfirmationSent","EmailConfirmed","GetStaredScreen","GetStartedScreen","PersonalDetailsScreen","AddLifeStyleScreen","RecipeInspirationScreen","IngredientSearchScreen","CheckoutFailureScreen","enableFreeze","LogBox","ignoreLogs","dsn","enableInExpoDevelopment","tracesSampleRate","beforeSend","hint","exception","originalException","fingerprint","_useFonts","useFonts","DMSans_400Regular","dmSans400Regular","DMSans_500Medium","dmSans500Medium","DMSans_700Bold","dmSans700Bold","documentReferrer","checkFacebookPixelAndFireEvent","currency","intervalId","trackStripeCheckoutPurchaseEvent","referrer","onunhandledrejection","ErrorBoundaryFallbackComponent","resetError","SSRProvider","PersistGate","persistor","persistStore","nativeBaseTheme","brandIfNotLoggedIn","primaryColour","getTheme","shouldHaveExtraPaddingAtBottomToAccountForIosHomeIndicator","hasHomeIndicator","rnElementsTheme","features","ThemeProvider","ActionSheetProvider","FlagsProvider","SentryReact","NavigationStack","StatusBar","registerRootComponent","App","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","amdO","deferred","O","chunkIds","priority","notFulfilled","Infinity","fulfilled","j","splice","getter","__esModule","leafPrototypes","getProto","getPrototypeOf","obj","mode","ns","def","getOwnPropertyNames","definition","defineProperty","enumerable","g","globalThis","Function","hmd","prop","Symbol","toStringTag","nmd","paths","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}