PageSourceSearch

https://www.flowauto.com/assets/locations-df6ufaha.js

js flowauto.com collected 2026-09-24 10:47:55 UTC 16,405 bytes, 1 lines download raw bytes

1import{r as n,Q as R,j as e,B as f,T as z,cy as ae,dQ as J,dR as ce,dS as ie,aA as Y,dT as H,cT as G,W as N,X as E,dU as le,dV as de,dW as U,ao as Z,dX as q,bK as ue,bL as _e,b2 as Q,bM as me,bN as pe,cS as he,dY as ge,dZ as xe,cU as Ce,aN as fe,p as Le,H as je,q as ve,$ as Me,d_ as ke,ai as Ee,aj as V,ak as K,al as k,ap as $,aq as Ie,au as ye,an as Ae}from"./index-Cu2llfOr.js";import{A as Se,L as be}from"./address_mark-CclPzQj_.js";import{c as B}from"./index-_4CA2XTX.js";import{a as P}from"./responsiveValues-CetebHUT.js";const X=n.createContext({}),D=()=>n.useContext(X),we=()=>{const{locationsHeaderBlockValue:s}=D(),{isIncreaseMobile:t}=R();return s?e.jsx(f,{mt:15,mb:5,px:t?3:2.5,children:e.jsx(z,{component:"h1",variant:"h3",color:"primary.main",muiTypographyProps:{textAlign:"center",lineHeight:1},children:ae(s.header_text)})}):null},Ne=()=>{const{locationsFooterBlockValue:s}=D(),{isIncreaseMobile:t}=R();return s?e.jsx(f,{my:t?2:5,px:t?3:10,dangerouslySetInnerHTML:{__html:s.footer_text}}):null},Re="_main_1ga0n_1",Te="_wrapper_1ga0n_88",Oe="_describe_container_1ga0n_99",Be="_city_wrapper_1ga0n_102",Pe="_city_description_1ga0n_122",He="_wrapper_city_description_1ga0n_140",Ge="_describe_1ga0n_99",De="_rightBlueArrow_1ga0n_171",We="_address_line_1ga0n_177",Fe="_address_mark_1ga0n_181",Ue="_label_1ga0n_186",Ve="_sub_address_block_1ga0n_192",Ke="_address_1ga0n_177",$e="_sub_address_1ga0n_192",ze="_line_1ga0n_209",Je="_hover_address_1ga0n_226",Ye="_card_1ga0n_229",Ze="_plus_img_city_1ga0n_375",qe="_active_card_hover_1ga0n_447",Qe="_location_page_main_1ga0n_933",Xe="_scrollCity_1ga0n_978",es="_innerCard_1ga0n_1026",ss="_mainLine_1ga0n_1099",ts="_darkMinusIcon_1ga0n_1133",m={main:Re,wrapper:Te,describe_container:Oe,city_wrapper:Be,city_description:Pe,wrapper_city_description:He,describe:Ge,rightBlueArrow:De,address_line:We,address_mark:Fe,label:Ue,sub_address_block:Ve,address:Ke,sub_address:$e,line:ze,hover_address:Je,card:Ye,plus_img_city:Ze,active_card_hover:qe,location_page_main:Qe,scrollCity:Xe,innerCard:es,mainLine:ss,darkMinusIcon:ts},ns=({cityButtonClick:s,brandButtonClick:t,handleOpen:c,isCityTab:o,citiesWithPositions:r,brandsWithPositions:a})=>{const d=n.useMemo(()=>o?r:a,[o,r,a]);return e.jsxs(e.Fragment,{children:[e.jsx(f,{px:3,pb:3,children:e.jsx(J,{cityButtonClick:s,brandButtonClick:t,isCityTab:o})}),e.jsx("div",{className:m.mainLine}),e.jsx(f,{children:d.map(i=>e.jsx(ce,{item:i,handleOpen:c,isCityTab:o,minusIcon:e.jsx("div",{className:m.darkMinusIcon,children:e.jsx(ie,{})}),addressIcon:e.jsx("div",{className:m.address_mark,children:e.jsx(Se,{})})},i.id))})]})},os=()=>{const s=Y(),{address:t}=s.state||{},o=new URLSearchParams(s.search).get("address"),{setDealership:r,setModalOpen:a}=H(),{cityButtonClick:d,brandButtonClick:i,handleOpen:u,citiesWithPositions:h,brandsWithPositions:p,isCityTab:l,getMetaForDealer:g}=G();return n.useEffect(()=>{let x=null;if(!t&&o)try{x=JSON.parse(atob(o))}catch(C){console.error(C)}const _=t||x;if(_){const C=g(_),L={..._,...C};r(I=>JSON.stringify(I)===JSON.stringify(L)?I:L),u(_)}},[t,g,r,a,o,u]),e.jsx(ns,{cityButtonClick:d,brandButtonClick:i,handleOpen:u,isCityTab:l,citiesWithPositions:h,brandsWithPositions:p})},rs=({city:s,currentIndex:t,hoverIndex:c,onMouseEnter:o,zoomOnClick:r,cardRef:a})=>e.jsx("div",{children:e.jsx(N.ImageEngineProvider,{deliveryAddress:E.IMAGE_ENGINE_URL,children:e.jsx("div",{ref:a,onMouseEnter:()=>o(s,t),onClick:()=>r(s),className:B(m.card,{[m.active_card_hover]:t===c}),children:e.jsxs("div",{className:m.innerCard,children:[s.city,e.jsx(N.Image,{className:m.plus_img_city,src:`/arrow_right_dark.png?v=${E.STATIC_IMAGE_VERSION}`,alt:"arrow right",loading:"lazy",directives:{autoWidthWithFallback:60,compression:E.IMAGE_STATIC_COMPRESSION_HIGH}}),e.jsx(N.Image,{className:m.plus_img_city,src:`/plus.png?v=${E.STATIC_IMAGE_VERSION}`,alt:"plus",loading:"lazy",directives:{autoWidthWithFallback:155,compression:E.IMAGE_STATIC_COMPRESSION_HIGH}})]})})})}),as=({address:s,handleOpen:t,zoomOnClick:c,onMouseEnter:o,isCity:r,dealerCardArrowIcon:a,addressIcon:d,handleRedirectTo:i})=>e.jsx("div",{className:m.describe_container,children:e.jsxs("div",{className:m.describe,onClick:()=>{c(s),t(s),i(s)},onMouseEnter:()=>o(s),children:[e.jsxs("div",{className:m.address_line,children:[d,e.jsx("div",{className:m.label,children:r?s.make:s.city})]}),e.jsxs("div",{className:m.sub_address_block,children:[e.jsx("div",{className:m.address,children:s.address}),e.jsx("div",{className:m.sub_address,children:s.sub_address})]}),e.jsx("div",{className:m.rightBlueArrow,children:a}),e.jsx("div",{className:m.line})]},s.id)}),ee=n.memo(({content:s,index:t,onListMouseEnter:c,onCardMouseEnter:o,onMouseLeave:r,hoverIndex:a,handleOpen:d,zoomOnClick:i,isCity:u,dealerCardArrowIcon:h,parentRef:p,scrollCityHeight:l,scrollCityTop:g,scrollCityBottom:x,startIndex:_,endIndex:C})=>{const[L,I]=n.useState(),[v,M]=n.useState(),[j,S]=n.useState(3e3),[b,w]=n.useState(null),[y,T]=n.useState(null),[W,ne]=n.useState(null),O=n.useRef([]);n.useEffect(()=>{if(p){const A=p.getBoundingClientRect();I(A.top),S(A.width),M(A.bottom)}},[p,g,x]),n.useEffect(()=>{L!=null&&(T(L-g),ne(x-v))},[L,g,v,x]),n.useEffect(()=>{if(O){const A=O.current.getBoundingClientRect();w(A.height)}},[O]);const F=n.useMemo(()=>le(_,C),[_,C]),oe=n.useMemo(()=>y!==null?de(b,l,t,F,j,y,W):{},[b,l,t,F,j,y,W]);return e.jsx("div",{style:oe,ref:O,onMouseEnter:c,onMouseLeave:r,className:B(m.city_description,{[m.hover_address]:a===t}),children:e.jsx(N.ImageEngineProvider,{deliveryAddress:E.IMAGE_ENGINE_URL,children:e.jsx("div",{className:m.wrapper_city_description,children:s.addresses.map((A,re)=>e.jsx(as,{address:A,handleOpen:d,zoomOnClick:i,isCity:u,onMouseEnter:o,handleRedirectTo:()=>null,dealerCardArrowIcon:h,addressIcon:e.jsx("div",{className:m.address_mark,children:e.jsx("div",{className:m.darkMinusIcon,children:e.jsx(N.Image,{src:`/address_mark.png?v=${E.STATIC_IMAGE_VERSION}`,alt:"Address Mark",directives:{autoWidthWithFallback:14,compression:E.IMAGE_STATIC_COMPRESSION_HIGH}})})})},re))})})})});ee.displayName="DealersList";const cs=()=>{const[s,t]=n.useState(null),[c,o]=n.useState(null),[r,a]=n.useState(null),[d,i]=n.useState(0),[u,h]=n.useState(0),p=n.useRef([]),l=n.useRef(),g=n.useRef();n.useEffect(()=>{const _=()=>{h(g.current.scrollTop)},C=g.current;return C.addEventListener("scroll",_),()=>{C.removeEventListener("scroll",_)}
1},[]),n.useEffect(()=>{const _=()=>{i(window.scrollY)};return window.addEventListener("scroll",_),()=>{window.removeEventListener("scroll",_)}},[]),n.useEffect(()=>{if(l){const _=l.current.getBoundingClientRect();t(_.height)}},[]);const x=()=>{if(l.current){const _=l.current.getBoundingClientRect();o(_.top),a(_.bottom)}};return n.useEffect(()=>{x()},[d]),n.useEffect(()=>{const _=()=>{x()};return window.addEventListener("mousemove",_),()=>{window.removeEventListener("mousemove",_)}},[]),{scrollCityBlockHeight:s,scrollCityBlockTop:c,scrollCityBlockBottom:r,menuItemRefs:p,scrollCityRef:l,cityWrapperRef:g,wrapperBlockPosition:u}},is=()=>e.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M17.6895 11.25H3.75C3.55109 11.25 3.36032 11.329 3.21967 11.4696C3.07902 11.6103 3 11.8011 3 12C3 12.1989 3.07902 12.3896 3.21967 12.5303C3.36032 12.671 3.55109 12.75 3.75 12.75H17.6895L12.219 18.219C12.0782 18.3598 11.9991 18.5508 11.9991 18.75C11.9991 18.9491 12.0782 19.1401 12.219 19.281C12.3598 19.4218 12.5508 19.5009 12.75 19.5009C12.9492 19.5009 13.1402 19.4218 13.281 19.281L20.031 12.531C20.1008 12.4613 20.1563 12.3785 20.1941 12.2874C20.2319 12.1963 20.2513 12.0986 20.2513 12C20.2513 11.9013 20.2319 11.8036 20.1941 11.7125C20.1563 11.6214 20.1008 11.5386 20.031 11.469L13.281 4.71897C13.1402 4.57814 12.9492 4.49902 12.75 4.49902C12.5508 4.49902 12.3598 4.57814 12.219 4.71897C12.0782 4.8598 11.9991 5.05081 11.9991 5.24997C11.9991 5.44913 12.0782 5.64014 12.219 5.78097L17.6895 11.25Z",fill:"#00539B"})}),ls=({config:s,hoverIndex:t,handleOpen:c,zoomOnClick:o,dealersListOnMouseLeave:r,dealersListOnMouseEnter:a,cardLocationOnMouseEnter:d,cardLocationOnMouseLeave:i,cardLocationZoomOnClick:u,isCity:h})=>{const{scrollCityBlockHeight:p,scrollCityBlockTop:l,scrollCityBlockBottom:g,menuItemRefs:x,scrollCityRef:_,cityWrapperRef:C,wrapperBlockPosition:L}
1=cs(),I=U(s,C,L).startIndex||0,v=U(s,C,L).endIndex-1||7;return e.jsx("div",{className:B(m.wrapper),children:e.jsx(N.ImageEngineProvider,{deliveryAddress:E.IMAGE_ENGINE_URL,children:e.jsx("div",{className:m.scrollCity,ref:_,children:e.jsx("div",{className:m.city_wrapper,onMouseLeave:i,ref:C,children:s==null?void 0:s.map((M,j)=>e.jsxs("div",{children:[e.jsx(rs,{cardRef:S=>x.current[j]=S,city:M,currentIndex:j,hoverIndex:t,onMouseEnter:d,onMouseLeave:i,zoomOnClick:u,isCity:h},M.id),t===j&&e.jsx(ee,{content:M,index:j,onMouseLeave:r,hoverIndex:t,handleOpen:c,zoomOnClick:o,onListMouseEnter:a,onCardMouseEnter:a,isCity:h,dealerCardArrowIcon:e.jsx(is,{}),parentRef:x.current[j],scrollCityHeight:p,scrollCityTop:l,scrollCityBottom:g,startIndex:I,endIndex:v})]},M.id))})})})})},se=n.memo(({content:s,hoverIndex:t,cityButtonClick:c,brandButtonClick:o,handleOpen:r,resetHighlightCurrentMarker:a,cardLocationOnMouseEnter:d,highlightCurrentMarker:i,onMouseLeave:u,zoomOnClick:h,isCityTab:p})=>e.jsxs(e.Fragment,{children:[e.jsx(J,{cityButtonClick:c,brandButtonClick:o,isCityTab:p}),e.jsx(ls,{config:s,hoverIndex:t,handleOpen:r,zoomOnClick:h,dealersListOnMouseLeave:a,dealersListOnMouseEnter:i,cardLocationOnMouseEnter:d,cardLocationOnMouseLeave:u,cardLocationZoomOnClick:h,isCity:p})]}));se.displayName="LocationsList";const te=n.memo(({handleZoomClick:s})=>{var S;const[t,c]=n.useState(null),o=Z(),r=Y(),a=(S=r.state)==null?void 0:S.address,d=n.useRef(!1),u=new URLSearchParams(r.
1search).get("address"),{cityButtonClick:h,brandButtonClick:p,handleOpen:l,resetHighlightCurrentMarker:g,cardLocationOnMouseEnter:x,highlightCurrentMarker:_,onMouseLeave:C,citiesWithPositions:L,brandsWithPositions:I,zoomOnClick:v,isCityTab:M}=G(s,c),j=M?L:I;return n.useEffect(()=>{let b=null;if(!a&&u)try{b=JSON.parse(atob(u))}catch{try{b=JSON.parse(decodeURIComponent(u))}catch(T){console.error("Failed to decode address param:",T)}}const w=a||b;w&&!d.current&&(setTimeout(()=>{l(w),v(w),setTimeout(()=>{v(w);const y=new URLSearchParams(r.search);y.delete("address");const T=`${r.pathname}${y.toString()?"?"+y.toString():""}`;window.history.replaceState(null,"",T)},300)},0),window.scrollTo({top:(document.documentElement.scrollHeight-window.innerHeight)/5,left:0,behavior:"smooth"}),d.current=!0)},[l,r.pathname,o,a,v,u,r.search]),e.jsx(se,{content:j,hoverIndex:t,cityButtonClick:h,brandButtonClick:p,handleOpen:l,resetHighlightCurrentMarker:g,cardLocationOnMouseEnter:x,highlightCurrentMarker:_,onMouseLeave:C,zoomOnClick:v,isCityTab:M})});te.displayName="LocationsListWrapper";const ds={VITE_REACT_APP_GOOGLE_MAP_ID:"bef5eacd7840d7acee2dcdb4"},us=ds,_s=({map:s,position:t,icon:c,zIndex:o,onClick:r})=>{const a=n.useRef(null);return n.useEffect(()=>{if(!window.google||!s||!t)return;const d=new window.google.maps.marker.AdvancedMarkerElement({map:s,position:t,zIndex:o});if(c){const u=document.createElement("img");u.src=c,u.style.width="36px",u.style.height="36px",d.content=u}const i=d.addListener("gmp-click",r);return a.current=d,()=>{i&&i.remove(),a.current&&(a.current.map=null)}},[s,t,c,o,r]),null},ms=({locations:s,containerStyle:t,center:c,mapInstance:o,onMapLoad:r,handleZoomClick:a,handleOpen:d,zoomOnClick:i})=>{const{modalOpen:u}=H(),{clickedMarker:h}=q(),p=l=>h?h.lat===l.positions.lat&&h.lng===l.positions.lng:!1;return e.jsxs(ue,{mapContainerStyle:t,center:c,zoom:7,options:{mapTypeControl:!1,fullscreenControl:!1,mapId:us.VITE_REACT_APP_GOOGLE_MAP_ID},onLoad:r,children:[s.map((l,g)=>e.jsx(_s,{map:o,position:l.positions,icon:p(l)&&u?_e:l.icon,zIndex:p(l)&&u?1e3:g,onClick:()=>{i(l),d(l)}},`${l.positions.lat}-${l.positions.lng}-${g}`)),e.jsx("div",{className:B(m.main,{[m.location_page_main]:!0}),children:e.jsx(te,{handleZoomClick:a})})]})},ps=["marker","maps"],hs=({ewokKey:s})=>{const[t,c]=n.useState(null);return n.useEffect(()=>{(async()=>{var r;try{const a=await me.GetApiKey(s),d=(r=a==null?void 0:a.dataResponse)==null?void 0:r.googleMapKey;d?c(d):console.error("No Google Map key returned")}catch(a){console.error("Failed to load Google Map key:",a)}})()},[s]),t?e.jsx(gs,{googleMapKey:t}):e.jsx(f,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:P(639)},children:e.jsx(Q,{})})},gs=({googleMapKey:s})=>{const t={height:P(639)},c=n.useRef(null),[o,r]=n.useState(null),{isLoaded:a}=pe({id:"google-map-script",googleMapsApiKey:s,libraries:ps,version:"weekly"}),d=n.useCallback(C=>{c.current&&he(c.current,C)},[]),{handleOpen:i,zoomOnClick:u}=G(d),{center:h,markers:p,currentMarker:l}=q(),g=n.useMemo(()=>ge(l,p),[p,l]),x=n.useMemo(()=>xe(p,g),[p,g]),_=n.useCallback(C=>{c.current=C,r(C)},[]);return a?e.jsx(ms,{locations:x,containerStyle:t,center:h,mapInstance:o,onMapLoad:_,handleZoomClick:d,handleOpen:i,zoomOnClick:u}):e.jsx(f,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:P(639)},children:e.jsx(Q,{})})},xs=()=>{const{isIncreaseMobile:s}=R(),{dealership:t,modalOpen:c,setModalOpen:o}=H(),r=()=>{o(!1)},a=n.useMemo(()=>s?e.jsx(os,{}):e.jsx(hs,{}),[s]);return e.jsxs(be,{children:[a,e.jsx(Ce,{open:c,onClose:r,service:t,pageKey:"locations"})]})},Cs=({card:s})=>{const{isIncreaseMobile:t,isIncreaseTablet:c}=R(),{savePosition:o}=fe(),r=Z();return e.jsxs(f,{display:"flex",flexDirection:"column",backgroundColor:"background.paper",minHeight:t?"290px":"350px",borderRadius:4,boxShadow:2,justifyContent:"space-between",onClick:()=>{o("locations-page"),r(`/locations/${s.url}`)},sx:{cursor:"pointer","*":{cursor:"inherit"}},children:[e.jsx(f,{src:s.featured_image,alt:s.title,loading:"lazy",component:"img",borderRadius:4}),e.jsxs(f,{display:"flex",flexDirection:t||c?"column":"row",p:t?2:3,justifyContent:"space-between",alignItems:"center",gap:1,borderRadius:4,backgroundColor:"background.paper",mt:-10,children:[e.jsx(f,{flex:2,children:e.jsx(Le,{variant:"h6",children:s.title})}),e.jsx(f,{children:e.jsx(je,{variant:"outlined",size:t?"medium":"large",onClick:a=>{a.stopPropagation(),o("locations-page"),r(`/locations/${s.url}`)},children:"Learn More"})})]})]})},fs=()=>{const{locationsMarketHeaderBlockValue:s}=D(),{isIncreaseMobile:t}=R();if(!s)return null;const c=s.locations_markets.map(o=>({url:o.locations_markets_id,title:o.locations_markets_name,featured_image:o.locations_markets_image}));return e.jsxs(f,{bgcolor:"background.default",pt:t?2:4,pb:t?7:11,children:[e.jsxs(f,{my:5,px:3,children:[e.jsx(z,{variant:t?"h4":"h3",color:"primary.main",muiTypographyProps:{textAlign:"center"},children:s.locations_market_title}),e.jsx(ve,{muiTypographyProps:{textAlign:"center"},children:s.locations_market_subtitle})]}),e.jsx(f,{children:e.jsx(Me,{cards:c,speed:1e3,spaceBetween:25,slidesPerView:t?1.2:3,arrows:{outsideSwiper:!0}
1,id:"locations-market",showPagination:t,renderSlide:o=>e.jsx(Cs,{card:o})})})]})},Ls=({children:s})=>{const[t,c]=n.useState({}),[o,r]=n.useState(!1),a=n.useMemo(()=>({dealership:t,setDealership:c,modalOpen:o,setModalOpen:r}),[t,o]);return e.jsx(ke.Provider,{value:a,children:s})},js=({children:s})=>{const{isIncreaseMobile:t}=R(),{pageRetrieve:c,isLoading:o,seo:r,error:a,isFetching:d,extractedFields:i,reset:u,isDataLoaded:h}=Ee();n.useEffect(()=>{c(V.LANDING_PAGE,K.LOCATIONS,null,[k.LOCATIONS_HEADER,k.LOCATIONS_MARKET_HEADER,k.LOCATIONS_FOOTER])},[c]);const p=n.useMemo(()=>({locationsHeaderBlockValue:i==null?void 0:i[k.LOCATIONS_HEADER],locationsMarketHeaderBlockValue:i==null?void 0:i[k.LOCATIONS_MARKET_HEADER],locationsFooterBlockValue:i==null?void 0:i[k.LOCATIONS_FOOTER]}),[i]),l=n.useCallback(()=>{u(!0),c(V.LANDING_PAGE,K.LOCATIONS,null,[k.LOCATIONS_HEADER,k.LOCATIONS_MARKET_HEADER,k.LOCATIONS_FOOTER],!0)},[u,c]),g=n.useMemo(()=>{const x=t?500:720;return o?e.jsx(f,{minHeight:x,children:e.jsx($,{isLoading:!0})}):a?e.jsx(Ie,{minHeight:x,refresh:l}):h?e.jsxs(f,{minHeight:x,children:[e.jsx(ye,{seo:r}),s]}):e.jsx(f,{minHeight:x})},[s,a,t,h,o,l,r]);return e.jsxs(X.Provider,{value:p,children:[d&&e.jsx($,{isLoading:!0}),g]})},Is=()=>e.jsx(Ae,{children:e.jsx(Ls,{children:e.jsxs(js,{children:[e.jsx(we,{}),e.jsx(xs,{}),e.jsx(fs,{}),e.jsx(Ne,{})]})})});export{Is 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.