utxo22-web/_app/pages/program.svelte-76ceb257.js

4 řádky
24 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as Qe,i as We,s as xe,e as T,t as B,k as Z,c as I,a as H,h as M,d,m as q,b as m,g as O,J as c,N as me,j as Q,K as le,Y as et,n as se,o as K,p as ae,q as Y,L as pe,v as tt,T as lt,a4 as be,E as ce,l as ee,w as st,x as at,y as rt,B as ot,a5 as it}from"../chunks/index-9987666b.js";import{g as nt}from"../chunks/navigation-0e6511d1.js";import{p as ve}from"../chunks/stores-94e0f320.js";import{b as ge,s as ne}from"../chunks/stores-af76d038.js";import{p as ct}from"../chunks/periods-d433e7f7.js";import{L as ft,S as ut}from"../chunks/Link-57e97f60.js";import{c as dt}from"../chunks/index-1cc1bdc7.js";import{f as x}from"../chunks/index-14ac584d.js";import{l as he}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-4049ca3c.js";const{Boolean:de}=it;function ke(a,t,e){const l=a.slice();return l[17]=t[e],l}function we(a,t,e){const l=a.slice();return l[20]=t[e],l}function Ee(a,t,e){const l=a.slice();return l[23]=t[e],l}function De(a,t,e){const l=a.slice();return l[26]=t[e][0],l[27]=t[e][1],l}function ye(a,t,e){const l=a.slice();return l[30]=t[e],l}function Te(a,t,e){const l=a.slice();return l[33]=t[e],l}function Ie(a,t,e){const l=a.slice();return l[23]=t[e],l}function Ve(a,t,e){const l=a.slice();return l[38]=t[e],l}function He(a,t,e){const l=a.slice();return l[17]=t[e],l}function Ae(a){let t,e,l,o,f,s,i,r,n,V,v,A,b,P,R,j,g,S,w=a[6](a[0]),E=[];for(let _=0;_<w.length;_+=1)E[_]=Se(He(a,w,_));let z=Ye(a[0]),k=[];for(let _=0;_<z.length;_+=1)k[_]=Ne(Ve(a,z,_));return{c(){t=T("div"),e=T("div"),l=T("div"),o=B("Den"),f=Z();for(let _=0;_<E.length;_+=1)E[_].c();s=Z(),i=T("div"),r=T("div"),n=T("div"),V=B("S\xE1l"),v=Z();for(let _=0;_<k.length;_+=1)k[_].c();A=Z(),b=T("div"),P=T("label"),R=T("input"),j=B(" Zobrazit popisy"),this.h()},l(_){t=I(_,"DIV",{class:!0});var $=H(t);e=I($,"DIV",{class:!0});var p=H(e);l=I(p,"DIV",{class:!0});var C=H(l);o=M(C,"Den"),C.forEach(d),f=q(p);for(let G=0;G<E.length;G+=1)E[G].l(p);p.forEach(d),$.forEach(d),s=q(_),i=I(_,"DIV",{class:!0});var L=H(i);r=I(L,"DIV",{class:!0});var J=H(r);n=I(J,"DIV",{class:!0});var D=H(n);V=M(D,"S\xE1l"),D.forEach(d),v=q(J);for(let G=0;G<k.length;G+=1)k[G].l(J);J.forEach(d),L.forEach(d),A=q(_),b=I(_,"DIV",{class:!0});var F=H(b);P=I(F,"LABEL",{});var N=H(P);R=I(N,"INPUT",{type:!0}),j=M(N," Zobrazit popisy"),N.forEach(d),F.forEach(d),this.h()},h(){m(l,"class","font-semibold uppercase my-auto mx-3"),m(e,"class","flex gap-1 flex-wrap"),m(t,"class","mb-4"),m(n,"class","font-semibold uppercase my-auto mx-3"),m(r,"class","flex gap-1 flex-wrap"),m(i,"class","mb-4"),m(R,"type","checkbox"),m(b,"class","mb-4")},m(_,$){O(_,t,$),c(t,e),c(e,l),c(l,o),c(e,f);for(let p=0;p<E.length;p+=1)E[p].m(e,null);O(_,s,$),O(_,i,$),c(i,r),c(r,n),c(n,V),c(r,v);for(let p=0;p<k.length;p+=1)k[p].m(r,null);O(_,A,$),O(_,b,$),c(b,P),c(P,R),R.checked=a[2].showDescriptions,c(P,j),g||(S=me(R,"change",a[9]),g=!0)},p(_,$){if($[0]&69){w=_[6](_[0]);let p;for(p=0;p<w.length;p+=1){const C=He(_,w,p);E[p]?E[p].p(C,$):(E[p]=Se(C),E[p].c(),E[p].m(e,null))}for(;p<E.length;p+=1)E[p].d(1);E.length=w.length}if($[0]&5){z=Ye(_[0]);let p;for(p=0;p<z.length;p+=1){const C=Ve(_,z,p);k[p]?k[p].p(C,$):(k[p]=Ne(C),k[p].c(),k[p].m(r,null))}for(;p<k.length;p+=1)k[p].d(1);k.length=z.length}$[0]&4&&(R.checked=_[2].showDescriptions)},d(_){_&&d(t),le(E,_),_&&d(s),_&&d(i),le(k,_),_&&d(A),_&&d(b),g=!1,S()}}}function Se(a){let t,e=a[17].name+"",l,o,f,s;function i(){return a[7](a[17])}return{c(){t=T("button"),l=B(e),this.h()},l(r){t=I(r,"BUTTON",{class:!0});var n=H(t);l=M(n,e),n.forEach(d),this.h()},h(){m(t,"class",o=(a[2].time===a[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full")},m(r,n){O(r,t,n),c(t,l),f||(s=me(t,"click",i),f=!0)},p(r,n){a=r,n[0]&1&&e!==(e=a[17].name+"")&&Q(l,e),n[0]&5&&o!==(o=(a[2].time===a[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font-semibold py-1 px-2 sm:py-2 sm:px-4 rounded-full")&&m(t,"cla
`),e=t.length>1;return{md:t[0],stripped:e}}function Ke(a,t){const e=a.spec.events.find(l=>l.id===t);if(!e)return console.log(`Event not found: ${t}`),null;switch(e.type){case"panel":e.color="bg-orange-400/20 hover:bg-orange-400/40";break;case"talk":e.color="bg-custom-green/20 hover:bg-custom-green/40";break;case"workshop":e.color="bg-custom-blue/20 hover:bg-custom-blue/40";break;case"campfire":e.color="bg-purple-400/20 hover:bg-purple-400/40";break;case"lightning-series":e.color="bg-yellow-400/20 hover:bg-yellow-400/40";break;default:e.color="bg-rose-400/20 hover:bg-rose-400/40"}return e}const Xe=a=>`#${a}`;function wt(a,t,e){let l,o,f,s;pe(a,ve,g=>e(13,o=g)),pe(a,ge,g=>e(0,f=g)),pe(a,ne,g=>e(2,s=g));const i={link:ft},r={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let n=[];n.push(ve.subscribe(()=>{ne.update(g=>{for(const S of Object.keys(r)){const w=r[S],E=o.url.searchParams.get(S);w.type==="boolean"?E!==void 0&&(g[w.key]=Boolean(E)):g[w.key]=E||"all"}return g})})),tt(async()=>{const g=ge.subscribe(w=>{v(w),w.spec.stages});n.push(g);const S=ne.subscribe(w=>{const E=[];E.push(["time",w.time==="all"?void 0:w.time]),E.push(["stage",w.stage==="all"?void 0:w.stage]),E.push(["desc",w.showDescriptions===null||w.showDescriptions===!1||w.showDescriptions===void 0?void 0:!0]);let z="?";if(E.length>0){for(const k of E)k[1]===void 0&&o.url.searchParams.get(k[0])!==void 0?o.url.searchParams.delete(k[0]):o.url.searchParams.set(k[0],k[1]);z=`?${o.url.searchParams.toString()}`}return nt(z),!1});n.push(S)}),lt(()=>{for(const g of n)g()});function V(g,S,w,E=null){let z=S.start;const k=S.end,_=[],$={};for(;dt(z,k)===-1;){const p={};for(const C of w.spec.stages){if($[C.id]>0){p[C.id]=null,$[C.id]--;continue}if(E&&E.stage!==C.id&&E.stage!=="all")continue;let L=g.find(J=>new Date(J.period.start).getTime()===new Date(z).getTime()&&J.stage===C.id);if(p[C.id]=L,L){const J=Math.floor((new Date(L.period.end).getTime()-new Date(L.period.start).getTime())/6e4/30);L.span=J,J>1&&($[C.id]=J-1)}}_.push({title:x(z,"HH:mm"),stages:p}),z=new Date(z.getTime()+30*60*1e3)}return _}function v(g,S=!1){let w=g.scheduleTimes.map((E,z)=>{const k=ct(g,E);return k.id=String(z),k});return S&&(w=w.filter(E=>E.id===S||S==="all")),w}function A(g){return[{id:"all",name:"V\u0161echny dny"},...v(g)]}const b=g=>be(ne,s.time=g.id,s),P=g=>be(ne,s.stage=g.id,s);function R(){s.showDescriptions=this.checked,ne.set(s)}const j=(g,S)=>S.id===g.track;return a.$$.update=()=>{a.$$.dirty[0]&1&&e(1,l=f?f.spec.schedule:null)},[f,l,s,i,V,v,A,b,P,R,j]}class Mt extends Qe{constructor(t){super();We(this,t,wt,gt,xe,{},null,[-1,-1])}}export{Mt as default,Bt as prerender};