1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1632],{9:(e,t,r)=>{var a=r(7925);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},2184:(e,t,r)=>{r.d(t,{ND:()=>u,Zk:()=>o,nW:()=>x});var a=r(4023),s=r(3415),l=r(6237);let n="https://cfhyihgoibyfpaxnxxgm.supabase.co".trim(),i="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImNmaHlpaGdvaWJ5ZnBheG54eGdtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODIzMTU1NzAsImV4cCI6MjA5Nzg5MTU3MH0.er-Mhmpd5jXtblY5lTwtuhX634MHwoeguwKxf820hPg".trim(),o=n.length>0&&i.length>0&&!n.includes("build-placeholder.supabase.co")&&!i.includes("build-placeholder"),d=o?n:"http://127.0.0.1:54321",c=o?i:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.e30.invalid-env-placeholder",m=(0,l.gt)();function x(e){m.set(e)}let u=(0,a.UU)(d,c,{global:{fetch:(0,l.n3)(m)},auth:{storage:(0,s.w)(),storageKey:"sb-guild-auth",persistSession:!0,autoRefreshToken:!0,detectSessionInUrl:!0}})},5016:(e,t,r)=>{r.d(t,{A:()=>D});var a=r(9600),s=r(5932),l=r(893),n=r(9),i=r(644),o=r(1670),d=r(3474),c=r(5701),m=r(4054),x=r(8754),u=r(800),b=r(5358),h=r(4601),p=r(8411),f=r(2184),g=r(8501);function v(e){var t;let{open:r,onClose:l,selectedService:n,selectedDate:i,stylistChoices:d,defaultPreferredTime:c="",defaultTeamMemberId:m=null}=e,[x,u]=(0,s.useState)(""),[h,v]=(0,s.useState)(""),[y,w]=(0,s.useState)(""),[j,N]=(0,s.useState)(()=>(0,g.GP)(i,"yyyy-MM-dd")),[k,M]=(0,s.useState)(c),[S,E]=(0,s.useState)(""),[C,P]=(0,s.useState)(""),[A,_]=(0,s.useState)(d),[I,D]=(0,s.useState)(!1),[G,L]=(0,s.useState)(null),[z,R]=(0,s.use
1State)(!1);if((0,s.useEffect)(()=>{r&&(N((0,g.GP)(i,"yyyy-MM-dd")),M(c),E(null!=m?m:""),L(null),R(!1))},[r,i,c,m]),(0,s.useEffect)(()=>{r&&_(d)},[r,d]),(0,s.useEffect)(()=>{if(!r||d.length>0)return;let e=!1;return(async()=>{try{let{data:t,error:r}=await f.ND.from("team_members").select("id, name").eq("is_active",!0).eq("show_on_site",!0).order("name");if(r)throw r;!e&&t&&_(t.map(e=>({id:e.id,name:e.name})))}catch(t){e||_([])}})(),()=>{e=!0}},[r,d.length]),(0,s.useEffect)(()=>{if(!r)return;let e=e=>{"Escape"===e.key&&l()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r,l]),!r)return null;let F=async e=>{if(e.preventDefault(),!n)return void L("Please select a service from the booking search first.");if(!x.trim())return void L("Please enter your name.");let t=(0,p.DTn)(h);if(!t.ok)return void L(t.error);let r=(0,p.P6I)(y);if(!r.ok)return void L(r.error);if(!k.trim())return void L("Please enter a preferred time (for example 2:00 PM or âmorningâ).");D(!0),L(null);try{await (0,p.H4b)({serviceId:n.id,teamMemberId:S||null,preferredDate:j,preferredTime:k.trim(),contactName:x.trim(),contactEmail:t.normalized,contactPhone:r.normalized,clientNotes:C.trim()||null}),R(!0)}catch(e){L(e instanceof Error?e.message:"Something went wrong. Please try again.")}finally{D(!1)}};return(0,a.jsxs)("div",{className:"fixed inset-0 z-[10000] flex items-end sm:items-center justify-center p-0 sm:p-4",children:[(0,a.jsx)("button",{type:"button",className:"absolute inset-0 bg-black/50","aria-label":"Close",onClick:l}),(0,a.jsxs)("div",{className:"relative w-full sm:max-w-md max-h-[92dvh] overflow-y-auto rounded-t-2xl sm:rounded-2xl bg-white shadow-xl border border-gray-200",role:"dialog","aria-modal":"true","aria-labelledby":"waitlist-modal-title",children:[(0,a.jsxs)("div",{className:"sticky top-0 flex items-center justify-between gap-3 px-4 py-3 border-b border-gray-100 bg-white z-10",children:[(0,a.jsx)("h2",{id:"waitlist-modal-title",className:"text-base font-semibold text-[#000000]",children:"Join the waitlist"}),(0,a.jsx)("button",{type:"button",onClick:l,className:"p-2 rounded-lg hover:bg-gray-100 text-gray-500","aria-label":"Close",children:(0,a.jsx)(o.A,{className:"w-5 h-5"})})]}),(0,a.jsx)("div",{className:"p-4 sm:p-5",children:z?(0,a.jsxs)("div",{className:"text-center py-4",children:[(0,a.jsx)("p",{className:"text-sm text-[#5a4032] mb-4",children:"Thank you â we've received your request. We'll contact you if a slot opens up."}),(0,a.jsx)("button",{type:"button",onClick:l,className:"w-full py-2.5 rounded-lg bg-[var(--brand-primary)] text-white text-sm font-semibold hover:bg-[var(--brand-accent)]",children:"Close"})]}):(0,a.jsxs)("form",{onSubmit:F,className:"space-y-3",children:[(0,a.jsx)("p",{className:"text-xs text-gray-600 leading-relaxed",children:"Your booking preferences are pre-filled from your search. Add your contact details and submit."}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Service"}),(0,a.jsx)("input",{type:"text",readOnly:!0,value:null!=(t=null==n?void 0:n.service_name)?t:"â Select a service above first â",className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-lg bg-gray-50 text-gray-800"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Preferred date"}),(0,a.jsx)("input",{type:"date",required:!0,value:j,onChange:e=>N(e.target.value),className:"w-full px-2 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Preferred time"}),(0,a.jsx)("input",{type:"text",required:!0,value:k,onChange:e=>M(e.target.value),placeholder:"e.g. 2:00 PM",className:"w-full px-2 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Preferred stylist"}),(0,a.jsxs)("select",{value:S,onChange:e=>E(e.target.value),className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]",children:[(0,a.jsx)("option",{value:"",children:"No preference"}),A.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name},e.id))]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Your name"}),(0,a.jsx)("input",{type:"text",required:!0,value:x,onChange:e=>u(e.target.value),autoComplete:"name",className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Email"}),(0,a.jsx)("input",{type:"email",required:!0,value:h,onChange:e=>v(e.target.value),autoComplete:"email",className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Phone"}),(0,a.jsx)("input",{type:"tel",required:!0,value:y,onChange:e=>w(e.target.value),autoComplete:"tel",className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-600 mb-1",children:"Notes (optional)"}),(0,a.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),rows:2,className:"w-full px-3 py-2 text-sm border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)] resize-none",placeholder:"Anything else we should know?"})]}),G&&(0,a.jsx)("p",{className:"text-xs text-red-600",role:"alert",children:G}),(0,a.jsx)("button",{type:"submit",disabled:I||!n,className:"w-full py-2.5 rounded-lg bg-[var(--brand-primary)] text-white text-sm font-semibold hover:bg-[var(--brand-accent)] disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2",children:I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.A,{className:"w-4 h-4 animate-spin"}),"Sendingâ¦"]}):"Submit waitlist request"})]})})]})]})}var y=r(8322),w=r(9999),j=r(5642),N=r(3772),k=r(8818),M=r(8211),S=r(2457);let E="flex gap-1 overflow-x-auto overscroll-x-contain pb-0.5 snap-x snap-mandatory flex-1 md:flex-initial [scrollbar-width:thin] [scrollbar-color:rgba(179,156,77,0.38)_transparent] [&::-webkit-scrollbar]:h-[5px] [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-track]:bg-[#e0d6c8]/35 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[var(--brand-primary)]/35 [&::-webkit-scrollbar-thumb]:hover:bg-[var(--brand-primary)]/55";function C(e){let{children:t,className:r=""}
1=e,l=(0,s.useRef)(null),[n,o]=(0,s.useState)(!1),d=(0,s.useCallback)(()=>{let e=l.current;e&&o(e.scrollHeight-e.scrollTop-e.clientHeight>16)},[]);return(0,s.useEffect)(()=>{let e=l.current;if(!e)return;d();let t=new ResizeObserver(d);return t.observe(e),e.firstElementChild&&t.observe(e.firstElementChild),()=>t.disconnect()},[d,t]),(0,a.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,a.jsx)("div",{ref:l,onScroll:d,className:"".concat("overflow-y-auto overscroll-contain [-webkit-overflow-scrolling:touch] [scrollbar-width:thin] [scrollbar-color:rgba(179,156,77,0.55)_#f4efe6] [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-track]:bg-[#e0d6c8]/40 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-[var(--brand-primary)]/55"," h-full ").concat(r),children:t}),n?(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-14 bg-gradient-to-t from-white via-white/80 to-transparent flex items-end justify-center pb-1.5",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[11px] font-medium text-[#5a4032] bg-white/95 px-2.5 py-1 rounded-full shadow-sm border border-[#e0d6c8]",children:["Scroll for more",(0,a.jsx)(i.A,{className:"w-3.5 h-3.5","aria-hidden":!0})]})}):null]})}function P(e){let{open:t,onClose:r,title:n,titleId:i,headerExtra:d,children:c,sheetRef:m,compact:x=!1}=e,u=function(e){let[t,r]=(0,s.useState)({height:0,offsetTop:0});return(0,s.useEffect)(()=>{var t,a;if(!e)return;let s=()=>{var e,t;let a=window.visualViewport;r({height:null!=(e=null==a?void 0:a.height)?e:window.innerHeight,offsetTop:null!=(t=null==a?void 0:a.offsetTop)?t:0})};return s(),null==(t=window.visualViewport)||t.addEventListener("resize",s),null==(a=window.visualViewport)||a.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{var e,t;null==(e=window.visualViewport)||e.removeEventListener("resize",s),null==(t=window.visualViewport)||t.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[e]),t}(t);if((0,s.useEffect)(()=>{if(!t)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[t]),(0,s.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"===e.key&&r()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t,r]),!t)return null;let b=u.height>0?u.height:void 0;return(0,l.createPortal)((0,a.jsxs)("div",{className:"md:hidden",style:{position:"fixed",top:u.offsetTop,left:0,right:0,height:null!=b?b:"100dvh",zIndex:9999},children:[(0,a.jsx)("button",{type:"button",className:"absolute inset-0 bg-black/50","aria-label":"Close",onClick:r}),(0,a.jsxs)("div",{ref:m,role:"dialog","aria-modal":"true","aria-labelledby":i,className:"absolute inset-x-0 bottom-0 flex flex-col bg-white rounded-t-2xl shadow-xl border border-gray-200 overflow-hidden",style:{height:x?"auto":b?Math.max(b-12,240):"calc(100% - 12px)",maxHeight:b?Math.max(b-12,240):"calc(100% - 12px)",paddingBottom:"env(safe-area-inset-bottom)"},children:[(0,a.jsx)("div",{className:"shrink-0 flex justify-center pt-2 pb-1",children:(0,a.jsx)("div",{className:"w-10 h-1 rounded-full bg-gray-300","aria-hidden":!0})}),(0,a.jsxs)("div",{className:"shrink-0 flex items-center justify-between gap-3 px-4 pb-2",children:[(0,a.jsx)("h2",{id:i,className:"text-base font-semibold text-[#000000]",children:n}),(0,a.jsx)("button",{type:"button",onClick:r,className:"p-2 -mr-1 rounded-lg hover:bg-gray-100 text-gray-500 min-w-11 min-h-11 flex items-center justify-center","aria-label":"Close",children:(0,a.jsx)(o.A,{className:"w-5 h-5"})})]}),d,(0,a.jsx)("div",{className:x?"flex flex-col":"flex-1 min-h-0 flex flex-col",children:c})]})]}),document.body)}function A(e){let{grouped:t,onSelect:r}=e,[l,n]=(0,s.useState)(null),i=(0,s.useRef)(null);return((0,s.useEffect)(()=>{let e=new Set(Object.values(t).flatMap(e=>e.map(e=>e.id)));n(t=>t&&e.has(t)?t:null)},[t]),(0,s.useEffect)(()=>{var e;l&&(null==(e=i.current)||e.scrollIntoView({block:"nearest"}))},[l]),0===Object.keys(t).length)?(0,a.jsx)("div",{className:"p-4 text-gray-500 text-sm",children:"No services found"}):(0,a.jsx)(a.Fragment,{children:Object.entries(t).map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"px-4 py-2 bg-gray-50 font-semibold text-sm text-[#000000] sticky top-0 z-[1]",children:t}),s.map(e=>{var t;let s=l===e.id,o=(e.what_it_is||e.service_description||"").trim(),c=null==(t=e.starting_from_price)||Number.isNaN(Number(t))||0>=Number(t)?null:"From \xa3".concat(Number(t).toFixed(2)),m="service-info-".concat(e.id);return(0,a.jsxs)("div",{ref:s?i:void 0,children:[(0,a.jsxs)("div",{className:"flex items-stretch border-b border-gray-100",children:[(0,a.jsx)("button",{type:"button",onClick:()=>r(e),className:"flex-1 min-h-11 min-w-0 px-4 py-3 text-left hover:bg-[#f8f4ef] active:bg-[#f4efe6] text-sm touch-manipulation",children:(0,a.jsx)("span",{className:"block leading-snug",children:e.service_name})}),(0,a.jsx)("button",{type:"button",onClick:()=>n(t=>t===e.id?null:e.id),className:"shrink-0 min-w-11 min-h-11 px-2 flex items-center justify-center touch-manipulation ".concat(s?"text-[var(--brand-primary)] bg-[#f8f4ef]":"text-[#8a7060] hover:bg-[#f8f4ef] hover:text-[var(--brand-primary)]"),"aria-expanded":s,"aria-controls":m,"aria-label":s?"Hide details for ".concat(e.service_name):"About ".concat(e.service_name),children:(0,a.jsx)(d.A,{className:"w-5 h-5","aria-hidden":!0})})]}),s?(0,a.jsxs)("div",{id:m,role:"region","aria-label":"".concat(e.service_name," details"),className:"px-4 py-3 bg-[#faf8f5] border-b border-gray-100",children:[e.short_tagline?(0,a.jsx)("p",{className:"text-sm text-[#5a4032] leading-relaxed mb-2",children:e.short_tagline}):null,e.avg_duration||c?(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-xs text-[#5a4032] mb-2",children:[e.avg_duration?(0,a.jsxs)("span",{children:["Duration: ",e.avg_duration]}):null,c?(0,a.jsx)("span",{children:c}):null]}):null,o&&o!==e.short_tagline?(0,a.jsx)("p",{className:"text-sm text-[#000000]/80 leading-relaxed mb-3 line-clamp-4",children:o}):null,e.best_for?(0,a.jsxs)("p",{className:"text-xs text-[#5a4032] mb-3 line-clamp-2",children:["Best for: ",e.best_for]}
1):null,(0,a.jsx)("button",{type:"button",onClick:()=>r(e),className:"w-full min-h-11 px-4 py-2.5 bg-[var(--brand-primary)] text-white text-sm font-semibold rounded-lg hover:bg-[var(--brand-accent)] touch-manipulation",children:"Select this service"})]}):null]},e.id)})]},t)})})}function _(e){let{calendarMonth:t,selectedDate:r,weeks:s,dayClassName:l,onPrevMonth:n,onNextMonth:i,onSelectDay:o}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("button",{type:"button",onClick:n,className:"p-2 min-w-11 min-h-11 hover:bg-gray-100 rounded-lg flex items-center justify-center","aria-label":"Previous month",children:(0,a.jsx)(c.A,{className:"w-5 h-5"})}),(0,a.jsx)("span",{className:"font-semibold",children:(0,g.GP)(t,"MMMM yyyy")}),(0,a.jsx)("button",{type:"button",onClick:i,className:"p-2 min-w-11 min-h-11 hover:bg-gray-100 rounded-lg flex items-center justify-center","aria-label":"Next month",children:(0,a.jsx)(m.A,{className:"w-5 h-5"})})]}),(0,a.jsx)("div",{className:"grid grid-cols-7 gap-1 text-center text-xs text-gray-500 mb-2",children:["Su","Mo","Tu","We","Th","Fr","Sa"].map(e=>(0,a.jsx)("div",{children:e},e))}),s.map((e,s)=>(0,a.jsx)("div",{className:"grid grid-cols-7 gap-1",children:e.map(e=>{let s=function(e,t,r){let[a,s]=(0,y.x)(void 0,e,t);return a.getFullYear()===s.getFullYear()&&a.getMonth()===s.getMonth()}(e,t),n=(0,w.r)(e,r),i=(0,j.Y)((0,N.o)(e),(0,N.o)(new Date));return(0,a.jsx)("button",{type:"button",onClick:()=>{i||o(e)},disabled:i,className:"".concat(l," ").concat(s?i?"text-gray-300 cursor-not-allowed":n?"bg-[var(--brand-primary)] text-white":"hover:bg-gray-100":"text-gray-300"),children:(0,g.GP)(e,"d")},e.toISOString())})},s))]})}function I(e){let[t,r]=e.split(":"),a=parseInt(t,10),s=r||"00";return 0===a?"12:".concat(s," AM"):12===a?"12:".concat(s," PM"):a<12?"".concat(a,":").concat(s," AM"):"".concat(a-12,":").concat(s," PM")}function D(e){let{services:t,hideTitle:r=!1}=e,o=(0,n.useRouter)(),[d,f]=(0,s.useState)(null),[y,D]=(0,s.useState)(()=>{let e=new Date;return e.setHours(0,0,0,0),e}
1),[G,L]=(0,s.useState)(!1),[z,R]=(0,s.useState)(!1),[F,T]=(0,s.useState)(null),[O,Y]=(0,s.useState)(!1),[J,B]=(0,s.useState)(!1),[U,H]=(0,s.useState)(""),[V,W]=(0,s.useState)(new Date),q=(0,s.useRef)(null),X=(0,s.useRef)(null),Z=(0,s.useRef)(null),K=(0,s.useRef)(null),Q=(0,s.useRef)(null),$=(0,s.useRef)(null),ee=function(){let[e,t]=(0,s.useState)(()=>window.matchMedia("(max-width: 767px)").matches);return(0,s.useEffect)(()=>{let e=window.matchMedia("(max-width: 767px)"),r=()=>t(e.matches);return r(),e.addEventListener("change",r),()=>e.removeEventListener("change",r)},[]),e}(),[et,er]=(0,s.useState)(null),[ea,es]=(0,s.useState)(null),[el,en]=(0,s.useState)(null),[ei,eo]=(0,s.useState)(!1),ed=(0,s.useMemo)(()=>{let e={};return t.forEach(t=>{e[t.category]||(e[t.category]=[]),e[t.category].push(t)}),Object.keys(e).forEach(t=>{e[t].sort((e,t)=>e.service_name.localeCompare(t.service_name))}),e},[t]),ec=(0,s.useMemo)(()=>{var e;if(!(null==F||null==(e=F.slots)?void 0:e.length))return[];let t=new Map;for(let e of F.slots)t.set(e.teamMemberId,e.teamMemberName);return[...t.entries()].map(e=>{let[t,r]=e;return{id:t,name:r}})},[null==F?void 0:F.slots]),em=(0,s.useMemo)(()=>{if(!U.trim())return ed;let e=U.toLowerCase(),t={};return Object.entries(ed).forEach(r=>{let[a,s]=r,l=s.filter(t=>{var r;return t.service_name.toLowerCase().includes(e)||(null==(r=t.short_tagline)?void 0:r.toLowerCase().includes(e))||t.category.toLowerCase().includes(e)});l.length&&(t[a]=l)}),t},[U,ed]);(0,s.useEffect)(()=>{let e=e=>{var t,r,a,s,l,n;let i=e.target;(null==(t=q.current)?void 0:t.contains(i))||(null==(r=Z.current)?void 0:r.contains(i))||(null==(a=Q.current)?void 0:a.contains(i))||Y(!1),(null==(s=X.current)?void 0:s.contains(i))||(null==(l=K.current)?void 0:l.contains(i))||(null==(n=$.current)?void 0:n.contains(i))||B(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,s.useEffect)(()=>{O&&Q.current&&er(Q.current.getBoundingClientRect())},[O]),(0,s.useEffect)(()=>{J&&$.current&&es($.current.getBoundingClientRect())},[J]),(0,s.useEffect)(()=>{let e=()=>{O&&Q.current&&er(Q.current.getBoundingClientRect()),J&&$.current&&es($.current.getBoundingClientRect())};return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[O,J]),(0,s.useEffect)(()=>{en(null)},[F]);let ex=async e=>{if(d){L(!0),R(!0),T(null);try{let t=await (0,p.mSD)(d.id,e);T(t)}catch(e){console.error("Error fetching availability:",e),T({hasSlots:!1,slots:[],nextAvailableDate:null,nextAvailableSlot:null})}finally{R(!1)}}},eu=e=>{if(!d)return;let t=new Date(e.date);if(t.getTime()<Date.now())return;let r=new URLSearchParams({date:t.toISOString(),time:e.time,teamMemberId:e.teamMemberId});o.push("/service-item/".concat(d.service_slug,"?").concat(r.toString(),"#booking-section"))},eb=()=>{let e=(null==F?void 0:F.nextAvailableSlot)?(0,N.o)(F.nextAvailableSlot.date):null==F?void 0:F.nextAvailableDate;e&&(D(e),W(e),B(!1),ex(e))},eh=(0,s.useMemo)(()=>{let e=(0,k.k)(V,{weekStartsOn:0}),t=[];for(let r=0;r<6;r++)t.push((0,M.k)({start:(0,S.f)(e,7*r),end:(0,S.f)(e,7*r+6)}));return t},[V]);return 0===t.length?null:(0,a.jsxs)("div",{className:"rounded-2xl bg-[#f4efe6] border border-[#e0d6c8] shadow-sm p-4 sm:p-6 md:p-8",children:[!r&&(0,a.jsxs)("div",{className:"shrink-0",children:[(0,a.jsx)("h2",{className:"text-xl sm:text-2xl font-bold text-[#000000] mb-1 md:mb-2",children:"Book Now"}),(0,a.jsx)("p",{className:"text-sm md:text-base text-[#5a4032] mb-3 md:mb-6 leading-snug",children:"Select a service and date to see availability."})]}),(0,a.jsx)("div",{className:"rounded-2xl bg-gradient-to-br from-white to-[#fdfaf4] p-3 sm:p-4 md:p-6 shadow-[0_18px_50px_-14px_rgba(74,55,40,0.45),0_4px_14px_-4px_rgba(179,156,77,0.35)] border-2 border-[var(--brand-primary)]/65 ring-2 ring-[var(--brand-primary)]/25 ring-offset-2 ring-offset-[#f4efe6] mb-3 md:mb-6",children:(0,a.jsxs)("div",{className:"flex flex-col md:flex-row gap-3 md:gap-4 md:items-end",children:[(0,a.jsxs)("div",{className:"flex-1 relative",ref:Q,children:[(0,a.jsx)("label",{id:"book-now-service-label",className:"block text-xs font-medium text-gray-500 mb-1",children:"Select Service"}),(0,a.jsxs)("button",{type:"button",onClick:()=>{B(!1),H(""),Y(!0)},"aria-haspopup":"dialog","aria-expanded":O,"aria-label":d?"Service: ".concat(d.service_name):"Select a service",className:"md:hidden relative w-full min-h-11 px-3 py-2.5 pr-10 border border-gray-300 rounded-lg text-left text-base touch-manipulation",children:[(0,a.jsx)("span",{className:d?"text-[#000000] line-clamp-1":"text-gray-400",children:(null==d?void 0:d.service_name)||"Select Service"}),(0,a.jsx)(i.A,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400 transition-transform ".concat(O?"rotate-180":""),"aria-hidden":!0})]}),(0,a.jsxs)("div",{className:"relative hidden md:block",children:[(0,a.jsx)("input",{id:"book-now-service-desktop",type:"text",value:O?U:(null==d?void 0:d.service_name)||"",onChange:e=>{H(e.target.value),Y(!0)},onFocus:()=>{B(!1),Y(!0)},placeholder:"Select Service",autoComplete:"off",className:"w-full px-3 py-2.5 md:px-4 md:py-3 pr-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)] outline-none text-sm md:text-base"}),(0,a.jsx)(i.A,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400 transition-transform ".concat(O?"rotate-180":""),"aria-hidden":!0})]}),ee?(0,a.jsx)(P,{open:O,onClose:()=>{Y(!1),H("")},title:"Select a service",titleId:"book-now-service-sheet-title",sheetRef:Z,headerExtra:(0,a.jsxs)("div",{className:"shrink-0 px-4 pb-3",children:[(0,a.jsx)("label",{htmlFor:"book-now-service-search",className:"sr-only",children:"Search services"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(x.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400","aria-hidden":!0}),(0,a.jsx)("input",{id:"book-now-service-search",type:"text",inputMode:"search",value:U,onChange:e=>H(e.target.value),placeholder:"Search services",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,enterKeyHint:"search",className:"w-full min-h-11 pl-9 pr-3 py-2.5 border border-gray-300 rounded-lg text-base outline-none focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)]"})]}),(0,a.jsx)("p",{className:"mt-2 text-xs text-[#5a4032]",children:"Scroll to browse, or type to filter."})]}),children:(0,a.jsx)(C,{children:(0,a.jsx)(A,{grouped:em,onSelect:e=>{f(e),H(""),Y(!1)}})})}):O&&et&&(0,l.createPortal)((0,a.jsx)("div",{ref:q,style:{position:"fixed",top:et.bottom+4,left:et.left,width:et.width,zIndex:9999},className:"bg-white border border-gray-200 rounded-lg shadow-lg max-h-80 overflow-y-auto",children:(0,a.jsx)(A,{grouped:em,onSelect:e=>{f(e),H(""),Y(!1)}})}),document.body)]}),(0,a.jsxs)("div",{className:"flex-1 relative",ref:$,children:[(0,a.jsx)("label",{className:"block text-xs font-medium text-gray-500 mb-1",children:"Date"}),(0,a.jsxs)("button",{type:"button",onClick:()=>{Y(!1),B(!J)},"aria-haspopup":"dialog","aria-expanded":J,className:"w-full min-h-11 px-3 py-2.5 md:px-4 md:py-3 pr-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[var(--brand-primary)] focus:border-[var(--brand-primary)] text-left flex items-center justify-between text-base md:text-base touch-manipulation",children:[(0,a.jsx)("span",{children:(0,g.GP)(y,"d MMM yyyy")}),(0,a.jsx)(u.A,{className:"w-5 h-5 text-gray-400"})]}),ee?(0,a.jsx)(P,{open:J,onClose:()=>B(!1),title:"Select a date",titleId:"book-now-date-sheet-title",sheetRef:K,compact:!0,children:(0,a.jsx)("div",{className:"px-4 pb-4 overflow-y-auto overscroll-contain",children:(0,a.jsx)(_,{calendarMonth:V,selectedDate:y,weeks:eh,dayClassName:"w-full min-h-11 rounded-lg text-sm",onPrevMonth:()=>W(new Date(V.getFullYear(),V.getMonth()-1)),onNextMonth:()=>W(new Date(V.getFullYear(),V.getMonth()+1)),onSelectDay:e=>{D(e),B(!1)}})})}):J&&ea&&(0,l.createPortal)((0,a.jsx)("div",{ref:X,style:{position:"fixed",top:ea.bottom+4,right:window.innerWidth-ea.right,minWidth:320,zIndex:9999},className:"bg-white border border-gray-200 rounded-lg shadow-xl p-4",children:(0,a.jsx)(_,{calendarMonth:V,selectedDate:y,weeks:eh,dayClassName:"w-9 h-9 rounded-lg text-sm",onPrevMonth:()=>W(new Date(V.getFullYear(),V.getMonth()-1)),onNextMonth:()=>W(new Date(V.getFullYear(),V.getMonth()+1)),onSelectDay:e=>{D(e),B(!1)}})}),document.body)]}),(0,a.jsx)("div",{className:"flex items-end",children:(0,a.jsx)("button",{type:"button",onClick:()=>ex(y),disabled:!d||z,className:"w-full md:w-auto min-h-11 px-6 md:px-8 py-2.5 md:py-3 bg-[var(--brand-primary)] text-white text-sm md:text-base font-semibold rounded-lg hover:bg-[var(--brand-accent)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2 touch-manipulation",children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.A,{className:"w-5 h-5 animate-spin"}),"Searching..."]}):"Search"})})]})}),G&&!z&&F&&(0,a.jsx)("div",{className:"border-t border-gray-200 pt-2 md:pt-6 flex flex-col md:flex-1 md:min-
1h-0",children:F.hasSlots?(0,a.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 max-md:mb-1.5 mb-3 md:mb-6 md:flex-row md:items-center md:justify-between md:gap-4 shrink-0",children:[(0,a.jsxs)("span",{className:"font-semibold text-[#000000] text-sm md:text-base truncate pr-2",children:[(0,g.GP)(V,"MMMM")," ",(0,a.jsx)("span",{className:"text-gray-500 font-normal text-xs md:text-sm",children:(0,g.GP)(y,"EEEE")===(0,g.GP)(new Date,"EEEE")&&(0,w.r)(y,new Date)?"Today":(0,g.GP)(y,"EEEE")===(0,g.GP)((0,S.f)(new Date,1),"EEEE")&&(0,w.r)(y,(0,S.f)(new Date,1))?"Tomorrow":(0,g.GP)(y,"d MMM")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 min-w-0 -mx-1 px-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{let e=(0,S.f)(y,-7),t=(0,N.o)(new Date),r=(0,N.o)(e),a=(0,j.Y)(r,t)?t:e;D(a),W(a)},className:"p-1.5 md:p-2 hover:bg-gray-100 rounded-lg shrink-0","aria-label":"Previous week",children:(0,a.jsx)(c.A,{className:"w-5 h-5"})}),(0,a.jsx)("div",{className:E,children:[0,1,2,3,4,5,6].map(e=>{let t=(0,S.f)((0,k.k)(y,{weekStartsOn:0}),e),r=(0,w.r)(t,y),s=(0,j.Y)((0,N.o)(t),(0,N.o)(new Date));return(0,a.jsxs)("button",{type:"button",disabled:s,onClick:()=>{s||(D(t),W(t),ex(t))},className:"shrink-0 snap-start px-2.5 py-1.5 md:px-3 md:py-2 rounded-lg text-[11px] md:text-xs font-medium min-w-[2.65rem] md:min-w-[3rem] ".concat(s?"bg-gray-50 text-gray-300 cursor-not-allowed":r?"bg-[var(--brand-primary)] text-white":"bg-gray-100 hover:bg-gray-200"),children:[(0,a.jsx)("div",{children:(0,g.GP)(t,"EEE").toUpperCase().slice(0,2)}),(0,a.jsx)("div",{children:(0,g.GP)(t,"d")})]},t.toISOString())})}),(0,a.jsx)("button",{type:"button",onClick:()=>{let e=(0,S.f)(y,7);D(e),W(e)},className:"p-1.5 md:p-2 hover:bg-gray-100 rounded-lg shrink-0","aria-label":"Next week",children:(0,a.jsx)(m.A,{className:"w-5 h-5"})})]})]}),d&&(0,a.jsxs)("div",{className:"max-md:mb-1 mb-2 md:mb-4 shrink-0",children:[(0,a.jsx)("p",{className:"font-semibold text-[#000000] text-sm md:text-base leading-tight line-clamp-2",children:d.service_name}),(0,a.jsx)("p",{className:"text-xs text-[#5a4032] mt-0.5 md:hidden",children:(0,g.GP)(y,"EEE, d MMM yyyy")})]}),(0,a.jsx)("h3",{className:"hidden md:block font-semibold text-[#000000] mb-4",children:(0,g.GP)(y,"EEE, d MMM yyyy")}),(()=>{let e=F.slots.reduce((e,t)=>(e[t.teamMemberId]||(e[t.teamMemberId]=[]),e[t.teamMemberId].push(t),e),{});return(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-1 gap-x-2 gap-y-1.5 md:gap-4 auto-rows-min md:flex-1 md:min-h-0 max-md:flex-none max-md:self-start max-md:w-full",children:Object.entries(e).map(e=>{let[t,r]=e,s=r[0],l=r.filter(e=>12>parseInt(e.time.split(":")[0],10)),n=r.filter(e=>parseInt(e.time.split(":")[0],10)>=12),o=el===t;return(0,a.jsxs)("div",{className:["border border-gray-100 rounded-lg md:rounded-xl p-1.5 md:p-4 bg-gray-50/50 min-w-0",o?"max-md:col-span-2":""].filter(Boolean).join(" "),children:[(0,a.jsxs)("button",{type:"button",className:"md:hidden w-full flex flex-col items-center gap-1 text-center rounded-md py-1.5 px-1 touch-manipulation relative",onClick:()=>en(e=>e===t?null:t),"aria-expanded":o,"aria-controls":"stylist-slots-".concat(t),children:[(0,a.jsx)(i.A,{className:"absolute top-1 right-1 w-3.5 h-3.5 text-gray-400 transition-transform ".concat(o?"rotate-180":""),"aria-hidden":!0}),(0,a.jsx)("div",{className:"w-8 h-8 rounded-full overflow-hidden bg-[#f0ebe3] flex items-center justify-center flex-shrink-0",children:s.teamMemberAvatar?(0,a.jsx)("img",{src:s.teamMemberAvatar,alt:"",className:"w-full h-full object-cover","aria-hidden":!0}):(0,a.jsx)(h.A,{className:"w-4 h-4 text-[var(--brand-primary)]","aria-hidden":!0})}),(0,a.jsxs)("div",{className:"min-w-0 w-full px-0.5",children:[(0,a.jsx)("p",{className:"font-semibold text-[#000000] text-[11px] leading-tight line-clamp-2",children:s.teamMemberName}),null!=s.price?(0,a.jsxs)("p",{className:"text-[10px] text-[#5a4032] mt-0.5 leading-tight",children:["From \xa3",Number(s.price).toFixed(2)]}):(0,a.jsx)("p",{className:"text-[10px] text-gray-500 mt-0.5 leading-tight",children:"Tap for times"})]})]}),(0,a.jsxs)("div",{className:"hidden md:flex items-center gap-3 mb-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden bg-[#f0ebe3] flex items-center justify-center flex-shrink-0",children:s.teamMemberAvatar?(0,a.jsx)("img",{src:s.teamMemberAvatar,alt:s.teamMemberName,className:"w-full h-full object-cover"}):(0,a.jsx)(h.A,{className:"w-5 h-5 text-[var(--brand-primary)]"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"font-semibold text-[#000000] text-sm truncate",children:s.teamMemberName}),null!=s.price&&(0,a.jsxs)("p",{className:"text-xs text-[#5a4032]",children:["From \xa3",Number(s.price).toFixed(2)]})]})]}),(0,a.jsxs)("div",{id:"stylist-slots-".concat(t),role:"region","aria-label":"Appointment times for ".concat(s.teamMemberName),className:"".concat(o?"block":"hidden"," md:block pt-2 md:pt-0 border-t border-gray-100/80 md:border-0 mt-2 md:mt-0"),children:[l.length>0&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("p",{className:"text-[10px] md:text-xs text-gray-400 font-medium mb-1",children:"Morning"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 md:gap-1.5",children:l.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>eu(e),className:"px-2.5 py-1 md:px-3 md:py-1.5 bg-[var(--brand-primary)] text-white rounded-lg text-[11px] md:text-xs font-medium hover:bg-[var(--brand-accent)] transition-colors",children:I(e.time)},"".concat(e.time,"-").concat(t)))})]}),n.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] md:text-xs text-gray-400 font-medium mb-1",children:"Afternoon"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 md:gap-1.5",children:n.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>eu(e),className:"px-2.5 py-1 md:px-3 md:py-1.5 bg-[var(--brand-primary)] text-white rounded-lg text-[11px] md:text-xs font-medium hover:bg-[var(--brand-accent)] transition-colors",children:I(e.time)},"".concat(e.time,"-").concat(t)))})]})]})]},t)})})})(),(0,a.jsxs)("div",{className:"border-t border-gray-200 max-md:pt-2 max-md:mt-1 pt-3 mt-2 md:pt-4 md:mt-4 flex flex-wrap gap-2 md:gap-3 shrink-0 max-md:bg-[#f4efe6] max-md:-mx-1 max-md:px-1 max-md:pb-0.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eo(!0),className:"inline-flex items-center justify-center px-4 py-2 md:px-6 md:py-3 text-sm md:text-base border-2 border-[var(--brand-primary)] text-[var(--brand-primary)] font-semibold rounded-lg hover:bg-[var(--brand-primary)] hover:text-white transition-colors",children:"Add to Waitlist"}),d&&(0,a.jsx)("button",{type:"button",onClick:()=>o.push("/service-item/".concat(d.service_slug)),className:"inline-flex items-center justify-center px-4 py-2 md:px-6 md:py-3 text-sm md:text-base border-2 border-gray-300 text-gray-700 font-semibold rounded-lg hover:border-gray-400 hover:bg-gray-50 transition-colors",children:"View Service Details"})]})]}
1):(0,a.jsxs)("div",{className:"flex flex-col md:flex-1 md:min-h-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 mb-3 md:mb-6 md:flex-row md:items-center md:justify-between md:gap-4 shrink-0",children:[(0,a.jsxs)("span",{className:"font-semibold text-[#000000] text-sm md:text-base truncate pr-2",children:[(0,g.GP)(V,"MMMM")," ",(0,a.jsx)("span",{className:"text-gray-500 font-normal text-xs md:text-sm",children:"This Week"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 min-w-0 -mx-1 px-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{let e=(0,S.f)(y,-7),t=(0,N.o)(new Date),r=(0,N.o)(e),a=(0,j.Y)(r,t)?t:e;D(a),W(a),ex(a)},className:"p-1.5 md:p-2 hover:bg-gray-100 rounded-lg shrink-0","aria-label":"Previous week",children:(0,a.jsx)(c.A,{className:"w-5 h-5"})}),(0,a.jsx)("div",{className:E,children:[0,1,2,3,4,5,6].map(e=>{let t=(0,S.f)((0,k.k)(y,{weekStartsOn:0}),e),r=(0,w.r)(t,y),s=(0,j.Y)((0,N.o)(t),(0,N.o)(new Date));return(0,a.jsxs)("button",{type:"button",disabled:s,onClick:()=>{s||(D(t),W(t),ex(t))},className:"shrink-0 snap-start px-2.5 py-1.5 md:px-3 md:py-2 rounded-lg text-[11px] md:text-xs font-medium min-w-[2.65rem] md:min-w-[3rem] ".concat(s?"bg-gray-50 text-gray-300 cursor-not-allowed":r?"bg-[var(--brand-primary)] text-white":"bg-gray-100 hover:bg-gray-200"),children:[(0,a.jsx)("div",{children:(0,g.GP)(t,"EEE").toUpperCase().slice(0,2)}),(0,a.jsx)("div",{children:(0,g.GP)(t,"d")})]},t.toISOString())})}),(0,a.jsx)("button",{type:"button",onClick:()=>{let e=(0,S.f)(y,7);D(e),W(e),ex(e)},className:"p-1.5 md:p-2 hover:bg-gray-100 rounded-lg shrink-0","aria-label":"Next week",children:(0,a.jsx)(m.A,{className:"w-5 h-5"})})]})]}),(0,a.jsxs)("div",{className:"py-4 md:py-6 md:flex-1 md:min-h-0",children:[(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-12 h-12 md:w-16 md:h-16 rounded-full bg-gray-100 mb-3 md:mb-4",children:(0,a.jsx)(u.A,{className:"w-6 h-6 md:w-8 md:h-8 text-gray-400"})}),(0,a.jsx)("h3",{className:"text-lg md:text-xl font-bold text-[#000000] mb-1 px-1",children:"Nothing free on this date"}),(0,a.jsxs)("p",{className:"text-[#5a4032] text-sm md:text-base mb-4 md:mb-6 px-2",children:[(0,g.GP)(y,"EEEE, d MMMM yyyy")," is fully booked for this service."]})]}),(0,a.jsxs)("div",{className:"max-w-md mx-auto space-y-4 md:space-y-5 px-1",children:[F.nextAvailableSlot?(0,a.jsxs)("div",{className:"rounded-xl border-2 border-[var(--brand-primary)]/40 bg-white p-4 md:p-5 shadow-sm text-left",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-wide text-[var(--brand-primary)] mb-2",children:"Nearest opening"}),(0,a.jsxs)("p",{className:"text-[#000000] font-bold text-base md:text-lg leading-snug",children:[(0,g.GP)(F.nextAvailableSlot.date,"EEE, d MMM yyyy")," ",(0,a.jsx)("span",{className:"text-[#5a4032] font-semibold",children:"at"})," ",I(F.nextAvailableSlot.time)]}),(0,a.jsxs)("p",{className:"text-sm text-[#5a4032] mt-1",children:["with ",F.nextAvailableSlot.teamMemberName,null!=F.nextAvailableSlot.price&&(0,a.jsxs)("span",{className:"text-gray-500",children:[" ","\xb7 from \xa3",Number(F.nextAvailableSlot.price).toFixed(2)]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 mt-4",children:[(0,a.jsx)("button",{type:"button",onClick:()=>eu(F.nextAvailableSlot),className:"flex-1 px-4 py-2.5 md:py-3 text-sm md:text-base bg-[var(--brand-primary)] text-white font-semibold rounded-lg hover:bg-[var(--brand-accent)] transition-colors text-center",children:"Book this time"}),(0,a.jsx)("button",{type:"button",onClick:eb,className:"flex-1 px-4 py-2.5 md:py-3 text-sm md:text-base border-2 border-[var(--brand-primary)] text-[var(--brand-primary)] font-semibold rounded-lg hover:bg-[var(--brand-primary)]/10 transition-colors text-center",children:"See all slots that day"})]})]}):F.nextAvailableDate?(0,a.jsxs)("div",{className:"rounded-xl border border-[#e0d6c8] bg-white p-4 text-left",children:[(0,a.jsxs)("p",{className:"text-sm text-[#5a4032] mb-3",children:["Next day with availability:"," ",(0,a.jsx)("span",{className:"font-semibold text-[#000000]",children:(0,g.GP)(F.nextAvailableDate,"EEE, d MMM yyyy")})]}),(0,a.jsxs)("button",{type:"button",onClick:eb,className:"w-full sm:w-auto px-5 py-2.5 md:px-6 md:py-3 text-sm md:text-base bg-[var(--brand-primary)] text-white font-semibold rounded-lg hover:bg-[var(--brand-accent)] transition-colors",children:["Go to ",(0,g.GP)(F.nextAvailableDate,"EEE, d MMM yyyy")]})]}):(0,a.jsx)("p",{className:"text-center text-[#5a4032] text-sm md:text-base",children:"No availability found in the next 90 days online."}),(0,a.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-[#faf8f5] p-4 md:p-5 text-left",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-[#000000] mb-1",children:"Join the waitlist"}),(0,a.jsx)("p",{className:"text-xs md:text-sm text-gray-600 mb-3",children:"Tell us your preferred stylist and time â we'll reach out if something opens up."}),(0,a.jsx)("button",{type:"button",onClick:()=>eo(!0),className:"w-full sm:w-auto inline-flex items-center justify-center px-4 py-2.5 md:px-6 md:py-3 text-sm md:text-base border-2 border-[var(--brand-primary)] text-[var(--brand-primary)] font-semibold rounded-lg hover:bg-[var(--brand-primary)] hover:text-white transition-colors",children:"Add to waitlist"})]}),(0,a.jsxs)("p",{className:"text-xs md:text-sm text-gray-600 text-center",children:["Last-minute openings: ","contact the salon","."]})]})]})]})}),(0,a.jsx)(v,{open:ei,onClose:()=>eo(!1),selectedService:d,selectedDate:y,stylistChoices:ec,defaultTeamMemberId:el})]})}},8477:(e,t,r)=>{r.d(t,{MainSiteBrandingProvider:()=>d,h:()=>o});var a=r(9600),s=r(5932),l=r(8411),n=r(2184);let i=(0,s.createContext)({workspaceId:null,businessName:l.Ndu,logoUrl:null,branding:null});function o(){return(0,s.useContext)(i)}function d(e){var t;let{workspaceId:r,tenant:o,children:d}=e;(0,s.useLayoutEffect)(()=>{let e=null!=r?r:null;(0,n.nW)(e),(0,l.nWj)(e)},[r]);let c={workspaceId:null!=r?r:null,businessName:o?(0,l.Arb)(o.branding_config,o.business_name):l.Ndu,logoUrl:o?(0,l.dQ0)(o.branding_config):null,branding:null!=(t=null==o?void 0:o.branding_config)?t:null};return(0,a.jsx)(i.Provider,{value:c,children:d})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.