@abcagency/hc-ui-components 1.4.18 → 1.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\n\nimport { getMapConfig } from '~/services/configService';\nimport { setClientAuthKey } from '~/clientToken.js';\n\nimport '../styles/index.css';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Custom hook to fetch site configuration\nfunction useSiteConfig(clientToken, siteConfiguration = null) {\n\tconst [siteConfig, setSiteConfig] = useState(siteConfiguration);\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst fetchSiteConfig = async () => {\n\t\t\ttry {\n\t\t\t\tsetClientAuthKey(clientToken);\n\t\t\t\tconst configData = await getMapConfig(clientToken);\n\t\t\t\tsetSiteConfig(configData);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Failed to fetch site configuration:', err);\n\t\t\t\tsetError(err);\n\t\t\t} finally {\n\t\t\t\tsetIsLoading(false);\n\t\t\t}\n\t\t};\n\t\tif(!siteConfig){\n\t\t\tfetchSiteConfig();\n\t\t}\n\t}, [clientToken]);\n\n\treturn { siteConfig, isLoading, error };\n}\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, ...mapListProps }) => { return(\n\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t<ThemeProvider\n\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\tprimary={siteConfig.colors.primary}\n\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t>\n\t\t\t<MapListProvider siteConfig={siteConfig} {...mapListProps}>\n\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride}>\n\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</PlacesProvider>\n\t\t\t\t</MapProvider>\n\t\t\t</MapListProvider>\n\t\t</ThemeProvider>\n\t</TrackEventProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.'\n}) => {\n\t// Load site configuration\n\tconst { siteConfig, error } = useSiteConfig(clientToken, siteConfiguration);\n\n\t// Load Google Maps\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Show loading state or error if Google Maps hasn't loaded yet\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\tif (!isMapsLoaded) {\n\t\treturn <div className=\"hc-p-4\">Loading Maps...</div>;\n\t}\n\n\tif (error || !siteConfig) {\n\t\treturn <div className=\"hc-p-4\"></div>;\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities\n\t};\n\n\t// Calculate effective showMap value (hideMap overrides siteConfig.showMap)\n\tconst effectiveShowMap = hideMap ? false : siteConfig.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfig.colors.primary,\n\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\t//Desktop view of filter used below\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfig}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfig.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfig.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfig.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfig.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","useSiteConfig","clientToken","siteConfiguration","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","siteConfig","setSiteConfig","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","error","setError","useEffect","fetchSiteConfig","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","configData","wrap","_callee$","_context","prev","next","setClientAuthKey","getMapConfig","sent","t0","console","finish","stop","apply","ContextProviders","_ref2","_siteConfig$pointsOfI","children","trackEvent","googleMapsApiKey","mapListProps","_objectWithoutProperties","_excluded","React","createElement","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref3","_siteConfig$pointsOfI2","_ref3$containerStyle","containerStyle","height","_ref3$navigateToDetai","navigateToDetails","_ref3$navigateToEasyA","navigateToEasyApply","_ref3$handleUrlUpdate","handleUrlUpdate","_ref3$Link","Link","_ref3$linkFormat","linkFormat","_ref3$easyApplyUrl","easyApplyUrl","_ref3$easyApplyText","easyApplyText","_ref3$isIframe","isIframe","_ref3$hideMap","hideMap","_ref3$hideFilters","hideFilters","_ref3$noEntities","noEntities","_ref3$trackEvent","eventType","eventObj","log","_ref3$listings","listings","_ref3$entities","entities","_ref3$getListingEntit","getListingEntitiesCallback","_ref3$defaultFilters","defaultFilters","_ref3$hiddenFilters","hiddenFilters","_ref3$setFiltersUrl","setFiltersUrl","_ref3$ExpandListCompo","ExpandListComponent","_ref3$additionalMapMa","_ref3$defaultZoomOver","_ref3$siteConfigurati","_ref3$localStorageKey","localStorageKey","_useSiteConfig","_useLoadScript","useLoadScript","version","libraries","isMapsLoaded","isLoaded","loadError","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;;AAmBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;AACA,SAASC,aAAaA,CAACC,WAAW,EAA4B;AAAA,EAAA,IAA1BC,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,IAAI,CAAA;AAC3D,EAAA,IAAAG,SAAA,GAAoCC,QAAQ,CAACL,iBAAiB,CAAC;IAAAM,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAxDI,IAAAA,UAAU,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,aAAa,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAChC,EAAA,IAAAI,UAAA,GAAkCL,QAAQ,CAAC,IAAI,CAAC;IAAAM,UAAA,GAAAJ,cAAA,CAAAG,UAAA,EAAA,CAAA,CAAA;AAAzCE,IAAAA,SAAS,GAAAD,UAAA,CAAA,CA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E,IAAK;AAACb,IAAAA,OAAO,EAAED,gBAAiB;AAACD,IAAAA,SAAS,EAAC,uBAAA;AAAuB,GAAE,CAC7E,CACX,eACDxF,KAAA,CAAAC,aAAA,CAACuG,gBAAO,EAAA;AACPvE,IAAAA,cAAc,EAAEA,cAAe;IAC/BwE,WAAW,EAAEjJ,UAAU,CAACiJ,WAAY;AACpCf,IAAAA,OAAO,EAAED,gBAAiB;IAC1BiB,WAAW,EAAElJ,UAAU,CAACkJ,WAAY;IACpCC,eAAe,EAAEnJ,UAAU,CAACmJ,eAAgB;IAC5CC,UAAU,EAAEpJ,UAAU,CAACoJ,UAAW;AAClC3F,IAAAA,aAAa,EAAAc,CAAAA,sBAAA,GAAEvE,UAAU,CAAC0D,sBAAsB,CAACD,aAAa,MAAA,IAAA,IAAAc,sBAAA,KAAA,KAAA,CAAA,GAAAA,sBAAA,GAAI,EAAG;AACrE4D,IAAAA,aAAa,EAAEA,aAAAA;GACf,CACI,CACW,CAAC,CAAA;AAErB;;;;"}
1
+ {"version":3,"file":"HireControlMap.js","sources":["../../src/components/HireControlMap.js"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\n\nimport Grid from '~/components/modules/grid';\nimport Filter from '~/components/containers/filter/filter-container';\nimport MapList from '~/components/containers/maps/map-list-container';\n\n// Context imports\nimport { MapProvider } from '~/contexts/mapContext';\nimport { PlacesProvider } from '~/contexts/placesContext';\nimport { MapListProvider } from '~/contexts/mapListContext';\nimport { TrackEventProvider } from '~/contexts/trackEventContext';\nimport { ThemeProvider } from '~/contexts/themeContext';\n\nimport { getMapConfig } from '~/services/configService';\nimport { setClientAuthKey } from '~/clientToken.js';\n\nimport '../styles/components.css';\n\n// Libraries for Google Maps\nconst LIBRARIES = ['places'];\n\n// Custom hook to fetch site configuration\nfunction useSiteConfig(clientToken, siteConfiguration = null) {\n\tconst [siteConfig, setSiteConfig] = useState(siteConfiguration);\n\tconst [isLoading, setIsLoading] = useState(true);\n\tconst [error, setError] = useState(null);\n\n\tuseEffect(() => {\n\t\tconst fetchSiteConfig = async () => {\n\t\t\ttry {\n\t\t\t\tsetClientAuthKey(clientToken);\n\t\t\t\tconst configData = await getMapConfig(clientToken);\n\t\t\t\tsetSiteConfig(configData);\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error('Failed to fetch site configuration:', err);\n\t\t\t\tsetError(err);\n\t\t\t} finally {\n\t\t\t\tsetIsLoading(false);\n\t\t\t}\n\t\t};\n\t\tif(!siteConfig){\n\t\t\tfetchSiteConfig();\n\t\t}\n\t}, [clientToken]);\n\n\treturn { siteConfig, isLoading, error };\n}\n\n// Component to handle all context providers\nconst ContextProviders = ({ children, siteConfig, trackEvent, googleMapsApiKey, ...mapListProps }) => { return(\n\t<TrackEventProvider trackEvent={trackEvent}>\n\t\t<ThemeProvider\n\t\t\tuiText={siteConfig.colors.uiText}\n\t\t\tuiAccent={siteConfig.colors.uiAccent}\n\t\t\tprimary={siteConfig.colors.primary}\n\t\t\tprimaryDark={siteConfig.colors.primaryDark}\n\t\t\tsecondary={siteConfig.colors.secondary}\n\t\t\tsecondaryDark={siteConfig.colors.secondaryDark}\n\t\t>\n\t\t\t<MapListProvider siteConfig={siteConfig} {...mapListProps}>\n\t\t\t\t<MapProvider resetFilters={mapListProps.resetFilters} defaultZoomOverride={mapListProps.defaultZoomOverride}>\n\t\t\t\t\t<PlacesProvider\n\t\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\t\tadditionalMapMarkers={mapListProps.additionalMapMarkers}\n\t\t\t\t\t\tgoogleMapsApiKey={googleMapsApiKey}\n\t\t\t\t\t\tmarkerColors={{\n\t\t\t\t\t\t\tfillColor: siteConfig.colors.primary,\n\t\t\t\t\t\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\t\t\t\t\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\t\t\t\t\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\t\t\t\t\t\tplaceMarkers: {\n\t\t\t\t\t\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\t\t\t\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</PlacesProvider>\n\t\t\t\t</MapProvider>\n\t\t\t</MapListProvider>\n\t\t</ThemeProvider>\n\t</TrackEventProvider>\n);};\n\n// Main component\n//\nexport const HireControlMap = ({\n\tclientToken,\n\tgoogleMapsApiKey, // Required: Google Maps API key from Next.js\n\tcontainerStyle = { height: '100vh' },\n\tnavigateToDetails = null,\n\tnavigateToEasyApply = null,\n\thandleUrlUpdate = null,\n\tLink = null,\n\tlinkFormat = '/jobs/[slug]',\n\teasyApplyUrl = null,\n\teasyApplyText = 'Easy Apply',\n\tisIframe = false,\n\thideMap = false, // Override to hide map even if siteConfig.showMap is true\n\thideFilters = false, // Hide the entire filter section\n\tnoEntities = false, // Skip entity fetching and hide entity-related filters\n\ttrackEvent = (eventType, eventObj) => {\n\t\tconsole.log(eventType);\n\t\tconsole.log(eventObj);\n\t},\n\t//providing listings entities and a getListingEntities function should negate the need for map code to fetch data\n\tlistings = [],\n\tentities = [],\n\tgetListingEntitiesCallback = null,\n\tdefaultFilters = null,\n\thiddenFilters = null,\n\tsetFiltersUrl = null,\n\tExpandListComponent = null,\n\tadditionalMapMarkers = [],\n\tdefaultZoomOverride = null,\n\t//Default site configuration file passed here stops need to fetch from api\n\tsiteConfiguration = null,\n\tlocalStorageKey = 'defaultKey.'\n}) => {\n\t// Load site configuration\n\tconst { siteConfig, error } = useSiteConfig(clientToken, siteConfiguration);\n\n\t// Load Google Maps\n\tconst { isLoaded: isMapsLoaded, loadError } = useLoadScript({\n\t\tgoogleMapsApiKey: googleMapsApiKey,\n\t\tversion: 'quarterly',\n\t\tlibraries: LIBRARIES\n\t});\n\n\t// Show loading state or error if Google Maps hasn't loaded yet\n\tif (!googleMapsApiKey) {\n\t\tconsole.error('Google Maps API key is required');\n\t\treturn <div className=\"hc-p-4\">Google Maps API key is required</div>;\n\t}\n\n\tif (loadError) {\n\t\tconsole.error('Google Maps failed to load:', loadError);\n\t\treturn <div className=\"hc-p-4\">Error loading Google Maps</div>;\n\t}\n\n\tif (!isMapsLoaded) {\n\t\treturn <div className=\"hc-p-4\">Loading Maps...</div>;\n\t}\n\n\tif (error || !siteConfig) {\n\t\treturn <div className=\"hc-p-4\"></div>;\n\t}\n\n\t// Prepare props for MapListProvider\n\tconst mapListProps = {\n\t\tresetFilters: false,\n\t\tnavigateToDetails,\n\t\tnavigateToEasyApply,\n\t\tLink,\n\t\tlinkFormat,\n\t\teasyApplyUrl,\n\t\teasyApplyText,\n\t\tlistings,\n\t\tentities,\n\t\tsiteConfig,\n\t\tgetListingEntitiesCallback,\n\t\tsetFiltersUrl,\n\t\thiddenFilters,\n\t\thandleUrlUpdate,\n\t\tdefaultFilters,\n\t\tdefaultZoomOverride, // will usually fit bounds\n\t\tcontainerStyle,\n\t\tExpandListComponent: ExpandListComponent ?? null,\n\t\tadditionalMapMarkers,\n\t\tisIframe,\n\t\tlocalStorageKey,\n\t\thideMap,\n\t\thideFilters,\n\t\tnoEntities\n\t};\n\n\t// Calculate effective showMap value (hideMap overrides siteConfig.showMap)\n\tconst effectiveShowMap = hideMap ? false : siteConfig.showMap;\n\n\t// Prepare marker configuration\n\tconst markerConfigs = {\n\t\tfillColor: siteConfig.colors.primary,\n\t\tstrokeColor: siteConfig.colors.primaryDark,\n\t\tselectedFillColor: siteConfig.colors.secondary,\n\t\tselectedStrokeColor: siteConfig.colors.secondaryDark,\n\t\tplaceMarkers: {\n\t\t\tcolors: siteConfig.pointsOfInterestConfig.placeMarkerColors,\n\t\t\tsize: siteConfig.pointsOfInterestConfig.placeMarkerSize\n\t\t}\n\t};\n\t//Desktop view of filter used below\n\treturn (\n\t\t<ContextProviders\n\t\t\tsiteConfig={siteConfig}\n\t\t\ttrackEvent={trackEvent}\n\t\t\tgoogleMapsApiKey={googleMapsApiKey || process.env.GOOGLE_MAPS_API_KEY}\n\t\t\t{...mapListProps}\n\t\t>\n\t\t\t<Grid\n\t\t\t\tas='section'\n\t\t\t\tid='job-search-interface'\n\t\t\t\tcolumns={hideFilters ? 'hc-grid-cols-1' : 'md:hc-grid-cols-[1fr_2.5fr] lg:hc-grid-cols-[1fr_3.5fr]'}\n\t\t\t\tgap='hc-gap-0'\n\t\t\t\tautoRows={false}\n\t\t\t\tclassName={'hc-bundle hc-items-stretch hc-divide-x hc-divide-uiAccent/20'}\n\t\t\t>\n\t\t\t\t{!hideFilters && (\n\t\t\t\t\t<Grid.Item className='hc-bg-gray-100'>\n\t\t\t\t\t\t<Filter isDesktop={true} showMap={effectiveShowMap} className='hc-hidden md:hc-block' />\n\t\t\t\t\t</Grid.Item>\n\t\t\t\t)}\n\t\t\t\t<MapList\n\t\t\t\t\tcontainerStyle={containerStyle}\n\t\t\t\t\tmapPosition={siteConfig.mapPosition}\n\t\t\t\t\tshowMap={effectiveShowMap}\n\t\t\t\t\tfieldsShown={siteConfig.fieldsShown}\n\t\t\t\t\tspecialFeatures={siteConfig.specialFeatures}\n\t\t\t\t\tfieldNames={siteConfig.fieldNames}\n\t\t\t\t\tplaceMappings={siteConfig.pointsOfInterestConfig.placeMappings ?? {}}\n\t\t\t\t\tmarkerConfigs={markerConfigs}\n\t\t\t\t/>\n\t\t\t</Grid>\n\t\t</ContextProviders>\n\t);\n};\n\nexport default HireControlMap;\n"],"names":["LIBRARIES","useSiteConfig","clientToken","siteConfiguration","arguments","length","undefined","_useState","useState","_useState2","_slicedToArray","siteConfig","setSiteConfig","_useState3","_useState4","isLoading","setIsLoading","_useState5","_useState6","error","setError","useEffect","fetchSiteConfig","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","configData","wrap","_callee$","_context","prev","next","setClientAuthKey","getMapConfig","sent","t0","console","finish","stop","apply","ContextProviders","_ref2","_siteConfig$pointsOfI","children","trackEvent","googleMapsApiKey","mapListProps","_objectWithoutProperties","_excluded","React","createElement","TrackEventProvider","ThemeProvider","uiText","colors","uiAccent","primary","primaryDark","secondary","secondaryDark","MapListProvider","_extends","MapProvider","resetFilters","defaultZoomOverride","PlacesProvider","placeMappings","pointsOfInterestConfig","additionalMapMarkers","markerColors","fillColor","strokeColor","selectedFillColor","selectedStrokeColor","placeMarkers","placeMarkerColors","size","placeMarkerSize","HireControlMap","_ref3","_siteConfig$pointsOfI2","_ref3$containerStyle","containerStyle","height","_ref3$navigateToDetai","navigateToDetails","_ref3$navigateToEasyA","navigateToEasyApply","_ref3$handleUrlUpdate","handleUrlUpdate","_ref3$Link","Link","_ref3$linkFormat","linkFormat","_ref3$easyApplyUrl","easyApplyUrl","_ref3$easyApplyText","easyApplyText","_ref3$isIframe","isIframe","_ref3$hideMap","hideMap","_ref3$hideFilters","hideFilters","_ref3$noEntities","noEntities","_ref3$trackEvent","eventType","eventObj","log","_ref3$listings","listings","_ref3$entities","entities","_ref3$getListingEntit","getListingEntitiesCallback","_ref3$defaultFilters","defaultFilters","_ref3$hiddenFilters","hiddenFilters","_ref3$setFiltersUrl","setFiltersUrl","_ref3$ExpandListCompo","ExpandListComponent","_ref3$additionalMapMa","_ref3$defaultZoomOver","_ref3$siteConfigurati","_ref3$localStorageKey","localStorageKey","_useSiteConfig","_useLoadScript","useLoadScript","version","libraries","isMapsLoaded","isLoaded","loadError","className","effectiveShowMap","showMap","markerConfigs","process","env","GOOGLE_MAPS_API_KEY","Grid","as","id","columns","gap","autoRows","Item","Filter","isDesktop","MapList","mapPosition","fieldsShown","specialFeatures","fieldNames"],"mappings":";;;;;;;;;;;;;;;;AAmBA;AACA,IAAMA,SAAS,GAAG,CAAC,QAAQ,CAAC,CAAA;;AAE5B;AACA,SAASC,aAAaA,CAACC,WAAW,EAA4B;AAAA,EAAA,IAA1BC,iBAAiB,GAAAC,SAAA,CAAAC,MAAA,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ClEjG,YAAY,CAEhBG,eAAAA,KAAA,CAAAC,aAAA,CAAC8F,IAAI,EAAA;AACJC,IAAAA,EAAE,EAAC,SAAS;AACZC,IAAAA,EAAE,EAAC,sBAAsB;AACzBC,IAAAA,OAAO,EAAE5C,WAAW,GAAG,gBAAgB,GAAG,yDAA0D;AACpG6C,IAAAA,GAAG,EAAC,UAAU;AACdC,IAAAA,QAAQ,EAAE,KAAM;AAChBZ,IAAAA,SAAS,EAAE,8DAAA;GAEV,EAAA,CAAClC,WAAW,iBACZtD,KAAA,CAAAC,aAAA,CAAC8F,IAAI,CAACM,IAAI,EAAA;AAACb,IAAAA,SAAS,EAAC,gBAAA;AAAgB,GAAA,eACpCxF,KAAA,CAAAC,aAAA,CAACqG,eAAM,EAAA;AAACC,IAAAA,SAAS,EAAE,IAAK;AAACb,IAAAA,OAAO,EAAED,gBAAiB;AAACD,IAAAA,SAAS,EAAC,uBAAA;AAAuB,GAAE,CAC7E,CACX,eACDxF,KAAA,CAAAC,aAAA,CAACuG,gBAAO,EAAA;AACPvE,IAAAA,cAAc,EAAEA,cAAe;IAC/BwE,WAAW,EAAEjJ,UAAU,CAACiJ,WAAY;AACpCf,IAAAA,OAAO,EAAED,gBAAiB;IAC1BiB,WAAW,EAAElJ,UAAU,CAACkJ,WAAY;IACpCC,eAAe,EAAEnJ,UAAU,CAACmJ,eAAgB;IAC5CC,UAAU,EAAEpJ,UAAU,CAACoJ,UAAW;AAClC3F,IAAAA,aAAa,EAAAc,CAAAA,sBAAA,GAAEvE,UAAU,CAAC0D,sBAAsB,CAACD,aAAa,MAAA,IAAA,IAAAc,sBAAA,KAAA,KAAA,CAAA,GAAAA,sBAAA,GAAI,EAAG;AACrE4D,IAAAA,aAAa,EAAEA,aAAAA;GACf,CACI,CACW,CAAC,CAAA;AAErB;;;;"}
@@ -35,7 +35,8 @@ var MapAccordionItemContainer = function MapAccordionItemContainer(_ref) {
35
35
  //edited here for new structure of entity key
36
36
  console.log('the item in questions is', item);
37
37
  var location = mapItems.find(function (x) {
38
- return Object.prototype.hasOwnProperty.call(x.items, item.fields.entityKey);
38
+ var _x$entityKey, _item$fields$entityKe;
39
+ return ((_x$entityKey = x.entityKey) === null || _x$entityKey === void 0 ? void 0 : _x$entityKey.toLowerCase()) === ((_item$fields$entityKe = item.fields.entityKey) === null || _item$fields$entityKe === void 0 ? void 0 : _item$fields$entityKe.toLowerCase());
39
40
  }) || null;
40
41
  console.log('location is', location);
41
42
  selectItem(item, location, 12, {
@@ -1 +1 @@
1
- {"version":3,"file":"map-accordion-item-container.js","sources":["../../../../src/components/containers/accordions/map-accordion-item-container.js"],"sourcesContent":["import React from 'react';\nimport { useMap } from '~/contexts/mapContext';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport { setStorageObject } from '~/util/localStorageUtil';\nimport MapAccordionItem from '~/components/modules/accordions/MapAccordionItem';\nimport ListItemContainer from '~/components/containers/list/list-item/list-item-container';\n\nconst MapAccordionItemContainer = ({\n\tshowMap,\n\titem,\n\titemRefs,\n\tfieldsShown,\n\titemExpandedContent,\n\tspecialFeatures,\n\tisActive\n}) => {\n\tconst { mapItems, recruiters } = useMapList();\n\tconst { selectItem } = useMap();\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\n\tconst setSelectedItemAndZoomMap = (item, isActive) => {\n\t\tif (isActive) {\n\t\t\tlocalStorage.removeItem(\"selectedListItem\");\n\t\t\tselectItem(null, null, 9, { lat: 39.8283, lng: -98.5795 });\n\t\t} else {\n\t\t\tsetStorageObject(\"selectedListItem\", item);\n\t\t\tconsole.log('mapItems here', mapItems);\n\t\t\t//edited here for new structure of entity key\n\t\t\tconsole.log('the item in questions is',item);\n\t\t\tconst location = mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.fields.entityKey)) || null;\n\t\t\tconsole.log('location is', location);\n\t\t\tselectItem(item, location, 12, {\n\t\t\t\tlat: location?.latitude,\n\t\t\t\tlng: location?.longitude\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleItemClick = item => {\n\t\ttrackEvent(eventTypes.JOB_LISTING_SELECTED, {\n\t\t\tjobTitle: item.fields.title,\n\t\t\tjobCategory: item.fields.category,\n\t\t\tentityDisplayName: item?.mapDetails?.entityDisplayName\n\t\t});\n\n\t\tsetSelectedItemAndZoomMap(item, isActive);\n\t};\n\n\treturn (\n\t\t<MapAccordionItem\n\t\t\titem={item}\n\t\t\titemRefs={itemRefs}\n\t\t\titemExpandedContent={itemExpandedContent}\n\t\t\tisActive={isActive}\n\t\t\trecruiter={recruiters[item.recruiterId]}\n\t\t>\n\t\t\t<ListItemContainer\n\t\t\t\tshowMap={showMap}\n\t\t\t\titem={item}\n\t\t\t\tfieldsShown={fieldsShown}\n\t\t\t\tspecialFeatures={specialFeatures}\n\t\t\t\tisActive={isActive}\n\t\t\t\tonClick={() => handleItemClick(item)}\n\t\t\t/>\n\t\t</MapAccordionItem>\n\t);\n};\n\nexport default MapAccordionItemContainer;\n"],"names":["MapAccordionItemContainer","_ref","showMap","item","itemRefs","fieldsShown","itemExpandedContent","specialFeatures","isActive","_useMapList","useMapList","mapItems","recruiters","_useMap","useMap","selectItem","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","setSelectedItemAndZoomMap","localStorage","removeItem","lat","lng","setStorageObject","console","log","location","find","x","Object","prototype","hasOwnProperty","call","items","fields","entityKey","latitude","longitude","handleItemClick","_item$mapDetails","JOB_LISTING_SELECTED","jobTitle","title","jobCategory","category","entityDisplayName","mapDetails","React","createElement","MapAccordionItem","recruiter","recruiterId","ListItemContainer","onClick"],"mappings":";;;;;;;;AAQA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAAC,IAAA,EAQzB;AAAA,EAAA,IAPLC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IACJC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,WAAW,GAAAJ,IAAA,CAA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AEA,QAAS;AACnBE,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,IAAAA,QAAQ,EAAEA,QAAS;AACnB4C,IAAAA,SAAS,EAAExC,UAAU,CAACT,IAAI,CAACkD,WAAW,CAAA;AAAE,GAAA,eAExCJ,KAAA,CAAAC,aAAA,CAACI,iBAAiB,EAAA;AACjBpD,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,WAAW,EAAEA,WAAY;AACzBE,IAAAA,eAAe,EAAEA,eAAgB;AACjCC,IAAAA,QAAQ,EAAEA,QAAS;IACnB+C,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAMf,eAAe,CAACrC,IAAI,CAAC,CAAA;AAAA,KAAA;AAAC,GACrC,CACgB,CAAC,CAAA;AAErB;;;;"}
1
+ {"version":3,"file":"map-accordion-item-container.js","sources":["../../../../src/components/containers/accordions/map-accordion-item-container.js"],"sourcesContent":["import React from 'react';\nimport { useMap } from '~/contexts/mapContext';\nimport { useMapList } from '~/contexts/mapListContext';\nimport { useTrackEvent } from '~/contexts/trackEventContext';\nimport { setStorageObject } from '~/util/localStorageUtil';\nimport MapAccordionItem from '~/components/modules/accordions/MapAccordionItem';\nimport ListItemContainer from '~/components/containers/list/list-item/list-item-container';\n\nconst MapAccordionItemContainer = ({\n\tshowMap,\n\titem,\n\titemRefs,\n\tfieldsShown,\n\titemExpandedContent,\n\tspecialFeatures,\n\tisActive\n}) => {\n\tconst { mapItems, recruiters } = useMapList();\n\tconst { selectItem } = useMap();\n\tconst { trackEvent, eventTypes } = useTrackEvent();\n\n\tconst setSelectedItemAndZoomMap = (item, isActive) => {\n\t\tif (isActive) {\n\t\t\tlocalStorage.removeItem(\"selectedListItem\");\n\t\t\tselectItem(null, null, 9, { lat: 39.8283, lng: -98.5795 });\n\t\t} else {\n\t\t\tsetStorageObject(\"selectedListItem\", item);\n\t\t\tconsole.log('mapItems here', mapItems);\n\t\t\t//edited here for new structure of entity key\n\t\t\tconsole.log('the item in questions is',item);\n\t\t\tconst location = mapItems.find(x => x.entityKey?.toLowerCase() === item.fields.entityKey?.toLowerCase()) || null;\n\t\t\tconsole.log('location is', location);\n\t\t\tselectItem(item, location, 12, {\n\t\t\t\tlat: location?.latitude,\n\t\t\t\tlng: location?.longitude\n\t\t\t});\n\t\t}\n\t};\n\n\tconst handleItemClick = item => {\n\t\ttrackEvent(eventTypes.JOB_LISTING_SELECTED, {\n\t\t\tjobTitle: item.fields.title,\n\t\t\tjobCategory: item.fields.category,\n\t\t\tentityDisplayName: item?.mapDetails?.entityDisplayName\n\t\t});\n\n\t\tsetSelectedItemAndZoomMap(item, isActive);\n\t};\n\n\treturn (\n\t\t<MapAccordionItem\n\t\t\titem={item}\n\t\t\titemRefs={itemRefs}\n\t\t\titemExpandedContent={itemExpandedContent}\n\t\t\tisActive={isActive}\n\t\t\trecruiter={recruiters[item.recruiterId]}\n\t\t>\n\t\t\t<ListItemContainer\n\t\t\t\tshowMap={showMap}\n\t\t\t\titem={item}\n\t\t\t\tfieldsShown={fieldsShown}\n\t\t\t\tspecialFeatures={specialFeatures}\n\t\t\t\tisActive={isActive}\n\t\t\t\tonClick={() => handleItemClick(item)}\n\t\t\t/>\n\t\t</MapAccordionItem>\n\t);\n};\n\nexport default MapAccordionItemContainer;\n"],"names":["MapAccordionItemContainer","_ref","showMap","item","itemRefs","fieldsShown","itemExpandedContent","specialFeatures","isActive","_useMapList","useMapList","mapItems","recruiters","_useMap","useMap","selectItem","_useTrackEvent","useTrackEvent","trackEvent","eventTypes","setSelectedItemAndZoomMap","localStorage","removeItem","lat","lng","setStorageObject","console","log","location","find","x","_x$entityKey","_item$fields$entityKe","entityKey","toLowerCase","fields","latitude","longitude","handleItemClick","_item$mapDetails","JOB_LISTING_SELECTED","jobTitle","title","jobCategory","category","entityDisplayName","mapDetails","React","createElement","MapAccordionItem","recruiter","recruiterId","ListItemContainer","onClick"],"mappings":";;;;;;;;AAQA,IAAMA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,EAAExC,IAAI,CAACgC,MAAM,CAACS,QAAQ;AACjCC,MAAAA,iBAAiB,EAAE1C,IAAI,KAAJA,IAAAA,IAAAA,IAAI,gBAAAoC,gBAAA,GAAJpC,IAAI,CAAE2C,UAAU,MAAA,IAAA,IAAAP,gBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhBA,gBAAA,CAAkBM,iBAAAA;AACtC,KAAC,CAAC,CAAA;AAEFzB,IAAAA,yBAAyB,CAACjB,IAAI,EAAEK,QAAQ,CAAC,CAAA;GACzC,CAAA;AAED,EAAA,oBACCuC,KAAA,CAAAC,aAAA,CAACC,gBAAgB,EAAA;AAChB9C,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,QAAQ,EAAEA,QAAS;AACnBE,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzCE,IAAAA,QAAQ,EAAEA,QAAS;AACnB0C,IAAAA,SAAS,EAAEtC,UAAU,CAACT,IAAI,CAACgD,WAAW,CAAA;AAAE,GAAA,eAExCJ,KAAA,CAAAC,aAAA,CAACI,iBAAiB,EAAA;AACjBlD,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,IAAI,EAAEA,IAAK;AACXE,IAAAA,WAAW,EAAEA,WAAY;AACzBE,IAAAA,eAAe,EAAEA,eAAgB;AACjCC,IAAAA,QAAQ,EAAEA,QAAS;IACnB6C,OAAO,EAAE,SAAAA,OAAA,GAAA;MAAA,OAAMf,eAAe,CAACnC,IAAI,CAAC,CAAA;AAAA,KAAA;AAAC,GACrC,CACgB,CAAC,CAAA;AAErB;;;;"}
@@ -79,7 +79,8 @@ const MapListProvider = ({ children, siteConfig, resetFilters, navigateToDetails
79
79
  listing.fields.entityKey &&
80
80
  listing.fields.entityKey !== '') {
81
81
  const entityKey = listing.fields.entityKey;
82
- const travelTime = fetchedEntities[entityKey]?.travelTime;
82
+ // Try exact match first, then lowercase match for case-insensitive lookup
83
+ const travelTime = (fetchedEntities[entityKey] || fetchedEntities[entityKey.toLowerCase()])?.travelTime;
83
84
  if (travelTime !== undefined && listing.fields) {
84
85
  listing.fields.travelTime = travelTime;
85
86
  }
@@ -1 +1 @@
1
- {"version":3,"file":"mapListContext.js","sources":["../../src/contexts/mapListContext.tsx"],"sourcesContent":["import React, { createContext, useState, useEffect, useContext, ReactNode } from 'react';\n\nimport { generateFilterOptions, applyFilters, filterListingsByLocation } from '~/util/filterUtil';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { updateURLWithFilters, filtersFromURL } from '~/util/urlFilterUtil';\n\nimport { getListingEntities } from \"~/services/listingEntityService\";\nimport fetchListings from '~/services/listingAggregatorService';\n\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\nimport { Recruiter } from '~/types/Recruiter';\nimport { MapConfig, MapConfig as SiteConfig } from '~/types/config/MapConfig';\nimport { get } from 'http';\n\ninterface MapListContextProps {\n loading: boolean;\n allListings: Listing[];\n filteredListings: Listing[];\n mapItems: any;\n query: string | null;\n setNewFilteredListings: (filteredListings: Listing[]) => void;\n setQuery: (query: string | null) => void;\n listingEntities: Record<number, ListingEntity> | null;\n selectedFilters: Record<string, any>;\n setSelectedFilters: (filters: Record<string, any>) => void;\n filterOptions: any;\n recruiters: Record<number, Recruiter>;\n handleFilterListingsByLocation: (selectedLocation: any) => void;\n filterDialogIsOpen: boolean;\n setFilterDialogIsOpen: (isOpen: boolean) => void;\n setMobileTab: (tab: string) => void;\n mobileTab: string;\n siteConfig: SiteConfig;\n favorites: number[];\n resetEntityFilter: () => void;\n handleSettingFavorites: (favorites: number[] | null) => void;\n setFilterByFavorites: (filter: boolean) => void;\n filterByFavorites: boolean;\n commuteLocation: any | null;\n setCommuteLocation: (location: any | null) => void;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n sortSetting: { field: string; type: string };\n setSortSetting: (setting: { field: string; type: string }) => void;\n trackEvent: (event: string) => void;\n defaultFilters?: Record<string, any>;\n hiddenFilters?: string[];\n containerStyle?: any;\n ExpandListComponent?: React.ComponentType<{ listing: any }> | ((listing: any) => JSX.Element) | null;\n noEntities?: boolean;\n}\n\nconst MapListContext = createContext<MapListContextProps | undefined>(undefined);\n\nexport const useMapList = () => {\n\tconst context = useContext(MapListContext);\n\tif (!context) {\n\t\tthrow new Error('useMapList must be used within a MapListProvider');\n\t}\n\treturn context;\n};\n\nconst getQuery = (): string | null => {\n\tlet query: string | null = null;\n\tif (typeof window !== 'undefined') {\n\t\tquery = localStorage.getItem('query');\n\t}\n\treturn query;\n};\n\ninterface MapListProviderProps {\n children: ReactNode;\n siteConfig: MapConfig;\n resetFilters: boolean;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n trackEvent: (event: string) => void;\n listings?: Listing[];\n\tentities?: ListingEntity[];\n setFiltersUrl?:boolean;\n hiddenFilters?: string[];\n handleUrlUpdate: (searchParams: string) => void;\n defaultFilters?: Record<string, any>;\n containerStyle?: any;\n\tlocalStorageKey: string;\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<any>;\n ExpandListComponent?: React.ComponentType<{ listing: Listing }> | ((listing: Listing) => JSX.Element) | null;\n hideMap?: boolean;\n hideFilters?: boolean;\n noEntities?: boolean;\n}\n\nexport const MapListProvider: React.FC<MapListProviderProps> = ({\n\tchildren,\n\tsiteConfig,\n\tresetFilters,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\ttrackEvent,\n\tlistings = [],\n\tentities = [],\n\tsetFiltersUrl,\n\thiddenFilters,\n\thandleUrlUpdate,\n\tdefaultFilters,\n\tcontainerStyle,\n\tExpandListComponent,\n\tgetListingEntitiesCallback,\n\tlocalStorageKey,\n\thideMap = false,\n\thideFilters = false,\n\tnoEntities = false\n}) => {\n\tconst firstLoadFilters = () =>{\n\t\tlet urlFilters = filtersFromURL(window.location)?.filters;\n\t\treturn (setFiltersUrl === true && urlFilters && Object.keys(urlFilters).length > 0) ? urlFilters : getStorageObject(localStorageKey + 'selectedFilters', {}) || {}\n\t}\n\tconst [allListings, setAllListings] = useState<Listing[]>([]);\n\tconst [filteredListings, setFilteredListings] = useState<Listing[]>([]);\n\tconst [loading, setLoading] = useState<boolean>(false);\n\tconst [mapItems, setMapItems] = useState<any>(getStorageObject('mapItems', []) || []);\n\tconst [query, setQuery] = useState<string | null>(() => resetFilters ? null : getQuery());\n\tconst [sortSetting, setSortSetting] = useState<{ field: string; type: string }>(getStorageObject('sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' });\n\tconst [listingEntities, setListingEntities] = useState<Record<number, ListingEntity> | null>({});\n\tconst [firstLoad, setFirstLoad] = useState<boolean>(true);\n\tconst [commuteLocation, setCommuteLocation] = useState<any | null>(getStorageObject('commuteLocation'));\n\tconst [selectedFilters, setSelectedFilters] = useState<Record<string, any>>(() => resetFilters ? {} : firstLoadFilters());\n\tconst [filterOptions, setFilterOptions] = useState<any>();\n\tconst [recruiters, setRecruiters] = useState<Record<number, Recruiter>>({});\n\tconst [filterDialogIsOpen, setFilterDialogIsOpen] = useState<boolean>(false);\n\tconst [mobileTab, setMobileTab] = useState<string>(\"listTab\");\n\tconst [favorites, setFavorites] = useState<number[]>([]);\n\tconst [filterByFavorites, setFilterByFavorites] = useState<boolean>(false);\n\n\tconst setNewFilteredListings = (filteredListings: Listing[]) => {\n\t\tsetFilteredListings(filteredListings);\n\t};\n\n\tuseEffect(() => {\n\t\tif (!sortSetting) return;\n\t\tlocalStorage.setItem('sortSetting', JSON.stringify(sortSetting));\n\t\tsetNewFilteredListings(filteredListings);\n\t}, [sortSetting]);\n\n\tuseEffect(() => {\n\t\tconst loadedFavorites = JSON.parse(localStorage.getItem('favorites') || '[]');\n\t\tsetFavorites(loadedFavorites);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(\"commuteLocation\", commuteLocation);\n\t}, [commuteLocation]);\n\n\n\tuseEffect(() => {\n\t\tif (!commuteLocation || noEntities) return;\n\n\t\tasync function fetchEntities() {\n\t\t\ttry {\n\t\t\t\tlet fetchedEntities;\n\t\t\t\tif (getListingEntitiesCallback) {\n\t\t\t\t\tfetchedEntities = await getListingEntitiesCallback(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t} else {\n\t\t\t\t\tfetchedEntities = await getListingEntities(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t}\n\t\t\t\tsetListingEntities(fetchedEntities);\n\t\t\t\t// Update travelTime on listings\n\t\t\t\tconst newFilteredListings: Listing[] = [...filteredListings];\n\t\t\t\tfor (let i = 0; i < allListings.length; i++) {\n\t\t\t\t\tconst listing = newFilteredListings[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\tlisting &&\n\t\t\t\t\t\tlisting.fields &&\n\t\t\t\t\t\tlisting.fields.entityKey &&\n\t\t\t\t\t\tlisting.fields.entityKey !== ''\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst entityKey = listing.fields.entityKey;\n\t\t\t\t\t\tconst travelTime = fetchedEntities[entityKey]?.travelTime;\n\t\t\t\t\t\tif (travelTime !== undefined && listing.fields) {\n\t\t\t\t\t\t\tlisting.fields.travelTime = travelTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to fetch listing entities:\", error);\n\t\t\t}\n\t\t}\n\n\t\tfetchEntities();\n\t}, [commuteLocation, allListings, siteConfig.companyId, getListingEntitiesCallback, noEntities]);\n\n\tuseEffect(() => {\n\t\tconst handleFetchListings = async () => {\n\t\tif (!(getStorageObject('listings', []) || []).length) {\n\t\t\tsetLoading(true);\n\t\t}\n\n\t\ttry {\n\t\t\tconst {\n\t\t\t\tlistingsResult,\n\t\t\t\tentitiesByKey,\n\t\t\t\tdistinctItems\n\t\t\t} = await fetchListings(commuteLocation, entities, listings, getListingEntitiesCallback, noEntities);\n\t\t\tif (defaultFilters) {\n\t\t\t\tconst filteredListings = listingsResult.filter(listing => {\n\t\t\t\tif (!listing.fields) return false;\n\n\t\t\t\treturn Object.keys(defaultFilters).every(filterKey => {\n\t\t\t\t\tconst filterValues = defaultFilters[filterKey as keyof typeof defaultFilters];\n\t\t\t\t\tconst listingValue = listing.fields ? listing.fields[filterKey as keyof typeof listing.fields] : null;\n\t\t\t\t\treturn filterValues.includes(listingValue);\n\t\t\t\t});\n\t\t\t});\n\t\t\tsetAllListings(filteredListings);\n\t\t} else {\n\t\t\tsetAllListings(listingsResult);\n\t\t}\n\t\t\tsetListingEntities(entitiesByKey);\n\t\t\t\tsetMapItems(distinctItems);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t};\n\t\thandleFetchListings();\n\t}, [query, siteConfig, commuteLocation]);\n\n\tuseEffect(() => {\n\t\tconst processListings = () => {\n\t\t\tlet filteredListings: Listing[];\n\t\t\tlet tempSelectedFilters = selectedFilters;\n\t\t\tlet tempQuery = query;\n\n\t\t\tconst { mapItems, filteredListings: tempFilteredListings } = applyFilters(\n\t\t\t\tallListings,\n\t\t\t\ttempSelectedFilters,\n\t\t\t\ttempQuery,\n\t\t\t\tlistingEntities,\n\t\t\t\tfavorites,\n\t\t\t\tsiteConfig\n\t\t\t);\n\t\t\tfilteredListings = tempFilteredListings;\n\n\t\t\tif (filterByFavorites) {\n\t\t\t\tfilteredListings = filteredListings.filter((x: Listing) => favorites.includes(x.id));\n\t\t\t}\n\t\t\tsetNewFilteredListings(filteredListings);\n\t\t\tif (firstLoad && tempSelectedFilters) {\n\t\t\t\t// Update URL with filters if needed\n\t\t\t} else if (Object.keys(tempSelectedFilters).length === 0 && !firstLoad) {\n\t\t\t\tlocalStorage.removeItem('selectedFilters');\n\t\t\t} else if (!firstLoad) {\n\t\t\t\tsetStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);\n\t\t\t}\n\t\t\tif(setFiltersUrl === true)\n\t\t\t{\n\t\t\t\tupdateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);\n\t\t\t}\n\t\t\ttempQuery != null ? localStorage.setItem('query', tempQuery) : localStorage.removeItem('query');\n\t\t\tsetMapItems(mapItems);\n\n\t\t\tif (tempSelectedFilters) {\n\t\t\t\tconst keys = Object.keys(tempSelectedFilters);\n\t\t\t\tconst lastKey = keys[keys.length - 1];\n\t\t\t\tconst options = generateFilterOptions(\n\t\t\t\t\tfilteredListings,\n\t\t\t\t\tallListings,\n\t\t\t\t\tsiteConfig,\n\t\t\t\t\tfilterOptions,\n\t\t\t\t\tlastKey,\n\t\t\t\t\tfavorites,\n\t\t\t\t\ttempSelectedFilters\n\t\t\t\t);\n\t\t\t\tif (options) {\n\t\t\t\t\tsetFilterOptions(options);\n\t\t\t\t\tif (firstLoad) setFirstLoad(false);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tprocessListings();\n\t}, [selectedFilters, query, listingEntities, filterByFavorites, favorites]);\n\n\tconst handleFilterListingsByLocation = (selectedLocation: any) => {\n\t\tconst { filteredListings } = filterListingsByLocation(\n\t\t\tallListings,\n\t\t\tselectedLocation,\n\t\t\tlistingEntities\n\t\t);\n\t\tsetNewFilteredListings(filteredListings);\n\t};\n\n\tconst resetEntityFilter = () => {\n\t\tlet newFilters = {...selectedFilters};\n\t\tdelete newFilters.entityId;\n\t\tsetSelectedFilters(newFilters);\n\t}\n\n\tconst handleSettingFavorites = (newFavorites: number[] | null) => {\n\t\tif (newFavorites == null) {\n\t\t\tlocalStorage.removeItem('favorites');\n\t\t} else {\n\t\t\tsetFavorites(newFavorites);\n\t\t\tlocalStorage.setItem('favorites', JSON.stringify(newFavorites));\n\t\t}\n\t};\n\n\treturn (\n\t\t<MapListContext.Provider value={{\n\t\t\tloading,\n\t\t\tallListings,\n\t\t\tfilteredListings,\n\t\t\tmapItems,\n\t\t\tquery,\n\t\t\tsetNewFilteredListings,\n\t\t\tsetQuery,\n\t\t\tlistingEntities,\n\t\t\tselectedFilters,\n\t\t\tsetSelectedFilters,\n\t\t\tfilterOptions,\n\t\t\trecruiters,\n\t\t\thandleFilterListingsByLocation,\n\t\t\tfilterDialogIsOpen,\n\t\t\tsetFilterDialogIsOpen,\n\t\t\tsetMobileTab,\n\t\t\tmobileTab,\n\t\t\tsiteConfig,\n\t\t\tfavorites,\n\t\t\thandleSettingFavorites,\n\t\t\tresetEntityFilter,\n\t\t\tsetFilterByFavorites,\n\t\t\tfilterByFavorites,\n\t\t\tcommuteLocation,\n\t\t\tsetCommuteLocation,\n\t\t\tnavigateToDetails,\n\t\t\tnavigateToEasyApply,\n\t\t\tLink,\n\t\t\tlinkFormat,\n\t\t\teasyApplyUrl,\n\t\t\teasyApplyText,\n\t\t\tisIframe,\n\t\t\tsortSetting,\n\t\t\tsetSortSetting,\n\t\t\ttrackEvent,\n\t\t\tdefaultFilters,\n\t\t\thiddenFilters,\n\t\t\tcontainerStyle,\n\t\t\tExpandListComponent,\n\t\t\tnoEntities\n\t\t}}>\n\t\t\t{children}\n\t\t</MapListContext.Provider>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;AA0DA,MAAM,cAAc,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAE1E,MAAM,UAAU,GAAG,MAAK;AAC9B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACb,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACpE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AAChB,EAAE;AAEF,MAAM,QAAQ,GAAG,MAAoB;IACpC,IAAI,KAAK,GAAkB,IAAI,CAAC;AAChC,IAAA,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CAAA,cAAc,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE;YAC/B,OAAO;YACP,WAAW;YACX,gBAAgB;YAChB,QAAQ;YACR,KAAK;YACL,sBAAsB;YACtB,QAAQ;YACR,eAAe;YACf,eAAe;YACf,kBAAkB;YAClB,aAAa;YACb,UAAU;YACV,8BAA8B;YAC9B,kBAAkB;YAClB,qBAAqB;YACrB,YAAY;YACZ,SAAS;YACT,UAAU;YACV,SAAS;YACT,sBAAsB;YACtB,iBAAiB;YACjB,oBAAoB;YACpB,iBAAiB;YACjB,eAAe;YACf,kBAAkB;YAClB,iBAAiB;YACjB,mBAAmB;YACnB,IAAI;YACJ,UAAU;YACV,YAAY;YACZ,aAAa;YACb,QAAQ;YACR,WAAW;YACX,cAAc;YACd,UAAU;YACV,cAAc;YACd,aAAa;YACb,cAAc;YACd,mBAAmB;YACnB,UAAU;SACV,EACC,EAAA,QAAQ,CACgB,EACzB;AACH;;;;"}
1
+ {"version":3,"file":"mapListContext.js","sources":["../../src/contexts/mapListContext.tsx"],"sourcesContent":["import React, { createContext, useState, useEffect, useContext, ReactNode } from 'react';\n\nimport { generateFilterOptions, applyFilters, filterListingsByLocation } from '~/util/filterUtil';\nimport { getStorageObject, setStorageObject } from '~/util/localStorageUtil';\nimport { updateURLWithFilters, filtersFromURL } from '~/util/urlFilterUtil';\n\nimport { getListingEntities } from \"~/services/listingEntityService\";\nimport fetchListings from '~/services/listingAggregatorService';\n\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\nimport { Recruiter } from '~/types/Recruiter';\nimport { MapConfig, MapConfig as SiteConfig } from '~/types/config/MapConfig';\nimport { get } from 'http';\n\ninterface MapListContextProps {\n loading: boolean;\n allListings: Listing[];\n filteredListings: Listing[];\n mapItems: any;\n query: string | null;\n setNewFilteredListings: (filteredListings: Listing[]) => void;\n setQuery: (query: string | null) => void;\n listingEntities: Record<number, ListingEntity> | null;\n selectedFilters: Record<string, any>;\n setSelectedFilters: (filters: Record<string, any>) => void;\n filterOptions: any;\n recruiters: Record<number, Recruiter>;\n handleFilterListingsByLocation: (selectedLocation: any) => void;\n filterDialogIsOpen: boolean;\n setFilterDialogIsOpen: (isOpen: boolean) => void;\n setMobileTab: (tab: string) => void;\n mobileTab: string;\n siteConfig: SiteConfig;\n favorites: number[];\n resetEntityFilter: () => void;\n handleSettingFavorites: (favorites: number[] | null) => void;\n setFilterByFavorites: (filter: boolean) => void;\n filterByFavorites: boolean;\n commuteLocation: any | null;\n setCommuteLocation: (location: any | null) => void;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n sortSetting: { field: string; type: string };\n setSortSetting: (setting: { field: string; type: string }) => void;\n trackEvent: (event: string) => void;\n defaultFilters?: Record<string, any>;\n hiddenFilters?: string[];\n containerStyle?: any;\n ExpandListComponent?: React.ComponentType<{ listing: any }> | ((listing: any) => JSX.Element) | null;\n noEntities?: boolean;\n}\n\nconst MapListContext = createContext<MapListContextProps | undefined>(undefined);\n\nexport const useMapList = () => {\n\tconst context = useContext(MapListContext);\n\tif (!context) {\n\t\tthrow new Error('useMapList must be used within a MapListProvider');\n\t}\n\treturn context;\n};\n\nconst getQuery = (): string | null => {\n\tlet query: string | null = null;\n\tif (typeof window !== 'undefined') {\n\t\tquery = localStorage.getItem('query');\n\t}\n\treturn query;\n};\n\ninterface MapListProviderProps {\n children: ReactNode;\n siteConfig: MapConfig;\n resetFilters: boolean;\n navigateToDetails: (id: number) => void;\n navigateToEasyApply: (id: number) => void;\n Link: React.ComponentType<any>;\n linkFormat: string;\n easyApplyUrl: string;\n easyApplyText: string;\n\tisIframe: boolean;\n trackEvent: (event: string) => void;\n listings?: Listing[];\n\tentities?: ListingEntity[];\n setFiltersUrl?:boolean;\n hiddenFilters?: string[];\n handleUrlUpdate: (searchParams: string) => void;\n defaultFilters?: Record<string, any>;\n containerStyle?: any;\n\tlocalStorageKey: string;\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<any>;\n ExpandListComponent?: React.ComponentType<{ listing: Listing }> | ((listing: Listing) => JSX.Element) | null;\n hideMap?: boolean;\n hideFilters?: boolean;\n noEntities?: boolean;\n}\n\nexport const MapListProvider: React.FC<MapListProviderProps> = ({\n\tchildren,\n\tsiteConfig,\n\tresetFilters,\n\tnavigateToDetails,\n\tnavigateToEasyApply,\n\tLink,\n\tlinkFormat,\n\teasyApplyUrl,\n\teasyApplyText,\n\tisIframe,\n\ttrackEvent,\n\tlistings = [],\n\tentities = [],\n\tsetFiltersUrl,\n\thiddenFilters,\n\thandleUrlUpdate,\n\tdefaultFilters,\n\tcontainerStyle,\n\tExpandListComponent,\n\tgetListingEntitiesCallback,\n\tlocalStorageKey,\n\thideMap = false,\n\thideFilters = false,\n\tnoEntities = false\n}) => {\n\tconst firstLoadFilters = () =>{\n\t\tlet urlFilters = filtersFromURL(window.location)?.filters;\n\t\treturn (setFiltersUrl === true && urlFilters && Object.keys(urlFilters).length > 0) ? urlFilters : getStorageObject(localStorageKey + 'selectedFilters', {}) || {}\n\t}\n\tconst [allListings, setAllListings] = useState<Listing[]>([]);\n\tconst [filteredListings, setFilteredListings] = useState<Listing[]>([]);\n\tconst [loading, setLoading] = useState<boolean>(false);\n\tconst [mapItems, setMapItems] = useState<any>(getStorageObject('mapItems', []) || []);\n\tconst [query, setQuery] = useState<string | null>(() => resetFilters ? null : getQuery());\n\tconst [sortSetting, setSortSetting] = useState<{ field: string; type: string }>(getStorageObject('sortSetting', { field: 'position', type: 'asc' }) || { field: 'position', type: 'asc' });\n\tconst [listingEntities, setListingEntities] = useState<Record<number, ListingEntity> | null>({});\n\tconst [firstLoad, setFirstLoad] = useState<boolean>(true);\n\tconst [commuteLocation, setCommuteLocation] = useState<any | null>(getStorageObject('commuteLocation'));\n\tconst [selectedFilters, setSelectedFilters] = useState<Record<string, any>>(() => resetFilters ? {} : firstLoadFilters());\n\tconst [filterOptions, setFilterOptions] = useState<any>();\n\tconst [recruiters, setRecruiters] = useState<Record<number, Recruiter>>({});\n\tconst [filterDialogIsOpen, setFilterDialogIsOpen] = useState<boolean>(false);\n\tconst [mobileTab, setMobileTab] = useState<string>(\"listTab\");\n\tconst [favorites, setFavorites] = useState<number[]>([]);\n\tconst [filterByFavorites, setFilterByFavorites] = useState<boolean>(false);\n\n\tconst setNewFilteredListings = (filteredListings: Listing[]) => {\n\t\tsetFilteredListings(filteredListings);\n\t};\n\n\tuseEffect(() => {\n\t\tif (!sortSetting) return;\n\t\tlocalStorage.setItem('sortSetting', JSON.stringify(sortSetting));\n\t\tsetNewFilteredListings(filteredListings);\n\t}, [sortSetting]);\n\n\tuseEffect(() => {\n\t\tconst loadedFavorites = JSON.parse(localStorage.getItem('favorites') || '[]');\n\t\tsetFavorites(loadedFavorites);\n\t}, []);\n\n\tuseEffect(() => {\n\t\tsetStorageObject(\"commuteLocation\", commuteLocation);\n\t}, [commuteLocation]);\n\n\n\tuseEffect(() => {\n\t\tif (!commuteLocation || noEntities) return;\n\n\t\tasync function fetchEntities() {\n\t\t\ttry {\n\t\t\t\tlet fetchedEntities;\n\t\t\t\tif (getListingEntitiesCallback) {\n\t\t\t\t\tfetchedEntities = await getListingEntitiesCallback(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t} else {\n\t\t\t\t\tfetchedEntities = await getListingEntities(`${commuteLocation.lat}, ${commuteLocation.lng}`);\n\t\t\t\t}\n\t\t\t\tsetListingEntities(fetchedEntities);\n\t\t\t\t// Update travelTime on listings\n\t\t\t\tconst newFilteredListings: Listing[] = [...filteredListings];\n\t\t\t\tfor (let i = 0; i < allListings.length; i++) {\n\t\t\t\t\tconst listing = newFilteredListings[i];\n\t\t\t\t\tif (\n\t\t\t\t\t\tlisting &&\n\t\t\t\t\t\tlisting.fields &&\n\t\t\t\t\t\tlisting.fields.entityKey &&\n\t\t\t\t\t\tlisting.fields.entityKey !== ''\n\t\t\t\t\t) {\n\t\t\t\t\t\tconst entityKey = listing.fields.entityKey;\n\t\t\t\t\t\t// Try exact match first, then lowercase match for case-insensitive lookup\n\t\t\t\t\t\tconst travelTime = (fetchedEntities[entityKey] || fetchedEntities[entityKey.toLowerCase()])?.travelTime;\n\t\t\t\t\t\tif (travelTime !== undefined && listing.fields) {\n\t\t\t\t\t\t\tlisting.fields.travelTime = travelTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to fetch listing entities:\", error);\n\t\t\t}\n\t\t}\n\n\t\tfetchEntities();\n\t}, [commuteLocation, allListings, siteConfig.companyId, getListingEntitiesCallback, noEntities]);\n\n\tuseEffect(() => {\n\t\tconst handleFetchListings = async () => {\n\t\tif (!(getStorageObject('listings', []) || []).length) {\n\t\t\tsetLoading(true);\n\t\t}\n\n\t\ttry {\n\t\t\tconst {\n\t\t\t\tlistingsResult,\n\t\t\t\tentitiesByKey,\n\t\t\t\tdistinctItems\n\t\t\t} = await fetchListings(commuteLocation, entities, listings, getListingEntitiesCallback, noEntities);\n\t\t\tif (defaultFilters) {\n\t\t\t\tconst filteredListings = listingsResult.filter(listing => {\n\t\t\t\tif (!listing.fields) return false;\n\n\t\t\t\treturn Object.keys(defaultFilters).every(filterKey => {\n\t\t\t\t\tconst filterValues = defaultFilters[filterKey as keyof typeof defaultFilters];\n\t\t\t\t\tconst listingValue = listing.fields ? listing.fields[filterKey as keyof typeof listing.fields] : null;\n\t\t\t\t\treturn filterValues.includes(listingValue);\n\t\t\t\t});\n\t\t\t});\n\t\t\tsetAllListings(filteredListings);\n\t\t} else {\n\t\t\tsetAllListings(listingsResult);\n\t\t}\n\t\t\tsetListingEntities(entitiesByKey);\n\t\t\t\tsetMapItems(distinctItems);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.log(error);\n\t\t\t}\n\t\t\tsetLoading(false);\n\t\t};\n\t\thandleFetchListings();\n\t}, [query, siteConfig, commuteLocation]);\n\n\tuseEffect(() => {\n\t\tconst processListings = () => {\n\t\t\tlet filteredListings: Listing[];\n\t\t\tlet tempSelectedFilters = selectedFilters;\n\t\t\tlet tempQuery = query;\n\n\t\t\tconst { mapItems, filteredListings: tempFilteredListings } = applyFilters(\n\t\t\t\tallListings,\n\t\t\t\ttempSelectedFilters,\n\t\t\t\ttempQuery,\n\t\t\t\tlistingEntities,\n\t\t\t\tfavorites,\n\t\t\t\tsiteConfig\n\t\t\t);\n\t\t\tfilteredListings = tempFilteredListings;\n\n\t\t\tif (filterByFavorites) {\n\t\t\t\tfilteredListings = filteredListings.filter((x: Listing) => favorites.includes(x.id));\n\t\t\t}\n\t\t\tsetNewFilteredListings(filteredListings);\n\t\t\tif (firstLoad && tempSelectedFilters) {\n\t\t\t\t// Update URL with filters if needed\n\t\t\t} else if (Object.keys(tempSelectedFilters).length === 0 && !firstLoad) {\n\t\t\t\tlocalStorage.removeItem('selectedFilters');\n\t\t\t} else if (!firstLoad) {\n\t\t\t\tsetStorageObject(localStorageKey + 'selectedFilters', tempSelectedFilters);\n\t\t\t}\n\t\t\tif(setFiltersUrl === true)\n\t\t\t{\n\t\t\t\tupdateURLWithFilters(tempSelectedFilters, window.location, tempQuery, handleUrlUpdate);\n\t\t\t}\n\t\t\ttempQuery != null ? localStorage.setItem('query', tempQuery) : localStorage.removeItem('query');\n\t\t\tsetMapItems(mapItems);\n\n\t\t\tif (tempSelectedFilters) {\n\t\t\t\tconst keys = Object.keys(tempSelectedFilters);\n\t\t\t\tconst lastKey = keys[keys.length - 1];\n\t\t\t\tconst options = generateFilterOptions(\n\t\t\t\t\tfilteredListings,\n\t\t\t\t\tallListings,\n\t\t\t\t\tsiteConfig,\n\t\t\t\t\tfilterOptions,\n\t\t\t\t\tlastKey,\n\t\t\t\t\tfavorites,\n\t\t\t\t\ttempSelectedFilters\n\t\t\t\t);\n\t\t\t\tif (options) {\n\t\t\t\t\tsetFilterOptions(options);\n\t\t\t\t\tif (firstLoad) setFirstLoad(false);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tprocessListings();\n\t}, [selectedFilters, query, listingEntities, filterByFavorites, favorites]);\n\n\tconst handleFilterListingsByLocation = (selectedLocation: any) => {\n\t\tconst { filteredListings } = filterListingsByLocation(\n\t\t\tallListings,\n\t\t\tselectedLocation,\n\t\t\tlistingEntities\n\t\t);\n\t\tsetNewFilteredListings(filteredListings);\n\t};\n\n\tconst resetEntityFilter = () => {\n\t\tlet newFilters = {...selectedFilters};\n\t\tdelete newFilters.entityId;\n\t\tsetSelectedFilters(newFilters);\n\t}\n\n\tconst handleSettingFavorites = (newFavorites: number[] | null) => {\n\t\tif (newFavorites == null) {\n\t\t\tlocalStorage.removeItem('favorites');\n\t\t} else {\n\t\t\tsetFavorites(newFavorites);\n\t\t\tlocalStorage.setItem('favorites', JSON.stringify(newFavorites));\n\t\t}\n\t};\n\n\treturn (\n\t\t<MapListContext.Provider value={{\n\t\t\tloading,\n\t\t\tallListings,\n\t\t\tfilteredListings,\n\t\t\tmapItems,\n\t\t\tquery,\n\t\t\tsetNewFilteredListings,\n\t\t\tsetQuery,\n\t\t\tlistingEntities,\n\t\t\tselectedFilters,\n\t\t\tsetSelectedFilters,\n\t\t\tfilterOptions,\n\t\t\trecruiters,\n\t\t\thandleFilterListingsByLocation,\n\t\t\tfilterDialogIsOpen,\n\t\t\tsetFilterDialogIsOpen,\n\t\t\tsetMobileTab,\n\t\t\tmobileTab,\n\t\t\tsiteConfig,\n\t\t\tfavorites,\n\t\t\thandleSettingFavorites,\n\t\t\tresetEntityFilter,\n\t\t\tsetFilterByFavorites,\n\t\t\tfilterByFavorites,\n\t\t\tcommuteLocation,\n\t\t\tsetCommuteLocation,\n\t\t\tnavigateToDetails,\n\t\t\tnavigateToEasyApply,\n\t\t\tLink,\n\t\t\tlinkFormat,\n\t\t\teasyApplyUrl,\n\t\t\teasyApplyText,\n\t\t\tisIframe,\n\t\t\tsortSetting,\n\t\t\tsetSortSetting,\n\t\t\ttrackEvent,\n\t\t\tdefaultFilters,\n\t\t\thiddenFilters,\n\t\t\tcontainerStyle,\n\t\t\tExpandListComponent,\n\t\t\tnoEntities\n\t\t}}>\n\t\t\t{children}\n\t\t</MapListContext.Provider>\n\t);\n};\n"],"names":[],"mappings":";;;;;;;AA0DA,MAAM,cAAc,GAAG,aAAa,CAAkC,SAAS,CAAC,CAAC;AAE1E,MAAM,UAAU,GAAG,MAAK;AAC9B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACb,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACpE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AAChB,EAAE;AAEF,MAAM,QAAQ,GAAG,MAAoB;IACpC,IAAI,KAAK,GAAkB,IAAI,CAAC;AAChC,IAAA,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AAClC,QAAA,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AACtC,KAAA;AACD,IAAA,OAAO,KAAK,CAAC;AACd,CAAC,CAAC;AA6BK,MAAM,eAAe,GAAmC,CAAC,EAC/D,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACV,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,EAAE,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,OAAO,GAAG,KAAK,EACf,WAAW,GAAG,KAAK,EACnB,UAAU,GAAG,KAAK,EAClB,KAAI;IACJ,MAAM,gBAAgB,GAAG,MAAK;QAC7B,IAAI,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;AAC1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const fetchListings = async (commuteLocation = null, entities, listings, getList
15
15
  for (let i = 0; i < listingsResult.length; i++) {
16
16
  const listing = listingsResult[i];
17
17
  if (listing.fields && listing.fields.entityKey && listing.fields.entityKey !== '' && listing.fields) {
18
- const entity = entitiesByKey[listing.fields.entityKey];
18
+ // Try exact match first, then lowercase match for case-insensitive lookup
19
+ const entity = entitiesByKey[listing.fields.entityKey] || entitiesByKey[listing.fields.entityKey.toLowerCase()];
19
20
  console.log("Entity for listing with travel time", listing.fields.entityKey, entity);
20
21
  if (entity) {
21
22
  listing.fields.travelTime = entity.travelTime;
@@ -1 +1 @@
1
- {"version":3,"file":"listingAggregatorService.js","sources":["../../src/services/listingAggregatorService.ts"],"sourcesContent":["import { getListings } from '~/services/listingService';\nimport { getListingEntities } from '~/services/listingEntityService';\nimport { getDistinctItemsByProximity } from '~/util/mapUtil';\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\n\ninterface FetchListingsResult {\n listingsResult: Listing[];\n entitiesByKey: Record<string, ListingEntity>;\n\n distinctItems: any; // Update this type based on the return type of getDistinctItemsByProximity\n}\n\nconst fetchListings = async (\n\tcommuteLocation: any | null = null,\n\tentities: ListingEntity[] | null,\n\tlistings: Listing[] | null,\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<ListingEntity[]>,\n\tnoEntities: boolean = false\n): Promise<FetchListingsResult> => {\n\ttry {\n\t\tconst listingsResult = listings && listings.length > 0 ? listings : await getListings();\n\n\t\t// Only fetch entities if noEntities is false\n\t\tconst fetchedEntities = noEntities ? {} : (\n\t\t\t!commuteLocation\n\t\t\t\t? entities && entities.length > 0 ? entities : !getListingEntitiesCallback ? await getListingEntities() : await getListingEntitiesCallback()\n\t\t\t\t: !getListingEntitiesCallback ? await getListingEntities(\n\t\t\t\t\t`${commuteLocation.lat}, ${commuteLocation.lng}`\n\t\t\t\t) : await getListingEntitiesCallback(\n\t\t\t\t\t`${commuteLocation.lat}, ${commuteLocation.lng}`)\n\t\t);\n\t\t const entitiesByKey = fetchedEntities;\n\t\t// Update travel time only if entities were fetched\n\t\tif (!noEntities && entitiesByKey) {\n\t\t\tfor (let i = 0; i < listingsResult.length; i++) {\n\t\t\t\tconst listing = listingsResult[i];\n\t\t\t\tif (listing.fields && listing.fields.entityKey && listing.fields.entityKey !== '' && listing.fields) {\n\t\t\t\t\tconst entity = entitiesByKey[listing.fields.entityKey];\n\t\t\t\t\tconsole.log(\"Entity for listing with travel time\", listing.fields.entityKey, entity);\n\n\t\t\t\t\tif (entity) {\n\t\t\t\t\t\tlisting.fields.travelTime = entity.travelTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst distinctItems = getDistinctItemsByProximity(\n\t\t\tlistingsResult,\n\t\t\tentitiesByKey || {}\n\t\t);\n\n\t\treturn {\n\t\t\tlistingsResult,\n\t\t\tentitiesByKey,\n\t\t\tdistinctItems\n\t\t};\n\t} catch (error) {\n\t\tconsole.error(\"Error fetching listings:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default fetchListings;\n"],"names":[],"mappings":";;;;AAaA,MAAM,aAAa,GAAG,OACrB,eAAA,GAA8B,IAAI,EAClC,QAAgC,EAChC,QAA0B,EAC1B,0BAA0E,EAC1E,UAAsB,GAAA,KAAK,KACM;IACjC,IAAI;AACH,QAAA,MAAM,cAAc,GAAG,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,MAAM,WAAW,EAAE,CAAC;;AAGxF,QAAA,MAAM,eAAe,GAAG,UAAU,GAAG,EAAE,IACtC,CAAC,eAAe;AACf,cAAE,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,0BAA0B,GAAG,MAAM,kBAAkB,EAAE,GAAG,MAAM,0BAA0B,EAAE;AAC5I,cAAE,CAAC,0BAA0B,GAAG,MAAM,kBAAkB,CACvD,CAAA,EAAG,eAAe,CAAC,GAAG,C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services/listingAggregatorService.ts"],"sourcesContent":["import { getListings } from '~/services/listingService';\nimport { getListingEntities } from '~/services/listingEntityService';\nimport { getDistinctItemsByProximity } from '~/util/mapUtil';\nimport { Listing } from '~/types/Listings';\nimport { ListingEntity } from '~/types/ListingEntity';\n\ninterface FetchListingsResult {\n listingsResult: Listing[];\n entitiesByKey: Record<string, ListingEntity>;\n\n distinctItems: any; // Update this type based on the return type of getDistinctItemsByProximity\n}\n\nconst fetchListings = async (\n\tcommuteLocation: any | null = null,\n\tentities: ListingEntity[] | null,\n\tlistings: Listing[] | null,\n\tgetListingEntitiesCallback?: (origin?: string) => Promise<ListingEntity[]>,\n\tnoEntities: boolean = false\n): Promise<FetchListingsResult> => {\n\ttry {\n\t\tconst listingsResult = listings && listings.length > 0 ? listings : await getListings();\n\n\t\t// Only fetch entities if noEntities is false\n\t\tconst fetchedEntities = noEntities ? {} : (\n\t\t\t!commuteLocation\n\t\t\t\t? entities && entities.length > 0 ? entities : !getListingEntitiesCallback ? await getListingEntities() : await getListingEntitiesCallback()\n\t\t\t\t: !getListingEntitiesCallback ? await getListingEntities(\n\t\t\t\t\t`${commuteLocation.lat}, ${commuteLocation.lng}`\n\t\t\t\t) : await getListingEntitiesCallback(\n\t\t\t\t\t`${commuteLocation.lat}, ${commuteLocation.lng}`)\n\t\t);\n\t\t const entitiesByKey = fetchedEntities;\n\t\t// Update travel time only if entities were fetched\n\t\tif (!noEntities && entitiesByKey) {\n\t\t\tfor (let i = 0; i < listingsResult.length; i++) {\n\t\t\t\tconst listing = listingsResult[i];\n\t\t\t\tif (listing.fields && listing.fields.entityKey && listing.fields.entityKey !== '' && listing.fields) {\n\t\t\t\t\t// Try exact match first, then lowercase match for case-insensitive lookup\n\t\t\t\t\tconst entity = entitiesByKey[listing.fields.entityKey] || entitiesByKey[listing.fields.entityKey.toLowerCase()];\n\t\t\t\t\tconsole.log(\"Entity for listing with travel time\", listing.fields.entityKey, entity);\n\n\t\t\t\t\tif (entity) {\n\t\t\t\t\t\tlisting.fields.travelTime = entity.travelTime;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst distinctItems = getDistinctItemsByProximity(\n\t\t\tlistingsResult,\n\t\t\tentitiesByKey || {}\n\t\t);\n\n\t\treturn {\n\t\t\tlistingsResult,\n\t\t\tentitiesByKey,\n\t\t\tdistinctItems\n\t\t};\n\t} catch (error) {\n\t\tconsole.error(\"Error fetching listings:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default fetchListings;\n"],"names":[],"mappings":";;;;AAaA,MAAM,aAAa,GAAG,OACrB,eAAA,GAA8B,IAAI,EAClC,QAAgC,EAChC,QAA0B,EAC1B,0BAA0E,EAC1E,UAAsB,GAAA,KAAK,KACM;IACjC,IAAI;AACH,QAAA,MAAM,cAAc,GAAG,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,MAAM,WAAW,EAAE,CAAC;;AAGxF,QAAA,MAAM,eAAe,GAAG,UAAU,GAAG,EAAE,IACtC,CAAC,eAAe;AACf,cAAE,QAAQ,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,0BAA0B,GAAG,MAAM,kBAAkB,EAAE,GAAG,MAAM,0BAA0B,EAAE;AAC5I,cAAE,CAAC,0BAA0B,GAAG,MAAM,kBAAkB,CACvD,CAAA,EAAG,eAAe,CAAC,GAAG,CAAK,EAAA,EAAA,eAAe,CAAC,GAAG,CAAA,CAAE,CAChD,GAAG,MAAM,0BAA0B,CACnC,GAAG,eAAe,CAAC,GAAG,CAAA,EAAA,EAAK,eAAe,CAAC,GAAG,CAAE,CAAA,CAAC,CACnD,CAAC;QACD,MAAM,aAAa,GAAG,eAAe,CAAC;;AAEvC,QAAA,IAAI,CAAC,UAAU,IAAI,aAAa,EAAE;AACjC,YAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,gBAAA,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;gBAClC,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,KAAK,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE;;oBAEpG,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;AAChH,oBAAA,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAErF,oBAAA,IAAI,MAAM,EAAE;wBACX,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC9C,qBAAA;AACD,iBAAA;AACD,aAAA;AACD,SAAA;QAED,MAAM,aAAa,GAAG,2BAA2B,CAChD,cAAc,EACd,aAAa,IAAI,EAAE,CACnB,CAAC;QAEF,OAAO;YACN,cAAc;YACd,aAAa;YACb,aAAa;SACb,CAAC;AACF,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC;AACjD,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
@@ -1,3 +1 @@
1
- /*
2
- ! tailwindcss v3.4.4 | MIT License | https://tailwindcss.com
3
- */*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:var(--font-roboto-flex),ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{--tw-shadow:0 0 transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:0 0 0 0 #fff,/*!*/ /*!*/ 0 0 0 1px #2563eb,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:repeat;background-size:auto auto;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:inherit;print-color-adjust:inherit}[type=checkbox],[type=radio]{--tw-shadow:0 0 transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:0 0 0 0 #fff,/*!*/ /*!*/ 0 0 0 4px #2563eb,var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:transparent none repeat 0 0/auto auto padding-box border-box scroll;background:initial;border-color:inherit;border-radius:0;border-width:0;font-size:inherit;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}html{color:#000;color:var(--ui-text);font-size:clamp(.88rem,.83rem + .24vw,1rem);scroll-behavior:smooth}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.hc-sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.hc-pointer-events-none{pointer-events:none}.hc-invisible{visibility:hidden}.hc-fixed{position:fixed}.hc-absolute{position:absolute}.hc-relative{position:relative}.hc-sticky{position:sticky}.hc-inset-0{bottom:0;left:0;right:0;top:0}.hc-bottom-0{bottom:0}.hc-bottom-10{bottom:2.5rem}.hc-left-0{left:0}.hc-left-2{left:.5rem}.hc-left-2\.5{left:.625rem}.hc-right-0{right:0}.hc-right-\[10px\]{right:10px}.hc-top-0{top:0}.hc-top-1{top:.25rem}.hc-top-1\.5{top:.375rem}.hc-top-\[10px\]{top:10px}.hc-z-10{z-index:10}.hc-z-20{z-index:20}.hc-z-\[1000\]{z-index:1000}.hc-z-\[200\]{z-index:200}.hc-z-\[2\]{z-index:2}.hc-order-first{order:-9999}.hc-order-last{order:9999}.hc-col-span-1{grid-column:span 1/span 1}.hc-col-span-2{grid-column:span 2/span 2}.hc-col-span-4{grid-column:span 4/span 4}.hc-float-right{float:right}.hc-m-auto{margin:auto}.hc-my-1{margin-bottom:.25rem;margin-top:.25rem}.hc-mb-2{margin-bottom:.5rem}.hc-mb-3{margin-bottom:.75rem}.hc-mb-5{margin-bottom:1.25rem}.hc-ml-auto{margin-left:auto}.hc-mr-1{margin-right:.25rem}.hc-mr-1\.5{margin-right:.375rem}.hc-mr-2{margin-right:.5rem}.hc-mt-1{margin-top:.25rem}.hc-mt-2{margin-top:.5rem}.hc-mt-4{margin-top:1rem}.hc-mt-6{margin-top:1.5rem}.hc-mt-px{margin-top:1px}.hc-block{display:block}.hc-inline-block{display:inline-block}.hc-inline{display:inline}.hc-flex{display:flex}.hc-inline-flex{display:inline-flex}.hc-grid{display:grid}.hc-hidden{display:none}.hc-size-2{height:.5rem;width:.5rem}.hc-size-2\.5{height:.625rem;width:.625rem}.hc-size-3{height:.75rem;width:.75rem}.hc-size-3\.5{height:.875rem;width:.875rem}.hc-size-4{height:1rem;width:1rem}.hc-size-5{height:1.25rem;width:1.25rem}.hc-size-8{height:2rem;width:2rem}.hc-h-5{height:1.25rem}.hc-h-\[100\%\]{height:100%}.hc-h-\[25px\]{height:25px}.hc-h-\[calc\(100\%-48px\)\]{height:calc(100% - 48px)}.hc-h-auto{height:auto}.hc-h-fit{height:-moz-fit-content;height:fit-content}.hc-h-full{height:100%}.hc-max-h-60{max-height:15rem}.hc-max-h-\[20vh\]{max-height:20vh}.hc-max-h-\[85vh\]{max-height:85vh}.hc-max-h-\[88\%\]{max-height:88%}.hc-max-h-\[95\%\]{max-height:95%}.hc-w-2\/5{width:40%}.hc-w-8{width:2rem}.hc-w-\[25px\]{width:25px}.hc-w-\[90vw\]{width:90vw}.hc-w-full{width:100%}.hc-min-w-\[100\%\]{min-width:100%}.hc-max-w-\[450px\]{max-width:450px}.hc-flex-1{flex:1 1 0%}.hc-flex-auto{flex:1 1 auto}.hc-shrink-0{flex-shrink:0}.hc-flex-grow,.hc-grow{flex-grow:1}.hc-rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(45deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hc-contentShow{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.hc-animate-contentShow{animation:hc-contentShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-overlayShow{0%{opacity:0}to{opacity:1}}.hc-animate-overlayShow{animation:hc-overlayShow .15s cubic-bezier(.16,1,.3,1)}.hc-cursor-default{cursor:default}.hc-cursor-not-allowed{cursor:not-allowed}.hc-cursor-pointer{cursor:pointer}.hc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.hc-auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.hc-grid-flow-col{grid-auto-flow:column}.hc-auto-rows-min{grid-auto-rows:min-content}.hc-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.hc-flex-row{flex-direction:row}.hc-flex-col{flex-direction:column}.hc-flex-wrap{flex-wrap:wrap}.hc-items-start{align-items:flex-start}.hc-items-center{align-items:center}.hc-items-stretch{align-items:stretch}.hc-justify-end{justify-content:flex-end}.hc-justify-center{justify-content:center}.hc-justify-between{justify-content:space-between}.hc-gap-0{gap:0}.hc-gap-1{gap:.25rem}.hc-gap-1\.5{gap:.375rem}.hc-gap-12{gap:3rem}.hc-gap-2{gap:.5rem}.hc-gap-4{gap:1rem}.hc-gap-px{gap:1px}.hc-gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.hc-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:1rem;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:0;margin-right:calc(1rem*var(--tw-space-x-reverse))}.hc-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:.5rem;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.hc-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:1rem;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.hc-divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:1px;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:0;border-right-width:calc(1px*var(--tw-divide-x-reverse))}.hc-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:1px;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.hc-divide-primary>:not([hidden])~:not([hidden]){border-color:#959595;border-color:var(--primary)}.hc-overflow-auto{overflow:auto}.hc-overflow-hidden{overflow:hidden}.hc-overflow-y-auto{overflow-y:auto}.hc-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hc-text-balance{text-wrap:balance}.hc-break-words{word-wrap:break-word}.hc-rounded{border-radius:.25rem}.hc-rounded-\[6px\]{border-radius:6px}.hc-rounded-full{border-radius:9999px}.hc-rounded-md{border-radius:.375rem}.hc-rounded-none{border-radius:0}.hc-rounded-sm{border-radius:.125rem}.hc-rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.hc-border{border-width:1px}.hc-border-0{border-width:0}.hc-border-x-0{border-left-width:0;border-right-width:0}.hc-border-b{border-bottom-width:1px}.hc-border-b-0{border-bottom-width:0}.hc-border-t{border-top-width:1px}.hc-border-t-0{border-top-width:0}.hc-border-none{border-style:none}.\!hc-border-secondary{border-color:#959595!important;border-color:var(--secondary)!important}.hc-border-gray-100{--tw-border-opacity:1;border-color:#f3f4f6;border-color:rgba(243,244,246,var(--tw-border-opacity))}.hc-border-gray-200{--tw-border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hc-border-primary{border-color:#959595;border-color:var(--primary)}.hc-border-secondary{border-color:#959595;border-color:var(--secondary)}.hc-border-transparent{border-color:transparent}.hc-bg-black\/50{background-color:rgba(0,0,0,.5)}.hc-bg-gray-100{--tw-bg-opacity:1;background-color:#f3f4f6;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hc-bg-primary{background-color:#959595;background-color:var(--primary)}.hc-bg-secondary{background-color:#959595;background-color:var(--secondary)}.hc-bg-transparent{background-color:transparent}.hc-bg-white{--tw-bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hc-bg-clip-border{background-clip:border-box}.hc-object-cover{-o-object-fit:cover;object-fit:cover}.\!hc-p-0{padding:0!important}.\!hc-p-3{padding:.75rem!important}.hc-p-1{padding:.25rem}.hc-p-1\.5{padding:.375rem}.hc-p-2{padding:.5rem}.hc-p-2\.5{padding:.625rem}.hc-p-3{padding:.75rem}.hc-p-4{padding:1rem}.hc-p-\[25px\]{padding:25px}.hc-px-0{padding-left:0;padding-right:0}.hc-px-10{padding-left:2.5rem;padding-right:2.5rem}.hc-px-2{padding-left:.5rem;padding-right:.5rem}.hc-px-3{padding-left:.75rem;padding-right:.75rem}.hc-px-4{padding-left:1rem;padding-right:1rem}.hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.hc-py-0{padding-bottom:0;padding-top:0}.hc-py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.hc-py-1{padding-bottom:.25rem;padding-top:.25rem}.hc-py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.hc-py-2{padding-bottom:.5rem;padding-top:.5rem}.hc-py-4{padding-bottom:1rem;padding-top:1rem}.hc-pb-1{padding-bottom:.25rem}.hc-pb-16{padding-bottom:4rem}.hc-pb-2{padding-bottom:.5rem}.hc-pb-4{padding-bottom:1rem}.hc-pl-1{padding-left:.25rem}.hc-pl-1\.5{padding-left:.375rem}.hc-pl-2{padding-left:.5rem}.hc-pl-4{padding-left:1rem}.hc-pl-7{padding-left:1.75rem}.hc-pr-1{padding-right:.25rem}.hc-pr-2{padding-right:.5rem}.hc-pr-3{padding-right:.75rem}.hc-pr-4{padding-right:1rem}.hc-pt-0{padding-top:0}.hc-pt-0\.5{padding-top:.125rem}.hc-pt-1{padding-top:.25rem}.hc-pt-1\.5{padding-top:.375rem}.hc-pt-2{padding-top:.5rem}.hc-pt-20{padding-top:5rem}.hc-text-left{text-align:left}.hc-text-center{text-align:center}.hc-align-middle{vertical-align:middle}.\!hc-font-\[inherit\]{font-family:inherit!important}.hc-text-2xl{font-size:1.5rem;line-height:2rem}.hc-text-\[15px\]{font-size:15px}.hc-text-\[17px\]{font-size:17px}.hc-text-base{font-size:1rem;line-height:1.5rem}.hc-text-lg{font-size:1.125rem;line-height:1.75rem}.hc-text-sm{font-size:.875rem;line-height:1.25rem}.hc-text-xs{font-size:.75rem;line-height:1rem}.hc-font-bold{font-weight:700}.hc-font-medium{font-weight:500}.hc-font-semibold{font-weight:600}.hc-uppercase{text-transform:uppercase}.hc-capitalize{text-transform:capitalize}.hc-normal-case{text-transform:none}.hc-leading-5{line-height:1.25rem}.hc-leading-none{line-height:1}.hc-leading-normal{line-height:1.5}.hc-leading-tight{line-height:1.25}.hc-text-black{--tw-text-opacity:1;color:#000;color:rgba(0,0,0,var(--tw-text-opacity))}.hc-text-blue-500{--tw-text-opacity:1;color:#3b82f6;color:rgba(59,130,246,var(--tw-text-opacity))}.hc-text-current{color:currentColor}.hc-text-gray-500{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hc-text-gray-900{--tw-text-opacity:1;color:#111827;color:rgba(17,24,39,var(--tw-text-opacity))}.hc-text-inherit{color:inherit}.hc-text-primary{color:#959595;color:var(--primary)}.hc-text-uiAccent{color:#959595;color:var(--ui-accent)}.hc-text-uiText{color:#000;color:var(--ui-text)}.hc-text-white{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hc-opacity-0{opacity:0}.hc-opacity-100{opacity:1}.hc-opacity-30{opacity:.3}.hc-opacity-85{opacity:.85}.hc-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-outline-none{outline:2px solid transparent;outline-offset:2px}.hc-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:0 0 0 0 #fff,/*!*/ /*!*/ 0 0 0 1px #2563eb,0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.hc-ring-inset{--tw-ring-inset:inset}.hc-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-duration-100{transition-duration:.1s}.hc-duration-300{transition-duration:.3s}.hc-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@keyframes enter{0%{opacity:1;opacity:var(--tw-enter-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:1;opacity:var(--tw-exit-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.hc-duration-100{animation-duration:.1s}.hc-duration-300{animation-duration:.3s}.hc-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.fit-content{height:-moz-fit-content;height:fit-content}:root{--ui-text:#000;--ui-accent:#959595;--primary:#959595;--primary-dark:#959595;--secondary:#959595;--secondary-dark:#959595}.placeholder\:hc-text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.placeholder\:hc-text-gray-400::placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.focus-within\:hc-ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:0 0 0 0 #fff,/*!*/ /*!*/ 0 0 0 1px #2563eb,0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-within\:hc-ring-uiAccent:focus-within{--tw-ring-color:var(--ui-accent)}.hover\:hc-border-indigo-300:hover{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.hover\:hc-border-primaryDark:hover{border-color:#959595;border-color:var(--primary-dark)}.hover\:hc-bg-primaryDark:hover{background-color:#959595;background-color:var(--primary-dark)}.hover\:hc-bg-opacity-70:hover{--tw-bg-opacity:0.7}.hover\:hc-text-gray-500:hover{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hover\:hc-text-primary:hover{color:#959595;color:var(--primary)}.hover\:hc-text-uiText:hover{color:#000;color:var(--ui-text)}.hover\:hc-text-white:hover{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:hc-opacity-70:hover{opacity:.7}.hover\:hc-opacity-75:hover{opacity:.75}.hover\:hc-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-border-indigo-300:focus{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:hc-border-primaryDark:focus{border-color:#959595;border-color:var(--primary-dark)}.focus\:hc-bg-primaryDark:focus{background-color:#959595;background-color:var(--primary-dark)}.focus\:hc-bg-opacity-70:focus{--tw-bg-opacity:0.7}.focus\:hc-text-primary:focus{color:#959595;color:var(--primary)}.focus\:hc-text-uiText:focus{color:#000;color:var(--ui-text)}.focus\:hc-text-white:focus{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.focus\:hc-opacity-70:focus{opacity:.7}.focus\:hc-shadow-xl:focus{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:hc-ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:0 0 0 0 #fff,var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:0 0 0 0 #fff,var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring-uiAccent:focus-visible{--tw-ring-color:var(--ui-accent)}.focus-visible\:hc-ring-opacity-75:focus-visible{--tw-ring-opacity:0.75}.hc-group:active .group-active\:hc-opacity-100,.hc-group:hover .group-hover\:hc-opacity-100{opacity:1}.data-\[disabled\]\:hc-pointer-events-none[data-disabled]{pointer-events:none}@keyframes hc-slideUp{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:hc-animate-slideUp[data-state=closed]{animation:hc-slideUp .3s cubic-bezier(.87,0,.13,1)}@keyframes hc-slideDown{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:hc-animate-slideDown[data-state=open]{animation:hc-slideDown .3s cubic-bezier(.87,0,.13,1)}.data-\[state\=open\]\:hc-rounded-b-none[data-state=open]{border-bottom-left-radius:0;border-bottom-right-radius:0}.data-\[state\=open\]\:hc-border-b-transparent[data-state=open]{border-bottom-color:transparent}.data-\[highlighted\]\:hc-bg-primary[data-highlighted],.data-\[state\=active\]\:hc-bg-primary[data-state=active]{background-color:#959595;background-color:var(--primary)}.data-\[disabled\]\:hc-text-gray-500[data-disabled]{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.data-\[highlighted\]\:hc-text-white[data-highlighted],.data-\[state\=active\]\:hc-text-white[data-state=active]{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.data-\[state\=open\]\:hc-text-primary[data-state=open]{color:#959595;color:var(--primary)}.data-\[highlighted\]\:hc-outline-none[data-highlighted]{outline:2px solid transparent;outline-offset:2px}.hc-group[data-state=open] .group-data-\[state\=open\]\:\!hc-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@media (min-width:640px){.sm\:hc-w-1\/3{width:33.333333%}.sm\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:hc-absolute{position:absolute}.md\:hc-left-1{left:.25rem}.md\:hc-left-1\.5{left:.375rem}.md\:hc-mb-2{margin-bottom:.5rem}.md\:hc-block{display:block}.md\:hc-flex{display:flex}.md\:hc-grid{display:grid}.md\:hc-hidden{display:none}.md\:hc-max-h-\[100\%\]{max-height:100%}.md\:hc-max-h-\[25vh\]{max-height:25vh}.md\:hc-max-h-\[95\%\]{max-height:95%}.md\:hc-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:hc-grid-cols-\[1fr_2\.5fr\]{grid-template-columns:1fr 2.5fr}.md\:hc-grid-rows-\[100\%\]{grid-template-rows:100%}.md\:hc-grid-rows-\[50\%_50\%\]{grid-template-rows:50% 50%}.md\:hc-flex-col{flex-direction:column}.md\:hc-justify-start{justify-content:flex-start}.md\:hc-self-center{align-self:center}.md\:hc-overflow-x-auto{overflow-x:auto}.md\:hc-overflow-y-auto{overflow-y:auto}.md\:hc-border-none{border-style:none}.md\:hc-bg-transparent{background-color:transparent}.md\:hc-p-0{padding:0}.md\:hc-px-4{padding-left:1rem;padding-right:1rem}.md\:hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:hc-pb-0{padding-bottom:0}.md\:hc-pt-4{padding-top:1rem}.md\:hc-text-sm{font-size:.875rem;line-height:1.25rem}.md\:hc-text-xs{font-size:.75rem;line-height:1rem}}@media (min-width:1024px){.lg\:hc-order-last{order:9999}.lg\:hc-mb-0{margin-bottom:0}.lg\:hc-inline{display:inline}.lg\:hc-w-auto{width:auto}.lg\:hc-grid-cols-\[1fr_3\.5fr\]{grid-template-columns:1fr 3.5fr}.lg\:hc-flex-row{flex-direction:row}.lg\:hc-gap-16{gap:4rem}.lg\:hc-border-none{border-style:none}.lg\:hc-p-0{padding:0}.lg\:hc-px-8{padding-left:2rem;padding-right:2rem}.lg\:hc-pt-2{padding-top:.5rem}.lg\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}
1
+ .hc-sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.hc-pointer-events-none{pointer-events:none}.hc-invisible{visibility:hidden}.hc-fixed{position:fixed}.hc-absolute{position:absolute}.hc-relative{position:relative}.hc-sticky{position:sticky}.hc-inset-0{bottom:0;left:0;right:0;top:0}.hc-bottom-0{bottom:0}.hc-bottom-10{bottom:2.5rem}.hc-left-0{left:0}.hc-left-2{left:.5rem}.hc-left-2\.5{left:.625rem}.hc-right-0{right:0}.hc-right-\[10px\]{right:10px}.hc-top-0{top:0}.hc-top-1{top:.25rem}.hc-top-1\.5{top:.375rem}.hc-top-\[10px\]{top:10px}.hc-z-10{z-index:10}.hc-z-20{z-index:20}.hc-z-\[1000\]{z-index:1000}.hc-z-\[200\]{z-index:200}.hc-z-\[2\]{z-index:2}.hc-order-first{order:-9999}.hc-order-last{order:9999}.hc-col-span-1{grid-column:span 1/span 1}.hc-col-span-2{grid-column:span 2/span 2}.hc-col-span-4{grid-column:span 4/span 4}.hc-float-right{float:right}.hc-m-auto{margin:auto}.hc-my-1{margin-bottom:.25rem;margin-top:.25rem}.hc-mb-2{margin-bottom:.5rem}.hc-mb-3{margin-bottom:.75rem}.hc-mb-5{margin-bottom:1.25rem}.hc-ml-auto{margin-left:auto}.hc-mr-1{margin-right:.25rem}.hc-mr-1\.5{margin-right:.375rem}.hc-mr-2{margin-right:.5rem}.hc-mt-1{margin-top:.25rem}.hc-mt-2{margin-top:.5rem}.hc-mt-4{margin-top:1rem}.hc-mt-6{margin-top:1.5rem}.hc-mt-px{margin-top:1px}.hc-block{display:block}.hc-inline-block{display:inline-block}.hc-inline{display:inline}.hc-flex{display:flex}.hc-inline-flex{display:inline-flex}.hc-grid{display:grid}.hc-hidden{display:none}.hc-size-2{height:.5rem;width:.5rem}.hc-size-2\.5{height:.625rem;width:.625rem}.hc-size-3{height:.75rem;width:.75rem}.hc-size-3\.5{height:.875rem;width:.875rem}.hc-size-4{height:1rem;width:1rem}.hc-size-5{height:1.25rem;width:1.25rem}.hc-size-8{height:2rem;width:2rem}.hc-h-5{height:1.25rem}.hc-h-\[100\%\]{height:100%}.hc-h-\[25px\]{height:25px}.hc-h-\[calc\(100\%-48px\)\]{height:calc(100% - 48px)}.hc-h-auto{height:auto}.hc-h-fit{height:-moz-fit-content;height:fit-content}.hc-h-full{height:100%}.hc-max-h-60{max-height:15rem}.hc-max-h-\[20vh\]{max-height:20vh}.hc-max-h-\[85vh\]{max-height:85vh}.hc-max-h-\[88\%\]{max-height:88%}.hc-max-h-\[95\%\]{max-height:95%}.hc-w-2\/5{width:40%}.hc-w-8{width:2rem}.hc-w-\[25px\]{width:25px}.hc-w-\[90vw\]{width:90vw}.hc-w-full{width:100%}.hc-min-w-\[100\%\]{min-width:100%}.hc-max-w-\[450px\]{max-width:450px}.hc-flex-1{flex:1 1 0%}.hc-flex-auto{flex:1 1 auto}.hc-shrink-0{flex-shrink:0}.hc-flex-grow,.hc-grow{flex-grow:1}.hc-rotate-45{--tw-rotate:45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(45deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hc-contentShow{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.hc-animate-contentShow{animation:hc-contentShow .15s cubic-bezier(.16,1,.3,1)}@keyframes hc-overlayShow{0%{opacity:0}to{opacity:1}}.hc-animate-overlayShow{animation:hc-overlayShow .15s cubic-bezier(.16,1,.3,1)}.hc-cursor-default{cursor:default}.hc-cursor-not-allowed{cursor:not-allowed}.hc-cursor-pointer{cursor:pointer}.hc-select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.hc-auto-cols-fr{grid-auto-columns:minmax(0,1fr)}.hc-grid-flow-col{grid-auto-flow:column}.hc-auto-rows-min{grid-auto-rows:min-content}.hc-grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.hc-flex-row{flex-direction:row}.hc-flex-col{flex-direction:column}.hc-flex-wrap{flex-wrap:wrap}.hc-items-start{align-items:flex-start}.hc-items-center{align-items:center}.hc-items-stretch{align-items:stretch}.hc-justify-end{justify-content:flex-end}.hc-justify-center{justify-content:center}.hc-justify-between{justify-content:space-between}.hc-gap-0{gap:0}.hc-gap-1{gap:.25rem}.hc-gap-1\.5{gap:.375rem}.hc-gap-12{gap:3rem}.hc-gap-2{gap:.5rem}.hc-gap-4{gap:1rem}.hc-gap-px{gap:1px}.hc-gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.hc-space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:1rem;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:0;margin-right:calc(1rem*var(--tw-space-x-reverse))}.hc-space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:.5rem;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.hc-space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:1rem;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.hc-divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:1px;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:0;border-right-width:calc(1px*var(--tw-divide-x-reverse))}.hc-divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:1px;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.hc-divide-primary>:not([hidden])~:not([hidden]){border-color:#959595;border-color:var(--primary)}.hc-overflow-auto{overflow:auto}.hc-overflow-hidden{overflow:hidden}.hc-overflow-y-auto{overflow-y:auto}.hc-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hc-text-balance{text-wrap:balance}.hc-break-words{word-wrap:break-word}.hc-rounded{border-radius:.25rem}.hc-rounded-\[6px\]{border-radius:6px}.hc-rounded-full{border-radius:9999px}.hc-rounded-md{border-radius:.375rem}.hc-rounded-none{border-radius:0}.hc-rounded-sm{border-radius:.125rem}.hc-rounded-b{border-bottom-left-radius:.25rem;border-bottom-right-radius:.25rem}.hc-border{border-width:1px}.hc-border-0{border-width:0}.hc-border-x-0{border-left-width:0;border-right-width:0}.hc-border-b{border-bottom-width:1px}.hc-border-b-0{border-bottom-width:0}.hc-border-t{border-top-width:1px}.hc-border-t-0{border-top-width:0}.hc-border-none{border-style:none}.\!hc-border-secondary{border-color:#959595!important;border-color:var(--secondary)!important}.hc-border-gray-100{--tw-border-opacity:1;border-color:#f3f4f6;border-color:rgba(243,244,246,var(--tw-border-opacity))}.hc-border-gray-200{--tw-border-opacity:1;border-color:#e5e7eb;border-color:rgba(229,231,235,var(--tw-border-opacity))}.hc-border-primary{border-color:#959595;border-color:var(--primary)}.hc-border-secondary{border-color:#959595;border-color:var(--secondary)}.hc-border-transparent{border-color:transparent}.hc-bg-black\/50{background-color:rgba(0,0,0,.5)}.hc-bg-gray-100{--tw-bg-opacity:1;background-color:#f3f4f6;background-color:rgba(243,244,246,var(--tw-bg-opacity))}.hc-bg-primary{background-color:#959595;background-color:var(--primary)}.hc-bg-secondary{background-color:#959595;background-color:var(--secondary)}.hc-bg-transparent{background-color:transparent}.hc-bg-white{--tw-bg-opacity:1;background-color:#fff;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hc-bg-clip-border{background-clip:border-box}.hc-object-cover{-o-object-fit:cover;object-fit:cover}.\!hc-p-0{padding:0!important}.\!hc-p-3{padding:.75rem!important}.hc-p-1{padding:.25rem}.hc-p-1\.5{padding:.375rem}.hc-p-2{padding:.5rem}.hc-p-2\.5{padding:.625rem}.hc-p-3{padding:.75rem}.hc-p-4{padding:1rem}.hc-p-\[25px\]{padding:25px}.hc-px-0{padding-left:0;padding-right:0}.hc-px-10{padding-left:2.5rem;padding-right:2.5rem}.hc-px-2{padding-left:.5rem;padding-right:.5rem}.hc-px-3{padding-left:.75rem;padding-right:.75rem}.hc-px-4{padding-left:1rem;padding-right:1rem}.hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.hc-py-0{padding-bottom:0;padding-top:0}.hc-py-0\.5{padding-bottom:.125rem;padding-top:.125rem}.hc-py-1{padding-bottom:.25rem;padding-top:.25rem}.hc-py-1\.5{padding-bottom:.375rem;padding-top:.375rem}.hc-py-2{padding-bottom:.5rem;padding-top:.5rem}.hc-py-4{padding-bottom:1rem;padding-top:1rem}.hc-pb-1{padding-bottom:.25rem}.hc-pb-16{padding-bottom:4rem}.hc-pb-2{padding-bottom:.5rem}.hc-pb-4{padding-bottom:1rem}.hc-pl-1{padding-left:.25rem}.hc-pl-1\.5{padding-left:.375rem}.hc-pl-2{padding-left:.5rem}.hc-pl-4{padding-left:1rem}.hc-pl-7{padding-left:1.75rem}.hc-pr-1{padding-right:.25rem}.hc-pr-2{padding-right:.5rem}.hc-pr-3{padding-right:.75rem}.hc-pr-4{padding-right:1rem}.hc-pt-0{padding-top:0}.hc-pt-0\.5{padding-top:.125rem}.hc-pt-1{padding-top:.25rem}.hc-pt-1\.5{padding-top:.375rem}.hc-pt-2{padding-top:.5rem}.hc-pt-20{padding-top:5rem}.hc-text-left{text-align:left}.hc-text-center{text-align:center}.hc-align-middle{vertical-align:middle}.\!hc-font-\[inherit\]{font-family:inherit!important}.hc-text-2xl{font-size:1.5rem;line-height:2rem}.hc-text-\[15px\]{font-size:15px}.hc-text-\[17px\]{font-size:17px}.hc-text-base{font-size:1rem;line-height:1.5rem}.hc-text-lg{font-size:1.125rem;line-height:1.75rem}.hc-text-sm{font-size:.875rem;line-height:1.25rem}.hc-text-xs{font-size:.75rem;line-height:1rem}.hc-font-bold{font-weight:700}.hc-font-medium{font-weight:500}.hc-font-semibold{font-weight:600}.hc-uppercase{text-transform:uppercase}.hc-capitalize{text-transform:capitalize}.hc-normal-case{text-transform:none}.hc-leading-5{line-height:1.25rem}.hc-leading-none{line-height:1}.hc-leading-normal{line-height:1.5}.hc-leading-tight{line-height:1.25}.hc-text-black{--tw-text-opacity:1;color:#000;color:rgba(0,0,0,var(--tw-text-opacity))}.hc-text-blue-500{--tw-text-opacity:1;color:#3b82f6;color:rgba(59,130,246,var(--tw-text-opacity))}.hc-text-current{color:currentColor}.hc-text-gray-500{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hc-text-gray-900{--tw-text-opacity:1;color:#111827;color:rgba(17,24,39,var(--tw-text-opacity))}.hc-text-inherit{color:inherit}.hc-text-primary{color:#959595;color:var(--primary)}.hc-text-uiAccent{color:#959595;color:var(--ui-accent)}.hc-text-uiText{color:#000;color:var(--ui-text)}.hc-text-white{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hc-opacity-0{opacity:0}.hc-opacity-100{opacity:1}.hc-opacity-30{opacity:.3}.hc-opacity-85{opacity:.85}.hc-shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.hc-outline-none{outline:2px solid transparent;outline-offset:2px}.hc-ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.hc-ring-inset{--tw-ring-inset:inset}.hc-transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hc-duration-100{transition-duration:.1s}.hc-duration-300{transition-duration:.3s}.hc-ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}@keyframes enter{0%{opacity:1;opacity:var(--tw-enter-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:1;opacity:var(--tw-exit-opacity,1);transform:translateZ(0) scaleX(1) rotate(0);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.hc-duration-100{animation-duration:.1s}.hc-duration-300{animation-duration:.3s}.hc-ease-in{animation-timing-function:cubic-bezier(.4,0,1,1)}.fit-content{height:-moz-fit-content;height:fit-content}:root{--ui-text:#000;--ui-accent:#959595;--primary:#959595;--primary-dark:#959595;--secondary:#959595;--secondary-dark:#959595}.placeholder\:hc-text-gray-400::-moz-placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.placeholder\:hc-text-gray-400::placeholder{--tw-text-opacity:1;color:#9ca3af;color:rgba(156,163,175,var(--tw-text-opacity))}.focus-within\:hc-ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-within\:hc-ring-uiAccent:focus-within{--tw-ring-color:var(--ui-accent)}.hover\:hc-border-indigo-300:hover{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.hover\:hc-border-primaryDark:hover{border-color:#959595;border-color:var(--primary-dark)}.hover\:hc-bg-primaryDark:hover{background-color:#959595;background-color:var(--primary-dark)}.hover\:hc-bg-opacity-70:hover{--tw-bg-opacity:0.7}.hover\:hc-text-gray-500:hover{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.hover\:hc-text-primary:hover{color:#959595;color:var(--primary)}.hover\:hc-text-uiText:hover{color:#000;color:var(--ui-text)}.hover\:hc-text-white:hover{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\:hc-opacity-70:hover{opacity:.7}.hover\:hc-opacity-75:hover{opacity:.75}.hover\:hc-shadow-xl:hover{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-border-indigo-300:focus{--tw-border-opacity:1;border-color:#a5b4fc;border-color:rgba(165,180,252,var(--tw-border-opacity))}.focus\:hc-border-primaryDark:focus{border-color:#959595;border-color:var(--primary-dark)}.focus\:hc-bg-primaryDark:focus{background-color:#959595;background-color:var(--primary-dark)}.focus\:hc-bg-opacity-70:focus{--tw-bg-opacity:0.7}.focus\:hc-text-primary:focus{color:#959595;color:var(--primary)}.focus\:hc-text-uiText:focus{color:#000;color:var(--ui-text)}.focus\:hc-text-white:focus{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.focus\:hc-opacity-70:focus{opacity:.7}.focus\:hc-shadow-xl:focus{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:0 0 transparent,0 0 transparent,0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.focus\:hc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:hc-ring-0:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),0 0 transparent;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 transparent)}.focus-visible\:hc-ring-uiAccent:focus-visible{--tw-ring-color:var(--ui-accent)}.focus-visible\:hc-ring-opacity-75:focus-visible{--tw-ring-opacity:0.75}.hc-group:active .group-active\:hc-opacity-100,.hc-group:hover .group-hover\:hc-opacity-100{opacity:1}.data-\[disabled\]\:hc-pointer-events-none[data-disabled]{pointer-events:none}@keyframes hc-slideUp{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:hc-animate-slideUp[data-state=closed]{animation:hc-slideUp .3s cubic-bezier(.87,0,.13,1)}@keyframes hc-slideDown{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:hc-animate-slideDown[data-state=open]{animation:hc-slideDown .3s cubic-bezier(.87,0,.13,1)}.data-\[state\=open\]\:hc-rounded-b-none[data-state=open]{border-bottom-left-radius:0;border-bottom-right-radius:0}.data-\[state\=open\]\:hc-border-b-transparent[data-state=open]{border-bottom-color:transparent}.data-\[highlighted\]\:hc-bg-primary[data-highlighted],.data-\[state\=active\]\:hc-bg-primary[data-state=active]{background-color:#959595;background-color:var(--primary)}.data-\[disabled\]\:hc-text-gray-500[data-disabled]{--tw-text-opacity:1;color:#6b7280;color:rgba(107,114,128,var(--tw-text-opacity))}.data-\[highlighted\]\:hc-text-white[data-highlighted],.data-\[state\=active\]\:hc-text-white[data-state=active]{--tw-text-opacity:1;color:#fff;color:rgba(255,255,255,var(--tw-text-opacity))}.data-\[state\=open\]\:hc-text-primary[data-state=open]{color:#959595;color:var(--primary)}.data-\[highlighted\]\:hc-outline-none[data-highlighted]{outline:2px solid transparent;outline-offset:2px}.hc-group[data-state=open] .group-data-\[state\=open\]\:\!hc-rotate-180{--tw-rotate:180deg!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(180deg) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@media (min-width:640px){.sm\:hc-w-1\/3{width:33.333333%}.sm\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width:768px){.md\:hc-absolute{position:absolute}.md\:hc-left-1{left:.25rem}.md\:hc-left-1\.5{left:.375rem}.md\:hc-mb-2{margin-bottom:.5rem}.md\:hc-block{display:block}.md\:hc-flex{display:flex}.md\:hc-grid{display:grid}.md\:hc-hidden{display:none}.md\:hc-max-h-\[100\%\]{max-height:100%}.md\:hc-max-h-\[25vh\]{max-height:25vh}.md\:hc-max-h-\[95\%\]{max-height:95%}.md\:hc-grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:hc-grid-cols-\[1fr_2\.5fr\]{grid-template-columns:1fr 2.5fr}.md\:hc-grid-rows-\[100\%\]{grid-template-rows:100%}.md\:hc-grid-rows-\[50\%_50\%\]{grid-template-rows:50% 50%}.md\:hc-flex-col{flex-direction:column}.md\:hc-justify-start{justify-content:flex-start}.md\:hc-self-center{align-self:center}.md\:hc-overflow-x-auto{overflow-x:auto}.md\:hc-overflow-y-auto{overflow-y:auto}.md\:hc-border-none{border-style:none}.md\:hc-bg-transparent{background-color:transparent}.md\:hc-p-0{padding:0}.md\:hc-px-4{padding-left:1rem;padding-right:1rem}.md\:hc-px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:hc-pb-0{padding-bottom:0}.md\:hc-pt-4{padding-top:1rem}.md\:hc-text-sm{font-size:.875rem;line-height:1.25rem}.md\:hc-text-xs{font-size:.75rem;line-height:1rem}}@media (min-width:1024px){.lg\:hc-order-last{order:9999}.lg\:hc-mb-0{margin-bottom:0}.lg\:hc-inline{display:inline}.lg\:hc-w-auto{width:auto}.lg\:hc-grid-cols-\[1fr_3\.5fr\]{grid-template-columns:1fr 3.5fr}.lg\:hc-flex-row{flex-direction:row}.lg\:hc-gap-16{gap:4rem}.lg\:hc-border-none{border-style:none}.lg\:hc-p-0{padding:0}.lg\:hc-px-8{padding-left:2rem;padding-right:2rem}.lg\:hc-pt-2{padding-top:.5rem}.lg\:hc-text-sm{font-size:.875rem;line-height:1.25rem}}
@@ -4,9 +4,12 @@ var getDistinctItemsByProximity = function getDistinctItemsByProximity(items, li
4
4
  var clusters = {};
5
5
  if (!listingEntitiesDetailsInput) return [];
6
6
  var listingEntitiesDetails = Array.isArray(listingEntitiesDetailsInput) ? listingEntitiesDetailsInput.reduce(function (acc, entity) {
7
- if (entity !== null && entity !== void 0 && entity.entityKey) acc[entity.entityKey] = entity;
7
+ if (entity !== null && entity !== void 0 && entity.entityKey) acc[entity.entityKey.toLowerCase()] = entity;
8
8
  return acc;
9
- }, {}) : listingEntitiesDetailsInput;
9
+ }, {}) : Object.keys(listingEntitiesDetailsInput).reduce(function (acc, key) {
10
+ acc[key.toLowerCase()] = listingEntitiesDetailsInput[key];
11
+ return acc;
12
+ }, {});
10
13
  var closeItemPairs = findCloseItems(listingEntitiesDetails);
11
14
  if (closeItemPairs.length > 0) {
12
15
  var adjusted = adjustItemPositions(listingEntitiesDetails, closeItemPairs);
@@ -16,18 +19,19 @@ var getDistinctItemsByProximity = function getDistinctItemsByProximity(items, li
16
19
  var _item$fields;
17
20
  var entityKey = item === null || item === void 0 || (_item$fields = item.fields) === null || _item$fields === void 0 ? void 0 : _item$fields.entityKey;
18
21
  if (!entityKey || entityKey === '-1') return;
19
- var entityDetails = listingEntitiesDetails[entityKey];
22
+ var entityDetails = listingEntitiesDetails[entityKey.toLowerCase()];
20
23
  if (!entityDetails) {
21
24
  console.error("Details not found for entityKey: ".concat(entityKey));
22
25
  return;
23
26
  }
24
27
  item.mapDetails = entityDetails;
25
- if (!clusters[entityKey]) {
26
- clusters[entityKey] = _objectSpread2(_objectSpread2({}, entityDetails), {}, {
28
+ var normalizedEntityKey = entityKey.toLowerCase();
29
+ if (!clusters[normalizedEntityKey]) {
30
+ clusters[normalizedEntityKey] = _objectSpread2(_objectSpread2({}, entityDetails), {}, {
27
31
  items: _defineProperty({}, item.id, item)
28
32
  });
29
33
  } else {
30
- clusters[entityKey].items[item.id] = item;
34
+ clusters[normalizedEntityKey].items[item.id] = item;
31
35
  }
32
36
  });
33
37
  return Object.values(clusters);
@@ -1 +1 @@
1
- {"version":3,"file":"mapUtil.js","sources":["../../src/util/mapUtil.js"],"sourcesContent":["export const getDistinctItemsByProximity = (items, listingEntitiesDetailsInput) => {\n\tconst clusters = {};\n\n\tif (!listingEntitiesDetailsInput) return [];\n\n\tconst listingEntitiesDetails = Array.isArray(listingEntitiesDetailsInput)\n\t\t? listingEntitiesDetailsInput.reduce((acc, entity) => {\n\t\t\tif (entity?.entityKey) acc[entity.entityKey] = entity;\n\t\t\treturn acc;\n\t\t }, {})\n\t\t: listingEntitiesDetailsInput;\n\n\tconst closeItemPairs = findCloseItems(listingEntitiesDetails);\n\tif (closeItemPairs.length > 0) {\n\t\tconst adjusted = adjustItemPositions(listingEntitiesDetails, closeItemPairs);\n\t\tObject.assign(listingEntitiesDetails, adjusted);\n\t}\n\n\titems?.forEach(item => {\n\t\tconst entityKey = item?.fields?.entityKey;\n\t\tif (!entityKey || entityKey === '-1') return;\n\t\tconst entityDetails = listingEntitiesDetails[entityKey];\n\t\tif (!entityDetails) {\n\t\t\tconsole.error(`Details not found for entityKey: ${entityKey}`);\n\t\t\treturn;\n\t\t}\n\n\t\titem.mapDetails = entityDetails;\n\n\t\tif (!clusters[entityKey]) {\n\t\t\tclusters[entityKey] = {\n\t\t\t\t...entityDetails,\n\t\t\t\titems: { [item.id]: item }\n\t\t\t};\n\t\t} else {\n\t\t\tclusters[entityKey].items[item.id] = item;\n\t\t}\n\t});\n\n\treturn Object.values(clusters);\n};\n\nexport const findCloseItems = entitiesByKey => {\n\tconst closeItems = [];\n\tconst items = Object.values(entitiesByKey); // Convert object to array\n\tconst proximityThreshold = 0.0001;\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\tfor (let j = i + 1; j < items.length; j++) {\n\t\t\tconst distanceLat = Math.abs(items[i].latitude - items[j].latitude);\n\t\t\tconst distanceLng = Math.abs(items[i].longitude - items[j].longitude);\n\t\t\tif (distanceLat < proximityThreshold && distanceLng < proximityThreshold) {\n\t\t\t\tcloseItems.push({ item1: items[i], item2: items[j] });\n\t\t\t}\n\t\t}\n\t}\n\n\treturn closeItems;\n};\n\nexport const adjustItemPositions = (entitiesByKey, closeItemPairs) => {\n\tconst adjustmentValue = 0.0001;\n\tconst adjustedItems = { ...entitiesByKey };\n\n\tcloseItemPairs.forEach(pair => {\n\t\tconst key2 = pair.item2.entityKey;\n\t\tif (adjustedItems[key2]) {\n\t\t\tadjustedItems[key2] = {\n\t\t\t\t...adjustedItems[key2],\n\t\t\t\tlatitude: adjustedItems[key2].latitude + adjustmentValue,\n\t\t\t\tlongitude: adjustedItems[key2].longitude + adjustmentValue\n\t\t\t};\n\t\t}\n\t});\n\n\treturn adjustedItems;\n};\n\nexport const clusterOptions = (clusterGridSize, fillColor) => {\n\treturn {\n\t\tgridSize: clusterGridSize,\n\t\tmaxZoom: 15,\n\t\tstyles: [\n\t\t\t{\n\t\t\t\turl: createSvgDataUri(fillColor),\n\t\t\t\ttextColor: 'white',\n\t\t\t\theight: 40,\n\t\t\t\twidth: 40\n\t\t\t}\n\t\t]\n\t};\n};\n\nfunction createSvgDataUri(fillColor) {\n\tconst svg = `<svg width=\"50\" height=\"50\" xmlns=\"http://www.w3.org/2000/svg\">\n\t <circle cx=\"25\" cy=\"25\" r=\"20\" fill=\"${fillColor}\" />\n\t</svg>`;\n\treturn `data:image/svg+xml;base64,${btoa(svg)}`;\n}\n"],"names":["getDistinctItemsByProximity","items","listingEntitiesDetailsInput","clusters","listingEntitiesDetails","Array","isArray","reduce","acc","entity","entityKey","closeItemPairs","findCloseItems","length","adjusted","adjustItemPositions","Object","assign","forEach","item","_item$fields","fields","entityDetails","console","error","concat","mapDetails","_objectSpread","_defineProperty","id","values","entitiesByKey","closeItems","proximityThreshold","i","j","distanceLat","Math","abs","latitude","distanceLng","longitude","push","item1","item2","adjustmentValue","adjustedItems","pair","key2","clusterOptions","clusterGridSize","fillColor","gridSize","maxZoom","styles","url","createSvgDataUri","textColor","height","width","svg","btoa"],"mappings":";;AAAO,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIC,KAAK,EAAEC,2BAA2B,EAAK;EAClF,IAAMC,QAAQ,GAAG,EAAE,CAAA;AAEnB,EAAA,IAAI,CAACD,2BAA2B,EAAE,OAAO,EAAE,CAAA;AAE3C,EAAA,IAAME,sBAAsB,GAAGC,KAAK,CAACC,OAAO,CAACJ,2BAA2B,CAAC,GACtEA,2BAA2B,CAACK,MAAM,CAAC,UAACC,GAAG,EAAEC,MAAM,EAAK;AACrD,IAAA,IAAIA,MAAM,KAAA,IAAA,IAANA,MAAM,KAAA,KAAA,CAAA,IAANA,MAAM,CAAEC,SAAS,EAAEF,GAAG,CAACC,MAAM,CAACC,SAAS,CAAC,GAAGD,MAAM,CAAA;AACrD,IAAA,OAAOD,GAAG,CAAA;AACT,GAAC,EAAE,EAAE,CAAC,GACNN,2BAA2B,CAAA;AAE9B,EAAA,IAAMS,cAAc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AAAnC,MAAA,CACgC0B,SAAS,EAC3C,iBAAA,CAAA,CAAA;AACP,EAAA,OAAA,4BAAA,CAAA1B,MAAA,CAAoCoC,IAAI,CAACD,GAAG,CAAC,CAAA,CAAA;AAC9C;;;;"}
1
+ {"version":3,"file":"mapUtil.js","sources":["../../src/util/mapUtil.js"],"sourcesContent":["export const getDistinctItemsByProximity = (items, listingEntitiesDetailsInput) => {\n\tconst clusters = {};\n\n\tif (!listingEntitiesDetailsInput) return [];\n\n\tconst listingEntitiesDetails = Array.isArray(listingEntitiesDetailsInput)\n\t\t? listingEntitiesDetailsInput.reduce((acc, entity) => {\n\t\t\tif (entity?.entityKey) acc[entity.entityKey.toLowerCase()] = entity;\n\t\t\treturn acc;\n\t\t }, {})\n\t\t: Object.keys(listingEntitiesDetailsInput).reduce((acc, key) => {\n\t\t\tacc[key.toLowerCase()] = listingEntitiesDetailsInput[key];\n\t\t\treturn acc;\n\t\t }, {});\n\n\tconst closeItemPairs = findCloseItems(listingEntitiesDetails);\n\tif (closeItemPairs.length > 0) {\n\t\tconst adjusted = adjustItemPositions(listingEntitiesDetails, closeItemPairs);\n\t\tObject.assign(listingEntitiesDetails, adjusted);\n\t}\n\n\titems?.forEach(item => {\n\t\tconst entityKey = item?.fields?.entityKey;\n\t\tif (!entityKey || entityKey === '-1') return;\n\t\tconst entityDetails = listingEntitiesDetails[entityKey.toLowerCase()];\n\t\tif (!entityDetails) {\n\t\t\tconsole.error(`Details not found for entityKey: ${entityKey}`);\n\t\t\treturn;\n\t\t}\n\n\t\titem.mapDetails = entityDetails;\n\n\t\tconst normalizedEntityKey = entityKey.toLowerCase();\n\t\tif (!clusters[normalizedEntityKey]) {\n\t\t\tclusters[normalizedEntityKey] = {\n\t\t\t\t...entityDetails,\n\t\t\t\titems: { [item.id]: item }\n\t\t\t};\n\t\t} else {\n\t\t\tclusters[normalizedEntityKey].items[item.id] = item;\n\t\t}\n\t});\n\n\treturn Object.values(clusters);\n};\n\nexport const findCloseItems = entitiesByKey => {\n\tconst closeItems = [];\n\tconst items = Object.values(entitiesByKey); // Convert object to array\n\tconst proximityThreshold = 0.0001;\n\n\tfor (let i = 0; i < items.length; i++) {\n\t\tfor (let j = i + 1; j < items.length; j++) {\n\t\t\tconst distanceLat = Math.abs(items[i].latitude - items[j].latitude);\n\t\t\tconst distanceLng = Math.abs(items[i].longitude - items[j].longitude);\n\t\t\tif (distanceLat < proximityThreshold && distanceLng < proximityThreshold) {\n\t\t\t\tcloseItems.push({ item1: items[i], item2: items[j] });\n\t\t\t}\n\t\t}\n\t}\n\n\treturn closeItems;\n};\n\nexport const adjustItemPositions = (entitiesByKey, closeItemPairs) => {\n\tconst adjustmentValue = 0.0001;\n\tconst adjustedItems = { ...entitiesByKey };\n\n\tcloseItemPairs.forEach(pair => {\n\t\tconst key2 = pair.item2.entityKey;\n\t\tif (adjustedItems[key2]) {\n\t\t\tadjustedItems[key2] = {\n\t\t\t\t...adjustedItems[key2],\n\t\t\t\tlatitude: adjustedItems[key2].latitude + adjustmentValue,\n\t\t\t\tlongitude: adjustedItems[key2].longitude + adjustmentValue\n\t\t\t};\n\t\t}\n\t});\n\n\treturn adjustedItems;\n};\n\nexport const clusterOptions = (clusterGridSize, fillColor) => {\n\treturn {\n\t\tgridSize: clusterGridSize,\n\t\tmaxZoom: 15,\n\t\tstyles: [\n\t\t\t{\n\t\t\t\turl: createSvgDataUri(fillColor),\n\t\t\t\ttextColor: 'white',\n\t\t\t\theight: 40,\n\t\t\t\twidth: 40\n\t\t\t}\n\t\t]\n\t};\n};\n\nfunction createSvgDataUri(fillColor) {\n\tconst svg = `<svg width=\"50\" height=\"50\" xmlns=\"http://www.w3.org/2000/svg\">\n\t <circle cx=\"25\" cy=\"25\" r=\"20\" fill=\"${fillColor}\" />\n\t</svg>`;\n\treturn `data:image/svg+xml;base64,${btoa(svg)}`;\n}\n"],"names":["getDistinctItemsByProximity","items","listingEntitiesDetailsInput","clusters","listingEntitiesDetails","Array","isArray","reduce","acc","entity","entityKey","toLowerCase","Object","keys","key","closeItemPairs","findCloseItems","length","adjusted","adjustItemPositions","assign","forEach","item","_item$fields","fields","entityDetails","console","error","concat","mapDetails","normalizedEntityKey","_objectSpread","_defineProperty","id","values","entitiesByKey","closeItems","proximityThreshold","i","j","distanceLat","Math","abs","latitude","distanceLng","longitude","push","item1","item2","adjustmentValue","adjustedItems","pair","key2","clusterOptions","clusterGridSize","fillColor","gridSize","maxZoom","styles","url","createSvgDataUri","textColor","height","width","svg","btoa"],"mappings":";;AAAO,IAAMA,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIC,KAAK,EAAEC,2BAA2B,EAAK;EAClF,IAAMC,QAAQ,GAAG,EAAE,CAAA;AAEnB,EAAA,IAAI,CAACD,2BAA2B,EAAE,OAAO,EAAE,CAAA;AAE3C,EAAA,IAAME,sBAAsB,GAAGC,KAAK,CAACC,OAAO,CAACJ,2BAA2B,CAAC,GACtEA,2BAA2B,CAACK,MAAM,CAAC,UAACC,GAAG,EAAEC,MAAM,EAAK;AACrD,IAAA,IAAIA,MAAM,KAANA,IAAAA,IAAAA,MAAM,eAANA,MAAM,CAAEC,SAAS,EAAEF,GAAG,CAACC,MAAM,CAACC,SAAS,CAACC,WAAW,EAAE,CAAC,GAAGF,MAAM,CAAA;AACnE,IAAA,OAAOD,GAAG,CAAA;AACT,GAAC,EAAE,EAAE,CAAC,GACNI,MAAM,CAACC,IAAI,CAACX,2BAA2B,CAAC,CAACK,MAAM,CAAC,UAACC,GAAG,EAAEM,GAAG,EAAK;IAC/DN,GAAG,CAACM,GAAG,CAACH,WAAW,EAAE,CAAC,GAAGT,2BAA2B,CAACY,GAAG,CAAC,CAAA;AACzD,IAAA,OAAON,GAAG,CAAA;GACR,EAAE,EAAE,CAAC,CAAA;AAET,EAAA,IAAMO,cAAc,GAAGC,cAAc,CAACZ,sBAAsB,CAAC,CAAA;AAC7D,EAAA,IAAIW,cAAc,CAACE,MAAM,GAAG,CAAC,EAAE;AAC9B,IAAA,IA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,CACgC2B,SAAS,EAC3C,iBAAA,CAAA,CAAA;AACP,EAAA,OAAA,4BAAA,CAAA3B,MAAA,CAAoCqC,IAAI,CAACD,GAAG,CAAC,CAAA,CAAA;AAC9C;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abcagency/hc-ui-components",
3
- "version": "1.4.18",
3
+ "version": "1.4.21",
4
4
  "description": "UI Components for HireControl",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -27,6 +27,8 @@
27
27
  "ajv": "^8.16.0",
28
28
  "ajv-keywords": "^5.1.0",
29
29
  "fuse.js": "^7.0.0",
30
+ "react": "^18.3.1",
31
+ "react-dom": "^18.3.1",
30
32
  "tailwind-merge": "^2.2.0"
31
33
  },
32
34
  "peerDependencies": {
@@ -39,12 +41,54 @@
39
41
  "@radix-ui/react-tabs": "^1.0.4",
40
42
  "@react-google-maps/api": "^2.19.3",
41
43
  "framer-motion": "^10.18.0",
42
- "react": ">=18.0.0",
43
- "react-dom": ">=18.0.0",
44
44
  "react-router-dom": "^6.23.1",
45
45
  "react-wrap-balancer": "^1.1.1",
46
46
  "use-places-autocomplete": "^4.0.1"
47
47
  },
48
+ "peerDependenciesMeta": {
49
+ "@headlessui/react": {
50
+ "optional": false
51
+ },
52
+ "@iconify/react": {
53
+ "optional": false
54
+ },
55
+ "@radix-ui/react-accordion": {
56
+ "optional": false
57
+ },
58
+ "@radix-ui/react-dialog": {
59
+ "optional": false
60
+ },
61
+ "@radix-ui/react-popover": {
62
+ "optional": false
63
+ },
64
+ "@radix-ui/react-select": {
65
+ "optional": false
66
+ },
67
+ "@radix-ui/react-tabs": {
68
+ "optional": false
69
+ },
70
+ "@react-google-maps/api": {
71
+ "optional": false
72
+ },
73
+ "framer-motion": {
74
+ "optional": false
75
+ },
76
+ "react": {
77
+ "optional": false
78
+ },
79
+ "react-dom": {
80
+ "optional": false
81
+ },
82
+ "react-router-dom": {
83
+ "optional": false
84
+ },
85
+ "react-wrap-balancer": {
86
+ "optional": false
87
+ },
88
+ "use-places-autocomplete": {
89
+ "optional": false
90
+ }
91
+ },
48
92
  "devDependencies": {
49
93
  "@babel/cli": "^7.24.6",
50
94
  "@babel/core": "^7.24.6",
@@ -80,8 +124,6 @@
80
124
  "postcss": "^8.4.38",
81
125
  "postcss-prefixer": "^3.0.0",
82
126
  "postcss-preset-env": "^9.5.14",
83
- "react": "19.1.1",
84
- "react-dom": "19.1.1",
85
127
  "rollup": "^4.18.0",
86
128
  "rollup-plugin-filesize": "^10.0.0",
87
129
  "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -15,7 +15,7 @@ import { ThemeProvider } from '~/contexts/themeContext';
15
15
  import { getMapConfig } from '~/services/configService';
16
16
  import { setClientAuthKey } from '~/clientToken.js';
17
17
 
18
- import '../styles/index.css';
18
+ import '../styles/components.css';
19
19
 
20
20
  // Libraries for Google Maps
21
21
  const LIBRARIES = ['places'];
@@ -28,7 +28,7 @@ const MapAccordionItemContainer = ({
28
28
  console.log('mapItems here', mapItems);
29
29
  //edited here for new structure of entity key
30
30
  console.log('the item in questions is',item);
31
- const location = mapItems.find(x => Object.prototype.hasOwnProperty.call(x.items, item.fields.entityKey)) || null;
31
+ const location = mapItems.find(x => x.entityKey?.toLowerCase() === item.fields.entityKey?.toLowerCase()) || null;
32
32
  console.log('location is', location);
33
33
  selectItem(item, location, 12, {
34
34
  lat: location?.latitude,
@@ -191,7 +191,8 @@ export const MapListProvider: React.FC<MapListProviderProps> = ({
191
191
  listing.fields.entityKey !== ''
192
192
  ) {
193
193
  const entityKey = listing.fields.entityKey;
194
- const travelTime = fetchedEntities[entityKey]?.travelTime;
194
+ // Try exact match first, then lowercase match for case-insensitive lookup
195
+ const travelTime = (fetchedEntities[entityKey] || fetchedEntities[entityKey.toLowerCase()])?.travelTime;
195
196
  if (travelTime !== undefined && listing.fields) {
196
197
  listing.fields.travelTime = travelTime;
197
198
  }
@@ -36,7 +36,8 @@ const fetchListings = async (
36
36
  for (let i = 0; i < listingsResult.length; i++) {
37
37
  const listing = listingsResult[i];
38
38
  if (listing.fields && listing.fields.entityKey && listing.fields.entityKey !== '' && listing.fields) {
39
- const entity = entitiesByKey[listing.fields.entityKey];
39
+ // Try exact match first, then lowercase match for case-insensitive lookup
40
+ const entity = entitiesByKey[listing.fields.entityKey] || entitiesByKey[listing.fields.entityKey.toLowerCase()];
40
41
  console.log("Entity for listing with travel time", listing.fields.entityKey, entity);
41
42
 
42
43
  if (entity) {
@@ -0,0 +1,30 @@
1
+ @config "../../tailwind.config.js";
2
+
3
+ /* Only include components and utilities - no base styles */
4
+ @tailwind components;
5
+ @tailwind utilities;
6
+
7
+ @layer components {
8
+ .track * {
9
+ @apply hc-pointer-events-none;
10
+ }
11
+
12
+ .stretched-link::after {
13
+ @apply hc-content-[''] hc-absolute hc-inset-0 hc-z-[1] hc-pointer-events-auto hc-bg-transparent;
14
+ }
15
+ }
16
+
17
+ /* Component-specific utilities */
18
+ .fit-content {
19
+ height: fit-content;
20
+ }
21
+
22
+ /* CSS Variables for theming - these should be set by the consuming app */
23
+ :root {
24
+ --ui-text: #000000;
25
+ --ui-accent: #959595;
26
+ --primary: #959595;
27
+ --primary-dark: #959595;
28
+ --secondary: #959595;
29
+ --secondary-dark: #959595;
30
+ }
@@ -5,10 +5,13 @@ export const getDistinctItemsByProximity = (items, listingEntitiesDetailsInput)
5
5
 
6
6
  const listingEntitiesDetails = Array.isArray(listingEntitiesDetailsInput)
7
7
  ? listingEntitiesDetailsInput.reduce((acc, entity) => {
8
- if (entity?.entityKey) acc[entity.entityKey] = entity;
8
+ if (entity?.entityKey) acc[entity.entityKey.toLowerCase()] = entity;
9
9
  return acc;
10
10
  }, {})
11
- : listingEntitiesDetailsInput;
11
+ : Object.keys(listingEntitiesDetailsInput).reduce((acc, key) => {
12
+ acc[key.toLowerCase()] = listingEntitiesDetailsInput[key];
13
+ return acc;
14
+ }, {});
12
15
 
13
16
  const closeItemPairs = findCloseItems(listingEntitiesDetails);
14
17
  if (closeItemPairs.length > 0) {
@@ -19,7 +22,7 @@ export const getDistinctItemsByProximity = (items, listingEntitiesDetailsInput)
19
22
  items?.forEach(item => {
20
23
  const entityKey = item?.fields?.entityKey;
21
24
  if (!entityKey || entityKey === '-1') return;
22
- const entityDetails = listingEntitiesDetails[entityKey];
25
+ const entityDetails = listingEntitiesDetails[entityKey.toLowerCase()];
23
26
  if (!entityDetails) {
24
27
  console.error(`Details not found for entityKey: ${entityKey}`);
25
28
  return;
@@ -27,13 +30,14 @@ export const getDistinctItemsByProximity = (items, listingEntitiesDetailsInput)
27
30
 
28
31
  item.mapDetails = entityDetails;
29
32
 
30
- if (!clusters[entityKey]) {
31
- clusters[entityKey] = {
33
+ const normalizedEntityKey = entityKey.toLowerCase();
34
+ if (!clusters[normalizedEntityKey]) {
35
+ clusters[normalizedEntityKey] = {
32
36
  ...entityDetails,
33
37
  items: { [item.id]: item }
34
38
  };
35
39
  } else {
36
- clusters[entityKey].items[item.id] = item;
40
+ clusters[normalizedEntityKey].items[item.id] = item;
37
41
  }
38
42
  });
39
43