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ACF,qBClCAmT,EAAAC,OAAA,EAAkB,q0DCAlBD,EAAAC,OAAA,EAAkB","sources":["webpack://_N_E/./public/images/select-chevron-down.svg","webpack://_N_E/./src/components/ClickAwayListener/ClickAwayListener.tsx","webpack://_N_E/./src/constants/images/downArrow.ts","webpack://_N_E/./src/constants/images/greyCarImg.ts","webpack://_N_E/./src/features/ymme/api/getYmmeEngines.ts","webpack://_N_E/./src/features/ymme/api/getYmmeMakes.ts","webpack://_N_E/./src/features/ymme/api/getYmmeModels.ts","webpack://_N_E/./src/features/ymme/api/getYmmeYears.ts","webpack://_N_E/./src/features/ymme/api/postVehicles.ts","webpack://_N_E/./src/features/ymme/components/YMMESelectComp/AutoCompleteItems.tsx","webpack://_N_E/./src/features/ymme/components/YMMESelectComp/AutoComplete.tsx","webpack://_N_E/./src/features/ymme/components/YMMESelectComp/YmmeSelectRender.tsx","webpack://_N_E/./src/features/ymme/components/YMMESelectComp/index.tsx","webpack://_N_E/./src/features/ymme/utils/findListItemByLabel.ts","webpack://_N_E/./src/features/ymme/utils/useYmmeDefaultData.ts","webpack://_N_E/./src/features/ymme/components/YMMEContentBlock.module.scss","webpack://_N_E/./src/features/ymme/components/YMMESelectComp/AutoComplete.module.scss","webpack://_N_E/"],"sourcesContent":["var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport * as React from \"react\";\nconst SvgSelectChevronDown = props => /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 25,\n height: 14,\n viewBox: \"0 0 25 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"m2.213 0 10.162 9.405L22.537 0l2.213 2.047L12.375 13.5 0 2.047 2.213 0Z\"\n})));\nexport default SvgSelectChevronDown;","/**\n * Copyright 2021 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\n/**\n * Ported from @material-ui/core@5.0.1\n */\n\nimport * as React from 'react';\nimport { ownerDocument } from '../../utils/ownerDocument';\nimport { useEventCallback } from '../../hooks/useEventCallback';\nimport { useForkRef } from '@/hooks/useForkRef';\n\n// TODO: return `EventHandlerName extends `on${infer EventName}` ? Lowercase : never` once generatePropTypes runs with TS 4.1\nfunction mapEventPropToEvent(\n eventProp: ClickAwayMouseEventHandler | ClickAwayTouchEventHandler\n): 'click' | 'mousedown' | 'mouseup' | 'touchstart' | 'touchend' | string {\n return eventProp.substring(2).toLowerCase();\n}\n\nfunction clickedRootScrollbar(event: MouseEvent, doc: Document) {\n return (\n doc.documentElement &&\n (doc.documentElement.clientWidth < event.clientX ||\n doc.documentElement.clientHeight < event.clientY)\n );\n}\n\ntype ClickAwayMouseEventHandler = 'onClick' | 'onMouseDown' | 'onMouseUp';\ntype ClickAwayTouchEventHandler = 'onTouchStart' | 'onTouchEnd';\n\ntype Props = {\n /**\n * The wrapped element.\n */\n children: React.ReactElement;\n /**\n * If `true`, the React tree is ignored and only the DOM tree is considered.\n * This prop changes how portaled elements are handled.\n */\n disableReactTree?: boolean;\n /**\n * The mouse event to listen to. You can disable the listener by providing `false`.\n */\n mouseEvent?: 'onClick' | 'onMouseDown' | 'onMouseUp' | false;\n /**\n * Callback fired when a \"click away\" event is detected.\n */\n onClickAway: Function;\n /**\n * The touch event to listen to. You can disable the listener by providing `false`.\n */\n touchEvent?: 'onTouchEnd' | 'onTouchStart' | false;\n};\n\n/**\n * Listen for click events that occur somewhere in the document, outside of the element itself.\n * For instance, if you need to hide a menu when people click anywhere else on your page.\n */\nexport function ClickAwayListener(props: Props) {\n const {\n children,\n disableReactTree = false,\n mouseEvent = 'onClick',\n onClickAway,\n touchEvent = 'onTouchEnd',\n } = props;\n const movedRef = React.useRef(false);\n const nodeRef = React.useRef(null);\n const activatedRef = React.useRef(false);\n const syntheticEventRef = React.useRef(false);\n\n React.useEffect(() => {\n // Ensure that this component is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n setTimeout(() => {\n activatedRef.current = true;\n }, 0);\n return () => {\n activatedRef.current = false;\n };\n }, []);\n\n const handleRef = useForkRef(\n // @ts-expect-error TODO upstream fix\n children.ref,\n nodeRef\n );\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n const handleClickAway = useEventCallback((event: MouseEvent | TouchEvent) => {\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false;\n\n const doc = ownerDocument(nodeRef.current);\n\n // 1. IE11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n if (\n !activatedRef.current ||\n !nodeRef.current ||\n ('clientX' in event && clickedRootScrollbar(event as any as MouseEvent, doc))\n ) {\n return;\n }\n\n // Do not act if user performed touchmove\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n\n let insideDOM; // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n insideDOM =\n // @ts-expect-error refine type\n !doc.documentElement?.contains(event.target) ||\n // @ts-expect-error refine type\n nodeRef.current?.contains(event.target);\n }\n\n if (!insideDOM && (disableReactTree || !insideReactTree)) {\n onClickAway(event);\n }\n });\n\n // Keep track of mouse/touch events that bubbled up through the portal.\n const createHandleSynthetic =\n (handlerName: string) => (event: React.MouseEvent | React.TouchEvent) => {\n syntheticEventRef.current = true;\n const childrenPropsHandler = children.props[handlerName];\n\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n\n const childrenProps: {\n onTouchEnd?: React.TouchEventHandler;\n onTouchStart?: React.TouchEventHandler;\n onClick?: React.MouseEventHandler;\n onMouseDown?: React.MouseEventHandler;\n onMouseUp?: React.MouseEventHandler;\n ref: React.Ref;\n } = {\n ref: handleRef,\n };\n\n if (touchEvent !== false) {\n childrenProps[touchEvent] = createHandleSynthetic(touchEvent);\n }\n\n React.useEffect(() => {\n if (touchEvent !== false) {\n const mappedTouchEvent = mapEventPropToEvent(touchEvent);\n const doc = ownerDocument(nodeRef.current);\n\n const handleTouchMove = () => {\n movedRef.current = true;\n };\n\n doc.addEventListener(mappedTouchEvent, handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n\n return () => {\n doc.removeEventListener(mappedTouchEvent, handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n\n return undefined;\n }, [handleClickAway, touchEvent]);\n\n if (mouseEvent !== false) {\n childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);\n }\n\n React.useEffect(() => {\n if (mouseEvent !== false) {\n const mappedMouseEvent = mapEventPropToEvent(mouseEvent);\n const doc = ownerDocument(nodeRef.current);\n\n doc.addEventListener(mappedMouseEvent, handleClickAway);\n\n return () => {\n doc.removeEventListener(mappedMouseEvent, handleClickAway);\n };\n }\n\n return undefined;\n }, [handleClickAway, mouseEvent]);\n\n return <>{React.cloneElement(children, childrenProps)};\n}\n","/**\n * Copyright 2021 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nexport const downArrow = {\n src: '/images/down-arrow.svg',\n alt: '',\n};\n","/**\n * Copyright 2021 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nexport const greyCarImg = {\n src: '/images/vehicle/gray.svg',\n alt: '',\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { getAxios } from '@/lib/axios';\nimport { type VehicleEnginesResponse, type YmmeDropdownData } from '../interface';\nimport type { Country, CustomerType, SalesChannel } from '@/types';\nimport { type AxiosInstance } from 'axios';\nimport { useLocale } from '@/hooks/useLocale';\nimport type { Locale } from '@/types/i18n';\nimport { getCountryFromLocale } from '@/utils/getCountryFromLocale';\nimport { createQuery } from '@/utils/createReactQuery';\nimport { showXMPreviewDate } from '@/utils/showXMPreviewDate';\n\ntype EnginesQueryOptions = {\n locale: Locale;\n vehicleMakeName: string | null | undefined;\n vehicleModelName: string | null | undefined;\n vehicleYear: string | null | undefined;\n modelId: string | null | undefined;\n category: 'engines';\n preview: boolean;\n};\n\nconst URL = `${requestBaseURL}/external/product-discovery/vehicle-identification/v1/vehicle-engines`;\n\nconst { useData: useVehicleEngines } = createQuery(\n 'ymme',\n async (options, axiosInstance) => getYmmeEngines({ ...options }, axiosInstance)\n);\n\nconst getYmmeEngines = async (options: EnginesQueryOptions, axiosInstance?: AxiosInstance) => {\n const { vehicleYear, vehicleMakeName, vehicleModelName, modelId, locale, preview } = options;\n\n const country = getCountryFromLocale(locale);\n const customerType = 'B2C';\n const salesChannel = 'ECOMM';\n\n if (!modelId) {\n throw new Error('modelId is required');\n }\n\n if (!vehicleMakeName) {\n throw new Error('vehicleMakeName is required');\n }\n\n if (!vehicleModelName) {\n throw new Error('vehicleModelName is required');\n }\n\n if (!vehicleYear) {\n throw new Error('vehicleYear is required');\n }\n\n const params: {\n country: Country;\n customerType: CustomerType;\n salesChannel: SalesChannel;\n vehicleMakeName: string;\n vehicleModelName: string;\n vehicleYear: string;\n preview: boolean;\n } = {\n country,\n customerType,\n salesChannel,\n vehicleMakeName,\n vehicleModelName,\n vehicleYear,\n preview,\n };\n\n const response = await getAxios(axiosInstance).get(URL, {\n params,\n });\n return getVehicleEnginesSelector(response.data);\n};\n\nconst getVehicleEnginesSelector = (data: VehicleEnginesResponse): YmmeDropdownData => {\n return data.map((item) => ({\n // v2 useVehiclesMutation only accepts vehicleId\n // additionally, v1 engines api would return vehicleIds as engineIds\n // e.g. /ecomm/b2c/v1/ymme/engines/9849980\n // We do not actually use 4-digit engine IDs anywhere\n value: item.azVehicleId,\n label: item.azVehicleEngineName,\n }));\n};\n\ntype UseYmmeEnginesOptions = {\n enabled?: boolean;\n vehicleMakeName: string | null | undefined;\n vehicleModelName: string | null | undefined;\n vehicleYear: string | undefined;\n modelId: string | null | undefined;\n};\n\nexport const useYmmeEngines = ({ enabled, ...options }: UseYmmeEnginesOptions) => {\n const locale = useLocale();\n\n return useVehicleEngines({\n ...options,\n enabled,\n locale,\n\n category: 'engines',\n cacheTime: 0,\n preview: showXMPreviewDate(),\n });\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { getAxios } from '@/lib/axios';\nimport { type VehicleMakesResponse, type YmmeDropdownData } from '../interface';\nimport { useLocale } from '@/hooks/useLocale';\nimport type { Locale } from '@/types/i18n';\nimport { createQuery } from '@/utils/createReactQuery';\nimport { getCountryFromLocale } from '@/utils/getCountryFromLocale';\nimport { type AxiosInstance } from 'axios';\nimport { showXMPreviewDate } from '@/utils/showXMPreviewDate';\n\nconst URL = `${requestBaseURL}/external/product-discovery/vehicle-identification/v1/vehicle-makes`;\n\ntype Options = {\n category: 'makes';\n locale: Locale;\n vehicleYear: string;\n preview: boolean;\n};\n\nconst { useData: useVehicleMakes } = createQuery(\n 'ymme',\n async (options, axiosInstance) => getYmmeMakes({ ...options }, axiosInstance)\n);\n\nconst getYmmeMakes = async (options: Options, axiosInstance?: AxiosInstance) => {\n const { locale, vehicleYear, preview } = options;\n const country = getCountryFromLocale(locale);\n\n const customerType = 'B2C';\n const salesChannel = 'ECOMM';\n\n const response = await getAxios(axiosInstance).get(`${URL}`, {\n params: {\n country,\n customerType,\n salesChannel,\n vehicleYear,\n preview,\n },\n });\n return newSelector(response.data);\n};\n\nconst newSelector = (data: VehicleMakesResponse): YmmeDropdownData => {\n return data.map((item) => ({\n value: item.vehicleMakeName,\n label: item.vehicleMakeName,\n }));\n};\n\ntype UseYmmeMakesOptions = {\n vehicleYear?: string;\n enabled?: boolean;\n};\n\nexport const useYmmeMakes = ({ vehicleYear, enabled }: UseYmmeMakesOptions) => {\n const locale = useLocale();\n\n return useVehicleMakes({\n enabled,\n category: 'makes',\n locale,\n vehicleYear: vehicleYear ?? '',\n\n preview: showXMPreviewDate(),\n });\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { getAxios } from '@/lib/axios';\nimport { type VehicleModelsResponse, type YmmeDropdownData } from '../interface';\nimport { useLocale } from '@/hooks/useLocale';\nimport type { Locale } from '@/types/i18n';\nimport { getCountryFromLocale } from '@/utils/getCountryFromLocale';\nimport { createQuery } from '@/utils/createReactQuery';\nimport { type AxiosInstance } from 'axios';\nimport { showXMPreviewDate } from '@/utils/showXMPreviewDate';\n\nconst URL = `${requestBaseURL}/external/product-discovery/vehicle-identification/v1/vehicle-models`;\n\ntype ModelsQueryOptions = {\n locale: Locale;\n vehicleYear: string | undefined;\n vehicleMakeName: string | undefined;\n preview: boolean;\n category: 'models';\n};\n\nconst { useData: useVehicleModels } = createQuery(\n 'ymme',\n async (options, axiosInstance) => getYmmeModels({ ...options }, axiosInstance)\n);\n\nconst getYmmeModels = async (options: ModelsQueryOptions, axiosInstance?: AxiosInstance) => {\n const { locale, vehicleYear, vehicleMakeName, preview } = options;\n const country = getCountryFromLocale(locale);\n\n const customerType = 'B2C';\n const salesChannel = 'ECOMM';\n\n if (!vehicleMakeName) {\n throw new Error('vehicleMakeName is required');\n }\n\n const response = await getAxios(axiosInstance).get(`${URL}`, {\n params: {\n country,\n customerType,\n salesChannel,\n vehicleYear,\n vehicleMakeName,\n preview,\n },\n });\n return newSelector(response.data);\n};\n\nconst newSelector = (data: VehicleModelsResponse): YmmeDropdownData => {\n return data.listOfModels.map((item) => ({\n value: item,\n label: item,\n }));\n};\n\ntype UseYmmeModelsOptions = {\n vehicleYear?: string;\n vehicleMakeName?: string;\n enabled: boolean;\n};\n\nexport const useYmmeModels = ({ vehicleYear, vehicleMakeName, enabled }: UseYmmeModelsOptions) => {\n const locale = useLocale();\n\n return useVehicleModels({\n enabled,\n locale,\n vehicleYear,\n vehicleMakeName,\n category: 'models',\n preview: showXMPreviewDate(),\n });\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { getAxios } from '@/lib/axios';\nimport { cache } from '@/utils/serverQueryCache';\nimport { type AxiosInstance } from 'axios';\nimport { type QueryClient } from '@tanstack/react-query';\nimport { type VehicleYearsResponse, type YmmeDropdownData } from '../interface';\nimport { useLocale } from '@/hooks/useLocale';\nimport type { Locale } from '@/types/i18n';\nimport { getCountryFromLocale } from '@/utils/getCountryFromLocale';\nimport { createQuery } from '@/utils/createReactQuery';\nimport { showXMPreviewDate } from '@/utils/showXMPreviewDate';\n\ntype YearsQueryOptions = {\n locale: Locale;\n preview: boolean;\n category: 'years';\n};\n\nconst URL = `${requestBaseURL}/external/product-discovery/vehicle-identification/v1/vehicle-years`;\n\nconst {\n query: vehicleYearsQuery,\n useData: useVehicleYears,\n prefetch: prefetchVehicleYears,\n} = createQuery('ymme', async (options, axiosInstance) =>\n getYmmeYears(options, axiosInstance)\n);\n\nconst getYmmeYears = async (options: YearsQueryOptions, axiosInstance?: AxiosInstance) => {\n const { locale, preview } = options;\n\n const country = getCountryFromLocale(locale);\n const customerType = 'B2C';\n const salesChannel = 'ECOMM';\n const vehicleMakeName = undefined;\n const vehicleModelName = undefined;\n\n const response = await getAxios(axiosInstance).get(URL, {\n params: {\n country,\n customerType,\n salesChannel,\n vehicleMakeName,\n vehicleModelName,\n preview,\n },\n withCredentials: false,\n });\n return getVehicleYearsSelector(response.data);\n};\n\nconst getVehicleYearsSelector = (data: VehicleYearsResponse): YmmeDropdownData => {\n return data.map((item) => ({ value: item.vehicleYear, label: item.vehicleYear }));\n};\n\nexport const useYmmeYears = () => {\n const locale = useLocale();\n\n return useVehicleYears({\n locale,\n category: 'years',\n staleTime: Infinity,\n preview: showXMPreviewDate(),\n });\n};\n\nexport const prefetchYmmeYears = async (\n queryClient: QueryClient,\n locale: Locale,\n axiosInstance: AxiosInstance,\n preview: boolean\n) => {\n const options = {\n locale,\n preview,\n category: 'years',\n } as const;\n\n const queryKey = vehicleYearsQuery.getFullKey(options);\n\n const data = cache.getItem(queryKey);\n if (data) {\n queryClient.setQueryData(queryKey, data);\n return;\n }\n\n await prefetchVehicleYears(queryClient, options, axiosInstance);\n\n const prefetchedData = queryClient.getQueryData(queryKey);\n\n prefetchedData && cache.setItem(queryKey, prefetchedData);\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { requestBaseURL } from '@/config/serviceAPI';\nimport { getHeaderDataFromCache, HEADER_PRIMARY_KEY } from '@/features/header/api/getHeader';\nimport { getPreferredVehicle } from '@/features/header/utils/getPreferredVehicle';\nimport { getAxios } from '@/lib/axios';\nimport { type AxiosInstance } from 'axios';\nimport { useMutation, useQueryClient, type QueryClient } from '@tanstack/react-query';\nimport { type YmmeVehicleResponse } from '../interface';\nimport { setPreferredVehicleCookies } from '@/utils/analytics/dataLayer/preferredVehicleCookies';\nimport { getKey as getVehiclesKey, selector as getVehiclesSelector } from './getVehicles';\nimport { useRouter } from 'next/router';\nimport { stringifyUrl, parseUrl } from '@/utils/urlHelpers';\nimport type { Locale } from '@/types/i18n';\nimport { dispatchEvent } from '@/utils/eventPublisher';\nimport { useGlobalState } from '@/hooks/useGlobalState';\nimport { usePreferredVehicle } from '@/features/header/hooks/usePreferredVehicle';\nimport { sessionStorage } from '@/utils/sessionStorage';\n\nconst URL = `${requestBaseURL}/ecomm/b2c/v2/currentUser/vehicles`;\n\nconst postVehicles = async (\n options: {\n vehicleId: string | undefined;\n previousVehicleID?: string;\n },\n axiosInstance?: AxiosInstance\n) => {\n const { vehicleId, previousVehicleID } = options;\n const response = await getAxios(axiosInstance).post(URL, {\n vehicleId,\n });\n if (previousVehicleID) {\n sessionStorage.setItem('previousPreferredVehicleId', previousVehicleID);\n }\n return getVehiclesSelector(response.data);\n};\n\nexport const getKey = () => ['user', 'vehicles'];\n\ntype Variables = {\n vehicleId: string;\n isLicensePlateRequest?: boolean;\n};\n\ntype MutationOptions = {\n onSuccess?: (data: YmmeVehicleResponse) => void;\n};\n\nconst onVehiclesSuccess = async (queryClient: QueryClient, data: YmmeVehicleResponse) => {\n queryClient.setQueryData(getVehiclesKey(), data);\n await queryClient.refetchQueries([HEADER_PRIMARY_KEY]);\n\n const headerData = getHeaderDataFromCache(queryClient);\n const preferredVehicle = getPreferredVehicle(headerData);\n\n if (preferredVehicle) {\n setPreferredVehicleCookies({\n vehicleYear: preferredVehicle.year,\n vehicleMake: preferredVehicle.make,\n vehicleModel: preferredVehicle.model,\n vehicleEngine: preferredVehicle.engine,\n vehicleId: preferredVehicle.catalogVehicleId,\n });\n }\n};\n\nexport const useVehiclesMutation = ({ onSuccess }: MutationOptions = {}) => {\n const queryClient = useQueryClient();\n const router = useRouter();\n const [, setSearchState] = useGlobalState('search');\n const previousPreferredVehicle = usePreferredVehicle();\n const previousVehicleID = previousPreferredVehicle?.catalogVehicleId ?? '0';\n\n return useMutation({\n mutationFn: ({ vehicleId }: Variables) => postVehicles({ vehicleId, previousVehicleID }),\n mutationKey: getKey(),\n onSuccess: (data: YmmeVehicleResponse) => {\n setSearchState({\n preferredVehicleChanged: true,\n });\n onSuccess?.(data);\n void onVehiclesSuccess(queryClient, data);\n if (router.query.currentPage || router.query.pageNumber) {\n const { url, query } = parseUrl(router.asPath);\n delete query.pageNumber;\n delete query.currentPage;\n\n const newPathName = stringifyUrl({\n url,\n query,\n });\n\n void router.push(newPathName);\n }\n dispatchEvent('preferredVehicleUpdated', { vehicleSet: true });\n },\n });\n};\n\nexport const mutateVehicles = async (\n queryClient: QueryClient,\n options: { vehicleId: string; locale: Locale },\n axiosInstance?: AxiosInstance\n) => {\n const data = await postVehicles(options, axiosInstance);\n await onVehiclesSuccess(queryClient, data);\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\nimport azCommonStyles from '@/theme/globals.module.scss';\nimport autoCompleteStyles from './AutoComplete.module.scss';\nimport { type Item, type AutoCompleteItemsProps } from './types';\nimport cx from 'classnames';\nimport React from 'react';\n\nexport const AutoCompleteItems = React.forwardRef(\n function AutoCompleteItems(props, ref) {\n const {\n showMenu,\n filteredList,\n listScrollHandler,\n selectedItem,\n handleItemClick,\n onMouseDown,\n onMouseUp,\n id,\n onKeyDown,\n } = props;\n\n if (!showMenu || filteredList.length === 0) {\n return null;\n }\n\n return (\n \n
    \n {filteredList.map((listItem: Item, index: number) => {\n const suggestionStyle =\n selectedItem === listItem.label ? autoCompleteStyles.activeItem : '';\n const isLabel = listItem.isLabel ? autoCompleteStyles.labelItem : '';\n\n return (\n \n !listItem.isLabel && handleItemClick(listItem.label)}\n onMouseDown={onMouseDown}\n onMouseUp={onMouseUp}\n className={cx(\n azCommonStyles['az-body-2-regular'],\n autoCompleteStyles.listItem,\n suggestionStyle,\n isLabel\n )}\n onKeyDown={onKeyDown}\n disabled={listItem.isLabel}\n >\n {listItem.label}\n \n \n );\n })}\n
\n \n );\n }\n);\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\nimport { Button } from '@/components/Button';\nimport { ClickAwayListener } from '@/components/ClickAwayListener/ClickAwayListener';\nimport { FormControl } from '@/components/FormControl/FormControl';\nimport { Input } from '@/components/Input/Input';\nimport { InputLabel } from '@/components/InputLabel/InputLabel';\nimport { Select as NativeSelect } from '@/components/Select/Select';\nimport { eventConstants } from '@/constants/event';\nimport cx from 'classnames';\nimport * as React from 'react';\nimport autoCompleteStyles from './AutoComplete.module.scss';\nimport iconStyles from '@/theme/iconStyles.module.scss';\nimport SelectDownArrowIcon from '@/public/images/select-chevron-down.svg';\nimport { isMobile } from '@/utils/common';\nimport { useRef, useState, useEffect, useCallback } from 'react';\nimport { useMediaQuery } from '@/hooks/useMediaQuery';\nimport { AutoCompleteItems } from './AutoCompleteItems';\nimport { type Props, type Item } from './types';\nimport usePrevious from '@/utils/usePrevious';\n\nconst constants = {\n shopByMake: 'shopByMake',\n make: 'Make',\n year: 'Year',\n};\n\nconst compareArrays = (array1: Item[], array2: Item[]) => {\n let arrayComp = false;\n if (array1.length === array2.length) {\n arrayComp = array1.every((a, index) => a.value === array2[index].value);\n }\n return arrayComp;\n};\n\ntype IconProps = {\n className: string;\n};\nconst Icon = ({ className }: IconProps) => {\n return (\n \n );\n};\n\nexport default function AutoComplete(props: Props) {\n const textInput = useRef(null);\n const autoCompleteItemRef = useRef(null);\n const [showMenu, setShowMenu] = useState(false);\n const [textInputDirty, setTextInputDirty] = useState(false);\n const [focusedListItem, setFocusedListItem] = useState(false);\n const [cursor, setCursor] = useState(null);\n const [tempValue, setTempValue] = useState('');\n const [filteredList, setFilteredList] = useState(() => {\n return props.list || [];\n });\n const [prevList, setPrevList] = useState([]);\n const [isReadOnly, setIsReadOnly] = useState(false);\n const {\n label,\n disabled,\n labelNumber,\n selectedItem = '',\n name,\n id,\n handleClick,\n maxLength,\n resetAll,\n resetFocus,\n focusElement,\n list,\n } = props;\n\n const ariaLabel = `${name} arrow`;\n const matchesMobile = useMediaQuery((theme) => theme.breakpoints.down('sm'));\n const labelName =\n !selectedItem && !showMenu && labelNumber ? `${labelNumber} | ${label ?? ''}` : label;\n const arrowButtonClass = showMenu\n ? autoCompleteStyles.arrowUpPosition\n : autoCompleteStyles.arrowDownPosition;\n const prevFocusElement = usePrevious(focusElement);\n const prevListLength = usePrevious(list.length);\n const handleScrollTop = useCallback(() => {\n const highlightOffset = -2;\n let elementIdx;\n if (cursor === null) elementIdx = highlightOffset;\n else if (cursor >= filteredList.length) elementIdx = filteredList.length - 1;\n else if (cursor + highlightOffset <= 0) elementIdx = 0;\n else elementIdx = cursor + highlightOffset;\n\n const elementId = `#filterListItem${elementIdx}`;\n const element = document.querySelector(elementId);\n const scrollTo =\n element && element instanceof HTMLElement\n ? element.offsetTop\n : ((cursor ?? 0) - highlightOffset) * 37;\n if (autoCompleteItemRef.current) {\n autoCompleteItemRef.current.scrollTop = !cursor ? 0 : scrollTo;\n }\n }, [cursor, filteredList]);\n\n const handleFocus = useCallback(() => {\n if (textInput.current) {\n textInput.current.focus();\n }\n if (!showMenu) {\n setShowMenu(true);\n handleScrollTop();\n }\n }, [showMenu, handleScrollTop]);\n\n useEffect(() => {\n setIsReadOnly(isMobile());\n }, []);\n\n useEffect(() => {\n handleScrollTop();\n }, [cursor, handleScrollTop]);\n\n useEffect(() => {\n if (\n !disabled &&\n focusElement &&\n (prevFocusElement !== focusElement || prevListLength !== list.length)\n ) {\n setTimeout(() => {\n //mobile safari has weird focus behavior need timeout to get around it\n handleFocus();\n }, 100);\n }\n }, [focusElement, disabled, prevFocusElement, handleFocus, list.length, prevListLength]);\n\n useEffect(() => {\n if (!compareArrays(prevList, list)) {\n setPrevList(list);\n setFilteredList(list);\n }\n }, [list, prevList]);\n\n const filterList = (searchText: string): Item[] => {\n return list.filter(\n (listItem: Item) =>\n !listItem.isLabel &&\n !listItem.isPopular &&\n listItem.label.toUpperCase().includes(searchText.toUpperCase())\n );\n };\n\n const handleChange = (event: React.ChangeEvent, isMobile?: boolean) => {\n const searchData = event.target.value;\n const searchText = label === constants.year ? searchData.replace(/[^0-9]+/g, '') : searchData;\n const trimmedSearchText = searchText ? searchText.slice(0, maxLength) : searchText;\n\n if (!isMobile) {\n setTempValue(trimmedSearchText);\n if (!textInputDirty) {\n setTextInputDirty(true);\n }\n }\n\n if (searchText.length > 0) {\n setFilteredList(filterList(trimmedSearchText));\n } else {\n if (resetAll) {\n resetAll();\n } else {\n handleClick('');\n setTempValue('');\n }\n setFilteredList(list);\n }\n };\n\n const handleMobileSelect = (event: React.ChangeEvent) => {\n event.target.blur();\n if (event.target.value) {\n handleClick(event.target.value);\n }\n handleChange(event, true);\n };\n\n const handleBlur: () => void = () => {\n resetFocus(); //TODO: manage focus via refs instead of state\n if (!focusedListItem && textInputDirty) {\n selectItemOnBlur();\n setTextInputDirty(false);\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n const filteredListLength = filteredList.length;\n let searchedItem = null;\n\n if (\n e.key === eventConstants.arrowUpKeyType ||\n (e.key === eventConstants.arrowDownKeyType && filteredListLength > 0)\n ) {\n e.preventDefault();\n if (e.key === eventConstants.arrowUpKeyType && (!cursor || cursor > 0)) {\n const newCursor = !cursor ? 0 : cursor - 1;\n setCursor(newCursor);\n searchedItem = filteredList[newCursor];\n setTempValue(searchedItem.label || '');\n setTextInputDirty(true);\n } else if (\n e.key === eventConstants.arrowDownKeyType &&\n (cursor == null || cursor <= filteredListLength - 1)\n ) {\n let newCursor;\n if (cursor === null) {\n newCursor = 0;\n } else if (cursor + 1 === filteredListLength) {\n newCursor = cursor;\n } else {\n newCursor = cursor + 1;\n }\n setCursor(newCursor);\n searchedItem = filteredList[newCursor];\n setTempValue(searchedItem.label || '');\n setTextInputDirty(true);\n }\n } else if (e.keyCode === eventConstants.enterKeyCode && e.key === eventConstants.enterKeyType) {\n searchedItem = filteredList[cursor ?? 0];\n if (searchedItem) {\n handleItemClick(searchedItem.label);\n }\n } else if (e.keyCode === eventConstants.escKeyCode && e.key === eventConstants.escKeyType) {\n resetFocus();\n setShowMenu(false);\n }\n };\n\n const handleEscapeKeyDown = (e: React.KeyboardEvent) => {\n if (e.keyCode === eventConstants.escKeyCode && e.key === eventConstants.escKeyType) {\n resetFocus();\n setShowMenu(false);\n }\n };\n\n const handleItemClick = (value: string) => {\n handleClick(value);\n setTempValue('');\n hideMenu();\n };\n\n const handleArrowClick = () => {\n if (!disabled) {\n setShowMenu(!showMenu);\n !showMenu ? textInput.current?.focus() : textInput.current?.blur();\n }\n };\n\n const hideMenu = () => {\n setShowMenu(false);\n };\n\n const listScrollHandler = () => {\n if (textInput.current) {\n textInput.current.focus();\n }\n };\n\n const selectItemOnBlur = () => {\n let value = '';\n const selectedItemLowerCase = selectedItem.toLowerCase() || tempValue.toLowerCase();\n const matchedItem = filteredList.find(\n (listItem) => listItem.label.toLowerCase() === selectedItemLowerCase\n );\n\n if (matchedItem) {\n value = matchedItem.label;\n } else if (filteredList.length === 1) {\n value = filteredList[0].label;\n } else {\n setFilteredList(list);\n if (resetAll) {\n resetAll();\n }\n }\n\n handleItemClick(value);\n };\n\n if (matchesMobile) {\n return (\n \n \n {list.map((item) => (\n \n {item.label}\n \n ))}\n \n );\n } else {\n return (\n <>\n \n
\n \n \n \n {labelName}\n \n \n \n \n \n {\n setFocusedListItem(true);\n }}\n onMouseUp={() => {\n setFocusedListItem(false);\n }}\n onKeyDown={handleEscapeKeyDown}\n id={id}\n />\n
\n
\n \n );\n }\n}\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { Grid } from '@/components/Grid';\nimport Image from '@/components/NextImage';\nimport { downArrow } from '@/constants/images/downArrow';\nimport { greyCarImg } from '@/constants/images/greyCarImg';\nimport { useLabel } from '@/hooks/useLabels';\nimport azCommonStyles from '@/theme/globals.module.scss';\nimport cx from 'classnames';\nimport React, { useMemo } from 'react';\nimport { type YmmeDropdownData } from '../../interface';\nimport styleYmme from '../YMMEContentBlock.module.scss';\nimport AutoCompleteComponent from './AutoComplete';\nimport { type UseQueryResult } from '@tanstack/react-query';\nimport { useFeatureFlag } from '@/features/globalConfig';\nimport { type Item } from './types';\n\ntype RenderProps = {\n dataSource: Array>;\n focusEngine: boolean;\n focusMake: boolean;\n focusModel: boolean;\n focusYear: boolean;\n pageType: string;\n selectedEngine: string | undefined;\n selectedMake: string | undefined;\n selectedModel: string | undefined;\n selectedYear: string | undefined;\n selectEngine: (a: string) => void;\n selectLabels?: {\n first: string;\n second: string;\n third: string;\n fourth: string;\n };\n forMMYE?: boolean;\n selectMake: (a: string) => void;\n selectModel: (a: string) => void;\n selectYear: (a: string) => void;\n showYmmeMobile?: () => void;\n resetAll?: () => void;\n forceMobile?: boolean;\n enablePrefilledData?: boolean;\n resetFocus: () => void;\n};\n\nconst labelMap = {\n lblYear: 'label_YMME_Body_Year',\n lblMake: 'label_YMME_Body_Make',\n lblModel: 'label_YMME_Body_Model',\n lblEngine: 'label_YMME_Body_Engine',\n lblAddvehicle: 'hyperlink_ShelfPage_body_AddAVehicle',\n lblPopularMakes: 'label_popular_makes',\n lblAllMakes: 'label_All_Makes',\n};\n\nconst MobileToggle = ({ showYmmeMobile }: { showYmmeMobile?: React.MouseEventHandler }) => {\n const addVehicleLabel = useLabel(labelMap.lblAddvehicle);\n\n return (\n \n \n {addVehicleLabel}\n \n \n );\n};\n\nconst YmmeSelectRender = ({\n dataSource,\n pageType,\n selectedEngine,\n selectedMake,\n selectedModel,\n selectedYear,\n selectEngine,\n selectLabels,\n selectMake,\n selectModel,\n selectYear,\n showYmmeMobile,\n focusYear,\n focusMake,\n focusModel,\n focusEngine,\n resetAll,\n forMMYE = false,\n forceMobile = false,\n enablePrefilledData,\n resetFocus,\n}: RenderProps) => {\n const makeQuery = dataSource[1];\n const modelQuery = dataSource[2];\n const disableMake =\n !makeQuery.isLoading && enablePrefilledData\n ? (!makeQuery.data?.length && !selectedMake) || !selectedYear\n : !selectedYear;\n const disableModel =\n !modelQuery.isLoading && enablePrefilledData\n ? (!modelQuery.data?.length && !selectedModel) || !selectedYear\n : !selectedMake || !selectedYear;\n const disableEngine = !selectedYear || !selectedMake || !selectedModel;\n const engineLabel = useLabel(labelMap.lblEngine);\n const makeLabel = useLabel(labelMap.lblMake);\n const modelLabel = useLabel(labelMap.lblModel);\n const yearLabel = useLabel(labelMap.lblYear);\n const popularMakesLabel = useLabel(labelMap.lblPopularMakes);\n const allMakesLabel = useLabel(labelMap.lblAllMakes);\n const popularMakes = useFeatureFlag('POPULAR_MAKES') || '';\n\n const makeDataSrc = useMemo(() => {\n const popularMakesArray = popularMakes\n .split(' ')\n .map((item) => item.trim())\n .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()))\n .slice(0, 11);\n\n const dataSrcAllMake =\n makeQuery.data ?? (selectedMake ? [{ value: selectedMake, label: selectedMake }] : []);\n\n const allSet = new Set(dataSrcAllMake.map((brand) => brand.label));\n const filteredPopularMakes = popularMakesArray.reduce((acc, brand) => {\n if (allSet.has(brand)) {\n acc.push({ value: brand, label: brand, isPopular: true });\n }\n return acc;\n }, []);\n\n const makeData =\n filteredPopularMakes.length === 0\n ? dataSrcAllMake\n : [\n {\n value: 'popularMakesLabel',\n label: popularMakesLabel,\n isLabel: true,\n },\n ...filteredPopularMakes,\n { value: 'allMakesLabel', label: allMakesLabel, isLabel: true },\n ...dataSrcAllMake,\n ];\n return makeData;\n }, [allMakesLabel, makeQuery.data, popularMakes, popularMakesLabel, selectedMake]);\n\n return (\n <>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n );\n};\n\nexport default YmmeSelectRender;\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { myVehicleConstant } from '@/constants/myVehicle';\nimport { Label } from '@/features/i18n';\nimport { useEffect, useReducer } from 'react';\nimport { useYmmeEngines } from '../../api/getYmmeEngines';\nimport { useYmmeMakes } from '../../api/getYmmeMakes';\nimport { useYmmeModels } from '../../api/getYmmeModels';\nimport { useYmmeYears } from '../../api/getYmmeYears';\nimport { useVehiclesMutation } from '../../api/postVehicles';\nimport { ymmeActionSources } from '../../utils/ymmeHelpers';\nimport { setYmmeActionSource } from '../../utils/ymmeActionSourceHelper';\nimport { setInteractionLocation } from '../../utils/ymmeLocationHelper';\nimport styles from '../YMMEContentBlock.module.scss';\nimport YmmeSelectRender from './YmmeSelectRender';\nimport { findListItemByLabel } from '../../utils/findListItemByLabel';\nimport usePrevious from '@/utils/usePrevious';\nimport { useYmmeDefaultData } from '../../utils/useYmmeDefaultData';\nimport ProgressModal from '@/components/AZCustomComponent/ProgressModal';\nimport { usePageType } from '@/features/category/api/getPageType';\n\nexport type YMMESelectCompProps = {\n onSelectVehicle?: (a: string) => void;\n pageType: string;\n showYmmeMobile?: () => void;\n forceMobile?: boolean;\n onUpdateVehicleSuccess?: () => void;\n};\n\nconst ymmeConst = {\n years: 'YEARS',\n make: 'MAKE',\n model: 'MODEL',\n engine: 'ENGINE',\n};\n\ntype YmmeConst = (typeof ymmeConst)[keyof typeof ymmeConst];\n\ntype YMMEObject = {\n value: string;\n label: string;\n};\n\ntype State = {\n currentYear: string | undefined;\n currentMake: YMMEObject | undefined;\n currentModel: YMMEObject | undefined;\n currentEngine: string | undefined;\n focus: string | undefined;\n};\n\nconst initialState = (\n defaultMake: YMMEObject | null | undefined,\n defaultModel: YMMEObject | null | undefined,\n defaultYear: string | null | undefined\n): State => ({\n focus: undefined,\n currentEngine: undefined,\n currentMake: defaultMake?.value\n ? { label: defaultMake.label, value: defaultMake.value }\n : undefined,\n currentModel: defaultModel?.value\n ? { label: defaultModel.label, value: defaultModel.value }\n : undefined,\n currentYear: defaultYear ?? '',\n});\n\nconst stateReducer = (\n state: State,\n action: {\n type: string;\n data?: Partial;\n }\n): State => {\n switch (action.type) {\n case myVehicleConstant.updateField:\n return {\n ...state,\n ...action.data,\n };\n case 'reset':\n return {\n ...state,\n currentEngine: undefined,\n currentModel: undefined,\n currentMake: undefined,\n currentYear: undefined,\n };\n }\n\n return state;\n};\n\n/*\n React component to control the state of the YmmeSelectRender component.\n It will control the current values each input has and when\n to focus on a specific input\n*/\nexport const YmmeSelectComponent = ({\n pageType,\n onSelectVehicle,\n showYmmeMobile,\n forceMobile,\n onUpdateVehicleSuccess,\n}: YMMESelectCompProps) => {\n const { data: ymmeData } = useYmmeDefaultData();\n const { data: pageTypeData } = usePageType();\n const { defaultMake, defaultModel, defaultYear } = ymmeData;\n const enablePrefilledData = !!defaultYear || !!defaultMake || !!defaultModel;\n const [state, stateDispatch] = useReducer(\n stateReducer,\n initialState(defaultMake, defaultModel, defaultYear)\n );\n const { currentYear, currentMake, currentModel, currentEngine } = state;\n const ymmeYearQuery = useYmmeYears();\n const ymmeMakeQuery = useYmmeMakes({\n vehicleYear: currentYear,\n enabled: !!currentYear,\n });\n const previousMakeList = usePrevious(ymmeMakeQuery.data);\n const syncedMake = syncCurrentMakeWithNewMakeList();\n const ymmeModelQuery = useYmmeModels({\n vehicleYear: currentYear,\n vehicleMakeName: syncedMake?.value,\n enabled: !!syncedMake && !ymmeMakeQuery.isLoading && !!currentYear,\n });\n const previousModelList = usePrevious(ymmeModelQuery.data);\n const syncedModel = syncCurrentModelWithNewModelList();\n const ymmeEngineQuery = useYmmeEngines({\n modelId: syncedModel?.value,\n vehicleModelName: syncedModel?.label,\n vehicleMakeName: syncedMake?.label,\n vehicleYear: currentYear,\n enabled:\n !!currentYear &&\n !!syncedModel?.value &&\n !ymmeMakeQuery.isLoading &&\n !ymmeModelQuery.isLoading,\n });\n const isError =\n ymmeYearQuery.error || ymmeMakeQuery.error || ymmeModelQuery.error || ymmeEngineQuery.error;\n const vehiclesMutation = useVehiclesMutation({\n onSuccess: () => {\n onUpdateVehicleSuccess?.();\n },\n });\n\n function syncCurrentMakeWithNewMakeList() {\n //when the make list changes and we have a prefilled make, we need to preserve that value by finding it in the new list and selecting it\n const makesListChanged = previousMakeList !== ymmeMakeQuery.data;\n if (enablePrefilledData && currentMake && ymmeMakeQuery.data && makesListChanged) {\n const newMake = findListItemByLabel(ymmeMakeQuery.data, currentMake.label);\n return newMake;\n }\n return currentMake;\n }\n\n function syncCurrentModelWithNewModelList() {\n //when the model list changes and we have a prefilled model, we need to preserve that value by finding it in the new list and selecting it\n const modelListChanged = previousModelList !== ymmeModelQuery.data;\n if (enablePrefilledData && currentModel && ymmeModelQuery.data && modelListChanged) {\n const newModel = findListItemByLabel(ymmeModelQuery.data, currentModel.label);\n return newModel;\n }\n return currentModel;\n }\n\n useEffect(() => {\n if (enablePrefilledData && syncedMake?.value !== currentMake?.value) {\n stateDispatch({\n type: myVehicleConstant.updateField,\n data: {\n currentMake: syncedMake ? syncedMake : undefined,\n currentModel: syncedMake ? currentModel : undefined,\n focus:\n !!syncedMake && !currentModel ? ymmeConst.model : !syncedMake ? ymmeConst.make : '',\n },\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [syncedMake]);\n\n useEffect(() => {\n if (enablePrefilledData) {\n stateDispatch({\n type: myVehicleConstant.updateField,\n data: {\n currentModel: syncedModel ? syncedModel : undefined,\n focus: !!syncedModel ? ymmeConst.engine : ymmeConst.model,\n },\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [syncedModel]);\n\n useEffect(() => {\n //vehicle is added in ymme content block for this scenario hence preventing duplicate calls here !shopByUrlSuffixHasYear\n if (\n ymmeEngineQuery.data?.length === 1 &&\n currentYear &&\n currentMake &&\n currentModel &&\n ((pageTypeData &&\n (pageTypeData.year !== currentYear ||\n pageTypeData.make !== currentMake.label ||\n pageTypeData.model !== currentModel.label ||\n !pageTypeData.year)) ??\n true)\n ) {\n const { value, label } = ymmeEngineQuery.data[0];\n setYmmeActionSource(ymmeActionSources.contentBlock);\n onSelectVehicle?.(value);\n vehiclesMutation.mutate({ vehicleId: value });\n stateDispatch({\n type: myVehicleConstant.updateField,\n data: { currentEngine: label },\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- selectEngine would need to be memoized\n }, [ymmeEngineQuery.data, vehiclesMutation.mutate]);\n\n const resetAll = () => {\n stateDispatch({ type: 'reset' });\n };\n\n const handleSubmit = (inputType: YmmeConst, value?: string | null) => {\n let data: Partial = {};\n const preserveSelectedValues = value && enablePrefilledData;\n setInteractionLocation(pageType);\n\n switch (inputType) {\n case ymmeConst.years: {\n if (!value) {\n resetAll();\n }\n data = {\n currentYear: findListItemByLabel(ymmeYearQuery.data, value)?.label,\n currentMake: preserveSelectedValues && currentMake ? currentMake : undefined,\n currentModel: preserveSelectedValues && currentModel ? currentModel : undefined,\n currentEngine: preserveSelectedValues && currentEngine ? currentEngine : undefined,\n focus:\n preserveSelectedValues && currentMake && !currentModel\n ? ymmeConst.model\n : preserveSelectedValues && currentMake\n ? undefined\n : ymmeConst.make,\n };\n break;\n }\n\n case ymmeConst.make: {\n data = {\n currentMake: findListItemByLabel(ymmeMakeQuery.data, value),\n currentModel: preserveSelectedValues && currentModel ? currentModel : undefined,\n currentEngine: preserveSelectedValues && currentEngine ? currentEngine : undefined,\n focus: ymmeConst.model,\n };\n break;\n }\n\n case ymmeConst.model: {\n data = {\n currentModel: findListItemByLabel(ymmeModelQuery.data, value),\n currentEngine: preserveSelectedValues && currentEngine ? currentEngine : undefined,\n focus: currentYear ? ymmeConst.engine : ymmeConst.years,\n };\n break;\n }\n\n case ymmeConst.engine: {\n const selectedEngine = findListItemByLabel(ymmeEngineQuery.data, value);\n if (selectedEngine && currentYear) {\n setYmmeActionSource(ymmeActionSources.contentBlock);\n onSelectVehicle?.(selectedEngine.value);\n vehiclesMutation.mutate({ vehicleId: selectedEngine.value });\n }\n data = {\n currentEngine: selectedEngine?.label,\n };\n break;\n }\n\n default:\n break;\n }\n\n stateDispatch({\n type: myVehicleConstant.updateField,\n data,\n });\n };\n\n return (\n <>\n {vehiclesMutation.isLoading && }\n {\n stateDispatch({\n type: myVehicleConstant.updateField,\n data: { focus: undefined },\n });\n }}\n pageType={pageType}\n showYmmeMobile={showYmmeMobile}\n forceMobile={forceMobile}\n selectedEngine={currentEngine}\n selectedMake={currentMake?.label}\n selectedModel={currentModel?.label}\n selectedYear={currentYear}\n selectEngine={(value) => handleSubmit(ymmeConst.engine, value)}\n selectMake={(value) => handleSubmit(ymmeConst.make, value)}\n selectModel={(value) => handleSubmit(ymmeConst.model, value)}\n selectYear={(value) => handleSubmit(ymmeConst.years, value)}\n resetAll={resetAll}\n focusYear={state.focus === ymmeConst.years}\n focusMake={state.focus === ymmeConst.make}\n focusModel={state.focus === ymmeConst.model}\n focusEngine={state.focus === ymmeConst.engine}\n enablePrefilledData={enablePrefilledData}\n />\n\n {isError ? (\n
\n {!!ymmeModelQuery.error && (\n
\n ) : null}\n \n );\n};\n","/**\n * Copyright 2022 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\n\nimport { type YmmeDropdownData } from '../interface';\n\nexport const findListItemByLabel = (ymmeData: YmmeDropdownData = [], label: string | null = '') => {\n return ymmeData.find((ymmeListItem) => ymmeListItem.label === label);\n};\n","/**\n * Copyright 2019 AutoZone, Inc.\n * Content is confidential to and proprietary information of AutoZone, Inc., its\n * subsidiaries and affiliates.\n */\nimport { useYmmeEngines } from '../api/getYmmeEngines';\nimport { usePageType } from '@/features/category/api/getPageType';\n\nexport function useYmmeDefaultData() {\n const { data: pageTypeData } = usePageType();\n const { data: engines } = useYmmeEngines({\n vehicleMakeName: pageTypeData?.make,\n vehicleModelName: pageTypeData?.model,\n vehicleYear: pageTypeData?.year || undefined,\n modelId: pageTypeData?.model,\n enabled: Boolean(pageTypeData?.year && pageTypeData.model && pageTypeData.make),\n });\n const defaultEngine = engines && engines.length === 1 ? engines[0] : null;\n\n return {\n data: {\n defaultEngine,\n defaultModel: !!pageTypeData?.model\n ? {\n value: pageTypeData.model,\n label: pageTypeData.model,\n }\n : null,\n defaultSubModel: null,\n defaultMake: !!pageTypeData?.make\n ? { value: pageTypeData.make, label: pageTypeData.make }\n : null,\n defaultYear: pageTypeData?.year,\n },\n };\n}\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"azwhite\":\"#fff\",\"azgrey1\":\"#f2f2f2\",\"azgrey2\":\"#e6e6e6\",\"azgrey3\":\"#a9aaa8\",\"azgrey4\":\"#787878\",\"azgrey5\":\"#5b5d5b\",\"azgrey6\":\"#484848\",\"azgrey7\":\"#5b5c5d\",\"azgrey8\":\"#7c7c7c\",\"azblack\":\"#202124\",\"azlightorange\":\"#f37f00\",\"azmediumorange\":\"#f26100\",\"azmediumgrey\":\"#949494\",\"azdarkorange\":\"#f23f00\",\"azlightred\":\"#f52c1c\",\"azmediumred\":\"#d52b1e\",\"azdarkred\":\"#971e15\",\"azcolorsuccess\":\"#1f7400\",\"azcolorinfo\":\"#0050b3\",\"azcolorinfoalt\":\"#0081b2\",\"azcolorerror\":\"#b30000\",\"azcolorcaution\":\"#ffc600\",\"carIcon\":\"az_IFb\",\"downIcon\":\"az_JFb\",\"addVechiclePart\":\"az_KFb\",\"mobileToggle\":\"az_LFb\",\"ymmeRow\":\"az_MFb\",\"ymmeRegion\":\"az_NFb\",\"ymmeSelectBox\":\"az_OFb\",\"forceMobile\":\"az_PFb\",\"ymmeSearchContainer\":\"az_QFb\",\"ymmeContainer\":\"az_RFb\",\"ymmeTopContainer\":\"az_SFb\",\"titleContainer\":\"az_TFb\",\"ymmetitleTextStyles\":\"az_UFb\",\"ymmeTitle\":\"az_VFb\",\"ymmeTitleMaxWidth\":\"az_WFb\",\"ymmeSubTitle\":\"az_XFb\",\"selectContainer\":\"az_YFb\",\"titleDesc\":\"az_ZFb\",\"makeOrModelName\":\"az__Fb\",\"ymmeContainerSelectedPDP\":\"az_aGb\",\"setVehicleTitle\":\"az_bGb\",\"alignCenter\":\"az_cGb\",\"overridePadding\":\"az_dGb\",\"ymmeTitleColor\":\"az_eGb\",\"ymmeLabel\":\"az_fGb\",\"ymmeDesktopTitle\":\"az_gGb\",\"ymmeVehicleSelection\":\"az_hGb\",\"changeVehicleButton\":\"az_iGb\",\"shopWithoutVehicle\":\"az_jGb\",\"noPreferedvehicleIcon\":\"az_kGb\",\"preferedvehicleIcon\":\"az_lGb\",\"vehicleImage\":\"az_mGb\",\"changeVehicleLink\":\"az_nGb\",\"vehicleSelected\":\"az_oGb\",\"ymmeVehicleSet\":\"az_pGb\",\"ymmeErrorMsg\":\"az_qGb\",\"vehicleIcon\":\"az_rGb\",\"vehicleIconContainer\":\"az_sGb\",\"currentlyShoppingContainer\":\"az_tGb\",\"ymmeOptionsContainer\":\"az_uGb\",\"name\":\"az_vGb\",\"vehicleImageStyles\":\"az_wGb\",\"noVehicleImageStyles\":\"az_xGb\",\"hasVehicle\":\"az_yGb\",\"noMargin\":\"az_zGb\",\"vehicleLink\":\"az_AGb\",\"vehicleInfoCard\":\"az_BGb\",\"ymmeMobileContainer\":\"az_CGb\",\"bottomSpacing\":\"az_DGb\",\"selectVehicle\":\"az_EGb\",\"vehicleLabel\":\"az_FGb\",\"ymmeContainerSelected\":\"az_GGb\",\"vehicleGridItem\":\"az_HGb\",\"desktopWrapper\":\"az_IGb\",\"ymmeContentContainer\":\"az_JGb\",\"image\":\"az_KGb\",\"noMargins\":\"az_LGb\"};","// extracted by mini-css-extract-plugin\nmodule.exports = {\"azwhite\":\"#fff\",\"azgrey1\":\"#f2f2f2\",\"azgrey2\":\"#e6e6e6\",\"azgrey3\":\"#a9aaa8\",\"azgrey4\":\"#787878\",\"azgrey5\":\"#5b5d5b\",\"azgrey6\":\"#484848\",\"azgrey7\":\"#5b5c5d\",\"azgrey8\":\"#7c7c7c\",\"azblack\":\"#202124\",\"azlightorange\":\"#f37f00\",\"azmediumorange\":\"#f26100\",\"azmediumgrey\":\"#949494\",\"azdarkorange\":\"#f23f00\",\"azlightred\":\"#f52c1c\",\"azmediumred\":\"#d52b1e\",\"azdarkred\":\"#971e15\",\"azcolorsuccess\":\"#1f7400\",\"azcolorinfo\":\"#0050b3\",\"azcolorinfoalt\":\"#0081b2\",\"azcolorerror\":\"#b30000\",\"azcolorcaution\":\"#ffc600\",\"autoComplete\":\"az_fIc\",\"labelItem\":\"az_gIc\",\"listStyle\":\"az_hIc\",\"listItem\":\"az_iIc\",\"activeItem\":\"az_jIc\",\"arrowButtonBase\":\"az_kIc\",\"desktopDropdownIcon\":\"az_lIc\",\"arrowButtonDisabled\":\"az_mIc\",\"arrowUpPosition\":\"az_nIc\",\"divider\":\"az_oIc\",\"desktopInput\":\"az_pIc\",\"disabled\":\"az_qIc\",\"focused\":\"az_rIc\",\"inputSec\":\"az_sIc\",\"inputStyles\":\"az_tIc\",\"suggestLabel\":\"az_uIc\",\"suggestLabelDisabled\":\"az_vIc\",\"suggestLabelShrink\":\"az_wIc\",\"nativeSelectRoot\":\"az_xIc\",\"mobileArrowDownIcon\":\"az_yIc\",\"ymmeNativeSelectInput\":\"az_zIc\"};"],"names":["_path","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","__webpack_exports__","Z","props","react__WEBPACK_IMPORTED_MODULE_0__","createElement","width","height","viewBox","fill","xmlns","d","mapEventPropToEvent","eventProp","substring","toLowerCase","ClickAwayListener","children","disableReactTree","mouseEvent","onClickAway","touchEvent","movedRef","React","nodeRef","activatedRef","syntheticEventRef","setTimeout","current","handleRef","useForkRef","ref","handleClickAway","useEventCallback","doc","insideDOM","insideReactTree","ownerDocument","event","documentElement","clientWidth","clientX","clientHeight","clientY","composedPath","indexOf","contains","createHandleSynthetic","childrenPropsHandler","handlerName","childrenProps","mappedTouchEvent","handleTouchMove","addEventListener","removeEventListener","mappedMouseEvent","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Fragment","downArrow","src","alt","greyCarImg","URL","concat","requestBaseURL","useData","useVehicleEngines","createQuery","options","axiosInstance","getYmmeEngines","_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_6__","_","vehicleYear","vehicleMakeName","vehicleModelName","modelId","locale","preview","country","getCountryFromLocale","response","getAxios","get","params","customerType","salesChannel","getVehicleEnginesSelector","data","map","value","item","azVehicleId","label","azVehicleEngineName","useYmmeEngines","enabled","_param","useLocale","_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_8__","category","cacheTime","showXMPreviewDate","useVehicleMakes","getYmmeMakes","newSelector","useYmmeMakes","param","useVehicleModels","getYmmeModels","listOfModels","useYmmeModels","query","vehicleYearsQuery","useVehicleYears","prefetch","prefetchVehicleYears","getYmmeYears","undefined","withCredentials","getVehicleYearsSelector","useYmmeYears","staleTime","Infinity","postVehicles","vehicleId","previousVehicleID","post","sessionStorage","setItem","getVehiclesSelector","getKey","onVehiclesSuccess","queryClient","setQueryData","getVehiclesKey","refetchQueries","HEADER_PRIMARY_KEY","headerData","getHeaderDataFromCache","preferredVehicle","getPreferredVehicle","setPreferredVehicleCookies","year","vehicleMake","make","vehicleModel","model","vehicleEngine","engine","catalogVehicleId","useVehiclesMutation","previousPreferredVehicle","onSuccess","useQueryClient","router","useRouter","setSearchState","useGlobalState","usePreferredVehicle","useMutation","mutationFn","mutationKey","preferredVehicleChanged","currentPage","pageNumber","url","parseUrl","asPath","newPathName","stringifyUrl","push","dispatchEvent","vehicleSet","AutoCompleteItems","showMenu","filteredList","listScrollHandler","selectedItem","handleItemClick","onMouseDown","onMouseUp","id","onKeyDown","jsx_runtime","div","className","autoCompleteStyles","data-testid","onScroll","ul","listItem","index","suggestionStyle","isLabel","li","role","button","onClick","cx","azCommonStyles","disabled","isPopular","compareArrays","array1","array2","arrayComp","every","a","Icon","SelectDownArrowIcon","aria-hidden","iconStyles","AutoComplete","textInput","useRef","autoCompleteItemRef","setShowMenu","useState","textInputDirty","setTextInputDirty","focusedListItem","setFocusedListItem","cursor","setCursor","tempValue","setTempValue","setFilteredList","list","prevList","setPrevList","isReadOnly","setIsReadOnly","labelNumber","name","handleClick","maxLength","resetAll","resetFocus","focusElement","matchesMobile","useMediaQuery","theme","breakpoints","down","labelName","arrowButtonClass","prevFocusElement","usePrevious","prevListLength","handleScrollTop","useCallback","elementIdx","element","document","querySelector","scrollTo","HTMLElement","offsetTop","highlightOffset","scrollTop","handleFocus","focus","useEffect","isMobile","filterList","filter","toUpperCase","includes","searchText","handleChange","searchData","replace","trimmedSearchText","slice","handleBlur","selectItemOnBlur","handleEscapeKeyDown","e","keyCode","eventConstants","escKeyCode","escKeyType","hideMenu","selectedItemLowerCase","matchedItem","find","jsxs","NativeSelect","onBlur","onChange","blur","disableUnderline","inputRef","inputProps","title","IconComponent","option","FormControl","Input","onFocus","autoComplete","readOnly","classes","input","focused","filteredListLength","searchedItem","arrowUpKeyType","arrowDownKeyType","preventDefault","newCursor","enterKeyCode","enterKeyType","type","InputLabel","root","shrink","htmlFor","Button","variant","customClass","ariaLabel","MobileToggle","showYmmeMobile","addVehicleLabel","useLabel","styleYmme","Image","span","YMMESelectComp_YmmeSelectRender","makeQuery","modelQuery","dataSource","pageType","selectedEngine","selectedMake","selectedModel","selectedYear","selectEngine","selectLabels","selectMake","selectModel","selectYear","focusYear","focusMake","focusModel","focusEngine","forMMYE","forceMobile","enablePrefilledData","disableMake","isLoading","disableModel","disableEngine","engineLabel","makeLabel","modelLabel","yearLabel","popularMakesLabel","allMakesLabel","popularMakes","useFeatureFlag","makeDataSrc","useMemo","popularMakesArray","split","trim","sort","b","localeCompare","dataSrcAllMake","allSet","Set","brand","filteredPopularMakes","reduce","acc","has","makeData","Grid","container","spacing","AutoCompleteComponent","first","second","third","fourth","ymmeConst","years","initialState","defaultMake","defaultModel","defaultYear","currentEngine","currentMake","currentModel","currentYear","stateReducer","state","action","myVehicleConstant","updateField","_object_spread","_object_spread_props","YmmeSelectComponent","onSelectVehicle","onUpdateVehicleSuccess","ymmeData","useYmmeDefaultData","pageTypeData","usePageType","stateDispatch","useReducer","ymmeYearQuery","ymmeMakeQuery","previousMakeList","syncedMake","syncCurrentMakeWithNewMakeList","makesListChanged","newMake","findListItemByLabel","ymmeModelQuery","previousModelList","syncedModel","syncCurrentModelWithNewModelList","modelListChanged","newModel","ymmeEngineQuery","isError","error","vehiclesMutation","setYmmeActionSource","ymmeActionSources","contentBlock","mutate","handleSubmit","inputType","preserveSelectedValues","setInteractionLocation","ProgressModal","noScroll","YmmeSelectRender","styles","Label","ymmeListItem","engines","Boolean","defaultEngine","defaultSubModel","module","exports"],"sourceRoot":""}