PageSourceSearch

https://www.zabihah.com/_next/static/chunks/20664-ea33e558066c1c48.js

js zabihah.com collected 2026-10-01 11:57:10 UTC 23,234 bytes, 26 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[20664],{20664:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(78792),l=r(94340),o=r(80501),i=r(75684),a=r(99362),s=r(77520),d=r(31809),u=r(99053),c=r.n(u);let p="rgb(var(--cherry))",f=e=>`<svg width="14" height="14" viewBox="0 0 24 24" fill="${e}" stroke="${e}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"/></svg>`,h=e=>`<svg width="14" height="14" viewBox="0 0 24 24" fill="${e}" stroke="${e}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"/></svg>`,x=e=>`<svg width="14" height="14" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="${e}"/><path d="m8 12.5 2.6 2.6 5.4-6.2" fill="none" stroke="white" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>`,g=[{value:"wantToTry",label:"Want to try"},{value:"visited",label:"Been"},{value:"loved",label:"Loved"}];function m({restaurant:e,detailHref:t,onViewDetails:r,savedCategory:l=null,isAuthed:o=!1,onSave:u,onRemove:m,onRequireAuth:v}){var b;let w,y=(e.cuisine??[]).filter(Boolean).slice(0,2),k=null!=e.willReturnPercentage&&e.willReturnPercentage>0?Math.round(e.willReturnPercentage):null,{rating:C,mode:j}=(0,s.U)(e.rating,e.reviewCount,e.googleRating,e.googleReviewCount),T="none"!==j&&null!=C;try{let t=null!=e.latitude?parseFloat(e.latitude):NaN,r=null!=e.longitude?parseFloat(e.longitude):NaN;Number.isFinite(t)&&Number.isFinite(r)&&(w=c()(t,r))}catch{w=void 0}let S="open"===(b=(0,d.VK)(e.businessHours,new Date,w)).state?b.closesSoon&&b.closesAt?{text:`Closes ${b.closesAt}`,color:"#92400e",bg:"#fffbeb"}:{text:"Open now",color:"rgb(var(--mint-800))",bg:"rgb(var(--mint-100))"}:"closed"===b.state?{text:"Closed",color:"rgb(var(--pepper) / 0.55)",bg:"rgb(var(--warm-50))"}:null,R=e.distance&&"0 mi"!==e.distance?e.distance:null,E=!!u,[M,A]=(0,i.useState)(l??null),[I,L]=(0,i.useState)(!1),[H,_]=(0,i.useState)(null),[z,N]=(0,i.useState)(null),[$,D]=(0,i.useState)(!1),F=(0,i.useRef)(null),P=(0,i.useRef)(null),B=(0,i.useRef)(null),W=(e=!0)=>{L(!1),e&&F.current?.focus()};(0,i.useEffect)(()=>{if(!I)return;let e=()=>W();return document.addEventListener("click",e),()=>document.removeEventListener("click",e)},[I]),(0,i.useEffect)(()=>{if(!I)return;let e=P.current;if(!e)return;let t=Array.from(e.querySelectorAll('[role="menuitemradio"],[role="menuitem"]'));if(0===t.length)return;let r=g.findIndex(e=>e.value===M),n=r>=0?t[r]:t[0];n?.focus()},[I,M]),(0,i.useEffect)(()=>()=>{B.current&&clearTimeout(B.current)},[]);let U=e=>{B.current&&clearTimeout(B.current),N(e),B.current=setTimeout(()=>N(null),3e3)},O=async(t,r)=>{if(t.stopPropagation(),W(),!$){A(r),D(!0);try{await u?.(e.id,r)||(A(M),U("Couldn't save — try again"))}catch{A(M),U("Couldn't save — try again")}finally{D(!1)}}},V=async t=>{if(t.stopPropagation(),W(),!$){A(null),D(!0);try{await m?.(e.id)||(A(M),U("Couldn't remove — try again"))}catch{A(M),U("Couldn't remove — try again")}finally{D(!1)}}},q="loved"===M?h(p):"visited"===M?x(p):"wantToTry"===M?f(p):'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="rgb(var(--pepper) / 0.55)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z"/></svg>';return(0,n.jsxs)("div",{style:{position:"relative",display:"flex",alignItems:"stretch",width:"300px",backgroundColor:"rgb(var(--surface))",fontFamily:"'Inter', system-ui, sans-serif"},children:[(0,n.jsx)("style",{children:`
2        .mmc-focusable:focus-visible {
3          outline: none;
4          box-shadow: 0 0 0 2px rgb(var(--surface)), 0 0 0 4px rgb(var(--cherry));
5        }
6      `}),(0,n.jsxs)("a",{href:t,onClick:e=>{let t=e.target;if(t?.closest('button, [role="menu"]'))return void e.preventDefault();r()},style:{display:"flex",alignItems:"stretch",flex:1,minWidth:0,textDecoration:"none",color:"inherit",cursor:"pointer"},children:[(0,n.jsxs)("div",{style:{width:"105px",flexShrink:0,alignSelf:"stretch",backgroundImage:e.coverImage?`url(${e.coverImage})`:void 0,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:"rgb(var(--warm-200))",position:"relative"},children:[(0,n.jsx)("div",{style:{position:"absolute",top:"4px",left:"4px",zIndex:1},onClick:e=>{e.stopPropagation(),e.preventDefault()},children:(0,n.jsx)(a.V,{size:"sm",surface:"popover",score:e.halalRankScore??null,tier:e.halalRankTier??null})}),(0,n.jsxs)("div",{style:{position:"absolute",bottom:"4px",left:"4px",display:"flex",flexDirection:"column",alignItems:"flex-start",ga
6p:"3px"},children:[null!=k&&(0,n.jsx)("div",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:"rgba(255,255,255,0.94)",color:"#065f46",fontSize:"10px",fontWeight:700,padding:"1px 5px",borderRadius:"5px",boxShadow:"0 1px 2px rgba(0,0,0,0.15)"},title:`${k}% would return`,dangerouslySetInnerHTML:{__html:`<svg width="9" height="9" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7v6h6"/><path d="M21 17a9 9 0 0 0-9-9 8.97 8.97 0 0 0-6.36 2.64L3 13"/></svg>${k}%`}}),T&&(0,n.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:"rgba(255,255,255,0.94)",color:"#131105",fontSize:"10px",fontWeight:700,padding:"1px 5px",borderRadius:"5px",boxShadow:"0 1px 2px rgba(0,0,0,0.15)"},children:[(0,n.jsx)("span",{style:{color:"#f59e0b"},children:"★"}),C.toFixed(1)]})]})]}),(0,n.jsxs)("div",{style:{flex:1,minWidth:0,padding:"10px",display:"flex",flexDirection:"column",justifyContent:"center",gap:"2px"},children:[(0,n.jsx)("h3",{style:{fontSize:"14px",lineHeight:"17px",fontWeight:700,color:"rgb(var(--pepper))",margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),(0,n.jsx)("p",{style:{fontSize:"13px",lineHeight:"16px",color:"rgb(var(--pepper) / 0.45)",margin:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.address?.trim()||[e.city,e.state].filter(Boolean).join(", ")}),(y.length>0||e.price)&&(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"10px",color:"rgb(var(--pepper) / 0.6)"},children:[y.length>0&&(0,n.jsx)("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:y.join(" \xb7 ")}),e.price&&(0,n.jsx)("span",{style:{fontWeight:600,flexShrink:0},children:e.price})]}),(S||R)&&(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",fontSize:"11px",marginTop:"5px"},children:[S?(0,n.jsx)("span",{style:{color:S.color,backgroundColor:S.bg,fontWeight:700,fontSize:"10px",padding:"1px 6px",borderRadius:"5px",whiteSpace:"nowrap"},children:S.text}):(0,n.jsx)("span",{}),R&&(0,n.jsxs)("span",{style:{marginLeft:"auto",fontWeight:500,color:"rgb(var(--pepper) / 0.5)"},children:[R," away"]})]})]})]}),E&&(0,n.jsx)("button",{ref:F,type:"button",className:"mmc-focusable","aria-label":null!=M?"Edit this place in your lists":"Save this place","aria-haspopup":"menu","aria-expanded":I,"aria-pressed":null!=M,"aria-busy":$,onClick:e=>{if(e.stopPropagation(),!$){if(!o)return void v?.();if(I)return void L(!1);let e=F.current?.getBoundingClientRect();e&&(_({top:e.bottom+4,left:Math.max(8,e.right-168)}),L(!0))}},style:{position:"absolute",top:"-5px",right:"-5px",zIndex:2,width:"44px",height:"44px",padding:0,border:"none",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",background:"transparent",cursor:"pointer"},children:(0,n.jsx)("span",{"aria-hidden":"true",style:{width:"26px",height:"26px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgb(var(--surface) / 0.9)",boxShadow:"0 1px 3px rgba(0,0,0,0.2)"},dangerouslySetInnerHTML:{__html:q}})}),E&&z&&(0,n.jsx)("div",{role:"status","aria-live":"polite",style:{position:"absolute",left:"6px",right:"6px",bottom:"6px",zIndex:3,backgroundColor:"hsl(var(--destructive))",color:"hsl(var(--destructive-foreground))",fontSize:"11px",fontWeight:600,padding:"4px 8px",borderRadius:"6px",textAlign:"center",boxShadow:"0 2px 6px rgba(0,0,0,0.25)",pointerEvents:"none"},children:z}),E&&I&&H&&(0,n.jsxs)("div",{ref:P,role:"menu","aria-label":"Save to a list","aria-busy":$,onClick:e=>e.stopPropagation(),onKeyDown:e=>{let t=P.current;if(!t)return;let r=Array.from(t.querySelectorAll('[role="menuitemradio"],[role="menuitem"]'));if(0===r.length)return;let n=r.indexOf(document.activeElement);if("ArrowDown"===e.key){e.preventDefault();let t=n<0?0:(n+1)%r.length;r[t]?.focus()}else if("ArrowUp"===e.key){e.preventDefault();let t=n<0?r.length-1:(n-1+r.length)%r.length;r[t]?.focus()}
6else"Home"===e.key?(e.preventDefault(),r[0]?.focus()):"End"===e.key?(e.preventDefault(),r[r.length-1]?.focus()):"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),W()):"Tab"===e.key&&W(!1)},style:{position:"fixed",top:`${H.top}px`,left:`${H.left}px`,zIndex:9999,width:"168px",backgroundColor:"rgb(var(--surface))",borderRadius:"10px",boxShadow:"0 4px 16px rgba(0,0,0,0.22)",padding:"4px",fontFamily:"'Inter', system-ui, sans-serif"},children:[g.map(e=>{let t=M===e.value,r=t?p:"rgb(var(--pepper) / 0.4)",l="loved"===e.value?h(r):"visited"===e.value?x(r):f(r);return(0,n.jsxs)("button",{type:"button",className:"mmc-focusable",role:"menuitemradio","aria-checked":t,tabIndex:-1,onClick:t=>O(t,e.value),style:{display:"flex",alignItems:"center",gap:"8px",width:"100%",padding:"8px 10px",border:"none",background:"none",borderRadius:"6px",fontSize:"13px",fontWeight:t?600:500,color:t?p:"rgb(var(--pepper))",cursor:"pointer",textAlign:"left"},children:[(0,n.jsx)("span",{style:{display:"inline-flex",flexShrink:0},dangerouslySetInnerHTML:{__html:l}}),(0,n.jsx)("span",{style:{flex:1},children:e.label}),t&&(0,n.jsx)("span",{style:{color:p,fontWeight:700},children:"✓"})]},e.value)}),null!=M&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{height:"1px",backgroundColor:"rgb(var(--pepper) / 0.08)",margin:"4px 6px"}}),(0,n.jsx)("button",{type:"button",className:"mmc-focusable",role:"menuitem",tabIndex:-1,onClick:V,style:{display:"flex",alignItems:"center",width:"100%",padding:"8px 10px",border:"none",background:"none",borderRadius:"6px",fontSize:"13px",fontWeight:500,color:"rgb(var(--pepper) / 0.65)",cursor:"pointer",textAlign:"left"},children:"Remove from lists"})]})]})]})}class v{register(e,t){let r=this.roots.get(e);r&&r!==t&&this.safeUnmount(r),this.roots.set(e,t)}unmount(e){let t=this.roots.get(e);t&&(this.roots.delete(e),this.safeUnmount(t))}unmountAll(){let e=Array.from(this.roots.values());for(let t of(this.roots.clear(),e))this.safeUnmount(t)}get size(){return this.roots.size}safeUnmount(e){try{e.unmount()}catch{}}constructor(){this.roots=new Map}}var b=r(80540),w=r(5659),y=r(8176),k=r(26949),C=r(92133);let j=null,T=({restaurants:e,showUserLocation:t=!0,height:r="600px",detailHref:a,isMosque:s=!1,highlightedId:d,onRegionChange:u,onSearchThisArea:c})=>{let p=(0,i.useRef)(null),f=(0,i.useRef)(null),h=(0,i.useRef)([]),x=(0,i.useRef)(new Map),g=(0,i.useRef)(null),T=(0,i.useRef)(new v),{userLocation:S}=(0,l.z)(),R=(0,o.K)(),E=(0,i.useRef)(R);(0,i.useEffect)(()=>{E.current=R},[R]);let M=(0,w.useRouter)(),{user:A,loading:I}=(0,k.r)(),{favoritesByCategory:L,refreshFavorites:H}=(0,y.rB)(),_=(0,i.useRef)(L),z=(0,i.useRef)(!1);(0,i.useEffect)(()=>{_.current=L},[L]),(0,i.useEffect)(()=>{z.current=!I&&!!A},[I,A]);let N=(0,i.useCallback)(async(e,t)=>{let r=_.current,n=r.wantToTry.has(e)||r.visited.has(e)||r.loved.has(e);try{let r=await fetch(`/api/mobile/my-places/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({category:t})});if(!r.ok)throw Error(`status ${r.status}`);return n||(0,C.sx)("favorite_added",{place_id:e,place_type:s?"mosque":"restaurant"}),H(),!0}catch(e){return console.error("Map callout save failed:",e),H(),!1}},[s,H]),$=(0,i.useCallback)(async e=>{try{let t=await fetch(`/api/favorites/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw Error(`status ${t.status}`);return(0,C.sx)("favorite_removed",{place_id:e,place_type:s?"mosque":"restaurant"}),H(),!0}catch(e){return console.error("Map callout remove failed:",e),H(),!1}},[s,H]),D=(0,i.useCallback)(()=>{M.push("/login")},[M]),F=(0,i.useRef)(N),P=(0,i.useRef)($),B=(0,i.useRef)(D);(0,i.useEffect)(()=>{F.current=N,P.current=$,B.current=D},[N,$,D]);let[W,U]=(0,i.useState)(!0),[O,V]=(0,i.useState)(0),[q,K]=(0,i.useState)(!1),[Z,J]=(0,i.useState)(!1),Y=(0,i.useRef)(null),G=(0,i.useRef)(!1),Q=(0,i.useRef)(null),X=(0,i.useRef)(null),ee=(0,i.useRef)(null),et=(0,i.useRef)(null),er=(0,i.useRef)(d);er.current=d;let en=(0,i.useRef)(u),el=(0,i.useRef)(c),eo=s?"#16A34A":"#0d9488",ei=s?"#166534":"#990000";return(0,i.useEffect)(()=>{en.current=u,el.current=c},[u,c]),(0,i.useEffect)(()=>
6{if(!p.current)return;let r=!1;return(j||(j=new Promise((e,t)=>{if(window.mapkit)return void e();let r=document.createElement("script");r.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",r.crossOrigin="anonymous",r.async=!0,r.onload=async()=>{try{await window.mapkit.init({authorizationCallback:async e=>{let t=await fetch("/api/maps/mapkit-token"),r=await t.json();e(r.token)}}),e()}catch(e){t(e)}},r.onerror=()=>t(Error("Failed to load MapKit JS")),document.head.appendChild(r)}))).then(()=>{if(r||!p.current)return;let l=window.mapkit;if(!f.current){f.current=new l.Map(p.current,{showsCompass:l.FeatureVisibility.Hidden,showsZoomControl:!0,showsMapTypeControl:!1,showsUserLocationControl:!1,isRotationEnabled:!1,annotationForCluster:e=>{let t=e.memberAnnotations.length,r=document.createElement("div");r.style.cssText=`
7                width: 36px; height: 36px; border-radius: 50%;
8                background: ${ei}; color: white;
9                display: flex; align-items: center; justify-content: center;
10                font-weight: 700; font-size: 13px; font-family: Inter, system-ui, sans-serif;
11                border: 2px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
12                cursor: pointer;
13              `,r.textContent=String(t);let n=new l.Annotation(e.coordinate,()=>r,{displayPriority:1e3,collisionMode:l.Annotation.CollisionMode.Circle,data:{isCluster:!0,members:e.memberAnnotations}});return n.callout={calloutElementForAnnotation:e=>{let t=e.data.members||[],r=document.createElement("div");if(r.style.cssText=`
14                    max-height: 240px; overflow-y: auto; width: 220px;
15                    background: white; border-radius: 10px;
16                    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
17                    font-family: 'Inter', system-ui, sans-serif;
18                  `,t.slice(0,8).forEach(e=>{let t=document.createElement("a"),n=e.data;if(!n)return;t.href=a?a(n.id):`/restaurants/${n.id}`,t.style.cssText=`
19                      display: flex; align-items: center; gap: 8px;
20                      padding: 8px 10px; border-bottom: 1px solid #f3f0eb;
21                      text-decoration: none; color: inherit; cursor: pointer;
22                    `,t.onmouseenter=()=>{t.style.backgroundColor="#fdfaf5"},t.onmouseleave=()=>{t.style.backgroundColor="transparent"};let l=document.createElement("span");l.textContent=n.name||"Unknown",l.style.cssText="font-size:12px;font-weight:600;color:#131105;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;";let o=document.createElement("span");n.rating&&(o.textContent=`★ ${n.rating}`,o.style.cssText="font-size:11px;color:#FBBF24;font-weight:600;flex-shrink:0;"),t.appendChild(l),t.appendChild(o),r.appendChild(t)}),t.length>8){let e=document.createElement("div");e.textContent=`+ ${t.length-8} more`,e.style.cssText="padding:6px 10px;font-size:11px;color:rgba(19,17,5,0.5);text-align:center;",r.appendChild(e)}return r}},n}});let e=f.current;X.current=e=>{let t=e.annotation;if(t){if(t.data?.isCluster){t.selected=!0;return}t.data?._isIndividual&&(t.selected=!0,t.element&&t._fullHTML&&(t.element.innerHTML=t._fullHTML))}},e.addEventListener("select",X.current),ee.current=e=>{let t=e.annotation;T.current.unmount(t),t?.data?._isIndividual&&t.element&&t._dotHTML&&t.data?.id!==er.current&&(t.element.innerHTML=t._dotHTML)},e.addEventListener("deselect",ee.current),et.current=()=>{if(G.current)return;let t=e.region.center,r=e.region.span;en.current&&en.current({lat:t.latitude,lng:t.longitude},{latDelta:r.latitudeDelta,lngDelta:r.longitudeDelta}),Y.current&&J(!0)},e.addEventListener("region-change-end",et.current)}let i=f.current;h.current.length>0&&(T.current.unmountAll(),i.removeAnnotations(h.current),h.current=[],x.current.clear()),g.current&&(i.removeAnnotation(g.current),g.current=null);let d=[],u=new Map,c=0;for(let t of e){let e=t.latitude??t.lat,r=t.longitude??t.lng??t.lon,i=null!=e&&""!==e?parseFloat(String(e)):null,p=null!=r&&""!==r?parseFloat(String(r)):null;if(null==i||null==p||isNaN(i)||isNaN(p)||0===i||0===p)continue;c++;let f=new l.Coordinate(i,p),h=String((Array.isArray(t.cuisine)?t.cuisine.filter(Boolean).join(", "):"str
22ing"==typeof t.cuisine?t.cuisine:"")||t.address||""),x=s?eo:"#990000",g=`<svg width="20" height="20" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="${x}"><path fill-rule="evenodd" clip-rule="evenodd" d="M512 868C317.598 868 160 710.402 160 516C160 321.598 317.598 164 512 164C553.719 164 593.742 171.261 630.878 184.586C511.353 211.084 424 320.897 424 451.111C424 601.307 545.804 723.111 696 723.111C752.142 723.111 804.311 706.086 847.637 676.945C787.045 791.05 658.165 868 512 868Z"/></svg>`,v=`<div style="width:13px;height:13px;border-radius:50%;background:${x};border:1.5px solid white;box-shadow:0 1px 3px rgba(0,0,0,0.35);"></div>`,w=`<div style="width:32px;height:32px;border-radius:50%;background:white;border:2px solid ${x};display:flex;align-items:center;justify-content:center;box-shadow:0 2px 6px rgba(0,0,0,0.25);">${g}</div>`,y=document.createElement("div");y.innerHTML=v,y.style.cssText="cursor:pointer;transition:transform 0.15s;",y.dataset.placeId=t.id;let k=new l.Annotation(f,()=>y,{title:String(t.name||""),subtitle:h,data:{...t,_isIndividual:!0},displayPriority:750,collisionMode:l.Annotation.CollisionMode.Circle,clusteringIdentifier:"places",anchorOffset:new DOMPoint(0,0)});k._dotHTML=v,k._fullHTML=w,k.callout={calloutElementForAnnotation:e=>{let t=document.createElement("div");t.style.cssText="padding:0;margin:0;width:300px;background:rgb(var(--surface));border-radius:10px;box-shadow:0 4px 16px rgba(0,0,0,0.18);overflow:hidden;cursor:pointer;";let r=(0,b.createRoot)(t);T.current.register(e,r);let l=_.current,i=l.loved.has(e.data.id)?"loved":l.visited.has(e.data.id)?"visited":l.wantToTry.has(e.data.id)?"wantToTry":null,s=a?a(e.data.id):`/restaurants/${e.data.id}`;return r.render((0,n.jsx)(o.HalalRankFlagProvider,{value:E.current,children:(0,n.jsx)(m,{restaurant:e.data,detailHref:s,onViewDetails:()=>{},savedCategory:i,isAuthed:z.current,onSave:(e,t)=>F.current(e,t),onRemove:e=>P.current(e),onRequireAuth:()=>B.current()})})),t.addEventListener("click",t=>{let r=t.target;r?.closest("button, a")||(window.location.href=a?a(e.data.id):`/restaurants/${e.data.id}`)}),t}},d.push(k),u.set(t.id,k)}if(h.current=d,x.current=u,d.length>0){let t=null==Y.current,r=Q.current,n=e.map(e=>e.id),o=new Set(n),a=null!=r&&n.length>=r.length&&r.every(e=>o.has(e)),s=null!=r&&!a;G.current=!0,i.addAnnotations(d),t||s?(i.showItems(d,{animate:!0,padding:new l.Padding(60,25,60,25)}),setTimeout(()=>{Y.current={center:{latitude:i.region.center.latitude,longitude:i.region.center.longitude}},G.current=!1},600)):G.current=!1}if(t&&S?.lat&&S?.lon){let e=new l.Coordinate(S.lat,S.lon),t=document.createElement("div");t.style.cssText=`
23            width: 16px; height: 16px; border-radius: 50%;
24            background: #3B82F6; border: 3px solid white;
25            box-shadow: 0 0 0 2px rgba(59,130,246,0.3), 0 2px 4px rgba(0,0,0,0.2);
26          `,g.current=new l.Annotation(e,()=>t,{title:"Your location",displayPriority:999}),i.addAnnotation(g.current)}if(0===d.length){let e=S?.lat&&S?.lon?new l.Coordinate(S.lat,S.lon):new l.Coordinate(40.6782,-73.9442);i.region=new l.CoordinateRegion(e,new l.CoordinateSpan(.1,.1))}e.length>0&&(Q.current=e.map(e=>e.id)),V(c),K(!1),U(!1)}).catch(e=>{console.error("[AppleMap] Failed to load MapKit:",e),K(!0),U(!1)}),()=>{r=!0}},[e,S,t,a,s,eo,ei]),(0,i.useEffect)(()=>{if(!d||!f.current)return void x.current.forEach(e=>{let t=e.element;t&&!e.selected&&e._dotHTML&&(t.innerHTML=e._dotHTML,t.style.zIndex="")});x.current.forEach((e,t)=>{let r=e.element;r&&(t===d?(e._fullHTML&&(r.innerHTML=e._fullHTML),r.style.zIndex="999",G.current=!0,f.current.setCenterAnimated(e.coordinate,!0),setTimeout(()=>{G.current=!1},400)):!e.selected&&e._dotHTML&&(r.innerHTML=e._dotHTML,r.style.zIndex=""))})},[d]),(0,i.useEffect)(()=>{let e=T.current;return()=>{e.unmountAll();let t=f.current;t&&(X.current&&t.removeEventListener("select",X.current),ee.current&&t.removeEventListener("deselect",ee.current),et.current&&t.removeEventListener("region-change-end",et.current))}},[]),(0,n.jsxs)("div",{className:"relative w-full h-full",style:{minHeight:r},children:[(0,n.jsx)("div",{ref:p,className:"rounded-lg overflow-hidden w-full h-full"}),Z&&el.current&&(0,n.jsxs)("button",{onClick:()=>{let e=f.current;if(!e||!el.current)return;let t=e.region.center;el.current({lat:t.latitude,lng:t.longitude}),J(!1),Y.current={center:{latitude:t.latitude,longitude:t.longitude}}},className:"absolute top-4 left-1/2 -translate-x-1/2 z-10 px-4 py-2 bg-surface rounded-full shadow-lg border border-warm-200 text-sm font-semibold text-pepper hover:bg-warm-50 transition-all duration-200 flex items-center gap-2",children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"Search this area"]}),W&&(0,n.jsxs)("div",{className:"absolute inset-0 bg-warm-100/70 backdrop-blur-sm rounded-lg flex flex-col items-center justify-center",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-16 w-16 border-b-4 border-pepper"}),(0,n.jsx)("p",{className:"mt-4 text-pepper font-medium",children:"Loading map..."})]}),!W&&q&&(0,n.jsxs)("div",{className:"absolute inset-0 bg-warm-100/90 rounded-lg flex flex-col items-center justify-center text-center px-4",children:[(0,n.jsx)("p",{className:"mt-4 text-lg font-medium text-pepper",children:"The map couldn't load"}),(0,n.jsx)("p",{className:"mt-2 text-sm text-pepper/70",children:"Refresh the page to try again, or view the grid instead."})]}),!W&&!q&&0===O&&e.length>0&&(0,n.jsxs)("div",{className:"absolute inset-0 bg-warm-100/90 rounded-lg flex flex-col items-center justify-center text-center px-4",children:[(0,n.jsx)("p",{className:"mt-4 text-lg font-medium text-pepper",children:"Couldn't locate any places on the map"}),(0,n.jsx)("p",{className:"mt-2 text-sm text-pepper/70",children:"Try a different filter or view the grid instead."})]})]})}}}]);

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.