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),a=e.i(912598),i=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:u,onSaveSuccess:d}){let[f,m]=(0,n.useState)(t),[p,h]=(0,n.useState)(o),[g,v]=(0,n.useState)(c),x=(0,a.useQueryClient)(),y=(0,r.useMutation)({mutationFn:t=>(0,s.postInteraction)({event_id:e,type:t}),onMutate:()=>{let e=!f;return m(e),u?u(e):(0,i.toast)(e?"Saved! We'll recommend more like this":"Removed from saved",{duration:2e3}),{prev:{saved:f,liked:p,disliked:g},cacheUpdates:{saved:e}}},onSuccess:(t,n,r)=>{r&&l(x,e,r.cacheUpdates),d?.()},onError:(e,t,n)=>{n&&(m(n.prev.saved),h(n.prev.liked),v(n.prev.disliked)),i.toast.error("Something went wrong. Please try again.")}}),b=(0,r.useMutation)({mutationFn:()=>(0,s.postInteraction)({event_id:e,type:"event_like"}),onMutate:()=>{let e=!p;h(e);let t={liked:e};return e&&g&&(v(!1),t.disliked=!1),(0,i.toast)(e?"Thanks for the feedback!":"Like removed",{duration:2e3}),{prev:{saved:f,liked:p,disliked:g},cacheUpdates:t}},onSuccess:(t,n,r)=>{r&&l(x,e,r.cacheUpdates)},onError:(e,t,n)=>{n&&(m(n.prev.saved),h(n.prev.liked),v(n.prev.disliked)),i.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=!g;v(e);let t={disliked:e};return e&&(p&&(h(!1),t.liked=!1),f&&(m(!1),t.saved=!1)),(0,i.toast)(e?"We'll show less like this":"Dislike removed",{duration:2e3}),{prev:{saved:f,liked:p,disliked:g},cacheUpdates:t}},onSuccess:(t,n,r)=>{r&&l(x,e,r.cacheUpdates)},onError:(e,t,n)=>{n&&(m(n.prev.saved),h(n.prev.liked),v(n.prev.disliked)),i.toast.error("Something went wrong. Please try again.")}}),k=y.isPending||b.isPending||w.isPending,j=(0,n.useCallback)(()=>{y.isPending||y.mutate(f?"event_unsave":"event_save")},[y,f]);return{isSaved:f,isLiked:p,isDisliked:g,toggleSave:j,toggleLike:(0,n.useCallback)(()=>{b.isPending||b.mutate()},[b]),toggleDislike:(0,n.useCallback)(()=>{w.isPending||w.mutate()},[w]),isPending:k}}],878441)},667585,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let r=e.r(132061);function a({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),a=e.r(174080),i=e.r(563599),s=e.r(309885),l=e.r(543369);function o({moduleIds:e}){if("u">typeof window)return null;let t=i.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,a.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),a=e.r(271645),i=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,a.lazy)(()=>t.loader().then(l)),c=t.loading;function u(e){let l=c?(0,r.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,u=o?a.Suspense:a.Fragment,d=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)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(u,{...o?{fallback:l}:{},children:d})}return u.displayName="LoadableComponent",u}},770703,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return a}});let r=e.r(555682)._(e.r(869093));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.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),a=e.i(790597),i=e.i(522016),s=e.i(946258),l=e.i(244632),o=e.i(54513),c=e.i(486212);let u=new Set;function d(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(!1),{ref:i,inView:s}=(0,o.useInView)({threshold:.5,triggerOnce:!1});return(0,n.useEffect)(()=>{let n=`${e}-${t}`;if(!u.has(n)&&!a.current)return s?r.current=setTimeout(()=>{u.has(n)||a.current||(u.add(n),a.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:i}}e.s(["useEventImpression",0,d],648150);var f=e.i(878441),m=e.i(912598),p=e.i(618566);function h(){let e=(0,m.useQueryClient)(),t=(0,p.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 g=e.i(952771),v=e.i(922809),x=e.i(647163);function y(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,y],371419);var b=e.i(343926),w=e.i(19050),k=e.i(88653),j=e.i(824511);let S=(0,e.i(770703).default)(()=>e.A(133543),{loadableGenerated:{modules:[970905]},ssr:!1}),N=[{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 C({venueName:e,imageUrl:r,onDismiss:a,onShare:i}
1){let[s,l]=(0,n.useState)(null),[o,c]=(0,n.useState)(!1),u=(0,n.useRef)(a);return(0,n.useEffect)(()=>{u.current=a},[a]),(0,n.useEffect)(()=>{fetch("/confetti-animation.json").then(e=>e.json()).then(e=>l(e)).catch(()=>{})},[]),(0,n.useEffect)(()=>{let e=setTimeout(()=>u.current(),3e3);return()=>clearTimeout(e)},[]),(0,t.jsxs)(j.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)(S,{animationData:s,loop:!1,rendererSettings:{preserveAspectRatio:"xMidYMid slice"},style:{height:"100%",width:"100%"}})}),(0,t.jsxs)(j.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)(j.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)(j.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,b.getOptimizedImageUrl)(r),width:200,onLoad:()=>c(!0)})]},r),(0,t.jsx)("ul",{className:"mt-4 shrink-0 space-y-2 text-left",children:N.map((e,n)=>(0,t.jsxs)(j.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:a,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)(j.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:()=>{i(),a()},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:a,onShare:i}){return(0,t.jsx)(k.AnimatePresence,{children:e&&(0,t.jsx)(C,{imageUrl:r,venueName:n,onDismiss:a,onShare:i})})}function _({heatScore:e,className:n}){return(0,t.jsxs)("div",{className:(0,x.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,x.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"})]})}
1var P=e.i(954616),T=e.i(531278),E=e.i(658663),I=e.i(677120),A=e.i(396668);let L=(0,n.lazy)(()=>e.A(862628).then(e=>({default:e.LoginModal})));function D({hostId:e,hostName:r,isFollowing:a,user:i,className:s}){let[l,o]=(0,n.useState)(!1),[c,u]=(0,n.useState)(a),d=(0,m.useQueryClient)(),f=(0,n.useRef)(!1),p=h(),g=i?.isAnonymous??!0,b=i?.id,w=(0,P.useMutation)({mutationFn:async()=>{if(!b)throw Error("User not authenticated");return(0,E.addPreferredHosts)(b,[e])},onMutate:()=>{u(!0),(0,v.hapticTrigger)("success")},onSuccess:()=>{d.invalidateQueries({queryKey:["preferred-hosts"]}),A.hapticToast.success(`Now following ${r}`)},onError:e=>{u(!1),console.error("[FollowButton] Follow failed:",e),A.hapticToast.error("Failed to follow. Please try again.")}}),k=(0,P.useMutation)({mutationFn:async()=>{if(!b)throw Error("User not authenticated");return(0,I.deletePreferredHost)(b,e)},onMutate:()=>{u(!1),(0,v.hapticTrigger)("light")},onSuccess:()=>{d.invalidateQueries({queryKey:["preferred-hosts"]}),A.hapticToast.success(`Unfollowed ${r}`)},onError:e=>{u(!0),console.error("[FollowButton] Unfollow failed:",e),A.hapticToast.error("Failed to unfollow. Please try again.")}}),j=w.isPending||k.isPending,S=(0,n.useCallback)(async()=>{if(await p(),f.current){f.current=!1;let t=d.getQueryData(["currentUser"]);t?.id&&!t.isAnonymous&&(0,E.addPreferredHosts)(t.id,[e]).then(()=>{u(!0),d.invalidateQueries({queryKey:["preferred-hosts"]}),A.hapticToast.success(`Now following ${r}`)}).catch(e=>{console.error("[FollowButton] Follow after login failed:",e),A.hapticToast.error("Failed to follow. Please try again.")})}},[p,d,e,r]),N=(0,n.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),g){f.current=!0,y({type:"follow",hostId:e,hostName:r}),o(!0);return}c?k.mutate():w.mutate()},[g,c,e,r,w,k]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("button",{className:(0,x.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",j&&"cursor-not-allowed opacity-50",s),disabled:j,type:"button",onClick:N,children:j?(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:b,open:l,onLoginSuccess:S,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:u=!1}){let{ref:m}=d(e.id,"calendar"),{isSaved:p,toggleSave:k}=(0,f.useEventInteraction)({eventId:e.id,initialSaved:e.user_interactions?.saved??!1,onSaveToggle:e=>{e?((0,v.hapticTrigger)("success"),S(!0)):(0,v.hapticTrigger)("light")}}),[j,S]=(0,n.useState)(!1),[N,C]=(0,n.useState)(!1),P=(0,n.useRef)(null),T=h(),E=o?.isAnonymous??!0,I=(0,n.useCallback)(e=>{m(e)},[m]),A=(0,n.useCallback)(async()=>{await T(),"save"===P.current&&(k(),P.current=null)},[T,k]),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]),O=(0,n.useCallback)(t=>{if(t.preventDefault(),t.stopPropagation(),E){P.current="save",y({type:"save",eventId:e.id,eventName:e.name}),C(!0);return}k()},[e.id,e.name,E,k]),z=e.hosts?.[0],U=!!z&&c.includes(z.id),$=e.start_date||e.date,F=$?(0,r.format)(new Date($),"d EEE").toUpperCase():"",K=e.genres?.slice(0,2).map(e=>e.replaceAll("_"," ").toLowerCase().replaceAll(/\b\w/g,e=>e.toUpperCase())).join(", ")||"",q=e.ticketing?.ticket_price_starts_at,V=q?`${Math.round(q)}â¬`:null,H=e.personalization?.score??0,B=e.predicted_popularity_heat??null,Q=()=>{(0,l.setEventPreview)(e.slug,e),(0,g.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:I,className:"group flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)(i.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:Q,transitionTypes:["nav-forward"],children:[(0,t.jsx)(n.ViewTransition,{name:`event-image-${e.id}`,share:"morph",default:"none",children:(0,t.jsx)(b.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"}),F&&(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:F}),H>=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(H),"% match"]}),u&&null!==B&&B>=70&&null!==B&&(0,t.jsx)(_,{heatScore:B}),(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,x.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",p?"bg-lime text-lime-text hover:bg-lime-hover":"bg-foreground text-background hover:bg-foreground
1/90"),type:"button",onClick:O,children:[(0,t.jsx)(a.Heart,{className:(0,x.cn)("size-4",p&&"fill-current")}),p?"Saved":"Save"]})})]}),(0,t.jsx)("button",{"aria-label":p?"Unsave event":"Save event","aria-pressed":p,className:(0,x.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",p?"bg-lime hover:bg-lime-hover":"bg-white/75 backdrop-blur-md hover:bg-white/90"),type:"button",onClick:O,children:(0,t.jsx)(a.Heart,{className:(0,x.cn)("size-[18px] transition-transform duration-200",p?"scale-110 fill-ink text-ink":"text-ink")})}),p&&(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:O,children:(0,t.jsx)(a.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:[z&&(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:z.logo_url,name:z.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:z.name})]}),U?(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)(D,{className:"shrink-0 border-ink text-ink hover:bg-ink hover:text-page",hostId:z.id,hostName:z.name??"",isFollowing:!1,user:o})]}),(0,t.jsx)(i.default,{className:"block",href:`/events/${e.slug}`,onClick:Q,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})})}),(K||V)&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-ink-muted",children:[K&&(0,t.jsx)("span",{className:"truncate",children:K}),K&&V&&(0,t.jsx)("span",{"aria-hidden":!0,className:"size-0.5 rounded-full bg-ink-muted/60"}),V&&(0,t.jsxs)("span",{className:"shrink-0 font-medium text-ink",children:["from ",V]})]})]})]}),(0,t.jsx)(n.Suspense,{fallback:null,children:(0,t.jsx)(R,{anonymousUserId:o?.id,open:N,onLoginSuccess:A,onOpenChange:C})}),(0,t.jsx)(M,{imageUrl:(0,s.getEventImageUrl)(e,"1:1")??null,show:j,venueName:z?.name??e.name,onDismiss:()=>S(!1),onShare:L})]})}],390445)},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,a){let i=(0,n.toDate)(e,a?.in);return isNaN(r)?(0,t.constructFrom)(a?.in||e,NaN):(r&&i.setDate(i.getDate()+r),i)}])},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)},631171,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["default",0,t])},664659,e=>{"use strict";var t=e.i(631171);e.s(["ChevronDown",()=>t.default])},778917,e=>{"use strict";let t=(0,e.i(475254).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],778917)},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)},399219,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},297387,e=>{"use strict";let t=(0,e.i(475254).default)("wine",[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]]);e.s(["Wine",0,t],297387)},361277,e=>{"use strict";let t=(0,e.i(475254).default)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);e.s(["default",0,t])},87316,e=>{"use strict";var t=e.i(361277);e.s(["Calendar",()=>t.default])},210407,e=>{"use strict";let t=(0,e.i(475254).default)("music-2",[["circle",{cx:"8",cy:"18",r:"4",key:"1fc0mg"}],["path",{d:"M12 18V2l7 4",key:"g04rme"}]]);e.s(["Music2",0,t],210407)},115057,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);e.s(["ArrowUpRight",0,t],115057)},550516,e=>{"use strict";var t=e.i(845110),n=e.i(585890);e.s(["isSameDay",0,function(e,r,a){let[i,s]=(0,t.normalizeDates)(a?.in,e,r);return+(0,n.startOfDay)(i)==+(0,n.startOfDay)(s)}])},24708,e=>{"use strict";var t=e.i(677241);e.s(["constructNow",0,function(e){return(0,t.constructFrom)(e,Date.now())}])},418196,e=>{"use strict";e.s(["getRoundingMethod",0,function(e){return t=>{let n=(e?Math[e]:Math.trunc)(t);return 0===n?0:n}}])},40058,e=>{"use strict";var t=e.i(281092);e.s(["compareAsc",0,function(e,n){let r=(0,t.toDate)(e)-(0,t.toDate)(n);return r<0?-1:r>0?1:r}])},980797,611316,e=>{"use strict";var t=e.i(677241),n=e.i(24708),r=e.i(550516);e.s(["isToday",0,function(e,a){return(0,r.isSameDay)((0,t.constructFrom)(a?.in||e,e),(0,n.constructNow)(a?.in||e))}],980797);var a=e.i(595727);e.s(["isTomorrow",0,function(e,t){return(0,r.isSameDay)(e,(0,a.addD
1ays)((0,n.constructNow)(t?.in||e),1),t)}],611316)},652217,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["HScrollItem",0,function({children:e,className:r}){return(0,t.jsx)("div",{className:(0,n.cn)("snap-start shrink-0 min-w-0",r),children:e})},"HScrollRow",0,function({children:e,className:r,gap:a="gap-4",snap:i=!0}){return(0,t.jsx)("div",{className:(0,n.cn)("flex w-full overflow-x-auto overflow-y-hidden","scrollbar-none [-ms-overflow-style:none] [scrollbar-width:none]","[&::-webkit-scrollbar]:hidden",i&&"snap-x snap-mandatory",a,r),children:e})}])},889026,e=>{"use strict";var t=e.i(642824);e.s(["isSVGElement",0,function(e){return(0,t.isObject)(e)&&"ownerSVGElement"in e}])},768705,e=>{"use strict";var t=e.i(939011),n=e.i(486427),r=e.i(83411);e.s(["animateSingleValue",0,function(e,a,i){let s=(0,r.isMotionValue)(e)?e:(0,n.motionValue)(e);return s.start((0,t.animateMotionValue)("",s,a,i)),s.animation}])},836331,887652,895420,e=>{"use strict";var t=e.i(889026);e.s(["isSVGSVGElement",0,function(e){return(0,t.isSVGElement)(e)&&"svg"===e.tagName}],836331);var n=e.i(486427),r=e.i(271645),a=e.i(369110),i=e.i(947414);function s(e){let t=(0,i.useConstant)(()=>(0,n.motionValue)(e)),{isStatic:s}=(0,r.useContext)(a.MotionConfigContext);if(s){let[,n]=(0,r.useState)(e);(0,r.useEffect)(()=>t.on("change",n),[])}return t}e.s(["useMotionValue",0,s],887652);var l=e.i(344230),o=e.i(287022),c=e.i(674008);function u(e,t){let n=s(t()),r=()=>n.set(t());return r(),(0,c.useIsomorphicLayoutEffect)(()=>{let t=()=>o.frame.preRender(r,!1,!0),n=e.map(e=>e.on("change",t));return()=>{n.forEach(e=>e()),(0,o.cancelFrame)(r)}}),n}function d(e,t){let n=(0,i.useConstant)(()=>[]);return u(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}e.s(["useTransform",0,function e(t,r,a,s){if("function"==typeof t){let e;return n.collectMotionValues.current=[],t(),e=u(n.collectMotionValues.current,t),n.collectMotionValues.current=void 0,e}if(void 0!==a&&!Array.isArray(a)&&"function"!=typeof r){var o=t,c=r,f=a,m=s;let n=(0,i.useConstant)(()=>Object.keys(f)),l=(0,i.useConstant)(()=>({}));for(let t of n)l[t]=e(o,c,f[t],m);return l}let p="function"==typeof r?r:function(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],a=e[1+n],i=e[2+n],s=e[3+n],o=(0,l.interpolate)(a,i,s);return t?o(r):o}(r,a,s),h=Array.isArray(t)?d(t,p):d([t],([e])=>p(e)),g=Array.isArray(t)?void 0:t.accelerate;return g&&!g.isTransformed&&"function"!=typeof r&&Array.isArray(a)&&s?.clamp!==!1&&(h.accelerate={...g,times:r,keyframes:a,isTransformed:!0,...s?.ease?{ease:s.ease}:{}}),h}],895420)},958377,e=>{"use strict";let t=(0,e.i(475254).default)("flame",[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]]);e.s(["Flame",0,t],958377)},991799,e=>{"use strict";let t=(0,e.i(475254).default)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);e.s(["Moon",0,t],991799)},394908,e=>{"use strict";let t=(0,e.i(475254).default)("compass",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]]);e.s(["Compass",0,t],394908)},369600,e=>{"use strict";var t=e.i(247167);let n="partymate.spotify.pkce.verifier",r="partymate.spotify.pkce.state",a="partymate.spotify.pkce.returnTo";function i(){let e=t.default.env.NEXT_PUBLIC_SPOTIFY_CLIENT_ID;if(!e)throw Error("NEXT_PUBLIC_SPOTIFY_CLIENT_ID is not set â Spotify connect requires the public client ID to be exposed at build time.");return e}function s(){return`${window.location.origin}/spotify-callback`}function l(e=48){let t=new Uint8Array(e);return crypto.getRandomValues(t),o(t)}function o(e){let t="";for(let n of e)t+=String.fromCharCode(n);return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function c(e){let t=new TextEncoder().encode(e);return new Uint8Array(await crypto.subtle.digest("SHA-256",t))}async function u(e){return o(await c(e))}
1async function d(e,t){let n=i(),r=new URLSearchParams({grant_type:"authorization_code",code:e,redirect_uri:s(),client_id:n,code_verifier:t}),a=await fetch("https://accounts.spotify.com/api/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r});if(!a.ok){let e=await a.text();throw Error(`Spotify token exchange failed: ${a.status} ${e}`)}let l=await a.json();return{accessToken:l.access_token,refreshToken:l.refresh_token??null,expiresIn:l.expires_in,scope:l.scope}}async function f(e){let t=await Promise.all(["short_term","medium_term","long_term"].map(async t=>{try{let n=await fetch(`https://api.spotify.com/v1/me/top/artists?time_range=${t}&limit=25`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)return[];return(await n.json()).items??[]}catch{return[]}})),n=new Map;for(let e of t)for(let t of e)n.has(t.id)||n.set(t.id,t);return Array.from(n.values())}e.s(["consumeCallbackContext",0,function(e){let t=sessionStorage.getItem(n),i=sessionStorage.getItem(r),s=sessionStorage.getItem(a);return(sessionStorage.removeItem(n),sessionStorage.removeItem(r),sessionStorage.removeItem(a),t&&i&&s)?i!==e?(console.warn("[spotify-connect] state mismatch â possible CSRF, aborting"),null):{verifier:t,state:i,returnTo:s}:null},"exchangeCodeForTokens",0,d,"fetchTopArtists",0,f,"startSpotifyConnect",0,function(e={}){let t=i(),o=e.returnTo??"/charts/for-you";(async()=>{try{let e=l(48),i=l(16);sessionStorage.setItem(n,e),sessionStorage.setItem(r,i),sessionStorage.setItem(a,o);let c=await u(e),d=s(),f=new URLSearchParams({response_type:"code",client_id:t,scope:"user-top-read user-read-recently-played user-follow-read",redirect_uri:d,code_challenge_method:"S256",code_challenge:c,state:i});window.location.href=`https://accounts.spotify.com/authorize?${f.toString()}`}catch(e){console.error("[spotify-connect] failed to start flow",e)}})()}])},498896,e=>{"use strict";var t=e.i(663654);let n="partymate.anchor.v1",r="partymate:anchor-updated";function a(){return"u">typeof localStorage}function i(){a()&&(localStorage.removeItem(n),window.dispatchEvent(new Event(r)))}async function s(e){if(!a()||0===e.length)return i(),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(!a())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 u={hostKey:s,preferences:c,builtAt:new Date().toISOString()};try{localStorage.setItem(n,JSON.stringify(u)),window.dispatchEvent(new Event(r))}catch{}return c}e.s(["ANCHOR_UPDATED_EVENT",0,r,"buildAndCacheAnchor",0,s,"clearAnchorCache",0,i,"getCachedAnchorPreferences",0,function(){if(!a())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])},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}
1])},222976,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(912598),a=e.i(871689),i=e.i(972520),s=e.i(824511),l=e.i(846696),o=e.i(30593),c=e.i(145645),u=e.i(658663),d=e.i(498896),f=e.i(603409),m=e.i(630374),p=e.i(852917),h=e.i(167881),g=e.i(647163),v=e.i(266027),x=e.i(643531),y=e.i(555436),b=e.i(88653),w=e.i(23750),k=e.i(19050),j=e.i(95187);let S=(0,j.createServerReference)("607f306f22fb8f27684bc0ea8ab036ba8b097c4439",j.callServer,void 0,j.findSourceMapURL,"fetchVenuesByCity");var N=e.i(280044);let C=(0,j.createServerReference)("701b3952e1c485c61ce938deb92c0c3f08f3f27859",j.callServer,void 0,j.findSourceMapURL,"searchPages");var M=e.i(672480);function _(e){return"artists"===e?2:1}function P(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:a,onCountsChange:i,className:l}){let[o,c]=(0,n.useState)("");(0,n.useEffect)(()=>{c("")},[e]);let[u,d]=(0,n.useState)({}),[f,m]=(0,n.useState)(null);(0,n.useEffect)(()=>{let t=o.trim();if(t.length<2)return;let n=`${e}:${t.toLowerCase()}`;if(u[n])return;let r=window.setTimeout(()=>{m(n),C(t,e,20).then(e=>{d(t=>({...t,[n]:e}))}).catch(()=>{d(e=>({...e,[n]:[]}))}).finally(()=>{m(e=>e===n?null:e)})},250);return()=>window.clearTimeout(r)},[o,e,u]);let{data:p,isLoading:h}=(0,v.useQuery)({queryKey:["onboardingPicks"],queryFn:()=>(0,N.loadOnboardingPicks)(),staleTime:6e5}),x=(0,n.useMemo)(()=>(p?.artists??[]).map(P),[p]),k=(0,n.useMemo)(()=>
1(p?.venues??[]).map(P),[p]),[j,A]=(0,n.useState)({}),[L,D]=(0,n.useState)(()=>new Set),[R,O]=(0,n.useState)(()=>new Set);(0,n.useEffect)(()=>{if(0===x.length&&0===k.length)return;let e=e=>{let t=x.find(t=>t.id===e);if(t)return t;let n=k.find(t=>t.id===e);return n||null},t=r.filter(t=>!(!e(t)||j[t]||L.has(t)||R.has(t)));0!==t.length&&(D(e=>{let n=new Set(e);for(let e of t)n.add(e);return n}),t.forEach(t=>{let n=e(t);n&&(x.some(e=>e.id===t)?async()=>{let e=e=>e.slice(0,10).map(e=>x.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 S(n.city,12)).filter(e=>e.id!==t).slice(0,10).map(e=>({...P(e),source:{similarTo:t}})):[])().then(e=>{e.length>0?A(n=>({...n,[t]:e})):O(e=>new Set(e).add(t))}).catch(()=>{O(e=>new Set(e).add(t))}).finally(()=>{D(e=>{let n=new Set(e);return n.delete(t),n})})}))},[r,x,k,j,L,R]);let z=(0,n.useRef)(new Map),[U,$]=(0,n.useState)(()=>new Set);(0,n.useEffect)(()=>{for(let e of L){if(z.current.has(e))continue;let t=window.setTimeout(()=>{z.current.delete(e),$(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},250);z.current.set(e,t)}for(let[e,t]of Array.from(z.current.entries()))L.has(e)||(window.clearTimeout(t),z.current.delete(e));$(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=z.current;return()=>{for(let t of e.values())window.clearTimeout(t);e.clear()}},[]),(0,n.useEffect)(()=>{O(e=>{let t=!1,n=new Set;for(let a of e)r.includes(a)?n.add(a):t=!0;return t?n:e})},[r]);let F=(0,n.useMemo)(()=>{let t="artists"===e?x:k,n=[...t],a=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=j[e]??[],i=[];for(let e of r){if(i.length>=3)break;a.has(e.id)||i.push(e)}if(a.add(e),0===i.length)continue;let s=new Set(i.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,...i]:[...n.slice(0,l+1),...i,...n.slice(l+1)],i))a.add(e.id)}let i=new Set(n.map(e=>e.id));for(let e of r){if(i.has(e)||t.some(t=>t.id===e))continue;let r=Object.values(j).flat().find(t=>t.id===e);if(r){n.push(r),i.add(e);continue}let a=Object.values(u).flat().find(t=>t.id===e);a&&(n.push({id:a.id,name:a.name,logo_url:a.logo_url,category:a.category,city:a.city,source:"seed"}),i.add(e))}return n},[e,x,k,r,j,L,u]),K=(0,n.useMemo)(()=>{if(!o.trim())return F;let t=o.trim().toLowerCase(),n=F.filter(e=>e.name.toLowerCase().includes(t)),r=new Set(n.map(e=>e.id));return[...n,...(u[`${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"}))]},[F,o,e,u]),q=(0,n.useMemo)(()=>{let e=[...x,...k],t=new Set(e.map(e=>e.id));for(let n of Object.values(j))for(let r of n)t.has(r.id)||(t.add(r.id),e.push(r));for(let n of Object.values(u))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},[x,k,j,u]),V=(0,n.useCallback)(e=>{a(r.includes(e.id)?r.filter(t=>t!==e.id):[...r,e.id],q)},[r,a,q]),H=(0,n.useMemo)(()=>({artists:r.filter(e=>x.some(t=>t.id===e)).length,venues:r.filter(e=>k.some(t=>t.id===e)).length}),[r,x,k]);(0,n.useEffect)(()=>{i?.(H)},[H,i]);let B=[];for(let e of K){let n=r.includes(e.id);if(B.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},children:(0,t.jsx)(E,{item:e,isSelected:n,onClick:()=>V(e)})},e.id)),U.has(e.id))for(let n=0;n<3;n+=1)B.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)(I,{})},`ph-${e.id}-${n}`))}return(0,t.jsxs)("div",{className:(0,g.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 ",_(e)," or more ",e," you like."]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(y.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===F.length?(0,t.jsx)("p",{className:"py-12 text-center text-sm text-ink-muted",children:"Loadingâ¦"}):0===K.length?(0,t.jsx)("p",{className:"py-12 text-center text-sm text-ink-muted",children:o.trim()?f===`${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)(b.AnimatePresence,{initial:!1,mode:"popLayout",children:B.map((e,r)=>(0,t.jsx)(n.Fragment,{children:e},r))})})})]})}function E({item:e,isSelected:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,g.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)(k.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,
1children:(0,t.jsx)(x.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 I(){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 A({step:e,stepCount:n,stepMin:r,minMet:s,allMinsMet:l,submitting:o,canGoBack:c,onBack:u,onPrimary:d}){let f=Math.max(0,r-n),m=Math.max(0,n-r),p="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,m>0?` \xb7 +${m}`:""]})]}),(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:u,children:[(0,t.jsx)(a.ArrowLeft,{className:"size-4"}),"Back"]}):(0,t.jsx)("span",{className:"text-xs text-background/60",children:s?`Looking great â pick more or ${p}`:`Pick ${f} more to ${p}`}),(0,t.jsxs)(h.Button,{size:"lg",disabled:"artists"===e?!s:!l||o,onClick:d,className:"gap-1.5",children:["artists"===e?"Continue":o?"Savingâ¦":"Done","artists"===e&&(0,t.jsx)(i.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:a,onSubmitted:i}){let s=(0,o.useIsMobile)(),{data:h}=(0,c.useUser)(),v=!!h&&!h.isAnonymous,x=(0,r.useQueryClient)(),[y,b]=(0,n.useState)("artists"),[w,k]=(0,n.useState)([]),[j,S]=(0,n.useState)([]),[N,C]=(0,n.useState)({artists:0,venues:0}),[M,P]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(!e)return;b("artists");let t=(0,f.getLocalOnboarding)();t&&t.hostIds.length>0&&k(t.hostIds)},[e]);let E=(0,n.useCallback)((e,t)=>{k(e),S(t)},[]),I=(0,n.useCallback)(async()=>{if(!(N.artists<2)&&!(N.venues<1)){P(!0);try{let e=j.filter(e=>w.includes(e.id)).map(e=>({id:e.id,name:e.name,logo_url:e.logo_url,category:e.category}));if((0,f.saveLocalOnboarding)({hostIds:w,hosts:e}),v){if(!(await (0,u.addPreferredHosts)(h?.id??"",w)).success)return void l.toast.error("Failed to save your picks");(0,f.clearLocalOnboarding)(),x.invalidateQueries({queryKey:["preferredHosts"]}),x.invalidateQueries({queryKey:["tasteAnchor"]})}a(!1),i?.(w),v||(async()=>{await (0,d.buildAndCacheAnchor)(w),x.invalidateQueries({queryKey:["calendar-events"]}),x.invalidateQueries({queryKey:["short-trip"]})})()}catch(e){l.toast.error(e instanceof Error?e.message:"Something went wrong")}finally{P(!1)}}},[N.artists,w,j,v,h?.id,x,a,i]),L="artists"===y?N.artists:N.venues,D=_(y),R=L>=D,O=N.artists>=2&&N.venues>=1,z=(0,n.useCallback)(()=>{"artists"===y?R&&b("venues"):I()},[y,R,I]),U=(0,n.useCallback)(()=>b("artists"),[]),$=(0,n.useMemo)(()=>(0,t.jsx)(A,{step:y,stepCount:L,stepMin:D,minMet:R,allMinsMet:O,submitting:M,canGoBack:"venues"===y,onBack:U,onPrimary:z}),[y,L,D,R,O,M,U,z]);return s?(0,t.jsx)(p.Sheet,{open:e,onOpenChange:a,children:(0,t.jsxs)(p.SheetContent,{side:"bottom",className:(0,g.cn)("flex flex-col gap-0 rounded-t-2xl p-0 data-[side=bottom]:h-[88vh]"),children:[(0,t.jsx)(p.SheetTitle,{className:"sr-only",children:"Personalize your picks"}),(0,t.jsx)(p.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:y,selectedIds:w,onChange:E,onCountsChange:C})}),$]})}):(0,t.jsx)(m.Dialog,{open:e,onOpenChange:a,children:(0,t.jsxs)(m.DialogContent,{className:(0,g.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)(m.DialogTitle,{className:"sr-only",children:"Personalize your picks"}),(0,t.jsx)(m.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:y,selectedIds:w,onChange:E,onCountsChange:C})}),$]})})}],222976)},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"}
1,{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 a(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 i(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,a=e?.locality;if(a?.id){let e=`loc:${a.id}`,n=t.get(e);n||(n={id:e,localityId:a.id,name:a.name,country:a.country_code??null,latitude:a.latitude,longitude:a.longitude,radiusKm:a.radius_km??30,eventCount:0,topCoolness:0,events:[]},t.set(e,n)),n.events.push(r),n.eventCount+=1;let s=i(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>=a(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=i(n);s>e.topCoolness&&(e.topCoolness=s)}return t.map((e,t)=>{let n,i=r.find(t=>a(t.latitude,t.longitude,e.centerLat,e.centerLng)<=t.radiusKm);if(i)n=i.name;else{let t="",r=-1;for(let[n,a]of e.cityCounts)a>r&&(t=n,r=a);n=t}return{id:`geo:${n.normalize("NFD").replace(/[Ì-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}:${t}`,localityId:null,name:n,country:i?.country??e.country,latitude:e.centerLat,longitude:e.centerLng,radiusKm:i?.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 a(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)},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.