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src/layers/presentation/components/programs/ProgramPreviewCard.tsx","webpack://_N_E/./src/layers/presentation/components/programs/ProgramTags.tsx","webpack://_N_E/./src/layers/presentation/components/programs/ProgramNotRelevant.tsx","webpack://_N_E/./src/layers/presentation/components/programs/ProgramCard.tsx","webpack://_N_E/./src/layers/presentation/components/programs/ProgramsList.tsx","webpack://_N_E/./src/layers/presentation/components/ui/Card.tsx","webpack://_N_E/./src/layers/presentation/components/ui/Textarea.tsx","webpack://_N_E/./src/layers/presentation/services/programs.ts","webpack://_N_E/./src/layers/presentation/hooks/program.ts","webpack://_N_E/./src/layers/presentation/hooks/useLogger.ts","webpack://_N_E/./src/layers/presentation/services/searches.ts","webpack://_N_E/./src/layers/presentation/hooks/useProgramSearch.ts"],"sourcesContent":["import React, { useState, useMemo, ReactNode } from 'react';\nimport { Button } from '@nextui-org/react';\nimport { useTranslation } from '@/layers/presentation/i18n/client';\n\ninterface PaginatorProps {\n list: T[];\n pageSize?: number;\n children: (items: T[]) => ReactNode;\n className?: string;\n buttonClassName?: string;\n}\n\nexport default function Paginator({\n list,\n pageSize = 10,\n children,\n className = '',\n buttonClassName = 'mt-8',\n}: PaginatorProps) {\n const { t } = useTranslation();\n const [visibleCount, setVisibleCount] = useState(pageSize);\n\n const paginatedItems = useMemo(() => {\n return list.slice(0, visibleCount);\n }, [list, visibleCount]);\n\n const handleShowMore = () => {\n setVisibleCount(prev => prev + pageSize);\n };\n\n return (\n
\n {children(paginatedItems)}\n {list.length > visibleCount && (\n
\n \n
\n )}\n
\n );\n}\n","import React from 'react';\nimport { Link, Button, Skeleton } from '@nextui-org/react';\nimport { useTranslation } from '@/layers/presentation/i18n/client';\nimport { Program } from '@/types/models';\nimport { Card, CardFooter, CardBody, CardHeader } from '@/layers/presentation/components/ui/Card';\n\ntype ProgramPreviewCardProps = {\n program: Program;\n typeUrl: string;\n onCardPress: (id: number) => void;\n isLoadingProgram: boolean;\n isShowDetailsButton?: boolean;\n};\n\nconst ProgramPreviewCard: React.FC = ({\n program,\n typeUrl,\n onCardPress,\n isLoadingProgram,\n isShowDetailsButton = true,\n}) => {\n const { t } = useTranslation();\n\n const handlePress = () => {\n onCardPress(program.id);\n };\n\n return (\n \n {program?.sponsor_name && {program?.sponsor_name}}\n \n \n

{program?.name || ' '}

\n
\n \n

{program?.lead}

\n
\n
\n {isShowDetailsButton && (\n \n
\n \n {t('provider:programApply.viewProgram')}\n \n
\n
\n )}\n
\n );\n};\n\nexport default React.memo(ProgramPreviewCard);\n","import { useTranslation } from '@/layers/presentation/i18n/client';\nimport { ProgramStatusColor, UserType } from '@/types/modelEnums';\nimport { Program } from '@/types/models';\nimport { Chip } from '@nextui-org/react';\nimport React from 'react';\n\ninterface ProgramTagsProps {\n program: Program;\n type: UserType | 'about';\n isOutOfRange?: boolean;\n isShowEaInfo?: boolean;\n isInactive?: boolean;\n}\n\nconst ProgramTags: React.FC = ({\n program,\n type,\n isOutOfRange,\n isShowEaInfo,\n isInactive,\n}) => {\n const { t } = useTranslation();\n\n return (\n \n {isOutOfRange && (\n \n {t('components:programCard.outOfRange')}\n \n )}\n {program.details?.study_type === 'EXPANDED_ACCESS' && (\n \n {t('components:programCard.expandedAccess')}\n \n )}\n {program.details?.status === 'APPROVED_FOR_MARKETING' && (\n \n {t('components:programCard.approvedForMarketing')}\n \n )}\n {type === UserType.SPONSOR && (\n \n {program.status}\n \n )}\n {isShowEaInfo && (\n \n {t('components:programCard.sponsorExpandedAccess')}\n \n )}\n {isInactive && (\n \n {t('components:programCard.inactive')}\n \n )}\n \n );\n};\n\nexport default ProgramTags;\n","import React from 'react';\nimport { Button, Modal, ModalContent, ModalBody, useDisclosure } from '@nextui-org/react';\nimport logger from '@/layers/support/monitoring/logger';\nimport { Program } from '@/types/models';\nimport { useTranslation } from 'react-i18next';\nimport ProgramPreviewCard from './ProgramPreviewCard';\nimport { Textarea } from '@/layers/presentation/components/ui/Textarea';\nimport { NotificationType } from '@/types/modelEnums';\n\nimport { useThrowNotification } from '@/layers/presentation/hooks/useThrowNotification';\nconst LOG_MODULE = 'FE [Presentation / Components / ProgramNotRelevant]';\n\ninterface ProgramNotRelevantProps {\n program: Program;\n typeUrl: string;\n}\n\nconst ProgramNotRelevant: React.FC = ({ program, typeUrl }) => {\n const { t } = useTranslation();\n const { isOpen, onOpen, onClose } = useDisclosure();\n const throwNotification = useThrowNotification();\n\n const handleButtonClick = () => {\n onOpen();\n };\n\n const handleSubmit = () => {\n logger.info(`${LOG_MODULE} Submitting not relevant program ${program.id}`);\n onClose();\n throwNotification(\n NotificationType.Success,\n t('components:programCard.notRelevantSubmitted'),\n );\n };\n\n return (\n
\n \n {t('components:programCard.notRelevant')}\n \n\n \n \n \n

Mark program as not relevant

\n {}}\n isLoadingProgram={false}\n isShowDetailsButton={false}\n />\n \n \n {t('components:programCard.notRelevantSubmit')}\n \n
\n
\n
\n
\n );\n};\n\nexport default ProgramNotRelevant;\n","import { Card, CardBody, CardFooter, CardHeader } from '@/layers/presentation/components/ui/Card';\nimport { useTranslation } from '@/layers/presentation/i18n/client';\nimport { UserType } from '@/types/modelEnums';\nimport { Program } from '@/types/models';\nimport { Button, Chip, Link } from '@nextui-org/react';\nimport React, { useMemo } from 'react';\nimport ProgramNotRelevant from './ProgramNotRelevant';\nimport ProgramTags from './ProgramTags';\n\nexport interface ProgramCardProps {\n program: Program;\n type: UserType | 'about';\n typeUrl: string;\n onCardPress: (id: number) => void;\n selectedCancerType?: string;\n}\n\nconst ProgramCard: React.FC = ({\n program,\n type,\n typeUrl,\n onCardPress,\n selectedCancerType,\n}) => {\n const { t } = useTranslation();\n\n const handlePress = () => {\n onCardPress(program.id);\n };\n\n const isShowNotRelevantButton = type === UserType.PATIENT || type === UserType.PROVIDER;\n const isShowProgramControls = type === UserType.SPONSOR;\n\n const isShowEaInfo =\n program.details?.study_type !== 'EXPANDED_ACCESS' &&\n program.meta?.ea_search_clinicaltrials?.length > 0;\n\n if (type === UserType.PATIENT) {\n program.name = program.details?.patient_friendly?.title || program.name;\n program.lead = program.details?.patient_friendly?.lead || program.lead;\n }\n\n const displayConditions = useMemo(() => {\n const conditions = program.details?.conditions || [];\n const slicedConditions = conditions.slice(0, 5);\n\n if (selectedCancerType && !slicedConditions.includes(selectedCancerType)) {\n return [selectedCancerType, ...slicedConditions.slice(0, 4)];\n }\n\n return slicedConditions;\n }, [program.details?.conditions, selectedCancerType]);\n\n return (\n \n \n
\n
\n {type !== UserType.SPONSOR && program.details?.sponsor_name && (\n \n {program.details.sponsor_name}\n \n )}\n \n
\n
\n \n {t('components:programCard.added', {\n date: program.details?.added_date,\n })}\n \n \n {t('components:programCard.lastUpdated', {\n date: program.details?.updated_date,\n })}\n \n \n {t('components:programCard.id', { id: program.id })}\n \n
\n
\n
\n \n \n

\n {program.name}\n

\n

{program.lead}

\n \n
\n {(program.patient_params || type === UserType.SPONSOR) && (\n \n
\n
\n {displayConditions.map((condition: string) => (\n \n {condition}\n \n ))}\n
\n {isShowNotRelevantButton && (\n \n )}\n\n {isShowProgramControls && (\n
\n \n {t('components:programCard.programRequests')}\n \n \n {t('components:programCard.reports')}\n \n
\n )}\n
\n
\n )}\n \n );\n};\n\nexport default React.memo(ProgramCard);\n","'use client';\n\nimport Paginator from '@/layers/presentation/components/common/Paginator';\nimport ProgramCard from '@/layers/presentation/components/programs/ProgramCard';\nimport { Card, CardBody, CardFooter, CardHeader } from '@/layers/presentation/components/ui/Card';\nimport { useSubscriptionModal } from '@/layers/presentation/components/ui/SubscriptionPrompt';\nimport { useGlobalState } from '@/layers/presentation/context/GlobalStateContext';\nimport { useProgramsList } from '@/layers/presentation/hooks/program';\nimport { useTranslation } from '@/layers/presentation/i18n/client';\nimport {\n getPatientParamBySlug,\n getPatientParamValuesExtended,\n} from '@/layers/presentation/services/patients';\nimport logger from '@/layers/support/monitoring/logger';\nimport { ProgramStatus, UserType } from '@/types/modelEnums';\nimport { Program } from '@/types/models';\nimport { ProgramFilters } from '@/types/programs';\nimport { Button, Skeleton, Spinner } from '@nextui-org/react';\nimport { useRouter } from 'next/navigation';\nimport React, { useEffect, useMemo } from 'react';\n\nconst LOG_MODULE = 'FE [Presentation / Components / ProgramsList]';\n\ntype ProgramsListProps = {\n type: UserType | 'about';\n filters: ProgramFilters;\n onSaveSearch: (params: any, query: string) => void;\n};\n\nfunction ProgramsList({ type, filters }: ProgramsListProps) {\n const { t } = useTranslation();\n const router = useRouter();\n const { user, patientParamsDictionary } = useGlobalState();\n\n const memoizedFilters = useMemo(\n () => ({\n ...filters,\n ...(type !== UserType.SPONSOR ? { status: ProgramStatus.ACTIVE } : {}),\n ...({ sortBy: 'added_date', sortOrder: 'desc' } as ProgramFilters),\n }),\n [filters, type],\n );\n\n const { programs, isLoading, isInitialLoad, error } = useProgramsList(memoizedFilters);\n\n const selectedCancerTypeParam = useMemo(() => {\n if (!patientParamsDictionary.length || !filters.patientParams) return null;\n return getPatientParamBySlug(patientParamsDictionary, 'c3_cancer_type');\n }, [patientParamsDictionary, filters.patientParams]);\n\n const selectedCancerTypeValues = useMemo(() => {\n if (!selectedCancerTypeParam || !filters.patientParams || isLoading) return null;\n const extendedValues = getPatientParamValuesExtended(\n patientParamsDictionary,\n filters.patientParams,\n );\n return extendedValues[selectedCancerTypeParam.id]?.values || [];\n }, [selectedCancerTypeParam, filters.patientParams, patientParamsDictionary, isLoading]);\n\n const hasFilters = useMemo(() => {\n return Object.values(filters.patientParams || {}).some(\n param => Array.isArray(param) && param.length > 0,\n );\n }, [filters.patientParams]);\n\n const hasQuery = useMemo(() => {\n return filters.query !== '';\n }, [filters.query]);\n\n const typeUrl = type.toLowerCase();\n\n useEffect(() => {\n logger.debug(`${LOG_MODULE} Render`, {\n type,\n user,\n programs,\n isLoading,\n error,\n filters,\n memoizedFilters,\n hasFilters,\n hasQuery,\n selectedCancerTypeParam,\n selectedCancerTypeValues,\n });\n }, [\n type,\n user,\n programs,\n isLoading,\n error,\n filters,\n memoizedFilters,\n hasFilters,\n hasQuery,\n selectedCancerTypeParam,\n selectedCancerTypeValues,\n ]);\n\n const handleCardPress = (id: number) => {\n router.push(`/${typeUrl}/programs/${id}`);\n };\n\n // Setup subscription modal data\n const subscriptionText = useMemo(\n () => ({\n title: 'Stay Updated on Treatment Opportunities',\n text: 'Get notified when new expanded access programs become available that match your criteria.',\n button: 'Subscribe for Updates',\n }),\n [],\n );\n\n const subscriptionParams = useMemo(\n () => ({\n userType: type !== 'about' ? type : undefined,\n patientParams: filters.patientParams,\n query: filters.query,\n }),\n [type, filters.patientParams, filters.query],\n );\n\n const { openModal } = useSubscriptionModal();\n\n return (\n
\n {isInitialLoad && (\n
\n {Array.from({ length: 2 }).map((_, index) => (\n \n \n \n

{t('components:programsList.loading')}

\n
\n
\n \n \n

{t('components:programsList.loading')}

\n
\n
\n \n \n

{t('components:programsList.loading')}

\n
\n
\n
\n ))}\n
\n )}\n\n {!isInitialLoad && (\n <>\n {isLoading && (\n
\n \n
\n )}\n
\n

\n {hasQuery\n ? t('components:programsList.bestMatches')\n : t('components:programsList.recentExpandedAccess')}\n

\n {programs.ea && programs.ea.length > 0 ? (\n list={programs.ea} pageSize={10}>\n {paginatedItems => (\n
\n {paginatedItems.map(program => (\n \n ))}\n
\n )}\n \n ) : (\n \n \n
\n
{t('components:programsList.noProgramsFound')}
\n
\n However, Right2Hope will continue searching for new\n treatment opportunities on your behalf. Enter your\n email, and we'll notify you as soon as a relevant\n program becomes available.\n
\n \n openModal(subscriptionText, subscriptionParams)\n }\n >\n Get Treatment Updates Straight to Your Email\n \n
\n
\n
\n )}\n
\n\n
\n

\n {hasQuery\n ? t('components:programsList.otherPrograms')\n : t('components:programsList.recentClinicalTrials')}\n

\n {programs.nonEa && programs.nonEa.length > 0 ? (\n list={programs.nonEa} pageSize={10}>\n {paginatedItems => (\n
\n {paginatedItems.map(program => (\n \n ))}\n
\n )}\n \n ) : (\n \n {t('components:programsList.noTrialsFound')}\n \n )}\n
\n \n )}\n
\n );\n}\n\nexport default React.memo(ProgramsList);\n","import React from 'react';\nimport {\n Card as NextUICard,\n CardHeader as NextUICardHeader,\n CardBody as NextUICardBody,\n CardFooter as NextUICardFooter,\n CardProps as NextUICardProps,\n HTMLNextUIProps,\n} from '@nextui-org/react';\n\ninterface CardProps extends NextUICardProps {\n href?: string;\n}\n\nexport function Card(props: CardProps) {\n return (\n \n {props.children}\n \n );\n}\n\nexport function CardHeader(props: HTMLNextUIProps) {\n return {props.children};\n}\n\nexport function CardBody(props: HTMLNextUIProps) {\n return {props.children};\n}\n\nexport function CardFooter(props: HTMLNextUIProps) {\n return {props.children};\n}\n","import React from 'react';\nimport { Textarea as NextUITextarea, TextAreaProps } from '@nextui-org/react';\n\nexport function Textarea(props: TextAreaProps) {\n return (\n \n {props.children}\n \n );\n}\n","import { Program, PatientParamValues } from '@/types/models';\nimport { fetchWrapper } from '../utils/fetchWrapper';\nimport logger from '@/layers/support/monitoring/logger';\nimport { NewProgramRequest, ProgramFilters } from '@/types/programs';\n\nconst API_URL = '/api/programs';\nconst LOG_MODULE = 'FE [Presentation / Services / programs]';\n\nexport const fetchPrograms = async (filters?: ProgramFilters): Promise => {\n logger.debug(`${LOG_MODULE} fetchPrograms: begin`, { filters });\n\n try {\n const result = await fetchWrapper.get(\n `${API_URL}?filters=${JSON.stringify(filters)}`,\n );\n\n logger.debug(`${LOG_MODULE} fetchPrograms: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchPrograms: error`, { error });\n throw error;\n }\n};\n\nexport const fetchProgramById = async (id: number): Promise => {\n logger.debug(`${LOG_MODULE} fetchProgramById: begin`, { id });\n\n try {\n const result = await fetchWrapper.get(`${API_URL}/${id}`);\n\n logger.debug(`${LOG_MODULE} fetchProgramById: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchProgramById: error`, { error });\n throw error;\n }\n};\n\nexport const createProgram = async (program: NewProgramRequest): Promise => {\n logger.debug(`${LOG_MODULE} createProgram: begin`, { program });\n\n try {\n const result = await fetchWrapper.post(API_URL, program);\n\n logger.debug(`${LOG_MODULE} createProgram: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} createProgram: error`, { error });\n throw error;\n }\n};\n\nexport const updateProgram = async (id: string, program: Partial): Promise => {\n logger.debug(`${LOG_MODULE} updateProgram: begin`, { id, program });\n\n try {\n const result = await fetchWrapper.put(`${API_URL}/${id}`, program);\n\n logger.debug(`${LOG_MODULE} updateProgram: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} updateProgram: error`, { error });\n throw error;\n }\n};\n\nexport const deleteProgram = async (id: string): Promise => {\n logger.debug(`${LOG_MODULE} deleteProgram: begin`, { id });\n\n try {\n await fetchWrapper.delete(`${API_URL}/${id}`);\n\n logger.debug(`${LOG_MODULE} deleteProgram: end`);\n } catch (error) {\n logger.error(`${LOG_MODULE} deleteProgram: error`, { error });\n throw error;\n }\n};\n","import { useLogger } from '@/layers/presentation/hooks/useLogger';\nimport {\n createProgram as createProgramService,\n fetchProgramById,\n fetchPrograms,\n updateProgram as updateProgramService,\n} from '@/layers/presentation/services/programs';\nimport { Program } from '@/types/models';\nimport { NewProgramRequest, ProgramFilters, ProgramsListResponse } from '@/types/programs';\nimport { useCallback, useEffect, useState } from 'react';\nimport { useDebounce } from 'use-debounce';\n\nconst DEBOUNCE_TIME = 2000;\nconst LOG_MODULE = 'FE [Presentation / Hooks / Program]';\n\nexport function useProgram(programId: number | null) {\n const [program, setProgram] = useState(null);\n const [isLoading, setIsLoading] = useState(true);\n const [error, setError] = useState(null);\n\n const log = useLogger({\n module: LOG_MODULE,\n props: {\n programId,\n },\n data: {\n values: {\n program,\n },\n loading: {\n program: isLoading,\n },\n error,\n },\n });\n\n const fetchData = useCallback(async () => {\n if (programId === null) {\n setIsLoading(false);\n return;\n }\n\n try {\n setIsLoading(true);\n const fetchedProgram = await fetchProgramById(programId);\n setProgram(fetchedProgram);\n setError(null);\n } catch (error) {\n setError((error as Error).message);\n } finally {\n setIsLoading(false);\n }\n }, [programId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n const updateProgram = useCallback(\n async (updatedProgram: Partial) => {\n if (!program) return;\n\n try {\n log('Updating Program', { updatedProgram });\n const result = await updateProgramService(program.id.toString(), updatedProgram);\n setProgram(result);\n setError(null);\n return result;\n } catch (error) {\n setError((error as Error).message);\n throw error;\n }\n },\n [program, log],\n );\n\n const createProgram = useCallback(\n async (newProgram: NewProgramRequest) => {\n try {\n log('Creating Program', { newProgram });\n const created = await createProgramService(newProgram);\n setProgram(created);\n return created;\n } catch (error) {\n setError((error as Error).message);\n throw error;\n }\n },\n [log],\n );\n\n return {\n program,\n isLoading,\n error,\n updateProgram,\n createProgram,\n refetch: fetchData,\n };\n}\n\nexport const useProgramsList = (\n filters: ProgramFilters,\n shouldNotFetch?: boolean,\n): {\n programs: ProgramsListResponse;\n isLoading: boolean;\n isInitialLoad: boolean;\n error: Error | null;\n} => {\n const [programs, setPrograms] = useState({\n recent: [],\n ea: [],\n nonEa: [],\n });\n const [isLoading, setIsLoading] = useState(false);\n const [isInitialLoad, setIsInitialLoad] = useState(true);\n const [error, setError] = useState(null);\n\n const [debouncedFilters] = useDebounce(filters, DEBOUNCE_TIME);\n\n const log = useLogger({\n module: LOG_MODULE,\n props: {\n filters,\n shouldNotFetch,\n },\n data: {\n values: {\n programs,\n debouncedFilters,\n },\n loading: {\n isLoading,\n isInitialLoad,\n },\n error,\n },\n });\n\n useEffect(() => {\n if (shouldNotFetch) {\n setPrograms({ ea: [], nonEa: [] });\n setIsLoading(false);\n setError(null);\n return;\n }\n\n const fetchData = async () => {\n setIsLoading(true);\n setError(null);\n try {\n if (debouncedFilters.query || debouncedFilters.patientParams) {\n log('Fetching EA and Non-EA programs', { debouncedFilters });\n\n const limit = debouncedFilters.query ? 50 : 10;\n\n const eaFilters = {\n ...debouncedFilters,\n limit,\n isExpandedAccess: true,\n };\n const nonEaFilters = {\n ...debouncedFilters,\n limit,\n isExpandedAccess: false,\n };\n\n const eaPromise = fetchPrograms(eaFilters)\n .then(eaPrograms => {\n setPrograms(prev => ({\n ...prev,\n ea: eaPrograms,\n }));\n log('EA programs fetched', { eaPrograms });\n })\n .catch(err => {\n log('Error fetching EA programs', { error: err });\n setError(err as Error);\n });\n\n const nonEaPromise = fetchPrograms(nonEaFilters)\n .then(nonEaPrograms => {\n setPrograms(prev => ({\n ...prev,\n nonEa: nonEaPrograms,\n }));\n log('Non-EA programs fetched', { nonEaPrograms });\n })\n .catch(err => {\n log('Error fetching Non-EA programs', { error: err });\n setError(err as Error);\n });\n\n await Promise.all([eaPromise, nonEaPromise]);\n\n setPrograms(prev => ({\n ...prev,\n recent: [],\n }));\n } else {\n log('Fetching recent programs', { debouncedFilters });\n const recentPrograms = await fetchPrograms({\n ...debouncedFilters,\n limit: 10,\n });\n setPrograms({\n recent: recentPrograms,\n ea: [],\n nonEa: [],\n });\n }\n } catch (err) {\n log('Error fetching programs', { error: err });\n setError(err as Error);\n } finally {\n setIsLoading(false);\n if (isInitialLoad) {\n setIsInitialLoad(false);\n }\n }\n };\n\n fetchData();\n }, [debouncedFilters, shouldNotFetch, isInitialLoad, log]);\n\n return { programs, isLoading, isInitialLoad, error };\n};\n","import logger from '@/layers/support/monitoring/logger';\nimport { useCallback, useEffect, useRef } from 'react';\n\ntype LoggerConfig = {\n module: string;\n props?: Record;\n state?: Record;\n data?: {\n values: Record;\n loading?: Record;\n error?: any;\n };\n};\n\ntype LogFunction = (event: string, data?: Record) => void;\n\nexport function useLogger({ module, props, state, data }: LoggerConfig): LogFunction {\n // Use refs to track previous values and prevent duplicate logging\n const hasLoggedProps = useRef(false);\n const prevState = useRef(state);\n const prevData = useRef(data);\n\n // Log props only once on mount\n useEffect(() => {\n if (props && !hasLoggedProps.current) {\n logger.debug(`${module} :: Props`, props);\n hasLoggedProps.current = true;\n }\n }); // Empty deps = runs once on mount\n\n // Log state changes\n useEffect(() => {\n if (state && JSON.stringify(state) !== JSON.stringify(prevState.current)) {\n logger.debug(`${module} :: State`, {\n current: state,\n previous: prevState.current,\n changes: Object.keys(state).filter(\n key => JSON.stringify(state[key]) !== JSON.stringify(prevState.current?.[key]),\n ),\n });\n prevState.current = state;\n }\n }, [state, module]);\n\n // Log data changes\n useEffect(() => {\n if (!data) return;\n\n const prevDataValue = prevData.current;\n const hasDataChanged = JSON.stringify(data) !== JSON.stringify(prevDataValue);\n\n if (hasDataChanged) {\n const isLoading = Object.values(data.loading || {}).some(loading => loading);\n const changedValues = Object.keys(data.values || {}).filter(\n key =>\n JSON.stringify(data.values[key]) !==\n JSON.stringify(prevDataValue?.values?.[key]),\n );\n const changedLoadingStates = Object.keys(data.loading || {}).filter(\n key => data.loading?.[key] !== prevDataValue?.loading?.[key],\n );\n\n // Log loading state changes\n if (changedLoadingStates.length > 0) {\n logger.debug(`${module} :: Loading State Changed`, {\n loading: data.loading,\n changedStates: changedLoadingStates,\n });\n }\n\n // Log data value changes\n if (changedValues.length > 0 && !isLoading) {\n logger.debug(`${module} :: Data Updated`, {\n values: data.values,\n changedFields: changedValues,\n error: data.error,\n });\n }\n\n // Log errors if present\n if (data.error !== prevDataValue?.error) {\n logger.debug(`${module} :: Error State Changed`, {\n error: data.error,\n previousError: prevDataValue?.error,\n });\n }\n\n prevData.current = data;\n }\n }, [data, module]);\n\n // Event logging function\n const log = useCallback(\n (event: string, data?: Record) => {\n logger.debug(`${module} :: ${event}`, data || {});\n },\n [module],\n );\n\n return log;\n}\n","import { SavedSearch } from '@/types/models';\nimport logger from '@/layers/support/monitoring/logger';\nimport { fetchWrapper } from '../utils/fetchWrapper';\n\nconst LOG_MODULE = 'FE [Presentation / Services / searches]';\n\nconst API_URL = '/api/programs/searches';\n\nexport const fetchSavedSearches = async (\n userId: string,\n patientId?: string,\n): Promise => {\n logger.debug(`${LOG_MODULE} fetchSavedSearches: begin`, { userId, patientId });\n\n try {\n const queryParams = new URLSearchParams();\n queryParams.append('userId', userId);\n\n if (patientId) queryParams.append('patientId', patientId);\n\n logger.debug(`${LOG_MODULE} fetchSavedSearches: queryParams`, { queryParams });\n\n const result = await fetchWrapper.get(\n `${API_URL}?${queryParams.toString()}`,\n );\n\n logger.debug(`${LOG_MODULE} fetchSavedSearches: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchSavedSearches: error`, { error });\n throw error;\n }\n};\n\nexport const fetchSavedSearchById = async (id: number): Promise => {\n logger.debug(`${LOG_MODULE} fetchSavedSearchById: begin`, { id });\n\n try {\n const result = await fetchWrapper.get(`${API_URL}/${id}`);\n\n logger.debug(`${LOG_MODULE} fetchSavedSearchById: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} fetchSavedSearchById: error`, { error });\n throw error;\n }\n};\n\nexport const createSavedSearch = async (search: Partial): Promise => {\n logger.debug(`${LOG_MODULE} createSavedSearch: begin`, { search });\n\n try {\n const result = await fetchWrapper.post(API_URL, search);\n\n logger.debug(`${LOG_MODULE} createSavedSearch: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} createSavedSearch: error`, { error });\n throw error;\n }\n};\n\nexport const updateSavedSearch = async (\n id: number,\n search: Partial,\n): Promise => {\n logger.debug(`${LOG_MODULE} updateSavedSearch: begin`, { id, search });\n\n try {\n const result = await fetchWrapper.put(`${API_URL}/${id}`, search);\n\n logger.debug(`${LOG_MODULE} updateSavedSearch: end`, { result });\n return result;\n } catch (error) {\n logger.error(`${LOG_MODULE} updateSavedSearch: error`, { error });\n throw error;\n }\n};\n","import { CANCER_SUBTYPE_PARAM_ID, CANCER_TYPE_PARAM_ID } from '@/config/constants';\nimport { useGlobalState } from '@/layers/presentation/context/GlobalStateContext';\nimport { useThrowNotification } from '@/layers/presentation/hooks/useThrowNotification';\nimport { createSavedSearch, fetchSavedSearches } from '@/layers/presentation/services/searches';\nimport logger from '@/layers/support/monitoring/logger';\nimport { NotificationType, ParamType } from '@/types/modelEnums';\nimport { PatientParamValue, PatientParamValues, SavedSearch } from '@/types/models';\nimport { format } from 'date-fns';\nimport { useCallback, useEffect, useState } from 'react';\n\nconst LOG_MODULE = '[Hooks / useProgramSearch]';\n\nexport type HandleParamChangeType = (props: HandleParamChangeProps) => void;\nexport type HandleQueryChangeType = (props: HandleQueryChangeProps) => void;\n\nexport type HandleParamChangeProps = {\n paramId: number;\n type: ParamType;\n paramValue: PatientParamValue;\n};\n\nexport type HandleQueryChangeProps = {\n query: string;\n};\n\nexport function useProgramSearch() {\n const {\n user,\n patientParamsDictionary,\n isLoadingParams,\n error,\n selectedOptions,\n setSelectedOptions,\n query,\n setQuery,\n } = useGlobalState();\n const [savedSearches, setSavedSearches] = useState([]);\n const [selectedSearch, setSelectedSearch] = useState('');\n const [selectedTabKey, setSelectedTabKey] = useState('search');\n const [isAdvancedSearchVisible, setAdvancedSearchVisible] = useState(false);\n const [isSaving, setIsSaving] = useState(false);\n const throwNotification = useThrowNotification();\n\n const toggleAdvancedSearch = useCallback(() => {\n setAdvancedSearchVisible(prev => !prev);\n }, []);\n\n const updateHashWithFilters = useCallback(\n (selectedOptions: PatientParamValues, query: string) => {\n logger.debug(`${LOG_MODULE} updateHashWithFilters`, {\n selectedOptions,\n query,\n });\n\n const params = new URLSearchParams();\n Object.entries(selectedOptions).forEach(([key, paramValue]) => {\n if (Array.isArray(paramValue) && paramValue.length > 0) {\n params.set(`param_${key}`, paramValue.join(','));\n } else if (!Array.isArray(paramValue) && paramValue) {\n params.set(`param_${key}`, paramValue);\n }\n });\n if (query) {\n params.set('query', query);\n }\n const newHash = params.toString() ? `#${params.toString()}` : '';\n\n // Use history.pushState instead of location.replace to avoid page resets\n const newUrl = `${window.location.pathname}${newHash}`;\n window.history.pushState({ path: newUrl }, '', newUrl);\n },\n [],\n );\n\n const parseParamsFromHash = useCallback((): {\n selectedOptions: PatientParamValues;\n query: string;\n } => {\n const hash = window.location.hash.substring(1);\n const params = new URLSearchParams(hash);\n const selectedOptions: PatientParamValues = {};\n\n params.forEach((value, key) => {\n if (key.startsWith('param_')) {\n const paramId = key.replace('param_', '');\n\n // Handle numeric param values (like cancer type/subtype)\n if (\n paramId === String(CANCER_TYPE_PARAM_ID) ||\n paramId === String(CANCER_SUBTYPE_PARAM_ID)\n ) {\n selectedOptions[paramId] = value.split(',').map(Number);\n } else {\n try {\n // Try to parse as numbers if possible\n selectedOptions[paramId] = value.split(',').map(Number);\n } catch (e) {\n // If parsing fails, keep as string\n selectedOptions[paramId] = value;\n }\n }\n }\n });\n\n const query = params.get('query') || '';\n logger.debug(`${LOG_MODULE} parseParamsFromHash`, { selectedOptions, query });\n return { selectedOptions, query };\n }, []);\n\n // Memoize getAllOptionTexts since it depends on patientParamsDictionary\n const getAllOptionTexts = useCallback(\n (selectedOptions: PatientParamValues): string => {\n const optionTexts: string[] = [];\n\n const optionsToProcess = Object.entries(selectedOptions);\n optionsToProcess.forEach(([paramId, paramValue]) => {\n const param = patientParamsDictionary.find(p => p.id === Number(paramId));\n if (Array.isArray(paramValue) && param) {\n const texts = paramValue\n .map(optionId => param.options.find(o => o.id === optionId)?.option)\n .filter(Boolean) as string[];\n optionTexts.push(...texts);\n }\n });\n\n return optionTexts.join(', ');\n },\n [patientParamsDictionary],\n );\n\n const escapeRegExp = useCallback((string: string) => {\n return string.replace(/[.*+?^${}()|[\\]\\\\\\-/]/g, '\\\\$&');\n }, []);\n\n const updateQueryFromParams = useCallback(\n (\n prevOptions: PatientParamValues,\n updatedOptions: PatientParamValues,\n paramId: number,\n paramValue: PatientParamValue,\n ) => {\n const noRealChange =\n JSON.stringify(prevOptions[paramId]) === JSON.stringify(paramValue);\n\n if (noRealChange) {\n return;\n }\n\n // When cancer type/subtype is changed\n if (paramId === CANCER_TYPE_PARAM_ID || paramId === CANCER_SUBTYPE_PARAM_ID) {\n const filteredOptions = Object.fromEntries(\n Object.entries(updatedOptions).filter(\n ([id]) =>\n id === String(CANCER_TYPE_PARAM_ID) ||\n id === String(CANCER_SUBTYPE_PARAM_ID),\n ),\n );\n\n const cancerText = getAllOptionTexts(filteredOptions);\n setQuery(cancerText);\n\n logger.debug(`${LOG_MODULE} handleParamChange: updated query with cancer info`, {\n cancerText,\n updatedQuery: cancerText,\n });\n }\n },\n [getAllOptionTexts, setQuery],\n );\n\n const updateParamFromQuery = useCallback(\n (query: string, selectedOptions: PatientParamValues) => {\n // Get current cancer types and subtypes to check against\n const cancerTypeParam = patientParamsDictionary.find(\n param => param.id === CANCER_TYPE_PARAM_ID,\n );\n const cancerSubtypeParam = patientParamsDictionary.find(\n param => param.id === CANCER_SUBTYPE_PARAM_ID,\n );\n const cancerTypes = cancerTypeParam?.options || [];\n const cancerSubtypes = cancerSubtypeParam?.options || [];\n\n let newOptions = { ...selectedOptions };\n let foundCancerTypeMatch = false;\n let foundCancerSubtypeMatch = false;\n\n if (query !== '' && query.length > 3) {\n // Check if query contains a comma\n if (query.includes(',')) {\n // Split the query by comma to separate cancer type and subtype\n const parts = query.split(',').map(part => part.trim());\n\n // First part is cancer type\n if (parts.length > 0) {\n const cancerTypeText = parts[0];\n\n // Find matching cancer type\n const matchingType = cancerTypes.find(\n type => type.option.toLowerCase() === cancerTypeText.toLowerCase(),\n );\n\n if (matchingType) {\n newOptions = {\n ...newOptions,\n [CANCER_TYPE_PARAM_ID]: [matchingType.id],\n };\n foundCancerTypeMatch = true;\n\n // If we have a second part, it's the subtype\n if (parts.length > 1) {\n const subtypeText = parts[1];\n\n // Filter subtypes based on parent cancer type\n const filteredSubtypes = cancerSubtypes.filter(\n subtype => subtype.parent_option_id === matchingType.id,\n );\n\n // Find matching subtype\n const matchingSubtype = filteredSubtypes.find(\n subtype =>\n subtype.option &&\n subtype.option.toLowerCase() === subtypeText.toLowerCase(),\n );\n\n if (matchingSubtype) {\n newOptions = {\n ...newOptions,\n [CANCER_SUBTYPE_PARAM_ID]: [matchingSubtype.id],\n };\n foundCancerSubtypeMatch = true;\n }\n }\n }\n }\n } else {\n // No comma - try to match the entire query as a cancer type\n const matchingType = cancerTypes.find(\n type => type.option.toLowerCase() === query.toLowerCase(),\n );\n\n if (matchingType) {\n newOptions = {\n ...newOptions,\n [CANCER_TYPE_PARAM_ID]: [matchingType.id],\n };\n foundCancerTypeMatch = true;\n }\n }\n\n // Clear cancer type if no match is found and query isn't empty\n if (!foundCancerTypeMatch && query !== '') {\n if (newOptions[CANCER_TYPE_PARAM_ID]) {\n delete newOptions[CANCER_TYPE_PARAM_ID];\n }\n }\n\n // Clear cancer subtype if no match is found and query isn't empty\n if (!foundCancerSubtypeMatch && query !== '') {\n if (newOptions[CANCER_SUBTYPE_PARAM_ID]) {\n delete newOptions[CANCER_SUBTYPE_PARAM_ID];\n }\n }\n } else if (query === '') {\n // Clear both if query is empty\n delete newOptions[CANCER_TYPE_PARAM_ID];\n delete newOptions[CANCER_SUBTYPE_PARAM_ID];\n }\n\n setSelectedOptions(newOptions);\n },\n [patientParamsDictionary, setSelectedOptions],\n );\n\n const handleParamChange: HandleParamChangeType = useCallback(\n (props: HandleParamChangeProps) => {\n setSelectedOptions(prevOptions => {\n const updatedOptions: PatientParamValues = {\n ...prevOptions,\n [props.paramId]: props.paramValue,\n };\n\n updateQueryFromParams(prevOptions, updatedOptions, props.paramId, props.paramValue);\n return updatedOptions;\n });\n },\n [setSelectedOptions, updateQueryFromParams],\n );\n\n const handleQueryChange: HandleQueryChangeType = useCallback(\n (props: HandleQueryChangeProps) => {\n setQuery(props.query);\n\n updateParamFromQuery(props.query, selectedOptions);\n\n // Keep the search tab selected\n setSelectedTabKey('search');\n },\n [setQuery, setSelectedTabKey, updateParamFromQuery, selectedOptions],\n );\n\n const handleSaveSearch = useCallback(\n async (params: PatientParamValues, query: string) => {\n logger.debug(`${LOG_MODULE} handleSaveSearch: begin`, { params, query });\n setIsSaving(true);\n try {\n const newSearch: Partial = {\n patient_params: params,\n query,\n user_id: user?.id,\n };\n const savedSearch = await createSavedSearch(newSearch);\n logger.debug(`${LOG_MODULE} handleSaveSearch: end`, {\n newSearch,\n savedSearch,\n });\n\n // Show success notification\n throwNotification(NotificationType.Success, 'Search saved successfully!');\n\n // Reload saved searches\n const searches = await fetchSavedSearches(user!.id);\n setSavedSearches(\n searches.sort(\n (a, b) =>\n new Date(b.created_at).getTime() - new Date(a.created_at).getTime(),\n ),\n );\n } catch (error) {\n logger.error(`${LOG_MODULE} handleSaveSearch`, { error });\n throwNotification(NotificationType.Error, 'Failed to save search');\n } finally {\n setIsSaving(false);\n }\n },\n [user, throwNotification],\n );\n\n const handleSearchSelect = useCallback(\n (searchId: string) => {\n logger.debug(`${LOG_MODULE} handleSearchSelect`, { searchId });\n setSelectedSearch(searchId);\n const search = savedSearches.find(s => s.id.toString() === searchId);\n if (search && search.patient_params) {\n setSelectedOptions(search.patient_params);\n setQuery(search.query || '');\n updateHashWithFilters(search.patient_params, search.query || '');\n logger.debug(`${LOG_MODULE} handleSearchSelect: setSelectedOptions and setQuery`, {\n search,\n selectedOptions,\n query,\n });\n }\n },\n [\n savedSearches,\n setSelectedSearch,\n setSelectedOptions,\n setQuery,\n selectedOptions,\n query,\n updateHashWithFilters,\n ],\n );\n\n const summarizePatientParams = useCallback(\n (params: PatientParamValues, query: string | undefined) => {\n logger.debug(`${LOG_MODULE} summarizePatientParams: begin`, { params });\n let result = Object.entries(params)\n .map(([paramId, paramValue]) => {\n const param = patientParamsDictionary.find(\n (p: any) => p.id === parseInt(paramId),\n );\n if (!param) return '';\n if (Array.isArray(paramValue)) {\n const optionStrings = paramValue\n .map(o => param.options.find((po: any) => po.id === o)?.option)\n .filter(Boolean);\n return `${param.name}: ${optionStrings.join(', ')}`;\n } else {\n return `${param.name}: ${paramValue}`;\n }\n })\n .filter(Boolean)\n .join('; ');\n\n if (query) {\n result = `Query: \"${query}\"; ${result}`;\n }\n\n logger.debug(`${LOG_MODULE} summarizePatientParams: end`, { result });\n return result;\n },\n [patientParamsDictionary],\n );\n\n const formatSearchName = useCallback(\n (search: SavedSearch) => {\n const date = format(new Date(search.created_at), 'yyyy-MM-dd HH:mm');\n const paramsSummary = summarizePatientParams(search.patient_params, search.query);\n return `${date} - ${paramsSummary}`;\n },\n [summarizePatientParams],\n );\n\n useEffect(() => {\n const loadSavedSearches = async () => {\n logger.debug(`${LOG_MODULE} loadSavedSearches: begin`);\n try {\n const searches = await fetchSavedSearches(user!.id);\n logger.debug(`${LOG_MODULE} loadSavedSearches: end`, { searches });\n // Sort searches by created_at in descending order\n setSavedSearches(\n searches.sort(\n (a, b) =>\n new Date(b.created_at).getTime() - new Date(a.created_at).getTime(),\n ),\n );\n } catch (error) {\n logger.error(`${LOG_MODULE} loadSavedSearches`, { error });\n }\n };\n\n if (user?.id) {\n loadSavedSearches();\n }\n }, [user]);\n\n useEffect(() => {\n // Initial parse from hash\n const { selectedOptions, query } = parseParamsFromHash();\n setSelectedOptions(selectedOptions);\n setQuery(query);\n\n // Set up listener for browser back/forward navigation\n const handlePopState = () => {\n const { selectedOptions, query } = parseParamsFromHash();\n setSelectedOptions(selectedOptions);\n setQuery(query);\n };\n\n window.addEventListener('popstate', handlePopState);\n\n return () => {\n window.removeEventListener('popstate', handlePopState);\n };\n }, [setSelectedOptions, setQuery, parseParamsFromHash]);\n\n useEffect(() => {\n updateHashWithFilters(selectedOptions, query);\n }, [selectedOptions, query, updateHashWithFilters]);\n\n return {\n selectedOptions,\n savedSearches,\n selectedSearch,\n selectedTabKey,\n patientParamsDictionary,\n isLoadingParams,\n error,\n handleParamChange,\n handleSaveSearch,\n handleSearchSelect,\n formatSearchName,\n setSelectedTabKey,\n query,\n handleQueryChange,\n isAdvancedSearchVisible,\n toggleAdvancedSearch,\n isSaving,\n };\n}\n\nexport type UseProgramSearchReturn = ReturnType;\n"],"names":["Paginator","param","list","pageSize","children","className","buttonClassName","t","useTranslation","visibleCount","setVisibleCount","useState","paginatedItems","useMemo","slice","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsxs","div","length","jsx","concat","Button","color","onPress","prev","__webpack_exports__","Z","React","program","typeUrl","onCardPress","isLoadingProgram","isShowDetailsButton","Card","sponsor_name","CardHeader","CardBody","Skeleton","isLoaded","h4","name","p","lead","CardFooter","as","Link","size","radius","variant","href","id","type","isOutOfRange","isShowEaInfo","isInactive","span","Chip","details","study_type","status","UserType","SPONSOR","ProgramStatusColor","programs_ProgramNotRelevant","isOpen","onOpen","onClose","useDisclosure","throwNotification","useThrowNotification","jsx_runtime","onClick","Modal","ModalContent","ModalBody","h2","ProgramPreviewCard","Textarea","label","placeholder","logger","info","NotificationType","Success","programs_ProgramCard","selectedCancerType","isShowNotRelevantButton","PATIENT","PROVIDER","isShowProgramControls","meta","ea_search_clinicaltrials","patient_friendly","title","displayConditions","slicedConditions","conditions","includes","isPressable","ProgramTags","out_of_range","date","added_date","updated_date","patient_params","map","condition","ProgramNotRelevant","programs_ProgramsList","filters","router","useRouter","user","patientParamsDictionary","useGlobalState","memoizedFilters","ProgramStatus","ACTIVE","sortBy","sortOrder","programs","isLoading","isInitialLoad","error","useProgramsList","selectedCancerTypeParam","patientParams","getPatientParamBySlug","selectedCancerTypeValues","extendedValues","getPatientParamValuesExtended","values","hasFilters","Object","some","Array","isArray","hasQuery","query","toLowerCase","useEffect","debug","handleCardPress","push","subscriptionText","text","button","subscriptionParams","userType","undefined","openModal","useSubscriptionModal","from","_","index","Fragment","Spinner","role","ea","ProgramCard","nonEa","props","NextUICard","classNames","base","header","body","footer","NextUICardHeader","NextUICardBody","NextUICardFooter","NextUITextarea","inputWrapper","API_URL","LOG_MODULE","fetchPrograms","result","fetchWrapper","get","JSON","stringify","fetchProgramById","createProgram","post","updateProgram","put","useProgram","programId","setProgram","setIsLoading","setError","log","useLogger","module","data","loading","fetchData","useCallback","fetchedProgram","message","updatedProgram","updateProgramService","toString","newProgram","created","createProgramService","refetch","shouldNotFetch","setPrograms","recent","setIsInitialLoad","debouncedFilters","useDebounce","limit","eaFilters","isExpandedAccess","nonEaFilters","eaPromise","then","eaPrograms","catch","err","nonEaPromise","nonEaPrograms","Promise","all","recentPrograms","state","hasLoggedProps","useRef","prevState","prevData","current","previous","changes","keys","filter","key","prevDataValue","changedValues","changedLoadingStates","changedStates","changedFields","previousError","event","fetchSavedSearches","userId","patientId","queryParams","URLSearchParams","append","createSavedSearch","search","useProgramSearch","isLoadingParams","selectedOptions","setSelectedOptions","setQuery","savedSearches","setSavedSearches","selectedSearch","setSelectedSearch","selectedTabKey","setSelectedTabKey","isAdvancedSearchVisible","setAdvancedSearchVisible","isSaving","setIsSaving","toggleAdvancedSearch","updateHashWithFilters","params","entries","forEach","paramValue","set","join","newHash","newUrl","window","location","pathname","history","pushState","path","parseParamsFromHash","hash","substring","value","startsWith","paramId","replace","String","CANCER_TYPE_PARAM_ID","CANCER_SUBTYPE_PARAM_ID","split","Number","e","getAllOptionTexts","optionTexts","optionsToProcess","find","texts","optionId","options","o","option","Boolean","string","updateQueryFromParams","prevOptions","updatedOptions","cancerText","fromEntries","updatedQuery","updateParamFromQuery","cancerTypeParam","cancerSubtypeParam","cancerTypes","cancerSubtypes","newOptions","foundCancerTypeMatch","foundCancerSubtypeMatch","parts","part","trim","cancerTypeText","matchingType","subtypeText","matchingSubtype","filteredSubtypes","subtype","parent_option_id","handleParamChange","handleQueryChange","handleSaveSearch","newSearch","user_id","savedSearch","searches","sort","a","b","Date","created_at","getTime","Error","handleSearchSelect","searchId","s","summarizePatientParams","parseInt","optionStrings","po","formatSearchName","format","paramsSummary","loadSavedSearches","handlePopState","addEventListener","removeEventListener"],"sourceRoot":""}