PageSourceSearch

https://dropin.care/_next/static/chunks/app/(search)/search/page-810f0a7646e43071.js

js dropin.care collected 2026-10-02 01:19:48 UTC 33,741 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6957],{2195:(e,t,n)=>{"use strict";n.d(t,{cn:()=>s});var r=n(72902),l=n(13714);function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,l.QP)((0,r.$)(t))}},3088:(e,t,n)=>{"use strict";n.d(t,{l:()=>f});var r=n(54568),l=n(7620),s=n(27541),a=n(71566),i=n(55406),o=n(28799),c=n(37703),d=n(62715),u=n(58917),m=n(2195),x=n(56605),h=n(14288),p=n(4198),g=n(28552),b=n(88211);function f(e){let{value:t,onPlaceSelect:n,onSubmit:f,onQueryChange:v,className:j,compact:w,showSubmit:y,dropdownPosition:N="below",bare:k,placeholder:_="Center, city, zip, or address"}=e,C=(0,a.ST)("places"),S=(0,s.useRouter)(),M=(0,l.useMemo)(()=>(0,p.K)(),[]),A=(0,l.useRef)(null),[L,F]=(0,l.useState)(t),[z,D]=(0,l.useState)([]),[E,R]=(0,l.useState)([]),[T,I]=(0,l.useState)(!1),U=(0,l.useRef)(null),Z=(0,l.useRef)(null),P=(0,l.useRef)(null),q=(0,l.useRef)("");(0,l.useEffect)(()=>{F(t)},[t]),(0,l.useEffect)(()=>{C&&(Z.current=new C.AutocompleteService,U.current=new C.AutocompleteSessionToken)},[C]);let H=(0,l.useCallback)(e=>{F(e),q.current=e,null==v||v(e),Z.current&&e.length>=2?Z.current.getPlacePredictions({input:e,types:["geocode"],componentRestrictions:{country:"us"},sessionToken:U.current},t=>{q.current===e&&D(null!=t?t:[])}):D([]),P.current&&clearTimeout(P.current),e.length>=2?P.current=setTimeout(async()=>{let t=await (0,x.Fp)(M,e,{limit:8});q.current===e&&R(t)},250):R([]),I(e.length>=2)},[M,v]),K=(0,l.useCallback)(()=>{let e=q.current.trim();I(!1),f?f(e):e&&S.push("/search?q=".concat(encodeURIComponent(e)))},[f,S]),B=(0,l.useCallback)(()=>{var e;F(""),D([]),R([]),q.current="",null==(e=A.current)||e.focus()},[]),V=(0,l.useCallback)((e,t)=>{C&&new C.PlacesService(document.createElement("div")).getDetails({placeId:e,fields:["geometry","formatted_address"],sessionToken:U.current},e=>{var r;(null==e||null==(r=e.geometry)?void 0:r.location)&&(F(t),D([]),R([]),I(!1),U.current=new C.AutocompleteSessionToken,n({lat:e.geometry.location.lat(),lng:e.geometry.location.lng(),name:t}))})},[C,n]),W=(0,l.useCallback)(e=>{I(!1),S.push((0,g.tg)({slug:e.slug,id:e.centerId,city:e.city,state:e.state}))},[S]),O=(0,l.useCallback)(()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>{F("My Location"),n({lat:e.coords.latitude,lng:e.coords.longitude,name:"My Location"})},()=>{})},[n]),$=(0,l.useMemo)(()=>z.map(e=>({kind:"place",id:e.place_id,label:e.structured_formatting.main_text,sublabel:e.structured_formatting.secondary_text})),[z]),G=(0,l.useMemo)(()=>E.map(x.Ck),[E]),J=(0,l.useMemo)(()=>(0,h.mm)($,G,{query:L}),[$,G,L]),Y=(0,l.useMemo)(()=>new Map(E.map(e=>[e.centerId,e])),[E]),Q=(0,l.useMemo)(()=>new Map(z.map(e=>[e.place_id,e])),[z]),X=J.centers.length>0||J.places.length>0,ee=J.centers.length>0?(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"px-4 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-brand-400",children:"Centers"}),J.centers.map(e=>{let t=Y.get(e.id);if(!t)return null;let n=[(0,b.tV)(t.address),(0,b.UU)(t.city),t.state].filter(Boolean).join(", ")||e.sublabel;return(0,r.jsxs)("button",{type:"button",onMouseDown:()=>W(t),className:"flex w-full items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-brand-50",children:[(0,r.jsx)(i.A,{className:"h-4 w-4 shrink-0 text-brand-500"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-medium text-brand-950",children:e.label}),n&&(0,r.jsx)("p",{className:"truncate text-xs text-brand-950/50",children:n})]})]},e.id)})]},"centers"):null,et=J.places.length>0?(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"px-4 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-brand-400",children:"Places"}),J.places.map(e=>{let t=Q.get(e.id);return t?(0,r.jsxs)("button",{type:"button",onMouseDown:()=>V(e.id,t.structured_formatting.main_text),className:"flex w-full items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-brand-50",children:[(0,r.jsx)(o.A,{className:"h-4 w-4 shrink-0 text-brand-400"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-medium text-brand-950",children:e.label}),e.sublabel&&(0,r.jsx)("p",{className:"truncate text-xs text-brand-950/50",children:e.sublabel})]})]},e.id):null})]},"places"):null;return(0,r.jsxs)("div",{className:(0,m.cn)("relative",j),children:[(0,r.jsxs)("div",{className:(0,m.cn)("flex items-center gap-2",!k&&"rounded-xl border border-brand-200/80 bg-white shadow-sm transition-shadow focus-within:border-brand-300 focus-within:shadow-md",!k&&(w?"p-1.5":"p-2")),children:[(0,r.jsx)(o.A,{className:"ml-2 h-4 w-4 shrink-0 text-brand-400"}),(0,r.jsx)("input",{ref:A,type:"text",value:L,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),K())},onFocus:()=>X&&I(!0),onBlur:()=>setTimeout(()=>I(!1),200),placeholder:_,className:(0,m.cn)("flex-1 border-none bg-transparent text-brand-950 placeholder:text-brand-400 focus:outline-none",w?"text-sm":"text-base")}),L&&(0,r.jsx)("button",{type:"button",onClick:B,className:"rounded-full p-1 text-brand-400 hover:bg-brand-50 hover:text-brand-600",children:(0,r.jsx)(c.A,{className:"h-3.5 w-3.5"})}),(0,r.jsx)("button",{type:"button",onClick:O,title:"Use my location",className:"rounded-lg p-2 text-brand-400 transition-colors hover:bg-brand-50 hover:text-brand-600",children:(0,r.jsx)(d.A,{className:"h-4 w-4"})}),y&&(0,r.jsxs)("button",{type:"button",onClick:K,className:"inline-flex h-11 shrink-0 items-center gap-2 whitespace-nowrap rounded-xl bg-accent px-6 text-sm font-semibold text-white shadow-sm shadow-accent/25 transition-all hover:bg-accent/90 hover:shadow-md",children:[(0,r.jsx)("span",{className:"hidden sm:inline",children:"Find & Book"}),(0,r.jsx)("span",{className:"sm:hidden",children:"Search"}),(0,r.jsx)(u.A,{className:"h-4 w-4"})]})]}),T&&X&&(0,r.jsx)("div",{className:(0,m.cn)("absolute left-0 right-0 z-50 overflow-hidden rounded-xl border border-brand-200/80 bg-white shadow-lg","above"===N?"bottom-full mb-1":"top-full mt-1"),children:(0,r.jsx)("div",{className:"max-h-[min(70vh,26rem)] overflow-y-auto overscroll-contain pb-1",children:"centers"===J.leadingSection?(0,r.jsxs)(r.Fragment,{children:[ee,et]}):(0,r.jsxs)(r.Fragment,{children:[et,ee]})})})]})}}
1,14288:(e,t,n)=>{"use strict";function r(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}function l(e){let t=new Set,n=[];for(let r of e)t.has(r.id)||(t.add(r.id),n.push(r));return n}function s(e,t){var n,r,s;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=null!=(n=a.maxCenters)?n:8,o=null!=(r=a.maxPlaces)?r:5,c=l(t).slice(0,i),d=l(e).slice(0,o),u=(null!=(s=a.query)?s:"").trim().toLowerCase(),m=u.length>=2&&c.some(e=>e.label.toLowerCase().startsWith(u));return{items:m?[...c,...d]:[...d,...c],centers:c,places:d,leadingSection:m?"centers":"places"}}n.d(t,{mm:()=>s,Yv:()=>r}),new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"})},28552:(e,t,n)=>{"use strict";n.d(t,{tg:()=>l});var r=n(14288);function l(e){var t,n;let l=e.slug||e.id,s=null!=(n=null==(t=e.state)?void 0:t.toLowerCase())?n:"us",a=e.city?(0,r.Yv)(e.city):"unknown";return"/centers/".concat(s,"/").concat(a,"/").concat(l)}},28799:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(85646).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])},31053:(e,t,n)=>{Promise.resolve().then(n.bind(n,71814))},46310:(e,t,n)=>{"use strict";n.d(t,{o:()=>s});var r=n(72678);let l={lat:r.YC,lng:r.YC,q:r.tU,location:r.tU.withDefault(""),radius:r.GJ.withDefault(5),date:r.tU,slot:(0,r.Oq)(["morning","afternoon","evening","full_day","hourly"]),age_group:r.tU,min_rating:r.GJ,sort:(0,r.Oq)(["distance","rating"]).withDefault("distance"),offset:r.GJ.withDefault(0)};function s(){let[e,t]=(0,r.ZA)("lat",l.lat),[n,s]=(0,r.ZA)("lng",l.lng),[a,i]=(0,r.ZA)("q",l.q),[o,c]=(0,r.ZA)("location",l.location),[d,u]=(0,r.ZA)("radius",l.radius),[m,x]=(0,r.ZA)("date",l.date),[h,p]=(0,r.ZA)("slot",l.slot),[g,b]=(0,r.ZA)("age_group",l.age_group),[f,v]=(0,r.ZA)("min_rating",l.min_rating),[j,w]=(0,r.ZA)("sort",l.sort),[y,N]=(0,r.ZA)("offset",l.offset);return{lat:e,lng:n,q:a,location:o,radius:d,date:m,slot:h,ageGroup:g,minRating:f,sort:j,offset:y,setLat:t,setLng:s,setQ:i,setLocation:c,setRadius:u,setDate:x,setSlot:p,setAgeGroup:b,setMinRating:v,setSort:w,setOffset:N}}},47157:(e,t,n)=>{"use strict";n.d(t,{SQ:()=>c,dy:()=>a,lR:()=>i});var r=n(7620),l=n(25078),s=n(46310);function a(e){var t;return null!=(t=e.center_display_name)?t:e.center_name}function i(e,t,n){let r=n/69,l=n/(69*Math.cos(e*Math.PI/180));return{mode:"bounds",minLat:e-r,maxLat:e+r,minLng:t-l,maxLng:t+l,centerLat:e,centerLng:t}}let o=async e=>{let t=await fetch(e);if(!t.ok)throw Error("Search failed");return t.json()};function c(e,t){var n,a,i,c,d,u,m,x;let{date:h,slot:p,ageGroup:g,minRating:b,sort:f}=(0,s.o)(),v=null!=(a=null==t?void 0:t.limit)?a:(null==e?void 0:e.mode)==="bounds"?300:60,j=null!=(i=null==t?void 0:t.keyword)?i:null,w=e?function(e,t,n){let r=new URLSearchParams;return"center"===e.mode?(r.set("lat",String(e.lat)),r.set("lng",String(e.lng)),r.set("radius",String(e.radiu
1s))):(r.set("min_lat",String(e.minLat)),r.set("min_lng",String(e.minLng)),r.set("max_lat",String(e.maxLat)),r.set("max_lng",String(e.maxLng)),r.set("center_lat",String(e.centerLat)),r.set("center_lng",String(e.centerLng))),r.set("limit",String(n)),t.date&&r.set("date",t.date),t.slot&&r.set("slot",t.slot),t.ageGroup&&r.set("age_group",t.ageGroup),t.minRating&&r.set("min_rating",String(t.minRating)),t.sort&&"distance"!==t.sort&&r.set("sort",t.sort),t.keyword&&r.set("name",t.keyword),"/api/search?".concat(r)}(e,{date:h,slot:p,ageGroup:g,minRating:b,sort:f,keyword:j},v):null,[y,N]=(0,r.useState)(!1);(0,r.useEffect)(()=>{N(!1)},[w]);let{data:k,isValidating:_}=(0,l.Ay)(w,o,{keepPreviousData:!0,revalidateOnFocus:!1,dedupingInterval:2e3,onSuccess:()=>N(!1),onErrorRetry:(e,t,n,r,l)=>{let{retryCount:s}=l;if(s>=6)return void N(!0);setTimeout(()=>r({retryCount:s}),2e3)}});return{results:null!=(c=null==k?void 0:k.results)?c:[],points:null!=(d=null==k?void 0:k.points)?d:[],total:null!=(m=null!=(u=null==k?void 0:k.total)?u:null==k||null==(n=k.results)?void 0:n.length)?m:0,loading:void 0===k&&!y,refreshing:_&&void 0!==k,error:y&&void 0===k?"Could not load centers. Try again.":null,hasMore:null!=(x=null==k?void 0:k.hasMore)&&x,hasLocation:null!=e}}},55406:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(85646).A)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]])},61046:(e,t,n)=>{"use strict";n.d(t,{K:()=>w});var r=n(54568),l=n(7620),s=n(71566),a=n(72019),i=n(80873),o=n(80678),c=n(19664),d=n.n(c),u=n(32536),m=n(98977),x=n(14137),h=n(28799),p=n(58917),g=n(47157),b=n(28552),f=n(83563),v=n(88211);function j(e){var t,n;let{center:s}=e,[a,i]=(0,l.useState)(!1),o=(0,b.tg)({slug:s.center_slug,id:s.center_id,city:s.city,state:s.state}),c=null!=(t=s.google_rating)?t:s.rating_average,j=null!=(n=s.google_rating_count)?n:s.rating_count,w=s.thumbnail_url||s.image_url,y=w&&!a?w:f.IX;return(0,r.jsxs)(d(),{href:o,className:"block w-[260px] no-underline",children:[(0,r.jsxs)("div",{className:"relative h-32 w-full overflow-hidden rounded-t-lg bg-brand-50",children:[(0,r.jsx)(u.default,{src:y,alt:(0,g.dy)(s),fill:!0,className:"object-cover",sizes:"260px",onError:()=>i(!0)}),"verified"===s.listing_status&&(0,r.jsx)(m.A,{className:"absolute right-1.5 top-1.5 h-5 w-5 fill-brand-600 text-white drop-shadow-sm","aria-label":"Verified center"})]}),(0,r.jsxs)("div",{className:"p-3",children:[(0,r.jsx)("h3",{className:"text-[13px] font-bold leading-tight text-gray-900",children:(0,g.dy)(s)}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[c>0&&(0,r.jsxs)("span",{className:"flex items-center gap-0.5",children:[(0,r.jsx)(x.A,{className:"h-3 w-3 fill-amber-400 text-amber-400"}),(0,r.jsx)("span",{className:"text-xs font-semibold text-gray-900",children:c.toFixed(1)}),j>0&&(0,r.jsxs)("span",{className:"text-[11px] text-gray-400",children:["(",j,")"]})]}),c>0&&null!=s.min_price&&(0,r.jsx)("span",{className:"text-[11px] text-gray-300",children:"\xb7"}),null!=s.min_price&&(0,r.jsxs)("span",{className:"text-xs font-medium text-gray-600",children:["From $",s.min_price]})]}),(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-1 text-[11px] text-gray-400",children:[(0,r.jsx)(h.A,{className:"h-3 w-3 shrink-0"}),(0,r.jsxs)("span",{children:[(0,v.Kf)(s.city,s.state)," \xb7"," ",s.distance_miles.toFixed(1)," mi"]})]}),(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1 text-xs font-semibold text-[#1D9DFF]",children:["View Details ",(0,r.jsx)(p.A,{className:"h-3 w-3"})]})]})]})}function w(e){let{results:t,points:n,center:c,radiusMiles:d,hoveredId:u,onMarkerHover:m,onIdle:x}=e,h=(0,s.ko)(),[p,g]=(0,l.useState)(null),[b,f]=(0,l.useState)(12),[v,w]=(0,l.useState)(null),y=null!=c?c:{lat:40.7128,lng:-74.006},N=(0,l.useRef)("");(0,l.useEffect)(()=>{if(!h||!c)return;let e=null!=d?d:5,t="".concat(c.lat.toFixed(5),",").concat(c.lng.toFixed(5),",").concat(e);
1if(t===N.current)return;N.current=t;let n=e/69,r=e/(69*Math.cos(c.lat*Math.PI/180));h.fitBounds({north:c.lat+n,south:c.lat-n,east:c.lng+r,west:c.lng-r})},[h,c,d]);let k=(0,l.useMemo)(()=>new globalThis.Map(t.map(e=>[e.center_id,e])),[t]),_=(0,l.useMemo)(()=>n&&n.length>0?n:t.map(e=>({center_id:e.center_id,latitude:e.latitude,longitude:e.longitude})),[n,t]),C=(0,l.useMemo)(()=>{let e=new a.A({radius:50,maxZoom:16,minPoints:10});return e.load(_.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:[e.longitude,e.latitude]},properties:{centerId:e.center_id}}))),e},[_]),S=(0,l.useMemo)(()=>v?C.getClusters(v,Math.floor(b)):[],[C,v,b]),M=(0,l.useCallback)(e=>{let{zoom:t}=e.detail,n=e.detail.bounds;f(t),w([n.west,n.south,n.east,n.north])},[]),A=(0,l.useCallback)(e=>{if(!x)return;let t=e.map.getBounds(),n=e.map.getCenter();if(!t||!n)return;let r=t.getNorthEast(),l=t.getSouthWest();x({minLat:l.lat(),minLng:l.lng(),maxLat:r.lat(),maxLng:r.lng(),centerLat:n.lat(),centerLng:n.lng()})},[x]);return(0,r.jsxs)(s.T5,{defaultCenter:y,defaultZoom:12,mapId:"dropin-search-map",gestureHandling:"greedy",disableDefaultUI:!1,zoomControl:!0,streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,className:"h-full w-full [&_canvas]:saturate-[0.4] [&_canvas]:brightness-[1.15]",onCameraChanged:M,onIdle:A,children:[S.map(e=>{let t=e.geometry.coordinates[0],n=e.geometry.coordinates[1],l=e.properties;if("cluster"in l&&l.cluster){let a=l.point_count;return(0,r.jsx)(s.J8,{position:{lat:n,lng:t},zIndex:10,onClick:()=>{let r=C.getClusterExpansionZoom(e.id);null==h||h.panTo({lat:n,lng:t}),null==h||h.setZoom(r)},children:(0,r.jsx)("div",{className:"flex items-center justify-center rounded-full font-semibold",style:{width:i.D4.size,height:i.D4.size,background:i.D4.background,border:"".concat(i.D4.borderWidth,"px solid ").concat(i.D4.borderColor),color:i.D4.textColor,boxShadow:"0 5px 5px rgba(0,0,0,0.25)",fontFamily:"var(--font-heading)",fontSize:16},children:a})},"cluster-".concat(e.id))}let a=l.centerId,c=k.get(a);if(!c)return(0,r.jsx)(s.J8,{position:{lat:n,lng:t},zIndex:1,children:(0,r.jsx)("div",{className:"rounded-full border-2 border-white",style:{width:12,height:12,background:i.K_,boxShadow:"0 1px 3px rgba(0,0,0,0.35)"}})},a);let d=(null==p?void 0:p.center_id)===c.center_id;return(0,r.jsx)(s.J8,{position:{lat:n,lng:t},onClick:()=>g(d?null:c),onMouseEnter:()=>null==m?void 0:m(c.center_id),onMouseLeave:()=>null==m?void 0:m(null),zIndex:u===c.center_id||d?50:1,children:(0,r.jsx)(o.s,{centerType:c.center_type,unclaimed:!c.is_claimed,isHovered:u===c.center_id,isSelected:d})},c.center_id)}),p&&(0,r.jsx)(s.Fu,{position:{lat:p.latitude,lng:p.longitude},onCloseClick:()=>g(null),pixelOffset:[0,-40],children:(0,r.jsx)(j,{center:p})})]})}},62715:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(85646).A)("navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]])},71814:(e,t,n)=>{"use strict";n.d(t,{SearchView:()=>R});var r=n(54568),l=n(7620),s=n(2381),a=n(85646);let i=(0,a.A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);var o=n(71566),c=n(2195),d=n(56605),u=n(4198),m=n(47157),x=n(46310),h=n(3088);let p=(0,a.A)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);var g=n(14137);let b=[5,10,15,25,50];function f(){let{radius:e,ageGroup:t,minRating:n,sort:s,setRadius:a,setAgeGroup:i,setMinRating:o,setSort:m}=(0,x.o)(),[h,f]=(0,l.useState)(!1),[v,j]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(0,d.gs)((0,u.K)()).then(t=>{let{data:n}=t;e&&n&&j(n)}),()=>{e=!1}},[]);let w=!!t||!!n;return(0,r.jsxs)("div",{className:"border-b border-border/60 bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>
1f(!h),className:(0,c.cn)("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",h||w?"border-brand-300 bg-brand-50 text-brand-700":"border-brand-200 text-brand-600 hover:bg-brand-50"),children:[(0,r.jsx)(p,{className:"h-3.5 w-3.5"}),"Filters",w&&(0,r.jsx)("span",{className:"ml-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-brand-600 px-1 text-[10px] font-semibold text-white",children:+!!t+ +!!n})]}),b.map(t=>(0,r.jsxs)("button",{type:"button",onClick:()=>a(t),className:(0,c.cn)("rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",e===t?"border-brand-300 bg-brand-50 text-brand-700":"border-brand-200 text-brand-600 hover:bg-brand-50"),children:[t," mi"]},t)),(0,r.jsx)("div",{className:"ml-auto",children:(0,r.jsxs)("select",{value:s,onChange:e=>m(e.target.value),className:"rounded-lg border border-brand-200 bg-white px-2 py-1.5 text-xs text-brand-700 focus:outline-none focus:ring-1 focus:ring-brand-300",children:[(0,r.jsx)("option",{value:"distance",children:"Nearest"}),(0,r.jsx)("option",{value:"rating",children:"Top Rated"})]})})]}),h&&(0,r.jsxs)("div",{className:"space-y-4 border-t border-border/60 px-4 py-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-brand-500",children:"Age Group"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:v.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>i(t===e.id?null:e.id),className:(0,c.cn)("rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",t===e.id?"border-accent bg-accent/10 text-accent":"border-brand-200 text-brand-600 hover:bg-brand-50"),children:e.name},e.id))}),(0,r.jsx)("p",{className:"mt-1.5 text-[11px] text-brand-400",children:"Shows DropIn centers offering a room for this age group."})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-xs font-semibold uppercase tracking-wider text-brand-500",children:"Rating"}),(0,r.jsxs)("button",{type:"button",onClick:()=>o(4===n?null:4),className:(0,c.cn)("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",4===n?"border-accent bg-accent/10 text-accent":"border-brand-200 text-brand-600 hover:bg-brand-50"),children:[(0,r.jsx)(g.A,{className:"h-3.5 w-3.5 fill-current"}),"4.0 & up"]})]})]})]})}var v=n(32536),j=n(19664),w=n.n(j),y=n(98977),N=n(28799),k=n(28552),_=n(83563),C=n(88211);function S(e){var t,n;let{center:s,isHovered:a,onHover:i}=e,[o,d]=(0,l.useState)(!1),u=(0,k.tg)({slug:s.center_slug,id:s.center_id,city:s.city,state:s.state}),x=null!=(t=s.google_rating)?t:s.rating_average,h=null!=(n=s.google_rating_count)?n:s.rating_count,p="verified"===s.listing_status,b=s.thumbnail_url||s.image_url,f=!o&&b?b:_.IX;return(0,r.jsx)(w(),{href:u,className:(0,c.cn)("group block rounded-xl border border-brand-100 bg-white p-3 transition-all hover:border-brand-200 hover:shadow-md",a&&"border-brand-300 shadow-md ring-1 ring-brand-200"),onMouseEnter:()=>null==i?void 0:i(s.center_id),onMouseLeave:()=>null==i?void 0:i(null),children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsxs)("div",{className:"relative h-24 w-24 shrink-0 overflow-hidden rounded-lg bg-brand-50",children:[(0,r.jsx)(v.default,{src:f,alt:(0,m.dy)(s),fill:!0,className:"object-cover",sizes:"96px",onError:()=>d(!0)}),p&&(0,r.jsx)(y.A,{className:"absolute right-1 top-1 h-5 w-5 fill-brand-600 text-white drop-shadow-sm","aria-label":"Verified center"})]}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-brand-950 group-hover:text-brand-700",children:(0,m.dy)(s)}),(0,r.jsxs)("div",{className:"mt-0.5 flex items-center gap-1 text-xs text-brand-600",children:[(0,r.jsx)(N.A,{className:"h-3 w-3 shrink-0"}),(0,r.jsxs)("span",{className:"truncate",children:[s.address?"".concat((0,C.tV)(s.address),", "):"",(0,C.Kf)(s.city,s.state)]}),(0,r.jsxs)("span",{className:"shrink-0 text-brand-400",children:["\xb7 ",s.distance_miles.toFixed(1)," mi"]})]}),x>0&&(0,r.jsxs)("div",{className:"mt-1 flex items-center gap-1",children:[(0,r.jsx)(g.A,{className:"h-3.5 w-3.5 fill-amber-400 text-amber-400"}),(0,r.jsx)("span",{className:"text-xs font-medium text-brand-950",children:x.toFixed(1)}),h>0&&(0,r.jsxs)("span",{className:"text-xs text-brand-400",children:["(",h,")"]})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[null!=s.min_price&&(0,r.jsxs)("span",{className:"text-xs font-semibold text-brand-700",children:["From $",s.min_price]}),s.licensed_capacity&&(0,r.jsxs)("span",{className:"text-xs text-brand-400",children:["Cap: ",s.licensed_capacity]})]})]})]})})}function M(){return(0,r.jsx)("div",{className:"animate-pulse rounded-xl border border-brand-100 bg-white p-3",children:(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)("div",{className:"h-24 w-24 shrink-0 rounded-lg bg-brand-100"}),(0,r.jsxs)("div",{className:"flex-1 space-y-2 py-1",children:[(0,r.jsx)("div",{className:"h-4 w-3/4 rounded bg-brand-100"}
1),(0,r.jsx)("div",{className:"h-3 w-1/2 rounded bg-brand-100"}),(0,r.jsx)("div",{className:"h-3 w-1/3 rounded bg-brand-100"}),(0,r.jsx)("div",{className:"h-3 w-1/4 rounded bg-brand-100"})]})]})})}var A=n(61046);let L=(0,a.A)("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),F=(0,a.A)("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);function z(e){let{showMap:t,onToggle:n}=e;return(0,r.jsx)("button",{type:"button",onClick:n,className:(0,c.cn)("fixed bottom-6 left-1/2 z-40 -translate-x-1/2 md:hidden","inline-flex items-center gap-2 rounded-full bg-brand-900 px-5 py-3 text-sm font-semibold text-white shadow-xl transition-transform active:scale-95"),children:t?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{className:"h-4 w-4"}),"List"]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(F,{className:"h-4 w-4"}),"Map"]})})}async function D(e,t){let n=t.split(/\s+/).filter(Boolean);for(let t=0;t<n.length;t++){let l=n.slice(t).join(" ");try{var r;let{results:t}=await e.geocode({address:l,componentRestrictions:{country:"us"}}),s=null==t?void 0:t[0],a=null==s||null==(r=s.geometry)?void 0:r.location;if(a){let e=s.formatted_address.toLowerCase(),t=n.filter(t=>!e.includes(t.toLowerCase())).join(" ");return{lat:a.lat(),lng:a.lng(),label:s.formatted_address,keyword:t}}}catch(e){}}let l=(await (0,d.Fp)((0,u.K)(),t,{limit:1}))[0];return(null==l?void 0:l.latitude)!=null&&(null==l?void 0:l.longitude)!=null?{lat:l.latitude,lng:l.longitude,label:t,keyword:t}:null}function E(){let{lat:e,lng:t,q:n,location:a,radius:p,ageGroup:g,minRating:b,setLat:v,setLng:j,setQ:w,setLocation:y,setRadius:N}=(0,x.o)(),k=(0,o.ST)("geocoding"),[_,C]=(0,l.useState)(null),L=(0,l.useRef)(null),[F,E]=(0,l.useState)(null),[R,T]=(0,l.useState)(!1),[I,U]=(0,l.useState)({});(0,l.useEffect)(()=>{let e=!0;return(0,d.gs)((0,u.K)()).then(t=>{let{data:n}=t;e&&n&&U(Object.fromEntries(n.map(e=>[e.id,e.name])))}),()=>{e=!1}},[]);let Z=g?I[g]:null;(0,l.useEffect)(()=>{let e=null==n?void 0:n.trim();if(!e){C(null),L.current=null;return}if(L.current===e||!k)return;L.current=e;let t=!1;return(async()=>{let n=await D(new k.Geocoder,e);!t&&n&&(C(n.keyword||null),y(n.keyword?e:n.label),n.keyword&&N(50),v(n.lat),j(n.lng))})(),()=>{t=!0}},[n,k,v,j,y,N]);let[P,q]=(0,l.useState)(null!=e&&null!=t?(0,m.lR)(e,t,p):null),[H,K]=(0,l.useState)(!0),[B,V]=(0,l.useState)(null);(0,l.useEffect)(()=>{null!=e&&null!=t&&(q((0,m.lR)(e,t,p)),V(null))},[e,t,p]);let{results:W,points:O,total:$,loading:G,refreshing:J,error:Y,hasLocation:Q}=(0,m.SQ)(P,{keyword:_}),X=(0,l.useCallback)(e=>{w(null),L.current=null,C(null),v(e.lat),j(e.lng),y(e.name)},[w,v,j,y]),ee=e=>({mode:"bounds",minLat:e.minLat,minLng:e.minLng,maxLat:e.maxLat,maxLng:e.maxLng,centerLat:e.centerLat,centerLng:e.centerLng}),et=(0,l.useCallback)(e=>{H?(q(ee(e)),V(null)):V(e)},[H]),en=(0,l.useCallback)(()=>{B&&(q(ee(B)),V(null))},[B]),er=null!=e&&null!=t?{lat:e,lng:t}:null;return(0,r.jsxs)("div",{className:"flex h-full w-full flex-col",children:[(0,r.jsx)("div",{className:"border-b border-border/60 bg-white px-4 py-2",children:(0,r.jsx)(h.l,{value:a,onPlaceSelect:X,onSubmit:e=>{let t=e.trim();t&&w(t)},compact:!0,className:"max-w-md"})}),(0,r.jsx)(f,{}),(0,r.jsxs)("div",{className:"relative flex flex-1 overflow-hidden",children:[(0,r.jsx)("div",{className:(0,c.cn)("flex-1 overflow-y-auto","border-r border-border/60 md:w-[40%] md:max-w-[480px] md:flex-none",R&&"hidden md:block"),children:Q?G?(0,r.jsx)("div",{className:"space-y-2 p-3",children:Array.from({length:6}).map((e,t)=>(0,r.jsx)(M,{},t))}):Y?(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center px-6 text-center",children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-brand-950",children:"Couldn’t load centers"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:Y})]}):0===W.length?(0,r.jsx)("div",{className:"flex h-full flex-col items-center justify-center px-6 text-center",children:Z?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-brand-950",children:["No DropIn centers with ",Z," rooms here yet"]}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:"We’re adding centers all the time. Try a wider area, or clear the age filter to see all centers nearby."})]}):b?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-brand-950",children:["No ",b,"★+ rated centers here"]}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:"Try a wider area or clear the rating filter."})]}):_?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("h2",{className:"text-lg font-semibold text-brand-950",children:["No centers matching “",_,"” here"]}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:"Try a different spelling, a wider area, or remove the keyword to see all centers nearby."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold text-brand-950",children:"No centers found"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:"Try zooming out or moving the map to a different area."})]})}):(0,r.jsxs)("div",{className:"space-y-2 p-3",children:[(0,r.jsxs)("p",{className:"px-1 text-xs font-medium text-brand-500",children:[$.toLocaleStr
1ing()," center",1===$?"":"s"," in this area",$>W.length&&" \xb7 showing nearest ".concat(W.length)]}),W.map(e=>(0,r.jsx)(S,{center:e,isHovered:F===e.center_id,onHover:E},e.center_id))]}):(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center px-6 text-center",children:[(0,r.jsx)("div",{className:"mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-brand-50",children:(0,r.jsx)(s.A,{className:"h-7 w-7 text-brand-400"})}),(0,r.jsx)("h2",{className:"text-lg font-semibold text-brand-950",children:"Search for daycare centers"}),(0,r.jsx)("p",{className:"mt-1 text-sm text-brand-500",children:"Enter a city or zip code above to find licensed centers near you."})]})}),(0,r.jsxs)("div",{className:(0,c.cn)("relative flex-1",!R&&"hidden md:block"),children:[(0,r.jsxs)("label",{className:"absolute left-3 top-3 z-10 flex cursor-pointer items-center gap-2 rounded-full border border-border/60 bg-white/95 px-3 py-1.5 text-xs font-medium text-brand-700 shadow-sm backdrop-blur",children:[(0,r.jsx)("input",{type:"checkbox",checked:H,onChange:e=>{K(e.target.checked),e.target.checked&&B&&(q(ee(B)),V(null))},className:"h-3.5 w-3.5 accent-brand-600"}),"Search as I move the map"]}),!H&&B&&(0,r.jsxs)("button",{type:"button",onClick:en,className:"absolute left-1/2 top-3 z-10 inline-flex -translate-x-1/2 items-center gap-2 rounded-full bg-brand-600 px-4 py-2 text-sm font-semibold text-white shadow-lg shadow-brand-600/25 transition-colors hover:bg-brand-700",children:[(0,r.jsx)(i,{className:(0,c.cn)("h-4 w-4",J&&"animate-spin")}),"Search this area"]}),(0,r.jsx)(A.K,{results:W,points:O,center:er,radiusMiles:p,hoveredId:F,onMarkerHover:E,onIdle:et})]}),(0,r.jsx)(z,{showMap:R,onToggle:()=>T(!R)})]})]})}function R(){return(0,r.jsx)(l.Suspense,{children:(0,r.jsx)(E,{})})}},80678:(e,t,n)=>{"use strict";n.d(t,{s:()=>s});var r=n(54568),l=n(80873);function s(e){let{centerType:t,unclaimed:n=!1,isHovered:s,isSelected:a}=e,i=(0,l.sF)(t,n);return(0,r.jsx)("div",{className:"transition-transform duration-150 ease-out",style:{transform:s||a?"scale(1.15)":"scale(1)",transformOrigin:"bottom center",filter:"drop-shadow(0 3px 3px rgba(0,0,0,0.3))"},children:(0,r.jsxs)("svg",{width:i.width,height:i.height,viewBox:"0 0 ".concat(i.viewBoxWidth," ").concat(i.viewBoxHeight),fill:"none",children:[(0,r.jsx)("path",{d:i.path,fill:i.bodyFill,stroke:i.bodyStroke,strokeWidth:i.strokeWidth}),(0,r.jsx)("circle",{cx:i.dotCx,cy:i.dotCy,r:i.dotR,fill:i.dotFill})]})})}},83563:(e,t,n)=>{"use strict";function r(e){return!!e&&!e.includes("places.googleapis.com")}n.d(t,{Hs:()=>r,IX:()=>l,px:()=>s});let l="/center-placeholder.webp";function s(e){if(!e||"object"!=typeof e||"google_places"!==e.source)return null;let t=e.attribution;return"string"==typeof t&&t.trim()?t.trim():null}},85646:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7620);let l=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()},s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,r.forwardRef)((e,t)=>{let{color:n="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:c="",children:d,iconNode:u,...m}=e;return(0,r.createElement)("svg",{ref:t,...a,width:s,height:s,stroke:n,strokeWidth:o?24*Number(i)/Number(s):i,className:l("lucide",c),...!d&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m)&&{"aria-hidden":"true"},...m},[...u.map(e=>{let[t,n]=e;return(0,r.createElement)(t,n)}),...Array.isArray(d)?d:[d]])}),o=(e,t)=>{let n=(0,r.forwardRef)((n,a)=>{let{className:o,...c}=n;return(0,r.createElement)(i,{ref:a,iconNode:t,className:l("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...c})});return n.displayName=s(e),n}},88211:(e,t,n)=>{"use strict";n.d(t,{Kf:()=>d,UU:()=>o,tV:()=>c});let r=new Set(["of","the","in","on","at","by","and","for","du"]),l=new Map([["dekalb","DeKalb"],["desoto","DeSoto"]]),s=new Set(["n","s","e","w","ne","nw","se","sw","fm","rr","us","sr","cr","ih","sh","po"]);function a(e){return/[a-z]/i.test(e)&&e===e.toUpperCase()}function i(e){return e.split(/([-'’.])/).map(e=>/[-'’.]/.test(e)?e:function(e){if(!e)return e;let t=e.toLowerCase(),n=l.get(t);return n||(/^mc[a-z]{2,}$/.test(t)?"Mc"+t.charAt(2).toUpperCase()+t.slice(3):t.charAt(0).toUpperCase()+t.slice(1))}(e)).join("")}function o(e){if(!e)return"";let t=e.trim();if(!a(t))return t;let n=t.trim().split(/\s+/);return n.map((e,t)=>{let l=e.toLowerCase();return t>0&&t<n.length-1&&r.has(l)?l:i(e)}).join(" ")}function c(e){if(!e)return"";let t=e.trim();return a(t)?t.split(/\s+/).map(e=>{let t=e.toLowerCase();return s.has(t.replace(/\./g,""))?e.toUpperCase():/\d/.test(e)?e.replace(/^(\d+)(ST|ND|RD|TH)$/i,(e,t,n)=>t+n.toLowerCase()):i(e)}).join(" "):t}
1function d(e,t){return[o(e),null==t?void 0:t.trim()].filter(Boolean).join(", ")}}},e=>{e.O(0,[9664,489,9289,1566,1544,9686,8179,6745,6605,587,18,7358],()=>e(e.s=31053)),_N_E=e.O()}]);

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.