utxo22-web/_app/pages/program.svelte-ee5e234a.js

10 řádky
26 KiB
JavaScript
Surový Normální zobrazení Historie

import{S as ct,i as ut,s as dt,e as w,t as P,k as R,c as E,a as y,h as N,d as u,m as Y,b as p,g as C,J as c,N as ge,j as ee,K as oe,Y as ht,n as le,o as X,p as se,q as L,L as be,v as _t,T as pt,a4 as ye,E as ce,l as re,w as ot,x as it,y as nt,B as ft,a5 as mt}from"../chunks/index-9987666b.js";import{g as vt}from"../chunks/navigation-0e6511d1.js";import{p as Te}from"../chunks/stores-94e0f320.js";import{f as te}from"../chunks/utils-1595b72e.js";import{b as Ie,s as fe}from"../chunks/stores-af76d038.js";import{p as bt}from"../chunks/periods-3c9faf13.js";import{L as gt,S as kt}from"../chunks/Link-57e97f60.js";import{S as wt}from"../chunks/SvelteTooltip-7041813f.js";import{c as Et,l as Ve}from"../chunks/index-ab555ab5.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-14ac584d.js";import"../chunks/index-4049ca3c.js";const{Boolean:ue}=mt;function $e(s,e,t){const l=s.slice();return l[17]=e[t],l}function Se(s,e,t){const l=s.slice();return l[20]=e[t],l}function Ae(s,e,t){const l=s.slice();return l[23]=e[t],l}function He(s,e,t){const l=s.slice();return l[26]=e[t][0],l[27]=e[t][1],l}function Pe(s,e,t){const l=s.slice();return l[30]=e[t],l}function Ne(s,e,t){const l=s.slice();return l[33]=e[t],l}function je(s,e,t){const l=s.slice();return l[23]=e[t],l}function ze(s,e,t){const l=s.slice();return l[38]=e[t],l}function Be(s,e,t){const l=s.slice();return l[17]=e[t],l}function Me(s){let e,t,l,o,n,a,i,r,d,f,V,I,j,J,F,Z,g,B,T=s[6](s[0]),b=[];for(let h=0;h<T.length;h+=1)b[h]=Le(Be(s,T,h));let k=lt(s[0]),m=[];for(let h=0;h<k.length;h+=1)m[h]=Oe(ze(s,k,h));return{c(){e=w("div"),t=w("div"),l=w("div"),o=P("Den"),n=R();for(let h=0;h<b.length;h+=1)b[h].c();a=R(),i=w("div"),r=w("div"),d=w("div"),f=P("S\xE1l"),V=R();for(let h=0;h<m.length;h+=1)m[h].c();I=R(),j=w("div"),J=w("label"),F=w("input"),Z=P(" Zobrazit popisy"),this.h()},l(h){e=E(h,"DIV",{class:!0});var $=y(e);t=E($,"DIV",{class:!0});var _=y(t);l=E(_,"DIV",{class:!0});var q=y(l);o=N(q,"Den"),q.forEach(u),n=Y(_);for(let z=0;z<b.length;z+=1)b[z].l(_);_.forEach(u),$.forEach(u),a=Y(h),i=E(h,"DIV",{class:!0});var K=y(i);r=E(K,"DIV",{class:!0});var G=y(r);d=E(G,"DIV",{class:!0});var A=y(d);f=N(A,"S\xE1l"),A.forEach(u),V=Y(G);for(let z=0;z<m.length;z+=1)m[z].l(G);G.forEach(u),K.forEach(u),I=Y(h),j=E(h,"DIV",{class:!0});var W=y(j);J=E(W,"LABEL",{});var U=y(J);F=E(U,"INPUT",{type:!0}),Z=N(U," Zobrazit popisy"),U.forEach(u),W.forEach(u),this.h()},h(){p(l,"class","font-semibold uppercase my-auto mx-3"),p(t,"class","flex gap-1 flex-wrap"),p(e,"class","mb-4"),p(d,"class","font-semibold uppercase my-auto mx-3"),p(r,"class","flex gap-1 flex-wrap"),p(i,"class","mb-4"),p(F,"type","checkbox"),p(j,"class","mb-4")},m(h,$){C(h,e,$),c(e,t),c(t,l),c(l,o),c(t,n);for(let _=0;_<b.length;_+=1)b[_].m(t,null);C(h,a,$),C(h,i,$),c(i,r),c(r,d),c(d,f),c(r,V);for(let _=0;_<m.length;_+=1)m[_].m(r,null);C(h,I,$),C(h,j,$),c(j,J),c(J,F),F.checked=s[2].showDescriptions,c(J,Z),g||(B=ge(F,"change",s[9]),g=!0)},p(h,$){if($[0]&69){T=h[6](h[0]);let _;for(_=0;_<T.length;_+=1){const q=Be(h,T,_);b[_]?b[_].p(q,$):(b[_]=Le(q),b[_].c(),b[_].m(t,null))}for(;_<b.length;_+=1)b[_].d(1);b.length=T.length}if($[0]&5){k=lt(h[0]);let _;for(_=0;_<k.length;_+=1){const q=ze(h,k,_);m[_]?m[_].p(q,$):(m[_]=Oe(q),m[_].c(),m[_].m(r,null))}for(;_<m.length;_+=1)m[_].d(1);m.length=k.length}$[0]&4&&(F.checked=h[2].showDescriptions)},d(h){h&&u(e),oe(b,h),h&&u(a),h&&u(i),oe(m,h),h&&u(I),h&&u(j),g=!1,B()}}}function Le(s){let e,t=s[17].name+"",l,o,n,a;function i(){return s[7](s[17])}return{c(){e=w("button"),l=P(t),this.h()},l(r){e=E(r,"BUTTON",{class:!0});var d=y(e);l=N(d,t),d.forEach(u),this.h()},h(){p(e,"class",o=(s[2].time===s[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,d){C(r,e,d),c(e,l),n||(a=ge(e,"click",i),n=!0)},p(r,d){s=r,d[0]&1&&t!==(t=s[17].name+"")&&ee(l,t),d[0]&5&&o!==(o=(s[2].time===s[17].id?"bg-utxo-gradient text-white":"text-blue-web bg-blue-web-light hover:text-[#E16A61] hover:bg-[#E16A61]/20")+" font
`),f=w("a"),V=P("sobota"),I=P(`,
`),j=w("a"),J=P("sobota (party)"),F=P(`,
`),Z=w("a"),g=P("ned\u011Ble"),B=R(),T=w("div"),_&&_.c(),b=R(),k=w("section"),h.c(),this.h()},l(A){ht('[data-svelte="svelte-124umcn"]',document.head).forEach(u),e=Y(A),t=E(A,"SECTION",{class:!0});var U=y(t);l=E(U,"H1",{class:!0});var z=y(l);o=N(z,"Program"),z.forEach(u),n=Y(U),a=E(U,"DIV",{class:!0});var M=y(a);i=E(M,"A",{href:!0,class:!0});var D=y(i);r=N(D,"Seznam v\u0161ech ud\xE1lost\xED"),D.forEach(u),d=N(M,`, PDF:
`),f=E(M,"A",{href:!0,target:!0,class:!0});var Q=y(f);V=N(Q,"sobota"),Q.forEach(u),I=N(M,`,
`),j=E(M,"A",{href:!0,target:!0,class:!0});var x=y(j);J=N(x,"sobota (party)"),x.forEach(u),F=N(M,`,
`),Z=E(M,"A",{href:!0,target:!0,class:!0});var O=y(Z);g=N(O,"ned\u011Ble"),O.forEach(u),M.forEach(u),B=Y(U),T=E(U,"DIV",{});var ie=y(T);_&&_.l(ie),ie.forEach(u),U.forEach(u),b=Y(A),k=E(A,"SECTION",{class:!0});var v=y(k);h.l(v),v.forEach(u),this.h()},h(){document.title="Program | UTXO.22",p(l,"class","uppercase text-2xl font-bold mb-2"),p(i,"href","/seznam-udalosti"),p(i,"class","svelte-8shy9x"),p(f,"href","https://pub.utxo.cz/22/pdf/sobota.pdf"),p(f,"target","_blank"),p(f,"class","svelte-8shy9x"),p(j,"href","https://pub.utxo.cz/22/pdf/sobota-party.pdf"),p(j,"target","_blank"),p(j,"class","svelte-8shy9x"),p(Z,"href","https://pub.utxo.cz/22/pdf/nedele.pdf"),p(Z,"target","_blank"),p(Z,"class","svelte-8shy9x"),p(a,"class","mb-4 utxo-program-head svelte-8shy9x"),p(t,"class","relative mx-auto pt-6 sm:pt-10 pb-6 px-6 max-w-6xl text-blue-web print:hidden"),p(k,"class","relative mx-auto pb-6 sm:pb-10 px-0 text-blue-web")},m(A,W){C(A,e,W),C(A,t,W),c(t,l),c(l,o),c(t,n),c(t,a),c(a,i),c(i,r),c(a,d),c(a,f),c(f,V),c(a,I),c(a,j),c(j,J),c(a,F),c(a,Z),c(Z,g),c(t,B),c(t,T),_&&_.m(T,null),C(A,b,W),C(A,k,W),K[m].m(k,null),$=!0},p(A,W){A[0]?_?_.p(A,W):(_=Me(A),_.c(),_.m(T,null)):_&&(_.d(1),_=null);let U=m;m=G(A),m===U?K[m].p(A,W):(le(),X(K[U],1,1,()=>{K[U]=null}),se(),h=K[m],h?h.p(A,W):(h=K[m]=q[m](A),h.c()),L(h,1),h.m(k,null))},i(A){$||(L(h),$=!0)},o(A){X(h),$=!1},d(A){A&&u(e),A&&u(t),_&&_.d(),A&&u(b),A&&u(k),K[m].d()}}}const Rt=!0;function xe(s,e){return e.speakers.map(t=>{const l=s.spec.speakers.find(o=>o.id===t);return l.name+(l.nickname?` (${l.nickname})`:"")}).join(", ")}function et(s,e){return e.type==="lightning-series"?s.spec.events.filter(t=>t.parent===e.id).map(t=>`<span class="font-semibold"><a href="/udalosti?id=${t.id}">${t.name}</a></span> - ${xe(s,t)||"TBD"}`).join("<br>"):xe(s,e)}function tt(s,e,t){return"border border-blue-web/50"}function Ht(s,e){const t=new Date(s.start),l=new Date(s.end),o=new Date(e.start),n=new Date(e.end);return t.getTime()<n.getTime()&&l.getTime()>o.getTime()}function pe(s,e,t,l){return e.filter(o=>Boolean(l.filter(n=>n.stage===o.id).find(n=>Ht(t.period,n.period))))}function lt(s){return[{id:"all",name:"V\u0161echny s\xE1ly"},...s.spec.stages]}function st(s){if(!s.description)return{};const e=s.description.split(`
`),t=e.length>1;return{md:e[0],stripped:t}}function at(s,e){const t=s.spec.events.find(l=>l.id===e);if(!t)return console.log(`Event not found: ${e}`),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 rt=s=>`#${s}`;function Pt(s,e,t){let l,o,n,a;be(s,Te,g=>t(13,o=g)),be(s,Ie,g=>t(0,n=g)),be(s,fe,g=>t(2,a=g));const i={link:gt},r={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let d=[];d.push(Te.subscribe(()=>{fe.update(g=>{for(const B of Object.keys(r)){const T=r[B],b=o.url.searchParams.get(B);T.type==="boolean"?b!==void 0&&(g[T.key]=Boolean(b)):g[T.key]=b||"all"}return g})})),_t(async()=>{const g=Ie.subscribe(T=>{V(T),T.spec.stages});d.push(g);const B=fe.subscribe(T=>{const b=[];b.push(["time",T.time==="all"?void 0:T.time]),b.push(["stage",T.stage==="all"?void 0:T.stage]),b.push(["desc",T.showDescriptions===null||T.showDescriptions===!1||T.showDescriptions===void 0?void 0:!0]);let k="?";if(b.length>0){for(const m of b)m[1]===void 0&&o.url.searchParams.get(m[0])!==void 0?o.url.searchParams.delete(m[0]):o.url.searchParams.set(m[0],m[1]);k=`?${o.url.searchParams.toString()}`}return vt(k),!1});d.push(B)}),pt(()=>{for(const g of d)g()});function f(g,B,T,b=null){let k=B.start;const m=B.end,h=[],$={};for(;Et(k,m)===-1;){const _={};for(const q of T.spec.stages){if($[q.id]>0){_[q.id]=null,$[q.id]--;continue}if(b&&b.stage!==q.id&&b.stage!=="all")continue;let K=g.find(G=>new Date(G.period.start).getTime()===new Date(k).getTime()&&G.stage===q.id);if(_[q.id]=K,K){const G=Math.floor((new Date(K.period.end).getTime()-new Date(K.period.start).getTime())/6e4/30);K.span=G,G>1&&($[q.id]=G-1)}}h.push({title:te(k,"HH:mm"),stages:_}),k=new Date(k.getTime()+30*60*1e3)}return h}function V(g,B=!1){let T=g.scheduleTimes.map((b,k)=>{const m=bt(g,b);switch(m.id=String(k),k){case 0:m.code="sobota";break;case 1:m.code="sobota-party";break;case 2:m.code="nedele";break}return m});return B&&(T=T.filter(b=>b.id===B||B==="all")),T}function I(g){return[{id:"all",name:"V\u0161echny dny"},...V(g)]}const j=g=>ye(fe,a.time=g.id,a),J=g=>ye(fe,a.stage=g.id,a);function F(){a.showDescriptions=this.checked,fe.set(a)}const Z=(g,B)=>B.id===g.track;return s.$$.update=()=>{s.$$.dirty[0]&1&&t(1,l=n?n.spec.schedule:null)},[n,l,a,i,f,V,I,j,J,F,Z]}class Yt extends ct{constructor(e){super();ut(this,e,Pt,At,dt,{},null,[-1,-1])}}export{Yt as default,Rt as prerender};