import{b as st,j as e,e as ss,u as Js,L as xn,r as u,a as _r,f as Hn,k as Er}from"./vendor-react-DgEFbQIi.js";import{u as Br,P as hn,s as js,o as Ns,a as Lr,E as Fr,b as Or,i as pn,c as Lt,d as Dn,T as $r,e as Pn,S as Hr,V as Dr,f as Un,v as zn,L as qn,g as Ps,h as Vn,j as Ls,t as Pr,p as Ur,k as zr,l as fn,m as qr,n as Vr,q as Gr,r as Wr,w as Kr,x as Qr,y as Yr,z as Jr}from"./useDwellTracking-BUncROAZ.js";import{aG as Zr,aH as Xr,aI as Gn,aJ as gn,aK as ea,a as H,aL as Ge,aw as Yt,ax as Jt,aM as Zt,ah as Xt,V as Ms,aN as ta,_ as Ss,aO as sa,B as ue,C as Wn,j as Kn,aP as bn,aQ as na,N as yn,aR as ra,aS as Ee,aT as aa,aU as oa,aV as es,aW as He,aX as Qn,aY as Yn,aZ as ia,a_ as la,i as ca,a$ as da,b0 as ua,o as Jn,O as ma,b1 as xa,b2 as ws,f as Is,I as ot,k as jn,b3 as Nn,b4 as Us,b5 as zs,a2 as ha,b6 as Zn,b7 as Xn,b8 as er,b9 as Zs,ba as tr,bb as sr,ai as vs,bc as pa,g as fa,bd as ga,be as ba,bf as ya,T as Et,bg as ja,bh as Xs,L as It,bi as Na,bj as wa,bk as va,q as Ra,u as Ca,U as Fs,Z as gs,v as wn,S as P}from"./index-DFVuS8SP.js";import{b as Ta}from"./buildVenueDisplayBreakdown-DJmOLjKb.js";import{f as ka,r as Ma,c as Sa,S as Ia}from"./badges-B7hHNwsz.js";import"./vendor-maps-bOuA10hf.js";import{a as nr,i as rr}from"./claimRequests-54T7aAUE.js";import{i as vn}from"./listing-B0peEtEB.js";import{r as Aa,g as _a,s as Ea}from"./wishlists-NNbira8h.js";import"./vendor-amplify-BBi2B1tW.js";import{B as At}from"./badge-EX7nx8Gi.js";import{D as en,T as Rn}from"./time-picker-CVBYk6mZ.js";import{g as ar}from"./timeDisplay-CqrwEP8R.js";import{I as Rs}from"./ImageWithFallback-C1HTj5IA.js";import{g as Ba,h as La}from"./cancellationPolicy-CHNl_QUB.js";import{f as Fa,g as or,M as Nt,r as Os,i as Cs,a as qs,v as Cn,b as Vs,t as wt,m as ir,c as Tn,d as kn}from"./availability-uF5JIR8q.js";import{g as lr,a as cr}from"./listingFeeInput-DmvcA6E5.js";import{C as Gs}from"./circle-check-DeY5-glE.js";import{C as Oa}from"./clock-3-iQSrDlwG.js";import{c as dr,s as Mn,h as Ts,a as $s}from"./listingBookingMode-C1OKcUc5.js";import{b as $a}from"./timelineDisplayUtils-D9E_h4yD.js";import{C as ur}from"./calendar-clock-BxCwcoDz.js";import{B as mr}from"./badge-check-D5e4IH5i.js";import{Z as xr}from"./zap-C_2cuoty.js";import{S as Ws}from"./star-C0MTo9W6.js";import{g as Kt,c as Ha,A as Da,m as Pa}from"./vendor-motion-CzLrDd6y.js";import{b as Ua}from"./venues-BaWtNBkC.js";import{g as za}from"./listing-utils-CICni2H8.js";import{p as Hs}from"./timeUtils-J6UVSYhu.js";import{p as hr}from"./parseISO-C4sM-PC7.js";import{u as qa}from"./usePendingBooking-KaX_YIhO.js";import{C as Va}from"./CustomQuoteRequestModal-B1AxAMjE.js";import{s as Ga}from"./conciergeInquiries-Depjwqxs.js";import{C as Wa}from"./calendar-days-CNTt1Q2P.js";import{S as Ka}from"./ScrollableServiceSection-CLba8NGS.js";import{g as Qa}from"./recommendations-BGlMfWov.js";import{G as Ya,a as Ja}from"./apiErrors-C7dfUGUr.js";import{u as Za}from"./useSeo-eyKuqwK1.js";import{u as Xa}from"./prerenderSignal-6UTp3gVc.js";import{p as eo}from"./listingSlug-DQN33ZKR.js";import"./link-2-BCZlQqmz.js";import"./pencil-hVBxHOIk.js";import"./parse-DWUfxhsp.js";import"./copy-Bg4Oavyf.js";import"./message-circle-DUsZlt4V.js";import"./send-CbUVXki9.js";import"./parseTwoModelBreakdown-C0mm51kj.js";import"./vendor-radix-kdo0k_bv.js";import"./authHeaders-C650O0HP.js";import"./calendar-7-ncaX7W.js";import"./types-B9GuC8gc.js";import"./EventAddressAutocomplete-BzvAP_c0.js";import"./serviceEventLocation-BFeOjzcJ.js";import"./useHoverRipple-CBPqdLxA.js";import"./ListingCard-Cw2aMm7U.js";import"./OptimizedImage-BZrGLn_7.js";/**
 * @license lucide-react v0.462.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const to=Zr("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]),so=t=>Object.prototype.hasOwnProperty.call(Gn,t),pr=({amenityValues:t,isMobile:s})=>{const[n,r]=st.useState(!1),{availableItems:a,unavailableItems:l,byGroup:c}=st.useMemo(()=>{const d=new Set(t.map(p=>Xr(p)??p)),h=[],y=[];for(const[p,k]of Object.entries(Gn)){const I={key:p,label:k.label,icon:gn(p),group:k.group};d.has(p)?h.push(I):y.push(I)}for(const p of d)so(p)||h.push({key:p,label:p.replace(/[_-]/g," ").replace(/\b\w/g,k=>k.toUpperCase()),icon:gn(p),group:"Other"});const v=ea.map(({id:p,title:k})=>({id:p,title:k,items:h.filter(I=>I.group===p)})).filter(p=>p.items.length>0);return{availableItems:h,unavailableItems:y,byGroup:v}},[t]);if(a.length===0&&l.length===0)return null;const o=a.slice(0,10),i=a.length+l.length,g=d=>{const h=d.icon;return e.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-700",children:[e.jsx(h,{className:"h-5 w-5 flex-shrink-0"}),e.jsx("span",{children:d.label})]},d.key)},j=d=>{const h=d.icon;return e.jsxs("div",{className:"flex items-center gap-3 text-sm text-gray-400 line-through",children:[e.jsx(h,{className:"h-5 w-5 flex-shrink-0"}),e.jsx("span",{children:d.label})]},d.key)},m=e.jsxs("div",{className:H("space-y-8",s?"pt-2":"pt-4"),children:[c.map(d=>e.jsxs("div",{children:[e.jsx("h3",{className:H("font-semibold text-gray-900 mb-4",s?"text-sm":"text-base"),children:d.title}),e.jsx("div",{children:d.items.map((h,y)=>e.jsxs(st.Fragment,{children:[e.jsx("div",{className:"py-4",children:g(h)}),y<d.items.length-1&&e.jsx(Ge,{})]},h.key))})]},d.id)),l.length>0&&e.jsxs("div",{children:[e.jsx("h3",{className:H("font-semibold text-gray-900 mb-4",s?"text-sm":"text-base"),children:"Not included"}),e.jsx("div",{children:l.map((d,h)=>e.jsxs(st.Fragment,{children:[e.jsx("div",{className:"py-4",children:j(d)}),h<l.length-1&&e.jsx(Ge,{})]},d.key))})]})]});return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"space-y-5",children:[e.jsx("h2",{className:H("font-semibold text-gray-900",s?"text-lg":"text-xl"),children:"What this venue offers"}),e.jsx("div",{className:H("grid grid-cols-1 min-[420px]:grid-cols-2 md:grid-cols-2",s?"gap-x-4 gap-y-3":"gap-x-8 gap-y-4"),children:o.map(d=>g(d))}),e.jsxs("button",{onClick:()=>r(!0),className:H("rounded-lg border border-gray-900 font-semibold text-gray-900 hover:bg-gray-50 transition-colors",s?"px-5 py-2.5 text-sm":"px-6 py-3 text-sm"),children:["Show all ",i," amenities"]})]}),e.jsx(Yt,{open:n,onOpenChange:r,children:e.jsxs(Jt,{className:H(!s&&"max-w-2xl max-h-[90vh] overflow-y-auto"),hideCloseButton:s,mobileBottomSheet:s,children:[e.jsx(Zt,{children:e.jsx(Xt,{className:H("font-semibold text-gray-900",s?"text-lg":"text-xl"),children:"What this venue offers"})}),m]})})]})};function no(t){if(!Array.isArray(t))return;const s=t.map(n=>{if(!n||typeof n!="object")return null;const r=n,a=typeof r.platform=="string"?r.platform.trim():"",l=typeof r.url=="string"?r.url.trim():"";if(!a||!l)return null;const c=typeof r.label=="string"?r.label.trim():void 0;return{platform:a,url:l,...c?{label:c}:{}}}).filter(Boolean);return s.length>0?s:void 0}function ro(t){const s=new Set,n=[];for(const r of t){const a=r.url.trim().toLowerCase();s.has(a)||(s.add(a),n.push(r))}return n}const fr=({hostProfile:t,listing:s,isMobile:n,onMessageHost:r})=>{var R,N;const a=ss(),l=Js(),{user:c}=Ms(),o=ta(),i=()=>{if(r){r();return}if(s!=null&&s.listingId){if(!c){const f=`/send_message?listing=${s.listingId}`;js(l.pathname)?Ns(f):a("/auth?returnTo="+encodeURIComponent(f));return}o.mutate({listingId:s.listingId,initialMessage:""},{onSuccess:f=>{a(`/messages/${f.conversation.conversationId}`)}})}},g=st.useMemo(()=>{const f=typeof t.firstName=="string"?t.firstName.trim():"",b=typeof t.lastName=="string"?t.lastName.trim():"";return f||b?`${f} ${b}`.trim():typeof t.name=="string"&&t.name.trim().length>0?t.name.trim():"Your host"},[t.firstName,t.lastName,t.name]),j=st.useMemo(()=>typeof t.hostingSince=="string"&&t.hostingSince.trim()?t.hostingSince.trim():s&&ka(Ma(s))||null,[t.hostingSince,s]),m=typeof t.bio=="string"&&t.bio.trim().length>0?t.bio.trim():"We love helping planners create memorable experiences in our space. Reach out with your ideas—we're here to help.",d=typeof t.responseTime=="string"&&t.responseTime.trim().length>0?t.responseTime.trim():"Responds within a few hours",h=typeof t.publicId=="string"&&t.publicId.trim()?t.publicId.trim():null,y=typeof t.avatar=="string"&&t.avatar?t.avatar:void 0,v=st.useMemo(()=>{var x,A;const f=((x=s==null?void 0:s.publishedData)==null?void 0:x.onlineProfiles)??((A=s==null?void 0:s.draftData)==null?void 0:A.onlineProfiles),b=no(f);return b!=null&&b.length?{onlineProfiles:ro(b)}:{}},[(R=s==null?void 0:s.publishedData)==null?void 0:R.onlineProfiles,(N=s==null?void 0:s.draftData)==null?void 0:N.onlineProfiles]),p=o.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ss,{className:"mr-2 h-4 w-4 animate-spin"}),"Opening..."]}):`Message ${g.split(" ")[0]||"Host"}`,k=nr(s),{data:I}=Br(s==null?void 0:s.listingId,k),C=!!I;if(k&&(s!=null&&s.listingId)){const f=`/venue/${s.listingId}/claim`,b=C?e.jsxs(ue,{variant:"outline",size:"sm",className:"rounded-full",disabled:!0,children:[e.jsx(Oa,{className:"mr-2 h-4 w-4"}),"Request pending"]}):e.jsx(ue,{variant:"outline",size:"sm",className:"rounded-full border-brand bg-white text-brand hover:bg-brand/5 hover:text-brand",asChild:!0,children:e.jsx(xn,{to:f,children:"Claim venue"})});return e.jsxs("section",{id:"host",className:n?"rounded-2xl border border-border/70 bg-white p-4 shadow-sm":"rounded-2xl border border-border/70 bg-white p-6 shadow-sm",children:[e.jsx("h3",{className:n?"text-sm font-semibold text-gray-900":"text-lg font-semibold text-gray-900",children:"Is this your venue?"}),e.jsxs("div",{className:"mt-2 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsx("p",{className:"text-xs leading-relaxed text-gray-600 sm:flex-1 sm:text-sm",children:"If you own or manage this venue, you can claim it to take control, fix details, or request its removal."}),e.jsx("div",{className:"shrink-0",children:b})]}),e.jsxs(xn,{to:"/listing-disclosure",className:"mt-3 inline-flex items-center gap-1.5 text-xs text-muted-foreground underline-offset-2 hover:underline",children:[e.jsx(sa,{className:"h-3.5 w-3.5"}),"This venue was listed by PLEC"]})]})}return n?e.jsxs("section",{id:"host",className:"rounded-2xl border border-border/70 bg-white p-4 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Rs,{src:y,alt:g,className:"h-10 w-10 rounded-full object-cover ring-2 ring-border",fallback:"/default-profile-icon.png"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("h3",{className:"text-sm font-semibold text-gray-900",children:["Hosted by ",g]}),j&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Hosting on PLEC since ",j]})]})]}),e.jsx(hn,{social:v,className:"mt-2 justify-center"}),e.jsx("p",{className:"mt-3 text-xs text-gray-700 whitespace-pre-line min-w-0 break-words",children:m}),e.jsxs("div",{className:"mt-3 flex flex-col gap-1.5 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:["• ",d]}),e.jsx("span",{children:"• Verified PLEC partner"})]}),e.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[h&&e.jsx(ue,{variant:"outline",size:"sm",className:"w-full rounded-full text-xs",asChild:!0,children:e.jsx("a",{href:`/u/${h}`,target:"_blank",rel:"noopener noreferrer",children:"View profile"})}),e.jsx(ue,{variant:"outline",size:"sm",className:"w-full rounded-full text-xs",onClick:i,disabled:o.isPending||!(s!=null&&s.listingId),children:p})]})]}):e.jsxs("section",{id:"host",className:"space-y-6 min-w-0",children:[e.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:"Meet your host"}),e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-white p-6 shadow-sm min-w-0 overflow-hidden",children:[e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center gap-4 sm:gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0 flex-1",children:[e.jsx(Rs,{src:y,alt:g,className:"h-16 w-16 shrink-0 rounded-full object-cover ring-2 ring-border",fallback:"/default-profile-icon.png"}),e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1",children:[e.jsx("h3",{className:"text-lg font-semibold text-gray-900",children:g}),e.jsx(hn,{social:v})]}),j&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Hosting on PLEC since ",j]}),e.jsxs(At,{className:"mt-1.5 rounded-full bg-brand/10 text-brand border-brand/20 px-2.5 py-0.5 text-xs",children:[e.jsx(Gs,{className:"mr-1 h-3 w-3"}),"Verified"]})]})]}),e.jsxs("div",{className:"flex shrink-0 gap-2 sm:flex-row",children:[h&&e.jsx(ue,{variant:"outline",size:"sm",className:"rounded-full",asChild:!0,children:e.jsx("a",{href:`/u/${h}`,target:"_blank",rel:"noopener noreferrer",children:"View profile"})}),e.jsx(ue,{variant:"outline",size:"sm",className:"rounded-full",onClick:i,disabled:o.isPending||!(s!=null&&s.listingId),children:p})]})]}),e.jsxs("div",{className:"mt-4 pt-4 border-t border-border/60",children:[e.jsx("p",{className:"text-sm text-gray-700 whitespace-pre-line leading-relaxed",children:m}),e.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[d," · Verified PLEC partner"]})]})]})]})},ao=6,oo=5;function io(t){const s=Date.now()-new Date(t).getTime(),n=Math.floor(s/864e5);if(n<1)return"Today";if(n===1)return"1 day ago";if(n<7)return`${n} days ago`;if(n<14)return"1 week ago";if(n<30)return`${Math.floor(n/7)} weeks ago`;if(n<60)return"1 month ago";if(n<365)return`${Math.floor(n/30)} months ago`;const r=Math.floor(n/365);return`${r} year${r>1?"s":""} ago`}function lo({rating:t}){return e.jsx("span",{className:"flex items-center gap-px leading-none",children:Array.from({length:5}).map((s,n)=>e.jsx("span",{className:n<t?"text-gray-900":"text-gray-300",children:"★"},n))})}function co({r:t}){var c,o,i,g;const[s,n]=u.useState(!1),r=180,a=t.comment.length>r,l=!s&&a?t.comment.slice(0,r).trimEnd()+"...":t.comment;return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3",children:[e.jsx("p",{className:"font-medium text-gray-900 leading-tight",children:t.author}),((c=t.reviewerOrganization)==null?void 0:c.trim())&&e.jsx("p",{className:"text-sm text-muted-foreground leading-tight",children:t.reviewerOrganization.trim()})]}),e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx(lo,{rating:t.rating}),e.jsxs("span",{className:"text-sm text-gray-500",children:["· ",io(t.date)]})]}),e.jsx("p",{className:"text-sm leading-relaxed text-gray-700",children:l}),a&&e.jsx("button",{type:"button",onClick:()=>n(j=>!j),className:"mt-1 text-sm font-semibold text-gray-900 underline hover:no-underline",children:s?"Show less":"Show more"}),((i=(o=t.reply)==null?void 0:o.comment)==null?void 0:i.trim())&&e.jsxs("div",{className:"mt-3 ml-3 border-l-2 border-gray-200 pl-4",children:[e.jsxs("p",{className:"text-xs font-medium text-muted-foreground",children:["Host response",(g=t.reply.authorName)!=null&&g.trim()?` · ${t.reply.authorName.trim()}`:""]}),e.jsx("p",{className:"mt-1 text-sm leading-relaxed text-gray-800",children:t.reply.comment.trim()})]})]})}const gr=({reviews:t,listingId:s,isMobile:n=!1})=>{const r=u.useMemo(()=>(t==null?void 0:t.slice(0,4))??t,[t]),[a,l]=u.useState(1),c=r&&r.length>0,o=(r??[]).map(d=>d.id).join("|"),i=n?oo:ao;u.useEffect(()=>{l(1)},[s,o]);const g=u.useMemo(()=>Math.ceil(((r==null?void 0:r.length)||0)/i),[r==null?void 0:r.length,i]),j=u.useMemo(()=>{if(!r||r.length<=i)return r;const d=(a-1)*i;return r.slice(d,d+i)},[r,a,i]),m=()=>{if(g<=1)return[];if(g<=7)return Array.from({length:g},(h,y)=>y+1);const d=[];return a<=3?d.push(1,2,3,"...",g):a>=g-2?d.push(1,"...",g-2,g-1,g):d.push(1,"...",a-1,a,a+1,"...",g),d};return n?e.jsxs("section",{className:"rounded-[32px] border border-border/70 bg-white p-6 shadow-sm","aria-labelledby":"venue-reviews-heading",children:[!c&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Reviews are coming soon. Be one of the first to host your event here."}),e.jsx("div",{className:"mt-5 grid gap-4 md:grid-cols-3",children:["Impeccable staff & seamless planning support","Space looked exactly like the photos – even better","Guests loved the ambiance and amenities"].map(d=>e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-muted/30 p-4 text-sm text-gray-700",children:['"',d,'"']},d))})]}),c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"mt-6 space-y-6",children:j.map(d=>{var h,y;return e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-muted/20 p-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-gray-900",children:d.author}),e.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(d.date).toLocaleDateString()})]}),e.jsx("div",{className:"mt-2 flex items-center",children:Array.from({length:5}).map((v,p)=>e.jsx("span",{className:p<d.rating?"text-yellow-500":"text-gray-300",children:"★"},p))}),e.jsx("p",{className:"mt-3 text-sm text-gray-700",children:d.comment}),((y=(h=d.reply)==null?void 0:h.comment)==null?void 0:y.trim())&&e.jsxs("div",{className:"mt-4 ml-3 border-l-2 border-border/80 pl-4",children:[e.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Host response"}),e.jsx("p",{className:"mt-2 text-sm leading-relaxed text-gray-800",children:d.reply.comment.trim()})]})]},d.id)})}),r.length>i&&e.jsx(uo,{currentPage:a,totalPages:g,pages:m(),onPrev:()=>l(d=>Math.max(1,d-1)),onNext:()=>l(d=>Math.min(g,d+1)),onPage:l})]})]}):e.jsxs("section",{"aria-labelledby":"venue-reviews-heading-desktop",children:[!c&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Reviews are coming soon. Be one of the first to host your event here and we'll highlight your experience."}),e.jsx("div",{className:"mt-5 grid gap-4 md:grid-cols-3",children:["Impeccable staff & seamless planning support","Space looked exactly like the photos – even better","Guests loved the ambiance and amenities"].map(d=>e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-muted/30 p-4 text-sm text-gray-700",children:['"',d,'"']},d))})]}),c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-2 gap-x-12 gap-y-8",children:j.map(d=>e.jsx(co,{r:d},d.id))}),r.length>i&&e.jsxs("div",{className:"mt-8 flex items-center justify-center gap-2",children:[e.jsx("button",{onClick:()=>l(d=>Math.max(1,d-1)),disabled:a===1,className:"flex h-9 w-9 items-center justify-center rounded-md border border-border/70 glass glass-surface text-gray-700 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Previous page",children:e.jsx(Wn,{className:"h-4 w-4"})}),m().map((d,h)=>d==="..."?e.jsx("span",{className:"px-2 text-gray-500",children:"..."},`e-${h}`):e.jsx("button",{onClick:()=>l(d),className:`flex h-9 w-9 items-center justify-center rounded-md border transition-colors ${a===d?"border-gray-900 bg-gray-900 text-white":"border-border/70 bg-white text-gray-700 hover:bg-gray-50"}`,"aria-label":`Page ${d}`,"aria-current":a===d?"page":void 0,children:d},d)),e.jsx("button",{onClick:()=>l(d=>Math.min(g,d+1)),disabled:a===g,className:"flex h-9 w-9 items-center justify-center rounded-md border border-border/70 glass glass-surface text-gray-700 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Next page",children:e.jsx(Kn,{className:"h-4 w-4"})})]})]})]})};function uo({currentPage:t,totalPages:s,pages:n,onPrev:r,onNext:a,onPage:l}){return e.jsxs("div",{className:"mt-8 flex items-center justify-center gap-2",children:[e.jsx("button",{onClick:r,disabled:t===1,className:"flex h-9 w-9 items-center justify-center rounded-md border border-border/70 glass glass-surface text-gray-700 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Previous page",children:e.jsx(Wn,{className:"h-4 w-4"})}),n.map((c,o)=>c==="..."?e.jsx("span",{className:"px-2 text-gray-500",children:"..."},`e-${o}`):e.jsx("button",{onClick:()=>l(c),className:`flex h-9 w-9 items-center justify-center rounded-md border transition-colors ${t===c?"border-gray-900 bg-gray-900 text-white":"border-border/70 bg-white text-gray-700 hover:bg-gray-50"}`,"aria-label":`Page ${c}`,"aria-current":t===c?"page":void 0,children:c},c)),e.jsx("button",{onClick:a,disabled:t===s,className:"flex h-9 w-9 items-center justify-center rounded-md border border-border/70 glass glass-surface text-gray-700 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Next page",children:e.jsx(Kn,{className:"h-4 w-4"})})]})}const Pt=t=>typeof t=="string"?t:"",mo=t=>Array.isArray(t)?t.filter(s=>typeof s=="string"):[],Qt=({icon:t,title:s,children:n,isMobile:r})=>e.jsxs("div",{className:H("flex gap-4",r?"py-4":"py-5"),children:[e.jsx(t,{className:"h-5 w-5 flex-shrink-0 text-gray-700 mt-0.5"}),e.jsxs("div",{className:"min-w-0 space-y-1.5",children:[e.jsx("p",{className:H("font-semibold text-gray-900","text-sm"),children:s}),n]})]}),br=({policies:t,isMobile:s})=>{const n=mo(t.presetRules),r=Pt(t.customHouseRules)||(t.presetRules==null?Pt(t.houseRules):""),a=Pt(t.cancellationPolicy),l=Pt(t.securityNotes),c=Pt(t.noiseNotes),o=Pt(t.additionalPolicies),i=n.length>0,g=r.trim().length>0,j=i||g,m=[];j&&m.push(e.jsxs(Qt,{icon:bn,title:"House rules",isMobile:s,children:[i&&e.jsx("div",{className:H("grid grid-cols-2 gap-x-6 gap-y-2",s?"mt-1":"mt-2"),children:n.map(h=>{const y=na[h];if(!y)return null;const v=y.icon;return e.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-700",children:[e.jsx(v,{className:"h-4 w-4 flex-shrink-0"}),e.jsx("span",{children:y.label})]},h)})}),g&&e.jsx("p",{className:H("text-gray-600 whitespace-pre-line min-w-0 break-words",s?"text-xs":"text-sm",i&&"mt-3"),children:r})]},"house-rules"));const d=Ba(a);return m.push(e.jsxs(Qt,{icon:yn,title:d.shortLabel,isMobile:s,children:[e.jsx("p",{className:H("text-gray-600",s?"text-xs":"text-sm"),children:d.description}),t.requiresInsurance&&e.jsx("p",{className:H("text-gray-600",s?"text-xs":"text-sm"),children:"Certificate of insurance required for all bookings."})]},"cancellation")),l&&m.push(e.jsx(Qt,{icon:yn,title:"Security & insurance",isMobile:s,children:e.jsx("p",{className:H("text-gray-600 whitespace-pre-line min-w-0 break-words",s?"text-xs":"text-sm"),children:l})},"security")),c&&m.push(e.jsx(Qt,{icon:ra,title:"Noise guidelines",isMobile:s,children:e.jsx("p",{className:H("text-gray-600 whitespace-pre-line min-w-0 break-words",s?"text-xs":"text-sm"),children:c})},"noise")),o&&m.push(e.jsx(Qt,{icon:bn,title:"Additional policies",isMobile:s,children:e.jsx("p",{className:H("text-gray-600 whitespace-pre-line min-w-0 break-words",s?"text-xs":"text-sm"),children:o})},"additional")),e.jsxs("section",{className:"space-y-0",children:[e.jsx("h2",{className:H("font-semibold text-gray-900",s?"text-lg":"text-xl"),children:"House rules & policies"}),e.jsx("div",{children:m.map((h,y)=>e.jsxs(st.Fragment,{children:[h,y<m.length-1&&e.jsx(Ge,{})]},y))})]})};function xo(t){return t==="per_hour"?"/hr":t==="per_day"?"/day":"/event"}function ho(t,s){const n=typeof t=="number"?t:null,r=typeof s=="number"?s:null;return n!==null&&r!==null?`${n}–${r}`:n!==null?`${n}+`:r!==null?`Up to ${r}`:null}function Sn(t){const s=He(t.min)??"",n=t.max!==null&&t.max!==t.min?He(t.max):null;return n?`${s}–${n}`:s}function po(t){if(t.requiresCustomQuote===!0){const r=es(t);return r?r.max!==null&&r.max!==r.min?Sn(r):`Starting at ${He(r.min)}`:null}if(t.pricingMode==="self_service_range"){const r=He(Qn(t));return r?`Starting at ${r}`:null}const s=He(Yn(t));if(s)return s;const n=es(t);return n?Sn(n):null}function fo({pkg:t,isSelected:s,sliderExpanded:n,onSelect:r,onRequestQuote:a}){const l=t.requiresCustomQuote===!0,c=l?xo(t.priceUnit):t.priceType==="per_person"?"/person":t.priceType==="per_hour"?"/hr":t.priceType==="per_person_per_hour"?"/person/hr":"/event",o=po(t),i=ho(t.minAttendees,t.maxAttendees);return e.jsx("button",{type:"button",onClick:l?()=>a==null?void 0:a(t.id):r,className:H("relative border p-4 text-left transition-all w-full",n?"rounded-t-2xl rounded-b-none":"rounded-2xl",!l&&s?"border-brand bg-brand/5 shadow-sm":"border-border/70 bg-white hover:border-brand/50 hover:shadow-sm"),children:e.jsx("div",{className:"flex items-start justify-between min-w-0 gap-2",children:e.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h4",{className:"font-semibold text-gray-900 min-w-0 break-words",children:t.name}),t.includesVenueRental&&e.jsx(At,{variant:"secondary",className:"rounded-full text-[10px]",children:"Includes venue rental"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[i&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Attendees: ",i]}),o!==null&&e.jsx("span",{children:"•"})]}),o!==null&&e.jsxs("span",{className:"font-medium text-gray-900",children:[o,t.pricingMode==="self_service_range"?null:c]})]}),l&&e.jsx("span",{className:"inline-flex items-center text-xs font-semibold text-brand",children:"Request a Quote →"}),t.description&&e.jsx("p",{className:"text-xs text-gray-600 min-w-0 break-words whitespace-pre-line",children:t.description})]})})})}function go({min:t,max:s,step:n,value:r,onChange:a,formatValue:l,showTicks:c=!1}){const o=st.useRef(null),[i,g]=st.useState(null),j=i!==null,m=Math.max(s-t,1e-9),d=b=>{if(n>0){const x=Math.round((b-t)/n)*n+t;return Math.min(s,Math.max(t,x))}return Math.min(s,Math.max(t,b))},h=b=>{const x=o.current;if(!x)return r;const A=x.getBoundingClientRect(),D=Math.min(1,Math.max(0,(b-A.left)/A.width));return t+D*m},y=b=>{b.currentTarget.setPointerCapture(b.pointerId);const x=h(b.clientX);g(x),a(d(x))},v=b=>{if(i===null)return;const x=h(b.clientX);g(x),a(d(x))},p=b=>{g(null);try{b.currentTarget.releasePointerCapture(b.pointerId)}catch{}},k=b=>{const x=n>0?n:m/100;let A=r;if(b.key==="ArrowRight"||b.key==="ArrowUp")A=Math.min(s,r+x);else if(b.key==="ArrowLeft"||b.key==="ArrowDown")A=Math.max(t,r-x);else if(b.key==="Home")A=t;else if(b.key==="End")A=s;else return;b.preventDefault(),a(A)},I=i!==null?Math.min(s,Math.max(t,i)):r,C=Math.min(100,Math.max(0,(I-t)/m*100)),R=j?"":"motion-safe:transition-[left,width] motion-safe:duration-300 motion-safe:[transition-timing-function:cubic-bezier(0.34,1.56,0.64,1)]",N=n>0?Math.floor(m/n)+1:0,f=c&&N>2&&N<=40?Array.from({length:N-2},(b,x)=>t+(x+1)*n):[];return e.jsxs("div",{ref:o,role:"slider",tabIndex:0,"aria-valuemin":t,"aria-valuemax":s,"aria-valuenow":r,"aria-valuetext":l(r),onPointerDown:y,onPointerMove:v,onPointerUp:p,onKeyDown:k,className:"group relative flex h-10 cursor-pointer touch-none select-none items-center outline-none",children:[e.jsxs("div",{className:"relative h-1.5 w-full rounded-full bg-brand/15",children:[e.jsx("div",{className:H("absolute inset-y-0 left-0 rounded-full bg-brand",R),style:{width:`${C}%`}}),f.map(b=>{const x=(b-t)/m*100,A=r>=b-1e-9;return e.jsx("span",{className:H("absolute top-1/2 h-1 w-1 -translate-x-1/2 -translate-y-1/2 rounded-full",A?"bg-white/80":"bg-brand/30"),style:{left:`${x}%`}},b)})]}),e.jsxs("div",{className:H("absolute top-1/2 -translate-x-1/2 -translate-y-1/2",R),style:{left:`${C}%`},children:[e.jsx("div",{className:H("pointer-events-none absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-md bg-gray-900 px-2 py-0.5 text-[11px] font-semibold text-white shadow-sm","after:absolute after:left-1/2 after:top-full after:-translate-x-1/2 after:border-4 after:border-transparent after:border-t-gray-900 after:content-['']","motion-safe:transition-all motion-safe:duration-150",j?"scale-100 opacity-100":"scale-95 opacity-0 group-hover:scale-100 group-hover:opacity-100 group-focus-visible:scale-100 group-focus-visible:opacity-100"),children:l(r)}),e.jsx("div",{className:H("h-5 w-5 rounded-full border-2 border-brand bg-white shadow-md motion-safe:transition-transform motion-safe:duration-150","group-focus-visible:ring-2 group-focus-visible:ring-brand/40 group-focus-visible:ring-offset-1",j?"scale-110":"group-hover:scale-105")})]})]})}function bo({pkg:t,sliders:s,selections:n,onChange:r,twoModelBreakdown:a,servedDisplayLines:l}){const c=(m,d)=>{const h=n.find(y=>y.sliderId===m);return(h==null?void 0:h.value)??d.min},o=(m,d,h)=>{const y=Mn(d,h.min,h.max,h.stepSize),v=n.filter(p=>p.sliderId!==m).concat({sliderId:m,value:y});r(v)},i=s.some(m=>m.dimension==="price"),g=i?dr(s,n):null,j=i?g:Lr(l,t.id);return e.jsxs("div",{className:"space-y-4 rounded-b-2xl border border-t-0 border-brand bg-brand/5 p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Customize your package"}),e.jsx("p",{className:"text-base font-semibold text-gray-900","data-testid":"venue-slider-panel-amount",children:j!==null?Ee(j):"Priced at checkout"})]}),s.map(m=>{const d=c(m.id,m),h=Mn(d,m.min,m.max,m.stepSize),y=m.label||(m.dimension==="price"?"Amount":m.dimension==="quantity"?"Quantity":"Hours"),v=m.unit||(m.dimension==="price"||m.dimension==="quantity"?"":"hr"),p=C=>m.dimension==="price"?Ee(C):`${C}${v?" "+v:""}`,k=m.inputMode==="steps"&&!!m.stepSize&&m.stepSize>0,I=k?m.stepSize:m.stepSize??1;return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-baseline justify-between text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:y}),e.jsx(Fr,{label:y,value:h,min:m.min,max:m.max,stepSize:m.stepSize,format:p,onCommit:C=>o(m.id,C,m)})]}),e.jsx(go,{min:m.min,max:m.max,step:I,value:h,onChange:C=>o(m.id,C,m),formatValue:p,showTicks:k}),e.jsxs("div",{className:"flex justify-between text-[10px] text-muted-foreground tabular-nums",children:[e.jsx("span",{children:p(m.min)}),e.jsx("span",{children:p(m.max)})]})]},m.id)}),t.sliderPricingMode&&a&&a.model===t.sliderPricingMode?e.jsx("div",{className:"space-y-1 border-t border-brand/20 pt-3 text-xs text-gray-700",children:e.jsx(aa,{breakdown:a,namedLabel:oa(t.sliderPricingMode)})}):null]})}const yr=({packages:t,selectedPackageIds:s,onTogglePackage:n,isMobile:r,sliderSelections:a,onSliderSelectionsChange:l,twoModelBreakdown:c,servedDisplayLines:o,optional:i=!1,onRequestQuote:g})=>{if(t.length===0)return null;const j=t.filter(v=>s.includes(v.id)),m=j.find(v=>v.includesVenueRental)??null,d=j.some(v=>v.pricingMode==="self_service_range"),h=j.some(v=>v.priceType==="per_hour"||v.priceType==="per_person_per_hour"),y=j.some(v=>v.priceType==="per_person_per_hour");return e.jsxs("div",{className:H("space-y-3",!r&&"min-w-0"),children:[e.jsxs("h3",{className:"text-sm font-semibold text-gray-900",children:["Select a package",i&&e.jsx("span",{className:"font-normal text-muted-foreground",children:" (optional)"})]}),e.jsx("div",{className:H("space-y-3",!r&&"grid min-w-0 gap-3"),children:t.map(v=>{var C;const p=s.includes(v.id),k=v.requiresCustomQuote!==!0&&v.pricingMode==="self_service_range"&&(((C=v.sliders)==null?void 0:C.length)??0)>0,I=p&&k;return e.jsxs("div",{children:[e.jsx(fo,{pkg:v,isSelected:p,sliderExpanded:I,onSelect:()=>n(v.id),onRequestQuote:g}),I&&e.jsx(bo,{pkg:v,sliders:v.sliders,selections:a??[],onChange:l??(()=>{}),twoModelBreakdown:c,servedDisplayLines:o})]},v.id)})}),j.length>0?e.jsxs("div",{className:"rounded-2xl border border-border/70 bg-brand/10 p-3 text-xs text-brand space-y-1",children:[m&&e.jsxs("p",{children:[e.jsx("strong",{children:m.name})," includes venue rental and replaces hourly pricing."]}),d&&e.jsx("p",{children:"Adjust the sliders above to pick your amount. You'll check out at the selected price."}),h&&e.jsxs("p",{children:["Hourly package totals update with duration",y?" and guest count":"","."]})]}):null]})};function yo({rateLabel:t}){return e.jsx("div",{className:"rounded-2xl border border-amber-200 bg-amber-50/80 p-3",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ia,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-amber-600"}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-amber-900",children:"Overtime Is Post-Booking Only"}),e.jsx("p",{className:"text-xs leading-5 text-amber-800",children:"The booking total shown here only covers the scheduled time you book now. Overtime is never included upfront and can only be requested by the host after the booking if the event runs longer than scheduled."}),t&&e.jsxs("p",{className:"text-xs font-medium text-amber-900",children:["Posted overtime rate: ",t]})]})]})})}const jr="Service fee and tax shown at checkout.",_t=t=>Math.round(t*100)/100,Nr=t=>{const s=typeof t=="number"?t:typeof t=="string"?Number(t):NaN;return Number.isFinite(s)&&s>0?s:null};function tn(t){return!t||typeof t!="object"?!1:Nr(t.baseRate)!==null}function jo(t,s){const n=typeof s=="number"?s:Number(s),r=Number.isFinite(n)&&n>0?n:1;return t<r?{hours:r,uplifted:!0,minimumHours:r}:{hours:t,uplifted:!1,minimumHours:r}}function No(t){const s=Yn(t);if(s!==null)return s;const n=es(t);return n&&(n.max===null||n.max===n.min||t.pricingMode==="negotiable_range")?n.min:null}function Ks(t,s,n=0){if(t.pricingMode==="self_service_range")return null;const r=No(t);return r===null?null:t.priceType==="per_event"?_t(r):t.priceType==="per_hour"?_t(r*Math.max(n,0)):t.priceType==="per_person_per_hour"?_t(r*Math.max(s,1)*Math.max(n,0)):_t(r*s)}function wr(t,s,n,r){const a=[...t?[{pkg:t,isAddon:!1}]:[],...s.map(c=>({pkg:c,isAddon:!0}))],l=[];for(const{pkg:c,isAddon:o}of a){const i=Ks(c,n,r);if(i===null)return null;l.push({packageId:c.id??`${o?"addon":"rental"}-${l.length}`,packageName:c.name??"Package",amount:i,isAddon:o})}return l}function wo(t){const{metadata:s,calculatedHours:n,selectedVenueRentalPackage:r,selectedAddOnPackages:a,guestCount:l,authoritativePricing:c}=t,o=s.pricing??{},i=la(s.pricing),g=i.baseRate??void 0,j=o.minimumHours??void 0,m=i.cleaningFee??void 0,d=void 0,h=i.overtimeRate??void 0,{hours:y,uplifted:v}=jo(n,o.minimumHours),p=g!==void 0?_t(g*Math.max(y,1)):null,k=r?Ks(r,l,y):null,I=a.map(T=>Ks(T,l,y)),R=I.every(T=>T!==null)?_t(I.reduce((T,S)=>T+(S??0),0)):0,N=wr(r,a,l,y),f=m??0,b=!r&&tn(s.pricing),x=!b||p!==null,A=Nr(o.cleaningFee)===null||m!==void 0,E=x&&A&&N!==null?_t((b?p??0:0)+f+(k??0)+R):null,L=E!==null&&E>0?E:null,X=Or({authoritative:c,derivedSubtotal:L,derivedServiceFee:null,derivedTotal:null,notes:jr});return{baseRate:g,minimumHours:j,cleaningFee:m,securityDeposit:d,overtimeRate:h,estimatedSubtotal:L,estimatedCleaning:f,serviceFee:X.serviceFee,estimatedTotal:X.total,pricingBreakdown:X,hourlyRentalCost:p,venueRentalPackageCost:k,addOnPackagesCost:R,estimatedPackageLines:N,actualHours:y,minimumHoursApplied:v,derivedServiceFee:null,derivedTotal:null,advanceBookingModifier:(c==null?void 0:c.advanceBookingModifier)??null}}const Qs=({pricing:t,authoritativeDisplayBreakdown:s,selectedPackage:n,guestCount:r,transformedVenue:a,metadata:l,isMobile:c,variant:o="default",previewState:i,sliderSelections:g,taxStatus:j="calculated_at_checkout",taxJurisdictionCollected:m=!1})=>{var Le,Ke,fe,ve,ye,te,de;const d=n!=null&&n.includesVenueRental?n:null,h=(n==null?void 0:n.pricingMode)==="self_service_range"&&((Le=n.sliders)!=null&&Le.length)?dr(n.sliders,g??[]):null,y=h===null||h>0,v=o==="compact",p=o==="dialog",k="text-sm",I=c||p?"space-y-3":"rounded-2xl border border-border/70 bg-white p-6 shadow-sm";if((n==null?void 0:n.requiresCustomQuote)===!0){const B=(n==null?void 0:n.priceUnit)==="per_hour"?"per hour":(n==null?void 0:n.priceUnit)==="per_day"?"per day":"per event",V=He(((Ke=es(n))==null?void 0:Ke.min)??null),ge=e.jsxs("div",{className:H("min-w-0",c||o==="dialog"?"space-y-3":"space-y-3 text-sm"),children:[e.jsxs("div",{className:"flex flex-col gap-2 rounded-2xl border border-dashed border-border/70 py-6 px-4 text-center text-muted-foreground",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900",children:V!==null?`Starting at ${V} ${B}`:"Custom pricing"}),e.jsx("p",{className:"text-xs",children:"Message the host with your event details to get a quote. You won't be charged here."})]}),((fe=l.pricing)==null?void 0:fe.pricingNotes)&&e.jsx("div",{className:"mt-4 rounded-2xl bg-brand/10 p-3 text-xs text-brand min-w-0 break-words",children:l.pricing.pricingNotes})]});return o==="compact"||o==="dialog"?ge:e.jsx("div",{className:I,children:ge})}const R=s??null,N=R?R.cleaningFee:t.cleaningFee??null,f=R?R.baseRateTotal:d?null:t.hourlyRentalCost,b=R?R.baseRateHourly:t.baseRate??null,x=R?R.billableHours:t.actualHours,A=typeof x=="number"&&x>0?`${Fa(x)} × ${Ee(b)}`:null,D=(R==null?void 0:R.total)??t.pricingBreakdown.total,E=(i==null?void 0:i.status)==="success"&&i.taxStatus?i:null,L=(E==null?void 0:E.taxStatus)??j,X=(E==null?void 0:E.taxStatus)==="final"?E.taxAmountCents??0:0,T=(E==null?void 0:E.taxJurisdictionCollected)??m,S=R===null&&!t.pricingBreakdown.isAuthoritative,O=t.pricingBreakdown.subtotal??t.estimatedSubtotal,q=S?t.estimatedPackageLines!==void 0?t.estimatedPackageLines:wr(d,n&&!d?[n]:[],r,t.actualHours):null,_=b!==null&&f!==null&&f>0&&!d,se=N!=null&&N>0,U=B=>Math.round(B*100),me=(_?U(f??0):0)+(se?U(N??0):0)+((q==null?void 0:q.reduce((B,V)=>B+U(V.amount),0))??0),ee=S&&q!==null&&O!==null&&me===U(O),z=S&&O!==null&&!ee,oe=(R==null?void 0:R.displaySubtotal)??(z?null:O),W=R?R.packages:ee&&q!==null?q.map(B=>({packageId:B.packageId,packageName:B.packageName,amount:B.amount})):[],G=((ve=t.advanceBookingModifier)==null?void 0:ve.type)==="early_bird"?t.advanceBookingModifier:null,Y=(G==null?void 0:G.displayDiscountAmount)??0,ie=(R==null?void 0:R.serviceFee)??t.pricingBreakdown.serviceFee,K=t.pricingBreakdown.twoModelBreakdown??null,he=K?(K.customerTotalCents-K.processingFeeCents)/100:null,ae=K?K.processingFeeCents/100:null;if((n==null?void 0:n.pricingMode)==="self_service_range"&&(((ye=n.sliders)==null?void 0:ye.length)??0)>0&&!y){const B=e.jsxs("div",{className:H("min-w-0",c||p?"space-y-3":"space-y-3 text-sm"),children:[e.jsxs("div",{className:"flex flex-col items-center gap-2 rounded-2xl border border-dashed border-border/70 py-6 px-4 text-center text-muted-foreground",children:[e.jsx(ca,{className:"h-5 w-5 text-muted-foreground/50"}),e.jsx("p",{className:"text-sm",children:"Select a package amount above $0 to see your price breakdown."})]}),((te=l.pricing)==null?void 0:te.pricingNotes)&&e.jsx("div",{className:"mt-4 rounded-2xl bg-brand/10 p-3 text-xs text-brand min-w-0 break-words",children:l.pricing.pricingNotes})]});return v||p?B:e.jsx("div",{className:I,children:B})}const Be=e.jsxs("div",{className:H("min-w-0",c||p?"space-y-3":"space-y-3 text-sm"),children:[_?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{children:A?`Hourly Rate (${A})`:"Hourly Rate"}),e.jsx("span",{className:`font-medium text-gray-900 ${k}`,children:Ee(f)})]})}):null,!K&&W.length>0&&e.jsx(e.Fragment,{children:W.map(B=>{const V=B.timelineAdjustment&&B.guestBaseAmount!==void 0?$a(B.timelineAdjustment,B.guestBaseAmount,B.amount):null,ge=B.guestBaseAmount??B.amount;return e.jsxs("div",{className:"space-y-0.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"min-w-0",children:[B.packageName,B.isAddon&&e.jsx(At,{variant:"outline",className:"ml-2 rounded-full text-xs",children:"Add-on"})]}),e.jsx("span",{className:`font-medium text-gray-900 shrink-0 ${k}`,children:Ee(ge)})]}),V&&e.jsxs("div",{className:"flex justify-between text-xs text-green-700",children:[e.jsxs("span",{children:[V.label," (",V.pct>0?"+":"",V.pct,"%)"]}),e.jsx("span",{children:Ee(V.delta)})]})]},B.packageId)})}),se&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{children:"Cleaning fee"}),e.jsx("span",{className:`font-medium text-gray-900 ${k}`,children:Ee(N)})]}),G&&Y>0&&e.jsxs("div",{className:"flex items-center justify-between text-emerald-700",children:[e.jsxs("span",{children:["Early-bird discount",e.jsxs("span",{className:"ml-1 text-xs text-emerald-600/80",children:["(",G.discountPercent,"% · booked ",G.daysAheadActual," days ahead)"]})]}),e.jsxs("span",{className:`font-medium ${k}`,children:["−",Ee(Y)]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{children:K?K.moneyVersion===2&&K.model==="bar_tab"?"Bar subtotal":"Event budget":"Venue booking subtotal"}),e.jsx("span",{className:`font-medium text-gray-900 ${k}`,children:K?Ee(he??0):oe!==null?Ee(oe):"—"})]}),e.jsx(Ge,{}),t.overtimeRate!==void 0&&t.overtimeRate>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between text-muted-foreground",children:[e.jsx("span",{children:"Overtime rate (post-booking only)"}),e.jsx("span",{children:Ee(t.overtimeRate)??"—"})]}),e.jsx(yo,{rateLabel:Ee(t.overtimeRate)}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"If the event goes longer than the scheduled time, the host may submit a separate post-booking overtime request using this rate."})]}),(K==null?void 0:K.moneyVersion)===2?null:e.jsx(da,{taxStatus:L,taxAmountCents:X,taxJurisdictionCollected:T,className:"text-muted-foreground text-sm"}),K?ae!==null&&ae>0?e.jsxs("div",{className:"flex items-center justify-between text-muted-foreground text-sm",children:[e.jsx("span",{children:"PLEC service fee"}),e.jsx("span",{children:Ee(ae)})]}):null:e.jsx(ua,{serviceFeeCents:ie!==null?Math.round(ie*100):null,pendingLabel:"Calculated at checkout",className:"text-muted-foreground text-sm"}),e.jsx(Ge,{}),e.jsxs("div",{className:"flex items-center justify-between text-base font-semibold text-gray-900",children:[e.jsx("span",{children:(i==null?void 0:i.status)==="loading"?"Calculating...":t.pricingBreakdown.isAuthoritative||D===null?"Total":"Estimated total"}),e.jsx("span",{children:(i==null?void 0:i.status)==="loading"?e.jsx(Ss,{className:"h-4 w-4 animate-spin text-muted-foreground"}):D!==null?Ee(D):oe!==null||z?"Shown at checkout":"Request quote"})]}),(n==null?void 0:n.pricingMode)==="self_service_range"&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Price based on your slider selection — locked in at checkout."}),(i==null?void 0:i.status)==="error"&&i.refused&&i.error?e.jsx("p",{className:"text-xs text-amber-700",role:"alert","data-testid":"preview-refusal",children:i.error}):(i==null?void 0:i.status)==="error"?e.jsx("p",{className:"text-xs text-amber-700",children:"Live pricing unavailable — showing an estimate. Your exact total is confirmed at checkout."}):null,(i==null?void 0:i.status)!=="loading"&&(i==null?void 0:i.status)!=="error"&&!t.pricingBreakdown.isAuthoritative&&t.pricingBreakdown.notes&&e.jsx("p",{className:"text-xs text-muted-foreground min-w-0 break-words",children:t.pricingBreakdown.notes}),((de=l.pricing)==null?void 0:de.pricingNotes)&&e.jsx("div",{className:"mt-4 rounded-2xl bg-brand/10 p-3 text-xs text-brand min-w-0 break-words",children:l.pricing.pricingNotes})]});return v||p?Be:e.jsx("div",{className:I,children:Be})};function ts({guestCount:t,venueCapacityMin:s,venueCapacityMax:n,packageGuestMin:r,packageGuestMax:a}){return typeof s=="number"&&s>0&&t<s?{title:"Guest count too low",description:`This venue requires a minimum of ${s} guests.`}:typeof n=="number"&&n>0&&t>n?{title:"Guest count too high",description:`This venue has a maximum capacity of ${n} guests.`}:typeof r=="number"&&r>0&&t<r?{title:"Guest count too low for selected package",description:`The selected package requires a minimum of ${r} guests.`}:typeof a=="number"&&a>0&&t>a?{title:"Guest count too high for selected package",description:`The selected package allows a maximum of ${a} guests.`}:null}const vr=({venueCapacityMax:t,packageGuestMax:s,defaultMax:n=500})=>{const r=[n];return pn(t)&&r.push(t),pn(s)&&r.push(s),Math.min(...r)},Rr=(t,s)=>Math.max(1,Math.min(s,t)),Cr=t=>{const{enteredValue:s,adjustedValue:n,upperBound:r,limitLabel:a}=t;return s===n?null:s>r?`Adjusted to ${n} guests to match ${a}.`:s<1?"Guest count must be at least 1.":null};function In({onClick:t,loading:s=!1,acceptsInstantBookings:n=!0,text:r,loadingText:a,className:l="",disabled:c=!1,canAnimate:o=!0,validate:i,iconPath:g}){const j=u.useRef(null),m=u.useRef(null),d=u.useRef(null),h=u.useRef(null),y=u.useRef(null),v=u.useRef(null),p=u.useRef(null),k=u.useRef(null),I=u.useRef(null),C=u.useRef(null),R=u.useRef(!1),N=s?a??(n?"Adding...":"Submitting..."):r??(n?"Book now":"Request Venue");u.useEffect(()=>(h.current&&Kt.set(h.current,{y:-24,opacity:0}),v.current&&Kt.set(v.current,{opacity:0,scale:1}),d.current&&Kt.set(d.current,{force3D:!0}),m.current&&Kt.set(m.current,{force3D:!0}),()=>{var x;(x=C.current)==null||x.kill(),C.current=null,R.current=!1}),[]);const f=u.useCallback(()=>{if(R.current||s||c)return;if(i&&!i()){t();return}if(!o){t();return}R.current=!0;const x=j.current;x&&(x.dataset.adding="true");const A=y.current,D=d.current;if(!A||!D){t(),R.current=!1;return}const E=A.getBoundingClientRect(),L=D.getBoundingClientRect(),X={x:E.left-L.left},T=h.current,S=m.current,O=k.current,q=p.current,_=I.current,se=v.current;if(!T||!S||!O||!q||!_||!se){t(),R.current=!1,x&&(x.dataset.adding="false");return}const U=Kt.timeline({defaults:{duration:.2,ease:"power2.out"},onComplete:()=>{R.current=!1,x&&(x.dataset.adding="false"),C.current=null,requestAnimationFrame(()=>{t()})}});C.current=U,U.to(D,{x:X.x,duration:.18}).to(D,{rotate:-20,yoyo:!0,repeat:1,duration:.09},0).to(S,{opacity:0,x:X.x,duration:.15,filter:"blur(8px)"},0).to(T,{y:0,duration:.12,delay:.08}).to(O,{opacity:1,duration:.12},"<").set(q,{opacity:0}).to(D,{x:X.x*4,duration:.4,delay:.08}).to(D,{rotate:-30,duration:.12},"<").to(_,{opacity:1,duration:.18},"<").to(se,{opacity:1,scale:1.3,duration:.2},"<").set(S,{x:0,xPercent:0}).set(D,{opacity:0,x:0,rotate:0}).set(T,{y:-24}).set(se,{opacity:0,scale:1}).to([O,_],{opacity:0,duration:.3,delay:.1}).to(S,{xPercent:0,opacity:1,duration:.15}).set(S,{filter:"blur(0px)"}).set(D,{opacity:1,x:0},"<").to(q,{opacity:1,duration:.5,ease:"power2.in"})},[s,c,t,o,i]),b=s||c;return e.jsx("div",{className:`atc-wrapper ${l}`.trim(),children:e.jsxs("button",{ref:j,className:"atc","aria-label":N,onClick:f,disabled:b,"data-adding":"false",children:[e.jsxs("span",{className:"atc__content",children:[e.jsx("span",{ref:d,className:"atc__cart",children:e.jsx("svg",{className:"atc__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"#ffffff",d:g??"M2.25 2.25a.75.75 0 0 0 0 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 0 0-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 0 0 0-1.5H5.378A2.25 2.25 0 0 1 7.5 15h11.218a.75.75 0 0 0 .674-.421 60.358 60.358 0 0 0 2.96-7.228.75.75 0 0 0-.525-.965A60.864 60.864 0 0 0 5.68 4.509l-.232-.867A1.875 1.875 0 0 0 3.636 2.25H2.25ZM3.75 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM16.5 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"})})}),e.jsx("span",{ref:y,className:"atc__cart--dummy",children:e.jsx("svg",{className:"atc__icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"#ffffff",d:g??"M2.25 2.25a.75.75 0 0 0 0 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 0 0-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 0 0 0-1.5H5.378A2.25 2.25 0 0 1 7.5 15h11.218a.75.75 0 0 0 .674-.421 60.358 60.358 0 0 0 2.96-7.228.75.75 0 0 0-.525-.965A60.864 60.864 0 0 0 5.68 4.509l-.232-.867A1.875 1.875 0 0 0 3.636 2.25H2.25ZM3.75 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM16.5 20.25a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z"})})}),e.jsx("span",{ref:v,className:"atc__check",children:e.jsx("svg",{className:"atc__icon",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"#ffffff",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})})}),e.jsx("span",{ref:m,className:"atc__text",children:N})]}),e.jsx("span",{ref:p,className:"atc__border atc__border--animated"}),e.jsx("span",{ref:k,className:"atc__border atc__border--static"}),e.jsx("span",{ref:I,className:"atc__border atc__border--complete"}),e.jsx("svg",{ref:h,className:"atc__item",style:{position:"absolute",left:"50%",top:"50%",width:"16px",height:"16px",transform:"translate(-50%, -50%)",opacity:0,pointerEvents:"none",zIndex:10},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("rect",{width:"16",height:"16",rx:"2",fill:"#ffffff",x:"4",y:"4"})})]})})}const vo=2,Ro=t=>{const{user:s}=Ms(),n=t.trim(),r=n.length>=vo&&!!s,{data:a}=Jn({queryKey:["orgSuggestions",(s==null?void 0:s.publicId)||(s==null?void 0:s.id),n],queryFn:async()=>{var o;const l=`/organizations/suggest?q=${encodeURIComponent(n)}`;if((s==null?void 0:s.authType)==="jwt")return((o=(await ma.get(l)).data)==null?void 0:o.suggestions)??[];const c=await xa(l);return(c==null?void 0:c.suggestions)??[]},enabled:r,staleTime:6e4,refetchOnWindowFocus:!1});return{suggestions:a??[]}};function Ys(t,s="per hour"){const n=t==null?void 0:t.trim();return n?n.replace(/_/g," "):s}function Tr(t){if(t.detailsReady){if(t.previewStatus==="loading")return{kind:"loading"};const r=He(t.estimatedTotal);if(t.estimatedTotal!==null&&r!==null)return{kind:"total",text:r};const a=He(t.estimatedSubtotal??null);if(a!==null)return{kind:"subtotal",text:a,note:jr}}const s=He(t.baseRate??null);if(s!==null&&(t.baseRate??0)>0)return{kind:"from",text:s,unit:Ys(t.priceUnit)};const n=t.startingPrice?He(t.startingPrice.displayPrice):null;return t.startingPrice&&n!==null&&t.startingPrice.displayPrice>0?{kind:"starting",text:n,unit:Ys(t.startingPrice.priceType)}:{kind:"none"}}const Co=({pricing:t,selectedPackage:s,selectedPackages:n,transformedVenue:r,eventDate:a,setEventDate:l,startTime:c,setStartTime:o,endTime:i,setEndTime:g,guestCount:j,setGuestCount:m,durationHours:d,durationMinutes:h,setDurationMinutes:y,schedule:v,blockedDates:p=[],bookingWindowDays:k,minimumLeadTimeHours:I,startTimeOptions:C=[],endTimeOptions:R=[],startTimeMinTime:N,startTimeMaxTime:f,endTimeMinTime:b,endTimeMaxTime:x,venueTimeZone:A,onAddToCart:D,onClearPackages:E,onRequestQuote:L,cartLoading:X,acceptsInstantBookings:T=!0,validateBeforeAnimate:S,specialRequests:O,setSpecialRequests:q,contactOrg:_,setContactOrg:se,requireOrganizationName:U=!1,contactPhone:me,setContactPhone:ee,bookingDisabled:z=!1,bookingDisabledMessage:oe,venueCapacityMin:W,venueCapacityMax:G,packageGuestMin:Y,packageGuestMax:ie,hasSelections:K=!1,previewState:he,plannerHighlights:ae,sliderSelections:Be,avgRating:Le,totalReviews:Ke,breakdownProps:fe})=>{var _e;const ve=Ha(),ye=n??(s?[s]:[]),te=Ts(ye,Be??[]),{suggestions:de}=Ro(_??""),B=(s==null?void 0:s.requiresCustomQuote)===!0,V=ye.some(F=>F.priceType==="per_hour"||F.priceType==="per_person_per_hour"),ge=ye.some(F=>F.priceType==="per_person"||F.priceType==="per_person_per_hour"),Se=ye.some(F=>F.priceType==="per_person_per_hour"),Fe=u.useMemo(()=>!!(a&&c&&i&&j>=1),[a,c,i,j]),le=u.useMemo(()=>ts({guestCount:j,venueCapacityMin:W??void 0,venueCapacityMax:G??void 0,packageGuestMin:Y??void 0,packageGuestMax:ie??void 0}),[j,W,G,Y,ie]),Qe=u.useMemo(()=>{if(!c||!i||!a)return null;try{const{startDateTime:F,endDateTime:Ne}=Lt(a,c,i),$e=new Date(F),tt=new Date(Ne);if(isNaN($e.getTime())||isNaN(tt.getTime()))return null;if(tt<=$e)return{title:"Invalid time range",description:"End time must be after start time."}}catch{return null}return null},[c,i,a]),xe=u.useMemo(()=>!a||!c||!i?!1:Lt(a,c,i).spansNextDay,[a,c,i]),dt=u.useMemo(()=>ar(A),[A]),ce=u.useMemo(()=>vr({venueCapacityMax:G,packageGuestMax:ie}),[G,ie]),Ye=u.useMemo(()=>{const F=typeof G=="number"&&Number.isFinite(G)&&G>0,Ne=typeof ie=="number"&&Number.isFinite(ie)&&ie>0;return F&&Ne?"venue and selected package guest limits":Ne?"selected package guest limit":F?"venue guest limit":"guest limits"},[G,ie]),Re=u.useMemo(()=>or({schedule:v,blockedDates:p??[],bookingWindowDays:k,minimumLeadTimeHours:I}),[v,p,k,I]),{minDate:ut,maxDate:mt,disabledDates:xt}=Re,ht=t.hasBaseRate??(typeof t.baseRate=="number"&&t.baseRate>0),je=Dn({eventDate:a,startTime:c,durationMinutes:h,guestCount:j,guestMin:W??1,guestMax:G??9999,requiresEventLocation:!1,hasVerifiedEventLocation:!1,requiresPackageSelection:!ht,packageSelected:!!s||((n==null?void 0:n.length)??0)>0}),[Je,Ae]=u.useState(j.toString()),[Ze,nt]=u.useState(()=>j===20),[Ce,Xe]=u.useState(null);u.useEffect(()=>{Ae(j.toString())},[j]);const Te=F=>{nt(!1),Ae(F.target.value)},pe=()=>{const F=parseInt(Je,10);if(!isNaN(F)&&F>0){nt(!1);const Ne=Rr(F,ce);m(Ne),Ae(Ne.toString()),Xe(Cr({enteredValue:F,adjustedValue:Ne,upperBound:ce,limitLabel:Ye}))}else Ae(j.toString()),Xe("Guest count must be at least 1.")},it=F=>{F.key==="Enter"&&(F.currentTarget.blur(),pe())},et=()=>e.jsxs("div",{className:"mt-5",children:[e.jsxs("div",{children:[e.jsx("p",{className:"mb-1 text-[10px] font-bold uppercase tracking-wide text-gray-900",children:"DATE"}),e.jsx(en,{value:a?(()=>{const[F,Ne,$e]=a.split("-").map(Number);return new Date(F,Ne-1,$e)})():null,onChange:F=>{l(F?Is(F,"yyyy-MM-dd"):"")},placeholder:"Select date",minDate:ut,maxDate:mt,disabledDates:xt,plannerHighlights:ae})]}),e.jsx("div",{className:"mt-3",children:e.jsx($r,{startTime:c,endTime:i,onStartChange:o,onEndChange:g,startLabel:"START TIME",endLabel:"END TIME",startOptions:C,endOptions:R,startMinTime:N,startMaxTime:f,endMinTime:b,endMaxTime:x,startDisabled:!a,endDisabled:!c,endSpansNextDay:xe,timezoneLabel:dt,labelClassName:"text-[10px] font-bold uppercase tracking-wide text-gray-900"})}),e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"mb-1 text-[10px] font-bold uppercase tracking-wide text-gray-900",children:"GUESTS"}),e.jsx("div",{className:"relative",children:e.jsx(ot,{type:"number",min:1,max:ce,value:Je,onChange:Te,onBlur:pe,onKeyDown:it,onInvalid:F=>{F.preventDefault()},className:H("h-11 rounded-lg [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none [-moz-appearance:textfield]",Ze&&"text-gray-400")})}),ce<500&&e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Up to ",ce," guests for this booking."]}),Ce&&e.jsx("p",{className:"mt-1 text-xs text-amber-700",children:Ce}),le&&e.jsx("p",{className:"mt-1 text-sm font-medium text-destructive",children:le.description})]}),se&&e.jsxs("div",{className:"mt-3",children:[e.jsxs("p",{className:"mb-1 text-[10px] font-bold uppercase tracking-wide text-gray-900",children:["ORGANIZATION",U?" *":""]}),e.jsx(ot,{type:"text",value:_??"",onChange:F=>se(F.target.value),placeholder:"e.g. Vietnamese Student Association",className:"h-11 rounded-lg",list:"venue-booking-org-suggestions",autoComplete:"off"}),e.jsx("datalist",{id:"venue-booking-org-suggestions",children:de.map(F=>e.jsx("option",{value:F},F))}),U&&!(_??"").trim()&&e.jsx("p",{className:"mt-1 text-xs font-medium text-destructive",children:"This host requires an organization name to book."})]}),ee&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"mb-1 text-[10px] font-bold uppercase tracking-wide text-gray-900",children:"CONTACT PHONE"}),e.jsx(ot,{type:"tel",value:me??"",onChange:F=>ee(F.target.value),placeholder:"(281) 691-1585",className:"h-11 rounded-lg"})]})]}),pt=H("flex h-8 items-center text-2xl font-semibold text-gray-900 transition-opacity duration-200",(he==null?void 0:he.isRefreshing)&&"opacity-40"),Oe=e.jsxs("div",{className:H("rounded-2xl transition-colors",K&&"border border-amber-300 bg-amber-50 px-4 py-3"),children:[e.jsxs("p",{className:"flex items-center gap-2 text-xl font-semibold text-gray-900",children:[e.jsx(ur,{className:H("h-5 w-5 shrink-0",K?"text-amber-600":"text-muted-foreground")}),"Add your event details"]}),e.jsx("p",{className:H("mt-1 text-xs",K?"text-amber-800":"text-muted-foreground"),children:"Pick a date and time to see your full price."})]}),ke=Tr({detailsReady:Fe,previewStatus:he==null?void 0:he.status,estimatedTotal:t.estimatedTotal,estimatedSubtotal:t.estimatedSubtotal??null,baseRate:s?null:t.baseRate??null,priceUnit:r.priceUnit}),vt=ke.kind==="subtotal"?"subtotal":ke.kind==="from"?ke.unit:s?"Package":ke.kind==="total"?"estimated total":Ys(r.priceUnit),lt=e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsx("span",{className:pt,children:ke.kind==="loading"?e.jsx(Ss,{className:"h-5 w-5 animate-spin text-muted-foreground"}):ke.kind==="none"?s?"Priced at checkout":"Request quote":ke.text}),e.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:vt})]}),ke.kind==="subtotal"&&e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:ke.note})]}),ft=B?He(((_e=es(s))==null?void 0:_e.min)??null):null,De=e.jsx(Da,{initial:!1,children:fe&&Fe&&!B&&e.jsx(Pa.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:he!=null&&he.isRefreshing?.4:1},exit:{height:0,opacity:0},transition:{duration:ve?0:.2,ease:"easeOut"},className:"overflow-hidden",children:e.jsxs("div",{className:"mt-5",children:[e.jsx(Ge,{className:"mb-4"}),e.jsx(Qs,{pricing:fe.fullPricing,authoritativeDisplayBreakdown:fe.authoritativeDisplayBreakdown,selectedPackage:s,guestCount:j,transformedVenue:{priceUnit:r.priceUnit},listingCategory:fe.listingCategory,metadata:fe.metadata,isMobile:!1,variant:"compact",previewState:he,sliderSelections:Be,taxJurisdictionCollected:fe.taxJurisdictionCollected})]})},"breakdown")});return e.jsx("div",{className:"rounded-2xl border border-border/70 bg-white p-6 shadow-sm",children:s!==null?e.jsxs(e.Fragment,{children:[B?ft!==null?e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("span",{className:pt,children:["Starting at ",ft]}),e.jsx("span",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:s.priceUnit==="per_hour"?"per hour":s.priceUnit==="per_day"?"per day":"per event"})]}):null:Fe?lt:Oe,e.jsx("div",{className:"mt-2",children:n&&n.length>1?e.jsx("ul",{className:"space-y-1",children:n.map(F=>e.jsx("li",{className:"text-sm font-medium text-gray-900",children:F.name},F.id))}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"font-medium text-gray-900",children:s.name}),s.description&&e.jsx("p",{className:"min-w-0 break-words text-xs text-muted-foreground",children:s.description})]})}),et(),(V||ge)&&e.jsxs("div",{className:"mt-3 rounded-2xl bg-brand/10 p-3 text-xs text-brand",children:[e.jsx("p",{className:"font-medium",children:"Package pricing"}),e.jsx("p",{className:"mt-1",children:Se?"This package is priced per person per hour. The total updates with duration and guest count.":V?"This package is priced per hour. The total updates with duration.":"This package is priced per person. The total updates with guest count."})]}),!T&&q&&e.jsxs("div",{className:"mt-4 grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Message to host (optional)"}),e.jsx(ws,{value:O??"",onChange:F=>q(F.target.value),placeholder:"Tell the host about your event, purpose, or any special requests...",className:"min-h-[80px] resize-none rounded-lg",maxLength:500})]}),De,B?e.jsx(ue,{className:"mt-6 w-full rounded-full py-6 text-base font-semibold",onClick:()=>s&&(L==null?void 0:L(s.id)),disabled:z,children:"Request a Quote"}):e.jsx(In,{className:"mt-6",onClick:D,loading:X,acceptsInstantBookings:T,canAnimate:!!(a&&c&&h>0),validate:S,text:T?"Reserve":"Request booking",loadingText:T?"Reserving...":"Submitting...",iconPath:T?void 0:"M3.478 2.405a.75.75 0 0 0-.926.94l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.405Z",disabled:z||!je.isValid||!!le||!!Qe||!te||U&&!(_??"").trim()}),B&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:"The host will send a custom quote based on your details. You won't be charged yet."}),!B&&T&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:"You won't be charged yet."}),!B&&!te&&e.jsx("p",{className:"mt-2 text-center text-xs text-amber-700",children:"Set your package amount above $0 to continue."}),!B&&(te&&!je.isValid&&je.nextMissingRequirement?!T&&je.nextMissingRequirement==="Pick a date for your event."?e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:"This is a booking request, you won't be charged yet."}):e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:je.nextMissingRequirement}):null),z&&oe&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:oe})," ",E&&e.jsx("button",{type:"button",onClick:E,className:"mt-3 w-full text-center text-xs text-muted-foreground hover:text-gray-900 hover:underline",children:"Clear package selection"})]}):e.jsxs(e.Fragment,{children:[Fe?lt:Oe,et(),(V||ge)&&e.jsxs("div",{className:"mt-3 rounded-2xl bg-brand/10 p-3 text-xs text-brand",children:[e.jsx("p",{className:"font-medium",children:"Package pricing"}),e.jsx("p",{className:"mt-1",children:Se?"This package is priced per person per hour. The total updates with duration and guest count.":V?"This package is priced per hour. The total updates with duration.":"This package is priced per person. The total updates with guest count."})]}),!T&&q&&e.jsxs("div",{className:"mt-4 grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Message to host (optional)"}),e.jsx(ws,{value:O??"",onChange:F=>q(F.target.value),placeholder:"Tell the host about your event, purpose, or any special requests...",className:"min-h-[80px] resize-none rounded-lg",maxLength:500})]}),De,e.jsx(In,{className:"mt-6",onClick:D,loading:X,acceptsInstantBookings:T,canAnimate:!!(a&&c&&h>0),validate:S,text:T?"Reserve":"Request booking",loadingText:T?"Reserving...":"Submitting...",iconPath:T?void 0:"M3.478 2.405a.75.75 0 0 0-.926.94l2.432 7.905H13.5a.75.75 0 0 1 0 1.5H4.984l-2.432 7.905a.75.75 0 0 0 .926.94 60.519 60.519 0 0 0 18.445-8.986.75.75 0 0 0 0-1.218A60.517 60.517 0 0 0 3.478 2.405Z",disabled:z||!je.isValid||!!le||!!Qe||!te||U&&!(_??"").trim()}),T&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:"You won't be charged yet."}),!te&&e.jsx("p",{className:"mt-2 text-center text-xs text-amber-700",children:"Set your package amount above $0 to continue."}),te&&!je.isValid&&je.nextMissingRequirement?!T&&je.nextMissingRequirement==="Pick a date for your event."?e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:"This is a booking request, you won't be charged yet."}):e.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:je.nextMissingRequirement}):null,z&&oe&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:oe})]})})},To=({transformedVenue:t,metadata:s,calculatedHours:n,selectedVenueRentalPackage:r,selectedAddOnPackages:a,guestCount:l,authoritativePricing:c,eventDate:o})=>u.useMemo(()=>{const i=wo({metadata:s,calculatedHours:n,selectedVenueRentalPackage:r,selectedAddOnPackages:a,guestCount:l,authoritativePricing:c});return{baseRate:i.baseRate,minimumHours:i.minimumHours,cleaningFee:i.cleaningFee,securityDeposit:i.securityDeposit,overtimeRate:i.overtimeRate,estimatedSubtotal:i.estimatedSubtotal,estimatedPackageLines:i.estimatedPackageLines,estimatedCleaning:i.estimatedCleaning,serviceFee:i.serviceFee,estimatedTotal:i.estimatedTotal,pricingBreakdown:i.pricingBreakdown,hourlyRentalCost:i.hourlyRentalCost,venueRentalPackageCost:i.venueRentalPackageCost,addOnPackagesCost:i.addOnPackagesCost,actualHours:i.actualHours,minimumHoursApplied:i.minimumHoursApplied,advanceBookingModifier:i.advanceBookingModifier}},[n,s.category,s.pricing,t==null?void 0:t.category,t==null?void 0:t.baseRate,r,a,l,c,o]);function ko(t){const s=typeof t.total=="number"?t.total:0,n=typeof t.serviceFee=="number"?t.serviceFee:0,r=typeof t.subtotal=="number"?t.subtotal:Math.max(0,s-n);return{subtotalCents:Math.round(r*100),stripeProcessingFeeCents:0,taxAmountCents:0,serviceFeeCents:Math.round(n*100),taxStatus:"calculated_at_checkout",taxJurisdictionCollected:!1,totalCents:Math.round(s*100),feeWaivedCents:0}}function sn(t){return t.status!=="success"?null:t.displayBreakdown??null}function Mo({listing:t,transformedVenue:s,metadata:n,calculatedHours:r,selectedPackages:a,guestCount:l,eventDate:c,startTime:o,endTime:i,previewState:g,selectedAddOns:j}){const m=u.useMemo(()=>a.find(C=>C.includesVenueRental&&C.requiresCustomQuote!==!0)??null,[a]),d=u.useMemo(()=>a.filter(C=>!C.includesVenueRental&&C.requiresCustomQuote!==!0),[a]),h=u.useMemo(()=>g.status==="success"&&typeof g.total=="number"?{subtotal:g.subtotal,serviceFee:g.serviceFee,total:g.total,advanceBookingModifier:g.advanceBookingModifier??null,twoModelBreakdown:g.twoModelBreakdown??null}:null,[g]),y=To({transformedVenue:s,metadata:n,calculatedHours:r,selectedVenueRentalPackage:m,selectedAddOnPackages:d,guestCount:l,authoritativePricing:h,eventDate:c}),v=u.useMemo(()=>sn(g),[g]),p=u.useMemo(()=>{if(!y.pricingBreakdown.isAuthoritative||y.pricingBreakdown.total==null||!(t!=null&&t.listingId)||!s)return null;const{startDateTime:C,endDateTime:R}=Lt(c,o,i);return Ta({listingId:t.listingId,listingTitle:s.name,total:y.pricingBreakdown.total,serviceFee:y.pricingBreakdown.serviceFee??void 0,...v?{displayBreakdown:v}:{}},ko(y.pricingBreakdown))},[y.pricingBreakdown,t==null?void 0:t.listingId,s,c,o,i,l,r,v]);return{pricing:((j==null?void 0:j.length)??0)>0&&!y.pricingBreakdown.isAuthoritative?{...y,estimatedSubtotal:null,estimatedPackageLines:null}:y,authoritativeVenueDisplayBreakdown:p}}const So=({listing:t,transformedVenue:s,metadata:n,address:r,description:a,galleryImages:l,galleryVideos:c=[],amenityValues:o,subTypes:i,highlights:g,capacityLabel:j,availability:m,schedule:d,blockedDates:h=[],bookingWindowDays:y,minimumLeadTimeHours:v,packages:p,selectedPackageId:k,selectedPackageIds:I,selectedPackage:C,selectedPackages:R,onSelectPackage:N,onTogglePackage:f,addOns:b,selectedAddOns:x,onToggleAddOn:A,onSetAddOnQuantity:D,venueStartingPrice:E,pricing:L,authoritativeVenueDisplayBreakdown:X,reviews:T,listingId:S,avgRating:O,totalReviews:q,hostProfile:_,hostPhoto:se,isSaved:U,savingVenue:me,onSaveVenue:ee,eventDate:z,setEventDate:oe,startTime:W,setStartTime:G,endTime:Y,setEndTime:ie,guestCount:K,setGuestCount:he,durationHours:ae,durationMinutes:Be,startTimeOptions:Le=[],endTimeOptions:Ke=[],startTimeMinTime:fe,startTimeMaxTime:ve,endTimeMinTime:ye,endTimeMaxTime:te,onAddToCart:de,cartLoading:B,validateBeforeAnimate:V,isPricingBreakdownOpen:ge,setIsPricingBreakdownOpen:Se,isBookingDetailsOpen:Fe,setIsBookingDetailsOpen:le,onShareClick:Qe,acceptsInstantBookings:xe=!0,onMessageHost:dt,onRequestCustomQuote:ce,onRequestPackageQuote:Ye,specialRequests:Re,setSpecialRequests:ut,contactOrg:mt,setContactOrg:xt,requireOrganizationName:ht,contactPhone:je,setContactPhone:Je,bookingDisabled:Ae=!1,bookingDisabledMessage:Ze,venueCapacityMin:nt,venueCapacityMax:Ce,packageGuestMin:Xe,packageGuestMax:Te,previewState:pe,plannerCalendarHighlights:it,sliderSelections:et,onSliderSelectionsChange:pt})=>{var as,at,zt,os,is,ls,qt,cs,ds,Ht,Vt,us,ms,xs,hs;const Oe=ss(),ke=lr(t,cr(t)),vt=rr(t),{onPhotoViewed:lt}=Pn(t.listingId),[ft,De]=u.useState(!1),_e=u.useRef(null),F=u.useRef(null),Ne=u.useMemo(()=>or({schedule:d,blockedDates:h,bookingWindowDays:y,minimumLeadTimeHours:v}),[d,h,y,v]),{minDate:$e,maxDate:tt,disabledDates:Pe}=Ne,Ft=typeof(m==null?void 0:m.timezone)=="string"?m.timezone:void 0,Ot=u.useMemo(()=>ar(Ft),[Ft]),Ue=O!=null?O.toFixed(1):null,ze=q??T.length;u.useEffect(()=>{const M=F.current;if(!M)return;const $=re=>{re.stopPropagation()};return M.addEventListener("click",$,!0),M.addEventListener("mousedown",$,!0),M.addEventListener("touchstart",$,!0),()=>{M.removeEventListener("click",$,!0),M.removeEventListener("mousedown",$,!0),M.removeEventListener("touchstart",$,!0)}},[Ue]);const qe=z&&W&&Y&&K>0,rt=I.length>0||x.length>0,ne=e.jsxs("div",{className:H("rounded-2xl border px-4 py-4",rt?"border-amber-300 bg-amber-50":"border-dashed border-border/70"),children:[e.jsxs("p",{className:"flex items-center gap-2 text-base font-semibold text-gray-900",children:[e.jsx(ur,{className:H("h-5 w-5 shrink-0",rt?"text-amber-600":"text-muted-foreground")}),"Add your event details"]}),e.jsx("p",{className:H("mt-1 text-xs",rt?"text-amber-800":"text-muted-foreground"),children:"Pick a date and time to see your full price."}),e.jsx(ue,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>le(!0),children:"Add date & time"})]}),ct=R??(C?[C]:[]),Rt=Ts(ct,et??[]),Ct=(R??(C?[C]:[])).some(M=>M.requiresCustomQuote===!0),Tt=ct.some(M=>M.priceType==="per_hour"||M.priceType==="per_person_per_hour"),kt=ct.some(M=>M.priceType==="per_person"||M.priceType==="per_person_per_hour"),$t=ct.some(M=>M.priceType==="per_person_per_hour"),gt=u.useMemo(()=>ts({guestCount:K,venueCapacityMin:nt??void 0,venueCapacityMax:Ce??void 0,packageGuestMin:Xe??void 0,packageGuestMax:Te??void 0}),[K,nt,Ce,Xe,Te]),Q=u.useMemo(()=>vr({venueCapacityMax:Ce,packageGuestMax:Te}),[Ce,Te]),Me=u.useMemo(()=>{const M=typeof Ce=="number"&&Number.isFinite(Ce)&&Ce>0,$=typeof Te=="number"&&Number.isFinite(Te)&&Te>0;return M&&$?"venue and selected package guest limits":$?"selected package guest limit":M?"venue guest limit":"guest limits"},[Ce,Te]),[bt,yt]=u.useState(null),Ut=tn(n.pricing),Ie=Tr({detailsReady:qe,previewStatus:pe==null?void 0:pe.status,estimatedTotal:L.estimatedTotal,estimatedSubtotal:L.estimatedSubtotal,baseRate:C?null:L.baseRate,priceUnit:s.priceUnit,startingPrice:E??null}),As=Dn({eventDate:z,startTime:W,durationMinutes:Be,guestCount:K,guestMin:nt??1,guestMax:Ce??9999,requiresEventLocation:!1,hasVerifiedEventLocation:!1,requiresPackageSelection:!Ut,packageSelected:((R==null?void 0:R.length)??0)>0||C!=null}),_s=u.useMemo(()=>{if(!W||!Y||!z)return null;try{const{startDateTime:M,endDateTime:$}=Lt(z,W,Y),re=new Date(M),we=new Date($);if(isNaN(re.getTime())||isNaN(we.getTime()))return null;if(we<=re)return{title:"Invalid time range",description:"End time must be after start time."}}catch{return null}return null},[W,Y,z]),Es=u.useMemo(()=>!z||!W||!Y?!1:Lt(z,W,Y).spansNextDay,[z,W,Y]),ns=(as=n==null?void 0:n.policies)==null?void 0:as.cancellationPolicy,rs=ns?La(ns):!1;return u.useEffect(()=>{let M,$;const re=()=>{const we=_e.current;if(!we){$=setTimeout(re,100);return}const Ve=()=>{De(we.scrollTop>100)};Ve(),we.addEventListener("scroll",Ve,{passive:!0}),M=()=>we.removeEventListener("scroll",Ve)};return re(),()=>{$&&clearTimeout($),M&&M()}},[]),e.jsxs("div",{className:"flex flex-col min-h-screen",children:[e.jsx("div",{className:H("fixed top-0 left-0 right-0 z-[100] bg-white border-b transition-all duration-300",ft?"translate-y-0 opacity-100 shadow-sm pointer-events-auto":"-translate-y-full opacity-0 pointer-events-none"),children:e.jsxs("div",{className:"px-4 py-3 flex items-center justify-between",children:[e.jsx(ue,{variant:"ghost",size:"icon",className:"h-11 w-11 hover:bg-gray-100",onClick:()=>typeof window<"u"&&window.history.length>1?Oe(-1):Oe("/venues"),children:e.jsx(jn,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[(_==null?void 0:_.publicId)&&e.jsx(ue,{variant:"ghost",size:"icon",className:"h-11 w-11 hover:bg-gray-100 p-0",asChild:!0,children:e.jsx("a",{href:`/u/${_.publicId}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center","aria-label":"View host profile",children:e.jsx(Rs,{src:se||void 0,alt:"Host avatar",className:"h-8 w-8 rounded-full object-cover border border-gray-200",fallback:"/default-profile-icon.png"})})}),e.jsx(ue,{variant:"ghost",size:"icon",className:"h-11 w-11 hover:bg-gray-100",onClick:Qe,children:e.jsx(Nn,{className:"h-5 w-5"})}),ee!=null&&e.jsx(ue,{variant:"ghost",size:"icon",className:H("h-11 w-11 hover:bg-gray-100",U&&"text-brand"),onClick:ee,disabled:me,children:e.jsx(Us,{className:H("h-5 w-5",U&&"fill-current")})})]})]})}),e.jsxs("div",{className:"fixed top-0 left-0 right-0 z-30 px-4 pt-4 pb-2 flex items-center justify-between",children:[e.jsx(ue,{variant:"glass",size:"icon",className:"h-11 w-11 rounded-full glass glass-overlay hover:text-gray-900",onClick:()=>typeof window<"u"&&window.history.length>1?Oe(-1):Oe("/venues"),children:e.jsx(jn,{className:"h-5 w-5"})}),e.jsxs("div",{className:"flex items-center gap-2",children:[(_==null?void 0:_.publicId)&&e.jsx(ue,{variant:"glass",size:"icon",className:"h-11 w-11 rounded-full glass glass-overlay p-0",asChild:!0,children:e.jsx("a",{href:`/u/${_.publicId}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center","aria-label":"View host profile",children:e.jsx(Rs,{src:se||void 0,alt:"Host avatar",className:"h-9 w-9 rounded-full object-cover border border-gray-200",fallback:"/default-profile-icon.png"})})}),e.jsx(ue,{variant:"glass",size:"icon",className:"h-11 w-11 rounded-full glass glass-overlay hover:text-brand",onClick:Qe,children:e.jsx(Nn,{className:"h-5 w-5"})}),ee!=null&&e.jsx(ue,{variant:"glass",size:"icon",className:H("h-11 w-11 rounded-full glass glass-overlay hover:text-red-500",U&&"text-brand"),onClick:ee,disabled:me,children:e.jsx(Us,{className:H("h-5 w-5",U&&"fill-current")})})]})]}),e.jsx("div",{className:"fixed top-0 left-0 right-0 h-[360px] z-0",children:e.jsx("img",{src:l[0]??zs,alt:s.name,className:"w-full h-full object-cover",loading:"eager"})}),e.jsxs("div",{ref:_e,className:"flex-1 overflow-y-auto pb-32 relative z-10",style:{background:"linear-gradient(to bottom, transparent 0, transparent 360px, white 360px)"},children:[e.jsx("div",{className:"h-[360px] relative z-0"}),e.jsxs("div",{className:"bg-white -mt-8 relative z-20 rounded-t-[32px] pt-8",children:[e.jsxs("div",{className:"px-6 pb-6 space-y-3 text-center",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 text-xs text-muted-foreground",children:[e.jsx(ha,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:r})]}),e.jsxs("h1",{className:"flex items-center justify-center gap-1.5 text-2xl font-semibold tracking-tight text-gray-900",children:[e.jsx("span",{children:s.name}),vt&&e.jsxs(Zn,{children:[e.jsx(Xn,{asChild:!0,children:e.jsx("span",{className:"inline-flex",children:e.jsx(mr,{className:"h-5 w-5 flex-shrink-0 text-blue-500","aria-label":"Verified"})})}),e.jsx(er,{side:"top",sideOffset:4,children:e.jsx("p",{className:"text-xs",children:"Venue provider registered on PLEC"})})]})]}),e.jsx("div",{className:"flex flex-wrap items-center justify-center gap-2",children:g.map(M=>e.jsx(At,{variant:"secondary",className:"rounded-full px-2.5 py-0.5 text-[10px] bg-gray-100 text-gray-700 border-0",children:M},M))}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(Zs,{className:"h-3.5 w-3.5"}),j??"Capacity details coming soon"]}),xe&&e.jsxs(e.Fragment,{children:[e.jsx(Ge,{orientation:"vertical",className:"h-3"}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(xr,{className:"h-3.5 w-3.5"}),"Instant booking"]})]}),(((at=n.pricing)==null?void 0:at.minimumHours)??0)>1&&e.jsxs(e.Fragment,{children:[e.jsx(Ge,{orientation:"vertical",className:"h-3"}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(tr,{className:"h-3.5 w-3.5"}),n.pricing.minimumHours,"+ hour minimum"]})]}),Ue&&e.jsxs(e.Fragment,{children:[e.jsx(Ge,{orientation:"vertical",className:"h-3"}),e.jsxs("button",{type:"button",onClick:M=>{M.preventDefault(),M.stopPropagation(),Oe(`${window.location.pathname}${window.location.search}#reviews`,{state:{scrollToReviews:Date.now()}})},className:"flex items-center gap-1 rounded-full bg-amber-50 px-1.5 py-0.5 text-[10px] font-semibold text-amber-700 cursor-pointer hover:bg-amber-100","aria-label":`View reviews - ${Ue} stars`,children:[e.jsx(Ws,{className:"h-3 w-3 fill-current"}),e.jsx("span",{children:Ue}),ze>0&&e.jsxs("span",{className:"text-[10px]",children:["(",ze,")"]})]})]})]})]}),e.jsx(Ge,{}),e.jsxs("div",{className:"px-6 py-6 space-y-8",children:[e.jsx("section",{className:"space-y-3 text-center min-w-0 max-w-full",children:e.jsx("p",{className:"text-sm leading-6 text-gray-700 whitespace-pre-line min-w-0 break-words",children:a})}),e.jsx(Ge,{}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Photos"}),e.jsx(Hr,{images:l,videos:c,serviceName:s.name,isMobile:!0,onShareClick:Qe,onSaveClick:ee,isSaved:U,onPhotoAdvance:lt})]}),e.jsx(Ge,{}),e.jsxs("div",{className:"space-y-12",children:[i.length>0&&e.jsxs("section",{className:"rounded-2xl border border-border/60 bg-muted/40 p-4 shadow-sm",children:[e.jsx("h2",{className:"text-base font-semibold text-gray-900",children:"Ideal for"}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:i.map(M=>e.jsx(At,{variant:"outline",className:"rounded-full border-brand/40 bg-white px-2.5 py-0.5 text-xs text-brand",children:M.replace(/[_-]/g," ").replace(/\b\w/g,$=>$.toUpperCase())},M))})]}),e.jsx(pr,{amenityValues:o,isMobile:!0}),e.jsx("section",{id:"availability",className:"scroll-mt-24",children:e.jsx(Dr,{schedule:d,blockedDates:h,selectedDate:z||null,onDateSelect:oe,bookingWindowDays:y,minimumLeadTimeHours:v,onTimeSlotSelect:M=>{G(M)},plannerHighlights:it})}),e.jsxs("section",{className:"min-w-0 space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Pricing breakdown"}),e.jsx(Un,{slots:zn(n)}),p.length>0&&e.jsx(yr,{packages:p,selectedPackageIds:I,onTogglePackage:f,isMobile:!0,sliderSelections:et,onSliderSelectionsChange:pt,onRequestQuote:Ye,twoModelBreakdown:L.pricingBreakdown.isAuthoritative?L.pricingBreakdown.twoModelBreakdown??null:null,servedDisplayLines:L.pricingBreakdown.isAuthoritative&&pe?((zt=sn(pe))==null?void 0:zt.lines)??null:null}),b.length>0&&e.jsx(qn,{addOns:b,feeInput:ke,selectedAddOns:x,onToggle:A,onSetQuantity:D}),qe?e.jsx(Qs,{pricing:L,authoritativeDisplayBreakdown:X,selectedPackage:C,guestCount:K,transformedVenue:s,listingCategory:t.category,metadata:n,isMobile:!0,variant:"default",previewState:pe,sliderSelections:et,taxJurisdictionCollected:Ps((is=(os=t.publishedData)==null?void 0:os.location)==null?void 0:is.country,(qt=(ls=t.publishedData)==null?void 0:ls.location)==null?void 0:qt.state)}):ne,p.length>0&&ce&&e.jsxs("div",{className:"pt-2",children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Don't see a package that fits? Request a custom quote from the host."}),e.jsx(ue,{variant:"outline",size:"sm",onClick:ce,children:"Request Custom Quote"})]}),e.jsx(Vn,{metadata:n,feeInput:ke})]}),e.jsx(br,{policies:n.policies??{},isMobile:!0}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Location"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Exact address is shared once a reservation is confirmed."}),e.jsx(sr,{address:r,venueName:s.name,latitude:(ds=(cs=t.draftData)==null?void 0:cs.location)==null?void 0:ds.latitude,longitude:(Vt=(Ht=t.draftData)==null?void 0:Ht.location)==null?void 0:Vt.longitude})]}),e.jsx(fr,{hostProfile:_,listing:t,isMobile:!0,onMessageHost:dt}),e.jsx("section",{id:"reviews",className:"scroll-mt-24",children:e.jsx(gr,{reviews:T,listingId:S,isMobile:!0})})]})]})]})]}),_r.createPortal(e.jsxs("div",{className:"fixed bottom-0 left-0 right-0 z-[9999] glass glass-lg px-4 py-3 safe-area-inset-bottom",style:{"--glass-tint-opacity":"0.72"},children:[e.jsx("div",{className:"space-y-2 mb-3",children:Ie.kind==="total"||Ie.kind==="subtotal"?e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("button",{onClick:()=>Se(!0),className:"text-left hover:opacity-80 transition-opacity",children:e.jsx("div",{className:"text-lg font-semibold text-gray-900 underline",children:Ie.text})}),Ie.kind==="subtotal"&&e.jsx("div",{className:"text-xs text-muted-foreground",children:Ie.note})]}),rs&&e.jsxs(At,{variant:"secondary",className:"rounded-full px-2.5 py-1 text-[10px] bg-green-50 text-green-700 border-green-200 font-semibold",children:[e.jsx(Gs,{className:"h-3 w-3 mr-1"}),"Free cancellation"]})]}):e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>qe?Se(!0):le(!0),className:H("text-left hover:opacity-80 transition-opacity",qe&&"underline"),children:e.jsx("div",{className:"text-lg font-semibold text-gray-900",children:qe?Ie.kind==="loading"?e.jsxs("span",{className:"flex items-center gap-2 text-base font-medium no-underline",children:[e.jsx(Ss,{className:"h-5 w-5 shrink-0 animate-spin text-muted-foreground"}),"Updating estimate…"]}):e.jsxs(e.Fragment,{children:[Ie.kind==="from"?`From ${Ie.text}`:Ie.kind==="starting"?`Starting at ${Ie.text}`:"View packages",Ie.kind==="from"||Ie.kind==="starting"?e.jsx("span",{className:"text-sm font-normal text-muted-foreground ml-1",children:Ie.unit}):null]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"Add date, time & guests"}),e.jsx("div",{className:"text-xs font-normal text-muted-foreground mt-1",children:"Your estimate appears here once details are set."})]})})}),Ue&&e.jsxs("div",{ref:F,onClick:M=>{var $,re;return M.preventDefault(),M.stopPropagation(),(re=($=M.nativeEvent)==null?void 0:$.stopImmediatePropagation)==null||re.call($),requestAnimationFrame(()=>{const we=document.getElementById("reviews"),Ve=_e.current;if(we&&Ve){const Mt=Ve.getBoundingClientRect(),jt=we.getBoundingClientRect(),Dt=Ve.scrollTop,Bs=jt.top-Mt.top+Dt-20;Ve.scrollTo({top:Bs,behavior:"smooth"})}else if(we){const Dt=we.getBoundingClientRect().top+window.scrollY-80;window.scrollTo({top:Dt,behavior:"smooth"})}}),!1},onMouseDown:M=>{var $,re;M.preventDefault(),M.stopPropagation(),(re=($=M.nativeEvent)==null?void 0:$.stopImmediatePropagation)==null||re.call($)},onTouchStart:M=>{var $,re;M.preventDefault(),M.stopPropagation(),(re=($=M.nativeEvent)==null?void 0:$.stopImmediatePropagation)==null||re.call($)},onPointerDown:M=>{M.preventDefault(),M.stopPropagation()},className:"flex items-center gap-1 mt-0.5 cursor-pointer hover:opacity-80 active:opacity-60 transition-opacity rounded px-2 py-1 -ml-2 -mr-2 touch-manipulation relative z-50",style:{minHeight:"44px",minWidth:"44px",pointerEvents:"auto"},role:"button",tabIndex:0,"aria-label":`View reviews - ${Ue} stars`,onKeyDown:M=>{if(M.key==="Enter"||M.key===" "){M.preventDefault(),M.stopPropagation();const $=document.getElementById("reviews"),re=_e.current;if($&&re){const we=re.getBoundingClientRect(),Ve=$.getBoundingClientRect(),Mt=re.scrollTop,jt=Ve.top-we.top+Mt-20;re.scrollTo({top:jt,behavior:"smooth"})}}},children:[e.jsx(Ws,{className:"h-3.5 w-3.5 fill-amber-400 text-amber-400 pointer-events-none flex-shrink-0"}),e.jsx("span",{className:"text-sm font-medium text-gray-900 pointer-events-none",children:Ue}),ze>0&&e.jsxs("span",{className:"text-xs text-muted-foreground pointer-events-none",children:["(",ze,")"]})]})]}),rs&&e.jsxs(At,{variant:"secondary",className:"rounded-full px-2.5 py-1 text-[10px] bg-green-50 text-green-700 border-green-200 font-semibold",children:[e.jsx(Gs,{className:"h-3 w-3 mr-1"}),"Free cancellation"]})]})}),e.jsx(ue,{className:"w-full bg-brand hover:bg-brand-600 text-white rounded-full py-6 text-base font-semibold",onClick:()=>le(!0),disabled:Ae,children:B?xe?"Adding...":"Submitting...":qe?"Show dates":"Select date"}),Ae&&Ze&&e.jsx("p",{className:"mt-2 text-center text-xs text-muted-foreground",children:Ze})]}),document.body),e.jsx(Yt,{open:ge,onOpenChange:Se,children:e.jsxs(Jt,{hideCloseButton:!1,children:[e.jsxs(Zt,{children:[e.jsx(Xt,{className:"text-xl font-semibold",children:"Pricing breakdown"}),e.jsx(vs,{children:"See how your estimated total was calculated"})]}),e.jsx("div",{className:"overflow-y-auto",children:qe?e.jsx(Qs,{pricing:L,authoritativeDisplayBreakdown:X,selectedPackage:C,guestCount:K,transformedVenue:s,listingCategory:t.category,metadata:n,isMobile:!0,variant:"dialog",previewState:pe,sliderSelections:et,taxJurisdictionCollected:Ps((ms=(us=t.publishedData)==null?void 0:us.location)==null?void 0:ms.country,(hs=(xs=t.publishedData)==null?void 0:xs.location)==null?void 0:hs.state)}):ne})]})}),e.jsx(Yt,{open:Fe,onOpenChange:le,children:e.jsxs(Jt,{hideCloseButton:!1,children:[e.jsxs(Zt,{children:[e.jsx(Xt,{className:"text-xl font-semibold",children:"Booking details"}),e.jsx(vs,{children:"Customize your event date, time, and guest count"})]}),e.jsxs("div",{className:"space-y-4 pb-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:xe?"Instant booking: you'll be charged at checkout once you confirm.":"You won't be charged yet. Share your event details and get a customized proposal from the host."}),e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Date"}),e.jsx(en,{value:z?(()=>{const[M,$,re]=z.split("-").map(Number);return new Date(M,$-1,re)})():null,onChange:M=>{oe(M?Is(M,"yyyy-MM-dd"):"")},placeholder:"Select date",minDate:$e,maxDate:tt,disabledDates:Pe,plannerHighlights:it})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Start"}),e.jsx(Rn,{value:W,onChange:G,placeholder:"Add time",options:Le,minTime:fe,maxTime:ve,disabled:!z})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:["End",Es&&e.jsx("span",{className:"ml-1 font-normal normal-case",children:"(next day)"})]}),e.jsx(Rn,{value:Y,onChange:ie,placeholder:"Add time",options:Ke,minTime:ye,maxTime:te,disabled:!W})]}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["All times shown in ",Ot]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Guests"}),e.jsx(ot,{type:"number",min:1,max:Q,value:K,onChange:M=>{const $=Number(M.target.value)||1,re=Rr($,Q);he(re),yt(Cr({enteredValue:$,adjustedValue:re,upperBound:Q,limitLabel:Me}))},className:"h-12 rounded-2xl"}),Q<500&&e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to ",Q," guests for this booking."]}),bt&&e.jsx("p",{className:"text-xs text-amber-700",children:bt})]}),gt&&e.jsx("p",{className:"text-sm text-destructive font-medium",children:gt.description}),(Tt||kt)&&e.jsxs("div",{className:"rounded-2xl bg-brand/10 p-3 text-xs text-brand",children:[e.jsx("p",{className:"font-medium",children:"Package pricing"}),e.jsx("p",{className:"mt-1",children:$t?"This package is priced per person per hour. The total updates with duration and guest count.":Tt?"This package is priced per hour. The total updates with duration.":"This package is priced per person. The total updates with guest count."})]}),!xe&&ut&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("label",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Message to host (optional)"}),e.jsx(ws,{value:Re??"",onChange:M=>ut(M.target.value),placeholder:"Tell the host about your event, purpose, or any special requests...",className:"min-h-[80px] rounded-2xl resize-none",maxLength:500})]}),xt&&e.jsxs("div",{className:"grid gap-2",children:[e.jsxs("p",{className:"text-[10px] font-bold uppercase tracking-wide text-gray-900",children:["ORGANIZATION",ht?" *":""]}),e.jsx(ot,{type:"text",value:mt??"",onChange:M=>xt(M.target.value),placeholder:"e.g. Vietnamese Student Association",className:"h-11 rounded-lg"}),ht&&!(mt??"").trim()&&e.jsx("p",{className:"text-xs font-medium text-destructive",children:"This host requires an organization name to book."})]}),Je&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-wide text-gray-900",children:"CONTACT PHONE"}),e.jsx(ot,{type:"tel",value:je??"",onChange:M=>Je(M.target.value),placeholder:"(281) 691-1585",className:"h-11 rounded-lg"})]})]})]}),e.jsxs(pa,{className:"w-full flex-col gap-0 border-0 p-0 sm:flex-col sm:space-x-0",children:[Ct?e.jsx(ue,{className:"w-full bg-brand hover:bg-brand-600 text-white rounded-full py-6 text-base font-semibold",onClick:()=>{le(!1);const M=(R??(C?[C]:[])).find($=>$.requiresCustomQuote);M&&(Ye==null||Ye(M.id))},disabled:Ae,children:"Request a Quote"}):e.jsx(ue,{className:"w-full bg-brand hover:bg-brand-600 text-white rounded-full py-6 text-base font-semibold",onClick:()=>{le(!1),de()},disabled:Ae||B||!As.isValid||!!gt||!!_s||!Rt,children:B?xe?"Adding...":"Submitting...":xe?((R==null?void 0:R.length)??(C!==null?1:0))>0?"Add package to cart":"Add to cart":"Request Venue"}),!Ct&&!Rt&&e.jsx("p",{className:"mt-2 text-center text-xs text-amber-700",children:"Set your package amount above $0 to continue."})]})]})})]})},Io=({listing:t,transformedVenue:s,metadata:n,venueStartingPrice:r,address:a,description:l,galleryImages:c,galleryVideos:o=[],amenityValues:i,subTypes:g,highlights:j,capacityLabel:m,availability:d,schedule:h,blockedDates:y,bookingWindowDays:v,minimumLeadTimeHours:p,packages:k,selectedPackageId:I,selectedPackageIds:C,selectedPackage:R,selectedPackages:N,onSelectPackage:f,onTogglePackage:b,addOns:x,selectedAddOns:A,onToggleAddOn:D,onSetAddOnQuantity:E,pricing:L,authoritativeVenueDisplayBreakdown:X,reviews:T,listingId:S,avgRating:O,totalReviews:q,hostProfile:_,hostPhoto:se,isSaved:U,savingVenue:me,onSaveVenue:ee,eventDate:z,setEventDate:oe,startTime:W,setStartTime:G,endTime:Y,setEndTime:ie,guestCount:K,setGuestCount:he,durationHours:ae,durationMinutes:Be,setDurationMinutes:Le,startTimeOptions:Ke,endTimeOptions:fe,startTimeMinTime:ve,startTimeMaxTime:ye,endTimeMinTime:te,endTimeMaxTime:de,onAddToCart:B,cartLoading:V,validateBeforeAnimate:ge,onShareClick:Se,acceptsInstantBookings:Fe=!0,onMessageHost:le,onRequestCustomQuote:Qe,onRequestPackageQuote:xe,stickyCardRef:dt,stickyCardPosition:ce,specialRequests:Ye,setSpecialRequests:Re,contactOrg:ut,setContactOrg:mt,requireOrganizationName:xt,contactPhone:ht,setContactPhone:je,bookingDisabled:Je,bookingDisabledMessage:Ae,venueCapacityMin:Ze,venueCapacityMax:nt,packageGuestMin:Ce,packageGuestMax:Xe,previewState:Te,plannerCalendarHighlights:pe,sliderSelections:it,onSliderSelectionsChange:et})=>{var ze,qe,rt,ne,ct,Rt,Ct,Tt,kt,$t,gt;const pt=typeof(d==null?void 0:d.timezone)=="string"?d.timezone:void 0,Oe=ss(),ke=u.useRef(null),{onPhotoViewed:vt}=Pn(t.listingId),lt=lr(t,cr(t)),ft=L.pricingBreakdown.isAuthoritative?L.pricingBreakdown.twoModelBreakdown??null:null,De=L.pricingBreakdown.isAuthoritative&&Te?((ze=sn(Te))==null?void 0:ze.lines)??null:null,[_e,F]=u.useState(!1),Ne=O!=null?O.toFixed(1):null,$e=q??T.length,tt=s.venue_type?fa(s.venue_type):null,Pe=Sa(t).find(Q=>Q.type==="hosting_since"),Ft=rr(t),Ot=(()=>{var Me;if(!(Pe!=null&&Pe.label))return null;const Q=(Me=Pe.metadata)==null?void 0:Me.sinceDate;return Q&&Date.now()-new Date(Q).getTime()<90*24*60*60*1e3?null:Pe.label.replace(/^Hosting with /,"With ")})();(()=>{var yt;const Q=(yt=Pe==null?void 0:Pe.metadata)==null?void 0:yt.sinceDate;if(!Q)return null;const Me=Math.floor((Date.now()-new Date(Q).getTime())/(30.44*24*60*60*1e3));if(Me<1)return null;if(Me<12)return`${Me} ${Me===1?"month":"months"} hosting`;const bt=Math.floor(Me/12);return`${bt} ${bt===1?"year":"years"} hosting`})(),_!=null&&_.firstName||_!=null&&_.fullName;const Ue=[m?{icon:Zs,text:m}:null,Fe?{icon:xr,text:"Instant booking"}:null,(((qe=n.pricing)==null?void 0:qe.minimumHours)??0)>1?{icon:tr,text:`${n.pricing.minimumHours}+ hour minimum`}:null].filter(Boolean);return e.jsx("div",{className:"mx-auto w-full max-w-7xl px-6 pb-24 pt-8 md:px-8",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("h1",{className:"flex items-center gap-1.5 break-words text-2xl font-semibold tracking-tight text-gray-900",children:[e.jsx("span",{className:"break-words",children:s.name}),Ft&&e.jsxs(Zn,{children:[e.jsx(Xn,{asChild:!0,children:e.jsx("span",{className:"inline-flex",children:e.jsx(mr,{className:"h-5 w-5 flex-shrink-0 text-blue-500","aria-label":"Verified"})})}),e.jsx(er,{side:"top",sideOffset:4,children:e.jsx("p",{className:"text-xs",children:"Venue provider registered on PLEC"})})]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium text-gray-700 underline hover:bg-gray-100 hover:no-underline",children:[e.jsx(to,{className:"h-4 w-4"}),"Share"]}),ee!=null&&e.jsxs("button",{type:"button",onClick:ee,disabled:me,className:"flex items-center gap-1.5 rounded-lg px-3 py-2 text-sm font-medium text-gray-700 underline hover:bg-gray-100 hover:no-underline disabled:opacity-50",children:[e.jsx(Us,{className:H("h-4 w-4",U&&"fill-current text-brand")}),me?"Saving...":U?"Saved":"Save"]})]})]}),e.jsx(ga,{ref:ke,images:c,videos:o,venueName:s.name,isMobile:!1,onShareClick:Se,onSaveClick:ee,isSaved:U,onBackClick:()=>Oe(-1),onPhotoAdvance:vt}),e.jsx(Ao,{imageGalleryRef:ke}),e.jsxs("div",{children:[(tt||s.city)&&e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:[tt,s.city].filter(Boolean).join(" in ")}),Ue.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-x-1.5 gap-y-0.5 text-sm text-gray-600",children:Ue.map(({text:Q},Me)=>e.jsxs(st.Fragment,{children:[Me>0&&e.jsx("span",{className:"text-gray-300",children:"·"}),e.jsx("span",{children:Q})]},Q))}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-sm",children:[Ne&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:Q=>{Q.preventDefault(),Q.stopPropagation(),Oe(`${window.location.pathname}${window.location.search}#reviews`,{state:{scrollToReviews:Date.now()}})},className:"flex items-center gap-1 hover:underline","aria-label":`View reviews - ${Ne} stars`,children:[e.jsx(Ws,{className:"h-3.5 w-3.5 fill-gray-900 text-gray-900"}),e.jsx("span",{className:"font-semibold text-gray-900",children:Ne}),$e>0&&e.jsxs("span",{className:"text-gray-500",children:["· ",$e," reviews"]})]}),e.jsx("span",{className:"text-gray-300",children:"·"})]}),e.jsx("span",{className:"text-gray-600",children:a}),Ot&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-300",children:"·"}),e.jsx("span",{className:"text-gray-500",children:Ot})]})]})]}),e.jsxs("div",{className:"flex flex-col gap-12 pb-10 border-b border-gray-200 lg:flex-row",children:[e.jsxs("div",{className:"min-w-0 flex-1 space-y-10",children:[e.jsxs("section",{className:"border-b border-gray-200 pb-8",children:[e.jsx("div",{className:H(!_e&&"line-clamp-4"),children:e.jsx("p",{className:"min-w-0 break-words text-base leading-7 text-gray-700 whitespace-pre-line",children:l})}),l.length>300&&e.jsx("button",{type:"button",onClick:()=>F(Q=>!Q),className:"mt-3 flex items-center gap-1 text-sm font-semibold text-gray-900 underline hover:no-underline",children:_e?"Show less":"Show more"})]}),e.jsxs("section",{id:"packages",className:"scroll-mt-24 min-w-0 space-y-4 border-b border-gray-200 pb-8",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Packages & Pricing"}),L.baseRate!=null?e.jsxs("p",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-2xl font-bold text-gray-900",children:He(L.baseRate)}),e.jsx("span",{className:"text-base text-gray-500",children:((rt=s.priceUnit)==null?void 0:rt.replace(/_/g," "))??"per hour"})]}):r?e.jsxs("p",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-base text-gray-500",children:"Starting at"}),e.jsx("span",{className:"text-2xl font-bold text-gray-900",children:He(r.displayPrice)}),e.jsx("span",{className:"text-base text-gray-500",children:r.priceType.replace(/_/g," ")})]}):null,e.jsx(Un,{slots:zn(n)}),k.length>0&&e.jsx(yr,{packages:k,selectedPackageIds:C,onTogglePackage:b,isMobile:!1,sliderSelections:it,onSliderSelectionsChange:et,onRequestQuote:xe,twoModelBreakdown:ft,servedDisplayLines:De,optional:!0}),x.length>0&&e.jsx(qn,{addOns:x,feeInput:lt,selectedAddOns:A,onToggle:D,onSetQuantity:E}),k.length>0&&Qe&&e.jsxs("div",{className:"pt-2",children:[e.jsx("p",{className:"mb-2 text-sm text-muted-foreground",children:"Don't see a package that fits? Request a custom quote from the host."}),e.jsx(ue,{variant:"outline",size:"sm",onClick:Qe,children:"Request Custom Quote"})]}),e.jsx(Vn,{metadata:n,feeInput:lt})]}),e.jsx("section",{id:"amenities",className:"scroll-mt-24",children:e.jsx(pr,{amenityValues:i,isMobile:!1})})]}),e.jsx("aside",{className:"w-full lg:w-[360px] xl:w-[400px]",children:e.jsx("div",{ref:dt,className:H("sticky top-28",ce&&"!fixed"),style:ce?{top:`${ce.top}px`,left:`${ce.left}px`,width:`${ce.width}px`,zIndex:40}:void 0,children:e.jsx(Co,{venueTimeZone:pt,pricing:{baseRate:L.baseRate,estimatedTotal:L.estimatedTotal,estimatedSubtotal:L.estimatedSubtotal,hasBaseRate:tn(n.pricing)},selectedPackage:R,selectedPackages:N,transformedVenue:s,eventDate:z,setEventDate:oe,startTime:W,setStartTime:G,endTime:Y,setEndTime:ie,guestCount:K,setGuestCount:he,durationHours:ae,durationMinutes:Be,setDurationMinutes:Le,schedule:h,blockedDates:y,bookingWindowDays:v,minimumLeadTimeHours:p,startTimeOptions:Ke,endTimeOptions:fe,startTimeMinTime:ve,startTimeMaxTime:ye,endTimeMinTime:te,endTimeMaxTime:de,onAddToCart:B,onRequestQuote:xe,cartLoading:V,acceptsInstantBookings:Fe,validateBeforeAnimate:ge,specialRequests:Ye,setSpecialRequests:Re,contactOrg:ut,setContactOrg:mt,requireOrganizationName:xt,contactPhone:ht,setContactPhone:je,bookingDisabled:Je,bookingDisabledMessage:Ae,venueCapacityMin:Ze,venueCapacityMax:nt,packageGuestMin:Ce,packageGuestMax:Xe,hasSelections:((N==null?void 0:N.length)??0)>0||A.length>0,previewState:Te,plannerHighlights:pe,sliderSelections:it,avgRating:O,totalReviews:q,breakdownProps:{fullPricing:L,authoritativeDisplayBreakdown:X,listingCategory:t.category,metadata:n,taxJurisdictionCollected:Ps((ct=(ne=t.publishedData)==null?void 0:ne.location)==null?void 0:ct.country,(Ct=(Rt=t.publishedData)==null?void 0:Rt.location)==null?void 0:Ct.state)}})})})]}),e.jsx("section",{id:"reviews",className:"mt-10 scroll-mt-24 border-b border-gray-200 pb-8",children:e.jsx(gr,{reviews:T,listingId:S,isMobile:!1})}),e.jsxs("div",{className:"mt-10 space-y-10",children:[e.jsxs("section",{id:"location",className:"scroll-mt-24 space-y-2 border-b border-gray-200 pb-8",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:"Address Information"}),a&&e.jsx("p",{className:"text-sm text-gray-700",children:a}),e.jsx(sr,{address:a,venueName:s.name,latitude:(kt=(Tt=t.draftData)==null?void 0:Tt.location)==null?void 0:kt.latitude,longitude:(gt=($t=t.draftData)==null?void 0:$t.location)==null?void 0:gt.longitude})]}),e.jsx("section",{id:"host",className:"scroll-mt-24 border-b border-gray-200 pb-8",children:e.jsx(fr,{hostProfile:_,listing:t,isMobile:!1,onMessageHost:le})}),e.jsx("section",{id:"policies",className:"scroll-mt-24",children:e.jsx(br,{policies:n.policies??{},isMobile:!1})})]})]})})},bs=[{id:"packages",label:"Packages"},{id:"amenities",label:"Amenities"},{id:"availability",label:"Availability"},{id:"reviews",label:"Reviews"},{id:"location",label:"Location"},{id:"host",label:"Host"},{id:"policies",label:"Rules & Policies"}],Ao=({imageGalleryRef:t})=>{const[s,n]=u.useState(!1),[r,a]=u.useState(null),l=u.useRef(null);u.useEffect(()=>{const o=()=>{if(!t.current)return;if(t.current.getBoundingClientRect().bottom<=100)n(!0);else{n(!1),a(null);return}const j=window.scrollY,m=100;for(let d=bs.length-1;d>=0;d--){const h=document.getElementById(bs[d].id);if(h){const y=h.getBoundingClientRect(),v=j+y.top-m;if(j>=v-150){a(bs[d].id);break}}}};return window.addEventListener("scroll",o,{passive:!0}),o(),()=>{window.removeEventListener("scroll",o)}},[t]);const c=o=>{var g;const i=document.getElementById(o);if(i){const j=((g=l.current)==null?void 0:g.offsetHeight)||0,m=i.offsetTop-j-12;window.scrollTo({top:Math.max(0,m),behavior:"smooth"})}};return e.jsx("div",{ref:l,className:H("glass fixed top-0 left-0 right-0 z-40 w-full","transition-transform duration-300 ease-in-out",s?"translate-y-0":"-translate-y-full pointer-events-none"),style:{"--glass-tint-opacity":"0.72"},children:e.jsx("div",{className:"mx-auto w-full max-w-7xl px-6 md:px-8",children:e.jsx("nav",{className:"flex items-center gap-6 overflow-x-auto scrollbar-hide py-3",children:bs.map(o=>e.jsx("button",{onClick:()=>c(o.id),className:H("shrink-0 text-sm font-medium transition-colors whitespace-nowrap pb-1 border-b-2 border-transparent",r===o.id?"text-brand border-brand":"text-gray-600 hover:text-gray-900 hover:border-gray-300"),children:o.label},o.id))})})})},An="/default-profile-icon.png",_o=t=>String(t??"").toLowerCase()==="plec",Z=t=>typeof t=="string"&&t.trim().length>0?t.trim():void 0,Eo=t=>[Z(t.profilePhoto),Z(t.profilePhotoUrl),Z(t.profile_photo_url),Z(t.reviewerPhoto),Z(t.reviewer_photo),Z(t.photoURL),Z(t.photoUrl)].find(Boolean),Bo=t=>Z(t.reviewerPublicId)??Z(t.reviewer_public_id),Lo=t=>Z(t.bookingId)??Z(t.booking_id),Fo=t=>Z(t.reviewerOrganization)??Z(t.reviewer_organization)??Z(t.organization);function _n(t){const s=t.reply??t.hostReply??t.host_reply;if(!s||typeof s!="object")return;const n=s,r=Z(n.comment);if(r)return{replyId:Z(n.replyId)??Z(n.reply_id),comment:r,createdAt:Z(n.createdAt)??Z(n.created_at),updatedAt:Z(n.updatedAt)??Z(n.updated_at),authorName:Z(n.authorName)??Z(n.author_name),authorPublicId:Z(n.authorPublicId)??Z(n.author_public_id)}}const kr=t=>Z(t==null?void 0:t.organization)??Z(t==null?void 0:t.organisation)??Z(t==null?void 0:t.company);async function Oo(t){const s=new AbortController,n=setTimeout(()=>s.abort(),12e3);try{const r=await fetch(Et(`/bookings/${encodeURIComponent(t)}`),{credentials:"include",signal:s.signal});if(!r.ok)return{photo:null};if(!(r.headers.get("content-type")||"").includes("application/json"))return{photo:null};const l=await r.json(),c=Z(l.guestAvatar)??Z(l.guest_avatar)??Z(l.guestProfilePhoto)??Z(l.guest_profile_photo);if(c)return{photo:await ks(c)};const o=Z(l.guestPublicId)??Z(l.guest_public_id);if(!o)return{photo:null};const i=await fetch(Et(`/users/profile/by-id/${encodeURIComponent(o)}`),{credentials:"include"});if(!i.ok)return{photo:null};if(!(i.headers.get("content-type")||"").includes("application/json"))return{photo:null};const j=await i.json(),m=j.profile??j,d=await ks(Mr(m)),h=kr(m);return{photo:d,...h?{organization:h}:{}}}catch{return{photo:null}}finally{clearTimeout(n)}}const Mr=t=>[t==null?void 0:t.photoURL,t==null?void 0:t.photoUrl,t==null?void 0:t.profilePhoto,t==null?void 0:t.profilePhotoUrl,t==null?void 0:t.avatar,t==null?void 0:t.image].find(n=>typeof n=="string"&&n.trim().length>0)||null,ks=async t=>{if(!t)return null;if(!ja(t))return t;try{const s=await fetch(Et(`/users/photo/presigned-url?photoURL=${encodeURIComponent(t)}`),{credentials:"include"});if(!s.ok||!(s.headers.get("content-type")||"").includes("application/json"))return t;const r=await s.json();return r.readURL||r.readUrl||t}catch(s){return console.error("Failed to resolve presigned profile photo URL",s),t}};function En(t){if(!t)return null;if(typeof window>"u")return t;try{const s=new URL(t,window.location.href);return s.pathname.includes("/reviews/google-photo")?`${window.location.origin}${s.pathname}${s.search}`:t}catch{return t}}const Bn="We couldn't find that venue. It may be unpublished or was removed.",$o=(t,s)=>{const[n,r]=u.useState(null),[a,l]=u.useState(!0),[c,o]=u.useState(null),[i,g]=u.useState([]),[j,m]=u.useState(null),[d,h]=u.useState(null),[y,v]=u.useState(null);u.useEffect(()=>{let C=!0;return(async()=>{if(!t){o("Missing venue id"),l(!1);return}try{const N=s?await ba(t):await ya(t);if(!C)return;if(N.listingKind!=="venue"){console.error(`Listing ${t} is a ${N.listingKind}, not a venue. Route mismatch.`),C&&(o("This listing is not a venue. Please use the correct link."),l(!1));return}r(N);try{const f=await fetch(Et(`/reviews/listing/${t}`)),b=f.headers.get("content-type")||"";if(f.ok&&b.includes("application/json")){const x=await f.json(),A=x.reviews||[],D=await Promise.all(A.map(async E=>{const L=E,X=Eo(L)??null,T=await ks(X);if(!_o(E.type))return{...E,profilePhoto:En(T)||An,reply:_n(L)};let S=T,O=Fo(L);const q=Bo(L);if(q)try{const _=await fetch(Et(`/users/profile/by-id/${encodeURIComponent(q)}`),{credentials:"include"});if(_.ok&&(_.headers.get("content-type")||"").includes("application/json")){const U=await _.json(),me=U.profile??U;S||(S=await ks(Mr(me))||S),O=O??kr(me)}}catch(_){console.error("Failed to load reviewer profile",_)}if(!S){const _=Lo(L);if(_){const se=await Oo(_);S=se.photo,O=O??se.organization}}return{...E,profilePhoto:En(S)||An,...O?{reviewerOrganization:O}:{},reply:_n(L)}}));g(D),m(x.avgRating??null),h(x.totalReviews??null)}else console.warn(`Reviews endpoint returned ${f.status} or non-JSON response, skipping`),g([]),m(null),h(null)}catch(f){console.error("Failed to load reviews:",f),g([]),m(null),h(null)}l(!1)}catch(N){if(console.error("Failed to load listing",N),C){const f=N instanceof Error?N.message:String(N);f.includes("not found")||f.includes("404")?o(Bn):o(`Failed to load venue: ${f}`),l(!1)}}})(),()=>{C=!1}},[t,s]),u.useEffect(()=>{async function C(){if(t)try{const R=await fetch(Et(`/public/venues/${t}/host`),{credentials:"include"});if(!R.ok)return;if(!(R.headers.get("content-type")||"").includes("application/json")){console.warn("Host profile response is not JSON, skipping avatar load");return}const f=await R.json();if(!f)return;const b=f.profile??f;v(b)}catch(R){console.error("Failed to load host profile",R)}}C()},[t]);const p=u.useMemo(()=>n?Ua(n):null,[n]),k=u.useMemo(()=>za(n??void 0),[n]),I=u.useMemo(()=>(k==null?void 0:k.metadata)??{},[k==null?void 0:k.metadata]);return{listing:n,effectiveData:k??void 0,isLoading:a,error:c,notFound:!s&&c===Bn,transformedVenue:p,metadata:I,reviews:i,avgRating:j,totalReviews:d,hostProfileData:y}},Ln=(t,s)=>{const[n,r]=t.split(":").map(Number),[a,l]=s.split(":").map(Number);if([n,r,a,l].some(o=>!Number.isFinite(o)))return null;let c=a*60+(l||0)-(n*60+(r||0));return c<0&&(c+=24*60),c<=0?null:c/60},Ho=({schedule:t,eventShell:s})=>{const[n]=Hn(),[r,a]=u.useState(()=>{const N=n.get("guests");if(N){const f=Number(N);if(Number.isFinite(f)&&f>1)return f}return 20}),[l,c]=u.useState(()=>{const N=n.get("duration");if(N&&N!=="All day"&&N.toLowerCase()!=="all day"){const{startTime:b,endTime:x}=Hs(N);if(b&&x)try{const[A,D]=b.split(":").map(Number),[E,L]=x.split(":").map(Number),X=A*60+(D||0);let S=E*60+(L||0)-X;S<0&&(S+=24*60);const O=S/60;if(O>0)return O}catch{}}const f=N?Number(N):NaN;return Number.isFinite(f)&&f>0&&f!==4?f:3}),[o,i]=u.useState(()=>{const N=n.get("check_in")||n.get("date");if(N)try{return Is(hr(N),"yyyy-MM-dd")}catch{}return""}),{startTime:g,endTime:j}=Hs(n.get("duration")),[m,d]=u.useState(()=>n.get("start")||g||""),[h,y]=u.useState(()=>n.get("end")||j||""),v=u.useMemo(()=>{if(!m||!h)return l;try{const[N,f]=m.split(":").map(Number),[b,x]=h.split(":").map(Number),A=N*60+(f||0);let E=b*60+(x||0)-A;E<0&&(E+=24*60);const L=E/60;return L>0?L:l}catch{return l}},[m,h,l]),p=u.useMemo(()=>Math.max(Nt*60,Math.round(l*60)),[l]),k=u.useCallback(N=>{if(d(N),!N){y("");return}const f=Ls(N,p);f&&y(f)},[p]),I=u.useCallback(N=>{if(y(N),!N||!m)return;const f=Ln(m,N);f!=null&&c(Math.max(Nt,Os(f)))},[m]),C=u.useCallback(N=>{const f=Math.max(Nt*60,N);if(c(f/60),m){const b=Ls(m,f);b&&y(b)}},[m]);u.useEffect(()=>{const N=n.get("duration");if(N){const{startTime:f,endTime:b}=Hs(N);if(f&&b){d(f),y(b);const x=Ln(f,b);x!=null&&c(Math.max(Nt,Os(x)))}else N.toLowerCase()==="all day"&&(d(""),y(""))}},[n]);const R=u.useRef(!1);return u.useEffect(()=>{if(!(!s||R.current)){if(R.current=!0,s.date&&i(s.date),s.time){d(s.time);const N=Ls(s.time,Math.max(Nt,s.durationHours||0)*60);N&&y(N)}s.durationHours>0&&c(Math.max(Nt,Os(s.durationHours))),s.guestCount>0&&a(s.guestCount)}},[s]),{eventDate:o,setEventDate:i,startTime:m,setStartTime:k,endTime:h,setEndTime:I,guestCount:r,setGuestCount:a,durationHours:l,durationMinutes:p,setDurationMinutes:C,calculatedHours:v}};function Do({unavailableDates:t,isLoading:s,staticBlockedDates:n}){return s?n:t}function Po(t,s,n){var l;const r=(l=s==null?void 0:s.split(",")[0])==null?void 0:l.trim(),a=[];return r&&a.push(r),n&&n.toLowerCase()!==(r==null?void 0:r.toLowerCase())&&a.push(n),a.length>0?`${t} · ${a.join(", ")}`:t}const Uo=()=>{const[t,s]=u.useState(!1),[n,r]=u.useState(!1),[a,l]=u.useState(!1),[c,o]=u.useState(!1),[i,g]=u.useState(!1),[j,m]=u.useState(!1),[d,h]=u.useState(null),[y,v]=u.useState(null),[p,k]=u.useState(null),[I,C]=u.useState(null);return{isShareOpen:t,setIsShareOpen:s,isPricingBreakdownOpen:n,setIsPricingBreakdownOpen:r,isBookingDetailsOpen:a,setIsBookingDetailsOpen:l,showReplaceModal:c,setShowReplaceModal:o,showReplaceVenueModal:i,setShowReplaceVenueModal:g,showTimeConflictModal:j,setShowTimeConflictModal:m,pendingVenue:d,setPendingVenue:h,compatibilityResult:y,setCompatibilityResult:v,existingVenueInfo:p,setExistingVenueInfo:k,timeConflictData:I,setTimeConflictData:C}};function zo(t){var r,a,l,c;const s=(a=(r=t.message)==null?void 0:r.title)==null?void 0:a.trim(),n=(c=(l=t.message)==null?void 0:l.description)==null?void 0:c.trim();return s&&n?{title:s,description:n}:{title:"That time is taken",description:"This venue is already booked during part of that window. Try a different time."}}const qo=({listing:t,transformedVenue:s,venueAddress:n,eventDate:r,startTime:a,endTime:l,guestCount:c,calculatedHours:o,selectedPackageIds:i,selectedPackageNames:g,skipBaseRate:j,selectedAddOns:m,sliderSelections:d,schedule:h,blockedDates:y=[],bookingWindowDays:v,minimumLeadTimeHours:p,venueCapacityMin:k,venueCapacityMax:I,packageGuestMin:C,packageGuestMax:R,previewRefusal:N,onPreviewRefused:f,pricePending:b=!1,authoritativePricing:x,venueDisplayBreakdown:A,selectedPackagesPriced:D,venuePricing:E,contactOrg:L,contactPhone:X,specialRequests:T})=>{const{toast:S}=Xs(),{startCheckout:O}=qa(),q=!!N||b,_=u.useCallback(()=>N?(S({title:"This can't be booked right now",description:N,variant:"destructive"}),f==null||f(),!0):b?(S({title:"Updating the price",description:"One moment — the price for your selection is still loading. Try again when it shows."}),!0):!1,[N,f,b,S]),se=u.useCallback(async()=>{if(!t||!s){S({title:"Error",description:"Listing information is not available",variant:"destructive"});return}if(_())return;if(t.listingKind!=="venue"){console.error(`Cannot book ${t.listingKind} as venue. Listing ID: ${t.listingId}`),S({title:"Error",description:"Invalid listing type. This listing cannot be booked as a venue.",variant:"destructive"});return}if(!r){S({title:"Missing information",description:"Please select an event date",variant:"destructive"});return}try{const[oe,W,G]=r.split("-").map(Number),Y=new Date(oe,W-1,G);if(y.includes(r)){S({title:"Date not available",description:"The selected date is blocked. Please choose a different date.",variant:"destructive"});return}if(!Cs(r,v,p)){S({title:"Date not available",description:"The selected date is outside this venue's booking window.",variant:"destructive"});return}if(!qs(Y,h)){S({title:"Date not available",description:"The selected date is not available. Please choose a different date.",variant:"destructive"});return}}catch{S({title:"Invalid date",description:"Please select a valid date",variant:"destructive"});return}if(!a||!l){S({title:"Missing information",description:"Please select both start and end times",variant:"destructive"});return}const ee=Vs(o);if(ee){S({title:"Invalid duration",description:ee,variant:"destructive"});return}if(!c||c<1){S({title:"Missing information",description:"Please enter the number of guests (minimum 1)",variant:"destructive"});return}const z=ts({guestCount:c,venueCapacityMin:k,venueCapacityMax:I,packageGuestMin:C,packageGuestMax:R});if(z){S({...z,variant:"destructive"});return}try{const oe=de=>{if(!de)return"00:00";if(/^\d{1,2}:\d{2}$/.test(de))return de;const B=de.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);if(B){let V=parseInt(B[1],10);const ge=parseInt(B[2],10),Se=B[3].toUpperCase();return Se==="PM"&&V!==12&&(V+=12),Se==="AM"&&V===12&&(V=0),`${V.toString().padStart(2,"0")}:${ge.toString().padStart(2,"0")}`}return"00:00"},W=oe(a),G=oe(l),{startDateTime:Y,endDateTime:ie}=Lt(r,W,G),[K,he,ae]=r.split("-").map(Number),Be=new Date(K,he-1,ae),Le=Cn(W,G,Be,h);if(Le){S({title:"Time not available",description:Le,variant:"destructive"});return}try{const de=await fetch(Et(`/public/venues/${t.listingId}/conflict?start=${encodeURIComponent(Y)}&end=${encodeURIComponent(ie)}`));if(de.ok){const B=await de.json();if(B!=null&&B.hasConflict){const{title:V,description:ge}=zo(B);S({title:V,description:ge,variant:"destructive"});return}}}catch{}const Ke=typeof(x==null?void 0:x.total)=="number"?x.total:typeof(A==null?void 0:A.total)=="number"?A.total??void 0:void 0,fe=typeof(x==null?void 0:x.serviceFee)=="number"?x.serviceFee:typeof(A==null?void 0:A.serviceFee)=="number"?A.serviceFee??void 0:void 0,ve=Pr(Ke,x),ye=typeof(x==null?void 0:x.subtotal)=="number"?x.subtotal:typeof ve=="number"&&typeof fe=="number"?ve-fe:void 0,te={listingId:t.listingId,listingTitle:s.name,listingKind:"venue",startTime:Y,endTime:ie,hours:o,guestCount:c,imageUrl:s.main_image||void 0,location:(n==null?void 0:n.trim())||s.location||(s.city&&s.state?`${s.city}, ${s.state}`:s.city||s.state||void 0),city:s.city,state:s.state,latitude:s.latitude,longitude:s.longitude,selectedPackageId:i[0]??void 0,selectedPackageName:(g==null?void 0:g[0])??void 0,selectedAddOns:m.length>0?m:void 0,sliderSelections:d!=null&&d.length?d:void 0,skipBaseRate:j,price:s.baseRate,total:ve,subtotal:ye,serviceFee:fe,twoModelBreakdown:(x==null?void 0:x.twoModelBreakdown)??null,feeDisclosure:(x==null?void 0:x.feeDisclosure)??null,deposit:(x==null?void 0:x.deposit)??null,pricingNotices:(x==null?void 0:x.pricingNotices)??[],displayBreakdown:(x==null?void 0:x.displayBreakdown)??null,...Ur(x),...typeof(x==null?void 0:x.servedGuestTotalCents)=="number"?{servedGuestTotalCents:x.servedGuestTotalCents}:{},baseRate:(E==null?void 0:E.baseRate)??s.baseRate,cleaningFee:E==null?void 0:E.cleaningFee,minimumHours:E==null?void 0:E.minimumHours,overtimeRate:E==null?void 0:E.overtimeRate,selectedPackages:D&&D.length>0?D:void 0,selectionMode:"package",contactOrg:(L==null?void 0:L.trim())||void 0,contactPhone:(X==null?void 0:X.trim())||void 0,specialRequests:(T==null?void 0:T.trim())||void 0};O(te)}catch(oe){console.error("Error starting checkout:",oe),S({title:"Error",description:"An error occurred while starting checkout",variant:"destructive"})}},[t,s,n,r,a,l,c,o,i,g,j,m,d,h,y,v,p,k,I,C,R,_,x,A,D,E,L,X,T,O,S]),U=u.useCallback(()=>{if(q||!r||!a||!l||!c||c<1||ts({guestCount:c,venueCapacityMin:k,venueCapacityMax:I,packageGuestMin:C,packageGuestMax:R}))return!1;try{const[W,G,Y]=r.split("-").map(Number),ie=new Date(W,G-1,Y);if(y.includes(r)||!Cs(r,v,p)||!qs(ie,h))return!1}catch{return!1}const ee=W=>{if(!W)return"";if(/^\d{1,2}:\d{2}$/.test(W))return W;const G=W.match(/(\d{1,2}):(\d{2})\s*(AM|PM)/i);if(G){let Y=parseInt(G[1],10);const ie=parseInt(G[2],10),K=G[3].toUpperCase();return K==="PM"&&Y!==12&&(Y+=12),K==="AM"&&Y===12&&(Y=0),`${Y.toString().padStart(2,"0")}:${ie.toString().padStart(2,"0")}`}return""},z=ee(a),oe=ee(l);if(!z||!oe)return!1;try{const[W,G,Y]=r.split("-").map(Number),ie=new Date(W,G-1,Y);if(Cn(z,oe,ie,h))return!1}catch{return!0}return!Vs(o)},[q,r,a,l,c,o,h,y,v,p,k,I,C,R]);return{handleAddToCart:se,cartLoading:!1,validateBeforeAnimate:U}};function Vo({open:t,onOpenChange:s,openerRef:n,shareUrl:r,isMobile:a}){const l=u.useRef(null);return e.jsx(Yt,{open:t,onOpenChange:s,modal:!0,children:e.jsxs(Jt,{className:a?"":"max-w-lg rounded-3xl p-6",mobileBottomSheet:a,elevated:!0,"aria-modal":"true",onOpenAutoFocus:c=>{var o;c.preventDefault(),(o=l.current)==null||o.focus({preventScroll:!0})},onCloseAutoFocus:c=>{const o=n.current;o!=null&&o.isConnected&&(c.preventDefault(),o.focus({preventScroll:!0}))},children:[e.jsxs(Zt,{children:[e.jsx(Xt,{ref:l,tabIndex:-1,className:"text-xl font-semibold",children:"Share this venue"}),e.jsx(vs,{children:"Invite your planning team or clients to tour the space."})]}),e.jsx("div",{className:a?"space-y-3 text-sm":"mt-4 space-y-3 text-sm",children:e.jsx(zr,{shareUrl:r,context:"venue"})})]})})}function Go({open:t,onClose:s,listingId:n,venueName:r,venueCity:a,venueState:l}){const{toast:c}=Xs(),{user:o}=Ms(),[i,g]=u.useState(""),[j,m]=u.useState(null),[d,h]=u.useState(""),[y,v]=u.useState(!1),[p,k]=u.useState(""),[I,C]=u.useState(""),[R,N]=u.useState(""),f=()=>{g(""),m(null),h(""),k(""),C(""),N("")},b=async()=>{const x=Number(i);if(!Number.isFinite(x)||x<1){c({title:"Add a guest count",variant:"destructive"});return}if(!d.trim()){c({title:"Add a short message",variant:"destructive"});return}if(!o){if(!p.trim()){c({title:"Add your name",variant:"destructive"});return}if(!/.+@.+\..+/.test(I.trim())){c({title:"Add an email we can reply to",variant:"destructive"});return}}v(!0);try{await Ga({listingId:n,guestCountMin:x,guestCountMax:x,budgetMin:0,budgetMax:0,eventDate:j?Is(j,"yyyy-MM-dd"):void 0,dateFlexible:!j,eventType:[],vibes:[],location:a&&l?`${a}, ${l}`:a||r,primaryCity:a||void 0,primaryState:l||void 0,services:["Venue"],description:`Quote request for ${r}. ${d.trim()}`,consentToOutreach:!0,requesterName:p.trim()||void 0,requesterEmail:I.trim()||void 0,requesterPhone:R.trim()||void 0}),c({title:"Request sent",description:"The PLEC team will get you a quote for this venue."}),f(),s()}catch{c({title:"Could not send request",variant:"destructive"})}finally{v(!1)}};return e.jsx(Yt,{open:t,onOpenChange:x=>!x&&s(),children:e.jsxs(Jt,{className:"max-w-md",children:[e.jsxs(Zt,{children:[e.jsx(Xt,{children:"Request a quote"}),e.jsx(vs,{children:"This venue has not set its pricing yet. Tell us about your event and the PLEC team will get you a quote."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(It,{className:"flex items-center gap-1",children:[e.jsx(Zs,{className:"h-4 w-4"})," Guest count"]}),e.jsx(ot,{type:"number",min:1,value:i,onChange:x=>g(x.target.value),placeholder:"e.g. 80"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs(It,{className:"flex items-center gap-1",children:[e.jsx(Wa,{className:"h-4 w-4"})," Event date (optional)"]}),e.jsx(en,{value:j,onChange:x=>m(x)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsxs(It,{className:"flex items-center gap-1",children:[e.jsx(Na,{className:"h-4 w-4"})," What are you planning?"]}),e.jsx(ws,{value:d,onChange:x=>h(x.target.value),placeholder:"Tell us about your event, timing, and anything you need.",rows:4})]}),!o&&e.jsxs("div",{className:"space-y-3 rounded-xl border border-border bg-muted/40 p-3",children:[e.jsx(It,{className:"text-sm",children:"How do we reach you?"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(It,{htmlFor:"prospect-quote-name",className:"text-xs font-normal text-muted-foreground",children:"Your name"}),e.jsx(ot,{id:"prospect-quote-name",value:p,onChange:x=>k(x.target.value)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(It,{htmlFor:"prospect-quote-email",className:"text-xs font-normal text-muted-foreground",children:"Email"}),e.jsx(ot,{id:"prospect-quote-email",type:"email",value:I,onChange:x=>C(x.target.value)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(It,{htmlFor:"prospect-quote-phone",className:"text-xs font-normal text-muted-foreground",children:"Phone (optional)"}),e.jsx(ot,{id:"prospect-quote-phone",type:"tel",value:R,onChange:x=>N(x.target.value)})]})]}),e.jsx(ue,{className:"w-full",onClick:b,disabled:y,children:y?"Sending…":"Send request"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"By sending, you agree we can contact this venue on your behalf and send you updates."})]})]})})}const Wo=t=>{const s=t.sliderPricingMode;return s!=="all_in"&&s!=="bar_tab"?{}:{sliderPricingMode:s}},Ko=t=>{const s=c=>{const o=We(c);return typeof o=="number"&&o>0?o:void 0},n=s(t.displayPrice),r=s(t.displayStartingPrice),a=s(t.displayMinPrice),l=s(t.displayMaxPrice);return{...n!==void 0?{displayPrice:n}:{},...r!==void 0?{displayStartingPrice:r}:{},...a!==void 0?{displayMinPrice:a}:{},...l!==void 0?{displayMaxPrice:l}:{},...t.hostFeeIncluded===!0?{hostFeeIncluded:!0}:{}}},We=t=>{if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){const s=Number(t);if(Number.isFinite(s))return s}},Qo=t=>{const s=We(t.minAttendees);if(typeof s=="number"&&s>0)return s;const n=t.guestLimit&&typeof t.guestLimit=="object"?t.guestLimit:null,r=n?We(n.min):void 0;if(typeof r=="number"&&r>0)return r;const a=We(t.minGuests??t.minGuest);return typeof a=="number"&&a>0?a:null},Yo=t=>{const s=We(t.maxAttendees);if(typeof s=="number"&&s>0)return s;const n=t.guestLimit&&typeof t.guestLimit=="object"?t.guestLimit:null,r=n?We(n.max):void 0;if(typeof r=="number"&&r>0)return r;const a=We(t.maxGuests??t.maxGuest);return typeof a=="number"&&a>0?a:null},Jo=t=>{const s=We(t.durationHours??t.hours);if(typeof s=="number"&&s>0)return s;const n=t.duration&&typeof t.duration=="object"?t.duration:null;if(!n)return null;const r=We(n.hours)??0,a=We(n.minutes)??0,l=r+a/60;return l>0?l:null},Zo=t=>t==="per_event"||t==="per_hour"||t==="per_person_per_hour"?t:"per_person",Xo=t=>{if(t.includesVenueRental===!0||t.skipBaseRate===!0||t.includesRental===!0)return!0;const s=String(t.packageType??t.type??"").trim().toLowerCase();if(s==="venue_rental"||s==="rental_buyout"||s==="full_buyout"||s==="buyout")return!0;const n=`${String(t.name??"")} ${String(t.description??"")} ${String(t.restrictions??"")}`.trim().toLowerCase();return/(buyout|full[\s-]?buyout|includes?\s+venue\s+rental|venue\s+rental\s+included)/.test(n)},ei=t=>{const s=t&&typeof t=="object"?t:void 0;return(Array.isArray(s==null?void 0:s.packages)?s.packages:[]).filter(r=>!!(r&&typeof r=="object")).map(r=>{const a=We(r.minPrice)??0,l=We(r.maxPrice),c=typeof l=="number"&&l!==a?l:a,o=Zo(r.priceType);return{id:typeof r.id=="string"?r.id:crypto.randomUUID(),name:typeof r.name=="string"?r.name:"Package",description:typeof r.description=="string"?r.description:void 0,priceType:o,minPrice:a,maxPrice:c,durationHours:Jo(r),minAttendees:Qo(r),maxAttendees:Yo(r),includesVenueRental:Xo(r),pricingMode:r.pricingMode==="self_service_range"?"self_service_range":r.pricingMode==="negotiable_range"?"negotiable_range":"fixed",requiresCustomQuote:r.pricingMode==="negotiable_range",priceUnit:r.priceUnit==="per_hour"||r.priceUnit==="per_day"?r.priceUnit:"per_event",sliders:r.pricingMode==="negotiable_range"?void 0:Array.isArray(r.sliders)?r.sliders.filter(i=>typeof i.id=="string"&&typeof i.min=="number"&&typeof i.max=="number"):void 0,...Wo(r),...Ko(r)}}).filter(r=>r.name.length>0)};function ti(t){const s=u.useMemo(()=>ei(t),[t]),n=u.useMemo(()=>r=>s.find(a=>a.id===r)??null,[s]);return{packages:s,getPackageById:n}}const si=new Set(["per_person","per_person_per_hour"]);function ni(t,s){let n;for(const l of t??[]){if(si.has(l.priceType))continue;const c=Qn(l);c!==null&&(!n||c<n.displayPrice)&&(n={displayPrice:c,priceType:l.priceType})}if(n)return n;const r=wa(s),a=t==null?void 0:t[0];return r!==null&&a?{displayPrice:r,priceType:a.priceType}:void 0}const ri=350,Fn=[];function ai({listingId:t,startTime:s,endTime:n,guestCount:r,initialState:a,venueHourlyOnlyPreview:l=!1,packages:c,previewEnabled:o=!0}){var X;const[i,g]=u.useState({selectedPackageIds:(a==null?void 0:a.selectedPackageIds)??[],selectedAddOns:(a==null?void 0:a.selectedAddOns)??Fn,sliderSelections:(a==null?void 0:a.sliderSelections)??[]}),j=va(i.sliderSelections,ri),m=JSON.stringify(j??[])!==JSON.stringify(i.sliderSelections??[]),d=(c??[]).filter(T=>i.selectedPackageIds.includes(T.id)),h=Ts(d,j??[]),y=!!(o&&s&&n&&r&&h&&(i.selectedPackageIds.length>0||i.selectedAddOns.length>0||l)),v=!y&&m&&!!(o&&s&&n&&r)&&Ts(d,i.sliderSelections??[])&&(i.selectedPackageIds.length>0||i.selectedAddOns.length>0||l),{data:p,status:k,error:I,isPlaceholderData:C,refetch:R}=Jn({queryKey:["pricing-preview",t,s,n,r,i.selectedPackageIds,i.selectedAddOns,j],queryFn:({signal:T})=>{if(!s||!n||!r)throw new Error("Pricing preview requires booking time and guest count.");return qr({listingId:t,startTime:s,endTime:n,guestCount:r,selectedPackageIds:i.selectedPackageIds.length>0?i.selectedPackageIds:void 0,selectedPackageId:i.selectedPackageIds[0]??void 0,selectedAddOns:i.selectedAddOns,sliderSelections:j,signal:T})},enabled:y,staleTime:3e4,placeholderData:Ra,retry:(T,S)=>!(S instanceof fn)&&T<1}),N=y?k==="pending"?{status:"loading"}:k==="error"?{status:"error",error:I instanceof Error?I.message:"Failed to fetch pricing preview",refused:I instanceof fn}:{status:"success",isRefreshing:C||m,subtotal:p==null?void 0:p.subtotal,serviceFee:p==null?void 0:p.serviceFee,total:p==null?void 0:p.total,guestTotalCents:p==null?void 0:p.guestTotalCents,twoModelBreakdown:(p==null?void 0:p.twoModelBreakdown)??null,feeDisclosure:(p==null?void 0:p.feeDisclosure)??null,deposit:(p==null?void 0:p.deposit)??null,pricingNotices:(p==null?void 0:p.pricingNotices)??[],displayBreakdown:(p==null?void 0:p.displayBreakdown)??null,taxStatus:p==null?void 0:p.taxStatus,taxAmountCents:p==null?void 0:p.taxAmountCents,taxJurisdictionCollected:p==null?void 0:p.taxJurisdictionCollected,advanceBookingModifier:(p==null?void 0:p.advanceBookingModifier)??null,selectionSnapshots:(X=p==null?void 0:p.selectionSnapshots)==null?void 0:X.map(T=>({selectionType:T.selectionType,sourceEntityId:T.sourceEntityId,name:T.name,priceModel:T.priceModel,quantity:T.quantity,unitPrice:T.unitPrice,baseAmount:T.baseAmount,finalAmount:T.finalAmount,includesVenueRental:T.includesVenueRental}))}:v?{status:"loading"}:{status:"idle"},f=u.useCallback(T=>{const S=c==null?void 0:c.find(O=>O.id===T);g(O=>{var se;const q=O.selectedPackageIds??[];if(q.includes(T)){const U=q.filter(z=>z!==T),me=new Set(((se=S==null?void 0:S.sliders)==null?void 0:se.map(z=>z.id))??[]),ee=me.size>0?O.sliderSelections.filter(z=>!me.has(z.sliderId)):O.sliderSelections;return{...O,selectedPackageIds:U,sliderSelections:ee}}let _;return S!=null&&S.includesVenueRental?_=[...q.filter(me=>{var ee;return!((ee=c==null?void 0:c.find(z=>z.id===me))!=null&&ee.includesVenueRental)}),T]:_=[...q,T],{...O,selectedPackageIds:_}})},[c]),b=u.useCallback(T=>{g(T===null?S=>({...S,selectedPackageIds:[],sliderSelections:[]}):S=>({...S,selectedPackageIds:[T],sliderSelections:[]}))},[]),x=u.useCallback((T,S=1)=>{g(O=>{const _=O.selectedAddOns.find(se=>se.addOnId===T)?O.selectedAddOns.filter(se=>se.addOnId!==T):[...O.selectedAddOns,{addOnId:T,quantity:S}];return{...O,selectedAddOns:_}})},[]),A=u.useCallback((T,S)=>{g(O=>({...O,selectedAddOns:O.selectedAddOns.map(q=>q.addOnId===T?{...q,quantity:S}:q)}))},[]),D=u.useCallback(()=>{y&&R({cancelRefetch:!1})},[y,R]),E=u.useCallback(()=>{g({selectedPackageIds:[],selectedAddOns:Fn,sliderSelections:[]})},[]),L=u.useCallback(T=>{g(S=>({...S,sliderSelections:T}))},[]);return{selectedPackageIds:i.selectedPackageIds,selectedPackageId:i.selectedPackageIds[0]??null,selectedAddOns:i.selectedAddOns,sliderSelections:i.sliderSelections??[],previewState:N,togglePackage:f,setSelectedPackage:b,toggleAddOn:x,setAddOnQuantity:A,clearSelection:E,setSliderSelections:L,recheckPreview:D}}function oi({isMobile:t,isShareOpen:s,isPricingBreakdownOpen:n,isBookingDetailsOpen:r,showReplaceModal:a,showReplaceVenueModal:l,showTimeConflictModal:c}){return{stickyBookingCardRef:u.useRef(null),stickyCardPosition:null}}function ii({hash:t,listingId:s,reviewsLength:n,scrollToReviewsToken:r}){u.useEffect(()=>{if((t||window.location.hash)!=="#reviews"||!s)return;const l=(o=0)=>{const i=document.getElementById("reviews");if(!i)return!1;const g=i.getBoundingClientRect();if(g.top>=0&&g.top<window.innerHeight&&g.top<150&&o>0)return!0;const m=document.querySelector('div[class*="overflow-y-auto"][class*="flex-1"]');if(m&&m.scrollHeight>m.clientHeight){const d=m.getBoundingClientRect(),h=i.getBoundingClientRect(),y=m.scrollTop,v=h.top-d.top+y-20;m.scrollTo({top:Math.max(0,v),behavior:o===0?"auto":"smooth"})}else{const y=i.getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:Math.max(0,y),behavior:o===0?"auto":"smooth"})}return!0},c=[];return requestAnimationFrame(()=>{l(0)||(c.push(window.setTimeout(()=>l(1),100)),c.push(window.setTimeout(()=>l(2),300)),c.push(window.setTimeout(()=>l(3),600)),c.push(window.setTimeout(()=>l(4),1e3)),c.push(window.setTimeout(()=>l(5),1500)))}),()=>{c.forEach(o=>window.clearTimeout(o))}},[t,s,n,r])}const ys=15,Bt=24*60,li=t=>{if(t.length===0)return[];const s=[...t].sort((r,a)=>r.start-a.start),n=[];for(const r of s){const a=n[n.length-1];if(!a){n.push({...r});continue}r.start<=a.end?a.end=Math.max(a.end,r.end):n.push({...r})}return n},ci=t=>{const s=t.map(r=>{const a=wt(r.from),l=wt(r.to);return l<=a?null:{start:a,end:l}}).filter(r=>r!=null).sort((r,a)=>r.start-a.start);let n=0;for(const r of s){if(r.start>n)break;n=Math.max(n,r.end)}return n},di=(t,s)=>{var h,y;const[n,r,a]=t.split("-").map(Number),l=new Date(n,r-1,a);if(Number.isNaN(l.getTime()))return[];const c=Tn(l),o=new Date(l);o.setDate(o.getDate()+1);const i=Tn(o),g=((h=kn(c,s))==null?void 0:h.windows)??[],j=((y=kn(i,s))==null?void 0:y.windows)??[],m=ci(j),d=[];for(const v of g){const p=wt(v.from),k=wt(v.to);if(k===p)continue;if(k>p){d.push({start:p,end:k});continue}d.push({start:p,end:Bt});const I=Math.min(k,m);I>0&&d.push({start:Bt,end:Bt+I})}return li(d)},On=(t,s)=>{if(s.length===0)return null;const n=s.findIndex(a=>t>=a.start&&t<a.end);if(n<0)return null;let r=s[n].end;for(let a=n+1;a<s.length;a+=1){const l=s[a];if(l.start>r)break;r=Math.max(r,l.end)}return r},Ds=(t,{minAbs:s=0,maxAbs:n=Number.POSITIVE_INFINITY,includeEnd:r=!1}={})=>{const a=[];for(const l of t){const c=Math.max(l.start,s),o=Math.min(l.end,n);if(o<=c)continue;const i=Math.ceil(c/ys)*ys,g=r?o:o-ys;for(let j=i;j<=g;j+=ys)a.push({value:ir(j),isNextDay:j>=Bt})}return a},$n=t=>[...t].sort((s,n)=>{const r=wt(s.value),a=wt(n.value);return r-a});function ui({eventDate:t,setEventDate:s,startTime:n,setStartTime:r,endTime:a,setEndTime:l,schedule:c,availability:o,blockedDates:i,fixedDurationHours:g}){var I,C,R,N;const j=u.useCallback(f=>{s(f),r(""),l("")},[s,r,l]),m=u.useMemo(()=>t?di(t,c):[],[t,c]),d=u.useMemo(()=>m.length===0?[]:Ds(m,{maxAbs:Bt-1,includeEnd:!1}).filter(b=>{const x=wt(b.value),A=On(x,m);return A!=null&&x+Nt*60<=A}),[m]),h=u.useMemo(()=>{if(m.length===0)return[];if(!n)return $n(Ds(m,{maxAbs:Bt-1,includeEnd:!0}));const f=wt(n),b=On(f,m);if(b==null)return[];if(typeof g=="number"&&Number.isFinite(g)&&g>0){const x=f+g*60;return x>b?[]:[{value:ir(x),isNextDay:x>=Bt}]}return $n(Ds(m,{minAbs:f+Nt*60,maxAbs:b,includeEnd:!0}))},[m,n,g]),y=(I=d[0])==null?void 0:I.value,v=(C=d[d.length-1])==null?void 0:C.value,p=(R=h[0])==null?void 0:R.value,k=(N=h[h.length-1])==null?void 0:N.value;return u.useEffect(()=>{if(t)try{const f=hr(`${t}T12:00:00`);(i.includes(t)||!Cs(t,typeof o.bookingWindowDays=="number"?o.bookingWindowDays:void 0,typeof o.minimumLeadTimeHours=="number"?o.minimumLeadTimeHours:void 0)||!qs(f,c))&&(s(""),r(""),l(""))}catch{}},[t,i,c,o.bookingWindowDays,o.minimumLeadTimeHours,s,r,l]),u.useEffect(()=>{if(!t)return;const f=new Set(d.map(x=>x.value)),b=new Set(h.map(x=>x.value));if(n&&!f.has(n)){r(""),l("");return}a&&(b.has(a)||l(""))},[t,n,a,d,h,r,l]),u.useEffect(()=>{var b;if(!n||!a)return;new Set(h.map(x=>x.value)).has(a)||l(((b=h[0])==null?void 0:b.value)??"")},[n,a,h,l]),{handleDateSelect:j,startTimeOptions:d,endTimeOptions:h,startTimeMinTime:y,startTimeMaxTime:v,endTimeMinTime:p,endTimeMaxTime:k}}function mi({transformedVenue:t,effectiveData:s,metadata:n,listing:r,hostProfileData:a,locationPathname:l,locationSearch:c}){var I,C,R,N;const o=((C=(I=s==null?void 0:s.basics)==null?void 0:I.description)==null?void 0:C.trim())||((N=(R=n.basics)==null?void 0:R.description)==null?void 0:N.trim())||"Host has not added a description yet.",i=(t==null?void 0:t.location)||(r==null?void 0:r.locationLabel)||"Exact location shared after booking is confirmed.",g=u.useMemo(()=>{if(!t)return[zs];const f=[t.main_image,...t.galleryImages??[]].filter(b=>!!(b&&b.trim()));return f.length===0?[zs]:Array.from(new Set(f))},[t]),j=u.useMemo(()=>(t==null?void 0:t.galleryVideos)??[],[t==null?void 0:t.galleryVideos]),m=u.useMemo(()=>{const f=(s==null?void 0:s.amenities)??[],b=n.amenities??[],x=[...f,...b];return Array.from(new Set(x.map(A=>typeof A=="string"?A.trim().toLowerCase():null).filter(A=>!!A)))},[s==null?void 0:s.amenities,n.amenities]),d=(t==null?void 0:t.capacityLabel)||(()=>{var A,D;const f=(A=s==null?void 0:s.capacity)==null?void 0:A.min,b=(D=s==null?void 0:s.capacity)==null?void 0:D.max,x=typeof f=="number"&&f>1?f:void 0;return typeof x=="number"&&typeof b=="number"?`${x}–${b} guests`:typeof b=="number"?`Up to ${b} guests`:typeof x=="number"?`${x}+ guests`:null})(),h=u.useMemo(()=>{const f=n==null?void 0:n.venueDetails,b=f==null?void 0:f.subTypes;return Array.isArray(b)?b.map(x=>typeof x=="string"?x:x&&typeof x=="object"&&"label"in x?String(x.label):"").filter(x=>x.length>0):[]},[n==null?void 0:n.venueDetails]),y=u.useMemo(()=>{var b;const f=[];return(b=t==null?void 0:t.eventStyles)!=null&&b.length&&f.push(t.eventStyles[0].replace(/[_-]/g," ").replace(/\b\w/g,x=>x.toUpperCase())),m.includes("wifi")&&f.push("Fast Wi-Fi"),m.includes("parking")&&f.push("Onsite parking"),m.includes("event_staff")&&f.push("On-site team"),m.includes("bar_service")&&f.push("Bar service"),f.slice(0,4)},[m,t==null?void 0:t.eventStyles]),v=u.useMemo(()=>{const f=n.hostProfile??n.host??{},b=(a==null?void 0:a.photoURL)||(a==null?void 0:a.photoUrl)||(a==null?void 0:a.avatar)||(a==null?void 0:a.image)||void 0;return{...f,...a||{},avatar:b,userId:(a==null?void 0:a.userId)||(r==null?void 0:r.userId)}},[n.hostProfile,n.host,a,r==null?void 0:r.userId]),p=(a==null?void 0:a.photoURL)||(a==null?void 0:a.photoUrl)||(a==null?void 0:a.avatar)||(a==null?void 0:a.image)||"/default-profile-icon.png",k=u.useMemo(()=>typeof window<"u"?`${window.location.origin}${l}${c}`:`${l}${c}`,[l,c]);return{description:o,address:i,galleryImages:g,galleryVideos:j,amenityValues:m,capacityLabel:d,subTypes:h,highlights:y,hostProfile:v,hostPhoto:p,shareUrl:k}}const xi=({venueId:t,eventDate:s})=>{const[n,r]=u.useState([]);return u.useEffect(()=>{if(!t)return;let a=!1;return Qa(t,{date:s,limit:8}).then(l=>{a||r(l)}).catch(()=>{a||r([])}),()=>{a=!0}},[t,s]),n.length===0?null:e.jsx("div",{className:"container mx-auto px-4 pb-8",children:e.jsx(Ka,{services:n,heading:"Recommended services",subtitle:"Trusted pros to bring your event together.",searchQuery:s?`date=${encodeURIComponent(s)}`:""})})};function hi({listing:t,eventDate:s,startTime:n,endTime:r,guestCount:a,calculatedHours:l,blockedDates:c,availability:o,venueCapacityMin:i,venueCapacityMax:g,packageGuestMin:j,packageGuestMax:m,user:d,toast:h,onContinue:y}){const v=ss(),p=Js(),[k,I]=u.useState(!1),[C,R]=u.useState([]),N=u.useRef(!1),f=u.useCallback(async()=>{if(k)return;if(!d){const E=`${p.pathname}${p.search}`;js(p.pathname)?Ns(E):v("/auth?returnTo="+encodeURIComponent(E));return}if(!t){h({title:"Error",description:"Listing information is not available",variant:"destructive"});return}if(t.listingKind!=="venue"){h({title:"Error",description:"Invalid listing type.",variant:"destructive"});return}if(!s){h({title:"Missing information",description:"Please select an event date",variant:"destructive"});return}if(!n||!r){h({title:"Missing information",description:"Please select both start and end times",variant:"destructive"});return}if(c.includes(s)){h({title:"Date not available",description:"The selected date is blocked. Please choose a different date.",variant:"destructive"});return}if(!Cs(s,typeof o.bookingWindowDays=="number"?o.bookingWindowDays:void 0,typeof o.minimumLeadTimeHours=="number"?o.minimumLeadTimeHours:void 0)){h({title:"Date not available",description:"The selected date is outside this venue's booking window.",variant:"destructive"});return}const A=Vs(l);if(A){h({title:"Invalid duration",description:A,variant:"destructive"});return}if(!a||a<1){h({title:"Missing information",description:"Please enter the number of guests (minimum 1)",variant:"destructive"});return}const D=ts({guestCount:a,venueCapacityMin:i,venueCapacityMax:g,packageGuestMin:j,packageGuestMax:m});if(D){h({...D,variant:"destructive"});return}if(!N.current){const{deviations:E}=await Vr({date:s,time:n,durationHours:l,guestCount:a});if(E.length>0){R(E);return}}try{I(!0),await y()}catch(E){console.error("Error starting a booking request:",E),h({title:"Error",description:"Failed to start your booking request. Please try again.",variant:"destructive"})}finally{I(!1),N.current=!1,R([])}},[k,d,t,s,n,r,a,l,c,o,i,g,j,m,y,h,v,p.pathname,p.search]),b=u.useCallback(()=>{N.current=!0,R([]),f()},[f]),x=u.useCallback(()=>{R([])},[]);return{handleRequestBooking:f,isRequestingBooking:k,eventDeviations:C,confirmEventDeviation:b,dismissEventDeviation:x}}const yl=()=>{var rn,an,on,ln,cn,dn,un,mn;const{id:t}=Er(),s=eo(t),n=Js(),r=ss(),[a]=Hn(),l=Ca(),c=a.get("preview")==="true",{listing:o,effectiveData:i,isLoading:g,error:j,notFound:m,transformedVenue:d,metadata:h,reviews:y,avgRating:v,totalReviews:p,hostProfileData:k}=$o(s,c);Xa(m);const[I,C]=u.useState(!1),[R,N]=u.useState(null),[f,b]=u.useState(!1),[x,A]=u.useState(""),[D,E]=u.useState(""),[L,X]=u.useState(""),[T,S]=u.useState(!1),[O,q]=u.useState(!1),[_,se]=u.useState(null),U=c||o==null?void 0:o.listingId;u.useEffect(()=>{U&&Fs("listing_view",{listingId:U,category:"venue"})},[U]),Gr(U);const{isShareOpen:me,setIsShareOpen:ee,isPricingBreakdownOpen:z,setIsPricingBreakdownOpen:oe,isBookingDetailsOpen:W,setIsBookingDetailsOpen:G}=Uo(),Y=u.useRef(null),ie=u.useCallback(w=>{Y.current=w.currentTarget,ee(!0)},[ee]),{stickyBookingCardRef:K,stickyCardPosition:he}=oi({isMobile:l,isShareOpen:me,isPricingBreakdownOpen:z,isBookingDetailsOpen:W,showReplaceModal:!1,showReplaceVenueModal:!1,showTimeConflictModal:!1});u.useEffect(()=>{me&&U&&Fs("listing_shared",{listingId:U})},[me,U]);const ae=h.availability??{},Be=Array.isArray(ae.blockedDates)?ae.blockedDates.filter(w=>typeof w=="string"):[],Le=!!(o!=null&&o.listingId)&&!c,{unavailableDates:Ke,isLoading:fe}=Wr(o==null?void 0:o.listingId,{enabled:Le}),ve=Do({unavailableDates:Ke,isLoading:!Le||fe,staticBlockedDates:Be}),ye=u.useMemo(()=>Array.isArray(ae.weeklySchedule)?[...ae.weeklySchedule].sort((w,J)=>{const be=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];return be.indexOf(w==null?void 0:w.day)-be.indexOf(J==null?void 0:J.day)}):[],[ae.weeklySchedule]),{user:te,loading:de,isAuthReady:B}=Ms(),V=Aa(te),ge=u.useRef(V),Se=u.useRef(0);ge.current=V;const{data:Fe}=Kr(!!te),{eventDate:le,setEventDate:Qe,startTime:xe,setStartTime:dt,endTime:ce,setEndTime:Ye,guestCount:Re,setGuestCount:ut,durationHours:mt,durationMinutes:xt,setDurationMinutes:ht,calculatedHours:je}=Ho({schedule:ye,eventShell:Fe==null?void 0:Fe.shell}),Je=(h==null?void 0:h.availability)??{},Ae=(h==null?void 0:h.publishing)??{},Ze=u.useMemo(()=>{var Wt;const w=$s((Wt=i==null?void 0:i.availability)==null?void 0:Wt.acceptsInstantBookings);if(typeof w=="boolean")return w;const J=$s(Je.acceptsInstantBookings);if(typeof J=="boolean")return J;const be=$s(Ae.acceptsInstantBookings);return typeof be=="boolean"?be:!1},[(rn=i==null?void 0:i.availability)==null?void 0:rn.acceptsInstantBookings,Je.acceptsInstantBookings,Ae.acceptsInstantBookings]),nt=((an=i==null?void 0:i.availability)==null?void 0:an.requireOrganizationName)===!0||Je.requireOrganizationName===!0,Ce=typeof(o==null?void 0:o.organizationNameRequired)=="boolean"?o.organizationNameRequired:nt,{description:Xe,address:Te,galleryImages:pe,galleryVideos:it,amenityValues:et,capacityLabel:pt,subTypes:Oe,highlights:ke,hostProfile:vt,hostPhoto:lt,shareUrl:ft}=mi({transformedVenue:d,effectiveData:i,metadata:h,listing:o,hostProfileData:k,locationPathname:n.pathname,locationSearch:n.search}),{packages:De,getPackageById:_e}=ti(h.pricing),F=u.useMemo(()=>ni(De,o),[De,o]),Ne=null,$e=typeof((on=i==null?void 0:i.capacity)==null?void 0:on.min)=="number"?i.capacity.min:null,tt=typeof((ln=i==null?void 0:i.capacity)==null?void 0:ln.max)=="number"?i.capacity.max:null,{startDateTime:Pe,endDateTime:Ft}=u.useMemo(()=>{if(!le||!xe||!ce)return{startDateTime:"",endDateTime:""};try{return Lt(le,xe,ce)}catch{return{startDateTime:"",endDateTime:""}}},[le,xe,ce]),Ot=Qr(h.pricing),Ue=u.useMemo(()=>{const w=h.pricing;return(o==null?void 0:o.listingKind)==="venue"&&typeof(w==null?void 0:w.baseRate)=="number"&&w.baseRate>0},[h,o==null?void 0:o.listingKind]),{selectedPackageIds:ze,selectedPackageId:qe,selectedAddOns:rt,previewState:ne,togglePackage:ct,setSelectedPackage:Rt,toggleAddOn:Ct,setAddOnQuantity:Tt,sliderSelections:kt,setSliderSelections:$t,recheckPreview:gt}=ai({listingId:(o==null?void 0:o.listingId)??"",startTime:Pe||void 0,endTime:Ft||void 0,guestCount:Re>0?Re:void 0,venueHourlyOnlyPreview:Ue,packages:De}),Q=u.useMemo(()=>ze.map(w=>_e(w)).filter(w=>w!=null),[ze,_e]),Me=u.useMemo(()=>Q.find(w=>w.includesVenueRental)??Q.find(w=>w.pricingMode==="self_service_range")??Q[0]??null,[Q]),bt=Q.some(w=>w.includesVenueRental),yt=u.useMemo(()=>{const w=Q.map(J=>J.minAttendees).filter(J=>typeof J=="number");return w.length>0?Math.max(...w):null},[Q]),Ut=u.useMemo(()=>{const w=Q.map(J=>J.maxAttendees).filter(J=>typeof J=="number");return w.length>0?Math.min(...w):null},[Q]),{handleDateSelect:Ie,startTimeOptions:As,endTimeOptions:_s,startTimeMinTime:Es,startTimeMaxTime:ns,endTimeMinTime:rs,endTimeMaxTime:as}=ui({eventDate:le,setEventDate:Qe,startTime:xe,setStartTime:dt,endTime:ce,setEndTime:Ye,schedule:ye,availability:ae,blockedDates:ve,fixedDurationHours:Me==null?void 0:Me.durationHours}),{pricing:at,authoritativeVenueDisplayBreakdown:zt}=Mo({listing:o,transformedVenue:d,metadata:h,calculatedHours:je,selectedPackages:Q,guestCount:Re,eventDate:le,startTime:xe,endTime:ce,previewState:ne,selectedAddOns:rt}),os=u.useMemo(()=>{if(Yr(ne))return{subtotal:ne.subtotal,serviceFee:ne.serviceFee,total:ne.total,servedGuestTotalCents:ne.guestTotalCents,twoModelBreakdown:ne.twoModelBreakdown??null,feeDisclosure:ne.feeDisclosure??null,deposit:ne.deposit??null,pricingNotices:ne.pricingNotices??[],displayBreakdown:ne.displayBreakdown??null,taxStatus:ne.taxStatus,taxAmountCents:ne.taxAmountCents,taxJurisdictionCollected:ne.taxJurisdictionCollected};const w=at==null?void 0:at.pricingBreakdown;return{subtotal:(w==null?void 0:w.subtotal)??void 0,serviceFee:(w==null?void 0:w.serviceFee)??void 0,total:(w==null?void 0:w.total)??void 0,twoModelBreakdown:(w==null?void 0:w.twoModelBreakdown)??null,feeDisclosure:null,pricingNotices:[]}},[ne,at==null?void 0:at.pricingBreakdown]),is=u.useMemo(()=>Q.map(w=>({packageId:w.id,packageName:w.name,price:w.minPrice})),[Q]),ls=u.useMemo(()=>{const w=h.pricing,J=be=>{if(typeof be=="number"&&Number.isFinite(be))return be;if(typeof be=="string"){const Wt=Number(be);return Number.isFinite(Wt)?Wt:void 0}};return{baseRate:J(w==null?void 0:w.baseRate),cleaningFee:J(w==null?void 0:w.cleaningFee),minimumHours:J(w==null?void 0:w.minimumHours),overtimeRate:J(w==null?void 0:w.overtimeRate)}},[h.pricing]),{handleAddToCart:qt,cartLoading:cs,validateBeforeAnimate:ds}=qo({listing:o,transformedVenue:d,venueAddress:Te,contactOrg:D,contactPhone:L,specialRequests:x,eventDate:le,startTime:xe,endTime:ce,guestCount:Re,calculatedHours:je,selectedPackageIds:ze,selectedPackageNames:Q.map(w=>w.name),skipBaseRate:bt,selectedAddOns:rt,sliderSelections:kt,schedule:ye,blockedDates:ve,bookingWindowDays:typeof ae.bookingWindowDays=="number"?ae.bookingWindowDays:void 0,minimumLeadTimeHours:typeof ae.minimumLeadTimeHours=="number"?ae.minimumLeadTimeHours:void 0,venueCapacityMin:$e,venueCapacityMax:tt,packageGuestMin:yt,packageGuestMax:Ut,previewRefusal:ne.status==="error"&&ne.refused?ne.error??null:null,onPreviewRefused:gt,pricePending:ne.status==="loading"||ne.status==="success"&&!!ne.isRefreshing,authoritativePricing:os,venueDisplayBreakdown:zt,selectedPackagesPriced:is,venuePricing:ls}),{toast:Ht}=Xs(),Vt=w=>()=>{if(Ce&&!D.trim()){Ht({title:"Organization name required",description:"This host requires an organization name to book.",variant:"destructive"});return}w()},{handleRequestBooking:us,isRequestingBooking:ms,eventDeviations:xs,confirmEventDeviation:hs,dismissEventDeviation:M}=hi({listing:o,eventDate:le,startTime:xe,endTime:ce,guestCount:Re,calculatedHours:je,blockedDates:ve,availability:ae,venueCapacityMin:$e,venueCapacityMax:tt,packageGuestMin:yt,packageGuestMax:Ut,user:te,toast:Ht,onContinue:qt}),$=u.useCallback(async()=>{const w=++Se.current,J=V;if(!(o!=null&&o.listingId)||!J||!B||de){C(!1),N(null);return}try{const be=await _a(J,o.listingId);if(w!==Se.current||ge.current!==J)return;C(be.length>0),N(J)}catch(be){if(w!==Se.current||ge.current!==J)return;console.warn("Failed to check saved status:",be),C(!1),N(J)}},[de,B,o==null?void 0:o.listingId,V]);u.useEffect(()=>{$()},[$]),u.useEffect(()=>{b(!1)},[de,B,V]),u.useEffect(()=>{if(!(!V||!B||de))return Ea(V,()=>{$()})},[de,$,B,V]);const re=()=>{if(o!=null&&o.listingId&&!(!B||de)){if(!te){const w=`${n.pathname}${n.search}`;js(n.pathname)?Ns(w):(typeof window<"u"&&sessionStorage.setItem("postAuthRedirect",w),r(`/auth?redirect=${encodeURIComponent(w)}`));return}V&&b(!0)}},we=n.state,Ve=we==null?void 0:we.scrollToReviews,Mt=()=>{if(!o)return;const w=new URLSearchParams({listing:o.listingId});le&&w.set("date",le),xe&&w.set("start",xe),ce&&w.set("end",ce),Re!=null&&Re>0&&w.set("guests",String(Re)),r(`/send_message?${w.toString()}`)},jt=!!o&&nr(o),Dt=w=>{if(!o)return;if(jt){q(!0);return}if(!te){const be=`${n.pathname}${n.search}`;js(n.pathname)?Ns(be):(typeof window<"u"&&sessionStorage.setItem("postAuthRedirect",be),r(`/auth?redirect=${encodeURIComponent(be)}`));return}const J=w?_e(w):null;se(J&&J.requiresCustomQuote?{packageId:J.id,pricingMode:"negotiable_range",packageName:J.name,minPrice:J.minPrice,maxPrice:J.maxPrice,priceUnit:J.priceUnit??"per_event"}:null),S(!0)},Bs=(De.length>0||jt)&&!c&&!(te!=null&&te.publicId&&(o==null?void 0:o.ownerPublicId)===te.publicId)&&((dn=(cn=i==null?void 0:i.metadata)==null?void 0:cn.pricing)==null?void 0:dn.allowCustomQuotes)!==!1;ii({hash:n.hash,listingId:o==null?void 0:o.listingId,reviewsLength:(y==null?void 0:y.length)??0,scrollToReviewsToken:Ve});const St=d==null?void 0:d.name,ps=(un=i==null?void 0:i.location)==null?void 0:un.city,Sr=(mn=i==null?void 0:i.location)==null?void 0:mn.state,Ir=St?ps?`${St} · ${ps} | PLEC`:`${St} | PLEC`:"PLEC",Ar=Xe.slice(0,155).trimEnd()+(Xe.length>155?"…":"");if(Za({title:St?Ir:void 0,socialTitle:St?Po(St,(d==null?void 0:d.location)||(o==null?void 0:o.locationLabel),ps):void 0,description:Ar,image:pe==null?void 0:pe[0],canonical:`https://plec-it.com${n.pathname}`,type:"website"}),j){const w=j==null?void 0:j.includes("not a venue");return e.jsx(gs,{showSearch:!0,showFooter:!0,children:e.jsxs("div",{className:"mx-auto flex max-w-3xl flex-col items-center gap-6 px-6 py-24 text-center",children:[e.jsx(wn,{className:"h-12 w-12 text-gray-400"}),e.jsx("h1",{className:"text-3xl font-semibold text-gray-900",children:w?"Invalid Listing Type":"We couldn't load that venue"}),e.jsx("p",{className:"text-sm text-gray-600",children:j||"It may have been unpublished, removed, or the link is incorrect. Try searching again or reach out to our concierge team for help."}),e.jsx(ue,{asChild:!0,className:"rounded-full px-6",children:e.jsx("a",{href:w?"/services":"/venues",children:w?"Browse Services":"Back to search"})})]})})}if(g)return e.jsx(gs,{showSearch:!0,showFooter:!0,children:l?e.jsx(pi,{}):e.jsx(fi,{})});if(!o||!d){const w=j==null?void 0:j.includes("not a venue");return e.jsx(gs,{showSearch:!0,showFooter:!0,children:e.jsxs("div",{className:"mx-auto flex max-w-3xl flex-col items-center gap-6 px-6 py-24 text-center",children:[e.jsx(wn,{className:"h-12 w-12 text-gray-400"}),e.jsx("h1",{className:"text-3xl font-semibold text-gray-900",children:w?"Invalid Listing Type":"We couldn't load that venue"}),e.jsx("p",{className:"text-sm text-gray-600",children:j||"It may have been unpublished, removed, or the link is incorrect. Try searching again or reach out to our concierge team for help."}),e.jsx(ue,{asChild:!0,className:"rounded-full px-6",children:e.jsx("a",{href:w?"/services":"/venues",children:w?"Browse Services":"Back to search"})})]})})}const Gt=(o==null?void 0:o.bookable)===!1&&(o==null?void 0:o.notBookableReason)==="stripe_not_ready",fs=!!(te!=null&&te.publicId&&(o==null?void 0:o.ownerPublicId)===te.publicId),nn={listing:o,transformedVenue:d,metadata:h,venueStartingPrice:F,address:Te,description:Xe,galleryImages:pe,galleryVideos:it,amenityValues:et,subTypes:Oe,highlights:ke,capacityLabel:pt,availability:ae,schedule:ye,blockedDates:ve,bookingWindowDays:typeof ae.bookingWindowDays=="number"?ae.bookingWindowDays:void 0,minimumLeadTimeHours:typeof ae.minimumLeadTimeHours=="number"?ae.minimumLeadTimeHours:void 0,packages:De,selectedPackageId:qe,selectedPackageIds:ze,selectedPackage:Me,selectedPackages:Q,onSelectPackage:Rt,onTogglePackage:ct,addOns:Ot,selectedAddOns:rt,onToggleAddOn:Ct,onSetAddOnQuantity:Tt,pricing:at,authoritativeVenueDisplayBreakdown:zt,reviews:y,listingId:o==null?void 0:o.listingId,avgRating:v,totalReviews:p,hostProfile:vt,hostPhoto:lt,isSaved:B&&!de&&R===V&&V?I:!1,savingVenue:!1,onSaveVenue:(o==null?void 0:o.status)==="published"?re:void 0,eventDate:le,setEventDate:Ie,startTime:xe,setStartTime:dt,endTime:ce,setEndTime:Ye,guestCount:Re,setGuestCount:ut,durationHours:mt,durationMinutes:xt,setDurationMinutes:ht,startTimeMinTime:Es,startTimeMaxTime:ns,endTimeMinTime:rs,endTimeMaxTime:as,startTimeOptions:As,endTimeOptions:_s,onAddToCart:c||!vn(o==null?void 0:o.status)||fs||Gt?()=>{Ht({title:Gt?"Bookings are paused":"Not available",description:fs?"You cannot book your own listing.":Gt?Ya:"Publish this listing to accept bookings.",variant:"destructive"})}:Vt(Ze?qt:us),cartLoading:Ze?cs:ms,validateBeforeAnimate:Ze?ds:void 0,isPricingBreakdownOpen:z,setIsPricingBreakdownOpen:oe,isBookingDetailsOpen:W,setIsBookingDetailsOpen:G,onShareClick:ie,acceptsInstantBookings:Ze,specialRequests:x,setSpecialRequests:A,contactOrg:D,setContactOrg:E,requireOrganizationName:Ce,contactPhone:L,setContactPhone:X,onRequestCustomQuote:Bs?Dt:void 0,onRequestPackageQuote:w=>Dt(w),bookingDisabled:c||!vn(o==null?void 0:o.status)||fs||Gt,bookingDisabledMessage:fs?"You cannot book your own listing.":Gt?Ja:"Publish this listing to accept bookings.",venueCapacityMin:$e,venueCapacityMax:tt,packageGuestMin:yt,packageGuestMax:Ut,previewState:ne,plannerCalendarHighlights:Ne,sliderSelections:kt,onSliderSelectionsChange:$t};return e.jsxs(gs,{showSearch:!0,showFooter:!0,children:[c&&e.jsx("div",{className:"bg-amber-50 border-b border-amber-200 px-4 py-3 text-center",children:e.jsxs("p",{className:"text-sm text-amber-800",children:[e.jsx("span",{className:"font-semibold",children:"Preview Mode:"})," This is a draft listing preview. The listing is not yet published."]})}),te&&(o==null?void 0:o.hostCancellationWarning)&&e.jsx("div",{className:"bg-yellow-50 border-b border-yellow-200 px-4 py-3 text-center",children:e.jsx("p",{className:"text-sm text-yellow-800",children:"⚠️ This host has a history of last-minute cancellations."})}),l?e.jsx(So,{...nn,onMessageHost:Mt}):e.jsx(Io,{...nn,onMessageHost:Mt,stickyCardRef:K,stickyCardPosition:he}),(o==null?void 0:o.listingId)&&!c&&e.jsx(xi,{venueId:o.listingId,eventDate:le||void 0}),e.jsx(Vo,{open:me,onOpenChange:ee,openerRef:Y,shareUrl:ft,isMobile:l}),e.jsx(Ia,{open:f&&B&&!de&&!!V,onOpenChange:b,listingId:(o==null?void 0:o.listingId)??"",listingTitle:d==null?void 0:d.name,listingImageUrl:pe==null?void 0:pe[0],onSavedChange:()=>{U&&Fs("listing_saved",{listingId:U}),$(),window.dispatchEvent(new CustomEvent("savedVenuesChanged"))}}),e.jsx(Jr,{deviations:xs,onConfirm:hs,onCancel:M}),o&&jt&&e.jsx(Go,{open:O,onClose:()=>q(!1),listingId:o.listingId,venueName:St||"this venue",venueCity:ps,venueState:Sr}),o&&e.jsx(Va,{open:T,onClose:()=>{S(!1),se(null)},listingId:o.listingId,defaultEventDate:le||void 0,defaultGuestCount:Re>0?Re:void 0,defaultStartTime:xe||void 0,defaultEndTime:ce||void 0,packageId:_==null?void 0:_.packageId,pricingMode:_==null?void 0:_.pricingMode,packageName:_==null?void 0:_.packageName,negotiatedFrom:_?{packageId:_.packageId,minPrice:_.minPrice,maxPrice:_.maxPrice,priceUnit:_.priceUnit}:void 0})]})},pi=()=>e.jsxs("div",{className:"flex flex-col min-h-screen",children:[e.jsx(P,{className:"h-[360px] w-full rounded-none shrink-0"}),e.jsxs("div",{className:"bg-card -mt-8 relative z-10 rounded-t-[32px] pt-8 flex-1",children:[e.jsxs("div",{className:"px-6 pb-6 space-y-3 text-center",children:[e.jsx(P,{className:"h-8 w-3/4 mx-auto"}),e.jsx(P,{className:"h-4 w-32 mx-auto"}),e.jsxs("div",{className:"flex justify-center gap-2",children:[e.jsx(P,{className:"h-6 w-16 rounded-full"}),e.jsx(P,{className:"h-6 w-20 rounded-full"}),e.jsx(P,{className:"h-6 w-12 rounded-full"})]})]}),e.jsxs("div",{className:"px-6 pb-8 space-y-6",children:[e.jsx(P,{className:"h-4 w-full"}),e.jsx(P,{className:"h-4 w-full"}),e.jsx(P,{className:"h-7 w-28"}),e.jsx("div",{className:"space-y-3",children:[1,2].map(t=>e.jsx(P,{className:"h-20 w-full rounded-2xl"},t))}),e.jsx(P,{className:"h-7 w-36"}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx(P,{className:"h-14 w-14 rounded-full shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(P,{className:"h-5 w-28"}),e.jsx(P,{className:"h-4 w-full"})]})]})]})]}),e.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-card border-t p-4",children:e.jsx(P,{className:"h-12 w-full rounded-full"})})]}),fi=()=>e.jsx("div",{className:"mx-auto w-full max-w-7xl px-6 pb-24 pt-10 md:px-8",children:e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-3 md:flex-row md:items-start md:justify-between",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(P,{className:"h-4 w-28 mb-2"}),e.jsx(P,{className:"h-10 w-2/5 mt-2"}),e.jsxs("div",{className:"flex gap-2 mt-3",children:[e.jsx(P,{className:"h-7 w-24 rounded-full"}),e.jsx(P,{className:"h-7 w-28 rounded-full"}),e.jsx(P,{className:"h-7 w-16 rounded-full"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(P,{className:"h-10 w-28 rounded-full"}),e.jsx(P,{className:"h-10 w-24 rounded-full"})]})]}),e.jsx(P,{className:"h-[24rem] w-full rounded-[32px] md:rounded-r-none"}),e.jsxs("div",{className:"flex flex-col gap-10 lg:flex-row",children:[e.jsxs("div",{className:"flex-1 min-w-0 space-y-10",children:[e.jsxs("section",{className:"space-y-4",children:[e.jsx(P,{className:"h-4 w-full"}),e.jsx(P,{className:"h-4 w-full max-w-[85%]"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(P,{className:"h-7 w-48"}),[1,2,3].map(t=>e.jsx(P,{className:"h-28 w-full rounded-2xl"},t))]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(P,{className:"h-7 w-44"}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(P,{className:"h-20 w-20 rounded-full shrink-0"}),e.jsxs("div",{className:"flex-1 space-y-2",children:[e.jsx(P,{className:"h-5 w-32"}),e.jsx(P,{className:"h-4 w-full"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(P,{className:"h-7 w-36"}),e.jsx(P,{className:"h-[280px] w-full rounded-2xl"})]})]}),e.jsx("aside",{className:"w-full lg:w-[360px] xl:w-[400px] lg:flex-shrink-0",children:e.jsx("div",{className:"sticky top-24 space-y-6",children:e.jsxs("div",{className:"rounded-[32px] border border-border/70 p-6 shadow-xl space-y-4",children:[e.jsx(P,{className:"h-16 w-16 rounded-full mx-auto"}),e.jsx(P,{className:"h-5 w-28 mx-auto"}),e.jsx(P,{className:"h-4 w-40 mx-auto"}),e.jsxs("div",{className:"flex justify-center gap-2 pt-2",children:[e.jsx(P,{className:"h-8 w-8 rounded-full"}),e.jsx(P,{className:"h-8 w-8 rounded-full"}),e.jsx(P,{className:"h-8 w-8 rounded-full"})]}),e.jsx(P,{className:"h-px w-full"}),e.jsx(P,{className:"h-12 w-full rounded-full"}),e.jsx(P,{className:"h-10 w-full rounded-full"})]})})})]})]})});export{yl as default};