import{S as Ke,i as Fe,s as Ge,e as w,t as P,k as B,c as D,a as T,h as $,d as u,m as U,b as k,$ as Je,g as C,F as _,a0 as fe,J as x,j as J,G as z,R as Xe,E as se,H as ue,v as Ye,a1 as ze,a2 as te,a3 as _e,U as ae,l as Y}from"../chunks/index-43525dfb.js";import{b as he,s as Q}from"../chunks/stores-31227ed5.js";import{c as Qe,l as de}from"../chunks/index-7f2b6b77.js";import{f as Z}from"../chunks/index-921d3fdd.js";import"../chunks/index-4f3af860.js";function pe(s,l,t){const e=s.slice();return e[15]=l[t],e}function ve(s,l,t){const e=s.slice();return e[18]=l[t],e}function me(s,l,t){const e=s.slice();return e[21]=l[t],e}function ge(s,l,t){const e=s.slice();return e[24]=l[t][0],e[25]=l[t][1],e}function be(s,l,t){const e=s.slice();return e[28]=l[t],e}function ke(s,l,t){const e=s.slice();return e[21]=l[t],e}function Ee(s,l,t){const e=s.slice();return e[33]=l[t],e}function we(s,l,t){const e=s.slice();return e[33]=l[t],e}function De(s,l,t){const e=s.slice();return e[38]=l[t],e[40]=t,e}function Te(s){let l,t,e,a,i,n,h,r=s[1].spec["schedule-candidates"],d=[];for(let c=0;cs[6].call(i)),k(a,"class","flex flex-wrap gap-1")},m(c,f){C(c,l,f),_(l,t),C(c,e,f),C(c,a,f),_(a,i);for(let o=0;os.spec.speakers.find(e=>e.id===t).name).join(", ")}function Le(s,l){return l.type==="lightning-series"?s.spec.events.filter(t=>t.parent===l.id).map(t=>`${t.name} (${Me(s,t)})`).join(", "):Me(s,l)}function Be(s){return s.scheduleTimes.map(l=>{const[t,e]=l.split("/"),[a,i]=e.split("-"),n=s.dates[t-1];return{date:n,period:{start:new Date(`${n}T${a}`),end:new Date(`${n}T${i}`)}}})}function Ue(s,l,t){return t.includes(l.track||"")?"border border-blue-web/50":"opacity-20"}function Re(s,l){const t=s.spec.events.find(e=>e.id===l);if(!t)return null;switch(t.type){case"panel":t.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":t.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":t.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":t.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":t.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:t.color="bg-white hover:bg-gray-500/10"}return t}const qe=s=>`#${s}`;function tl(s,l,t){let e,a,i;ue(s,he,I=>t(1,a=I)),ue(s,Q,I=>t(3,i=I));let n=0;Ye(async()=>{he.subscribe(I=>{const H={};H.stages=I.spec.stages.map(p=>p.id),H.tracks=I.spec.tracks.map(p=>p.id),Q.set(H)})});function h(I,H,p,S=null){let b=H.start;const R=H.end,G=[],q={};for(;Qe(b,R)===-1;){const A={};for(const N of p.spec.stages){if(q[N.id]>0){A[N.id]=null,q[N.id]--;continue}if(S&&!S.stages.includes(N.id))continue;const E=I.schedule.find(V=>new Date(V.period.start).getTime()===new Date(b).getTime()&&V.stage===N.id);if(A[N.id]=E,E){const V=Math.floor((new Date(E.period.end).getTime()-new Date(E.period.start).getTime())/6e4/30);E.span=V,V>1&&(q[N.id]=V-1)}}G.push({title:Z(b,"HH:mm"),stages:A}),b=new Date(b.getTime()+30*60*1e3)}return G}const r=[[],[]],d=(I,H)=>{const[p,S]=H.split(":");return`${p}:${Math.round(I.metrics[S||p]*1e3)/1e3}`};function c(){n=ze(this),t(0,n)}const f=()=>te(Q,i.stages=a.spec.stages.map(I=>I.id),i);function o(){i.stages=_e(r[1],this.__value,this.checked),Q.set(i)}const m=I=>te(Q,i.stages=[I.id],i),y=()=>te(Q,i.tracks=a.spec.tracks.map(I=>I.id),i);function L(){i.tracks=_e(r[0],this.__value,this.checked),Q.set(i)}const j=I=>te(Q,i.tracks=[I.id],i),O=(I,H)=>H.id===I.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,e=a?a.spec["schedule-candidates"][n]:null)},[n,a,e,i,h,d,c,f,o,r,m,y,L,j,O]}class cl extends Ke{constructor(l){super();Fe(this,l,tl,ll,Ge,{},null,[-1,-1])}}export{cl as default,ol as prerender};