{"version":3,"file":"static/chunks/app/[locale]/(search)/locations/page-ec8d9364d15f3653.js","mappings":"qFAAAA,QAAAC,OAAA,GAAAC,IAAA,CAAAC,EAAAC,IAAA,CAAAD,EAAA,+UCmBO,SAASE,EAA0BC,CAKT,KALS,CACxCC,OAAAA,CAAM,CACNC,aAAAA,CAAY,CACZC,QAAAA,CAAO,CACPC,uBAAAA,CAAsB,CACS,CALSJ,EAMlCK,EAAIC,CAAAA,EAAAA,EAAAA,eAAAA,EAAgB,UAEpB,CAACC,EAAmBC,EAAqB,CAC7CC,CAAAA,EAAAA,EAAAA,QAAAA,IACI,CAACC,EAAkBC,EAAoB,CAAGF,CAAAA,EAAAA,EAAAA,QAAAA,EAAwB,MA8BxE,MACE,GAAAG,EAAAC,GAAA,EAACC,EAAAA,CAAWA,CAAAA,CACVb,OAAQA,EACRC,aAAcA,EACdC,QAASA,EACTY,MAAOV,EAAE,6BACTW,QAbY,KACdb,IACII,GAAqBG,GACvBN,EAAuBG,EAAmBG,EAE9C,EASIO,QAnBY,KACdT,EAAqBU,KAAAA,GACrBP,EAAoB,KACtB,WAkBI,GAAAC,EAAAC,GAAA,EAACM,MAAAA,CAAIC,UAAU,gBACb,GAAAR,EAAAS,IAAA,EAACF,MAAAA,CAAIC,UAAU,4BACb,GAAAR,EAAAC,GAAA,EAACS,EAAAA,CAAWA,CAAAA,UAAEjB,EAAE,2BAChB,GAAAO,EAAAC,GAAA,EAACU,EAAAA,CAAmBA,CAAAA,CAClBH,UAAU,wDACVI,iBAAiB,YACjBC,kBA3CyB,CACjCC,EACAC,KAEAnB,EAAqBkB,GACrBf,EAAoBgB,EACtB,EAsCUC,gBApCkB,IAC1BpB,EAAqB,CACnBqB,OAAQ,CAACC,EAASC,eAAe,CAACC,GAAG,CAAEF,EAASC,eAAe,CAACE,GAAG,CAAC,CACpEC,KAAMC,EAAAA,EAAmCA,GAE3CxB,EAAoBmB,EAASM,IAAI,CACnC,EA+BUC,YAAahC,EAAE,2BACfiC,cACE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AY,cAK1D,GAAAJ,EAAApG,GAAA,EAACyG,IAAAA,CAAEJ,cAAa,GAAUC,MAAA,CAAPL,EAAO,gCAAuBE,SAIzD,2HChEAY,EAAe,CAAC,mGCYD,SAAS3B,EAAWjG,CAA8B,KAA9B,CAAEoB,UAAAA,CAAS,CAAmB,CAA9BpB,EAC3BK,EAAIC,CAAAA,EAAAA,EAAAA,eAAAA,EAAgB,eACpB,CAACuH,EAAWC,EAAa,CAAGrH,CAAAA,EAAAA,EAAAA,QAAAA,EAAS,WAE3C,EAKE,GAAAG,EAAAC,GAAA,EAACgG,EAAAA,CAAMA,CAAAA,CACLzF,UAAWA,EACX4F,YAAa3G,EAAE,eACfU,MAAOV,EAAE,SACTyG,OAAO,OACPC,KAAMA,EACN5G,QAAS,IAAM2H,EAAa,MAVvB,IAaX","sources":["webpack://_N_E/?a2dc","webpack://_N_E/./app/[locale]/(search)/locations/_components/PrivateOfficeFiltersModal.tsx","webpack://_N_E/./app/[locale]/(search)/locations/_components/LocationSearch.tsx","webpack://_N_E/./components/Banner.tsx","webpack://_N_E/./public/icons/ssosBannerIcon.svg","webpack://_N_E/./components/SsosBanner.tsx"],"sourcesContent":["import(/* webpackMode: \"eager\", webpackExports: [\"default\"] */ \"/codebuild/output/src3395698585/src/website/app/[locale]/(search)/locations/_components/LocationSearch.tsx\");\n","import { useTranslations } from 'next-intl';\nimport Image from 'next/image';\nimport { useState } from 'react';\n\nimport { CameraMapOptions } from '@/components/map/types';\nimport LocationSearchInput from '@/components/search/SearchInput';\nimport FilterTitle from '@/components/search/SearchModal/FiltersTitle';\nimport { SearchModal } from '@/components/search/SearchModal/SearchModal';\nimport { SimpleLocationSearchDto } from '@/lib/locations/dto/simple-location-search.dto';\nimport placeIcon from '@/public/icons/placeIcon.svg';\nimport { DEFAULT_MAP_LOCATION_MR_SEARCH_ZOOM } from '@/utils/constants';\n\ntype PrivateOfficeFiltersModalProps = {\n isOpen: boolean;\n onOpenChange: () => void;\n onClose: () => void;\n onSearchInputItemClick: (coords: CameraMapOptions, itemValue: string) => void;\n};\n\nexport function PrivateOfficeFiltersModal({\n isOpen,\n onOpenChange,\n onClose,\n onSearchInputItemClick,\n}: PrivateOfficeFiltersModalProps) {\n const t = useTranslations('search');\n\n const [preselectedCoords, setPreselectedCoords] =\n useState();\n const [preselectedValue, setPreselectedValue] = useState(null);\n\n const handleSearchInputItemClick = (\n coords: CameraMapOptions,\n itemValue: string\n ) => {\n setPreselectedCoords(coords);\n setPreselectedValue(itemValue);\n };\n\n const handleClickLocation = (location: SimpleLocationSearchDto) => {\n setPreselectedCoords({\n center: [location.geolocalization.lng, location.geolocalization.lat],\n zoom: DEFAULT_MAP_LOCATION_MR_SEARCH_ZOOM,\n });\n setPreselectedValue(location.name);\n };\n\n const onClear = () => {\n setPreselectedCoords(undefined);\n setPreselectedValue(null);\n };\n\n const onApply = () => {\n onClose();\n if (preselectedCoords && preselectedValue) {\n onSearchInputItemClick(preselectedCoords, preselectedValue);\n }\n };\n\n return (\n \n
\n
\n {t('filter-modal.location')}\n \n }\n defaultSearchValue={preselectedValue}\n />\n
\n
\n \n );\n}\n","'use client';\n\nimport { useTranslations } from 'next-intl';\nimport dynamic from 'next/dynamic';\nimport { useContext, useEffect, useMemo } from 'react';\n\nimport SsosBanner from '@/components/SsosBanner';\nimport CardListWrapper from '@/components/search/CardListWrapper';\nimport ListCounter from '@/components/search/ListCounter';\nimport LocationSearchMap from '@/components/search/LocationSearchMap';\nimport SearchNoResults from '@/components/search/SearchNoResults';\nimport LocationsSearchListLoader from '@/components/search/cards/locations/LocationsSearchListLoader';\nimport useHighlightedSlug from '@/components/search/useHighlightedSlug';\nimport { mapBounds } from '@/components/search/utils';\nimport { SimpleLocationSearchDto, SortFilter } from '@/lib/locations/dto';\nimport {\n FetchAllLocationsProps,\n fetchAllLocations,\n} from '@/lib/locations/location-api';\n\nimport SearchContext from '../../_components/SearchContext';\nimport { SearchModalType } from '../../_components/SearchPageWrapper';\nimport useSearchData from '../../_components/useSearchData';\nimport { PrivateOfficeFiltersModal } from './PrivateOfficeFiltersModal';\nimport { isSsosAvailable } from './utils';\n\nconst LocationSearchList = dynamic(\n () => import('@/components/search/LocationSearchList'),\n {\n loading: () => (\n \n ),\n }\n);\n\nexport type LocationsSearchProps = {\n locale: string;\n mapboxAccessToken: string;\n};\n\nfunction LocationSearch({ locale, mapboxAccessToken }: LocationsSearchProps) {\n const t = useTranslations('search');\n\n const { highlightedSlug, onMouseEnter, onMouseLeave } = useHighlightedSlug();\n const {\n isFullScreenMap,\n searchModalType,\n onSearchInputItemClick,\n onCloseModal,\n openModal,\n } = useContext(SearchContext);\n\n const getLocations = async (params: FetchAllLocationsProps) => {\n return fetchAllLocations({\n sort: SortFilter.PHASE,\n withPrivateOffice: true,\n ...params,\n });\n };\n\n const {\n isWebGLSupported,\n bounds,\n cardListRef,\n isLoading,\n searchItems: locations,\n handleZoomChange,\n handleMoveEnd,\n handleIdle,\n debouncedFetchData: debouncedFetchLocations,\n } = useSearchData({\n getDatas: getLocations,\n });\n\n const hasLocationsWithSsos = useMemo(\n () => locations.some((x) => isSsosAvailable(x)),\n [locations]\n );\n const showSsosBanner = !isLoading && hasLocationsWithSsos;\n\n useEffect(() => {\n if (bounds === undefined) return;\n\n debouncedFetchLocations({\n locale,\n within: mapBounds(bounds),\n });\n }, [bounds]);\n\n return (\n <>\n {!isFullScreenMap && (\n \n {isLoading && (\n \n )}\n\n {showSsosBanner && }\n\n {!isLoading && locations.length > 0 && (\n <>\n \n {t('search-office-space.count', {\n count: locations.length,\n })}\n \n \n \n )}\n\n {!isLoading && locations.length === 0 && }\n \n )}\n \n openModal(SearchModalType.PrivateOfficeFilters)}\n />\n \n );\n}\n\nexport default LocationSearch;\n","import { StaticImport } from 'next/dist/shared/lib/get-img-props';\nimport Image from 'next/image';\n\nimport closeIcon from '@/public/icons/closeIcon.svg';\n\nimport clsx from 'clsx';\n\ntype BannerProps = {\n testId: string;\n icon?: string | StaticImport;\n className?: string;\n description: string;\n title?: string;\n onClose?: () => void;\n};\n\nexport default function Banner({\n testId,\n icon,\n description,\n title,\n className,\n onClose,\n}: BannerProps) {\n return (\n \n {icon && (\n \n )}\n\n
\n
\n {title && (\n

\n {title}\n

\n )}\n {onClose && (\n \n \"close-icon\"\n \n )}\n
\n\n

{description}

\n
\n \n );\n}\n","export default {\"src\":\"/_next/static/media/ssosBannerIcon.397cb6f2.svg\",\"height\":33,\"width\":32,\"blurWidth\":0,\"blurHeight\":0};","'use client';\n\nimport { useTranslations } from 'next-intl';\nimport { useState } from 'react';\n\nimport Banner from '@/components/Banner';\nimport icon from '@/public/icons/ssosBannerIcon.svg';\n\ntype SsosBannerProps = {\n className?: string;\n};\n\nexport default function SsosBanner({ className }: SsosBannerProps) {\n const t = useTranslations('ssos-banner');\n const [displayed, setDisplayed] = useState(true);\n\n if (!displayed) {\n return null;\n }\n\n return (\n setDisplayed(false)}\n />\n );\n}\n"],"names":["Promise","resolve","then","__webpack_require__","bind","PrivateOfficeFiltersModal","param","isOpen","onOpenChange","onClose","onSearchInputItemClick","t","useTranslations","preselectedCoords","setPreselectedCoords","useState","preselectedValue","setPreselectedValue","jsx_runtime","jsx","SearchModal","title","onApply","onClear","undefined","div","className","jsxs","FilterTitle","LocationSearchInput","controlClassName","onClickResultItem","coords","itemValue","onClickLocation","center","location","geolocalization","lng","lat","zoom","DEFAULT_MAP_LOCATION_MR_SEARCH_ZOOM","name","placeholder","leftIndicator","Image","src","placeIcon","alt","defaultSearchValue","LocationSearchList","dynamic","all","e","loading","LocationsSearchListLoader","dataTestId","_components_LocationSearch","locale","mapboxAccessToken","highlightedSlug","onMouseEnter","onMouseLeave","useHighlightedSlug","isFullScreenMap","searchModalType","onCloseModal","openModal","useContext","SearchContext","getLocations","params","fetchAllLocations","sort","SortFilter","PHASE","withPrivateOffice","isWebGLSupported","bounds","cardListRef","isLoading","searchItems","locations","handleZoomChange","handleMoveEnd","handleIdle","debouncedFetchData","debouncedFetchLocations","useSearchData","getDatas","hasLocationsWithSsos","useMemo","some","isSsosAvailable","x","showSsosBanner","useEffect","within","mapBounds","Fragment","CardListWrapper","withMap","ref","SsosBanner","length","ListCounter","count","showSsosImageCaption","SearchNoResults","LocationSearchMap","onMoveEnd","onZoomChange","onIdle","SearchModalType","PrivateOfficeFilters","Banner","testId","icon","description","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","data-testid","concat","clsx","aria-hidden","p","button","type","aria-label","onClick","closeIcon","ssosBannerIcon","displayed","setDisplayed"],"sourceRoot":""}