import{S as Re,i as Fe,s as Ge,e as D,t as A,k as $,c as T,a as I,h as M,d as h,m as C,b as k,$ as Je,g as j,F as r,a0 as fe,J as le,j as G,G as z,U as We,E as ne,H as ue,v as Xe,a1 as Ye,a2 as ie,a3 as de,W as oe,l as Y}from"../chunks/index-acdcee87.js";import{b as he,s as Q}from"../chunks/stores-77ce6fd0.js";import{c as ze,l as _e}from"../chunks/index-7f2b6b77.js";import{f as Z}from"../chunks/index-921d3fdd.js";import"../chunks/index-f786a58f.js";function pe(s,l,t){const e=s.slice();return e[17]=l[t],e}function ve(s,l,t){const e=s.slice();return e[20]=l[t],e}function me(s,l,t){const e=s.slice();return e[23]=l[t],e}function be(s,l,t){const e=s.slice();return e[26]=l[t][0],e[27]=l[t][1],e}function ge(s,l,t){const e=s.slice();return e[30]=l[t],e}function ke(s,l,t){const e=s.slice();return e[23]=l[t],e}function Ee(s,l,t){const e=s.slice();return e[35]=l[t],e}function we(s,l,t){const e=s.slice();return e[35]=l[t],e}function De(s,l,t){const e=s.slice();return e[40]=l[t],e[42]=t,e}function Te(s){let l,t,e,a,n,i,_,o=s[1].spec["schedule-candidates"],f=[];for(let c=0;cs[7].call(n)),k(a,"class","flex flex-wrap gap-1")},m(c,u){j(c,l,u),r(l,t),j(c,e,u),j(c,a,u),r(a,n);for(let d=0;d{const e=s.spec.speakers.find(a=>a.id===t);return e.name+(e.nickname?` (${e.nickname})`:"")}).join(", ")}function je(s,l){return l.type==="lightning-series"?s.spec.events.filter(t=>t.parent===l.id).map(t=>`${t.name} - ${Le(s,t)||"TBD"}`).join("
"):Le(s,l)}function tl(s,l){const[t,e]=l.split("/"),[a,n]=e.split("-"),i=s.dates[t-1];return{date:i,period:{start:new Date(`${i}T${a}`),end:new Date(`${i}T${n}`)}}}function Be(s){return s.scheduleTimes.map(l=>tl(s,l))}function Ue(s,l,t){return t.includes(l.track||"")?"border border-blue-web/50":"opacity-20"}function qe(s,l){const t=s.spec.events.find(e=>e.id===l);if(!t)return console.log(`Event not found: ${l}`),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-rose-400/20 hover:bg-rose-400/40"}return t}const Ke=s=>`#${s}`;function sl(s,l,t){let e,a,n;ue(s,he,g=>t(1,a=g)),ue(s,Q,g=>t(3,n=g));let i=0;Xe(async()=>{he.subscribe(g=>{const v={};v.stages=g.spec.stages.map(S=>S.id),v.tracks=g.spec.tracks.map(S=>S.id),Q.set(v)})});function _(g,v,S,b=null){let U=v.start;const J=v.end,q=[],P={};for(;ze(U,J)===-1;){const R={};for(const O of S.spec.stages){if(P[O.id]>0){R[O.id]=null,P[O.id]--;continue}if(b&&!b.stages.includes(O.id))continue;let K=g.schedule.find(L=>new Date(L.period.start).getTime()===new Date(U).getTime()&&L.stage===O.id);if(R[O.id]=K,K){const L=Math.floor((new Date(K.period.end).getTime()-new Date(K.period.start).getTime())/6e4/30);K.span=L,L>1&&(P[O.id]=L-1)}}q.push({title:Z(U,"HH:mm"),stages:R}),U=new Date(U.getTime()+30*60*1e3)}return q}function o(g,v,S,b){return v.filter(U=>{const J=Z(new Date(S),"yyyy-MM-dd");return Boolean(b.schedule.filter(q=>q.stage===U.id).find(q=>q.date===J))})}const f=[[],[]],c=(g,v)=>{const[S,b]=v.split(":");return`${S}:${Math.round(g.metrics[b||S]*1e3)/1e3}`};function u(){i=Ye(this),t(0,i)}const d=()=>ie(Q,n.stages=a.spec.stages.map(g=>g.id),n);function E(){n.stages=de(f[1],this.__value,this.checked),Q.set(n)}const w=g=>ie(Q,n.stages=[g.id],n),B=()=>ie(Q,n.tracks=a.spec.tracks.map(g=>g.id),n);function H(){n.tracks=de(f[0],this.__value,this.checked),Q.set(n)}const V=g=>ie(Q,n.tracks=[g.id],n),N=(g,v)=>v.id===g.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,e=a?a.spec["schedule-candidates"][i]:null)},[i,a,e,n,_,o,c,u,d,E,f,w,B,H,V,N]}class fl extends Re{constructor(l){super();Fe(this,l,sl,ll,Ge,{},null,[-1,-1])}}export{fl as default,cl as prerender};