1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,658663,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("605dce430fd52239798540179b1f5828006840c06e",t.callServer,void 0,t.findSourceMapURL,"addPreferredHosts");e.s(["addPreferredHosts",0,n])},677120,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("60bfcd6b100afed31dd114df217089ebbb66be65a9",t.callServer,void 0,t.findSourceMapURL,"deletePreferredHost");e.s(["deletePreferredHost",0,n])},244632,878441,e=>{"use strict";let t=new Map;e.s(["clearEventPreview",0,function(e){t.delete(e)},"getEventPreview",0,function(e){return t.get(e)},"setEventPreview",0,function(e,n){t.set(e,n)}],244632);var n=e.i(271645),r=e.i(954616),i=e.i(912598),a=e.i(846696),s=e.i(486212);function l(e,t,n){for(let r of["calendar-events","mmw-schedule","mmw-all-events"])e.setQueriesData({queryKey:[r]},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,events:e.events.map(e=>e.id===t?{...e,user_interactions:{...e.user_interactions,...n}}:e)}))}:e)}e.s(["useEventInteraction",0,function({eventId:e,initialSaved:t=!1,initialLiked:o=!1,initialDisliked:c=!1,onSaveToggle:d,onSaveSuccess:u}){let[m,p]=(0,n.useState)(t),[f,h]=(0,n.useState)(o),[x,g]=(0,n.useState)(c),v=(0,i.useQueryClient)(),b=(0,r.useMutation)({mutationFn:t=>(0,s.postInteraction)({event_id:e,type:t}),onMutate:()=>{let e=!m;return p(e),d?d(e):(0,a.toast)(e?"Saved! We'll recommend more like this":"Removed from saved",{duration:2e3}),{prev:{saved:m,liked:f,disliked:x},cacheUpdates:{saved:e}}},onSuccess:(t,n,r)=>{r&&l(v,e,r.cacheUpdates),u?.()},onError:(e,t,n)=>{n&&(p(n.prev.saved),h(n.prev.liked),g(n.prev.disliked)),a.toast.error("Something went wrong. Please try again.")}}),y=(0,r.useMutation)({mutationFn:()=>(0,s.postInteraction)({event_id:e,type:"event_like"}),onMutate:()=>{let e=!f;h(e);let t={liked:e};return e&&x&&(g(!1),t.disliked=!1),(0,a.toast)(e?"Thanks for the feedback!":"Like removed",{duration:2e3}),{prev:{saved:m,liked:f,disliked:x},cacheUpdates:t}},onSuccess:(t,n,r)=>{r&&l(v,e,r.cacheUpdates)},onError:(e,t,n)=>{n&&(p(n.prev.saved),h(n.prev.liked),g(n.prev.disliked)),a.toast.error("Something went wrong. Please try again.")}}),w=(0,r.useMutation)({mutationFn:()=>(0,s.postInteraction)({event_id:e,type:"event_dislike"}),onMutate:()=>{let e=!x;g(e);let t={disliked:e};return e&&(f&&(h(!1),t.liked=!1),m&&(p(!1),t.saved=!1)),(0,a.toast)(e?"We'll show less like this":"Dislike removed",{duration:2e3}),{prev:{saved:m,liked:f,disliked:x},cacheUpdates:t}},onSuccess:(t,n,r)=>{r&&l(v,e,r.cacheUpdates)},onError:(e,t,n)=>{n&&(p(n.prev.saved),h(n.prev.liked),g(n.prev.disliked)),a.toast.error("Something went wrong. Please try again.")}}),j=b.isPending||y.isPending||w.isPending,k=(0,n.useCallback)(()=>{b.isPending||b.mutate(m?"event_unsave":"event_save")},[b,m]);return{isSaved:m,isLiked:f,isDisliked:x,toggleSave:k,toggleLike:(0,n.useCallback)(()=>{y.isPending||y.mutate()},[y]),toggleDislike:(0,n.useCallback)(()=>{w.isPending||w.mutate()},[w]),isPending:j}}],878441)},667585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return i}});let r=e.r(132061);function i({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new r.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},309885,(e,t,n)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return r}})},652157,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return o}});let r=e.r(843476),i=e.r(174080),a=e.r(563599),s=e.r(309885),l=e.r(543369);function o({moduleIds:e}){if("u">typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let r=t.reactLoadableManifest;for(let t of e){if(!r[t])continue;let e=r[t].files;n.push(...e)}}if(0===n.length)return null;
1let c=(0,l.getAssetTokenQuery)();return(0,r.jsx)(r.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,s.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,r.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,i.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},869093,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let r=e.r(843476),i=e.r(271645),a=e.r(667585),s=e.r(652157);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},n=(0,i.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?i.Suspense:i.Fragment,u=t.ssr?(0,r.jsxs)(r.Fragment,{children:["u"<typeof window?(0,r.jsx)(s.PreloadChunks,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},770703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return i}});let r=e.r(555682)._(e.r(869093));function i(e,t){let n={};"function"==typeof e&&(n.loader=e);let i={...n,...t};return(0,r.default)({...i,modules:i.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},390445,648150,448297,371419,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(401851),i=e.i(790597),a=e.i(522016),s=e.i(946258),l=e.i(244632),o=e.i(54513),c=e.i(486212);let d=new Set;function u(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(!1),{ref:a,inView:s}=(0,o.useInView)({threshold:.5,triggerOnce:!1});return(0,n.useEffect)(()=>{let n=`${e}-${t}`;if(!d.has(n)&&!i.current)return s?r.current=setTimeout(()=>{d.has(n)||i.current||(d.add(n),i.current=!0,(0,c.postInteraction)({event_id:e,type:"event_impression"}))},500):r.current&&(clearTimeout(r.current),r.current=null),()=>{r.current&&(clearTimeout(r.current),r.current=null)}},[e,t,s]),{ref:a}}e.s(["useEventImpression",0,u],648150);var m=e.i(878441),p=e.i(912598),f=e.i(618566);function h(){let e=(0,p.useQueryClient)(),t=(0,f.useRouter)();return(0,n.useCallback)(async()=>{await Promise.all([e.invalidateQueries({queryKey:["currentUser"]}),e.invalidateQueries({queryKey:["calendar-events"]}),e.invalidateQueries({queryKey:["preferred-hosts"]}),e.invalidateQueries({queryKey:["event-count"]})]),t.refresh()},[e,t])}e.s(["usePostLoginRefresh",0,h],448297);var x=e.i(952771),g=e.i(922809),v=e.i(647163);function b(e){try{sessionStorage.setItem("partymate_pending_action",JSON.stringify(e))}catch(e){console.error("[PendingActions] Failed to store pending action:",e)}}e.s(["setPendingAction",0,b],371419);var y=e.i(343926),w=e.i(19050),j=e.i(88653),k=e.i(824511);let N=(0,e.i(770703).default)(()=>e.A(133543),{loadableGenerated:{modules:[970905]},ssr:!1}),C=[{icon:"ðï¸",label:"Ticket Reminder on"},{icon:"ð",label:"Synced to Calendar"},{icon:(0,t.jsx)("svg",{className:"size-[18px]",fill:"#25D366",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),label:"I will update you via WhatsApp"}];function S({venueName:e,imageUrl:r,onDismiss:i,onShare:a}
1){let[s,l]=(0,n.useState)(null),[o,c]=(0,n.useState)(!1),d=(0,n.useRef)(i);return(0,n.useEffect)(()=>{d.current=i},[i]),(0,n.useEffect)(()=>{fetch("/confetti-animation.json").then(e=>e.json()).then(e=>l(e)).catch(()=>{})},[]),(0,n.useEffect)(()=>{let e=setTimeout(()=>d.current(),3e3);return()=>clearTimeout(e)},[]),(0,t.jsxs)(k.m.div,{animate:{opacity:1},className:"fixed inset-0 z-[10010] flex items-center justify-center px-4",exit:{opacity:0},initial:{opacity:0},transition:{duration:.3},children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 bg-black/50"}),s&&(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 z-[1] overflow-hidden",children:(0,t.jsx)(N,{animationData:s,loop:!1,rendererSettings:{preserveAspectRatio:"xMidYMid slice"},style:{height:"100%",width:"100%"}})}),(0,t.jsxs)(k.m.div,{animate:{opacity:1,y:0,scale:1},className:"relative z-10 flex max-h-[calc(100dvh-6rem)] w-full max-w-sm flex-col overflow-hidden rounded-2xl bg-white px-6 pt-6 pb-5 text-center shadow-2xl",exit:{opacity:0,y:10,scale:.95},initial:{opacity:0,y:20,scale:.95},transition:{delay:.1,duration:.3,type:"spring",bounce:.3},children:[(0,t.jsxs)("p",{className:"shrink-0 text-lg font-bold tracking-wide text-ink uppercase",children:["GOING TO ",e,"! ð"]}),(0,t.jsx)("p",{className:"mt-1 shrink-0 text-xs font-medium text-ink-muted",children:"Saved · we'll keep you posted"}),r&&(0,t.jsxs)(k.m.div,{animate:{opacity:1,scale:1},className:"relative mt-3 w-full shrink overflow-hidden rounded-xl",initial:{opacity:0,scale:.9},style:{height:"clamp(48px, 20vh, 160px)"},transition:{delay:.2,duration:.3},children:[!o&&(0,t.jsx)(k.m.div,{"aria-hidden":!0,animate:{opacity:[.6,1,.6]},className:"absolute inset-0 bg-divider",transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}),(0,t.jsx)("img",{alt:"",className:`absolute inset-0 h-full w-full object-cover transition-opacity duration-200 ${o?"opacity-100":"opacity-0"}`,height:200,src:(0,y.getOptimizedImageUrl)(r),width:200,onLoad:()=>c(!0)})]},r),(0,t.jsx)("ul",{className:"mt-4 shrink-0 space-y-2 text-left",children:C.map((e,n)=>(0,t.jsxs)(k.m.li,{animate:{opacity:1,x:0},className:"flex items-center gap-3 rounded-xl bg-shell px-4 py-2.5 text-sm font-medium text-ink",initial:{opacity:0,x:-8},transition:{delay:.3+.05*n,duration:.25},children:[(0,t.jsx)("span",{className:"text-base",children:e.icon}),(0,t.jsx)("span",{className:"flex-1",children:e.label}),(0,t.jsx)("span",{className:"text-base",children:"â"})]},e.label))}),(0,t.jsxs)("div",{className:"mt-4 flex shrink-0 gap-3",children:[(0,t.jsxs)("div",{className:"relative flex flex-1 flex-col",children:[(0,t.jsx)("button",{className:"rounded-xl border border-divider px-4 py-2.5 text-sm font-medium text-ink-muted transition-colors hover:border-ink hover:text-ink",type:"button",onClick:i,children:"Dismiss"}),(0,t.jsx)("div",{"aria-hidden":!0,className:"mt-1.5 h-[3px] w-full overflow-hidden rounded-full bg-divider",children:(0,t.jsx)(k.m.div,{animate:{width:"0%"},className:"h-full rounded-full bg-ink-muted",initial:{width:"100%"},transition:{duration:3,ease:"linear"}})})]}),(0,t.jsxs)("button",{className:"group/share relative flex flex-[1.4] items-center justify-center gap-2 overflow-hidden rounded-xl bg-surface-inverted px-4 py-2.5 text-sm font-semibold text-surface-inverted-text shadow-sm transition-all hover:bg-surface-inverted/90 active:scale-[0.98]",type:"button",onClick:()=>{a(),i()},children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0 -translate-x-full bg-gradient-to-r from-transparent via-white/15 to-transparent transition-transform duration-700 group-hover/share:translate-x-full"}),"Bring a friend",(0,t.jsx)("span",{className:"text-base",children:"ð"})]})]})]})]})}function M({show:e,venueName:n,imageUrl:r,onDismiss:i,onShare:a}){return(0,t.jsx)(j.AnimatePresence,{children:e&&(0,t.jsx)(S,{imageUrl:r,venueName:n,onDismiss:i,onShare:a})})}function P({heatScore:e,className:n}){return(0,t.jsxs)("div",{className:(0,v.cn)("pointer-events-none absolute top-2 left-2 flex items-center gap-1 rounded-full bg-white/85 px-2 py-1 text-[10px] font-semibold shadow-sm backdrop-blur-md",n),"aria-hidden":"true",title:`Popularity heat: ${e}/100`,children:[(0,t.jsxs)("span",{className:"relative flex size-1.5 items-center justify-center",children:[e>=90&&(0,t.jsx)("span",{className:"absolute inline-flex size-full animate-ping rounded-full bg-event-hot opacity-70"}),(0,t.jsx)("span",{className:(0,v.cn)("relative size-1.5 rounded-full",e>=90?"bg-event-hot":e>=80?"bg-event-trending":"bg-event-picked")})]}),(0,t.jsx)("span",{className:"text-ink tabular-nums",children:e>=90?"Hot":e>=80?"Trending":"Picked"})]})}var _=e.i(954616),T=e.i(531278),z=e.i(658663),E=e.i(677120),I=e.i(396668);let L=(0,n.lazy)(()=>e.A(862628).then(e=>({default:e.LoginModal})));function A({hostId:e,hostName:r,isFollowing:i,user:a,className:s}
1){let[l,o]=(0,n.useState)(!1),[c,d]=(0,n.useState)(i),u=(0,p.useQueryClient)(),m=(0,n.useRef)(!1),f=h(),x=a?.isAnonymous??!0,y=a?.id,w=(0,_.useMutation)({mutationFn:async()=>{if(!y)throw Error("User not authenticated");return(0,z.addPreferredHosts)(y,[e])},onMutate:()=>{d(!0),(0,g.hapticTrigger)("success")},onSuccess:()=>{u.invalidateQueries({queryKey:["preferred-hosts"]}),I.hapticToast.success(`Now following ${r}`)},onError:e=>{d(!1),console.error("[FollowButton] Follow failed:",e),I.hapticToast.error("Failed to follow. Please try again.")}}),j=(0,_.useMutation)({mutationFn:async()=>{if(!y)throw Error("User not authenticated");return(0,E.deletePreferredHost)(y,e)},onMutate:()=>{d(!1),(0,g.hapticTrigger)("light")},onSuccess:()=>{u.invalidateQueries({queryKey:["preferred-hosts"]}),I.hapticToast.success(`Unfollowed ${r}`)},onError:e=>{d(!0),console.error("[FollowButton] Unfollow failed:",e),I.hapticToast.error("Failed to unfollow. Please try again.")}}),k=w.isPending||j.isPending,N=(0,n.useCallback)(async()=>{if(await f(),m.current){m.current=!1;let t=u.getQueryData(["currentUser"]);t?.id&&!t.isAnonymous&&(0,z.addPreferredHosts)(t.id,[e]).then(()=>{d(!0),u.invalidateQueries({queryKey:["preferred-hosts"]}),I.hapticToast.success(`Now following ${r}`)}).catch(e=>{console.error("[FollowButton] Follow after login failed:",e),I.hapticToast.error("Failed to follow. Please try again.")})}},[f,u,e,r]),C=(0,n.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),x){m.current=!0,b({type:"follow",hostId:e,hostName:r}),o(!0);return}c?j.mutate():w.mutate()},[x,c,e,r,w,j]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{className:(0,v.cn)("rounded-full border px-2.5 py-0.5 text-[10px] font-medium transition-all","border-ink text-ink","hover:bg-ink hover:text-page",c&&"bg-ink text-page",k&&"cursor-not-allowed opacity-50",s),disabled:k,type:"button",onClick:C,children:k?(0,t.jsx)(T.Loader2,{className:"size-3 animate-spin"}):c?"Following":"Follow"}),(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(L,{anonymousUserId:y,open:l,onLoginSuccess:N,onOpenChange:o})})]})}let R=(0,n.lazy)(()=>e.A(862628).then(e=>({default:e.LoginModal})));e.s(["MmwEventCard",0,function({event:e,user:o,followedHostIds:c,showHeat:d=!1}){let{ref:p}=u(e.id,"calendar"),{isSaved:f,toggleSave:j}=(0,m.useEventInteraction)({eventId:e.id,initialSaved:e.user_interactions?.saved??!1,onSaveToggle:e=>{e?((0,g.hapticTrigger)("success"),N(!0)):(0,g.hapticTrigger)("light")}}),[k,N]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),_=(0,n.useRef)(null),T=h(),z=o?.isAnonymous??!0,E=(0,n.useCallback)(e=>{p(e)},[p]),I=(0,n.useCallback)(async()=>{await T(),"save"===_.current&&(j(),_.current=null)},[T,j]),L=(0,n.useCallback)(async()=>{let t={title:e.name,url:`${globalThis.location.origin}/events/${e.slug}`};if(navigator.share)try{await navigator.share(t)}catch{}else try{await navigator.clipboard.writeText(t.url)}catch{}},[e.name,e.slug]),D=(0,n.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),z){_.current="save",b({type:"save",eventId:e.id,eventName:e.name}),S(!0);return}j()},[e.id,e.name,z,j]),$=e.hosts?.[0],O=!!$&&c.includes($.id),F=e.start_date||e.date,U=F?(0,r.format)(new Date(F),"d EEE").toUpperCase():"",H=e.genres?.slice(0,2).map(e=>e.replaceAll("_"," ").toLowerCase().replaceAll(/\b\w/g,e=>e.toUpperCase())).join(", ")||"",K=e.ticketing?.ticket_price_starts_at,B=K?`${Math.round(K)}â¬`:null,q=e.personalization?.score??0,Q=e.predicted_popularity_heat??null,V=()=>{(0,l.setEventPreview)(e.slug,e),(0,x.trackEvent)("event_card_click",{event_id:e.id,event_slug:e.slug,event_name:e.name,surface:"mmw"})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:E,className:"group flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)(a.default,{className:"pm-surface-pressable relative block overflow-hidden rounded-xl ring-1 ring-black/[0.04] dark:ring-white/[0.06]",href:`/events/${e.slug}`,onClick:V,transitionTypes:["nav-forward"],children:[(0,t.jsx)(n.ViewTransition,{name:`event-image-${e.id}`,share:"morph",default:"none",children:(0,t.jsx)(y.MainAsset,{alt:e.name??"Event cover",className:"aspect-[9/16] w-full transition-transform duration-500 ease-out group-hover:scale-[1.035]",event:e,size:"card"})}
1),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 bottom-0 h-20 bg-gradient-to-t from-black/55 via-black/15 to-transparent opacity-90"}),U&&(0,t.jsx)("div",{className:"pointer-events-none absolute bottom-2 left-2 flex items-center gap-1 rounded-full bg-white/85 px-2 py-1 text-[10px] font-semibold tracking-wide text-ink shadow-sm backdrop-blur-md tabular-nums",children:U}),q>=60&&(0,t.jsxs)("div",{className:"pointer-events-none absolute right-2 bottom-2 flex items-center gap-1 rounded-full bg-lime/95 px-2 py-1 text-[10px] font-bold tracking-wide text-lime-text shadow-sm backdrop-blur-md tabular-nums",children:[(0,t.jsx)("span",{className:"size-1.5 rounded-full bg-lime-text/80"}),Math.round(q),"% match"]}),d&&null!==Q&&Q>=70&&null!==Q&&(0,t.jsx)(P,{heatScore:Q}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-3 bottom-12 hidden opacity-0 transition-opacity duration-200 group-hover:opacity-100 md:block",children:(0,t.jsxs)("button",{className:(0,v.cn)("pointer-events-auto flex w-full items-center justify-center gap-2 rounded-full px-3 py-2","text-[11px] font-medium shadow-sm transition-colors",f?"bg-lime text-lime-text hover:bg-lime-hover":"bg-foreground text-background hover:bg-foreground
1/90"),type:"button",onClick:D,children:[(0,t.jsx)(i.Heart,{className:(0,v.cn)("size-4",f&&"fill-current")}),f?"Saved":"Save"]})})]}),(0,t.jsx)("button",{"aria-label":f?"Unsave event":"Save event","aria-pressed":f,className:(0,v.cn)("absolute top-2 right-2 flex size-10 items-center justify-center rounded-full shadow-md transition-all duration-200 active:scale-90 md:hidden",f?"bg-lime hover:bg-lime-hover":"bg-white/75 backdrop-blur-md hover:bg-white/90"),type:"button",onClick:D,children:(0,t.jsx)(i.Heart,{className:(0,v.cn)("size-[18px] transition-transform duration-200",f?"scale-110 fill-ink text-ink":"text-ink")})}),f&&(0,t.jsx)("button",{"aria-label":"Unsave event","aria-pressed":!0,className:"absolute top-3 right-3 hidden size-9 items-center justify-center rounded-full bg-lime shadow-sm transition-transform duration-200 hover:scale-105 active:scale-95 md:flex",type:"button",onClick:D,children:(0,t.jsx)(i.Heart,{className:"size-4 fill-ink text-ink"})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1.5 px-0.5 md:gap-2",children:[$&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(w.PageAvatar,{src:$.logo_url,name:$.name??"Host",shape:"round",size:"sm",className:"size-5 shrink-0 border border-ink/10 md:size-6"}),(0,t.jsx)("span",{className:"truncate text-[11px] font-medium tracking-[-0.06px] text-ink md:text-xs",children:$.name})]}),O?(0,t.jsx)("span",{className:"shrink-0 rounded-full border border-divider bg-shell px-[9px] py-[2px] text-[10px] font-medium tracking-[-0.06px] text-ink md:text-xs",children:"Favorite"}):(0,t.jsx)(A,{className:"shrink-0 border-ink text-ink hover:bg-ink hover:text-page",hostId:$.id,hostName:$.name??"",isFollowing:!1,user:o})]}),(0,t.jsx)(a.default,{className:"block",href:`/events/${e.slug}`,onClick:V,transitionTypes:["nav-forward"],children:(0,t.jsx)(n.ViewTransition,{name:`event-title-${e.id}`,share:"text-morph",default:"none",children:(0,t.jsx)("h3",{className:"line-clamp-2 text-sm leading-[1.2] font-medium text-ink md:text-base",children:e.name})})}),(H||B)&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-ink-muted",children:[H&&(0,t.jsx)("span",{className:"truncate",children:H}),H&&B&&(0,t.jsx)("span",{"aria-hidden":!0,className:"size-0.5 rounded-full bg-ink-muted/60"}),B&&(0,t.jsxs)("span",{className:"shrink-0 font-medium text-ink",children:["from ",B]})]})]})]}),(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(R,{anonymousUserId:o?.id,open:C,onLoginSuccess:I,onOpenChange:S})}),(0,t.jsx)(M,{imageUrl:(0,s.getEventImageUrl)(e,"1:1")??null,show:k,venueName:$?.name??e.name,onDismiss:()=>N(!1),onShare:L})]})}],390445)},971757,e=>{"use strict";let t=(0,e.i(475254).default)("plane",[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]]);e.s(["Plane",0,t],971757)},346897,e=>{"use strict";let t=(0,e.i(475254).default)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);e.s(["MapPin",0,t],346897)},972520,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);e.s(["ArrowRight",0,t],972520)},595727,e=>{"use strict";var t=e.i(677241),n=e.i(281092);e.s(["addDays",0,function(e,r,i){let a=(0,n.toDate)(e,i?.in);return isNaN(r)?(0,t.constructFrom)(i?.in||e,NaN):(r&&a.setDate(a.getDate()+r),a)}])},466615,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(972520),i=e.i(824511),a=e.i(846696),s=e.i(43181);function l({href:e,label:n,children:r}){return(0,t.jsx)("a",{"aria-label":n,className:"flex size-6 items-center justify-center text-ink transition-opacity hover:opacity-70",href:e,rel:"noopener noreferrer",target:"_blank",children:r})}function o(){return(0,t.jsx)("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M24 12c0-6.627-5.373-12-12-12S0 5.373 0 12c0 5.99 4.388 10.954 10.125 11.854V15.47H7.078V12h3.047V9.356c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.875V12h3.328l-.532 3.469h-2.796v8.385C19.612 22.954 24 17.99 24 12z"})})}function c(){return(0,t.jsx)("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z"})})}function d(){return(0,t.jsx)("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}function u(){return(0,t.jsx)("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function m(){return(0,t.jsx)("svg",{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"})})}
1e.s(["MmwFooter",0,function(){let[e,p]=(0,n.useState)("");return(0,t.jsx)(i.m.footer,{className:"bg-card px-5 py-[60px]",initial:{opacity:0,y:20},transition:{duration:.5,ease:"easeOut"},viewport:{once:!0,margin:"-50px"},whileInView:{opacity:1,y:0},children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-xl flex-col gap-10",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,t.jsx)(s.PartymateIcon,{className:"h-[50px] w-auto self-start text-ink md:h-[62px]"}),(0,t.jsxs)("div",{className:"flex flex-col gap-5 rounded-[29px]",children:[(0,t.jsxs)("h2",{className:"text-[28px] leading-[1.1] font-medium text-ink md:text-[32px]",children:["Join the Partymate",(0,t.jsx)("br",{}),"Newsletter"]}),(0,t.jsx)("p",{className:"text-sm leading-[1.4] text-ink-faint",children:"Stay in the loop with the latest events, exclusive drops, and insider tips from the Miami nightlife scene."}),(0,t.jsxs)("form",{className:"relative",onSubmit:t=>{t.preventDefault(),e.trim()&&(a.toast.success("Thanks for subscribing!"),p(""))},children:[(0,t.jsx)("input",{className:"w-full rounded-full border border-shell bg-shell py-3.5 pr-14 pl-5 text-sm text-ink backdrop-blur-sm placeholder:text-ink/60 focus:ring-2 focus:ring-ink/10 focus:outline-none",placeholder:"Enter your email",type:"email",value:e,onChange:e=>p(e.target.value)}),(0,t.jsx)("button",{className:"absolute top-1/2 right-2 flex size-9 -translate-y-1/2 items-center justify-center rounded-full bg-foreground text-background active:scale-90",type:"submit",children:(0,t.jsx)(r.ArrowRight,{className:"size-4 rotate-[-45deg]"})})]})]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-6 py-4",children:[(0,t.jsx)(l,{href:"https://facebook.com/partymate",label:"Facebook",children:(0,t.jsx)(o,{})}),(0,t.jsx)(l,{href:"https://instagram.com/partymate",label:"Instagram",children:(0,t.jsx)(c,{})}),(0,t.jsx)(l,{href:"https://linkedin.com/company/partymate",label:"LinkedIn",children:(0,t.jsx)(d,{})}),(0,t.jsx)(l,{href:"https://x.com/partymate",label:"X",children:(0,t.jsx)(u,{})}),(0,t.jsx)(l,{href:"https://youtube.com/@partymate",label:"YouTube",children:(0,t.jsx)(m,{})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-5 border-t border-shell pt-5 text-xs text-ink",children:[(0,t.jsxs)("div",{className:"flex gap-5 font-medium",children:[(0,t.jsx)("a",{className:"transition-opacity hover:opacity-70",href:"/imprint",children:"Imprint"}),(0,t.jsx)("a",{className:"transition-opacity hover:opacity-70",href:"/privacy",children:"Privacy Policy"})]}),(0,t.jsx)("p",{className:"tracking-[-0.06px] text-ink",children:"© 2026 Partymate. All right reserved."})]})]})})}])},826912,736926,e=>{"use strict";var t=e.i(843476),n=e.i(522016),r=e.i(647163);let i=[{id:"short-trip",label:"Worldwide",href:"/short-trip"},{id:"hamburg",label:"Hamburg",href:"/cities/hamburg/events"},{id:"miami",label:"Miami",href:"/cities/miami/events"},{id:"ibiza",label:"Ibiza",href:"/cities/ibiza/events"}];e.s(["CitySwitcher",0,function({active:e}){return(0,t.jsx)("nav",{"aria-label":"City navigation",className:"flex items-start gap-2 rounded-full border border-white/10 bg-[rgba(20,20,20,0.2)] p-[7px]",children:i.map(i=>{let a=i.id===e;return(0,t.jsx)(n.default,{"aria-current":a?"page":void 0,className:(0,r.cn)("relative rounded-[20px] px-6 py-[10px] text-xs leading-none font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-white/30",a?"bg-lime text-lime-text shadow-[0px_10px_15px_0px_rgba(0,0,0,0.1),0px_4px_6px_0px_rgba(0,0,0,0.1)]":"text-white hover:text-white/80"),href:i.href,onClick:()=>{!function(e,t,n=31536e3){document.cookie=`${e}=${t};path=/;max-age=${n};SameSite=Lax`}("partymate_city",i.id)},children:i.label},i.id)})})}],826912);var a=e.i(271645),s=e.i(283086),l=e.i(37727),o=e.i(498896),c=e.i(603409),d=e.i(222976);e.s(["HeroPersonalizeCta",0,function({variant:e="hero",className:n}){let[i,u]=(0,a.useState)(!1),[m,p]=(0,a.useState)(0),[f,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{p((0,c.getLocalOnboarding)()?.hostIds.length??0);let e=e=>{e.key===c.ONBOARDING_KEY&&p((0,c.getLocalOnboarding)()?.hostIds.length??0)};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);let x=f?"Personalizingâ¦":m>0?`Refine your picks \xb7 ${m} selected`:"Get personalized recommendations",g="hero"===e,v=m>0&&!f;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(!0),className:(0,r.cn)("inline-flex items-center gap-2 rounded-full px-4 py-2 text-sm font-semibold transition-colors",g?"bg-lime text-lime-text shadow-md hover:bg-lime/90":"border border-border bg-card text-ink hover:bg-shell",f&&"curs
1or-wait opacity-90",n),"aria-label":x,children:[(0,t.jsx)(s.Sparkles,{className:"size-4","aria-hidden":!0}),(0,t.jsx)("span",{children:x})]}),v&&(0,t.jsx)("button",{type:"button",onClick:()=>{(0,c.clearLocalOnboarding)(),(0,o.clearAnchorCache)(),p(0),h(!1)},className:(0,r.cn)("inline-flex size-8 items-center justify-center rounded-full transition-colors",g?"bg-lime text-lime-text shadow-md hover:bg-lime/90":"border border-border bg-card text-ink hover:bg-shell"),"aria-label":"Drop personalization",title:"Drop personalization",children:(0,t.jsx)(l.X,{className:"size-4","aria-hidden":!0})})]}),(0,t.jsx)(d.TastePickerDialog,{open:i,onOpenChange:u,onSubmitted:e=>{p(e.length),h(!0),window.setTimeout(()=>h(!1),2500)}})]})}],736926)},498896,e=>{"use strict";var t=e.i(663654);let n="partymate.anchor.v1",r="partymate:anchor-updated";function i(){return"u">typeof localStorage}function a(){i()&&(localStorage.removeItem(n),window.dispatchEvent(new Event(r)))}async function s(e){if(!i()||0===e.length)return a(),null;let s=e.toSorted((e,t)=>e-t).join(",");try{let e=localStorage.getItem(n);if(e){let t=JSON.parse(e);if(t?.hostKey===s&&t.preferences)return t.preferences}}catch{}let l=function(){if(!i())return"ssr";let e="partymate.anchor.session",t=localStorage.getItem(e);return t||(t="u">typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():`s${Math.random().toString(36).slice(2)}${Date.now()}`,localStorage.setItem(e,t)),t}(),o=await (0,t.buildAnchor)({anchorId:`local-${l}`,referencePageIds:e}),c=o?.member?.preferences??null;if(!c)return null;let d={hostKey:s,preferences:c,builtAt:new Date().toISOString()};try{localStorage.setItem(n,JSON.stringify(d)),window.dispatchEvent(new Event(r))}catch{}return c}e.s(["ANCHOR_UPDATED_EVENT",0,r,"buildAndCacheAnchor",0,s,"clearAnchorCache",0,a,"getCachedAnchorPreferences",0,function(){if(!i())return null;try{let e=localStorage.getItem(n);if(!e)return null;let t=JSON.parse(e);if(!t?.preferences)return null;return t.preferences}catch{return null}}])},663654,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("4093774146add03d58015c8fb1bdae407dfd5b6259",t.callServer,void 0,t.findSourceMapURL,"buildAnchor");e.s(["buildAnchor",0,n])},672480,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("40c374ce1ad004bdcdcc31d679660cb394e0b1d861",t.callServer,void 0,t.findSourceMapURL,"expandTaste");e.s(["expandTaste",0,n])},280044,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("00fad74dd94e3330975118f993ef7e7b7e5c4ecac6",t.callServer,void 0,t.findSourceMapURL,"loadOnboardingPicks");e.s(["loadOnboardingPicks",0,n])},222976,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(912598),i=e.i(871689),a=e.i(972520),s=e.i(824511),l=e.i(846696),o=e.i(30593),c=e.i(145645),d=e.i(658663),u=e.i(498896),m=e.i(603409),p=e.i(630374),f=e.i(852917),h=e.i(167881),x=e.i(647163),g=e.i(266027),v=e.i(643531),b=e.i(555436),y=e.i(88653),w=e.i(23750),j=e.i(19050),k=e.i(95187);let N=(0,k.createServerReference)("607f306f22fb8f27684bc0ea8ab036ba8b097c4439",k.callServer,void 0,k.findSourceMapURL,"fetchVenuesByCity");var C=e.i(280044);let S=(0,k.createServerReference)("701b3952e1c485c61ce938deb92c0c3f08f3f27859",k.callServer,void 0,k.findSourceMapURL,"searchPages");var M=e.i(672480);function P(e){return"artists"===e?2:1}function _(e){return{id:e.id,name:e.name,logo_url:e.logo_url,category:e.category,city:e.city,source:"seed"}}function T({step:e,selectedIds:r,onChange:i,onCountsChange:a,className:l}){let[o,c]=(0,n.useState)("");(0,n.useEffect)(()=>{c("")},[e]);
1let[d,u]=(0,n.useState)({}),[m,p]=(0,n.useState)(null);(0,n.useEffect)(()=>{let t=o.trim();if(t.length<2)return;let n=`${e}:${t.toLowerCase()}`;if(d[n])return;let r=window.setTimeout(()=>{p(n),S(t,e,20).then(e=>{u(t=>({...t,[n]:e}))}).catch(()=>{u(e=>({...e,[n]:[]}))}).finally(()=>{p(e=>e===n?null:e)})},250);return()=>window.clearTimeout(r)},[o,e,d]);let{data:f,isLoading:h}=(0,g.useQuery)({queryKey:["onboardingPicks"],queryFn:()=>(0,C.loadOnboardingPicks)(),staleTime:6e5}),v=(0,n.useMemo)(()=>(f?.artists??[]).map(_),[f]),j=(0,n.useMemo)(()=>(f?.venues??[]).map(_),[f]),[k,I]=(0,n.useState)({}),[L,A]=(0,n.useState)(()=>new Set),[R,D]=(0,n.useState)(()=>new Set);(0,n.useEffect)(()=>{if(0===v.length&&0===j.length)return;let e=e=>{let t=v.find(t=>t.id===e);if(t)return t;let n=j.find(t=>t.id===e);return n||null},t=r.filter(t=>!(!e(t)||k[t]||L.has(t)||R.has(t)));0!==t.length&&(A(e=>{let n=new Set(e);for(let e of t)n.add(e);return n}),t.forEach(t=>{let n=e(t);n&&(v.some(e=>e.id===t)?async()=>{let e=e=>e.slice(0,10).map(e=>v.find(t=>t.id===e.page_id)??{id:e.page_id,name:e.name,logo_url:e.logo_url??null,category:e.category??null,city:null,source:{similarTo:t}}),n=await (0,M.expandTaste)({pageIds:[t],perReferenceLimit:10});return n.artists.length>0?e(n.artists):(await new Promise(e=>setTimeout(e,600)),e((await (0,M.expandTaste)({pageIds:[t],perReferenceLimit:10})).artists))}:async()=>n.city?(await N(n.city,12)).filter(e=>e.id!==t).slice(0,10).map(e=>({..._(e),source:{similarTo:t}})):[])().then(e=>{e.length>0?I(n=>({...n,[t]:e})):D(e=>new Set(e).add(t))}).catch(()=>{D(e=>new Set(e).add(t))}).finally(()=>{A(e=>{let n=new Set(e);return n.delete(t),n})})}))},[r,v,j,k,L,R]);let $=(0,n.useRef)(new Map),[O,F]=(0,n.useState)(()=>new Set);(0,n.useEffect)(()=>{for(let e of L){if($.current.has(e))continue;let t=window.setTimeout(()=>{$.current.delete(e),F(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},250);$.current.set(e,t)}for(let[e,t]of Array.from($.current.entries()))L.has(e)||(window.clearTimeout(t),$.current.delete(e));F(e=>{let t=!1,n=new Set;for(let r of e)L.has(r)?n.add(r):t=!0;return t?n:e})},[L]),(0,n.useEffect)(()=>{let e=$.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]),(0,n.useEffect)(()=>{D(e=>{let t=!1,n=new Set;for(let i of e)r.includes(i)?n.add(i):t=!0;return t?n:e})},[r]);let U=(0,n.useMemo)(()=>{let t="artists"===e?v:j,n=[...t],i=new Set;for(let e of r){if(!t.some(t=>t.id===e)||L.has(e)||!n.find(t=>t.id===e))continue;let r=k[e]??[],a=[];for(let e of r){if(a.length>=3)break;i.has(e.id)||a.push(e)}if(i.add(e),0===a.length)continue;let s=new Set(a.map(e=>e.id)),l=(n=n.filter(e=>!s.has(e.id))).findIndex(t=>t.id===e);for(let e of(n=-1===l?[...n,...a]:[...n.slice(0,l+1),...a,...n.slice(l+1)],a))i.add(e.id)}let a=new Set(n.map(e=>e.id));for(let e of r){if(a.has(e)||t.some(t=>t.id===e))continue;let r=Object.values(k).flat().find(t=>t.id===e);if(r){n.push(r),a.add(e);continue}let i=Object.values(d).flat().find(t=>t.id===e);i&&(n.push({id:i.id,name:i.name,logo_url:i.logo_url,category:i.category,city:i.city,source:"seed"}),a.add(e))}return n},[e,v,j,r,k,L,d]),H=(0,n.useMemo)(()=>{if(!o.trim())return U;let t=o.trim().toLowerCase(),n=U.filter(e=>e.name.toLowerCase().includes(t)),r=new Set(n.map(e=>e.id));return[...n,...(d[`${e}:${t}`]??[]).filter(e=>!r.has(e.id)).map(e=>({id:e.id,name:e.name,logo_url:e.logo_url,category:e.category,city:e.city,source:"seed"}))]},[U,o,e,d]),K=(0,n.useMemo)(()=>{let e=[...v,...j],t=new Set(e.map(e=>e.id));for(let n of Object.values(k))for(let r of n)t.has(r.id)||(t.add(r.id),e.push(r));for(let n of Object.values(d))for(let r of n)t.has(r.id)||(t.add(r.id),e.push({id:r.id,name:r.name,logo_url:r.logo_url,category:r.category,city:r.city,source:"seed"}));return e},[v,j,k,d]),B=(0,n.useCallback)(e=>{i(r.includes(e.id)?r.filter(t=>t!==e.id):[...r,e.id],K)},[r,i,K]),q=(0,n.useMemo)(()=>({artists:r.filter(e=>v.some(t=>t.id===e)).length,venues:r.filter(e=>j.some(t=>t.id===e)).length}),[r,v,j]);(0,n.useEffect)(()=>{a?.(q)},[q,a]);let Q=[];for(let e of H){let n=r.includes(e.id);if(Q.push((0,t.jsx)(s.m.div,{layout:!0,initial:{opacity:0,scale:.7}
1,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:380,damping:28,mass:.6},children:(0,t.jsx)(z,{item:e,isSelected:n,onClick:()=>B(e)})},e.id)),O.has(e.id))for(let n=0;n<3;n+=1)Q.push((0,t.jsx)(s.m.div,{layout:!0,initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:380,damping:28,mass:.6,delay:.05*n},children:(0,t.jsx)(E,{})},`ph-${e.id}-${n}`))}return(0,t.jsxs)("div",{className:(0,x.cn)("flex flex-col gap-4",l),children:[(0,t.jsxs)("h2",{className:"text-2xl font-semibold leading-tight tracking-tight text-ink",children:["Choose ",P(e)," or more ",e," you like."]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(b.Search,{className:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-ink-muted"}),(0,t.jsx)(w.Input,{value:o,onChange:e=>c(e.target.value),placeholder:"artists"===e?"Search artistsâ¦":"Search venuesâ¦",className:"pl-10"})]}),(0,t.jsx)("div",{className:"min-h-0",children:h&&0===U.length?(0,t.jsx)("p",{className:"py-12 text-center text-sm text-ink-muted",children:"Loadingâ¦"}):0===H.length?(0,t.jsx)("p",{className:"py-12 text-center text-sm text-ink-muted",children:o.trim()?m===`${e}:${o.trim().toLowerCase()}`?"Searchingâ¦":`No matches for "${o.trim()}"`:"Nothing here yet."}):(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3 sm:grid-cols-4",children:(0,t.jsx)(y.AnimatePresence,{initial:!1,mode:"popLayout",children:Q.map((e,r)=>(0,t.jsx)(n.Fragment,{children:e},r))})})})]})}function z({item:e,isSelected:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,x.cn)("group flex w-full flex-col items-center gap-1.5 rounded-lg p-1.5 text-center transition-colors","hover:bg-shell focus-visible:bg-shell focus-visible:outline-none"),"aria-pressed":n,children:[(0,t.jsxs)("div",{className:"relative aspect-square w-full",children:[(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden rounded-full",children:(0,t.jsx)(j.PageAvatar,{src:e.logo_url,name:e.name,shape:"round",size:"fill"})}),n&&(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex size-7 items-center justify-center rounded-full bg-lime text-lime-text shadow-md ring-2 ring-background","aria-hidden":!0,children:(0,t.jsx)(v.Check,{className:"size-4",strokeWidth:3.5})})]}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs font-medium leading-tight text-ink",children:e.name})]})}function E(){return(0,t.jsxs)("div",{className:"flex w-full flex-col items-center gap-1.5 p-1.5 text-center","aria-hidden":!0,children:[(0,t.jsx)("div",{className:"aspect-square w-full animate-pulse rounded-full bg-shell"}),(0,t.jsx)("div",{className:"h-3 w-3/4 animate-pulse rounded bg-shell"})]})}function I({step:e,stepCount:n,stepMin:r,minMet:s,allMinsMet:l,submitting:o,canGoBack:c,onBack:d,onPrimary:u}){let m=Math.max(0,r-n),p=Math.max(0,n-r),f="artists"===e?"continue":"finish";return(0,t.jsxs)("div",{className:"flex shrink-0 flex-col gap-3 border-t border-ink/10 bg-ink px-4 py-4 text-background",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 text-xs font-medium uppercase tracking-wider text-background/70",children:[(0,t.jsxs)("span",{children:["Step ","artists"===e?1:2," of 2 · ","artists"===e?"Artists":"Venues"]}),(0,t.jsxs)("span",{"aria-live":"polite",children:[Math.min(n,r)," / ",r,p>0?` \xb7 +${p}`:""]})]}),(0,t.jsx)(L,{filled:Math.min(n,r),total:r}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[c?(0,t.jsxs)(h.Button,{variant:"ghost",className:"gap-1.5 text-background hover:bg-background/10 hover:text-background",onClick:d,children:[(0,t.jsx)(i.ArrowLeft,{className:"size-4"}),"Back"]}):(0,t.jsx)("span",{className:"text-xs text-background/60",children:s?`Looking great â pick more or ${f}`:`Pick ${m} more to ${f}`}),(0,t.jsxs)(h.Button,{size:"lg",disabled:"artists"===e?!s:!l||o,onClick:u,className:"gap-1.5",children:["artists"===e?"Continue":o?"Savingâ¦":"Done","artists"===e&&(0,t.jsx)(a.ArrowRight,{className:"size-4"})]})]})]})}function L({filled:e,total:n}){return(0,t.jsx)("div",{className:"flex h-1.5 gap-1",role:"progressbar","aria-valuenow":e,"aria-valuemax":n,children:Array.from({length:n}).map((n,r)=>(0,t.jsx)("div",{className:"relative flex-1 overflow-hidden rounded-full bg-background/15",children:(0,t.jsx)(s.m.div,{className:"absolute inset-0 origin-left rounded-full bg-lime",initial:!1,animate:{scaleX:+(r<e)},transition:{type:"spring",stiffness:320,damping:28}})},r))})}e.s(["TastePickerDialog",0,function({open:e,onOpenChange:i,onSubmitted:a}){let s=(0,o.useIsMobile)(),{data:h}=(0,c.useUser)(),g=!!h&&!h.isAnonymous,v=(0,r.useQueryClient)(),[b,y]=(0,n.use
1State)("artists"),[w,j]=(0,n.useState)([]),[k,N]=(0,n.useState)([]),[C,S]=(0,n.useState)({artists:0,venues:0}),[M,_]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!e)return;y("artists");let t=(0,m.getLocalOnboarding)();t&&t.hostIds.length>0&&j(t.hostIds)},[e]);let z=(0,n.useCallback)((e,t)=>{j(e),N(t)},[]),E=(0,n.useCallback)(async()=>{if(!(C.artists<2)&&!(C.venues<1)){_(!0);try{let e=k.filter(e=>w.includes(e.id)).map(e=>({id:e.id,name:e.name,logo_url:e.logo_url,category:e.category}));if((0,m.saveLocalOnboarding)({hostIds:w,hosts:e}),g){if(!(await (0,d.addPreferredHosts)(h?.id??"",w)).success)return void l.toast.error("Failed to save your picks");(0,m.clearLocalOnboarding)(),v.invalidateQueries({queryKey:["preferredHosts"]}),v.invalidateQueries({queryKey:["tasteAnchor"]})}i(!1),a?.(w),g||(async()=>{await (0,u.buildAndCacheAnchor)(w),v.invalidateQueries({queryKey:["calendar-events"]}),v.invalidateQueries({queryKey:["short-trip"]})})()}catch(e){l.toast.error(e instanceof Error?e.message:"Something went wrong")}finally{_(!1)}}},[C.artists,w,k,g,h?.id,v,i,a]),L="artists"===b?C.artists:C.venues,A=P(b),R=L>=A,D=C.artists>=2&&C.venues>=1,$=(0,n.useCallback)(()=>{"artists"===b?R&&y("venues"):E()},[b,R,E]),O=(0,n.useCallback)(()=>y("artists"),[]),F=(0,n.useMemo)(()=>(0,t.jsx)(I,{step:b,stepCount:L,stepMin:A,minMet:R,allMinsMet:D,submitting:M,canGoBack:"venues"===b,onBack:O,onPrimary:$}),[b,L,A,R,D,M,O,$]);return s?(0,t.jsx)(f.Sheet,{open:e,onOpenChange:i,children:(0,t.jsxs)(f.SheetContent,{side:"bottom",className:(0,x.cn)("flex flex-col gap-0 rounded-t-2xl p-0 data-[side=bottom]:h-[88vh]"),children:[(0,t.jsx)(f.SheetTitle,{className:"sr-only",children:"Personalize your picks"}),(0,t.jsx)(f.SheetDescription,{className:"sr-only",children:"Two-step taste picker â first artists, then venues."}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4 pt-6",children:(0,t.jsx)(T,{step:b,selectedIds:w,onChange:z,onCountsChange:S})}),F]})}):(0,t.jsx)(p.Dialog,{open:e,onOpenChange:i,children:(0,t.jsxs)(p.DialogContent,{className:(0,x.cn)("flex h-[80vh] max-h-[720px] w-[min(96vw,640px)] max-w-[640px] flex-col gap-0 p-0 sm:max-w-[640px]"),children:[(0,t.jsx)(p.DialogTitle,{className:"sr-only",children:"Personalize your picks"}),(0,t.jsx)(p.DialogDescription,{className:"sr-only",children:"Two-step taste picker â first artists, then venues."}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-5 pb-4 pt-6",children:(0,t.jsx)(T,{step:b,selectedIds:w,onChange:z,onCountsChange:S})}),F]})})}],222976)},606406,e=>{"use strict";var t=e.i(271645),n=e.i(498896);e.s(["useAnonymousAnchor",0,function(){let[e,r]=(0,t.useState)(null);return(0,t.useEffect)(()=>{r((0,n.getCachedAnchorPreferences)());let e=()=>r((0,n.getCachedAnchorPreferences)());return window.addEventListener(n.ANCHOR_UPDATED_EVENT,e),window.addEventListener("storage",e),()=>{window.removeEventListener(n.ANCHOR_UPDATED_EVENT,e),window.removeEventListener("storage",e)}},[]),e}])},297589,112213,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("400d373a17e6873dc05002e117f1210b681327b9c9",t.callServer,void 0,t.findSourceMapURL,"getShortTripEvents");e.s(["getShortTripEvents",0,n],297589);let r=[{name:"Ibiza",latitude:38.95,longitude:1.43,radiusKm:25,country:"Spain"},{name:"Mykonos",latitude:37.45,longitude:25.34,radiusKm:20,country:"Greece"},{name:"Tulum",latitude:20.21,longitude:-87.46,radiusKm:25,country:"Mexico"},{name:"Mallorca",latitude:39.69,longitude:3.02,radiusKm:60,country:"Spain"},{name:"Malta",latitude:35.91,longitude:14.45,radiusKm:25,country:"Malta"},{name:"Santorini",latitude:36.42,longitude:25.43,radiusKm:15,country:"Greece"},{name:"Formentera",latitude:38.71,longitude:1.45,radiusKm:12,country:"Spain"},{name:"Bali",latitude:-8.5,longitude:115.18,radiusKm:70,country:"Indonesia"}];function i(e,t,n,r){return 12742*Math.asin(Math.sqrt(Math.sin((n-e)*Math.PI/180/2)**2+Math.sin((r-t)*Math.PI/180/2)**2*Math.cos(e*Math.PI/180)*Math.cos(n*Math.PI/180)))}function a(e){let t=e.coolness_score;return"number"==typeof t?t:0}function s(e){let t=e.start_date_time??e.start_date??null;if(!t)return 1/0;let n=Date.parse(t);return Number.isFinite(n)?n:1/0}e.s(["groupEventsByDestination",0,function(e){let t=new Map,n=[];for(let r of e){let e=r.place,i=e?.locality;if(i?.id){let e=`loc:${i.id}`,n=t.get(e);n||(n={id:e,localityId:i.id,name:i.name,country:i.country_code??null,latitude:i.latitude,longitude:i.longitude,radiu
1sKm:i.radius_km??30,eventCount:0,topCoolness:0,events:[]},t.set(e,n)),n.events.push(r),n.eventCount+=1;let s=a(r);s>n.topCoolness&&(n.topCoolness=s)}else e?.city&&"number"==typeof e.latitude&&"number"==typeof e.longitude&&n.push(r)}let l=[...t.values(),...function(e){let t=[];for(let n of e){let e,r=n.place;if(!r?.city||"number"!=typeof r.latitude||"number"!=typeof r.longitude)continue;for(let n of t)if(30>=i(n.centerLat,n.centerLng,r.latitude,r.longitude)){e=n;break}if(e){let t=e.eventCount+1;e.centerLat=(e.centerLat*e.eventCount+r.latitude)/t,e.centerLng=(e.centerLng*e.eventCount+r.longitude)/t}else e={centerLat:r.latitude,centerLng:r.longitude,cityCounts:new Map,country:r.country??null,events:[],eventCount:0,topCoolness:0},t.push(e);e.events.push(n),e.eventCount+=1,e.cityCounts.set(r.city,(e.cityCounts.get(r.city)??0)+1);let s=a(n);s>e.topCoolness&&(e.topCoolness=s)}return t.map((e,t)=>{let n,a=r.find(t=>i(t.latitude,t.longitude,e.centerLat,e.centerLng)<=t.radiusKm);if(a)n=a.name;else{let t="",r=-1;for(let[n,i]of e.cityCounts)i>r&&(t=n,r=i);n=t}return{id:`geo:${n.normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}:${t}`,localityId:null,name:n,country:a?.country??e.country,latitude:e.centerLat,longitude:e.centerLng,radiusKm:a?.radiusKm??30,eventCount:e.eventCount,topCoolness:e.topCoolness,events:e.events}})}(n)];for(let e of l)e.events.sort((e,t)=>s(e)-s(t));return l.sort((e,t)=>t.topCoolness!==e.topCoolness?t.topCoolness-e.topCoolness:t.eventCount-e.eventCount)}
1,"isAnchorDestination",0,function(e,t,n=30){return i(e.latitude,e.longitude,t.latitude,t.longitude)<=n},"zoomForRadiusKm",0,function(e){return Math.max(4,Math.min(12,9-Math.log2(Math.max(1,e)/30)))}],112213)},972038,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(619273),i=e.i(266027),a=e.i(346897),s=e.i(826912),l=e.i(736926),o=e.i(466615),c=e.i(145645),d=e.i(606406),u=e.i(297589),m=e.i(595727);let p=[{key:"this-week",label:"This week",days:7},{key:"this-month",label:"This month",days:30},{key:"next-8-weeks",label:"Next 8 weeks",days:56},{key:"next-3-months",label:"Next 3 months",days:90}],f="next-8-weeks";var h=e.i(112213),x=e.i(647163);function g({value:e,onChange:n}){return(0,t.jsx)("div",{"aria-label":"Date window",className:"flex flex-wrap items-center gap-2 px-4 pt-3 pb-1 md:px-5",role:"radiogroup",children:p.map(r=>{let i=r.key===e;return(0,t.jsx)("button",{"aria-checked":i,className:(0,x.cn)("rounded-full px-4 py-2 text-xs font-medium leading-none transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/30",i?"bg-lime text-lime-text shadow-[0px_4px_6px_0px_rgba(0,0,0,0.1)]":"border border-white/10 bg-[rgba(20,20,20,0.2)] text-white hover:text-white/80"),role:"radio",type:"button",onClick:()=>n(r.key),children:r.label},r.key)})})}var v=e.i(971757),b=e.i(390445);function y({destinations:e,activeDestinationId:n,anchor:r,user:i,registerSectionRef:a}){return 0===e.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,t.jsx)("p",{className:"text-base font-semibold text-ink",children:"No flight-worthy events in this window"}),(0,t.jsx)("p",{className:"mt-2 max-w-sm text-sm leading-relaxed text-ink-muted",children:"Try widening the date range â peak weekends often sit two months out."})]}):(0,t.jsx)("div",{className:"flex flex-col",children:e.map(e=>(0,t.jsx)(w,{anchor:r,destination:e,isActive:e.id===n,user:i,registerSectionRef:a},e.id))})}function w({destination:e,isActive:r,anchor:i,user:s,registerSectionRef:l}){let o=(0,n.useRef)(null),c=(0,h.isAnchorDestination)(e,i);return(0,t.jsxs)("section",{ref:t=>{o.current=t,l(e.id,t)},"aria-current":r?"true":void 0,className:(0,x.cn)("scroll-mt-[260px] border-t border-white/5 px-4 pt-6 pb-8 md:px-5",r&&"bg-shell"),id:`destination-${e.id.replace(":","-")}`,children:[(0,t.jsxs)("header",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-ink md:text-2xl",children:e.name}),e.country&&(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-2.5 py-0.5 text-[11px] font-medium uppercase tracking-wide text-white/70",children:e.country}),(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-2.5 py-0.5 text-[11px] font-medium text-white/80",children:[e.eventCount," event",1===e.eventCount?"":"s"]}),e.topCoolness>=70&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-lime/15 px-2.5 py-0.5 text-[11px] font-semibold text-lime",children:["Peak ",Math.round(e.topCoolness)]}),c?(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-2.5 py-0.5 text-[11px] font-medium text-white/70",children:[(0,t.jsx)(a.MapPin,{className:"size-3"}),"Home base"]}):(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-2.5 py-0.5 text-[11px] font-medium text-white/70",children:[(0,t.jsx)(v.Plane,{className:"size-3"}),"Trip"]})]}),(0,t.jsx)("div",{className:"-mx-4 overflow-x-auto pb-2 md:-mx-5 [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none"},children:(0,t.jsx)("div",{className:"flex w-max snap-x snap-mandatory gap-3",children:e.events.map(e=>(0,t.jsx)("div",{className:"w-[calc((100vw-0.75rem)/2)] flex-none snap-start md:w-[220px] lg:w-[240px]",children:(0,t.jsx)(b.MmwEventCard,{event:e,followedHostIds:[],showHeat:!0,user:s})},e.id))})})]})}e.i(247167);var j=e.i(363178);let k=(0,n.forwardRef)(function({destinations:r,anchor:i,activeDestinationId:a,onPinCl
1ick:s},l){let o=(0,n.useRef)(null),c=(0,n.useRef)(null),d=(0,n.useRef)(new Map),u=(0,n.useRef)(null),m=(0,n.useRef)(!1),p=(0,n.useRef)(!1),f=(0,n.useRef)(null),[x,g]=(0,n.useState)(!1),[v,b]=(0,n.useState)(0),{resolvedTheme:y}=(0,j.useTheme)(),w="light"===y,k=w?"mapbox://styles/mapbox/light-v11":"mapbox://styles/mapbox/dark-v11";(0,n.useImperativeHandle)(l,()=>({resize:()=>{let e=c.current;e?.resize?.()},refit:()=>{p.current=!0,m.current=!1,b(e=>e+1)}}),[]);let N=(0,n.useMemo)(()=>r.map(e=>({id:e.id,lat:e.latitude,lng:e.longitude,coolness:e.topCoolness,count:e.eventCount,name:e.name})),[r]);return(0,n.useEffect)(()=>{m.current=!1},[r]),(0,n.useEffect)(()=>{let t=!1,n="pk.eyJ1IjoibmlrbGFzYWkiLCJhIjoiY21vZTd5OGxzMGVvbDJyczI0amNicGVhNSJ9.0IlxC5yvSL-70kOGKIuTXg\n";if(!o.current||!n)return;(async()=>{let r=(await e.A(52498)).default;if(t)return;await e.A(98650),r.accessToken=n;let a=new r.Map({container:o.current,style:k,center:[i.longitude,i.latitude],zoom:3.5,projection:{name:"mercator"},attributionControl:!1});c.current=a,f.current=k,a.on("load",()=>{t||g(!0)})})();let r=d.current;return()=>{t=!0;let e=c.current;e?.remove?.(),c.current=null,r.clear(),u.current=null,g(!1)}},[i.latitude,i.longitude]),(0,n.useEffect)(()=>{if(!x||f.current===k)return;let e=c.current;if(!e)return;f.current=k,e.setStyle(k);let t=()=>{b(e=>e+1)};return e.once("style.load",t),()=>{e.off("style.load",t)}},[k,x]),(0,n.useEffect)(()=>{if(!x)return;let t=c.current;if(!t)return;let n=!1;return(async()=>{let l=(await e.A(52498)).default;if(n)return;d.current.forEach(e=>{e.remove()}),d.current.clear(),N.forEach(e=>{var n;let r=e.id===a,i=18+1.75*Math.min(e.count,8),o=(n=e.coolness,r||n>=80?"#FE4F30":n>=70?"#B6E300":"#7BC74D"),c=document.createElement("button");c.type="button",c.setAttribute("aria-label",`${e.name} â ${e.count} event${1===e.count?"":"s"}`),c.style.cssText=[`width:${i}px`,`height:${i}px`,"border-radius:9999px",`background:${o}`,"border:2px solid rgba(0,0,0,0.85);display:flex;align-items:center;justify-content:center;color:rgba(0,0,0,0.85);font-weight:700;font-size:11px;line-height:1;cursor:pointer;transition:transform 160ms ease, box-shadow 160ms ease",r?"box-shadow:0 0 0 3px rgba(255,255,255,0.45), 0 0 22px 8px rgba(254, 79, 48,0.65);transform:scale(1.25);":"box-shadow:0 0 0 2px rgba(255,255,255,0.18), 0 2px 6px rgba(0,0,0,0.6);"].join(";"),e.count>1&&(c.textContent=String(e.count)),c.addEventListener("click",()=>s(e.id));let u=new l.Marker(c).setLngLat([e.lng,e.lat]).addTo(t);d.current.set(e.id,u)});let o=N.find(e=>e.id===a),c=void 0!==o&&(0,h.isAnchorDestination)({latitude:o.lat,longitude:o.lng},{latitude:i.latitude,longitude:i.longitude});if(u.current&&(u.current.remove(),u.current=null),!c){let e=document.createElement("div");e.style.cssText="width:16px;height:16px;border-radius:9999px;border:2px solid #FE4F30;background:rgba(254, 79, 48,0.25);box-shadow:0 0 14px rgba(254, 79, 48,0.65);pointer-events:none;",u.current=new l.Marker(e).setLngLat([i.longitude,i.latitude]).addTo(t)}if(!m.current){let e=N.filter(e=>{var t,n,r;return t=i.latitude,n=i.longitude,12742*Math.asin(Math.sqrt(Math.sin(((r=e.lat)-t)*Math.PI/180/2)**2+Math.sin((e.lng-n)*Math.PI/180/2)**2*Math.cos(t*Math.PI/180)*Math.cos(r*Math.PI/180)))<=5e3});if(0===e.length)t.flyTo({center:[i.longitude,i.latitude],zoom:3.5,duration:600});else{let n=new l.LngLatBounds;n.extend([i.longitude,i.latitude]),e.forEach(e=>n.extend([e.lng,e.lat])),t.fitBounds(n,{padding:60,maxZoom:6,duration:600})}m.current=!0,p.current=!1;return}if(o&&!p.current){let e=r.find(e=>e.id===o.id);e&&t.easeTo({center:[e.longitude,e.latitude],zoom:(0,h.zoomForRadiusKm)(e.radiusKm),duration:700,essential:!0})}})(),()=>{n=!0}},[N,r,a,s,x,v,i.latitude,i.longitude]),(0,t.jsx)("div",{ref:o,"aria-label":"Map of destination hotspots near you",className:`relative h-full w-full overflow-hidden ${w?"bg-[#F4F4F1]":"bg-[#0A0A0F]"}`,role:"region"})});function N(e){let r=(0,n.useRef)(null);return(0,t.jsx)("div",{className:"relative h-[360px] w-full overflow-hidden md:h-[440px]",children:(0,t.jsx)(k,{ref:r,...e})})}e.s(["ShortTripClient",0,function({anchor:e,initial:v}){let{data:b}=(0,c.useUser)(),w=b?.isAnonymous??!0,j=(0,d.useAnonymousAnchor)(),k=w?j:null,[C,S]=(0,n.use
1State)(f),[M,P]=(0,n.useState)(null),_=(0,n.useRef)(new Map),T=(0,n.useMemo)(()=>{let e,t;return e=p.find(e=>e.key===C)??p[2],{after:(t=new Date).toISOString(),before:(0,m.addDays)(t,e.days).toISOString()}},[C]),{data:z,isFetching:E}=(0,i.useQuery)({queryKey:["short-trip",e.latitude,e.longitude,C,k?"personalized":"default"],queryFn:()=>(0,u.getShortTripEvents)({latitude:e.latitude,longitude:e.longitude,startAfter:T.after,startBefore:T.before,userProfile:k}),initialData:C!==f||k?void 0:v,placeholderData:r.keepPreviousData,staleTime:3e5}),I=z??v,L=(0,n.useMemo)(()=>I.events??[],[I.events]),A=(0,n.useMemo)(()=>(0,h.groupEventsByDestination)(L),[L]),R=M&&A.some(e=>e.id===M)?M:A[0]?.id??null,D=(0,n.useCallback)(e=>{P(e);let t=_.current.get(e);t&&t.scrollIntoView({behavior:"smooth",block:"start"})},[]),$=(0,n.useCallback)((e,t)=>{t?_.current.set(e,t):_.current.delete(e)},[]),O=(0,n.useCallback)(e=>{S(e),P(null)},[]),F="vercel"===e.source&&e.city?`Trips from ${e.city}`:"vercel"===e.source?"Trips from your location":"Trips from Hamburg",U=p.find(e=>e.key===C)?.label??"Next 8 weeks";return(0,t.jsxs)("div",{className:"overflow-x-clip",children:[(0,t.jsx)("section",{className:"overflow-x-auto bg-page px-0 pt-0 pb-2 md:px-5 md:pt-5 md:pb-[10px] [&::-webkit-scrollbar]:hidden",style:{scrollbarWidth:"none"},children:(0,t.jsxs)("div",{className:"flex flex-col items-center gap-3 px-4 py-5 md:py-5",children:[(0,t.jsx)(s.CitySwitcher,{active:"short-trip"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 px-2 text-center",children:[(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-3 py-1 text-xs font-medium text-white",children:[(0,t.jsx)(a.MapPin,{className:"size-3.5"}),F]}),(0,t.jsx)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-[rgba(20,20,20,0.4)] px-3 py-1 text-xs font-medium text-white/80",children:L.length>0?`${A.length} destination${1===A.length?"":"s"} \xb7 ${L.length} event${1===L.length?"":"s"} \xb7 ${U.toLowerCase()}`:`Quiet ${U.toLowerCase()} â try a wider window`}),"soft"===I.floor&&(0,t.jsx)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-amber-400/30 bg-amber-500/10 px-3 py-1 text-xs font-medium text-amber-200",children:"Quiet window â broadening picks"}),"global"===I.floor&&(0,t.jsx)("span",{className:"inline-flex items-center gap-1.5 rounded-full border border-amber-400/30 bg-amber-500/10 px-3 py-1 text-xs font-medium text-amber-200",children:"Nothing peak nearby â showing global picks"})]}),(0,t.jsx)(l.HeroPersonalizeCta,{})]})}),(0,t.jsx)(N,{activeDestinationId:R,anchor:e,destinations:A,onPinClick:D}),(0,t.jsx)(g,{value:C,onChange:O}),(0,t.jsx)("div",{className:(0,x.cn)("min-h-[40vh] bg-shell",E&&"opacity-70 transition-opacity"),children:(0,t.jsx)(y,{activeDestinationId:R,anchor:e,destinations:A,registerSectionRef:$,user:b??null})}),(0,t.jsx)(o.MmwFooter,{})]})}],972038)},133543,e=>{e.v(t=>Promise.all(["static/chunks/0s~li0t7s.pmd.js"].map(t=>e.l(t))).then(()=>t(970905)))},862628,e=>{e.v(e=>Promise.resolve().then(()=>e(829601)))},52498,e=>{e.v(t=>Promise.all(["static/chunks/0v26prtyl~e1g.js"].map(t=>e.l(t))).then(()=>t(171725)))},98650,e=>{e.v(t=>Promise.all(["static/chunks/0c8ie4waiph_r.css"].map(t=>e.l(t))).then(()=>{}))}]);
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.