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M,EAAG,SAEnD,GAAsB6X,EACbF,EAAS1L,IAAI,CAAG,EAGlB,IACT,GA6EkE0L,GA4C9DG,qBAAsB,EACxB,GAOM1L,EAAiB3E,CAAAA,EAAAA,EAAAA,OAAAA,EACrB,SACE4P,SAAkB,OAAlBA,CAAAA,EAAAA,EAAcpU,IAAI,GAAlBoU,KAAAA,IAAAA,EAAAA,KAAAA,EAAAA,EAAoBU,KAAK,CAACC,MAAM,CAY9B,CACEC,EACAhM,IACwB,IAAIgM,KAAQhM,EAAKhJ,IAAI,CAAC,CAChD,EAAE,GAEN,CAACoU,EAAcpU,IAAI,CAAC,EAGtB,MAAO,CACL,GAAGoU,CAAa,CAChBjL,eAAgBA,GAEZ,EAAE,CACNI,iBAAAA,CACF,CACF,qBChQA0L,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/./core--client--components/src/lib/loaders/contentfulImageLoader.ts","webpack://_N_E/./src/components/molecules/FloatingActionButton/FloatingActionButton.tsx","webpack://_N_E/./src/components/molecules/CardArticle/CardArticle.tsx","webpack://_N_E/./src/components/organisms/ArticlesDisplay/ArticlesDisplay.tsx","webpack://_N_E/./src/components/organisms/LoadMore/LoadMore.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/Filters/DateFilter.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/Filters/LocationFilter.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/Filters/PetSpeciesFilter.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/Filters/PetStatusFilter.tsx","webpack://_N_E/./src/components/atoms/InputSlider/InputSlider.tsx","webpack://_N_E/./src/components/molecules/InputSliderGroup/InputSliderGroup.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/Filters/SearchRadiusFilter.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/SearchResultsFilterForm.tsx","webpack://_N_E/./src/components/organisms/SearchResultsFilterForm/helpers.ts","webpack://_N_E/./src/components/molecules/NoResults/NoResults.tsx","webpack://_N_E/./src/components/templates/SearchResultsTemplate/SearchResultsTemplate.tsx","webpack://_N_E/./src/lib/dataSource/content/content-base.ts","webpack://_N_E/./src/lib/dataSource/content/article.ts","webpack://_N_E/./src/lib/dataSource/contentful/contentful-data-source.ts","webpack://_N_E/./src/lib/utils/helpers/photoHelpers/generateImageUrlForSearch.ts","webpack://_N_E/./src/lib/utils/helpers/photoHelpers/showMLConfidenceScore.ts","webpack://_N_E/./src/lib/dataSource/lostApi/pet/petSearch/imageSearch.ts","webpack://_N_E/./src/lib/dataSource/contentful/getArticlesForPage.ts","webpack://_N_E/./src/lib/hooks/articles/useArticles.ts","webpack://_N_E/./src/lib/hooks/paginate/usePagination.ts","webpack://_N_E/./src/components/atoms/InputSlider/InputSlider.module.css","webpack://_N_E/<anon>"],"sourcesContent":["import { ImageLoaderProps } from \"next/legacy/image\";\n\n/**\n * Loads images from the CDN\n *\n * @param {ImageLoaderProps} params- Image loader props\n * @returns {string} - Image URL\n */\nfunction contentFulImageLoader({\n src,\n width,\n quality,\n}: ImageLoaderProps): string {\n if (quality) {\n return `${src}?q=${quality}&w=${width}&fm=webp`;\n } else {\n return `${src}?w=${width}&fm=webp`;\n }\n}\n\nexport default contentFulImageLoader;\n","import Button from '@/components/atoms/Button/Button';\n\n/**\n * IFloatingActionButton Interface for the Floating Action Button Component\n *\n * @interface IFloatingActionButton\n */\nexport interface IFloatingActionButton {\n /**\n * Whether the button is disabled\n *\n * @memberof IFloatingActionButton\n * @default false\n * @member {boolean} [disabled]\n */\n disabled?: boolean;\n /**\n * The side of the button. Can be left, right, or center\n *\n * @memberof IFloatingActionButton\n * @member {'left' | 'right' | 'center'} side\n */\n side: 'left' | 'right' | 'center';\n /**\n * The click handler\n *\n * @memberof IFloatingActionButton\n * @member {() => void} onClickAction\n */\n onClickAction?: () => void;\n /**\n * The children of the button\n *\n * @memberof IFloatingActionButton\n * @member {React.ReactNode} children\n */\n children: React.ReactNode;\n /**\n * The optional classes to apply to the button.\n *\n * @memberof IFloatingActionButton\n * @default ''\n * @member {string} [classes]\n */\n classes?: string;\n}\n\n/**\n * FAB Base Classes This is the base classes for the Floating Action Button.\n *\n * @constant\n */\nconst fabBaseClasses =\n 'fixed drop-shadow-floating-button px-8 py-3';\n\n/**\n * FAB Side Classes This is the side classes for the Floating Action Button.\n *\n * @constant\n */\nconst fabSideClasses = {\n left: 'left-0',\n right: 'right-0',\n center: 'left-1/2 transform -translate-x-1/2 mx-0',\n};\n\n/**\n * Floating Action Button Add Description of the Component\n *\n * @param {IFloatingActionButton} props - The props for the Floating Action\n * Button component\n * @returns {React.FC<IFloatingActionButton>} Floating Action Button Component\n */\nconst FloatingActionButton: React.FC<IFloatingActionButton> = ({\n disabled = false,\n side,\n onClickAction,\n children,\n classes = '',\n}: IFloatingActionButton) => {\n const fabClasses = `${fabBaseClasses} ${fabSideClasses[side]} ${classes}`;\n return (\n <Button\n type=\"button\"\n size=\"md\"\n data-testid=\"floating-action-button\"\n variant=\"light\"\n color=\"primary\"\n onClick={onClickAction}\n disabled={disabled}\n className={fabClasses}\n >\n {children}\n </Button>\n );\n};\n\nexport default FloatingActionButton;\n","import Paragraph from '@/components/atoms/Paragraph/Paragraph';\n\nimport Image, { ImageLoader } from 'next/legacy/image';\nimport Link from 'next/link';\n\n/**\n * ICardArticle Interface for the Card Article Component\n *\n * @interface ICardArticle\n */\nexport interface ICardArticle {\n /**\n * Title of the Article for the Card\n *\n * @memberof ICardArticle\n * @member {string} title\n */\n title: string;\n /**\n * The Excerpt of the Article to Display\n *\n * @memberof ICardArticle\n * @member {string} excerpt\n */\n excerpt: string;\n /**\n * The Image of the Article to display\n *\n * @memberof ICardArticle\n * @member {string} image\n */\n image: string;\n /**\n * The optional classes for the component\n *\n * @memberof ICardArticle\n * @default ''\n * @member {string} [classes]\n */\n classes?: string;\n /**\n * The optional imageClasses for the component\n *\n * @memberof ICardArticle\n * @default ''\n * @member {string} [imageClasses]\n */\n imageClasses?: string;\n /**\n * Url of the article to link to\n *\n * @memberof ICardArticle\n * @member {string} url\n */\n url: string;\n /**\n * The optional target for the url\n *\n * @memberof ICardArticle\n * @default '_self'\n * @member {'_blank' | '_self' | '_parent' | '_top'} [target]\n */\n target?: '_blank' | '_self' | '_parent' | '_top';\n /**\n * The loader function for the image\n *\n * @memberof ICardArticle\n * @member {ImageLoader} [loader]\n */\n loader?: ImageLoader;\n}\n\n/**\n * Card Article The Card Article Component that links to an url and displays an\n * image, title and excerpt\n *\n * @param {ICardArticle} props - The props for the Card Article Component\n * @returns {React.FC<ICardArticle>} Card Article Component\n */\nconst CardArticle: React.FC<ICardArticle> = ({\n title,\n excerpt,\n image,\n classes = '',\n url,\n imageClasses = '',\n target = '_self',\n loader,\n}: ICardArticle) => {\n return (\n <div\n data-testid=\"card-article\"\n className={`w-full cursor-pointer [&:has(:focus-visible)]:ring-1 [&:has(:focus-visible)]:ring-focus-400 sm:rounded-[20px] md:rounded-3xl ${classes}`}\n >\n <Link\n href={url}\n className=\"w-full focus:ring-0 focus:ring-offset-0 focus-visible:ring-offset-0 focus-visible:ring-0 focus-visible:border-none focus-visible:outline-none\"\n target={target}\n >\n <div\n className={`h-[218px] sm:h-[140px] md:h-72 relative rounded-2xl sm:rounded-[20px] md:rounded-3xl flex overflow-hidden ${imageClasses}`}\n >\n <Image\n data-testid=\"card-article-image\"\n src={image}\n layout=\"fill\"\n alt={`Image of ${title}`}\n objectFit=\"cover\"\n className=\"scale-100 hover:scale-[102%] transition-transform duration-100\"\n loader={loader}\n sizes=\"(max-width: 739px) 100vw, (max-width: 1199px) 33vw, 450px\"\n />\n </div>\n <div className=\"w-full mt-4 md:mt-6\">\n <span className=\"font-bold font-petco text-h5 text-mkNavy-400 line-clamp-2\">\n {title}\n </span>\n <Paragraph size=\"body4\" className=\"mt-3 font-petco line-clamp-2\">\n {excerpt}\n </Paragraph>\n </div>\n </Link>\n </div>\n );\n};\n\nexport default CardArticle;\n","import contentFulImageLoader from '@/component-library-lib/loaders/contentfulImageLoader';\nimport AnimateItem from '@/component-library/atoms/AnimateItem/AnimateItem';\nimport ButtonLink, {\n IButtonLink,\n} from '@/component-library/atoms/ButtonLink/ButtonLink';\nimport Heading from '@/components/atoms/Heading/Heading';\nimport CardArticle, {\n ICardArticle,\n} from '@/components/molecules/CardArticle/CardArticle';\n\n/**\n * IButtonLinkWithHref Interface for a Button link with a href\n *\n * @augments IButtonLink\n * @interface IButtonLinkWithHref\n */\nexport interface IButtonLinkWithHref extends IButtonLink {\n /**\n * The button link url\n *\n * @memberof IButtonLinkWithHref\n * @member {string} href\n */\n href: string;\n}\n\n/**\n * IArticlesDisplay Interface for ArticlesDisplay component\n *\n * @interface IArticlesDisplay\n */\nexport interface IArticlesDisplay {\n /**\n * The title of the articles display.\n *\n * @memberof IArticlesDisplay\n * @member {string} title\n */\n title: string;\n /**\n * An array of card articles to display.\n *\n * @memberof IArticlesDisplay\n * @member {ICardArticle[]} articles\n */\n articles: ICardArticle[];\n /**\n * The optional button link.\n *\n * @memberof IArticlesDisplay\n * @member {IButtonLinkWithHref} [buttonLink]\n */\n buttonLink?: IButtonLinkWithHref;\n /**\n * The optional classes to be applied to the component.\n *\n * @memberof IArticlesDisplay\n * @default ''\n * @member {string} [classes]\n */\n classes?: string;\n /**\n * The optional imageClasses to be applied to the image inside a card.\n *\n * @memberof IArticlesDisplay\n * @default ''\n * @member {string} [imageClasses]\n */\n imageClasses?: string;\n}\n\n/**\n * ArticlesDisplay Organism for displaying articles\n *\n * @param {IArticlesDisplay} props - The props for the ArticlesDisplay component\n * @returns {React.FC<IArticlesDisplay>} ArticlesDisplay Component\n */\nconst ArticlesDisplay: React.FC<IArticlesDisplay> = ({\n title,\n articles,\n buttonLink,\n classes = '',\n imageClasses = '',\n}: IArticlesDisplay) => {\n return (\n <div\n data-testid=\"articles-display\"\n className={`max-w-[1360px] mx-auto ${classes}`}\n >\n <AnimateItem from={{ translateY: 20 }}>\n <div className=\"flex flex-col justify-between mb-8 space-y-4 sm:flex-row sm:space-y-0 sm:items-center md:mb-12\">\n <Heading size=\"h3\" font=\"petco\" className=\"text-secondaryBase-400 \">\n {title}\n </Heading>\n {buttonLink && <ButtonLink {...buttonLink} />}\n </div>\n </AnimateItem>\n {articles && (\n <div className=\"grid sm:grid-cols-3 grid-cols-1 md:gap-x-8 gap-6\">\n {articles.map((article, index) => (\n <div className=\"flex items-center justify-stretch\" key={index}>\n <CardArticle\n {...article}\n imageClasses={imageClasses}\n loader={contentFulImageLoader}\n />\n </div>\n ))}\n </div>\n )}\n </div>\n );\n};\n\nexport default ArticlesDisplay;\n","import Loading from '@/components/molecules/Loading/Loading';\nimport React, { useEffect } from 'react';\nimport { useInView } from 'react-intersection-observer';\n\n/**\n * ILoadMore\n *\n * @interface ILoadMore\n */\nexport interface ILoadMore {\n /**\n * If the function is loading\n *\n * @memberof ILoadMore\n * @member {boolean} loading\n */\n loading: boolean;\n /**\n * Update offset\n *\n * @memberof ILoadMore\n * @member {() => void} updateOffset\n */\n updateOffset: () => void;\n /**\n * Title\n *\n * @memberof ILoadMore\n * @member {string} [title]\n */\n title?: string;\n}\n\n/**\n * LoadMore A div that will trigger a function to be called when in view while\n * displaying the loading component\n *\n * @param {ILoadMore} props - The props for the LoadMore component\n * @returns {React.FC<ILoadMore>} Component\n */\nconst LoadMore: React.FC<ILoadMore> = ({\n updateOffset,\n loading,\n title = 'Fetching Matches',\n}: ILoadMore) => {\n const { ref, inView } = useInView({\n threshold: 1,\n });\n\n useEffect(() => {\n if (inView && !loading) {\n updateOffset();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [inView]);\n\n return (\n <div\n data-testid=\"load-more\"\n ref={ref}\n className=\"flex flex-row justify-center\"\n >\n <Loading title={title} />\n </div>\n );\n};\n\nexport default LoadMore;\n","import Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport InputFieldDateGroup from '@/components/molecules/InputFieldDateGroup/InputFieldDateGroup';\nimport { Control } from 'react-hook-form';\nimport { IFormFilters } from '../SearchResultsFilterForm';\n\n/**\n * Interface for DateFilter\n *\n * @interface IDateFilter\n */\ninterface IDateFilter {\n /**\n * Control\n *\n * @memberof IDateFilter\n * @member {Control<IFormFilters>} control\n */\n control: Control<IFormFilters>;\n /**\n * The optional forceDatePickerPopperBottom prop\n *\n * @memberof IDateFilter\n * @member {boolean} [forceDatePickerPopperBottom]\n */\n forceDatePickerPopperBottom?: boolean;\n}\n\n/**\n * Date Filter\n *\n * @param {IDateFilter} props - The props\n * @returns {React.ReactNode} Date Filter\n */\nexport const DateFilter = ({\n control,\n forceDatePickerPopperBottom,\n}: IDateFilter) => {\n return (\n <div className=\"pb-1 px-0.5 md:px-0\">\n <Paragraph size=\"overline\" className=\"pb-4\">\n Results display from the date selected through today\n </Paragraph>\n <InputFieldDateGroup\n control={control}\n error={undefined}\n name=\"start\"\n label={'mm/dd/yyyy'}\n forceDatePickerPopperBottom={forceDatePickerPopperBottom}\n />\n </div>\n );\n};\n","import InputPlacesGroupGoogle from '@/components/molecules/InputPlacesGroupGoogle/InputPlacesGroupGoogle';\nimport { SearchType } from '@/lib/constants/types/pets';\nimport { Control } from 'react-hook-form';\nimport { IFormFilters } from '../SearchResultsFilterForm';\n\n/**\n * ILocationError\n *\n * @interface ILocationError\n */\ninterface ILocationError {\n /**\n * The error type\n *\n * @memberof ILocationError\n * @member {string} type\n */\n type: string;\n /**\n * The error message\n *\n * @memberof ILocationError\n * @member {string} message\n */\n message: string;\n}\n\n/**\n * ILocationFilter\n *\n * @interface ILocationFilter\n */\ninterface ILocationFilter {\n /**\n * Control\n *\n * @memberof ILocationFilter\n * @member {Control<IFormFilters>} control\n */\n control: Control<IFormFilters>;\n /**\n * Location error object\n *\n * @memberof ILocationFilter\n * @member {ILocationError | undefined} locationError\n */\n locationError: ILocationError | undefined;\n /**\n * The search type (lost, found, or both)\n *\n * @memberof ILocationFilter\n * @member {SearchType} [searchType]\n */\n searchType?: SearchType;\n}\n\n/**\n * Location Filter\n *\n * @param {ILocationFilter} props - The props\n * @returns {React.ReactNode} Location Filter\n */\nexport const LocationFilter = ({\n control,\n locationError,\n searchType,\n}: ILocationFilter) => {\n const locationFilterLabel = (() => {\n if (searchType === 'found') {\n return 'Lost near (city, state or zip)';\n }\n\n /** We search for lost pets if a user found a pet */\n if (searchType === 'lost') {\n return 'Found near (city, state or zip)';\n }\n\n return 'Search location (city, state or zip)';\n })();\n\n return (\n <div className=\"pt-2 pb-6 px-0.5 md:px-0\">\n <InputPlacesGroupGoogle\n control={control}\n error={locationError}\n label={locationFilterLabel}\n name=\"location\"\n requiredAddressComponents={['city', 'region', 'postalCode']}\n autocompleteTypes={['geocode']}\n />\n </div>\n );\n};\n","import InputButtonGroup from '@/components/molecules/InputButtonGroup/InputButtonGroup';\nimport { Control } from 'react-hook-form';\nimport { IFormFilters } from '../SearchResultsFilterForm';\n\n/**\n * IPetSpeciesFilter\n *\n * @interface IPetSpeciesFilter\n */\ninterface IPetSpeciesFilter {\n /**\n * Control\n *\n * @memberof IPetSpeciesFilter\n * @member {Control<IFormFilters>} control\n */\n control: Control<IFormFilters>;\n /**\n * Species\n *\n * @memberof IPetSpeciesFilter\n * @member {IFormFilters['petType']} species\n */\n species: IFormFilters['petType'];\n}\n\n/**\n * Pet Type Filter\n *\n * @param {IPetSpeciesFilter} props - The props\n * @returns {React.ReactNode} Pet Type Filter\n */\nexport const PetSpeciesFilter = ({ control, species }: IPetSpeciesFilter) => {\n return (\n <div className=\"pb-6\">\n <InputButtonGroup\n classes=\"text-body5 [&>:first-child]:mb-1.5\"\n control={control}\n label=\"\"\n name=\"petType\"\n currentValue={species}\n onChange={(value) => {\n return value;\n }}\n options={[\n {\n active: species === 'dog',\n icon: 'dog',\n text: 'Dog',\n value: 'dog',\n },\n {\n active: species === 'cat',\n icon: 'cat',\n text: 'Cat',\n value: 'cat',\n },\n ]}\n />\n </div>\n );\n};\n","import InputCheckbox from '@/components/atoms/InputCheckbox/InputCheckbox';\nimport IRegisterFunction from '@/components/atoms/InputField/IRegisterFunction';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { UseFormRegister } from 'react-hook-form';\nimport { IFormFilters } from '../SearchResultsFilterForm';\n\n/**\n * IPetStatusFilter\n *\n * @interface IPetStatusFilter\n */\ninterface IPetStatusFilter {\n /**\n * Register function\n *\n * @memberof IPetStatusFilter\n * @member {UseFormRegister<IFormFilters>} register\n */\n register: UseFormRegister<IFormFilters>;\n}\n\n/**\n * Pet Status Filter\n *\n * @param {IPetStatusFilter} props - The props\n * @returns {React.ReactNode} Pet Status Filter\n */\nexport const PetStatusFilter = ({ register }: IPetStatusFilter) => {\n return (\n <div\n data-testid=\"pet-status-filter\"\n className=\"pb-6 px-3 md:px-0 flex flex-col space-y-3\"\n >\n <div className=\"flex flex-row space-x-2.5 pt-3\">\n <InputCheckbox\n id=\"status-lost\"\n name=\"petStatus\"\n value=\"lost\"\n register={register as IRegisterFunction}\n />\n <label htmlFor=\"status-lost\">\n <Paragraph size=\"body5\">Lost</Paragraph>\n </label>\n </div>\n <div className=\"flex flex-row space-x-2.5\">\n <InputCheckbox\n id=\"status-found\"\n name=\"petStatus\"\n value=\"found\"\n register={register as IRegisterFunction}\n />\n <label htmlFor=\"status-found\">\n <Paragraph size=\"body5\">Found</Paragraph>\n </label>\n </div>\n </div>\n );\n};\n","import useWindowSize from '@/component-library-lib/hooks/windowSize/WindowSize';\nimport { useEffect, useState } from 'react';\nimport styles from './InputSlider.module.css';\n\n// Tick mark base class\nconst tickMarkBaseClass = 'h-2.5 border rounded relative w-0.5 -top-0.5';\n\n// Label class\nconst labelClass = 'font-petco text-neutral-800';\n\n/**\n * Tick mark offset function\n *\n * @param {number} currentPosition - Takes in the current marker position\n * @param {number} tickMarkLength - Total tick marks being used\n * @param {number} thumbSize - Size of the thumb\n * @returns {void}\n */\nfunction tickMarkOffset(\n currentPosition: number,\n tickMarkLength: number,\n thumbSize: number\n) {\n const totalTickMarksFromCenter = tickMarkLength / 2;\n const amountPerTick = thumbSize / totalTickMarksFromCenter;\n const difference = totalTickMarksFromCenter - currentPosition;\n\n let offset = 0;\n offset = -(difference * amountPerTick);\n document.documentElement.style.setProperty(\n '--thumbOffsetLeft',\n `${offset}px`\n );\n}\n\n/**\n * Function used for displaying progress bar for webkit based browsers\n *\n * @param {number} currentPosition - Takes in the current marker position\n * @param {number} min - Min number of ticks\n * @param {number} max - Max number of ticks\n * @returns {void}\n */\nfunction progressBarDisplayForWebKit(\n currentPosition: number,\n min: number,\n max: number\n) {\n const percent = ((currentPosition - min) / (max - min)) * 100;\n document.documentElement.style.setProperty(\n '--webkitProgressPercent',\n `${percent}%`\n );\n}\n\n/**\n * Function used for applying classes (color and visibility) to tick marks\n *\n * @param {number} index - Current index position in the array\n * @param {number} length - Total number within the array\n * @param {number} position - Current position of the thumb\n * @returns {string} - Returns the class name\n */\nfunction visibleTickMarkClasses(\n index: number,\n length: number,\n position: number\n) {\n if (index === 0 || index === length) {\n return `invisible`;\n } else if (position > index) {\n return `border-base-300 bg-base-300`;\n } else if (position === index) {\n return `border-base-400 bg-base-base-400`;\n } else {\n return `border-base-200 bg-base-200`;\n }\n}\n\n/**\n * The slider option type\n *\n * @interface ISliderOption\n */\nexport interface ISliderOption {\n /**\n * The label\n *\n * @memberof ISliderOption\n * @member {string} label\n */\n label: string;\n /**\n * The actual value\n *\n * @memberof ISliderOption\n * @member {number} value\n */\n value: number;\n}\n\n/**\n * IInputSlider\n *\n * @interface IInputSlider\n */\nexport interface IInputSlider {\n /**\n * The Name of the Input\n *\n * @memberof IInputSlider\n * @member {string} name\n */\n name: string;\n /**\n * The initial value of the input slider\n *\n * @memberof IInputSlider\n * @member {ISliderOption} [initialValue]\n */\n initialValue?: ISliderOption;\n /**\n * Tick mark labels.\n *\n * @memberof IInputSlider\n * @member {ISliderOption[]} tickMarks\n */\n tickMarks: ISliderOption[];\n /**\n * The function to call when the slider is changed.\n *\n * @memberof IInputSlider\n * @member {(value: number) => number} onChange\n * @param {number} value - The value of the slider.\n * @returns {number} - The value of the slider.\n */\n onChange: (value: number) => number;\n /**\n * Label for the slider.\n *\n * @memberof IInputSlider\n * @member {string} [label]\n */\n label?: string;\n /**\n * Optional classes.\n *\n * @memberof IInputSlider\n * @member {string} [classes]\n */\n classes?: string;\n}\n\n/**\n * Input Slider Input Slider Atom component - displays stylized Input range\n * slider with custom tick marks\n *\n * @param {IInputSlider} props - The props for the InputSlider component\n * @returns {React.FC<IInputSlider>} InputSlider Component\n */\nconst InputSlider: React.FC<IInputSlider> = ({\n onChange,\n tickMarks,\n classes = '',\n label,\n name,\n initialValue,\n}: IInputSlider) => {\n let indexOfInitialValue = 0;\n\n if (initialValue && tickMarks.indexOf(initialValue) !== -1) {\n indexOfInitialValue = tickMarks.indexOf(initialValue);\n }\n\n const [inputValue, setInputValue] = useState(indexOfInitialValue);\n const [thumbSize, setThumbSize] = useState(15);\n const size = useWindowSize();\n\n const tickMarkLength = tickMarks.length - 1;\n /** Watching for breakpoint xs to adjust thumb offset */\n useEffect(() => {\n size.breakpoint === 'xs' ? setThumbSize(12) : setThumbSize(15);\n }, [size.breakpoint]);\n\n useEffect(() => {\n setInputValue(indexOfInitialValue);\n /**\n * Need to call this otherwise the progress bar stays in its original spot\n * on reload\n */\n progressBarDisplayForWebKit(indexOfInitialValue, 0, tickMarkLength);\n\n /**\n * Function for calculating left tick mark margin offset need to call this\n * on load as the thumbs current position gets reset\n */\n tickMarkOffset(indexOfInitialValue, tickMarkLength, thumbSize);\n }, [indexOfInitialValue, thumbSize, tickMarkLength]);\n\n /**\n * Change Value Change Value of the slider on change and state.\n *\n * @param {React.ChangeEvent<HTMLInputElement>} event - The event to get the\n * value from.\n */\n const changeValue = (event: React.ChangeEvent<HTMLInputElement>) => {\n setInputValue(parseInt(event.target.value));\n onChange(parseInt(event.target.value));\n\n // Function used for calculating the progress bar not supported in webkit\n progressBarDisplayForWebKit(\n parseInt(event.target.value),\n parseInt(event.target.min),\n parseInt(event.target.max)\n );\n\n // Function for calculating left tick mark margin offset\n tickMarkOffset(parseInt(event.target.value), tickMarkLength, thumbSize);\n };\n\n return (\n <div className=\"w-full\">\n <input\n data-testid=\"input-slider\"\n type=\"range\"\n min={0}\n max={tickMarkLength}\n step={1}\n id={name}\n value={inputValue}\n onChange={changeValue}\n className={`w-full relative z-[1] ${styles.inputSlider} ${classes}`}\n />\n <div\n className={`relative z-[0] w-full flex justify-between ${styles.tickMarkDiv}`}\n >\n {tickMarks &&\n tickMarks.map((_, index) => (\n <div\n key={index}\n className={`${tickMarkBaseClass} ${visibleTickMarkClasses(\n index,\n tickMarkLength,\n inputValue\n )}`}\n ></div>\n ))}\n </div>\n {tickMarks && (\n <label\n data-testid=\"input-slider-label\"\n htmlFor={name}\n className={labelClass}\n >{`${tickMarks[inputValue].label} ${label}`}</label>\n )}\n </div>\n );\n};\n\nexport default InputSlider;\n","import InputSlider, {\n IInputSlider,\n} from '@/components/atoms/InputSlider/InputSlider';\nimport { Control, Controller } from 'react-hook-form';\n\n/**\n * IInputSliderGroup\n *\n * @augments IInputSlider\n * @interface IInputSliderGroup\n */\nexport interface IInputSliderGroup extends IInputSlider {\n /**\n * The input field name\n *\n * @memberof IInputSliderGroup\n * @member {string} name\n */\n name: string;\n /**\n * The Optional classes object for the input slider group\n *\n * @memberof IInputSliderGroup\n * @default ''\n * @member {string} [classes]\n */\n classes?: string;\n /**\n * The Optional control object from react-hook-form\n *\n * @memberof IInputSliderGroup\n * @member {Control} [control]\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n control?: Control<any>;\n /**\n * The Optional label for the input field\n *\n * @memberof IInputSliderGroup\n * @default ''\n * @member {string} [inputSliderLabel]\n */\n inputSliderLabel?: string;\n}\n\n/**\n * InputSliderGroup The Input Group for the Input Slider component\n *\n * @param {IInputSliderGroup} props - The props for the InputSliderGroup\n * component\n * @returns {React.FC<IInputSliderGroup>} Component\n */\nconst InputSliderGroup: React.FC<IInputSliderGroup> = ({\n label,\n name,\n inputSliderLabel = '',\n classes = '',\n control,\n onChange,\n ...rest\n}: IInputSliderGroup) => {\n /**\n * Base Data Test Id\n *\n * @constant\n */\n const dataTestId = 'input-slider-group';\n\n return (\n <div\n data-testid={`${dataTestId}${control ? '-control' : ''}`}\n className={classes}\n >\n {inputSliderLabel && (\n <div className=\"mb-4\">\n <label htmlFor={name} className=\"font-petco font-bold\">\n {inputSliderLabel}\n </label>\n </div>\n )}\n {control ? (\n <Controller\n control={control}\n name={name}\n render={({ field }) => {\n return (\n <InputSlider\n label={label}\n name={name}\n onChange={(value: number) => {\n field.onChange(value);\n return onChange(value);\n }}\n {...rest}\n />\n );\n }}\n />\n ) : (\n <InputSlider label={label} name={name} onChange={onChange} {...rest} />\n )}\n </div>\n );\n};\n\nexport default InputSliderGroup;\n","import { ISliderOption } from '@/components/atoms/InputSlider/InputSlider';\nimport InputSliderGroup from '@/components/molecules/InputSliderGroup/InputSliderGroup';\nimport { searchRadiusOptions } from '@/lib/constants/constants/pets';\nimport { Control } from 'react-hook-form';\nimport { IFormFilters } from '../SearchResultsFilterForm';\n\n/**\n * IRadiusFilter\n *\n * @interface IRadiusFilter\n */\ninterface IRadiusFilter {\n /**\n * Control\n *\n * @memberof IRadiusFilter\n * @member {Control<IFormFilters>} control\n */\n control: Control<IFormFilters>;\n /**\n * The selected search radius object\n *\n * @memberof IRadiusFilter\n * @member {ISliderOption} searchRadius\n */\n searchRadius: ISliderOption;\n}\n\n/**\n * Radius Filter\n *\n * @param {IRadiusFilter} props - The props\n * @returns {React.ReactNode} Radius Filter\n */\nexport const SearchRadiusFilter = ({\n control,\n searchRadius,\n}: IRadiusFilter) => {\n return (\n <div className=\"pb-6 px-4\">\n <InputSliderGroup\n classes=\"mt-6 text-body5\"\n control={control}\n initialValue={searchRadius}\n label=\"miles\"\n name=\"searchRadius\"\n onChange={(value: number) => value}\n tickMarks={searchRadiusOptions}\n />\n </div>\n );\n};\n","import { useFormContext, useWatch } from 'react-hook-form';\n\nimport Button from '@/components/atoms/Button/Button';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport AccordionFilter, {\n IAccordionFilter,\n} from '@/components/molecules/AccordionFilter/AccordionFilter';\nimport { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport { searchRadiusOptions } from '@/lib/constants/constants/pets';\nimport { defaultSearchRadiusIndex } from '@/lib/constants/constants/search';\nimport { PetType, Search, SearchType } from '@/lib/constants/types/pets';\nimport { useEventContext } from '@/lib/hooks/analytics/useEventContext';\nimport { IPetSearchData, SearchRadius } from '@/lib/utils/analytics/petSearch';\nimport capitalizeFirstLetter from '@/lib/utils/helpers/stringHelpers/capitalizeFirstLetter';\nimport clsx from 'clsx';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport { DateFilter } from './Filters/DateFilter';\nimport { LocationFilter } from './Filters/LocationFilter';\nimport { PetSpeciesFilter } from './Filters/PetSpeciesFilter';\nimport { PetStatusFilter } from './Filters/PetStatusFilter';\nimport { SearchRadiusFilter } from './Filters/SearchRadiusFilter';\nimport { getFilterDiffCount } from './helpers';\n\n/**\n * Interface for the search results filters form\n *\n * @interface IFormFilters\n */\nexport interface IFormFilters {\n /**\n * The search radius index\n *\n * @memberof IFormFilters\n * @member {number} searchRadius\n */\n searchRadius: number;\n /**\n * The Location filter label\n *\n * @memberof IFormFilters\n * @member {ILocationDto} [location]\n */\n location?: ILocationDto;\n /**\n * The Pet Type filter\n *\n * @memberof IFormFilters\n * @member {PetType | ''} [petType]\n */\n petType?: PetType | '';\n /**\n * The Date filter. Should be formatted as yyyy-mm-dd\n *\n * @memberof IFormFilters\n * @member {string | null} [start]\n */\n start?: string | null;\n /**\n * The pet status\n *\n * @memberof IFormFilters\n * @member {('lost' | 'found')[]} [petStatus]\n */\n petStatus?: Array<'lost' | 'found'>;\n}\n\n/**\n * ITextSummary\n *\n * @interface ITextSummary\n */\ninterface ITextSummary {\n /**\n * The filter summary text distance units\n *\n * @memberof ITextSummary\n * @member {string} distanceUnits\n */\n distanceUnits: string;\n}\n\n/**\n * IContentText\n *\n * @interface IContentText\n */\ninterface IContentText {\n /**\n * The form title to display in desktop view\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {string} title\n */\n title: string;\n /**\n * Lost or found\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {string} lostOrFound\n */\n lostOrFound: string;\n /**\n * The filters summary to display\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {ITextSummary} summary\n */\n summary: ITextSummary;\n}\n\n/**\n * ISearchResultsFilterFormContent\n *\n * @interface ISearchResultsFilterFormContent\n */\ninterface ISearchResultsFilterFormContent {\n /**\n * Text Inside of the Search Results Filter Form\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {IContentText} text\n */\n text: IContentText;\n /**\n * Buttons Inside of the Search Results Filter Form\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {object} buttons\n */\n buttons: {\n /**\n * The apply filters button text\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {string} apply\n */\n apply: string;\n /**\n * The reset filters button text\n *\n * @memberof ISearchResultsFilterFormContent\n * @member {string} reset\n */\n reset: string;\n };\n}\n\n/** The available hidden fields */\nexport type AvailableHiddenFields =\n | 'location'\n | 'date'\n | 'searchRadius'\n | 'petType'\n | 'status';\n\n/**\n * ISearchResultsFilterForm\n *\n * @interface ISearchResultsFilterForm\n */\nexport interface ISearchResultsFilterForm {\n /**\n * Text content associated with the form.\n *\n * @memberof ISearchResultsFilterForm\n * @member {ISearchResultsFilterFormContent} content\n */\n content: ISearchResultsFilterFormContent;\n /**\n * The function to call on form submit.\n *\n * @memberof ISearchResultsFilterForm\n * @member {(searchFilters: IFormFilters) => void} onSubmit\n * @param {IFormFilters} searchFilters - The form state.\n * @returns {void}\n */\n onSubmit: (searchFilters: IFormFilters) => void;\n /**\n * The applied filter values\n *\n * @memberof ISearchResultsFilterForm\n * @member {IFormFilters} appliedValues\n */\n appliedValues: IFormFilters;\n /**\n * The default filter values\n *\n * @memberof ISearchResultsFilterForm\n * @member {IFormFilters} defaultValues\n */\n defaultValues: IFormFilters;\n /**\n * The disabled fields\n *\n * @memberof ISearchResultsFilterForm\n * @member {AvailableHiddenFields[]} hiddenFields\n */\n hiddenFields: AvailableHiddenFields[];\n /**\n * The optional classes to apply to the component\n *\n * @memberof ISearchResultsFilterForm\n * @member {string} [classes]\n */\n classes?: string;\n /**\n * The search type (lost, found, or both)\n *\n * @memberof ISearchResultsFilterForm\n * @member {SearchType} searchType\n */\n searchType: SearchType;\n /**\n * The search mechanism being used (distance, photo, etc)\n *\n * @memberof ISearchResultsFilterForm\n * @member {Search} search\n */\n search: Search;\n /**\n * Controls if the form is collapsed when loading the first time\n *\n * @memberof ISearchResultsFilterForm\n * @member {boolean} [startOpen]\n */\n startOpen?: boolean;\n /**\n * The optional shouldUpdateFormValues prop\n *\n * @memberof ISearchResultsFilterForm\n * @member {boolean} [shouldUpdateFormValues]\n */\n shouldUpdateFormValues?: boolean;\n /**\n * The optional setCollapseFields function\n *\n * @memberof ISearchResultsFilterForm\n * @member {(id: string, close: () => void) => void} [setCollapseFields]\n */\n setCollapseFields?: (id: string, close: () => void) => void;\n /**\n * Controls if form buttons, such as apply filters and reset filters, should\n * be disabled.\n *\n * @memberof ISearchResultsFilterForm\n * @member {boolean} [disableFormButtons]\n */\n disableFormButtons?: boolean;\n /**\n * The optional forceDatePickerPopperBottom prop\n *\n * @memberof ISearchResultsFilterForm\n * @member {boolean} [forceDatePickerPopperBottom]\n */\n forceDatePickerPopperBottom?: boolean;\n /**\n * The function to call when the filter overlay is closed\n *\n * @memberof ISearchResultsFilterForm\n * @member {(() => void) | undefined} [handleCloseFilterOverlay]\n */\n handleCloseFilterOverlay?: () => void;\n}\n\n/**\n * SearchResultsFilterForm Component to filter search results\n *\n * @param {ISearchResultsFilterForm} props - The props for the\n * SearchResultsFilterForm component\n * @returns {React.ReactNode} Component\n */\nconst SearchResultsFilterForm = ({\n content,\n onSubmit,\n appliedValues,\n defaultValues,\n classes = '',\n searchType,\n hiddenFields,\n search,\n startOpen = true,\n setCollapseFields,\n disableFormButtons,\n forceDatePickerPopperBottom,\n handleCloseFilterOverlay,\n}: ISearchResultsFilterForm) => {\n const { updateData } = useEventContext();\n const router = useRouter();\n\n const [showResetButton, setShowResetButton] = useState(false);\n\n const {\n control,\n handleSubmit: hookFormHandleSubmit,\n setValue,\n register,\n } = useFormContext<IFormFilters>();\n\n const petType = useWatch({ control, name: 'petType' });\n const location = useWatch({ control, name: 'location' });\n const searchRadiusIndex = useWatch({ control, name: 'searchRadius' });\n const start = useWatch({ control, name: 'start' });\n const petStatus = useWatch({ control, name: 'petStatus' });\n\n const currentValues = {\n location,\n searchRadius: searchRadiusIndex,\n petType,\n start,\n petStatus,\n };\n\n const searchRadius = searchRadiusOptions[searchRadiusIndex];\n\n /**\n * Submit handler\n *\n * @param {IFormFilters} data - The form data\n */\n const handleSubmit = (data: IFormFilters) => {\n updateData({\n searchRadius: searchRadiusOptions[data.searchRadius]\n .value as SearchRadius,\n species: capitalizeFirstLetter(currentValues.petType || ''),\n latitude: data?.location?.coordinates?.latitude?.toString(),\n longitude: data?.location?.coordinates?.longitude?.toString(),\n start: data.start,\n method: 'Update Results',\n clickText: 'Apply Filters',\n } as IPetSearchData);\n\n onSubmit(data);\n };\n\n /** Resets form fields */\n const resetFilters = () => {\n const resetValues: IFormFilters = {\n location: defaultValues.location,\n petType: search === 'all' ? '' : defaultValues.petType,\n start: defaultValues.start || null,\n searchRadius: defaultSearchRadiusIndex,\n };\n\n setValue('searchRadius', resetValues.searchRadius);\n\n if (\n router.pathname !== '/photo-search' &&\n router.pathname !== '/shelter-dashboard/pets/[id]/matches'\n ) {\n setValue('petType', resetValues.petType);\n }\n\n if (defaultValues.start) {\n setValue('start', defaultValues.start);\n } else {\n setValue('start', null);\n }\n\n if (defaultValues?.location?.label) {\n setValue('location', resetValues.location);\n }\n\n if (search === 'all') {\n setValue('petStatus', []);\n }\n\n handleSubmit(resetValues);\n };\n\n const currentVsAppliedDiffCount = getFilterDiffCount(\n currentValues,\n appliedValues,\n { search, hiddenFields, debug: false }\n );\n\n const currentVsDefaultDiffCount = getFilterDiffCount(\n currentValues,\n defaultValues,\n { search, hiddenFields, debug: false }\n );\n\n useEffect(() => {\n setShowResetButton(currentVsDefaultDiffCount > 0);\n }, [currentVsDefaultDiffCount]);\n\n /**\n * Base Data Test Id\n *\n * @constant\n */\n const dataTestId = 'search-results-filter';\n\n const dateAccordion: IAccordionFilter = {\n header: 'Date',\n content: (\n <DateFilter\n key={currentValues.start}\n control={control}\n forceDatePickerPopperBottom={forceDatePickerPopperBottom}\n />\n ),\n startOpen,\n };\n\n /** Validation error message for the location field */\n const locationError =\n !currentValues.location?.city &&\n !currentValues.location?.region &&\n !currentValues.location?.postalCode\n ? {\n type: 'required',\n message: 'This field is required',\n }\n : undefined;\n\n const locationAccordion: IAccordionFilter = {\n header: 'Location',\n content: (\n <LocationFilter\n control={control}\n locationError={locationError}\n searchType={searchType}\n />\n ),\n startOpen,\n };\n\n const radiusAccordion: IAccordionFilter = {\n header: 'Search Radius',\n content: (\n <SearchRadiusFilter control={control} searchRadius={searchRadius} />\n ),\n startOpen,\n };\n\n const statusAccordion: IAccordionFilter = {\n header: 'Status',\n content: <PetStatusFilter register={register} />,\n startOpen,\n };\n\n const petTypeAccordion: IAccordionFilter = {\n header: 'Pet Type',\n content: (\n <PetSpeciesFilter control={control} species={currentValues.petType} />\n ),\n startOpen,\n };\n\n return (\n <div\n data-testid={dataTestId}\n className={clsx('md:pl-1 md:pr-4 pb-20 md:pb-0', classes)}\n >\n <div className=\"bg-neutral-100 py-6 md:pb-4 md:pt-0 sticky md:static top-0 z-10 flex justify-between\">\n <Paragraph size=\"body4\" className=\"font-bold text-secondaryBase-400\">\n {content.text.title}\n </Paragraph>\n\n <div className=\"flex gap-6 items-center\">\n <button\n data-testid={`${dataTestId}-reset-filters`}\n className={clsx(\n 'enabled:cursor-pointer hover:enabled:text-base-300 hover:enabled:underline text-xs text-neutral-800 underline',\n !showResetButton && 'opacity-0 pointer-events-none'\n )}\n onClick={resetFilters}\n disabled={disableFormButtons}\n >\n {content.buttons.reset}\n </button>\n\n <button\n data-testid={`${dataTestId}-close-button`}\n aria-label=\"Close filters overlay\"\n onClick={handleCloseFilterOverlay}\n className=\"md:hidden\"\n >\n <Icon\n icon=\"closeLight\"\n size={24}\n colorType=\"neutral\"\n colorShade={800}\n />\n </button>\n </div>\n </div>\n\n <div>\n {!hiddenFields?.includes('location') && (\n <AccordionFilter\n {...locationAccordion}\n setCollapse={setCollapseFields}\n />\n )}\n {!hiddenFields?.includes('date') && (\n <AccordionFilter {...dateAccordion} setCollapse={setCollapseFields} />\n )}\n {!hiddenFields?.includes('searchRadius') && (\n <AccordionFilter\n {...radiusAccordion}\n setCollapse={setCollapseFields}\n />\n )}\n {!hiddenFields?.includes('petType') && (\n <AccordionFilter\n {...petTypeAccordion}\n setCollapse={setCollapseFields}\n />\n )}\n {!hiddenFields?.includes('status') && search === 'all' && (\n <AccordionFilter\n {...statusAccordion}\n setCollapse={setCollapseFields}\n />\n )}\n </div>\n\n <div className=\"md:mt-8 flex flex-col items-center w-full fixed bottom-6 left-0 md:static z-10\">\n <Button\n data-testid={`${dataTestId}-apply-filters-button`}\n color=\"primary\"\n disabled={\n currentVsAppliedDiffCount === 0 ||\n disableFormButtons ||\n !currentValues.location?.label ||\n locationError != null\n }\n onClick={hookFormHandleSubmit(handleSubmit)}\n size=\"md\"\n type=\"button\"\n variant=\"light\"\n className=\"transition-all enabled:drop-shadow-floating-button md:drop-shadow-none\"\n >\n {content.buttons.apply}\n </Button>\n </div>\n </div>\n );\n};\n\nexport default SearchResultsFilterForm;\n","import { Search, SearchType } from '@/lib/constants/types/pets';\nimport {\n IFormFilters,\n ISearchResultsFilterForm,\n} from './SearchResultsFilterForm';\n\n/**\n * Get the search type based on the pet status filter value.\n *\n * @param {IFormFilters['petStatus']} petStatus - The pet status\n * @returns {SearchType} The search type\n */\nexport const getSearchTypeFromPetStatus = (\n petStatus?: IFormFilters['petStatus']\n): SearchType => {\n if (petStatus?.length === 1 && petStatus?.includes('lost')) {\n return 'lost';\n }\n\n if (petStatus?.length === 1 && petStatus?.includes('found')) {\n return 'found';\n }\n\n return 'lost-or-found';\n};\n\n/**\n * Get the pet status filter value based on the search type.\n *\n * @param {SearchType} searchType - The search type\n * @returns {IFormFilters['petStatus']} The pet status\n */\nexport const getPetStatusFromSearchType = (\n searchType: SearchType\n): IFormFilters['petStatus'] => {\n if (searchType === 'lost') {\n return ['lost'];\n }\n\n if (searchType === 'found') {\n return ['found'];\n }\n\n return ['lost', 'found'];\n};\n\n/**\n * IGetFilterDiffCountConfig\n *\n * @interface IGetFilterDiffCountConfig\n */\ninterface IGetFilterDiffCountConfig {\n /**\n * The search type\n *\n * @memberof IGetFilterDiffCountConfig\n * @member {Search} [search]\n */\n search?: Search;\n /**\n * A flag to enable logs to help debugging.\n *\n * @memberof IGetFilterDiffCountConfig\n * @member {boolean} [debug]\n */\n debug?: boolean;\n /**\n * The list of hidden fields. If a field is hidden, it will not be included in\n * the diff count.\n *\n * @memberof IGetFilterDiffCountConfig\n * @member {ISearchResultsFilterForm['hiddenFields']} [hiddenFields]\n */\n hiddenFields?: ISearchResultsFilterForm['hiddenFields'];\n}\n\n/**\n * Keeps track of the number of updated filters.\n *\n * @param {IFormFilters} valueSet1 - The first set of valueSet1\n * @param {IFormFilters} valueSet2 - The second set of values\n * @param {IGetFilterDiffCountConfig} config - The options\n * @returns {number} The number of updated filters.\n */\nexport const getFilterDiffCount = (\n valueSet1: IFormFilters,\n valueSet2: IFormFilters,\n config: IGetFilterDiffCountConfig\n) => {\n let diffCount = 0;\n\n if (config?.debug) {\n console.debug('🞠getFilterDiffCount debug');\n console.debug(\n `location?.label`,\n config?.hiddenFields?.includes('location') ? '(IGNORED)' : '',\n `\\nv1:[${valueSet1.location?.label}]`,\n `\\nv2:[${valueSet2.location?.label}]`\n );\n }\n\n if (\n !config?.hiddenFields?.includes('location') &&\n valueSet1.location?.label !== valueSet2.location?.label\n ) {\n diffCount++;\n }\n\n if (config?.debug) {\n console.debug(\n `searchRadius`,\n config?.hiddenFields?.includes('searchRadius') ? '(IGNORED)' : '',\n `\\nv1:[${valueSet1.searchRadius}]`,\n `\\nv2:[${valueSet2.searchRadius}]`\n );\n }\n\n if (\n !config?.hiddenFields?.includes('searchRadius') &&\n valueSet1.searchRadius !== valueSet2.searchRadius\n ) {\n diffCount++;\n }\n\n if (config?.debug) {\n console.debug(\n `petType`,\n config?.hiddenFields?.includes('petType') ? '(IGNORED)' : '',\n `\\nv1:[${valueSet1.petType}]`,\n `\\nv2:[${valueSet2.petType}]`\n );\n }\n\n /**\n * Part of this strange logic is to account for how empty values can be either\n * an empty string or null/undefined for the petType.\n */\n if (\n !config?.hiddenFields?.includes('petType') &&\n valueSet1.petType !== valueSet2.petType &&\n !(\n valueSet1.petType === '' &&\n (valueSet2.petType === null || valueSet2.petType === undefined)\n ) &&\n !(\n valueSet2.petType === '' &&\n (valueSet1.petType === null || valueSet1.petType === undefined)\n )\n ) {\n diffCount++;\n }\n\n if (config?.debug) {\n console.debug(\n `start`,\n config?.hiddenFields?.includes('date') ? '(IGNORED)' : '',\n `\\nv1:[${valueSet1.start}]`,\n `\\nv2:[${valueSet2.start}]`\n );\n }\n\n if (\n !config?.hiddenFields?.includes('date') &&\n valueSet1.start !== valueSet2.start &&\n (!!valueSet1.start || !!valueSet2.start)\n ) {\n diffCount++;\n }\n\n /**\n * Comparing the inferred search type is simpler than comparing the pet status\n * arrays\n */\n const petStatusSearch1 = getSearchTypeFromPetStatus(valueSet1.petStatus);\n const petStatusSearch2 = getSearchTypeFromPetStatus(valueSet2.petStatus);\n\n if (config?.debug) {\n console.debug(\n `petStatus`,\n config?.hiddenFields?.includes('status') ? '(IGNORED)' : '',\n `\\nv1:[${petStatusSearch1}]`,\n `\\nv2:[${petStatusSearch2}]`\n );\n console.debug(`diffCount: ${diffCount}`);\n }\n\n if (\n !config?.hiddenFields?.includes('status') &&\n config?.search === 'all' &&\n petStatusSearch1 !== petStatusSearch2\n ) {\n diffCount++;\n }\n\n return diffCount;\n};\n","import Divider from '@/components/atoms/Divider/Divider';\nimport Heading from '@/components/atoms/Heading/Heading';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport { ICardArticle } from '@/components/molecules/CardArticle/CardArticle';\nimport CircleButton from '@/components/molecules/CircleButton/CircleButton';\nimport ArticlesDisplay from '@/components/organisms/ArticlesDisplay/ArticlesDisplay';\nimport FullWidthIllustration, {\n IFullWidthIllustration,\n} from '@/components/organisms/FullWidthIllustration/FullWidthIllustration';\nimport { PetType, SearchType } from '@/lib/constants/types/pets';\nimport { useEventContext } from '@/lib/hooks/analytics/useEventContext';\nimport useArticles from '@/lib/hooks/articles/useArticles';\nimport useSearchParameters from '@/lib/hooks/searchParameters/useSearchParameters';\nimport { useShareReportContext } from '@/lib/hooks/share/ShareReport';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport Link from 'next/link';\nimport { useEffect, useMemo, useState } from 'react';\n\n/**\n * INoResults\n *\n * @interface INoResults\n */\nexport interface INoResults {\n /**\n * The search type\n *\n * @memberof INoResults\n * @member {'photo' | 'distance' | 'microchip'} search\n */\n search: 'photo' | 'distance' | 'microchip';\n /**\n * Create account flow link\n *\n * @memberof INoResults\n * @member {string} linkHref\n */\n linkHref: string;\n /**\n * The link text\n *\n * @memberof INoResults\n * @member {string} linkLabel\n */\n linkLabel: string;\n /**\n * The Text that displays next to the link\n *\n * @memberof INoResults\n * @member {string} linkText\n */\n linkText: string;\n /**\n * The logged in status of the user\n *\n * @memberof INoResults\n * @member {boolean} [loggedIn]\n */\n loggedIn?: boolean;\n /**\n * The species type\n *\n * @memberof INoResults\n * @member {SearchType} [searchType]\n */\n searchType?: SearchType;\n /**\n * The species type\n *\n * @memberof INoResults\n * @member {PetType} [species]\n */\n species?: PetType;\n /**\n * The search latitude\n *\n * @memberof INoResults\n * @member {number} [latitude]\n */\n latitude?: number;\n /**\n * The search longitude\n *\n * @memberof INoResults\n * @member {number} [longitude]\n */\n longitude?: number;\n /**\n * The search radius\n *\n * @memberof INoResults\n * @member {number} [radius]\n */\n radius?: number;\n /**\n * This is signifies if the search ran out of pets to display and not when\n * there were no pets returned\n *\n * @memberof INoResults\n * @member {boolean} [endOfResults]\n */\n endOfResults?: boolean;\n /**\n * The optional classes\n *\n * @memberof INoResults\n * @default ''\n * @member {string} [classes]\n */\n classes?: string;\n /**\n * The articles to display\n *\n * @memberof INoResults\n * @member {ICardArticle[]} [articles]\n */\n articles?: ICardArticle[];\n}\n\n/**\n * NoResults A component to show when no results are found\n *\n * @param {INoResults} props - The props for the NoResults component\n * @returns {React.FC<INoResults>} Component\n */\nconst NoResults: React.FC<INoResults> = ({\n loggedIn,\n search,\n searchType,\n species,\n latitude,\n longitude,\n radius,\n classes = '',\n endOfResults,\n linkHref,\n linkLabel,\n linkText,\n articles,\n}: INoResults) => {\n const { getArticlesSlugNames, articleSlugNames } = useSearchParameters();\n const { setInitiatingComponent } = useEventContext();\n const [displayArticles, setArticles] = useState<ICardArticle[] | undefined>(\n articles\n );\n\n /** Hook to get article slug names on searchType change */\n useEffect(() => {\n getArticlesSlugNames?.(searchType);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchType]);\n\n const { articleCards } = useArticles(articleSlugNames);\n\n useEffect(() => {\n setArticles(articleCards);\n }, [getArticlesSlugNames, articleCards]);\n\n /**\n * Share Pet listing information\n *\n * @see useShareReportContext\n */\n const {\n petListing,\n encodedUrl,\n encodedString,\n getLatestPetListing,\n shareUrl,\n } = useShareReportContext();\n\n /**\n * The dispatch function from the toast context\n *\n * @see useToastContext\n */\n const { dispatch } = useToastContext();\n\n useEffect(() => {\n if (loggedIn) {\n /** Get the latest lost pet for the user */\n getLatestPetListing(['lostUserPet', 'foundUserPet']);\n }\n }, [getLatestPetListing, loggedIn]);\n\n /**\n * Open a new tab with the url passed in\n *\n * @param {string} url - The url to open in a new window\n * @returns {void}\n */\n const buttonLinkHandler = (url: string) => {\n window.open(`${url}`, '_blank', 'noopener,noreferrer');\n };\n\n /**\n * The link used to search by distance\n *\n * @returns {React.ReactElement} - The distance search link\n */\n const distanceSearch = () => {\n return (\n <Link\n href={`/search-results/?searchType=${searchType}&species=${species}&latitude=${latitude}&longitude=${longitude}&searchRadius=${radius}`}\n data-testid=\"distance-search-link\"\n className=\"underline text-neutral-800 hover:text-base-300\"\n onClick={() => {\n setInitiatingComponent('Distance Search Link / Search Results Page');\n }}\n >\n distance\n </Link>\n );\n };\n\n /**\n * The link used for search by photo\n *\n * @returns {React.ReactElement} - The photo search link\n */\n const photoSearch = () => {\n return (\n <Link\n href=\"/photo-search/\"\n data-testid=\"photo-search-link\"\n className=\"underline text-neutral-800 hover:text-base-300\"\n onClick={() => {\n setInitiatingComponent('Photo Search Link / Search Results Page');\n }}\n >\n photo\n </Link>\n );\n };\n\n /**\n * The link used for search by microchip\n *\n * @returns {React.ReactElement} - The microchip search link\n */\n const microchipSearch = () => {\n return (\n <Link\n href=\"/microchip-search/\"\n data-testid=\"microchip-search-link\"\n className=\"underline text-neutral-800 hover:text-base-300\"\n onClick={() => {\n setInitiatingComponent('Microchip Search Link / Search Results Page');\n }}\n >\n microchip\n </Link>\n );\n };\n\n /**\n * The link used to create an account\n *\n * @returns {React.ReactElement} - The create account link\n */\n const createLink = () => {\n if (linkHref.includes('api/auth/login/')) {\n return (\n <a\n data-testid=\"create-link\"\n className=\"underline text-neutral-800 hover:text-base-300\"\n href={linkHref}\n >\n {linkLabel}\n </a>\n );\n }\n return (\n <Link\n href={linkHref}\n data-testid=\"create-link\"\n className=\"underline text-neutral-800 hover:text-base-300\"\n >\n {linkLabel}\n </Link>\n );\n };\n\n /**\n * The props for the FullWidthIllustration component\n *\n * @constant {IFullWidthIllustration}\n */\n const fullWidthProps: IFullWidthIllustration = useMemo(() => {\n /**\n * Handles the toast\n *\n * @param {ToastType} type - The type of toast\n * @param {string} message - The message of the toast\n * @returns {void} - The toast\n */\n const handleToast = (type: ToastType, message: string): void => {\n dispatch({\n type: 'ADD_TOAST',\n toast: {\n id: '1',\n type: type,\n message: message,\n persistent: false,\n showIcon: true,\n },\n });\n };\n return {\n title: 'Report. Share. Reunite.',\n copy: 'Share your lost pet report to engage your friends and family in the search.',\n imageUrl:\n process.env.NEXT_PUBLIC_CDN_BASE_URL + '/assets/lost/dog-running.svg',\n buttons: [\n <CircleButton\n key={0}\n label=\"facebook\"\n icon=\"facebook\"\n onClickAction={() =>\n buttonLinkHandler(\n `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`\n )\n }\n />,\n <CircleButton\n key={0}\n label=\"twitter\"\n icon=\"twitter\"\n onClickAction={() =>\n buttonLinkHandler(\n `https://twitter.com/intent/tweet?text=${encodedString}%20&url=${encodedUrl}`\n )\n }\n />,\n <CircleButton\n key={0}\n label=\"nextdoor\"\n icon=\"nextdoor\"\n onClickAction={() => {\n buttonLinkHandler(\n `https://nextdoor.com/news_feed/?open_composer=true&body=${encodedString}%20${encodedUrl}`\n );\n }}\n />,\n <CircleButton\n key={0}\n label=\"link\"\n icon=\"link\"\n onClickAction={() => {\n if (shareUrl) {\n navigator.clipboard\n .writeText(shareUrl)\n .then(() => handleToast('success', 'Copied to clipboard'));\n }\n }}\n />,\n ],\n classes: 'mt-8 sm:mt-12 md:mt-[84px]',\n };\n }, [encodedString, encodedUrl, shareUrl, dispatch]);\n return (\n <div\n data-testid=\"no-results\"\n className={`grid grid-cols-4 mt-12 sm:grid-cols-6 md:grid-cols-9 gap-x-4 sm:gap-x-6 md:gap-x-8 auto-rows-max ${classes}`}\n >\n <div className=\"font-petco text-body4 text-neutral-800 leading-4 col-start-1 col-span-4 mx-6 sm:mx-0 sm:col-start-2 sm:col-span-4 md:col-start-3 md:col-span-5\">\n <div className=\"flex flex-row justify-center space-x-1 pb-4 items-center\">\n <Icon\n icon=\"searchFill\"\n size={32}\n colorType=\"mkNavy\"\n colorShade={300}\n />\n <Heading size=\"h4\" className=\"text-mkNavy-400\">\n Still searching?\n </Heading>\n </div>\n <ul className=\"list-disc list-outside font-normal flex flex-wrap flex-col sm:px-0 px-6\">\n {!loggedIn && (\n <li className=\"text-base\">\n {createLink()} {linkText}\n </li>\n )}\n <li className=\"text-base\">Adjust your search filters</li>\n <li className=\"text-base\">\n Try searching by{' '}\n {search === 'photo' ? distanceSearch() : photoSearch()} or{' '}\n {microchipSearch()}\n </li>\n <li className=\"text-base\">\n Check back regularly because newly reported pets get added to Petco\n Love Lost often\n </li>\n </ul>\n </div>\n <div className=\"h-full col-start-1 col-span-4 sm:col-span-6 sm:mx-0 md:col-span-9\">\n {loggedIn\n ? petListing &&\n !endOfResults && (\n <FullWidthIllustration\n {...fullWidthProps}\n classes=\"mt-36 sm:mt-16 md:mt-[84px]\"\n />\n )\n : !endOfResults &&\n displayArticles &&\n displayArticles.length > 0 && (\n <>\n <div className=\"my-12 mx-6 col-start-1 col-span-4 sm:mx-0 sm:col-start-1 sm:col-span-6 sm:px-0 md:col-start-1 md:col-span-12\">\n <Divider type=\"lightGrey\" />\n </div>\n <ArticlesDisplay\n articles={displayArticles}\n title=\"Helpful Articles\"\n classes=\"mx-6\"\n imageClasses=\"md:h-[200px]\"\n />\n </>\n )}\n </div>\n </div>\n );\n};\n\nexport default NoResults;\n","/* eslint-disable jsdoc/tag-lines */\nimport useWindowSize from '@/component-library-lib/hooks/windowSize/WindowSize';\nimport { IButton } from '@/components/atoms/Button/Button';\nimport { IChip } from '@/components/atoms/Chip/Chip';\nimport Divider from '@/components/atoms/Divider/Divider';\nimport Heading from '@/components/atoms/Heading/Heading';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport CircleButton from '@/components/molecules/CircleButton/CircleButton';\nimport FloatingActionButton from '@/components/molecules/FloatingActionButton/FloatingActionButton';\nimport JumpToTopButton from '@/components/molecules/JumpToTopButton/JumpToTopButton';\nimport Loading from '@/components/molecules/Loading/Loading';\nimport NoResults from '@/components/molecules/NoResults/NoResults';\nimport { IPetCard } from '@/components/molecules/PetCard/PetCard';\nimport SearchSelector from '@/components/molecules/SearchSelector/SearchSelector';\nimport SignUpCallout from '@/components/molecules/SignUpCallout/SignUpCallout';\nimport CardCallout, {\n ICardCallout,\n} from '@/components/organisms/CardCallout/CardCallout';\nimport FullWidthIllustration, {\n IFullWidthIllustration,\n} from '@/components/organisms/FullWidthIllustration/FullWidthIllustration';\nimport LoadMore from '@/components/organisms/LoadMore/LoadMore';\nimport PageWrapper from '@/components/organisms/PageWrapper/PageWrapper';\nimport {\n getPetStatusFromSearchType,\n getSearchTypeFromPetStatus,\n} from '@/components/organisms/SearchResultsFilterForm/helpers';\nimport SearchResultsFilterForm, {\n IFormFilters,\n ISearchResultsFilterForm,\n} from '@/components/organisms/SearchResultsFilterForm/SearchResultsFilterForm';\nimport SearchResultsGrid, {\n ISearchResultsGrid,\n} from '@/components/organisms/SearchResultsGrid/SearchResultsGrid';\nimport { flagMapSearchResults } from '@/lib/constants/constants/featureFlags';\nimport { searchRadiusOptions } from '@/lib/constants/constants/pets';\nimport { petcoLoveHQCoordinates } from '@/lib/constants/constants/search';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\nimport {\n IDistanceSearchResultsResponse,\n IGetDistanceSearchResults,\n} from '@/lib/dataSource/lostApi/pet/petSearch/distanceSearch';\nimport {\n getImageSearchResults,\n IGetImageSearchParams,\n IImageSearchResultsResponse,\n} from '@/lib/dataSource/lostApi/pet/petSearch/imageSearch';\nimport {\n EventData,\n useEventContext,\n} from '@/lib/hooks/analytics/useEventContext';\nimport { useOptimizelyFeature } from '@/lib/hooks/featureFlags/useOptimizelyFeature';\nimport { usePagination } from '@/lib/hooks/paginate/usePagination';\nimport useSearchParameters from '@/lib/hooks/searchParameters/useSearchParameters';\nimport { useShareReportContext } from '@/lib/hooks/share/ShareReport';\nimport { ToastType, useToastContext } from '@/lib/hooks/toasts/Toast';\nimport { useUserContext } from '@/lib/hooks/userContext/UserContext';\nimport {\n IPetSearchData,\n PetFlowType,\n petSearchEventHandler,\n SearchMethods,\n SpeciesTypes,\n} from '@/lib/utils/analytics/petSearch';\nimport {\n getShareEventDataFromPetListing,\n shareEventHandler,\n ShareMethods,\n} from '@/lib/utils/analytics/share';\nimport getBasePath from '@/lib/utils/getBasePath/getBasePath';\nimport { isDateValid } from '@/lib/utils/helpers/dateHelpers/dates';\nimport generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport capitalizeFirstLetter from '@/lib/utils/helpers/stringHelpers/capitalizeFirstLetter';\nimport { useGetSearchSelectorLabels } from '@/lib/utils/searchSelectors/searchSelectors';\nimport clsx from 'clsx';\nimport { useRouter } from 'next/router';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { FormProvider, useForm } from 'react-hook-form';\nimport {\n buttonLinkHandler,\n chipIsActive,\n clearILostOrFoundPetStorage,\n convertFiltersToPetSearchRequestData,\n convertQueryForSearchType,\n createInitialFilterValuesStorage,\n determineAnalyticsUserType,\n determineSearchMethod,\n formatDefaultValuesForFilterForms,\n getDistanceSearchResults,\n getHiddenFields,\n getInitialFilterValuesFromStorage,\n getPetFlowName,\n getSearchRadius,\n isPetImageProcessed,\n photoHref,\n saveSearchParamsToStorage,\n shouldSendStartDate,\n} from './helpers';\nimport { ISearchResultsTemplate } from './interfaces';\n\n/**\n * SearchResultsTemplate - A template to display the search results\n *\n * @param {ISearchResultsTemplate} props - The props for the\n * SearchResultsTemplate component\n * @returns {React.FC<ISearchResultsTemplate>} Component\n */\nconst SearchResultsTemplate: React.FC<ISearchResultsTemplate> = ({\n geoPoints,\n loggedIn,\n search,\n searchRadiusIndex,\n searchType,\n species,\n photoSearchSpecies,\n imageObjectKey,\n ssrLocationObject,\n address,\n start,\n partner,\n}) => {\n const { setInitiatingComponent } = useEventContext();\n\n /** The nextjs router */\n const router = useRouter();\n\n /** The hook to get the user type */\n const { userType } = useUserContext();\n\n /** The state to control the open state of the filters modal */\n const [isOpen, setIsOpen] = useState(false);\n\n const {\n getData: getPetSearchData,\n updateData: updateEventData,\n getInitiatingComponent,\n } = useEventContext();\n\n const [sentSearchEvent, setSentSearchEvent] = useState(false);\n\n const { breakpoint } = useWindowSize();\n const isMobile = breakpoint === 'xs' || breakpoint === 'sm';\n\n /** The state to manage the current filters for the search results filter form */\n const [appliedValues, setAppliedValues] = useState<IFormFilters>({\n searchRadius: searchRadiusIndex,\n petType: species,\n start,\n location: ssrLocationObject,\n petStatus: getPetStatusFromSearchType(searchType),\n });\n\n const formMethods = useForm({ defaultValues: appliedValues });\n\n /** Save the search parameters to the storage on mount. */\n useEffect(() => {\n saveSearchParamsToStorage({\n latitude: geoPoints?.latitude,\n longitude: geoPoints?.longitude,\n searchRadius: searchRadiusOptions[searchRadiusIndex]?.value,\n searchType,\n species: species || undefined,\n photoSearchSpecies,\n imageObjectKey,\n address,\n start,\n partner,\n });\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n /** Save the initial filter values to the storage as default values */\n useEffect(() => {\n const defaultStorage = getInitialFilterValuesFromStorage(router.pathname);\n if (defaultStorage === null) {\n createInitialFilterValuesStorage({\n latitude: geoPoints?.latitude,\n longitude: geoPoints?.longitude,\n searchRadius: searchRadiusOptions[searchRadiusIndex]?.value,\n searchType,\n species: species || undefined,\n photoSearchSpecies,\n imageObjectKey,\n address,\n start,\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n /**\n * Share Pet listing information\n *\n * @see {@link useShareReportContext}\n */\n const {\n encodedUrl,\n encodedString,\n getLatestPetListing,\n petListing,\n shareUrl,\n } = useShareReportContext();\n\n /** The search parameters from the context */\n const { searchParameters } = useSearchParameters();\n\n /**\n * The dispatch function from the toast context\n *\n * @see {@link useToastContext}\n */\n const { dispatch } = useToastContext();\n\n useEffect(() => {\n if (loggedIn) {\n /** Get the latest lost pet for the user */\n getLatestPetListing(['lostUserPet']);\n }\n }, [getLatestPetListing, loggedIn]);\n\n /**\n * Set the initial location based on the Geo points or the position from the\n * browser. The order of initialLocation is:\n *\n * 1. Query Parameter Location\n * 2. Browser Location\n * 3. Fall Back Location - Petco Love HQ\n */\n const initialLocation = useMemo(\n () => ({\n latitude: geoPoints.latitude || petcoLoveHQCoordinates.latitude,\n longitude: geoPoints.longitude || petcoLoveHQCoordinates.longitude,\n }),\n [geoPoints]\n );\n\n const initialFilterValues = getInitialFilterValuesFromStorage(\n router.pathname\n );\n\n const defaultValues = formatDefaultValuesForFilterForms({\n storageValues: initialFilterValues,\n fallbackValues: {\n ssrLocationObject,\n },\n });\n\n /** Form Data for the SearchResultsFilterForm */\n const initialRequest: IGetDistanceSearchResults | IGetImageSearchParams = {\n latitude: initialLocation.latitude,\n longitude: initialLocation.longitude,\n searchType: searchType,\n range: searchRadiusOptions[searchRadiusIndex]?.value,\n limit: 24,\n offset: 0,\n species: species,\n imageUrl: imageObjectKey,\n includeExternalPosts: true,\n };\n\n if (\n start &&\n isDateValid(start) &&\n shouldSendStartDate({\n searchMechanism: search,\n searchType,\n })\n ) {\n initialRequest.start = start;\n }\n\n /**\n * A callback function to call after the image search data is fetched to send\n * analytics data\n *\n * @param {IGetDistanceSearchResults | IGetImageSearchParams} params - The\n * search request parameters\n * @param {IImageSearchResultsResponse | IDistanceSearchResultsResponse} results\n * - The search request results\n *\n * @returns {Promise<void>} - The promise that resolves when the callback is\n * done\n */\n const sendAnalyticsEvent = useCallback(\n async (\n params: IGetDistanceSearchResults | IGetImageSearchParams,\n results: IImageSearchResultsResponse | IDistanceSearchResultsResponse\n ): Promise<void> => {\n /**\n * The pet search event data\n *\n * @constant {EventData | undefined}\n */\n const data: EventData | undefined = getPetSearchData();\n /**\n * The flow type to send to the analytics handler\n *\n * @constant {PetFlowType}\n */\n const flowType =\n search === 'photo'\n ? (capitalizeFirstLetter(searchType) as PetFlowType)\n : getPetFlowName(\n searchType,\n getSearchTypeFromPetStatus(appliedValues.petStatus)\n );\n\n if (\n (params as IGetDistanceSearchResults | IGetImageSearchParams)\n ?.offset === 0 &&\n !sentSearchEvent\n ) {\n const petSearchAnalyticsData: IPetSearchData = {\n ...data,\n species: data?.species as SpeciesTypes,\n clickText: data?.clickText as string,\n searchRadius: getSearchRadius(\n appliedValues?.searchRadius,\n searchRadiusIndex\n ),\n method: data?.method as SearchMethods,\n userType: determineAnalyticsUserType(userType),\n resultsReturned: results.data.length > 0,\n flowType,\n start: data?.start || start,\n component: getInitiatingComponent(),\n latitude: appliedValues?.location?.coordinates?.latitude?.toString(),\n longitude:\n appliedValues?.location?.coordinates?.longitude?.toString(),\n };\n\n /*\n * If this is a photo search, we should know the species from the image\n * species inference.\n */\n if (search === 'photo') {\n petSearchAnalyticsData.species = capitalizeFirstLetter(\n species as SpeciesTypes\n ) as SpeciesTypes;\n }\n\n petSearchEventHandler(petSearchAnalyticsData);\n }\n setSentSearchEvent(true);\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n getPetSearchData,\n start,\n search,\n searchRadiusIndex,\n appliedValues,\n searchType,\n sentSearchEvent,\n species,\n userType,\n ]\n );\n\n /**\n * The pet search function to use for the pagination hook\n *\n * @param {number} page - The page number\n * @param {IGetDistanceSearchResults | IGetImageSearchParams} params - The\n * search\n * @returns {Promise<\n * IImageSearchResultsResponse | IDistanceSearchResultsResponse\n * >}\n * - The search results\n */\n const petSearchFunction = useCallback(\n (page: number, params: IGetDistanceSearchResults | IGetImageSearchParams) =>\n search === 'photo'\n ? getImageSearchResults(page, params as IGetImageSearchParams)\n : getDistanceSearchResults(page, params as IGetDistanceSearchResults),\n\n [search]\n );\n\n /**\n * @property {object[]} dataForDisplay - Includes the data in all the\n * requested pages\n * @property {Function} fetchNextPage - Function to fetch the next page\n * @property {boolean} hasNextPage - Flag to indicate if there is a next page\n * @property {boolean} isFetching - Flag to indicate if the data is being\n * fetched\n * @property {Function} refetch - Function to refetch the data\n */\n const {\n dataForDisplay: data,\n fetchNextPage,\n hasNextPage,\n isFetching,\n setRequestParams,\n } = usePagination<\n IGetDistanceSearchResults | IGetImageSearchParams,\n IImageSearchResultsResponse | IDistanceSearchResultsResponse,\n IPetCard\n >(petSearchFunction, initialRequest, {\n postDataFetchCallback: sendAnalyticsEvent,\n });\n\n const noResults =\n data.length === 0 && hasNextPage === false && isFetching === false;\n\n const shouldDisplayCallout = loggedIn === false && search !== 'all';\n\n /**\n * Full Width Illustration Props\n *\n * @constant {IFullWidthIllustration} fullWidthIllustrationProps - The props\n * for the FullWidthIllustration component\n */\n const fullWidthIllustrationProps: IFullWidthIllustration = useMemo(() => {\n /**\n * Handles the toast\n *\n * @param {ToastType} type - The type of toast\n * @param {string} message - The message of the toast\n * @returns {void} - The toast\n */\n const handleToast = (type: ToastType, message: string): void => {\n dispatch({\n type: 'ADD_TOAST',\n toast: {\n id: '1',\n type: type,\n message: message,\n persistent: false,\n showIcon: true,\n },\n });\n };\n\n /**\n * Send the share event to the analytics handler\n *\n * @param {ShareMethods} method - The method used to share the pet\n */\n const sendShareEvent = (method: ShareMethods) => {\n shareEventHandler({\n method,\n ...getShareEventDataFromPetListing(petListing),\n });\n };\n\n return {\n title: 'Report. Share. Reunite.',\n copy: 'Share your pet report to engage your friends and family in the search.',\n imageUrl:\n process.env.NEXT_PUBLIC_CDN_BASE_URL + '/assets/lost/dog-running.svg',\n buttons: [\n <CircleButton\n key={0}\n label=\"facebook\"\n icon=\"facebook\"\n onClickAction={() => {\n sendShareEvent('Facebook');\n buttonLinkHandler(\n `https://www.facebook.com/sharer/sharer.php?u=${encodedUrl}`\n );\n }}\n />,\n <CircleButton\n key={0}\n label=\"twitter\"\n icon=\"twitter\"\n onClickAction={() => {\n sendShareEvent('Twitter');\n buttonLinkHandler(\n `https://twitter.com/intent/tweet?text=${encodedString}%20&url=${encodedUrl}`\n );\n }}\n />,\n <CircleButton\n key={0}\n label=\"nextdoor\"\n icon=\"nextdoor\"\n onClickAction={() => {\n sendShareEvent('Nextdoor');\n buttonLinkHandler(\n `https://nextdoor.com/news_feed/?open_composer=true&body=${encodedString}%20${encodedUrl}`\n );\n }}\n />,\n <CircleButton\n key={0}\n label=\"link\"\n icon=\"link\"\n onClickAction={() => {\n if (shareUrl) {\n sendShareEvent('Link');\n navigator.clipboard\n .writeText(shareUrl)\n .then(() => handleToast('success', 'Copied to clipboard'));\n }\n }}\n />,\n ],\n };\n }, [encodedString, encodedUrl, shareUrl, petListing, dispatch]);\n\n /**\n * Update query params on form submit with the new filters\n *\n * @param {IFormFilters} filters - The filters to update the query params with\n */\n const updateQueryParams = (filters: IFormFilters) => {\n const { query } = router;\n\n const { petType, searchRadius, location, start: startDate } = filters;\n\n const latitude = location?.coordinates?.latitude;\n const longitude = location?.coordinates?.longitude;\n\n if (petType !== query.species) {\n if (petType) {\n query.species = petType;\n }\n if (!petType) {\n delete query.species;\n }\n }\n\n query.searchRadius = searchRadiusOptions[searchRadius]?.value?.toString();\n query.latitude = latitude?.toString();\n query.longitude = longitude?.toString();\n query.address = location?.label;\n\n if (startDate) {\n query.start = startDate;\n }\n if (!startDate) {\n delete query.start;\n }\n\n query.searchType =\n search === 'all'\n ? getSearchTypeFromPetStatus(filters.petStatus)\n : searchType;\n\n router.push({ query });\n };\n\n /**\n * Function to handle the form submit\n *\n * @param {IFormFilters} filters - The filters to submit\n */\n const handleFormSubmit = (filters: IFormFilters) => {\n window.scrollTo(0, 0);\n\n setSentSearchEvent(false);\n setAppliedValues(filters);\n\n const inferredSearchType =\n search === 'all'\n ? getSearchTypeFromPetStatus(filters.petStatus)\n : searchType;\n\n const petSearchRequestData = convertFiltersToPetSearchRequestData(\n filters,\n initialLocation,\n inferredSearchType\n );\n\n setRequestParams({\n ...petSearchRequestData,\n imageUrl: imageObjectKey,\n });\n\n updateQueryParams(filters);\n\n setIsOpen(false);\n\n const { petType: species, searchRadius, location, start } = filters;\n\n const latitude = location?.coordinates?.latitude;\n const longitude = location?.coordinates?.longitude;\n const address = location?.label;\n\n const propertiesForStorage = {\n latitude,\n longitude,\n searchRadius: searchRadiusOptions[searchRadius]?.value,\n searchType: inferredSearchType,\n species: species || undefined,\n photoSearchSpecies,\n imageObjectKey,\n address,\n start,\n };\n\n saveSearchParamsToStorage(propertiesForStorage);\n };\n\n const hiddenFields = getHiddenFields({ search, imageObjectKey });\n\n /**\n * Search Results Filter Form Props\n *\n * @constant {Omit<\n * ISearchResultsFilterForm,\n * 'defaultValues',\n * 'currentFilters'\n * >} searchResultsFilterFormProps\n * - The base props for the SearchResultsFilterForm component excluding the\n * defaultValues and the currentFilters\n */\n const searchResultsFilterFormPropsBase: ISearchResultsFilterForm = {\n content: {\n text: {\n title: 'Filter',\n lostOrFound: 'lost',\n summary: {\n distanceUnits: 'miles',\n },\n },\n buttons: {\n apply: 'Apply Filters',\n reset: 'Reset Filters',\n },\n },\n searchType,\n search,\n /**\n * Function to handle the form submit\n *\n * @param {IFormFilters} filters - The filters to submit\n * @returns {void} - Nothing\n */\n onSubmit: (filters: IFormFilters): void => handleFormSubmit(filters),\n defaultValues: defaultValues,\n appliedValues: appliedValues,\n hiddenFields: hiddenFields,\n disableFormButtons: isFetching,\n };\n\n /** Headline Photo Search Button */\n const headlinePhotoSearchButton: IButton = {\n size: 'md',\n variant: 'light',\n color: 'primary',\n type: 'button',\n children: 'Search by Photo',\n // eslint-disable-next-line jsdoc/require-jsdoc\n onClick: () => {\n setInitiatingComponent('Photo Search Button / Search Results Page');\n router.push(photoHref(searchType, router, imageObjectKey));\n },\n };\n\n /** Headline Distance Search Button */\n const headlineDistanceSearchButton: IButton = {\n size: 'md',\n variant: 'light',\n color: 'primary',\n type: 'button',\n children: 'Search by Distance',\n // eslint-disable-next-line jsdoc/require-jsdoc\n onClick: () => {\n setInitiatingComponent('Distance Search Button / Search Results Page');\n router.push(\n `/search-results${convertQueryForSearchType(router.query, 'distance')}`\n );\n },\n };\n\n /**\n * Headline Buttons Props\n *\n * @constant {ICardCallout} cardCalloutProps - The props for the CardCallout\n * component\n */\n const cardCalloutProps: ICardCallout = {\n imageUrl: generateImageUrl('/assets/lost/paw-symbol-fill-blue.svg'),\n buttons: [\n String(search) === 'distance'\n ? { ...headlinePhotoSearchButton }\n : { ...headlineDistanceSearchButton },\n {\n size: 'md',\n variant: 'light',\n color: 'secondary',\n type: 'button',\n children: 'Search by Microchip',\n // eslint-disable-next-line jsdoc/require-jsdoc\n onClick: () => {\n setInitiatingComponent(\n 'Microchip Search Button / Search Results Page'\n );\n router.push('/microchip-search');\n },\n },\n ],\n headline: \"Don't see your pet?\",\n classes: '',\n };\n\n /**\n * Logged out Search Results Grid Props\n *\n * @constant {ISearchResultsGrid} loggedOutSearchResultsGridProps - The props\n * for the SearchResultsGrid component\n */\n const loggedOutSearchResultsGridProps: ISearchResultsGrid = {\n ctaOffset: 6,\n ctaObjects: [\n {\n type: CardCallout,\n props: cardCalloutProps,\n placement: 7,\n },\n ],\n results: data,\n };\n\n /**\n * All Search Results Grid Props\n *\n * @constant {ISearchResultsGrid} allSearchResultsGridProps - The props for\n * the SearchResultsGrid component\n */\n const allSearchResultsGridProps: ISearchResultsGrid = {\n results: data,\n };\n\n /**\n * Logged in Search Results Grid Props\n *\n * @constant {ISearchResultsGrid} loggedInSearchResultsGridProps - The props\n * for the SearchResultsGrid component\n */\n const loggedInSearchResultsGridProps: ISearchResultsGrid = {\n ctaOffset: 6,\n ctaObjects: [\n {\n type: FullWidthIllustration,\n props: fullWidthIllustrationProps,\n placement: 6,\n },\n {\n type: CardCallout,\n props: cardCalloutProps,\n placement: 7,\n },\n ],\n results: data,\n };\n\n const isMapSearchResultsEnabled = useOptimizelyFeature(flagMapSearchResults);\n const searchSelectorLabels = useGetSearchSelectorLabels(\n isMapSearchResultsEnabled\n );\n\n /**\n * The chips for the Search Selector Component\n *\n * @constant {IChip} searchSelectorChips - The chips for the SearchSelector\n * component\n */\n const searchSelectorChips: IChip[] = [\n {\n text: searchSelectorLabels.photo,\n href: photoHref(searchType, router, imageObjectKey),\n active: chipIsActive(search, 'photo'),\n /** Update the click text for search event */\n onClickAction: () => {\n updateEventData({ clickText: searchSelectorLabels.photoRaw });\n setInitiatingComponent('Photo Search Chip / Search Results Page');\n },\n },\n {\n text: searchSelectorLabels.distance,\n href: `/search-results/${convertQueryForSearchType(\n router.query,\n 'distance'\n )}`,\n active: chipIsActive(search, 'distance'),\n /** Update the click text for search event */\n onClickAction: () => {\n updateEventData({ clickText: searchSelectorLabels.distanceRaw });\n setInitiatingComponent('Distance Search Chip / Search Results Page');\n },\n },\n {\n text: searchSelectorLabels.microchip,\n href: '/microchip-search/',\n active: false,\n /** Update the click text for search event */\n onClickAction: () => {\n updateEventData({ clickText: searchSelectorLabels.microchipRaw });\n setInitiatingComponent('Microchip Search Chip / Search Results Page');\n },\n },\n ];\n\n /** Close Dialog */\n const closeDialog = () => {\n setIsOpen(false);\n };\n\n /**\n * The search summary to display\n *\n * @constant {string}\n */\n const searchSummary = useMemo(() => {\n if (search === 'photo') {\n return `Pets sorted by best photo match`;\n }\n return 'Pets sorted closest to your search location';\n }, [search]);\n\n /**\n * The copy to use for the loading spinner based on the search\n *\n * @constant {string}\n */\n const loadingSpinnerCopy = useMemo(() => {\n if (search === 'photo') {\n return 'Fetching matches';\n } else {\n return 'Loading';\n }\n }, [search]);\n\n /**\n * The path to the create account flow based on the search type and search\n * parameters\n *\n * @constant {string}\n */\n const createAccountFlow = useMemo(() => {\n /**\n * The base of the create account path flow based on the search type\n *\n * @constant {string}\n */\n const createAccountBase = `/create-account/${\n searchType === 'lost' ? 'found' : 'lost'\n }`;\n\n /**\n * If a photo is available in searchParams, use it to redirect to the create\n * account with photo\n */\n if (\n searchParameters?.imageObjectKey &&\n searchParameters?.photoSearchSpecies\n ) {\n return `${createAccountBase}-photo`;\n }\n return `${createAccountBase}-${search}`;\n }, [\n search,\n searchType,\n searchParameters?.imageObjectKey,\n searchParameters?.photoSearchSpecies,\n ]);\n\n const loginAccountURL = `${getBasePath()}/api/auth/login/?returnTo=${getBasePath()}/dash/?login=true`;\n\n // Setup correct text for the sign up component\n let signUpTitle = `Finish reporting your ${\n searchType === 'found' ? 'lost' : 'found'\n } pet`;\n let signUpDescription = 'Complete your account to spread the word';\n let signUpURL = createAccountFlow;\n let signUpText = 'Report your pet for free';\n let noResultsText = `to finish reporting ${\n searchType === 'found' ? 'your pet' : 'this pet'\n }`;\n\n if (!searchParameters?.partner && isPetImageProcessed(imageObjectKey)) {\n signUpTitle = 'Welcome back';\n signUpDescription = `Sign in to spread the word about your ${\n searchType === 'found' ? 'lost' : 'found'\n } pet`;\n signUpURL = loginAccountURL;\n signUpText = 'Sign In';\n noResultsText = `to print your ${\n searchType === 'found' ? 'lost' : 'found'\n } pet poster and share on social`;\n }\n\n useEffect(() => {\n return clearILostOrFoundPetStorage;\n }, []);\n\n /**\n * The template data test id\n *\n * @constant {string}\n */\n const dataTestId = 'search-results-template';\n\n return (\n <FormProvider {...formMethods}>\n <div\n data-testid={dataTestId}\n className=\"pb-7 pt-6 sm:pt-9 md:pt-10 md:pb-[60px]\"\n >\n <PageWrapper classes=\"relative px-0 sm:px-8 md:px-10 sm:grid grid-cols-4 sm:grid-cols-6 md:grid-cols-12 gap-x-4 sm:gap-x-6 md:gap-x-8\">\n <Heading\n size=\"h3\"\n className={`text-center sm:col-start-2 sm:col-span-4 md:col-start-3 md:col-span-8 px-6 sm:px-0 !text-secondaryBase-400 ${\n search === 'all' && 'md:mb-10'\n }`}\n >\n {noResults\n ? 'No results to display, but try the search tips below!'\n : searchSummary}\n </Heading>\n\n {search !== 'all' && (\n <SearchSelector\n chips={searchSelectorChips}\n classes=\"px-6 mt-6 mb-8 sm:col-start-1 sm:col-span-6 sm:px-0 md:col-start-1 md:col-span-12 sm:mb-9 md:mb-10\"\n />\n )}\n\n <div\n className={`px-8 sm:px-0 col-start-1 col-end-4 col-span-4 sm:col-span-6 md:col-span-12 mb-8 sm:mb-9 md:mb-10 ${\n search === 'all' && 'mt-8 sm:mt-9 md:mt-0'\n }`}\n >\n <Divider type=\"lightGrey\" />\n </div>\n\n {!isMobile && (\n <div className=\"flex md:col-start-1 md:col-span-3 md:min-h-[550px] z-[1]\">\n <SearchResultsFilterForm\n {...searchResultsFilterFormPropsBase}\n classes=\"hidden sticky md:block top-[104px] w-full\"\n />\n </div>\n )}\n\n <div className=\"flex flex-col sm:col-span-6 md:col-span-9\">\n {shouldDisplayCallout && (\n <div className=\"sm:col-span-6 md:col-span-9 sm:grid sm:grid-cols-6 md:grid-cols-9 md:pt-2\">\n <SignUpCallout\n heading={signUpTitle}\n description={signUpDescription}\n image={imageObjectKey}\n buttonLink={signUpURL}\n linkText={signUpText}\n classes=\"px-6 sm:px-0 sm:col-span-4 sm:col-start-2 md:col-start-3 md:col-span-5\"\n searchType={searchType === 'lost' ? 'Found' : 'Lost'}\n species={\n search === 'photo'\n ? (capitalizeFirstLetter(species) as InferredSpecies)\n : undefined\n }\n searchMethod={determineSearchMethod(search)}\n />\n {!noResults && (\n <Divider\n type=\"lightGrey\"\n classes=\"my-8 px-6 sm:px-0 sm:my-9 md:mb-10 col-span-9\"\n />\n )}\n </div>\n )}\n {isFetching && data.length === 0 && (\n <div className=\"sm:col-start-1 sm:col-span-6 md:col-start-4 md:col-span-9 pt-[200px]\">\n <Loading title={loadingSpinnerCopy} />\n </div>\n )}\n\n {noResults && search !== 'all' ? (\n <>\n <NoResults\n linkHref={signUpURL}\n linkLabel={\n isPetImageProcessed(imageObjectKey)\n ? 'Sign in'\n : 'Create an account'\n }\n linkText={noResultsText}\n species={species}\n searchType={searchType}\n search={search}\n latitude={geoPoints.latitude}\n longitude={geoPoints.longitude}\n loggedIn={loggedIn}\n radius={searchRadiusOptions[searchRadiusIndex]?.value}\n classes=\"col-start-1 col-span-4 sm:col-start-1 sm:col-span-6 md:col-start-4 md:col-span-9\"\n />\n </>\n ) : (\n <div className=\"sm:col-start-1 sm:col-span-6 md:col-span-9\">\n <div>\n <SearchResultsGrid\n {...(search === 'all'\n ? allSearchResultsGridProps\n : loggedIn && petListing\n ? { ...loggedInSearchResultsGridProps }\n : { ...loggedOutSearchResultsGridProps })}\n showPetStatus={router.pathname === '/search-all'}\n />\n\n {isFetching && data.length > 0 && (\n <div\n className=\"sm:col-start-1 sm:col-span-6 md:col-start-4 md:col-span-9 pt-[200px]\"\n data-testid={`${dataTestId}-loading`}\n >\n <Loading title=\"Fetching Matches\" />\n </div>\n )}\n\n {!isFetching && hasNextPage && data.length > 0 && (\n <LoadMore\n updateOffset={fetchNextPage}\n loading={isFetching}\n />\n )}\n {!isFetching &&\n !hasNextPage &&\n data.length > 0 &&\n search !== 'all' && (\n <>\n <NoResults\n linkHref={signUpURL}\n linkLabel={\n isPetImageProcessed(imageObjectKey)\n ? 'Sign in'\n : 'Create an account'\n }\n linkText={noResultsText}\n species={species}\n searchType={searchType}\n search={search}\n latitude={geoPoints.latitude}\n longitude={geoPoints.longitude}\n loggedIn={loggedIn}\n radius={searchRadiusOptions[searchRadiusIndex]?.value}\n endOfResults={true}\n classes=\"col-start-1 col-span-4 sm:col-start-1 sm:col-span-6 md:col-start-4 md:col-span-9\"\n />\n </>\n )}\n </div>\n </div>\n )}\n </div>\n\n <FloatingActionButton\n data-testid=\"search-results-open\"\n side=\"center\"\n classes=\"md:hidden bottom-6\"\n onClickAction={() => setIsOpen(true)}\n >\n <div className=\"flex gap-1 items-center\">\n <Icon icon=\"filter\" size={24} />\n Filter\n </div>\n </FloatingActionButton>\n\n <JumpToTopButton classes=\"bottom-6\" />\n </PageWrapper>\n\n <div\n data-testid=\"search-results-mobile-filter-container\"\n className={clsx(\n 'bg-neutral-100 fixed inset-0 z-30 transition-all duration-250 h-screen overflow-y-scroll md:hidden',\n isOpen ? 'visible opacity-100' : 'invisible opacity-0'\n )}\n >\n <div className=\"w-full h-full overflow-y-scroll px-6 sm:grid sm:grid-cols-6 sm:gap-y-6 sm:auto-rows-min\">\n {isMobile && (\n <SearchResultsFilterForm\n {...searchResultsFilterFormPropsBase}\n handleCloseFilterOverlay={() => closeDialog()}\n classes=\"col-start-2 col-span-4\"\n />\n )}\n </div>\n </div>\n </div>\n </FormProvider>\n );\n};\n\nexport default SearchResultsTemplate;\n","/**\n * Content Type Enum for content types\n *\n * @enum\n */\nexport enum ContentType {\n Article,\n Author,\n}\n\n/**\n * Content Status Enum for content statuses\n *\n * @enum\n */\nexport enum ContentStatus {\n Draft,\n Published,\n}\n\n/**\n * Content Base Abstract Class for Content Types\n *\n * @abstract\n * @class\n * @property {ContentType} type - The type of content\n * @property {ContentStatus} status - The status of the content\n */\nexport default abstract class Content {\n type: ContentType;\n\n status: ContentStatus;\n\n /**\n * @param {ContentType} type - The type of content\n * @param {ContentStatus} status - The status of the content\n */\n constructor(type: ContentType, status: ContentStatus) {\n this.type = type;\n this.status = status;\n }\n}\n","import { ICardArticle } from '@/components/molecules/CardArticle/CardArticle';\nimport Content, { ContentStatus, ContentType } from './content-base';\n\n/**\n * Article Interface for Article Content Type\n *\n * @interface\n */\nexport interface IContent {\n /** Title of the Article */\n title: string;\n /** Author of the Article */\n authorName: string;\n /** Author Slug of the Article */\n authorSlug: string;\n /** Date the Article was published */\n publishedDate: Date;\n /** Slug of the Article */\n slug: string;\n /** Featured Photo of the Article */\n featuredPhoto: string;\n /** Body Content of the Article */\n contentBody: string;\n /** Excerpt of the Article */\n excerpt: string;\n /** Category of the Article */\n categoryId: string;\n}\n\n/**\n * Article Class for Article Content Type\n *\n * @class\n * @property {string} title - The title of the article\n * @property {Date} publishedDate - The date the article was published\n * @property {string} slug - The slug of the article\n * @property {string} featuredPhoto - The featured photo of the article\n * @property {string} contentBody - The content of the article\n * @requires Content\n */\nexport default class Article extends Content {\n /**\n * Title of the Article\n *\n * @memberof Article\n * @member {string} title\n */\n title: string;\n\n /**\n * Author of the Article\n *\n * @memberof Article\n * @member {string} authorName\n */\n authorName: string;\n\n /**\n * Author slug of the Article\n *\n * @memberof Article\n * @member {string} authorSlug\n */\n authorSlug: string;\n\n /**\n * Date the Article was published\n *\n * @memberof Article\n * @member {Date} publishedDate\n */\n publishedDate: Date;\n\n /**\n * Slug of the Article\n *\n * @memberof Article\n * @member {string} slug\n */\n slug: string;\n\n /**\n * Featured Photo of the Article\n *\n * @memberof Article\n * @member {string} featuredPhoto\n */\n featuredPhoto: string;\n\n /**\n * Content Body of the Article\n *\n * @memberof Article\n * @member {string} contentBody\n */\n contentBody: string;\n\n /**\n * Excerpt of the Article\n *\n * @memberof Article\n * @member {string} excerpt\n */\n excerpt: string;\n\n /**\n * Category id of the Article\n *\n * @memberof Article\n * @member {string} category\n */\n categoryId: string;\n\n /**\n * The base path for articles\n *\n * @memberof Article\n * @member {'/articles'} articlesBasePath\n */\n articlesBasePath: `/${string}` = '/articles';\n\n /**\n * The base path for authors\n *\n * @memberof Article\n * @member {'/author'} authorBasePath\n */\n authorBasePath = '/author';\n\n /**\n * Article Data Constructor\n *\n * @param {IContent} content - The content data\n */\n constructor({\n title,\n authorName,\n authorSlug,\n slug,\n featuredPhoto,\n contentBody,\n excerpt,\n categoryId,\n publishedDate,\n }: IContent) {\n super(ContentType.Article, ContentStatus.Published);\n\n this.title = title;\n this.authorName = authorName;\n this.authorSlug = authorSlug;\n this.publishedDate = publishedDate;\n this.slug = slug;\n this.contentBody = contentBody;\n this.excerpt = excerpt;\n this.featuredPhoto = featuredPhoto;\n this.categoryId = categoryId;\n }\n\n /**\n * Get Title Returns the Title of the Article\n *\n * @returns {string} - Title of the Article\n */\n getTitle(): string {\n return this.title;\n }\n\n /**\n * Get Featured Photo Returns the Featured Photo of the Article\n *\n * @returns {string} - Featured Photo URL of the Article\n */\n getFeaturedPhoto(): string {\n return this.featuredPhoto;\n }\n\n /**\n * Get Slug Returns the Slug of the Article\n *\n * @returns {string} - Slug of the Article\n */\n getSlug(): string {\n return this.slug;\n }\n\n /**\n * Get Author Link Returns the link to the Author of the Article\n *\n * @returns {string} - Author link\n */\n getAuthorUrl(): string {\n return `${this.authorBasePath}/${this.authorSlug}`;\n }\n\n /**\n * Get Content of the Article Returns the Content of the Article\n *\n * @returns {string} - Content of the Article\n */\n getContent(): string {\n return this.contentBody;\n }\n\n /**\n * Get Formatted Publication Date of the Article\n *\n * @returns {string} - Formatted Publication Date of the Article\n */\n getFormattedPublishedDate(): string {\n const date = new Date(this.publishedDate);\n\n return date.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n }\n\n /**\n * Get the article url\n *\n * @returns {string} - Url of the Article\n */\n getArticleUrl(): `/${string}` {\n return `${this.articlesBasePath}/${this.slug}`;\n }\n\n /**\n * Get the card article for the Articles Display component\n *\n * @returns {string} - Article card of the Article\n */\n getCardArticle(): ICardArticle {\n return {\n title: this.title,\n excerpt: this.excerpt,\n url: this.getArticleUrl(),\n image: this.featuredPhoto,\n };\n }\n}\n","import Article, { IContent } from '@/lib/dataSource/content/article';\nimport IFetchArticles from '@/lib/interfaces/fetch-articles';\nimport getBasePath from '@/lib/utils/getBasePath/getBasePath';\nimport { addHttps } from '@/lib/utils/stringReplace/addHttps';\nimport { ArticleProps } from '@/pages/articles/[slug]';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\n\n/**\n * Contentful Data Class for Contentful Data Source API\n *\n * @augments IFetchArticles\n * @class ContentfulData\n */\nexport default class ContentfulData implements IFetchArticles {\n path: string;\n\n /** Contentful Data Constructor */\n constructor() {\n this.path = `${\n process.env.NEXT_PUBLIC_BASE_URL\n }${getBasePath()}/api/articles/`;\n }\n\n /**\n * Get Article From Slug Fetches an article from the Contentful CMS API by its\n * slug\n *\n * @param {string} slug - The slug of the article\n * @returns {Promise<Article>} Promise<Article>\n */\n async getArticleFromSlug(slug: string): Promise<Article> {\n try {\n const params = {\n limit: '1',\n skip: '0',\n slug: slug,\n };\n const response = await fetch(\n `${this.path}?${new URLSearchParams(params)}`\n );\n const contentfulData = await response.json();\n const responseItem = contentfulData.items[0];\n const displayDate = new Date(responseItem.fields.publishDate);\n const articleContent = {\n title: responseItem.fields.headline,\n slug: responseItem.fields.slugs,\n contentBody: documentToReactComponents(responseItem.fields.copy),\n excerpt: responseItem.fields.excerpt,\n authorName: responseItem.fields.author?.fields.name,\n authorSlug: responseItem.fields.author?.fields.slugs,\n categoryId: responseItem.fields.context,\n featuredPhoto: addHttps(\n responseItem.fields.featuredImage?.fields?.file?.url\n ),\n publishedDate: displayDate,\n } as IContent;\n return new Article(articleContent);\n } catch (err) {\n console.error(err);\n throw new Error('Error fetching article from slug for Contentful CMS');\n }\n }\n\n /**\n * Get Articles Fetches a list of articles from Contentful CMS\n *\n * @param {number} limit - The number of articles to fetch\n * @param {number} skip - The number of articles to skip\n * @returns {Promise<Article[]>} Promise<Article[]>\n */\n async getArticles(limit: number, skip: number): Promise<Article[]> {\n try {\n const params = {\n skip: skip?.toString(),\n limit: limit?.toString(),\n parent: '/lost',\n };\n\n const response = await fetch(\n `${this.path}?${new URLSearchParams(params)}`\n );\n const contentfulData = await response.json();\n const articles = contentfulData.items.map((item: ArticleProps) => {\n const displayDate = new Date(item.fields.publishDate);\n const articleContent = {\n title: item.fields.headline,\n slug: item.fields.slugs,\n contentBody: documentToReactComponents(item.fields.copy),\n excerpt: item.fields.excerpt,\n authorName: item.fields.author?.fields.name,\n authorSlug: item.fields.author?.fields.slugs,\n categoryId: item.fields.context,\n featuredPhoto: addHttps(item.fields.featuredImage?.fields?.file?.url),\n publishedDate: displayDate,\n } as IContent;\n return new Article(articleContent);\n });\n return articles;\n } catch (err) {\n console.error(err);\n throw new Error('Error fetching articles for Contentful CMS');\n }\n }\n\n /**\n * Get Total Articles Fetches the total number of articles from Contentful CMS\n * by Author\n *\n * @param {string} authorContentID - The content ID of the author\n * @param {number} limit - The number of articles to fetch\n * @param {number} skip - The number of articles to skip\n * @returns {Promise<Article[]>} Promise<Article[]>\n */\n async getArticlesByAuthor(\n authorContentID: number,\n limit?: number,\n skip?: number\n ): Promise<Article[]> {\n try {\n const params = {\n skip: skip?.toString() || '0',\n limit: limit?.toString() || '10',\n author: authorContentID.toString(),\n };\n\n const response = await fetch(\n `${this.path}?${new URLSearchParams(params)}`\n );\n const contentfulData = await response.json();\n const articles: Article[] = contentfulData.items.map(\n (item: ArticleProps) => {\n const displayDate = new Date(item.fields.publishDate);\n const articleContent = {\n title: item.fields.headline,\n slug: item.fields.slugs,\n contentBody: documentToReactComponents(item.fields.copy),\n excerpt: item.fields.excerpt,\n authorName: item.fields.author?.fields.name,\n authorSlug: item.fields.author?.fields.slugs,\n categoryId: item.fields.context,\n featuredPhoto: addHttps(\n item.fields.featuredImage?.fields?.file?.url\n ),\n publishedDate: displayDate,\n } as IContent;\n return new Article(articleContent);\n }\n );\n return articles;\n } catch (err) {\n console.error(err);\n throw new Error('Error fetching articles by author for Contentful CMS');\n }\n }\n\n /**\n * Get Articles By Category Fetches a list of articles from Contentful CMS by\n * Category\n *\n * @param {string} categoryId - The category id of the article\n * @param {number} limit - The number of articles to fetch\n * @param {number} skip - The number of articles to skip\n * @returns {Promise<Article[]>} Promise<Article[]>\n */\n async getArticlesByCategory(\n categoryId: string,\n limit?: number,\n skip?: number\n ): Promise<Article[]> {\n try {\n const params = {\n skip: skip?.toString() || '0',\n limit: limit?.toString() || '10',\n parent: categoryId,\n };\n\n const response = await fetch(\n `${this.path}?${new URLSearchParams(params)}`\n );\n const contentfulData = await response.json();\n const articles: Article[] = contentfulData.items.map(\n (item: ArticleProps) => {\n const displayDate = new Date(item.fields.publishDate);\n const articleContent = {\n title: item.fields.headline,\n slug: item.fields.slugs,\n contentBody: documentToReactComponents(item.fields.copy),\n excerpt: item.fields.excerpt,\n authorName: item.fields.author?.fields.name,\n authorSlug: item.fields.author?.fields.slugs,\n categoryId: item.fields.context,\n featuredPhoto: addHttps(\n item.fields.featuredImage?.fields?.file?.url\n ),\n publishedDate: displayDate,\n } as IContent;\n return new Article(articleContent);\n }\n );\n return articles;\n } catch (err) {\n console.error(err);\n throw new Error('Error fetching articles by category Contentful CMS');\n }\n }\n}\n","/**\n * Builds the complete url for the pet photo object key for search purposes. If\n * the image is already using the CDN it will return the same url. If not it\n * will prepend the CDN url to the image object key\n *\n * @param {string} petPhoto - The pet photo object key\n * @returns {string} - The complete url\n */\nconst generateImageUrlForSearch = (petPhoto: string) => {\n const baseCDN = process.env.NEXT_PUBLIC_CDN_BASE_URL;\n const photoUrl = `${petPhoto}?width=240&height=240&quality=60&format=jpeg`;\n if (baseCDN && petPhoto.includes(baseCDN)) {\n return photoUrl;\n } else {\n return `${baseCDN}/${photoUrl}`;\n }\n};\n\nexport default generateImageUrlForSearch;\n","/**\n * Whether to show the confidence scores from the machine learning model.\n *\n * @returns {boolean} - Whether to show the confidence scores\n */\nexport default function showMLConfidenceScore(): boolean {\n return process.env.NEXT_PUBLIC_SHOW_ML_CONFIDENCE_SCORE === 'true';\n}\n","import { IPetCard } from '@/components/molecules/PetCard/PetCard';\nimport { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IResultsForPagination } from '@/lib/interfaces/pagination';\nimport localDateToUtc from '@/lib/utils/dates/localDateToUtc';\nimport { isDateValid } from '@/lib/utils/helpers/dateHelpers/dates';\nimport generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport generateImageUrlForSearch from '@/lib/utils/helpers/photoHelpers/generateImageUrlForSearch';\nimport showMLConfidenceScore from '@/lib/utils/helpers/photoHelpers/showMLConfidenceScore';\nimport getPetCardFromSearchResult, {\n IPetNextdoorSearchResultItemDTO,\n} from '@/lib/utils/helpers/userPetHelpers/getPetCardFromSearchResult';\n\nimport {\n IPetSearchImageRequestData,\n IPetSearchServiceResponse,\n} from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/petSearch/dto';\n\n/**\n * Interface for Search Result response\n *\n * @interface\n */\nexport interface IGetImageSearchParams extends IPetSearchImageRequestData {\n /** The type of search to perform */\n searchType: 'lost' | 'found' | 'lost-or-found';\n}\n\n/**\n * Interface for Search Result response\n *\n * @interface\n */\nexport interface IImageSearchResultsResponse\n extends IResultsForPagination<IPetCard> {\n /** Data from the search */\n data: IPetCard[];\n /** The requested page */\n page: number;\n}\n\n/**\n * Function to get image search results\n *\n * @param {number} page - The page number to search for\n * @param {IGetImageSearchParams} params - The search data\n * @returns {Promise<IImageSearchResultsResponse>} - This is the result of the\n * search\n */\nexport async function getImageSearchResults(\n page: number,\n params: IGetImageSearchParams\n): Promise<IImageSearchResultsResponse> {\n try {\n const limit = 24;\n /** Calculate the offset */\n const offset = (page - 1) * limit;\n\n const imageUrl = generateImageUrl(params.imageUrl as string);\n\n /**\n * @constant {IPetSearchImageRequestData} searchData - The parameters for\n * the search\n */\n const searchData: IPetSearchImageRequestData = {\n latitude: params.latitude,\n longitude: params.longitude,\n range: params.range as number,\n limit,\n offset,\n species: params.species,\n imageUrl: generateImageUrlForSearch(imageUrl),\n showConfidence: showMLConfidenceScore(),\n includeExternalPosts: params?.includeExternalPosts\n ? params.includeExternalPosts\n : false,\n };\n\n if (params.start && isDateValid(params.start)) {\n searchData.start = localDateToUtc(params.start);\n }\n\n if (params.confidence) {\n searchData.confidence = params.confidence;\n }\n\n /**\n * Make the Search Request\n *\n * @constant {IPetSearchServiceResponse} searchResults - The results from\n * the search\n */\n const searchResults: IPetSearchServiceResponse = await sdk\n .petImageSearch()\n .imageSearch(params.searchType, searchData);\n /**\n * Map the results to the card data\n *\n * @constant {IPetCard[]} cardResults - The results mapped to the card data\n */\n const cardResults: IPetCard[] = searchResults.data.pets.map((result) => {\n /**\n * Append a source of petcolove to the url of the external post if no\n * source is provided\n */\n const source =\n result.pet.type === 'post' && result.pet.source\n ? result.pet.source\n : 'petcolove';\n\n const resultItem: IPetNextdoorSearchResultItemDTO = {\n ...result,\n source,\n url: result.pet.url,\n };\n\n const petCard = getPetCardFromSearchResult(resultItem, params.searchType);\n return petCard;\n });\n return {\n data: cardResults,\n page: page,\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n","import Article from '@/lib/dataSource/content/article';\nimport ContentfulData from '@/lib/dataSource/contentful/contentful-data-source';\n\n/**\n * Get the articles for the pet search\n *\n * @param {string} slugNames - The slug names of the articles\n * @returns {Promise<Article[]>} The articles for the pet search\n */\nexport default async function getArticlesForPage(\n slugNames: string[]\n): Promise<Article[]> {\n const contentfulData = new ContentfulData();\n try {\n const articles = await Promise.all(\n /** Get all promises */\n slugNames.map(\n async (slugName) => await contentfulData.getArticleFromSlug(slugName)\n )\n );\n return articles;\n } catch (error) {\n console.error(error);\n return [];\n }\n}\n","import { ICardArticle } from '@/components/molecules/CardArticle/CardArticle';\nimport getArticlesForPage from '@/lib/dataSource/contentful/getArticlesForPage';\nimport { useEffect, useState } from 'react';\n\n/**\n * Describe the object returned by the useArticles hook\n *\n * @interface IUseArticles\n */\nexport interface IUseArticles {\n /** The article cards to use */\n articleCards: ICardArticle[];\n /** The function to fetch articles */\n fetchArticles: () => Promise<void>;\n}\n\n/**\n * Hook to get the articles by category\n *\n * @param {string[]} articles - The slug names of the articles\n * @returns {IUseArticles} - The article cards to use\n */\nconst useArticles = (articles?: string[]): IUseArticles => {\n /**\n * The article cards for the marketing page\n *\n * @constant {ICardArticle[]} articleCards - The article cards for the found\n * tips page\n */\n const [articleCards, setArticleCards] = useState<ICardArticle[]>([]);\n\n /**\n * Fetch the articles\n *\n * @returns {Promise<void>} - Sets the articles to the hook's state\n */\n const fetchArticles = async (): Promise<void> => {\n const fetchedArticles = await getArticlesForPage(articles ?? []);\n const articleCards = fetchedArticles.map((article) =>\n article.getCardArticle()\n );\n setArticleCards(articleCards);\n };\n\n /** Hook to get the articles on load */\n useEffect(() => {\n fetchArticles();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [articles]);\n\n return { articleCards, fetchArticles };\n};\n\nexport default useArticles;\n","/* eslint-disable react-hooks/exhaustive-deps, jsdoc/tag-lines */\nimport { IResultsForPagination } from '@/lib/interfaces/pagination';\nimport {\n GetNextPageParamFunction,\n InfiniteData,\n useInfiniteQuery,\n UseInfiniteQueryResult,\n} from '@tanstack/react-query';\nimport { useCallback, useMemo, useState } from 'react';\n\n/**\n * This is the options object for the usePagination hook.\n *\n * @template TRequestData,TResponseData\n * @interface\n */\nexport interface IUsePaginationOptions<TRequestData, TResponseData> {\n /**\n * Load the initial page of data when the hook is first called.\n *\n * @type {boolean}\n */\n loadInitial?: boolean;\n /**\n * A callback function to call after the data is fetched.\n *\n * We can use this callback to send analytics once the data is fetched.\n *\n * @param {number} page - The page number that was fetched.\n * @param {TRequestData} params - The request parameters that were used.\n * @param {TResponseData} results - The results from the fetch.\n * @returns {Promise<void>} - A promise that resolves when the callback is\n * done.\n */\n postDataFetchCallback?: (\n params: TRequestData,\n results: TResponseData\n ) => Promise<void>;\n}\n\n/**\n * This is the interface for the usePagination hook.\n *\n * @interface IUsePagination\n */\nexport interface IUsePagination<TResponseData, TResponseDataItem> {\n /** The accumulated data from all pages for display */\n dataForDisplay: TResponseDataItem[];\n /**\n * The function to update the request params\n *\n * @template TRequestData,TResponseData\n * @param {TResponseData} params - The new request params\n * @returns {void} - No return value\n */\n setRequestParams: (params: TResponseData) => void;\n}\n\n/**\n * This is the interface for the query function parameters.\n *\n * @interface IQueryFnParams\n */\ninterface IQueryFnParams {\n /** The page parameter to pass to the query function. */\n pageParam: number;\n}\n\n/**\n * The function to get the next page parameter for tanstack/react-query.\n *\n * It should return null or undefined if there are no more pages to fetch.\n *\n * @param {IResultsForPagination} lastPage - The last page of data.\n * @returns {number | null} - The next page parameter.\n * @see {@link https://tanstack.com/query/latest/docs/framework/react/guides/infinite-queries}\n */\nfunction getNextPageParamFunction<TResponseDataItem>(\n lastPage: IResultsForPagination<TResponseDataItem>\n): number | null {\n /**\n * Whether if the last page exists or not.\n *\n * @constant {boolean} lastPageExists\n */\n const lastPageExists = lastPage?.data;\n /**\n * Whether if the last page is not empty.\n *\n * @constant {boolean} lastPageIsNotEmpty\n */\n const lastPageIsNotEmpty = lastPage?.data.length > 0;\n\n if (lastPageExists && lastPageIsNotEmpty) {\n return lastPage.page + 1;\n }\n // Explicit null return to indicate no more pages\n return null;\n}\n\n/**\n * This is hook to handle pagination for pet searches using tanstack.\n *\n * @example <caption>Example of the usePagination hook to get image search pets </caption> ```typescript\n * const { data, fetchNextPage, hasNextPage, isFetching, refetch, setRequestParams } = usePagination<\n * IGetImageSearchParams, IImageSearchResultsResponse\n * >(\n * petSearchRequestParams, getImageSearchResults, { postDataFetchCallback: sendToAnalytics },\n * );\n * ```typescript\n *\n * @example <caption>Example of the petSearchFunction return type </caption> ```typescript\n * return { data: [...], page: 1 }\n * ```typescript\n *\n * @template TRequestData,TResponseData, TResponseDataItem\n * @param {function(number, TRequestData): Promise<TResponseData>} petSearchFunction\n * - The function that will be used to get the pet search results. It should\n * return a promise that resolves to an object with a data property that\n * is an array of the data for the requested page. It should also return\n * the requested page number as page\n *\n * @param {TRequestData} params - The params to pass to the API call for the pet\n * search.\n * @param {IUsePaginationOptions} options - Optional object options for the\n * hook.\n * @returns {UseInfiniteQueryResult<\n * InfiniteData<TResponseData, unknown>,\n * Error\n * > &\n * IUsePagination<TRequestData>}\n * - The state of the hook.\n */\nexport function usePagination<\n TRequestData,\n TResponseData extends IResultsForPagination<TResponseDataItem>,\n TResponseDataItem = object\n>(\n /**\n * - The function that will be used to get the pet search results. It should\n * return a promise that resolves to an object with a data property that is\n * an array of the data for the requested page. It should also return the\n * requested page number as page\n *\n * @param {number} page - The page number to fetch.\n * @param {TRequestData} params - The data that will be passed to the\n * @returns {Promise<{ data: TResponseData[] }>} - This is a promise that\n * resolves to the data\n */\n petSearchFunction: (\n pageParam: number,\n requestParams: TRequestData\n ) => Promise<TResponseData>,\n params: TRequestData,\n options?: IUsePaginationOptions<TRequestData, TResponseData>\n): UseInfiniteQueryResult<InfiniteData<TResponseData, unknown>, Error> &\n IUsePagination<TRequestData, TResponseDataItem> {\n /**\n * The parameters for the request.\n *\n * @constant {TRequestData} requestParams\n */\n const [requestParams, setRequestParams] = useState<TRequestData>(params);\n\n /**\n * The function to get the next page parameter for tanstack/react-query.\n *\n * It should return null or undefined if there are no more pages to fetch.\n *\n * @param {TResponseData} lastPage - The last page of data.\n * @returns {number | null} - The next page parameter.\n * @see {@link https://tanstack.com/query/latest/docs/framework/react/guides/infinite-queries}\n */\n const getNextPageParam: GetNextPageParamFunction<number, TResponseData> = (\n lastPage: TResponseData\n ): number | null => getNextPageParamFunction<TResponseDataItem>(lastPage);\n\n /**\n * The query function to get the image search results using\n * tanstack/react-query.\n *\n * @param {IQueryFnParams} params - The parameters for the query function.\n * @returns {Promise<TRequestData>} - The search results.\n * @see {@link https://tanstack.com/query/latest/docs/framework/react/guides/infinite-queries}\n */\n const queryFn = useCallback(\n async ({ pageParam }: IQueryFnParams): Promise<TResponseData> => {\n /**\n * The results from the search.\n *\n * @constant {TRequestData} results\n */\n const results = await petSearchFunction(pageParam, requestParams);\n\n // Call the post data fetch callback if it exists with the parameters, the page and the results\n await options?.postDataFetchCallback?.(requestParams, results);\n\n return results;\n },\n [options, petSearchFunction, requestParams]\n );\n\n /**\n * The infinite query object from tanstack/react-query.\n *\n * @constant {UseInfiniteQueryResult<\n * InfiniteData<TRequestData, unknown>,\n * Error\n * >} infiniteQuery\n * @see {@link https://tanstack.com/query/latest/docs/framework/react/guides/infinite-queries}\n */\n const infiniteQuery: UseInfiniteQueryResult<\n InfiniteData<TResponseData, unknown>,\n Error\n > = useInfiniteQuery({\n queryKey: ['petSearch', requestParams, options],\n queryFn,\n initialPageParam: 1,\n getNextPageParam,\n refetchOnWindowFocus: false,\n });\n\n /**\n * The data for display.\n *\n * @constant {TResponseDataItem[]} dataForDisplay\n */\n const dataForDisplay = useMemo(\n () =>\n infiniteQuery.data?.pages.reduce(\n /**\n * Reduce function to combine the data from all pages into a single\n * array for display.\n *\n * @param {TResponseDataItem[]} acc - The accumulator for the reduce\n * function.\n * @param {TRequestData} page - The page of data to add to the\n * accumulator.\n * @returns {TResponseDataItem[]} - The accumulator with all the page\n * data added.\n */\n (\n acc: TResponseDataItem[],\n page: TResponseData\n ): TResponseDataItem[] => [...acc, ...page.data],\n [] as TResponseDataItem[]\n ),\n [infiniteQuery.data]\n );\n\n return {\n ...infiniteQuery,\n dataForDisplay: dataForDisplay\n ? (dataForDisplay as TResponseDataItem[])\n : [],\n setRequestParams,\n };\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"inputSlider\":\"InputSlider_inputSlider__qIxm0\",\"tickMarkDiv\":\"InputSlider_tickMarkDiv__cUKeX\"};"],"names":["__webpack_exports__","Z","param","src","width","quality","concat","fabSideClasses","left","right","center","disabled","side","onClickAction","children","classes","fabClasses","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Button","type","size","variant","color","onClick","className","CardArticle_CardArticle","title","excerpt","image","url","imageClasses","target","loader","jsx_runtime","div","jsxs","Link","href","Image","layout","alt","objectFit","sizes","span","Paragraph","ArticlesDisplay_ArticlesDisplay","articles","buttonLink","AnimateItem","from","translateY","Heading","font","ButtonLink","map","article","index","CardArticle","contentFulImageLoader","updateOffset","loading","ref","inView","useInView","threshold","useEffect","Loading","DateFilter","control","forceDatePickerPopperBottom","InputFieldDateGroup","error","undefined","name","label","LocationFilter","locationError","searchType","InputPlacesGroupGoogle","requiredAddressComponents","autocompleteTypes","PetSpeciesFilter","species","InputButtonGroup","currentValue","onChange","value","options","active","icon","text","PetStatusFilter","register","InputCheckbox","id","htmlFor","tickMarkOffset","currentPosition","tickMarkLength","thumbSize","totalTickMarksFromCenter","offset","difference","amountPerTick","document","documentElement","style","setProperty","progressBarDisplayForWebKit","min","max","InputSlider_InputSlider","tickMarks","initialValue","indexOfInitialValue","indexOf","inputValue","setInputValue","useState","setThumbSize","useWindowSize","length","breakpoint","input","step","parseInt","event","styles","_","visibleTickMarkClasses","position","InputSliderGroup_InputSliderGroup","inputSliderLabel","rest","Controller","render","field","InputSlider","SearchRadiusFilter","searchRadius","InputSliderGroup","searchRadiusOptions","SearchResultsFilterForm_SearchResultsFilterForm","currentValues","content","onSubmit","appliedValues","defaultValues","hiddenFields","search","startOpen","setCollapseFields","disableFormButtons","handleCloseFilterOverlay","updateData","useEventContext","router","useRouter","showResetButton","setShowResetButton","handleSubmit","hookFormHandleSubmit","setValue","useFormContext","petType","useWatch","location","searchRadiusIndex","start","petStatus","data","capitalizeFirstLetter","latitude","coordinates","toString","longitude","method","clickText","currentVsAppliedDiffCount","getFilterDiffCount","debug","currentVsDefaultDiffCount","dateAccordion","header","city","region","postalCode","message","locationAccordion","radiusAccordion","statusAccordion","petTypeAccordion","clsx","button","resetValues","defaultSearchRadiusIndex","pathname","buttons","reset","aria-label","Icon","colorType","colorShade","includes","AccordionFilter","setCollapse","apply","getSearchTypeFromPetStatus","getPetStatusFromSearchType","valueSet1","valueSet2","config","diffCount","petStatusSearch1","petStatusSearch2","NoResults_NoResults","loggedIn","radius","endOfResults","linkHref","linkLabel","linkText","getArticlesSlugNames","articleSlugNames","useSearchParameters","setInitiatingComponent","displayArticles","setArticles","articleCards","useArticles","petListing","encodedUrl","encodedString","getLatestPetListing","shareUrl","useShareReportContext","dispatch","useToastContext","buttonLinkHandler","window","open","fullWidthProps","useMemo","handleToast","toast","persistent","showIcon","copy","imageUrl","process","CircleButton","navigator","clipboard","writeText","then","ul","li","a","FullWidthIllustration","Fragment","Divider","ArticlesDisplay","SearchResultsTemplate_SearchResultsTemplate","geoPoints","photoSearchSpecies","imageObjectKey","ssrLocationObject","address","partner","userType","useUserContext","isOpen","setIsOpen","getData","getPetSearchData","updateEventData","getInitiatingComponent","sentSearchEvent","setSentSearchEvent","isMobile","setAppliedValues","formMethods","useForm","saveSearchParamsToStorage","defaultStorage","getInitialFilterValuesFromStorage","createInitialFilterValuesStorage","searchParameters","initialLocation","petcoLoveHQCoordinates","initialFilterValues","formatDefaultValuesForFilterForms","storageValues","fallbackValues","initialRequest","range","limit","includeExternalPosts","isDateValid","shouldSendStartDate","searchMechanism","sendAnalyticsEvent","useCallback","params","results","flowType","getPetFlowName","petSearchAnalyticsData","getSearchRadius","determineAnalyticsUserType","resultsReturned","component","petSearchEventHandler","petSearchFunction","page","getImageSearchResults","getDistanceSearchResults","dataForDisplay","fetchNextPage","hasNextPage","isFetching","setRequestParams","usePagination","postDataFetchCallback","noResults","shouldDisplayCallout","fullWidthIllustrationProps","sendShareEvent","shareEventHandler","getShareEventDataFromPetListing","updateQueryParams","query","startDate","filters","push","handleFormSubmit","scrollTo","inferredSearchType","petSearchRequestData","convertFiltersToPetSearchRequestData","propertiesForStorage","getHiddenFields","searchResultsFilterFormPropsBase","lostOrFound","summary","distanceUnits","cardCalloutProps","generateImageUrl","String","photoHref","convertQueryForSearchType","headline","loggedOutSearchResultsGridProps","ctaOffset","ctaObjects","CardCallout","props","placement","loggedInSearchResultsGridProps","isMapSearchResultsEnabled","useOptimizelyFeature","flagMapSearchResults","searchSelectorLabels","useGetSearchSelectorLabels","searchSelectorChips","photo","chipIsActive","photoRaw","distance","distanceRaw","microchip","microchipRaw","closeDialog","searchSummary","loadingSpinnerCopy","createAccountFlow","createAccountBase","loginAccountURL","getBasePath","signUpTitle","signUpDescription","signUpURL","signUpText","noResultsText","isPetImageProcessed","clearILostOrFoundPetStorage","FormProvider","PageWrapper","SearchSelector","chips","SearchResultsFilterForm","SignUpCallout","heading","description","searchMethod","determineSearchMethod","NoResults","SearchResultsGrid","showPetStatus","LoadMore","FloatingActionButton","JumpToTopButton","ContentType","ContentStatus","Content","constructor","status","Article","getTitle","getFeaturedPhoto","featuredPhoto","getSlug","slug","getAuthorUrl","authorBasePath","authorSlug","getContent","contentBody","getFormattedPublishedDate","date","Date","publishedDate","toLocaleDateString","year","month","day","getArticleUrl","articlesBasePath","getCardArticle","authorName","categoryId","Published","ContentfulData","getArticleFromSlug","responseItem","response","fetch","path","URLSearchParams","skip","contentfulData","json","items","displayDate","fields","publishDate","articleContent","slugs","documentToReactComponents","author","context","addHttps","featuredImage","file","err","getArticles","parent","item","getArticlesByAuthor","authorContentID","getArticlesByCategory","photoHelpers_generateImageUrlForSearch","baseCDN","photoUrl","petPhoto","searchData","generateImageUrlForSearch","showConfidence","localDateToUtc","confidence","searchResults","sdk","petImageSearch","imageSearch","cardResults","pets","source","result","pet","resultItem","petCard","getPetCardFromSearchResult","getArticlesForPage","slugNames","Promise","all","slugName","articles_useArticles","setArticleCards","fetchArticles","fetchedArticles","requestParams","queryFn","pageParam","infiniteQuery","useInfiniteQuery","queryKey","initialPageParam","getNextPageParam","getNextPageParamFunction","lastPage","lastPageExists","lastPageIsNotEmpty","refetchOnWindowFocus","pages","reduce","acc","module","exports"],"sourceRoot":""}