PageSourceSearch

https://www.emoryhealthcare.org/dist/coveo-search/LocationsLayout.component-BtWumW0h.js

js emoryhealthcare.org collected 2026-09-24 09:21:50 UTC 3,796 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["GoogleMap.component-CJEyEch3.js","vendor-react-5hiooaWY.js","search-results-page.js","engine.config-CW4H9QIh.js","engine.css","searchEngine-B_Sx382Y.js","urlSyncHelpers-B6YjW-SS.js","standaloneSearchBoxData-DFnQ8-74.js","standaloneSearchBoxData.css","initAnalytics-B11oc9nv.js","WaitTimeWidget.component-DkIGpIxO.js","search-results-page.css","variables.css","GoogleMap.css"])))=>i.map(i=>d[i]);
2import{_ as x}from"./engine.config-CW4H9QIh.js";import{r as c,j as t}from"./vendor-react-5hiooaWY.js";import{L as y,a as j,S,u as f,R,E as b,b as L,c as M,I as q}from"./search-results-page.js";const N="_layout_vqrvz_1",I="_body_vqrvz_21",T="_bodyWithMap_vqrvz_35",z="_cards_vqrvz_51",E="_map_vqrvz_63",C="_list_vqrvz_73",w="_summary_vqrvz_95",P="_status_vqrvz_119",$="_mapToggle_vqrvz_181",r={layout:N,body:I,bodyWithMap:T,cards:z,map:E,list:C,summary:w,status:P,mapToggle:$};function p(){const e=c.useContext(y);if(!e)throw new Error("useLocationResults must be used within a LocationResultsProvider");return e}function k({selectedPinId:e,onCardSelect:o}){const{sortedResults:s,isLoading:a,allResults:d}=p(),l=c.useMemo(()=>{if(!e)return s;const n=s.findIndex(u=>u.result.uniqueId===e);if(n<=0)return s;const i=s[n];return i?[i,...s.slice(0,n),...s.slice(n+1)]:s},[s,e]);return a&&d.length===0?t.jsx("p",{className:r.status,children:"Loading locations…"}):s.length===0?t.jsx("p",{className:r.status,children:"No locations found."}):t.jsx("ul",{className:r.list,children:l.map(({result:n,distanceMiles:i},u)=>t.jsxs("li",{children:[t.jsx(j,{result:n,position:u+1,isActive:n.uniqueId===e,onSelect:o,distanceMiles:i}),t.jsx(S,{result:n,index:u})]},n.uniqueId))})}const B=c.memo(function(){const{sortedResults:o}=p(),{isLoading:s,hasSearched:a,hasError:d}=f(),l=o.length,n=s?"Loading...":d||!a?"":`${String(l)} ${l===1?"location":"locations"} found`;return t.jsx("p",{className:r.summary,role:"status",children:n})});function W(){const[e,o]=c.useState(!1),s=c.useCallback(()=>{o(a=>!a)},[]);return{isMapVisible:e,toggleMap:s}}function A(e,o,s){if(!e)return null;if(o?.resultsRef===s)return o;const a=s[0]?.uniqueId;return a?{pinId:a,resultsRef:s}:null}function O(e,o){const[s,a]=c.useState(null),d=c.useRef(null),l=c.useCallback(u=>{a({pinId:u,resultsRef:o})},[o]),n=A(e,s,o);n!==s&&a(n);const i=n?.pinId??null;return c.useEffect(()=>{i&&d.current&&(d.current.scrollTop=0)},[i]),{selectedPinId:i,onPinSelect:l,cardsRef:d}}const D=c.lazy(()=>x(()=>import("./GoogleMap.component-CJEyEch3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(e=>({default:e.GoogleMap}))),F=t.jsx("div",{className:r.map,role:"status",children:"Loading map…"});function G(){const{isMapVisible:e,toggleMap:o}=W(),{sortedResults:s}=p(),{hasError:a}=f(),l=s.length>0&&!a,n=c.useMemo(()=>s.map(v=>v.result),[s]),{selectedPinId:i,onPinSelect:u,cardsRef:g}=O(e&&l,n),m=e&&l,_=m?r.bodyWithMap:r.body,h=l?t.jsx(H,{isMapVisible:e,toggleMap:o}):void 0;return t.jsxs("div",{className:r.layout,children:[t.jsx(R,{summary:t.jsx(B,{}),action:h}),l?t.jsxs("div",{className:_,children:[t.jsx("div",{ref:g,className:r.cards,children:t.jsx(k,{selectedPinId:i,onCardSelect:m?u:void 0})}),m?t.jsx(c.Suspense,{fallback:F,children:t.jsx("div",{className:r.map,children:t.jsx(D,{onPinSelect:u,selectedPinId:i})})}):null]}):null,t.jsx(b,{}),t.jsx(L,{})]})}const H=c.memo(function({isMapVisible:o,toggleMap:s}){const a=o?`${r.mapToggle} ${r.hideMap}`:`${r.mapToggle} ${r.showMap}`;return t.jsx(M,{className:a,onClick:s,"aria-pressed":o,iconBefore:t.jsx(q,{iconName:o?"grid":"map",className:r.mapToggleIcon}),children:o?"Hide Map":"Show Map"})}),Q=Object.freeze(Object.defineProperty({__proto__:null,LocationsLayout:G},Symbol.toStringTag,{value:"Module"}));export{Q as L,p as u};

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.