1import{r as m,j as t}from"./vendor-BOadm9Gy.js";import{A as h,u as j,a as f,M as b,b as x,I as w,d as A}from"./vendor-map-C21NF31O.js";import{p as v}from"./PropertiesPage-D5BmT6f7.js";import{r as N}from"./index-DcN63-UG.js";import{ac as I,as as C,aJ as M,cU as E}from"./vendor-icons-kUGsRs8M.js";import"./ProtectedRoute-CrAct2uw.js";import"./SignInGate-C8h4QWAT.js";import"./ListingCompare-DH6gieHv.js";import"./vendor-toast-D6B0hGGw.js";import"./SectionHero-DiEC8UrR.js";import"./PageHero-DcDr-0N-.js";import"./vendor-motion-DwikGbVM.js";import"./huntingScreens-BUQnXGia.js";import"./liveData-B-JP5enQ.js";import"./listingCard-CQCxl9Sv.js";import"./parts-DHFx0_fH.js";import"./leasing-CdBr7fTh.js";import"./billing-DUvobp70.js";import"./FaqList-BKcKv2xT.js";import"./ListingsBrowser-DKIS_gVw.js";import"./vendor-ui-CeWyqG0w.js";import"./guestAllowance-D6291Mbp.js";import"./ReportListingButton-DbJ-9Zxa.js";import"./ReportButton-CtaQmsdm.js";import"./textarea-Du0P8z2Y.js";import"./adminFeaturesApi-7Qqpvd5d.js";import"./HomeAssistant-BnsY3jEo.js";import"./SuggestedMessages-CWV_yBFJ.js";import"./messageSuggestions-DhDNsipD.js";import"./urlState-B_08S4CE.js";import"./leasingScreens-CLWCzzJG.js";import"./LocationAutocomplete-B1B46CfE.js";import"./SavedSearches-Do81aa9J.js";import"./RoommateForListing-P6SN8t6C.js";import"./avatar-Cn6RInez.js";import"./snesty-CUiRl0A6.js";import"./NestSearchMark-CqXMNjtM.js";import"./CommuteBar-9WWu5-W2.js";import"./useIsPhone-_GM7JVgE.js";import"./input-Bkp3DRxb.js";import"./LocationMap-BakvF4up.js";import"./ListingContactCard-ioDqfqwh.js";import"./scamCheck-CbknRgRj.js";import"./CollapsibleSidebar-CFZk25t2.js";import"./RentVsBuyCalculator-CVhT2I-U.js";import"./PageWithSplitScreenChat-FH3zsyYX.js";import"./snestyChat-vxICfnRw.js";import"./SEO-BlctqH_J.js";import"./useShowGuestPreview-Esp5n2H_.js";import"./vendor-classnames-CSqCgoPn.js";const k="AIzaSyCDl7LIdLpoWBJEvGjIB3klzq61gCdcU0U",y="bd099777667632dd1c1cc04a";let g=!1;const d=new Set;if(typeof window<"u"){const e=window,i=e.gm_authFailure;e.gm_authFailure=()=>{i?.(),g=!0,d.forEach(o=>o())}}const L=()=>m.useSyncExternalStore(e=>(d.add(e),()=>d.delete(e)),()=>g,()=>!1);function U(e){return t.jsx(h,{apiKey:k,libraries:["marker"],children:t.jsx(_,{...e})})}function P(){return t.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center text-sm text-gray-500",role:"status",children:[t.jsx(E,{className:"h-6 w-6 text-gray-400"}),"The map isn't available right now. Each place opens on Google Maps."]})}const _=m.memo(function({center:i,places:o,selectedId:a,onSelect:n}){const l=j();if(L()||l===f.FAILED||l===f.AUTH_FAILURE)return t.jsx(P,{});const r=o.find(s=>s.id===a)||null;return t.jsx("div",{className:"h-full w-full",role:"region","aria-label":"Map of places nearby",children:t.jsxs(b,{mapId:y,defaultCenter:{lat:i.lat,lng:i.lon},defaultZoom:14,gestureHandling:"cooperative",disableDefaultUI:!0,zoomControl:!0,clickableIcons:!1,onClick:()=>n(null),className:"h-full w-full",children:[t.jsx(B,{center:i,places:o,selected:r}),t.jsx(x,{position:{lat:i.lat,lng:i.lon},title:"Area center",zIndex:1,children:t.jsx("span",{className:"block h-4 w-4 rounded-full border-[3px] border-white bg-[#0C1A2B] shadow-md"})}),o.map((s,c)=>{const u=s.id===a;return t.jsx(x,{position:{lat:s.lat,lng:s.lon},title:s.name,zIndex:u?1e3:10+c,onClick:()=>n(s.id),children:t.jsx("span",{className:`flex h-7 w-7 items-center justify-center rounded-full border-2 border-white text-xs font-bold text-white shadow-md transition ${u?"scale-125 bg-[#3A5A8C]":"bg-[#0C1A2B]"}`,children:c+1})},s.id)}),r&&t.jsx(w,{position:{lat:r.lat,lng:r.lon},pixelOffset:[0,-32],onCloseClick:()=>n(null),headerDisabled:!0,children:t.jsxs("div",{className:"max-w-[220px] text-[#0C1A2B]",children:[t.jsx("p",{className:"font-semibold",children:r.name}),r.rating!=null&&t.jsxs("p",{className:"mt-0.5 flex items-center gap-1 text-xs text-gray-600",children:[t.jsx(I,{className:"h-3 w-3 fill-amber-400 text-amber-400"})," ",r.rating,r.reviews!=null&&` (${r.reviews.toLocaleString(N().locale)})`," · ",v(r.miles)]}),r.address&&t.jsx("p",{className:"mt-1 text-xs text-gray-500",children:r.address}),t.jsxs("div",{className:"mt-2 flex gap-3 text-xs font-semibold",children:[t.jsxs("a",{href:r.mapsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[#3A5A8C] hover:underline",children:[t.jsx(C,{className:"h-3 w-3"})," Google Maps"]}),t.jsxs("a",{href:r.directionsUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-[#3A5A8C] hover:underline",children:[t.jsx(M,{className:"h-3 w-3"})," Directions"]})]})]})})]})})});function B({center:e,places:i,selected:o}){const a=A(),n=i.map(l=>l.id).join("|");return m.useEffect(()=>{if(!a||o)return;if(!i.length){a.panTo({lat:e.lat,lng:e.lon}),a.setZoom(14);return}const l=new google.maps.LatLngBounds({lat:e.lat,lng:e.lon});for(const p of i)l.extend({lat:p.lat,lng:p.lon}
1);a.fitBounds(l,40)},[a,n,e.lat,e.lon,o]),m.useEffect(()=>{!a||!o||(a.panTo({lat:o.lat,lng:o.lon}),(a.getZoom()??0)<16&&a.setZoom(16))},[a,o]),null}var Ut=m.memo(U);export{Ut as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.