utxo22-web/_app/chunks/Event-500bdf0e.js

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

import{S as de,i as he,s as ve,e as m,k as $,t as q,c as g,a as b,d as h,m as z,h as C,b as p,g as j,F as u,j as _e,E as L,q as V,w as R,x as W,y as J,o as T,B as Q,n as U,p as X,G as Y,K as pe,H as le,l as ae}from"./index-e45cd9d1.js";import{A as me}from"./Avatar-f71fd69a.js";import{b as ge,a as N}from"./stores-adaa4006.js";function be(l,e){if(!e)return 0;if(l.duration)return l.duration;const a=e.spec.events.filter(s=>s.parent===l.id);if(a.length>0){let s=a.reduce((t,i)=>t+(i.duration?i.duration:0),0);return s+=5*(a.length-1),s}}function re(l,e){e.update(a=>{const s=a.favoriteEvents;let t=null;return s.includes(l)?t=Object.assign({},a,{favoriteEvents:s.filter(i=>i!==l)}):(s.push(l),t=Object.assign(a,{favoriteEvents:s})),t})}function ke(l){let e,a,s,t,i,o=l[1].title+"",r,n,c;return{c(){e=m("div"),a=m("div"),t=$(),i=m("div"),r=q(o),this.h()},l(v){e=g(v,"DIV",{class:!0});var f=b(e);a=g(f,"DIV",{class:!0}),b(a).forEach(h),t=z(f),i=g(f,"DIV",{class:!0});var d=b(i);r=C(d,o),d.forEach(h),f.forEach(h),this.h()},h(){p(a,"class",s="w-1 rounded-l-sm "+l[1].style),p(i,"class",n=(l[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase"),p(e,"class",c="flex "+(l[0]==="big"?"h-6 text-sm":"h-5 text-xs"))},m(v,f){j(v,e,f),u(e,a),u(e,t),u(e,i),u(i,r)},p(v,[f]){f&2&&s!==(s="w-1 rounded-l-sm "+v[1].style)&&p(a,"class",s),f&2&&o!==(o=v[1].title+"")&&_e(r,o),f&1&&n!==(n=(v[0]==="big"?"px-2 py-0.5":"px-1.5 py-0.5")+" rounded-r-sm bg-gray-100 uppercase")&&p(i,"class",n),f&1&&c!==(c="flex "+(v[0]==="big"?"h-6 text-sm":"h-5 text-xs"))&&p(e,"class",c)},i:L,o:L,d(v){v&&h(e)}}}function Ee(l,e,a){let s,{event:t={}}=e,{size:i=null}=e;const o={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:"Lightning talk",style:"bg-pink-400"}};return l.$$set=r=>{"event"in r&&a(2,t=r.event),"size"in r&&a(0,i=r.size)},l.$$.update=()=>{l.$$.dirty&4&&a(1,s=o[t.type])},[i,s,t]}class ye extends de{constructor(e){super();he(this,e,Ee,ke,ve,{event:2,size:0})}}function se(l,e,a){const s=l.slice();return s[10]=e[a],s}function ie(l,e,a){const s=l.slice();return s[13]=e[a],s}function ne(l,e,a){const s=l.slice();return s[13]=e[a],s}function De(l){let e,a,s=l[3](l[2].speakers),t=[];for(let o=0;o<s.length;o+=1)t[o]=oe(ne(l,s,o));const i=o=>T(t[o],1,1,()=>{t[o]=null});return{c(){e=m("div");for(let o=0;o<t.length;o+=1)t[o].c();this.h()},l(o){e=g(o,"DIV",{class:!0});var r=b(e);for(let n=0;n<t.length;n+=1)t[n].l(r);r.forEach(h),this.h()},h(){p(e,"class","mt-1 mb-2 flex flex-wrap gap-2")},m(o,r){j(o,e,r);for(let n=0;n<t.length;n+=1)t[n].m(e,null);a=!0},p(o,r){if(r&12){s=o[3](o[2].speakers);let n;for(n=0;n<s.length;n+=1){const c=ne(o,s,n);t[n]?(t[n].p(c,r),V(t[n],1)):(t[n]=oe(c),t[n].c(),V(t[n],1),t[n].m(e,null))}for(U(),n=s.length;n<t.length;n+=1)i(n);X()}},i(o){if(!a){for(let r=0;r<s.length;r+=1)V(t[r]);a=!0}},o(o){t=t.filter(Boolean);for(let r=0;r<t.length;r+=1)T(t[r]);a=!1},d(o){o&&h(e),Y(t,o)}}}function oe(l){let e,a,s,t,i,o=l[13].name+"",r,n,c,v;return a=new me({props:{speaker:l[13],size:"extra-small"}}),{c(){e=m("div"),R(a.$$.fragment),s=$(),t=m("div"),i=m("a"),r=q(o),c=$(),this.h()},l(f){e=g(f,"DIV",{class:!0});var d=b(e);W(a.$$.fragment,d),s=z(d),t=g(d,"DIV",{class:!0});var _=b(t);i=g(_,"A",{href:!0});var E=b(i);r=C(E,o),E.forEach(h),_.forEach(h),c=z(d),d.forEach(h),this.h()},h(){p(i,"href",n="/lide?id="+l[13].id),p(t,"class","m-auto"),p(e,"class","flex gap-1.5")},m(f,d){j(f,e,d),J(a,e,null),u(e,s),u(e,t),u(t,i),u(i,r),u(e,c),v=!0},p:L,i(f){v||(V(a.$$.fragment,f),v=!0)},o(f){T(a.$$.fragment,f),v=!1},d(f){f&&h(e),Q(a)}}}function we(l){let e,a=l[4](l[2].track)+"",s;return{c(){e=m("div"),s=q(a),this.h()},l(t){e=g(t,"DIV",{class:!0});var i=b(e);s=C(i,a),i.forEach(h),this.h()},h(){p(e,"class","text-sm my-auto")},m(t,i){j(t,e,i),u(e,s)},p:L,d(t){t&&h(e)}}}function ce(l){let e,a,s;return{c(){e=m("div"),a=q(l[0]),s=q("m"),this.h()},l(t){e=g