utxo22-web/_app/pages/program-candidates.svelte-a...

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

import{S as et,i as tt,s as lt,e as I,t as B,k as z,c as V,a as y,h as O,d,m as U,b as T,a1 as st,g as $,J as u,a2 as pe,O as ce,j as F,K as te,Y as it,n as le,o as X,p as se,q,L as ue,v as ot,T as at,a3 as nt,a4 as me,E as oe,l as x,w as rt,x as ct,y as ft,B as ut,a5 as dt}from"../chunks/index-695b5929.js";import{g as ht}from"../chunks/navigation-0e6511d1.js";import{p as be}from"../chunks/stores-67278648.js";import{b as ve,s as ie}from"../chunks/stores-726c7852.js";import{p as _t}from"../chunks/periods-3c9faf13.js";import{L as pt,S as mt}from"../chunks/Link-9c9f68ae.js";import{c as bt}from"../chunks/index-1cc1bdc7.js";import{f as ee}from"../chunks/index-14ac584d.js";import{l as ne}from"../chunks/index-c9b2ee0d.js";import"../chunks/singletons-d1fb5791.js";import"../chunks/index-57c7a2a5.js";import"../chunks/utils-1595b72e.js";const{Boolean:ae}=dt;function ge(s,e,t){const l=s.slice();return l[20]=e[t],l}function ke(s,e,t){const l=s.slice();return l[23]=e[t],l}function we(s,e,t){const l=s.slice();return l[26]=e[t],l}function Ee(s,e,t){const l=s.slice();return l[29]=e[t][0],l[30]=e[t][1],l}function De(s,e,t){const l=s.slice();return l[33]=e[t],l}function Te(s,e,t){const l=s.slice();return l[36]=e[t],l}function Ie(s,e,t){const l=s.slice();return l[26]=e[t],l}function Ve(s,e,t){const l=s.slice();return l[41]=e[t],l}function ye(s,e,t){const l=s.slice();return l[20]=e[t],l}function Se(s,e,t){const l=s.slice();return l[46]=e[t],l[48]=t,l}function He(s){let e,t,l,a,f,i,n,o=s[1].spec["schedule-candidates"],r=[];for(let _=0;_<o.length;_+=1)r[_]=Ne(Se(s,o,_));return{c(){e=I("div"),t=B("Pl\xE1n (\u0159e\u0161en\xED)"),l=z(),a=I("div"),f=I("select");for(let _=0;_<r.length;_+=1)r[_].c();this.h()},l(_){e=V(_,"DIV",{class:!0});var v=y(e);t=O(v,"Pl\xE1n (\u0159e\u0161en\xED)"),v.forEach(d),l=U(_),a=V(_,"DIV",{class:!0});var p=y(a);f=V(p,"SELECT",{class:!0});var b=y(f);for(let E=0;E<r.length;E+=1)r[E].l(b);b.forEach(d),p.forEach(d),this.h()},h(){T(e,"class","font-semibold uppercase mb-1"),T(f,"class","border border-blue-web rounded-md p-1.5 text-blue-web bg-white"),s[0]===void 0&&st(()=>s[9].call(f)),T(a,"class","flex flex-wrap gap-1")},m(_,v){$(_,e,v),u(e,t),$(_,l,v),$(_,a,v),u(a,f);for(let p=0;p<r.length;p+=1)r[p].m(f,null);pe(f,s[0]),i||(n=ce(f,"change",s[9]),i=!0)},p(_,v){if(v[0]&2){o=_[1].spec["schedule-candidates"];let p;for(p=0;p<o.length;p+=1){const b=Se(_,o,p);r[p]?r[p].p(b,v):(r[p]=Ne(b),r[p].c(),r[p].m(f,null))}for(;p<r.length;p+=1)r[p].d(1);r.length=o.length}v[0]&1&&pe(f,_[0])},d(_){_&&d(e),_&&d(l),_&&d(a),te(r,_),i=!1,n()}}}function Ne(s){let e,t,l,a,f=s[46].hash.substring(0,8)+"",i,n,o=["score","thc:themeCrossing","tgc:tagsCrossing","exd:exclusivityDev"].map(p).join(", ")+"",r,_,v;function p(...b){return s[8](s[46],...b)}return{c(){e=I("option"),t=B("#"),l=B(s[48]),a=B(" | "),i=B(f),n=B(" ["),r=B(o),_=B("]"),this.h()},l(b){e=V(b,"OPTION",{});var E=y(e);t=O(E,"#"),l=O(E,s[48]),a=O(E," | "),i=O(E,f),n=O(E," ["),r=O(E,o),_=O(E,"]"),E.forEach(d),this.h()},h(){e.__value=v=s[48],e.value=e.__value},m(b,E){$(b,e,E),u(e,t),u(e,l),u(e,a),u(e,i),u(e,n),u(e,r),u(e,_)},p(b,E){s=b,E[0]&2&&f!==(f=s[46].hash.substring(0,8)+"")&&F(i,f),E[0]&2&&o!==(o=["score","thc:themeCrossing","tgc:tagsCrossing","exd:exclusivityDev"].map(p).join(", ")+"")&&F(r,o)},d(b){b&&d(e)}}}function Ae(s){let e,t,l,a,f,i,n,o,r,_,v,p,b,E,C,j,M,N,S=s[7](s[1]),k=[];for(let c=0;c<S.length;c+=1)k[c]=Pe(ye(s,S,c));let P=Fe(s[1]),g=[];for(let c=0;c<P.length;c+=1)g[c]=Be(Ve(s,P,c));return{c(){e=I("div"),t=I("div"),l=I("div"),a=B("Den"),f=z();for(let c=0;c<k.length;c+=1)k[c].c();i=z(),n=I("div"),o=I("div"),r=I("div"),_=B("S\xE1l"),v=z();for(let c=0;c<g.length;c+=1)g[c].c();p=z(),b=I("div"),E=I("label"),C=I("input"),j=B(" Zobrazit popisy"),this.h()},l(c){e=V(c,"DIV",{class:!0});var w=y(e);t=V(w,"DIV",{class:!0});var h=y(t);l=V(h,"DIV",{class:!0});var H=y(l);a=O(H,"Den"),H.forEach(d),f=U(h);for(let R=0;R<k.length;R+=1)k[R].l(h);h.forEach(d),w.forEach(d),i=U(c),n=V(c,"DIV",{class:!0});var G=y(n);o=V(G,"DIV",{class:!0});var m=y(o);r=V(m,"DIV",{class:!0});var A=y(r);_=O(A,"S\xE1l")
`),t=e.length>1;return{md:e[0],stripped:t}}function Qe(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 We=s=>`#${s}`;function Vt(s,e,t){let l,a,f,i;ue(s,be,k=>t(16,a=k)),ue(s,ve,k=>t(1,f=k)),ue(s,ie,k=>t(3,i=k));const n={link:pt};let o=0;const r={time:{key:"time"},stage:{key:"stage"},desc:{key:"showDescriptions",type:"boolean"}};let _=[];_.push(be.subscribe(()=>{ie.update(k=>{for(const P of Object.keys(r)){const g=r[P],c=a.url.searchParams.get(P);g.type==="boolean"?c!==void 0&&(k[g.key]=Boolean(c)):k[g.key]=c||"all"}return k})})),ot(async()=>{const k=ve.subscribe(g=>{p(g),g.spec.stages});_.push(k);const P=ie.subscribe(g=>{const c=[];c.push(["time",g.time==="all"?void 0:g.time]),c.push(["stage",g.stage==="all"?void 0:g.stage]),c.push(["desc",g.showDescriptions===null||g.showDescriptions===!1||g.showDescriptions===void 0?void 0:!0]);let w="?";if(c.length>0){for(const h of c)h[1]===void 0&&a.url.searchParams.get(h[0])!==void 0?a.url.searchParams.delete(h[0]):a.url.searchParams.set(h[0],h[1]);w=`?${a.url.searchParams.toString()}`}return ht(w),!1});_.push(P)}),at(()=>{for(const k of _)k()});function v(k,P,g,c=null){let w=P.start;const h=P.end,H=[],G={};for(;bt(w,h)===-1;){const m={};for(const A of g.spec.stages){if(G[A.id]>0){m[A.id]=null,G[A.id]--;continue}if(c&&c.stage!==A.id&&c.stage!=="all")continue;let D=k.schedule.find(Z=>new Date(Z.period.start).getTime()===new Date(w).getTime()&&Z.stage===A.id);if(m[A.id]=D,D){const Z=Math.floor((new Date(D.period.end).getTime()-new Date(D.period.start).getTime())/6e4/30);D.span=Z,Z>1&&(G[A.id]=Z-1)}}H.push({title:ee(w,"HH:mm"),stages:m}),w=new Date(w.getTime()+30*60*1e3)}return H}function p(k,P=!1){let g=k.scheduleTimes.map((c,w)=>{const h=_t(k,c);return h.id=String(w),h});return P&&(g=g.filter(c=>c.id===P||P==="all")),g}function b(k){return[{id:"all",name:"V\u0161echny dny"},...p(k)]}const E=(k,P)=>{const[g,c]=P.split(":");return`${g}:${Math.round(k.metrics[c||g]*1e3)/1e3}`};function C(){o=nt(this),t(0,o)}const j=k=>me(ie,i.time=k.id,i),M=k=>me(ie,i.stage=k.id,i);function N(){i.showDescriptions=this.checked,ie.set(i)}const S=(k,P)=>P.id===k.track;return s.$$.update=()=>{s.$$.dirty[0]&3&&t(2,l=f?f.spec["schedule-candidates"][o]:null)},[o,f,l,i,n,v,p,b,E,C,j,M,N,S]}class zt extends et{constructor(e){super();tt(this,e,Vt,Tt,lt,{},null,[-1,-1])}}export{zt as default,jt as prerender};