1import{c as N,r as m,j as e,o as E,p as H,F as T,f as O,q as B,t as D,L as w,g as q,I as X,h as J}from"./index-Dbxhi8U8.js";import{u as K}from"./useSuspenseQuery-SaN5UeEv.js";import{S as U}from"./star-COxAs3fX.js";import{I as V}from"./instagram-feed-XYqdVZyo.js";import{f as Z,a as Q}from"./format-CLqQB3FU.js";import{M as G}from"./map-pin-CBTHHqSn.js";import"./useServerFn-Cfoe0Dx3.js";import"./instagram.functions-r4VAhSYI.js";import"./auth-middleware-CMkYsBi5.js";const Y=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],L=N("arrow-right",Y);const ee=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],te=N("clock",ee);const se=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 17H7",key:"pygtm1"}],["path",{d:"M17 21H9",key:"1u2q02"}]],re=N("cloud-fog",se);const ne=[["path",{d:"M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973",key:"1cez44"}],["path",{d:"m13 12-3 5h4l-3 5",key:"1t22er"}]],ae=N("cloud-lightning",ne);const oe=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M16 14v6",key:"1j4efv"}],["path",{d:"M8 14v6",key:"17c4r9"}],["path",{d:"M12 16v6",key:"c8a4gj"}]],P=N("cloud-rain",oe);const ie=[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M8 15h.01",key:"a7atzg"}],["path",{d:"M8 19h.01",key:"puxtts"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M12 21h.01",key:"h35vbk"}],["path",{d:"M16 15h.01",key:"rnfrdf"}],["path",{d:"M16 19h.01",key:"1vcnzz"}]],le=N("cloud-snow",ie);const ce=[["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}],["path",{d:"M15.947 12.65a4 4 0 0 0-5.925-4.128",key:"dpwdj0"}],["path",{d:"M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z",key:"s09mg5"}]],de=N("cloud-sun",ce);const me=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],S=N("cloud",me);const xe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],F=N("sun",xe);const ue=[["path",{d:"M10 10v.2A3 3 0 0 1 8.9 16H5a3 3 0 0 1-1-5.8V10a3 3 0 0 1 6 0Z",key:"1l6gj6"}],["path",{d:"M7 16v6",key:"1a82de"}],["path",{d:"M13 19v3",key:"13sx9i"}],["path",{d:"M12 19h8.3a1 1 0 0 0 .7-1.7L18 14h.3a1 1 0 0 0 .7-1.7L16 9h.2a1 1 0 0 0 .8-1.7L13 3l-1.4 1.5",key:"1sj9kv"}]],pe=N("trees",ue),he={google:"Google",yelp:"Yelp",facebook:"Facebook",untappd:"Untappd",manual:"Guest",other:"Review"},W=t=>(t.body??"").length;function fe({reviews:t}){const r=m.useRef(null),o=m.useRef(null),i=m.useRef(!1),a=m.useRef({active:!1,startX:0,startLeft:0,pointerId:-1,moved:!1}),l=m.useRef(!1),[f,c]=m.useState(!1),u=m.useMemo(()=>{const s=t.filter(h=>W(h)<=220),d=new Set,j=[];for(const h of t)if(!d.has(h.id)){if(W(h)<=220){const y=s.find(M=>M.id!==h.id&&!d.has(M.id));if(y){j.push({kind:"pair",a:h,b:y}),d.add(h.id),d.add(y.id);continue}}j.push({kind:"single",review:h})}return j},[t]);m.useEffect(()=>{const n=r.current,s=o.current;if(!n||!s)return;const d=()=>s.offsetWidth,j=()=>{const b=d();b&&(n.scrollLeft>=b*2&&(n.scrollLeft-=b),n.scrollLeft<=0&&(n.scrollLeft+=b))};n.scrollLeft=d();let h=0,y=performance.now();const M=b=>{const _=b-y;y=b,!i.current&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(n.scrollLeft+=_/1e3*Math.max(20,Math.min(36,u.length*4)),j()),h=requestAnimationFrame(M)},C=()=>j();return n.addEventListener("scroll",C,{passive:!0}),h=requestAnimationFrame(M),()=>{cancelAnimationFrame(h),n.removeEventListener("scroll",C)}},[u.length]);const p=n=>{if(n.button!==0)return;if(n.pointerType!=="mouse"){i.current=!0;return}const s=r.current;s&&(i.current=!0,a.current={active:!0,startX:n.clientX,startLeft:s.scrollLeft,pointerId:n.pointerId,moved:!1})},k=n=>{const s=a.current,d=r.current;if(!s.active||!d)return;const j=n.clientX-s.startX;Math.abs(j)>4&&!s.moved&&(s.moved=!0,d.setPointerCapture(s.pointerId),c(!0)),s.moved&&(d.scrollLeft=s.startLeft-j)},x=()=>{window.setTimeout(()=>{a.current.active||(i.current=!1)},250)},g=n=>{const s=a.current,d=r.current;if(n&&n.pointerType!=="mouse"&&!s.active){x();return}!s.active||!d||(d.hasPointerCapture(s.pointerId)&&d.releasePointerCapture(s.pointerId),l.current=s.moved,a.current={active:!1,startX:0,startLeft:0,pointerId:-1,moved:!1},s.moved?i.current=!1:x(),c(!1))},v=n=>{l.current&&(n.preventDefault(),n.stopPropagation(),l.current=!1)};return t.length===0?null:e.jsxs("section",{"aria-labelledby":"reviews-heading",className:"relative border-y border-border/60 bg-bone py-10 sm:py-20",children:[e.jsx("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:e.jsxs("header",{className:"mb-6 text-center sm:mb-12",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.22em] text-pine font-bold",children:"What people are saying"}),e.jsx("h2",{id:"reviews-heading",className:"mt-3 font-display text-4xl text-forest sm:text-5xl",children:"From our guests"})]})}),e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 w-3 bg-gradient-to-r from-bone/80 to-transparent sm:w-6"}),e.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-10 w-3 bg-gradient-to-l from-bone/80 to-transparent sm:w-6"}),e.jsx("div",{ref:r,className:`no-scrollbar relative z-0 overflow-x-auto overscroll-x-contain ${f?"cursor-grabbing select-none":"cursor-grab"}`,onPointerDown:p,onPointerMove:k,onPointerUp:g,onPointerCancel:g,onClickCapture:v,onPointerEnter:n=>{n.pointerType==="mouse"&&(i.current=!0)},onPointerLeave:n=>{n.pointerType==="mouse"&&!a.current.active&&(i.current=!1)},children:e.jsx("div",{className:"flex w-max py-1","aria-live":"off",children:[0,1,2].map(n=>e.jsx("div",{ref:n===0?o:void 0,className:"flex shrink-0 items-start gap-6 px-8 sm:px-12","aria-hidden":n!==1,children:u.map((s,d)=>ge(s,`${n}-${d}`))},n))})})]})}function ge(t,r){return t.kind==="single"?e.jsx(I,{review:t.review},`s-${t.review.id}-${r}
1`):e.jsxs("div",{className:"flex h-[360px] shrink-0 flex-col gap-3 sm:h-[420px] sm:gap-6",children:[e.jsx(I,{review:t.a,compact:!0}),e.jsx(I,{review:t.b,compact:!0})]},`p-${t.a.id}-${t.b.id}-${r}`)}function I({review:t,compact:r=!1}){const o=t.rating??null,i=he[t.source],a=t.body??"",l=a.length,f=r?"w-[76vw] max-w-[300px] sm:w-[420px] sm:max-w-none":l>400?"w-[85vw] max-w-[420px] sm:w-[520px] sm:max-w-none":l>220?"w-[80vw] max-w-[360px] sm:w-[460px] sm:max-w-none":l>120?"w-[75vw] max-w-[320px] sm:w-[400px] sm:max-w-none":"w-[70vw] max-w-[280px] sm:w-[360px] sm:max-w-none",c=r?"flex-1 min-h-0":"h-[360px] sm:h-[420px]",u=r?l>120:l>380,p=`flex ${f} ${c} shrink-0 flex-col justify-between rounded-sm border border-border bg-card p-3 shadow-sm ${r?"sm:p-4":"sm:p-6"} ${t.review_url?"cursor-pointer transition-colors hover:border-pine/60":""}`,k=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:[o!=null&&e.jsx("div",{className:"flex items-center gap-0.5 text-amber-500","aria-label":`${o} out of 5`,children:Array.from({length:5}).map((x,g)=>e.jsx(U,{className:(r?"h-3 w-3 sm:h-3.5 sm:w-3.5 ":"h-3 w-3 sm:h-4 sm:w-4 ")+(g<Math.round(o)?"fill-amber-500":"fill-transparent text-amber-500/30"),strokeWidth:1.5},g))}),e.jsxs("blockquote",{className:`mt-1 overflow-hidden font-display text-foreground [display:-webkit-box] [-webkit-box-orient:vertical] ${r?"[-webkit-line-clamp:4] sm:mt-2":"[-webkit-line-clamp:8] sm:mt-3"} `+(r?"text-xs leading-snug sm:text-[13px] sm:leading-[1.35]":"text-sm leading-tight sm:text-base sm:leading-snug"),children:[e.jsx("span",{"aria-hidden":"true",className:"text-pine",children:'"'}),a,e.jsx("span",{"aria-hidden":"true",className:"text-pine",children:'"'})]}),u&&!r&&e.jsx("div",{className:`pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-card via-card/70 to-transparent ${r?"h-6":"h-12"}`})]}),e.jsxs("footer",{className:`mt-2 flex items-center justify-between gap-3 border-t border-border/60 pt-2 ${r?"sm:mt-3 sm:pt-3":"sm:mt-5 sm:pt-4"}`,children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-2 sm:gap-3",children:[t.author_avatar_url?e.jsx("img",{src:t.author_avatar_url,alt:"",className:`h-7 w-7 rounded-full object-cover ${r?"sm:h-8 sm:w-8":"sm:h-9 sm:w-9"}`,loading:"lazy"}):e.jsx("div",{className:`flex h-7 w-7 items-center justify-center rounded-full bg-sage/40 text-xs font-medium text-forest ${r?"sm:h-8 sm:w-8 sm:text-xs":"sm:h-9 sm:w-9 sm:text-sm"}`,children:t.author_name.charAt(0).toUpperCase()}),e.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t.author_name})]}),e.jsx("span",{className:"shrink-0 text-[10px] uppercase tracking-[0.18em] text-pine",children:t.review_url&&u?"Read full review â":i})]})]});return t.review_url?e.jsx("a",{href:t.review_url,target:"_blank",rel:"noreferrer",className:p,draggable:!1,children:k}):e.jsx("article",{className:p,children:k})}const be="/__l5e/assets-v1/96f37131-c338-46bb-ab95-4e43f82bac69/battery-245-can.mp4",je={url:be};function ze(){const{data:t}=K(E),r=H(),o=r.mounted&&r.t>0,i=t.content.hero??{},a=t.content.visit??{},f=(t.content.order??{}).spoton_url||"https://order.spoton.com/so-battery-245-brewing-co-24444/warrenton-or/68632b898f3f915d8507e440",c=m.useMemo(()=>t.content.hours??{},[t.content.hours]),u=m.useMemo(()=>(t.content.holidays??{}).list??[],[t.content.holidays]),[p,k]=m.useState(null),[x,g]=m.useState(null),[v,n]=m.useState(null);return m.useEffect(()=>{const s=()=>{const j=A(new Date),h=u.find(M=>M.date===j),y=h?.hours??ve(c)??null;k(y),g(h?.label??null),n(we(y,c,u))};s();const d=setInterval(s,6e4);return()=>clearInterval(d)},[c,u]),e.jsxs("div",{className:"flex min-h-screen flex-col",children:[e.jsx(T,{}),e.jsx(O,{animateLogoHandoff:!0}),e.jsxs("main",{className:"flex-1",children:[e.jsx("h1",{className:"sr-only",children:"Battery 245 Brewing Co. â Craft Brewery and Restaurant in Warrenton, Oregon"}),e.jsxs("section",{className:"relative overflow-hidden border-b border-border/60",children:[e.jsx("div",{className:"absolute inset-0 -z-20 bg-bone"}),e.jsxs("div",{className:"absolute inset-x-0 top-0 -z-10 h-[55%] sm:inset-0 sm:h-auto",children:[e.jsx("img",{src:B.url,alt:"","aria-hidden":"true",width:1600,height:1200,loading:"eager",fetchPriority:"high",decoding:"async",className:"h-full w-full object-cover object-center sm:object-center"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-bone/30 via-bone/70 to-bone sm:hidden"}),e.jsx("div",{className:"absolute inset-0 hidden bg-gradient-to-r from-bone/90 via-bone/55 to-bone/15 sm:block"}),e.jsx("div",{className:"absolute inset-0 hidden bg-gradient-to-t from-bone/60 via-trans
1parent to-transparent sm:block"})]}),e.jsxs("div",{className:"mx-auto grid max-w-6xl gap-4 px-4 py-6 sm:gap-8 sm:px-6 sm:grid-cols-[1.1fr_1fr] sm:py-10 lg:grid-cols-[1.2fr_1fr] lg:gap-10 lg:py-12",children:[e.jsxs("div",{className:"flex flex-col justify-center",children:[e.jsx("p",{className:"order-2 mt-3 text-center text-sm font-bold uppercase tracking-[0.22em] text-pine sm:order-1 sm:mt-0 sm:text-left",children:"Restaurant · Taproom · Brewery"}),e.jsx("span",{"aria-hidden":!0,role:"img","data-logo-target":"hero","aria-label":i.headline??"Battery 245",className:"order-1 block text-forest mx-auto sm:mx-0 sm:order-2",style:{width:"100%",maxWidth:"11rem",aspectRatio:"3 / 4",opacity:o?0:1,backgroundColor:"currentColor",WebkitMaskImage:`url(${D.url})`,maskImage:`url(${D.url})`,WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center",WebkitMaskSize:"contain",maskSize:"contain",maskMode:"luminance",WebkitMaskSourceType:"luminance"}}),e.jsxs("div",{className:"order-3 mt-5 grid grid-cols-1 gap-3 sm:grid-cols-2 sm:items-start",children:[e.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-sm bg-forest px-6 py-3 text-sm font-medium tracking-wide text-bone transition-colors hover:bg-charcoal sm:col-span-2",children:"Order for Pickup or Delivery"}),e.jsx(w,{to:"/menu",className:"inline-flex items-center justify-center gap-2 rounded-sm border border-forest bg-bone/70 px-6 py-3 text-sm font-medium tracking-wide text-forest backdrop-blur-sm transition-colors hover:bg-forest hover:text-bone",children:"See the menu"}),e.jsx(w,{to:"/taps",className:"inline-flex items-center justify-center gap-2 rounded-sm border border-forest bg-bone/70 px-6 py-3 text-sm font-medium tracking-wide text-forest backdrop-blur-sm transition-colors hover:bg-forest hover:text-bone",children:"What's pouring"})]})]}),e.jsxs("aside",{className:"self-center rounded-sm border border-border bg-card/95 p-6 shadow-sm backdrop-blur-sm lg:p-8",children:[e.jsx("h2",{className:"font-display text-xl text-forest",children:"Today At Battery 245"}),e.jsxs("div",{className:"mt-4 grid gap-4 text-sm md:grid-cols-2",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(G,{className:"mt-0.5 h-4 w-4 shrink-0 text-pine"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-foreground",children:a.address??"245 Battery Street"}),a.city&&e.jsx("p",{className:"text-muted-foreground",children:a.city})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(te,{className:"mt-0.5 h-4 w-4 shrink-0 text-pine"}),e.jsxs("div",{suppressHydrationWarning:!0,children:[e.jsx("p",{className:"text-foreground",children:p??"Check hours"}),x&&e.jsx("p",{className:"mt-0.5 text-xs uppercase tracking-wider text-pine",children:x}),v&&e.jsxs("p",{className:"mt-1 flex items-center gap-1.5 text-xs font-medium",children:[e.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full "+(v.tone==="open"?"bg-pine":v.tone==="soon"?"bg-amber-500":v.tone==="special"?"bg-sage":"bg-muted-foreground/60")}),e.jsx("span",{className:v.tone==="closed"?"text-muted-foreground":v.tone==="soon"?"text-amber-700":"text-pine",children:v.label})]})]})]})]}),e.jsx("div",{className:"mt-4",children:e.jsx(Me,{})}),e.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-x-5 gap-y-2",children:[e.jsxs(w,{to:"/visit",className:"inline-flex items-center gap-1.5 text-sm font-medium text-forest hover:text-pine",children:["Visit details ",e.jsx(L,{className:"h-3.5 w-3.5"})]}),e.jsxs(w,{to:"/events",search:{filter:"specials"},className:"inline-flex items-center gap-1.5 text-sm font-medium text-forest hover:text-pine",children:["Check for today's specials ",e.jsx(L,{className:"h-3.5 w-3.5"})]})]})]})]})]}),e.jsxs("section",{className:"relative overflow-hidden border-b border-border/60 bg-charcoal",children:[e.jsx(ye,{src:je.url,className:"absolute inset-0 h-full w-full object-cover opacity-60"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-charcoal/80 via-charcoal/40 to-charcoal/80"}),e.jsxs("div",{className:"relative mx-auto flex max-w-6xl flex-col items-center gap-6 px-4 py-20 text-center sm:px-6 sm:py-28",children:[e.jsx("h2",{className:"font-display text-4xl text-bone sm:text-5xl",children:"Battery 245 Originals On Tap"}),e.jsx(w,{to:"/taps",className:"inline-flex items-center gap-2 rounded-sm bg-sage/90 px-6 py-3 text-sm font-medium tracking-wide text-forest transition-colors hover:bg-sage",children:"Explore Our Taplist"})]})]}),t.featuredTaps.length>0&&e.jsx("section",{className:"bg-sage/15",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:[e.jsxs("header",{className:"flex items-end justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-pine",children:"On tap"}),e.jsx("h2",{className:"mt-2 font-display text-4xl text-forest",children:"Pouring now"})]}),e.jsx(w,{to:"/taps",className:"hidden text-sm font-medium text-forest hover:text-pine sm:inline-flex",children:"Full tap list â"})]}),e.jsx("div",{className:"mt-10 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:t.featuredTaps.map(s=>e.jsxs("article",{className:"rounded-sm border border-border bg-card p-5",children:[e.jsxs("div",{className:"flex items-center justify-between text-xs uppercase tracking-wider text-muted-foreground",children:[e.jsx("span",{children:s.style??"Beer"}),s.abv!=null&&e.jsxs("span",{children:[s.abv,"% ABV"]})]}),e.jsx("h3",{className:"mt-3 font-display text-xl text-foreground",children:s.name}),s.description&&e.jsx("p",{className:"mt-2 text-sm text-muted-foreground line-clamp-3",children:s.description})]},s.id))})]})}),t.featuredItems.length>0&&e.jsx("section",{className:"bg-forest text-bone",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:[e.jsxs("header",{className:"flex items-end justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-sage",children:"From the kitchen"}),e.jsx("h2",{className:"mt-2 font-display text-4xl",children:"Chef's picks"})]}),e.jsx(w,{to:"/menu",className:"hidden text-sm font-medium text-sage hover:text-bone sm:inline-flex",children:"Full menu â"})]}),e.jsx("div",{className:"mt-10 grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:t.featuredItems.map(s=>e.jsxs("article",{className:"border-t border-bone/20 pt-5",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[e.jsx("h3",{className:"font-display text-xl",children:s.name}),e.jsx("span",{className:"text-sm text-sage",children:Z(s.price_cents)})]}),s.description&&e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-bone/70",children:s.description})]},s.id))})]})}),t.upcomingEvents.length>0&&e.jsxs("section",{className:"mx-auto max-w-6xl px-4 py-20 sm:px-6",children:[e.jsxs("header",{className:"flex items-end justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-pine",children:"What's on"}),e.jsx("h2",{className:"mt-2 font-display text-4xl text-forest",children:"Upcoming"})]}),e.jsx(w,{to:"/events",search:{filter:"all"},className:"hidden text-sm font-medium text-forest hover:text-pine sm:inline-flex",children:"All events â"})]}),e.jsx("div",{className:"mt-10 grid gap-6 md:grid-cols-2",children:t.upcomingEvents.map(s=>e.jsxs("article",{className:"flex gap-5 rounded-sm border border-border bg-card p-5",children:[e.jsxs("div",{className:"flex h-16 w-16 shrink-0 flex-col items-center justify-center rounded-sm bg-forest text-bone",children:[e.jsx("span",{className:"text-[10px] uppercase tracking-wider",children:new Date(s.starts_at).toLocaleDateString(void 0,{month:"short"})}),e.jsx("span",{className:"font-display text-2xl leading-none",children:new Date(s.starts_at).getDate()})]}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h3",{className:"font-display text-xl text-foreground",children:s.title}),e.jsx("p",{className:"mt-1 text-xs uppercase tracking-wider text-pine",children:Q(s.starts_at)}),s.description&&e.jsx("p",{className:"mt-2 text-sm text-muted-foreground line-clamp-2",children:s.description})]})]},s.id))})]}),e.jsx(fe,{reviews:t.featuredReviews}),e.jsx("section",{className:"border-t border-border/60 bg-sage/15",children:e.jsxs("div",{className:"mx-auto grid max-w-6xl gap-10 px-4 py-20 sm:px-6 md:grid-cols-2 md:items-center",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-pine",children:"Our story"}),e.jsx("h2",{className:"mt-2 font-display text-4xl text-forest",children:"Brewed Local, Sourced Local."}),e.jsx("p",{className:"mt-5 text-base leading-relaxed text-foreground
1/75",children:"Warrenton's first craft brewery, built by three hands-on partners â Jonathan Elliott, Michael Ljungberg, and Jeff Kilday â inside a former RV shop steps from the marina. Named for the WWII coastal battery just up the road at Fort Stevens, it's a 7-barrel brewery, family-friendly restaurant, and bright waterfront taproom rooted in North Coast pride."}),e.jsxs(w,{to:"/story",className:"mt-6 inline-flex items-center gap-2 text-sm font-medium text-forest hover:text-pine",children:["Read the full story ",e.jsx(L,{className:"h-4 w-4"})]})]}),e.jsxs("figure",{className:"overflow-hidden rounded-sm border border-pine/20",children:[e.jsx("img",{src:q.url,alt:"Battery 245 founders Jonathan Elliott, Michael Ljungberg, and Jeff Kilday",className:"aspect-[4/3] w-full object-cover",loading:"lazy"}),e.jsx("figcaption",{className:"bg-card px-4 py-2 text-center text-xs text-muted-foreground",children:"Jonathan Elliott, Michael Ljungberg, and Jeff Kilday. Photo credit: William Dean."})]})]})}),e.jsx("section",{className:"border-t border-border/60 bg-bone",children:e.jsxs("div",{className:"mx-auto max-w-6xl px-4 py-10 sm:px-6 sm:py-12",children:[e.jsxs("div",{className:"flex flex-col items-start gap-4 text-left",children:[e.jsxs("div",{className:"max-w-2xl",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-pine",children:"From the feed"}),e.jsx("h2",{className:"mt-2 font-display text-4xl text-forest sm:text-5xl",children:"Latest from the brewhouse"})]}),e.jsxs("div",{className:"flex w-full max-w-md flex-col gap-3 sm:max-w-none sm:flex-row",children:[e.jsxs("a",{href:"https://instagram.com/battery245brewing",target:"_blank",rel:"noreferrer",className:"inline-flex items-center justify-center gap-2 rounded-sm border border-forest bg-bone px-5 py-2.5 text-sm font-medium tracking-wide text-forest transition-colors hover:bg-forest hover:text-bone",children:[e.jsx(X,{className:"h-4 w-4"})," Follow on Instagram"]}),e.jsxs(w,{to:"/events",search:{filter:"all"},className:"inline-flex items-center justify-center gap-2 rounded-sm bg-forest px-5 py-2.5 text-sm font-medium tracking-wide text-bone transition-colors hover:bg-charcoal",children:["More News & Events ",e.jsx(L,{className:"h-4 w-4"})]})]})]}),e.jsx("div",{className:"mt-6 sm:mt-8",children:e.jsx(V,{})})]})})]}),e.jsx(J,{className:"mt-0"})]})}function ye({src:t,className:r}){const o=m.useRef(null),[i,a]=m.useState(!1);return m.useEffect(()=>{if(!o.current||i)return;const l=new IntersectionObserver(f=>{f.some(c=>c.isIntersecting)&&(a(!0),l.disconnect())},{rootMargin:"200px"});return l.observe(o.current),()=>l.disconnect()},[i]),e.jsx("div",{ref:o,className:r,"aria-hidden":"true",children:i&&e.jsx("video",{src:t,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"h-full w-full object-cover"})})}function ve(t){const o=["sun","mon","tue","wed","thu","fri","sat"][new Date().getDay()];return t[o]??null}function z(t){const r=t.trim().toLowerCase().match(/^(\d{1,2})(?::(\d{2}))?\s*(am|pm)$/);if(!r)return null;let o=parseInt(r[1],10);const i=r[2]?parseInt(r[2],10):0,a=r[3];return a==="pm"&&o!==12&&(o+=12),a==="am"&&o===12&&(o=0),o*60+i}function R(t){const r=[],o=/(?:([A-Za-z][A-Za-z ]*?)\s*)?(\d{1,2}(?::\d{2})?\s*(?:am|pm))\s*[â-]\s*(\d{1,2}(?::\d{2})?\s*(?:am|pm))/gi;let i;for(;(i=o.exec(t))!==null;){const a=z(i[2]),l=z(i[3]);a==null||l==null||r.push({start:a,end:l,label:i[1]?.trim()||void 0})}return r}function $(t){const r=Math.floor(t/60),o=t%60,i=r>=12?"pm":"am";let a=r%12;return a===0&&(a=12),o===0?`${a}${i}`:`${a}:${String(o).padStart(2,"0")}${i}`}function A(t){const r=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0");return`${r}-${o}-${i}`}function we(t,r,o){const i=["sun","mon","tue","wed","thu","fri","sat"],a=new Date,l=a.getHours()*60+a.getMinutes();if(!t)return null;if(/closed/i.test(t)&&R(t).length===0){const x=k(a,r,o);return{label:x?`Closed · ${x}`:"Closed today",tone:"closed"}}const f=R(t);if(f.length===0)return null;const c=f.reduce((x,g)=>g.end-g.start>x.end-x.start?g:x),u=f.find(x=>x.label&&x!==c);if(l>=c.start&&l<c.end)return u&&l>=u.start&&l<u.end?{label:`${u.label} service · until ${$(u.end)}`,tone:"special"}:c.end-l<=60?{label:`Closing soon · ${$(c.end)}`,tone:"soon"}:{label:`Open now · until ${$(c.end)}`,tone:"open"};if(l<c.start)return{label:`Opens at ${$(c.start)}`,tone:"closed"};const p=k(a,r,o);return{label:p?`Closed · ${p}`:"Closed",tone:"closed"};function k(x,g,v){for(let n=1;n<=7;n++){const s=new Date(x);s.setDate(s.getDate()+n);const d=A(s),h=v.find(b=>b.date===d)?.hours??g[i[s.getDay()]]??"",y=R(h);if(y.length===0)continue;const M=y.reduce((b,_)=>_.end-_.start>b.end-b.start?_:b);return`${n===1?"Opens tomorrow":`Opens ${s.toLocaleDateString(void 0,{weekday:"long"})}`} at ${$(M.start)}`}return null}}const Ne=46.1651,ke=-123.9242;function Me(){const[t,r]=m.useState(null),[o,i]=m.useState(!1);if(m.useEffect(()=>{let c=!1;const u=`https://api.open-meteo.com/v1/forecast?latitude=${Ne}&longitude=${ke}¤t=temperature_2m,is_day,precipitation,weather_code,wind_speed_10m&temperature_unit=fahrenheit&wind_speed_unit=mph`;return fetch(u).then(p=>p.json()).then(p=>{c||!p?.current||r({tempF:Math.round(p.current.temperature_2m),code:p.current.weather_code,isDay:p.current.is_day===1,precip:p.current.precipitation??0,windMph:p.current.wind_speed_10m??0})}).catch(()=>!c&&i(!0)),()=>{c=!0}},[]),o||!t)return null;const{Icon:a,label:l}=$e(t.code,t.isDay),f=_e(t);return e.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[e.jsx(a,{className:"mt-0.5 h-4 w-4 shrink-0 text-pine"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("dt",{className:"sr-only",children:"Current weather"}),e.jsxs("dd",{className:"flex items-center gap-2 text-foreground",children:[e.jsxs("span",{children:[t.tempF,"°F · ",l]}),f&&e.jsxs("span",{title:"Patio weather â grab a picnic table",className:"inline-flex items-center gap-1 rounded-full bg-pine/10 px-2 py-0.5 text-xs font-medium text-pine",children:[e.jsx(pe,{className:"h-3 w-3"})," Patio weather"]})]})]})]})}function _e(t){return!t.isDay||t.tempF<62||t.precip>.01||t.windMph>18?!1:[0,1,2].includes(t.code)}function $e(t,r){return t===0?{Icon:r?F:S,label:"Clear"}:t===1?{Icon:r?F:S,label:"Mostly clear"}:t===2?{Icon:de,label:"Partly cloudy"}:t===3?{Icon:S,label:"Cloudy"}:[45,48].includes(t)?{Icon:re,label:"Fog"}:[51,53,55,56,57].includes(t)?{Icon:P,label:"Drizzle"}:[61,63,65,66,67,80,81,82].includes(t)?{Icon:P,label:"Rain"}:[71,73,75,77,85,86].includes(t)?{Icon:le,label:"Snow"}:[95,96,99].includes(t)?{Icon:ae,label:"Thunderstorms"}:{Icon:S,label:"â"}}export{ze as component};
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.