utxo22-web/_app/chunks/Event-607166b3.js

4 řádky
14 KiB
JavaScript

import{S as Ae,i as ze,s as Be,e as m,k as S,t as C,c as g,a as k,d,m as T,h as F,b as _,g as q,F as u,j as J,E as x,q as $,w as ee,x as le,y as te,o as B,B as ie,n as R,p as W,G as se,J as Se,H as ce,l as ue}from"./index-f961f29d.js";import{A as Te,S as je,L as Le}from"./Avatar-ae188221.js";import{b as Oe,a as ae}from"./stores-85b9805a.js";function Pe(r,e){if(!e)return 0;if(r.duration)return r.duration;const i=e.spec.events.filter(a=>a.parent===r.id);if(i.length>0){let a=i.reduce((l,n)=>l+(n.duration?n.duration:0),0);return a+=5*(i.length-1),a}}function de(r,e){e.update(i=>{const a=i.favoriteEvents;let l=null;return a.includes(r)?l=Object.assign({},i,{favoriteEvents:a.filter(n=>n!==r)}):(a.push(r),l=Object.assign(i,{favoriteEvents:a})),l})}function qe(r){let e,i,a,l,n,t=r[1].title+"",s,o,f;return{c(){e=m("div"),i=m("div"),l=S(),n=m("div"),s=C(t),this.h()},l(v){e=g(v,"DIV",{class:!0});var c=k(e);i=g(c,"DIV",{class:!0}),k(i).forEach(d),l=T(c),n=g(c,"DIV",{class:!0});var h=k(n);s=F(h,t),h.forEach(d),c.forEach(d),this.h()},h(){_(i,"class",a="w-1 rounded-l-sm "+r[1].style),_(n,"class",o=(r[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),_(e,"class",f="flex "+(r[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(v,c){q(v,e,c),u(e,i),u(e,l),u(e,n),u(n,s)},p(v,[c]){c&2&&a!==(a="w-1 rounded-l-sm "+v[1].style)&&_(i,"class",a),c&2&&t!==(t=v[1].title+"")&&J(s,t),c&1&&o!==(o=(v[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase")&&_(n,"class",o),c&1&&f!==(f="flex "+(v[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&_(e,"class",f)},i:x,o:x,d(v){v&&d(e)}}}function Ce(r,e,i){let a,{event:l={}}=e,{size:n=null}=e;const t={panel:{title:"Panelov\xE1 debata",style:"bg-custom-red text-white"},talk:{title:"P\u0159edn\xE1\u0161ka",style:"bg-custom-green text-white"},workshop:{title:"Workshop",style:"bg-custom-blue text-white"},other:{title:"Ostatn\xED",style:"bg-custom-yellow"},lightning:{title:"Bleskov\xE1 p\u0159edn\xE1\u0161ka",style:"bg-pink-400"},"lightning-series":{title:"P\xE1smo bleskov\xFDch p\u0159edn\xE1\u0161ek",style:"bg-pink-400"}};return r.$$set=s=>{"event"in s&&i(2,l=s.event),"size"in s&&i(0,n=s.size)},r.$$.update=()=>{r.$$.dirty&4&&i(1,a=t[l.type])},[n,a,l]}class Fe extends Ae{constructor(e){super();ze(this,e,Ce,qe,Be,{event:2,size:0})}}function he(r,e,i){const a=r.slice();return a[12]=e[i],a}function _e(r,e,i){const a=r.slice();return a[15]=e[i],a}function ve(r,e,i){const a=r.slice();return a[18]=e[i],a}function pe(r,e,i){const a=r.slice();return a[15]=e[i],a}function me(r){let e,i,a=r[5](r[0].speakers),l=[];for(let t=0;t<a.length;t+=1)l[t]=ge(pe(r,a,t));const n=t=>B(l[t],1,1,()=>{l[t]=null});return{c(){e=m("div");for(let t=0;t<l.length;t+=1)l[t].c();this.h()},l(t){e=g(t,"DIV",{class:!0});var s=k(e);for(let o=0;o<l.length;o+=1)l[o].l(s);s.forEach(d),this.h()},h(){_(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(t,s){q(t,e,s);for(let o=0;o<l.length;o+=1)l[o].m(e,null);i=!0},p(t,s){if(s&33){a=t[5](t[0].speakers);let o;for(o=0;o<a.length;o+=1){const f=pe(t,a,o);l[o]?(l[o].p(f,s),$(l[o],1)):(l[o]=ge(f),l[o].c(),$(l[o],1),l[o].m(e,null))}for(R(),o=a.length;o<l.length;o+=1)n(o);W()}},i(t){if(!i){for(let s=0;s<a.length;s+=1)$(l[s]);i=!0}},o(t){l=l.filter(Boolean);for(let s=0;s<l.length;s+=1)B(l[s]);i=!1},d(t){t&&d(e),se(l,t)}}}function ge(r){let e,i,a,l,n,t=r[15].name+"",s,o,f,v;return i=new Te({props:{speaker:r[15],size:"extra-small"}}),{c(){e=m("div"),ee(i.$$.fragment),a=S(),l=m("div"),n=m("a"),s=C(t),f=S(),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=k(e);le(i.$$.fragment,h),a=T(h),l=g(h,"DIV",{class:!0});var b=k(l);n=g(b,"A",{href:!0});var D=k(n);s=F(D,t),D.forEach(d),b.forEach(d),f=T(h),h.forEach(d),this.h()},h(){_(n,"href",o="/lide?id="+r[15].id),_(l,"class","m-auto"),_(e,"class","flex gap-1.5")},m(c,h){q(c,e,h),te(i,e,null),u(e,a),u(e,l),u(l,n),u(n,s),u(e,f),v=!0},p(c,h){const b={};h&1&&(b.speaker=c[15]),i.$set(b),(!v||h&1)&&t!==(t=c[15].name+"")&&J(s,t),(!v||h&1&&o!==(o="/lide?id="+c[15].id))&&_(n,"href",o)},i(c){v||($(i.$$.fragment,c),v=!0)},o(c){B(i.$$.fragment,c),v=!1},d(c){c&&d(e),ie(i)}}}function ke(r){let e,i,a;return{c(){e=m("div"),i=C(r[2]),a=C("m"),this.h()},l(l){e=g(l,"DIV",{class:!0});var n=k(e);i=F(n,r[2]),a=F(n,"m"),n.forEach(d),this.h()},h(){_(e,"class","text-xs my-auto")},m(l,n){q(l,e,n),u(e,i),u(e,a)},p(l,n){n&4&&J(i,l[2])},d(l){l&&d(e)}}}function be(r){let e,i,a=r[6](r[0].track)+"",l,n;return{c(){e=m("div"),i=m("a"),l=C(a),this.h()},l(t){e=g(t,"DIV",{class:!0});var s=k(e);i=g(s,"A",{href:!0});var o=k(i);l=F(o,a),o.forEach(d),s.forEach(d),this.h()},h(){_(i,"href",n="/program?track="+r[0].track),_(e,"class","text-sm my-auto")},m(t,s){q(t,e,s),u(e,i),u(i,l)},p(t,s){s&1&&a!==(a=t[6](t[0].track)+"")&&J(l,a),s&1&&n!==(n="/program?track="+t[0].track)&&_(i,"href",n)},d(t){t&&d(e)}}}function Ee(r){let e,i=r[0].tags,a=[];for(let l=0;l<i.length;l+=1)a[l]=De(ve(r,i,l));return{c(){e=m("div");for(let l=0;l<a.length;l+=1)a[l].c();this.h()},l(l){e=g(l,"DIV",{class:!0});var n=k(e);for(let t=0;t<a.length;t+=1)a[t].l(n);n.forEach(d),this.h()},h(){_(e,"class","flex text-xs gap-1 my-auto text-blue-web/60")},m(l,n){q(l,e,n);for(let t=0;t<a.length;t+=1)a[t].m(e,null)},p(l,n){if(n&1){i=l[0].tags;let t;for(t=0;t<i.length;t+=1){const s=ve(l,i,t);a[t]?a[t].p(s,n):(a[t]=De(s),a[t].c(),a[t].m(e,null))}for(;t<a.length;t+=1)a[t].d(1);a.length=i.length}},d(l){l&&d(e),se(a,l)}}}function De(r){let e,i,a,l=r[18]+"",n,t;return{c(){e=m("div"),i=m("a"),a=C("#"),n=C(l),this.h()},l(s){e=g(s,"DIV",{});var o=k(e);i=g(o,"A",{href:!0});var f=k(i);a=F(f,"#"),n=F(f,l),f.forEach(d),o.forEach(d),this.h()},h(){_(i,"href",t="/program?tag="+r[18])},m(s,o){q(s,e,o),u(e,i),u(i,a),u(i,n)},p(s,o){o&1&&l!==(l=s[18]+"")&&J(n,l),o&1&&t!==(t="/program?tag="+s[18])&&_(i,"href",t)},d(s){s&&d(e)}}}function we(r){let e,i,a,l;i=new je({props:{source:r[1].md,renderers:r[4]}});let n=r[1].stripped&&Ie(r);return{c(){e=m("div"),ee(i.$$.fragment),a=S(),n&&n.c(),this.h()},l(t){e=g(t,"DIV",{class:!0});var s=k(e);le(i.$$.fragment,s),a=T(s),n&&n.l(s),s.forEach(d),this.h()},h(){_(e,"class","mt-2")},m(t,s){q(t,e,s),te(i,e,null),u(e,a),n&&n.m(e,null),l=!0},p(t,s){const o={};s&2&&(o.source=t[1].md),i.$set(o),t[1].stripped?n?n.p(t,s):(n=Ie(t),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i(t){l||($(i.$$.fragment,t),l=!0)},o(t){B(i.$$.fragment,t),l=!1},d(t){t&&d(e),ie(i),n&&n.d()}}}function Ie(r){let e,i,a,l,n,t;return{c(){e=m("div"),i=C("("),a=m("a"),l=C("Zobrazit cel\xFD popis"),t=C(")"),this.h()},l(s){e=g(s,"DIV",{class:!0});var o=k(e);i=F(o,"("),a=g(o,"A",{href:!0});var f=k(a);l=F(f,"Zobrazit cel\xFD popis"),f.forEach(d),t=F(o,")"),o.forEach(d),this.h()},h(){_(a,"href",n="/udalosti?id="+r[0].id),_(e,"class","text-sm text-blue-web/60")},m(s,o){q(s,e,o),u(e,i),u(e,a),u(a,l),u(e,t)},p(s,o){o&1&&n!==(n="/udalosti?id="+s[0].id)&&_(a,"href",n)},d(s){s&&d(e)}}}function Ve(r){let e,i,a,l=r[7](r[0]),n=[];for(let s=0;s<l.length;s+=1)n[s]=ye(he(r,l,s));const t=s=>B(n[s],1,1,()=>{n[s]=null});return{c(){e=m("div"),i=m("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=g(s,"DIV",{class:!0});var o=k(e);i=g(o,"DIV",{class:!0,cellpadding:!0});var f=k(i);for(let v=0;v<n.length;v+=1)n[v].l(f);f.forEach(d),o.forEach(d),this.h()},h(){_(i,"class","flex flex-wrap gap-2"),_(i,"cellpadding","5"),_(e,"class","mt-4 w-auto mb-2")},m(s,o){q(s,e,o),u(e,i);for(let f=0;f<n.length;f+=1)n[f].m(i,null);a=!0},p(s,o){if(o&169){l=s[7](s[0]);let f;for(f=0;f<l.length;f+=1){const v=he(s,l,f);n[f]?(n[f].p(v,o),$(n[f],1)):(n[f]=ye(v),n[f].c(),$(n[f],1),n[f].m(i,null))}for(R(),f=l.length;f<n.length;f+=1)t(f);W()}},i(s){if(!a){for(let o=0;o<l.length;o+=1)$(n[o]);a=!0}},o(s){n=n.filter(Boolean);for(let o=0;o<n.length;o+=1)B(n[o]);a=!1},d(s){s&&d(e),se(n,s)}}}function Me(r){let e,i,a=r[5](r[12].speakers),l=[];for(let t=0;t<a.length;t+=1)l[t]=$e(_e(r,a,t));const n=t=>B(l[t],1,1,()=>{l[t]=null});return{c(){for(let t=0;t<l.length;t+=1)l[t].c();e=ue()},l(t){for(let s=0;s<l.length;s+=1)l[s].l(t);e=ue()},m(t,s){for(let o=0;o<l.length;o+=1)l[o].m(t,s);q(t,e,s),i=!0},p(t,s){if(s&161){a=t[5](t[12].speakers);let o;for(o=0;o<a.length;o+=1){const f=_e(t,a,o);l[o]?(l[o].p(f,s),$(l[o],1)):(l[o]=$e(f),l[o].c(),$(l[o],1),l[o].m(e.parentNode,e))}for(R(),o=a.length;o<l.length;o+=1)n(o);W()}},i(t){if(!i){for(let s=0;s<a.length;s+=1)$(l[s]);i=!0}},o(t){l=l.filter(Boolean);for(let s=0;s<l.length;s+=1)B(l[s]);i=!1},d(t){se(l,t),t&&d(e)}}}function Ze(r){let e,i;return{c(){e=m("div"),i=C("TBA")},l(a){e=g(a,"DIV",{});var l=k(e);i=F(l,"TBA"),l.forEach(d)},m(a,l){q(a,e,l),u(e,i)},p:x,i:x,o:x,d(a){a&&d(e)}}}function $e(r){let e,i,a,l,n,t=r[15].name+"",s,o,f,v;return i=new Te({props:{speaker:r[15],size:"micro"}}),{c(){e=m("div"),ee(i.$$.fragment),a=S(),l=m("div"),n=m("a"),s=C(t),f=S(),this.h()},l(c){e=g(c,"DIV",{class:!0});var h=k(e);le(i.$$.fragment,h),a=T(h),l=g(h,"DIV",{});var b=k(l);n=g(b,"A",{href:!0});var D=k(n);s=F(D,t),D.forEach(d),b.forEach(d),f=T(h),h.forEach(d),this.h()},h(){_(n,"href",o="/lide?id="+r[15].id),_(e,"class","flex gap-1")},m(c,h){q(c,e,h),te(i,e,null),u(e,a),u(e,l),u(l,n),u(n,s),u(e,f),v=!0},p(c,h){const b={};h&1&&(b.speaker=c[15]),i.$set(b),(!v||h&1)&&t!==(t=c[15].name+"")&&J(s,t),(!v||h&1&&o!==(o="/lide?id="+c[15].id))&&_(n,"href",o)},i(c){v||($(i.$$.fragment,c),v=!0)},o(c){B(i.$$.fragment,c),v=!1},d(c){c&&d(e),ie(i)}}}function ye(r){let e,i,a,l=r[12].name+"",n,t,s,o,f,v,c,h,b,D,w,I,G,N;function K(){return r[11](r[12])}const Q=[Ze,Me],M=[];function U(j,V){return j[12].speakers.length===0?0:1}return h=U(r),b=M[h]=Q[h](r),{c(){e=m("div"),i=m("div"),a=m("a"),n=C(l),s=S(),o=m("i"),v=S(),c=m("div"),b.c(),D=S(),this.h()},l(j){e=g(j,"DIV",{class:!0});var V=k(e);i=g(V,"DIV",{class:!0});var Z=k(i);a=g(Z,"A",{href:!0});var X=k(a);n=F(X,l),X.forEach(d),s=T(Z),o=g(Z,"I",{class:!0}),k(o).forEach(d),Z.forEach(d),v=T(V),c=g(V,"DIV",{class:!0});var y=k(c);b.l(y),y.forEach(d),D=T(V),V.forEach(d),this.h()},h(){_(a,"href",t="/udalosti?id="+r[12].id),_(o,"class",f="fa-star "+(r[3].favoriteEvents.includes(r[12].id)?"fa-solid":"fa-regular")+" cursor-pointer"),_(i,"class","font-bold"),_(c,"class","mt-1"),_(e,"class",w="border rounded py-1.5 px-2.5 text-sm transition-all "+(r[3].favoriteEvents.includes(r[12].id)?"bg-yellow-100":"bg-gray-100"))},m(j,V){q(j,e,V),u(e,i),u(i,a),u(a,n),u(i,s),u(i,o),u(e,v),u(e,c),M[h].m(c,null),u(e,D),I=!0,G||(N=Se(o,"click",K),G=!0)},p(j,V){r=j,(!I||V&1)&&l!==(l=r[12].name+"")&&J(n,l),(!I||V&1&&t!==(t="/udalosti?id="+r[12].id))&&_(a,"href",t),(!I||V&9&&f!==(f="fa-star "+(r[3].favoriteEvents.includes(r[12].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&_(o,"class",f);let Z=h;h=U(r),h===Z?M[h].p(r,V):(R(),B(M[Z],1,1,()=>{M[Z]=null}),W(),b=M[h],b?b.p(r,V):(b=M[h]=Q[h](r),b.c()),$(b,1),b.m(c,null)),(!I||V&9&&w!==(w="border rounded py-1.5 px-2.5 text-sm transition-all "+(r[3].favoriteEvents.includes(r[12].id)?"bg-yellow-100":"bg-gray-100")))&&_(e,"class",w)},i(j){I||($(b),I=!0)},o(j){B(b),I=!1},d(j){j&&d(e),M[h].d(),G=!1,N()}}}function Ge(r){let e,i,a,l,n,t,s,o=r[0].name+"",f,v,c,h,b,D,w,I,G,N,K,Q,M,U=r[7](r[0]).length>0,j,V,Z,X,y=r[0].speakers&&r[0].speakers.length>0&&me(r);I=new Fe({props:{event:r[0]}});let L=r[2]&&ke(r),O=r[0].track&&be(r),P=r[0].tags&&Ee(r),A=r[0].description&&we(r),z=U&&Ve(r);return{c(){e=m("div"),i=m("div"),a=m("i"),n=S(),t=m("div"),s=m("a"),f=C(o),c=S(),y&&y.c(),h=S(),b=m("div"),D=m("div"),w=m("div"),ee(I.$$.fragment),G=S(),L&&L.c(),N=S(),O&&O.c(),K=S(),P&&P.c(),Q=S(),A&&A.c(),M=S(),z&&z.c(),this.h()},l(p){e=g(p,"DIV",{class:!0});var E=k(e);i=g(E,"DIV",{class:!0});var Y=k(i);a=g(Y,"I",{class:!0}),k(a).forEach(d),Y.forEach(d),n=T(E),t=g(E,"DIV",{class:!0});var re=k(t);s=g(re,"A",{href:!0});var ne=k(s);f=F(ne,o),ne.forEach(d),re.forEach(d),c=T(E),y&&y.l(E),h=T(E),b=g(E,"DIV",{class:!0});var oe=k(b);D=g(oe,"DIV",{class:!0});var H=k(D);w=g(H,"DIV",{});var fe=k(w);le(I.$$.fragment,fe),fe.forEach(d),G=T(H),L&&L.l(H),N=T(H),O&&O.l(H),K=T(H),P&&P.l(H),H.forEach(d),oe.forEach(d),Q=T(E),A&&A.l(E),M=T(E),z&&z.l(E),E.forEach(d),this.h()},h(){_(a,"class",l="fa-star "+(r[3].favoriteEvents.includes(r[0].id)?"fa-solid":"fa-regular")+" cursor-pointer"),_(i,"class","float-right"),_(s,"href",v="/udalosti?id="+r[0].id),_(t,"class","text-lg font-semibold"),_(D,"class","text-sm flex flex-wrap gap-3 flex-1"),_(b,"class",""),_(e,"class",j="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(r[3].favoriteEvents.includes(r[0].id)?"bg-yellow-100":""))},m(p,E){q(p,e,E),u(e,i),u(i,a),u(e,n),u(e,t),u(t,s),u(s,f),u(e,c),y&&y.m(e,null),u(e,h),u(e,b),u(b,D),u(D,w),te(I,w,null),u(D,G),L&&L.m(D,null),u(D,N),O&&O.m(D,null),u(D,K),P&&P.m(D,null),u(e,Q),A&&A.m(e,null),u(e,M),z&&z.m(e,null),V=!0,Z||(X=Se(a,"click",r[10]),Z=!0)},p(p,[E]){(!V||E&9&&l!==(l="fa-star "+(p[3].favoriteEvents.includes(p[0].id)?"fa-solid":"fa-regular")+" cursor-pointer"))&&_(a,"class",l),(!V||E&1)&&o!==(o=p[0].name+"")&&J(f,o),(!V||E&1&&v!==(v="/udalosti?id="+p[0].id))&&_(s,"href",v),p[0].speakers&&p[0].speakers.length>0?y?(y.p(p,E),E&1&&$(y,1)):(y=me(p),y.c(),$(y,1),y.m(e,h)):y&&(R(),B(y,1,1,()=>{y=null}),W());const Y={};E&1&&(Y.event=p[0]),I.$set(Y),p[2]?L?L.p(p,E):(L=ke(p),L.c(),L.m(D,N)):L&&(L.d(1),L=null),p[0].track?O?O.p(p,E):(O=be(p),O.c(),O.m(D,K)):O&&(O.d(1),O=null),p[0].tags?P?P.p(p,E):(P=Ee(p),P.c(),P.m(D,null)):P&&(P.d(1),P=null),p[0].description?A?(A.p(p,E),E&1&&$(A,1)):(A=we(p),A.c(),$(A,1),A.m(e,M)):A&&(R(),B(A,1,1,()=>{A=null}),W()),E&1&&(U=p[7](p[0]).length>0),U?z?(z.p(p,E),E&1&&$(z,1)):(z=Ve(p),z.c(),$(z,1),z.m(e,null)):z&&(R(),B(z,1,1,()=>{z=null}),W()),(!V||E&9&&j!==(j="transition-all mb-4 border px-3 py-2 rounded-md shadow "+(p[3].favoriteEvents.includes(p[0].id)?"bg-yellow-100":"")))&&_(e,"class",j)},i(p){V||($(y),$(I.$$.fragment,p),$(A),$(z),V=!0)},o(p){B(y),B(I.$$.fragment,p),B(A),B(z),V=!1},d(p){p&&d(e),y&&y.d(),ie(I),L&&L.d(),O&&O.d(),P&&P.d(),A&&A.d(),z&&z.d(),Z=!1,X()}}}function He(r){if(!r.description)return{};const e=r.description.split(`
`),i=e.length>1;return{md:e[0],stripped:i}}function Je(r,e,i){let a,l,n,t,s;ce(r,Oe,w=>i(9,t=w)),ce(r,ae,w=>i(3,s=w));let{event:o}=e;const f={link:Le};function v(w){if(!!w)return w.map(I=>t.spec.speakers.find(G=>G.id===I))}function c(w){const I=t.spec.tracks.find(G=>G.id===w);return I.shortname||I.name}function h(w){return t.spec.events.filter(I=>I.parent===w.id)}const b=()=>de(a.id,ae),D=w=>de(w.id,ae);return r.$$set=w=>{"event"in w&&i(8,o=w.event)},r.$$.update=()=>{r.$$.dirty&256&&i(0,a=o),r.$$.dirty&513&&i(2,l=Pe(a,t)),r.$$.dirty&1&&i(1,n=He(a))},[a,n,l,s,f,v,c,h,o,t,b,D]}class Ke extends Ae{constructor(e){super();ze(this,e,Je,Ge,Be,{event:8})}}export{Fe as E,Ke as a,de as b,Pe as c};