utxo22-web/_app/chunks/Event-d12d19a1.js

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

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