1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`36881840654.2971.1-17b357ffa`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`0a9c1ba1-3fcd-4556-8dd3-589b87ed6405`,e._sentryDebugIdIdentifier=`sentry-dbid-0a9c1ba1-3fcd-4556-8dd3-589b87ed6405`)}catch{}})();import{M as e,O as t,rt as n,u as r,vt as i}from"./Ck2d01XI.js";import{d as a,p as o,s}from"./DeNuA9bQ.js";import{n as c}from"./BuN0SW_8.js";import{t as l}from"./CsJInBny.js";import{M as u,R as d}from"./CUQa8K1R.js";import{t as f}from"./CxvvqGlX.js";import{_ as p,b as m,y as h}from"./Ce1FhYhI.js";import{C as g,S as _,i as v,m as y,o as b,v as x,w as S}from"#entry";import{t as C}from"./Xjp7JIoI.js";var w=Object.freeze([60,120,180,240,300,400,500,750,1e3]);function T({isMobile:e,mode:t}){let a=i(0),o=x(`--msr-desktop-header-height`),s=x(`--msr-mobile-header-height`),c=r({get:()=>e.value?s.value:o.value,set:t=>{e.value?s.value=t:o.value=t}});n(a,e=>{c.value=`${e}px`});function l(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e),r=parseFloat(n.marginTop)||0,i=parseFloat(n.marginBottom)||0;return t.height+r+i}function u(){if(!t.value.initial)return 0;let e=Array.from(document.querySelectorAll(`.msr--header-wrapper, .msr--header-title`)).reduce((e,t)=>e+l(t),0),n=document.querySelector(`.msr--calendarSearch-form`)?.getBoundingClientRect().height??0;return Math.ceil(e+n)}return{update(e){let t=e??u();t!==0&&(a.value=t)},lock(e){o.value=`${e}px`,s.value=`${e}px`}}}function E({headerRef:i}={}){let a=s(),{isMobile:c}=C(),{y:u}=_(),{width:d}=g(),f=o(),v=S().header.search.defaults,b=r(()=>f.meta.header?.search?.behavior??v.behavior),x=r(()=>i?.value?.$el),w=l(`useSearchState.expanded`,()=>!1),E=l(`useSearchState.isMainSearchVisible`,()=>b.value===`full`),D=l(`useSearchState.canShowInitialState`,()=>E.value),O=l(`useSearchState.isCollapsedStateChanging`,()=>!1),k=e=>{if(D.value)return O.value=!0,E.value=e,new Promise(e=>{setTimeout(()=>{O.value=!1,e()},100)})},A=r(()=>b.value===`full`||w.value),j=r(()=>!w.value&&(!E.value||[`pinned`,`compact`].includes(b.value))),M=r(()=>b.value===`full`&&j.value||b.value===`pinned`),N=r(e=>{let t={compact:j.value,expanded:w.value,initial:!w.value&&!j.value};return e&&e.compact===t.compact&&e.expanded===t.expanded&&e.initial===t.initial?e:t}),{update:P,lock:F}=T({isMobile:c,mode:N});function I(){D.value=!1,F(78)}function L(){if(!x.value)return;let r,i,a,o;m(D,()=>{r?.(),i?.(),a?.(),o?.()}),n(c,e=>{e||document.body.classList.remove(`-show-search-modal`)}),y(x,()=>{w.value&&=!1});let s=t(`mainContentWaypointRef`);i=h(()=>b.value===`full`&&s?.value&&x.value,()=>{if(!D.value||b.value!==`full`||!x.value||!s?.value)return;let e=x.value.querySelector(`.msr--header-wrapper`);if(!e)return;r?.();let t=e.getBoundingClientRect().height;r=p(u,()=>{if(O.value||!s.value)return;let e=s.value.getBoundingClientRect().top-0>=t;e!==E.value&&k(e)},{immediate:!0,debounce:2})}),a=h(c,()=>{e(P)}),o=h(d,()=>P())}return{hasBehavior:r(()=>b.value!=="default"),show:r(()=>!a.value&&b.value!=="default"),mode:N,fullAllowed:A,pinned:M,expand(){w.value=!0},async collapse(e=!1){await k(e),w.value=!1},async reset(){await k(!0),w.value=!1},initClient:L,disableInitialState:I}}var D=f.object({eventTypeSlug:f.string().optional(),countrySlug:f.string().optional(),regionSlug:f.string().optional()}),O=f.object({q:f.string().optional(),radius:f.coerce.number().optional(),lat:f.coerce.number().optional(),lng:f.coerce.number().optional(),loc:f.string().optional(),region:f.string().optional(),country:f.string().optional(),types:f.string().optional()}),k={text:void 0,radius:300,lat:void 0,lng:void 0,city:void 0,region:void 0,country:void 0,types:[],lastSearchTime:0};function A(e){return w.find(t=>t===Number(e))??300}function j(e,t){let{success:n,data:r}=D.safeParse(e.params);if(!n)return{eventTypeHeader:void 0,searchParams:{}};let{eventTypeSlug:i,countrySlug:a,regionSlug:o}=r,s,c={};if(i){let e=t.find(e=>e.vchSlug===i);e&&(c.types=[e.vchSlug]),e?.vchHeader&&(s=e.vchHeader)}return a&&(c.country=a),o&&(c.region=o),{eventTypeHeader:s,searchParams:c}}function M(e){let t={...k},{success:n,data:r}=O.safeParse(e.query);if(!n)return{searchParams:t};let{q:i,radius:a,lat:o,lng:s,loc:c,country:l,region:u,types:d}=r;
1return t.text=i,t.radius=A(a),t.lat=Number(o)||void 0,t.lng=Number(s)||void 0,t.city=c,t.region=u,t.country=l,t.types=d?.split(`,`)??[],{searchParams:t}}function N(e){let t={};return e.text&&(t.q=e.text),e.lat&&(t.lat=e.lat),e.lng&&(t.lng=e.lng),e.city&&(t.loc=e.city),e.region&&(t.region=e.region),e.country&&(t.country=e.country),e.types&&e.types.length>0&&(t.types=e.types.join(`,`)),t.radius=A(e.radius),t}function P(e){let t=e=>Object.keys(e).length>0&&Object.values(e).some(Boolean),{success:n,data:r}=D.safeParse(e.params);if(n&&t(r))return!0;let{success:i,data:a}=O.safeParse(e.query);return i&&t(a)}function F(){let e=o(),{geolocation:t}=b(),{eventTypes:n}=v(),{reset:i,disableInitialState:s}=E(),f=S().header.search.defaults,p=l(`useHeaderSearch.hasSearchedOnce`,()=>!1),m=l(`useHeaderSearch.scrollOnPageLoad`,()=>!1),g=l(`useHeaderSearch.default-title`,()=>``),_=l(`useHeaderSearch.state`,()=>({title:g.value,searchParams:k})),y=r(()=>{let e=_.value.searchParams.types[0],t=n.value.find(t=>t.vchSlug===e)?.vchEventType??``;return{text:_.value.searchParams.text,location:{lat:_.value.searchParams.lat,lng:_.value.searchParams.lng,city:_.value.searchParams.city,state:_.value.searchParams.region,country:_.value.searchParams.country},radius:_.value.searchParams.radius.toString(),types:{label:t,count:_.value.searchParams.types.length>0?_.value.searchParams.types.length-1:void 0}}}),x=l(`useHeaderSearch.unsaved-values`,()=>({text:_.value.searchParams.text||``,location:{lat:_.value.searchParams.lat,lng:_.value.searchParams.lng,city:_.value.searchParams.city,state:_.value.searchParams.region,country:_.value.searchParams.country},radius:Number(_.value.searchParams.radius)||void 0,types:[..._.value.searchParams.types]}));function C(e){let t={...k,...e,lastSearchTime:Date.now()};_.value.searchParams=t,T(t)}function T(e){x.value.text=e.text||``,x.value.location={lat:e.lat,lng:e.lng,city:e.city,state:e.region,country:e.country},x.value.radius=Number(e.radius)||void 0,x.value.types=[...e.types??[]]}function D(){h(e,e=>{let r=e.meta;if(g.value=r.header?.search?.title||f.title,e.name!==`calendar`&&e.name!==`calendar-home`){C({lat:t.value?.lat??void 0,lng:t.value?.lng??void 0,city:t.value?.city??void 0,region:t.value?.region??void 0,country:t.value?.country??void 0});return}let{eventTypeHeader:i,searchParams:a}=j(e,n.value),{searchParams:o}=M(e);_.value.title=i?`Find your next ${i}`:g.value;let s=c(o,a);!(s.lat&&s.lng||s.region||s.country)&&!P(e)&&(s.lat=t.value?.lat??void 0,s.lng=t.value?.lng??void 0,s.city=t.value?.city??void 0,s.region=t.value?.region??void 0,s.country=t.value?.country??void 0),C(s)})}async function O(t){p.value||(p.value=!0,s());let n=t&&Object.keys(t).length>0?{text:t.text,radius:t.distance,lat:t.location.lat,lng:t.location.lng,city:t.location.city,region:t.location.state,country:t.location.country,types:t.types}:{},r=N(n);_.value.title!==g.value&&(_.value.title=g.value);let i=e.path===`/`;m.value=i;let o=e.path.startsWith(`/calendar`),c=await a({path:`/calendar`,query:r,replace:o});d(c,u.duplicated)&&C(n)}function A(e){if(e===1){window.scrollTo(0,0);return}let t=document.querySelector(`.msr--eventCard.-page-${e}`);if(!t)return;let n=document.querySelector(`.msr--header-container`);if(!n)return;let r=n.getBoundingClientRect().height+28,i=t.getBoundingClientRect().top+window.pageYOffset-r;window.scrollTo(0,i)}return{title:r(()=>_.value.title),searchParams:r(()=>_.value.searchParams),distances:w.map(e=>({value:e.toString(),label:`${e} mi`})),hasSearchedOnce:p,committedValues:y,uncommittedValues:x,displayValues:r(e=>{let t={unsavedLocationCityRegion:[x.value.location.city,x.value.location.state].filter(Boolean).join(`, `),unsavedTypeCount:x.value.types.length>1?x.value.types.length-1:void 0};return e&&e.unsavedLocationCityRegion===t.unsavedLocationCityRegion&&e.unsavedTypeCount===t.unsavedTypeCount?e:t}),tryScrollOnPageLoad:()=>{m.value&&=(A(1),!1)},scrollResultsPageIntoView:A,updateLocation(e){x.value.location={lat:e?.lat??0,lng:e?.lng??0,city:e?.city??``,state:e?.state??``,country:e?.country??``}},triggerSearch:O,resetSearch:()=>{O(),i()},init:D}}export{E as n,F as t};
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.