pbw-explore/_app/immutable/chunks/CalendarList-ae4000ba.js

2 řádky
10 KiB
JavaScript

import{S as Ne,i as Te,s as Be,k as E,l as D,m as I,h as u,n as p,b as w,f as g,g as R,d as U,t as B,O as re,q as H,a as F,w as se,r as N,c as P,x as fe,F as _,y as oe,u as G,z as ue,e as te,_ as Se,$ as je}from"./index-bc2baea7.js";import{f as ee,I as Ae}from"./Footer-cdca4abb.js";import{E as He}from"./DisclaimerHidden-67d93911.js";function ge(s,t,i){const n=s.slice();return n[7]=t[i],n}function pe(s,t,i){const n=s.slice();return n[10]=t[i],n}function be(s,t,i){const n=s.slice();return n[10]=t[i],n}function ke(s){let t,i,n=(s[7].event||s[4]).types,e=[];for(let l=0;l<n.length;l+=1)e[l]=ye(be(s,n,l));const r=l=>B(e[l],1,1,()=>{e[l]=null});return{c(){t=E("div");for(let l=0;l<e.length;l+=1)e[l].c();this.h()},l(l){t=D(l,"DIV",{class:!0});var f=I(t);for(let a=0;a<e.length;a+=1)e[a].l(f);f.forEach(u),this.h()},h(){p(t,"class","gap-1 items-center md:ml-2 inline-flex md:hidden text-xs")},m(l,f){w(l,t,f);for(let a=0;a<e.length;a+=1)e[a].m(t,null);i=!0},p(l,f){if(f&17){n=(l[7].event||l[4]).types;let a;for(a=0;a<n.length;a+=1){const h=be(l,n,a);e[a]?(e[a].p(h,f),g(e[a],1)):(e[a]=ye(h),e[a].c(),g(e[a],1),e[a].m(t,null))}for(R(),a=n.length;a<e.length;a+=1)r(a);U()}},i(l){if(!i){for(let f=0;f<n.length;f+=1)g(e[f]);i=!0}},o(l){e=e.filter(Boolean);for(let f=0;f<e.length;f+=1)B(e[f]);i=!1},d(l){l&&u(t),re(e,l)}}}function ye(s){let t,i;return t=new He({props:{type:s[10]}}),{c(){se(t.$$.fragment)},l(n){fe(t.$$.fragment,n)},m(n,e){oe(t,n,e),i=!0},p(n,e){const r={};e&17&&(r.type=n[10]),t.$set(r)},i(n){i||(g(t.$$.fragment,n),i=!0)},o(n){B(t.$$.fragment,n),i=!1},d(n){ue(t,n)}}}function Ce(s){let t,i=(s[4].shortname||s[4].name)+"",n;return{c(){t=E("span"),n=H(i),this.h()},l(e){t=D(e,"SPAN",{class:!0});var r=I(t);n=N(r,i),r.forEach(u),this.h()},h(){p(t,"class","")},m(e,r){w(e,t,r),_(t,n)},p(e,r){r&16&&i!==(i=(e[4].shortname||e[4].name)+"")&&G(n,i)},d(e){e&&u(t)}}}function qe(s){let t;function i(r,l){return(r[7].event||r[4]).hidden?Oe:Le}let n=i(s),e=n(s);return{c(){e.c(),t=te()},l(r){e.l(r),t=te()},m(r,l){e.m(r,l),w(r,t,l)},p(r,l){n===(n=i(r))&&e?e.p(r,l):(e.d(1),e=n(r),e&&(e.c(),e.m(t.parentNode,t)))},d(r){e.d(r),r&&u(t)}}}function Le(s){let t,i=(s[7].event||s[4])[(s[7].event||s[4]).shortname?"shortname":"name"]+"",n,e;return{c(){t=E("a"),n=H(i),this.h()},l(r){t=D(r,"A",{href:!0,class:!0});var l=I(t);n=N(l,i),l.forEach(u),this.h()},h(){p(t,"href",e="/"+s[2]+"/"+s[1]+"/"+(s[7].event||s[4]).id),p(t,"class","text-pbw-red hover:underline")},m(r,l){w(r,t,l),_(t,n)},p(r,l){l&17&&i!==(i=(r[7].event||r[4])[(r[7].event||r[4]).shortname?"shortname":"name"]+"")&&G(n,i),l&23&&e!==(e="/"+r[2]+"/"+r[1]+"/"+(r[7].event||r[4]).id)&&p(t,"href",e)},d(r){r&&u(t)}}}function Oe(s){let t=(s[7].event||s[4])[(s[7].event||s[4]).shortname?"shortname":"name"]+"",i,n;return{c(){i=H(t),n=H("*")},l(e){i=N(e,t),n=N(e,"*")},m(e,r){w(e,i,r),w(e,n,r)},p(e,r){r&17&&t!==(t=(e[7].event||e[4])[(e[7].event||e[4]).shortname?"shortname":"name"]+"")&&G(i,t)},d(e){e&&u(i),e&&u(n)}}}function we(s){let t,i=s[7].title+"",n;return{c(){t=H("- "),n=H(i)},l(e){t=N(e,"- "),n=N(e,i)},m(e,r){w(e,t,r),w(e,n,r)},p(e,r){r&1&&i!==(i=e[7].title+"")&&G(n,i)},d(e){e&&u(t),e&&u(n)}}}function Ee(s){let t,i,n=(s[7].event||s[4]).types,e=[];for(let l=0;l<n.length;l+=1)e[l]=De(pe(s,n,l));const r=l=>B(e[l],1,1,()=>{e[l]=null});return{c(){t=E("div");for(let l=0;l<e.length;l+=1)e[l].c();this.h()},l(l){t=D(l,"DIV",{class:!0});var f=I(t);for(let a=0;a<e.length;a+=1)e[a].l(f);f.forEach(u),this.h()},h(){p(t,"class","gap-1 items-center md:ml-2 hidden md:inline-flex text-xs")},m(l,f){w(l,t,f);for(let a=0;a<e.length;a+=1)e[a].m(t,null);i=!0},p(l,f){if(f&17){n=(l[7].event||l[4]).types;let a;for(a=0;a<n.length;a+=1){const h=pe(l,n,a);e[a]?(e[a].p(h,f),g(e[a],1)):(e[a]=De(h),e[a].c(),g(e[a],1),e[a].m(t,null))}for(R(),a=n.length;a<e.length;a+=1)r(a);U()}},i(l){if(!i){for(let f=0;f<n.length;f+=1)g(e[f]);i=!0}},o(l){e=e.filter(Boolean);for(let f=0;f<e.length;f+=1)B(e[f]);i=!1},d(l){l&&u(t),re(e,l)}}}function De(s){let t,i;return t=new He({props:{type:s[10]}}),{c(){se(t.$$.fragment)},l(n){fe(t.$$.fragment,n)},m(n,e){oe(t,n,e),i=!0},p(n,e){const r={};e&17&&(r.type=n[10]),t.$set(r)},i(n){i||(g(t.$$.fragment,n),i=!0)},o(n){B(t.$$.fragment,n),i=!1},d(n){ue(t,n)}}}function ze(s){var e,r;let t,i=(((e=s[7].event)==null?void 0:e.venueName)||((r=s[4])==null?void 0:r.venueName))+"",n;return{c(){t=H("📍 "),n=H(i)},l(l){t=N(l,"📍 "),n=N(l,i)},m(l,f){w(l,t,f),w(l,n,f)},p(l,f){var a,h;f&17&&i!==(i=(((a=l[7].event)==null?void 0:a.venueName)||((h=l[4])==null?void 0:h.venueName))+"")&&G(n,i)},d(l){l&&u(t),l&&u(n)}}}function Fe(s){let t,i,n=(s[7].venues||s[4].venues).map(s[6]).join("<span>, </span>")+"",e;return{c(){t=H("📍 "),i=new Se(!1),e=te(),this.h()},l(r){t=N(r,"📍 "),i=je(r,!1),e=te(),this.h()},h(){i.a=e},m(r,l){w(r,t,l),i.m(n,r,l),w(r,e,l)},p(r,l){l&29&&n!==(n=(r[7].venues||r[4].venues).map(r[6]).join("<span>, </span>")+"")&&i.p(n)},d(r){r&&u(t),r&&u(e),r&&i.d()}}}function Ie(s){var r,l;let t,i,n=(s[7].ecap||((r=s[4])==null?void 0:r.attendees)||((l=s[7].event)==null?void 0:l.attendees))+"",e;return{c(){t=E("div"),i=H("👥 "),e=H(n),this.h()},l(f){t=D(f,"DIV",{class:!0});var a=I(t);i=N(a,"👥 "),e=N(a,n),a.forEach(u),this.h()},h(){p(t,"class","text-lg")},m(f,a){w(f,t,a),_(t,i),_(t,e)},p(f,a){var h,m;a&17&&n!==(n=(f[7].ecap||((h=f[4])==null?void 0:h.attendees)||((m=f[7].event)==null?void 0:m.attendees))+"")&&G(e,n)},d(f){f&&u(t)}}}function Ve(s){var _e,he;let t,i,n,e=ee(new Date(s[7].startTime),"HH:mm")+"",r,l,f=ee(new Date(s[7].endTime),"HH:mm")+"",a,h,m,V,T,q,S,W,le,z,X,ne,j,Y,J,ie,ae,K,d=!s[4]&&ke(s);S=new Ae({props:{item:s[7].event||s[4],width:s[4]?"w-8":"w-10"}});function me(o,c){return!o[4]||o[7].remote?qe:Ce}let Z=me(s),A=Z(s),b=s[7].title&&we(s),v=!s[4]&&!s[7].remote&&Ee(s);function ce(o,c){var C,L,O;if(o[7].venues||(C=o[4])!=null&&C.venues)return Fe;if((L=o[7].event)!=null&&L.venueName||(O=o[4])!=null&&O.venueName)return ze}let M=ce(s),k=M&&M(s),y=(s[7].ecap||((_e=s[4])==null?void 0:_e.attendees)||((he=s[7].event)==null?void 0:he.attendees))&&Ie(s);return{c(){t=E("div"),i=E("div"),n=E("div"),r=H(e),l=H(" - "),a=H(f),h=F(),d&&d.c(),m=F(),V=E("div"),T=E("div"),q=E("a"),se(S.$$.fragment),le=F(),z=E("div"),A.c(),X=F(),b&&b.c(),ne=F(),j=E("div"),v&&v.c(),Y=F(),J=E("div"),k&&k.c(),ie=F(),y&&y.c(),ae=F(),this.h()},l(o){t=D(o,"DIV",{class:!0});var c=I(t);i=D(c,"DIV",{class:!0});var C=I(i);n=D(C,"DIV",{class:!0});var L=I(n);r=N(L,e),l=N(L," - "),a=N(L,f),L.forEach(u),h=P(C),d&&d.l(C),C.forEach(u),m=P(c),V=D(c,"DIV",{class:!0});var O=I(V);T=D(O,"DIV",{class:!0});var $=I(T);q=D($,"A",{href:!0});var de=I(q);fe(S.$$.fragment,de),de.forEach(u),le=P($),z=D($,"DIV",{});var x=I(z);A.l(x),X=P(x),b&&b.l(x),x.forEach(u),$.forEach(u),ne=P(O),j=D(O,"DIV",{class:!0});var Q=I(j);v&&v.l(Q),Y=P(Q),J=D(Q,"DIV",{class:!0});var ve=I(J);k&&k.l(ve),ve.forEach(u),ie=P(Q),y&&y.l(Q),Q.forEach(u),O.forEach(u),ae=P(c),c.forEach(u),this.h()},h(){p(n,"class","text-xl md:w-32 md:text-right"),p(i,"class","flex gap-2"),p(q,"href",W="/"+s[2]+"/"+s[1]+"/"+(s[7].event||s[4]).id),p(T,"class","flex gap-2 items-center my-2 md:my-0"),p(J,"class","text-xl"),p(j,"class","flex flex-wrap gap-2"),p(V,"class","md:flex gap-2 items-center mb-6 md:mb-0"),p(t,"class","md:flex flex-wrap mb-2 gap-3 items-center text-gray-800 border dark:text-gray-200 border-gray-300 rounded-lg md:border-none px-3 py-2 md:px-0 md:py-0")},m(o,c){w(o,t,c),_(t,i),_(i,n),_(n,r),_(n,l),_(n,a),_(i,h),d&&d.m(i,null),_(t,m),_(t,V),_(V,T),_(T,q),oe(S,q,null),_(T,le),_(T,z),A.m(z,null),_(z,X),b&&b.m(z,null),_(V,ne),_(V,j),v&&v.m(j,null),_(j,Y),_(j,J),k&&k.m(J,null),_(j,ie),y&&y.m(j,null),_(t,ae),K=!0},p(o,c){var L,O;(!K||c&1)&&e!==(e=ee(new Date(o[7].startTime),"HH:mm")+"")&&G(r,e),(!K||c&1)&&f!==(f=ee(new Date(o[7].endTime),"HH:mm")+"")&&G(a,f),o[4]?d&&(R(),B(d,1,1,()=>{d=null}),U()):d?(d.p(o,c),c&16&&g(d,1)):(d=ke(o),d.c(),g(d,1),d.m(i,null));const C={};c&17&&(C.item=o[7].event||o[4]),c&16&&(C.width=o[4]?"w-8":"w-10"),S.$set(C),(!K||c&23&&W!==(W="/"+o[2]+"/"+o[1]+"/"+(o[7].event||o[4]).id))&&p(q,"href",W),Z===(Z=me(o))&&A?A.p(o,c):(A.d(1),A=Z(o),A&&(A.c(),A.m(z,X))),o[7].title?b?b.p(o,c):(b=we(o),b.c(),b.m(z,null)):b&&(b.d(1),b=null),!o[4]&&!o[7].remote?v?(v.p(o,c),c&17&&g(v,1)):(v=Ee(o),v.c(),g(v,1),v.m(j,Y)):v&&(R(),B(v,1,1,()=>{v=null}),U()),M===(M=ce(o))&&k?k.p(o,c):(k&&k.d(1),k=M&&M(o),k&&(k.c(),k.m(J,null))),o[7].ecap||(L=o[4])!=null&&L.attendees||(O=o[7].event)!=null&&O.attendees?y?y.p(o,c):(y=Ie(o),y.c(),y.m(j,null)):y&&(y.d(1),y=null)},i(o){K||(g(d),g(S.$$.fragment,o),g(v),K=!0)},o(o){B(d),B(S.$$.fragment,o),B(v),K=!1},d(o){o&&u(t),d&&d.d(),ue(S),A.d(),b&&b.d(),v&&v.d(),k&&k.d(),y&&y.d()}}}function Pe(s){let t,i,n=s[0],e=[];for(let l=0;l<n.length;l+=1)e[l]=Ve(ge(s,n,l));const r=l=>B(e[l],1,1,()=>{e[l]=null});return{c(){t=E("div");for(let l=0;l<e.length;l+=1)e[l].c();this.h()},l(l){t=D(l,"DIV",{class:!0});var f=I(t);for(let a=0;a<e.length;a+=1)e[a].l(f);f.forEach(u),this.h()},h(){p(t,"class","text-2xl")},m(l,f){w(l,t,f);for(let a=0;a<e.length;a+=1)e[a].m(t,null);i=!0},p(l,[f]){if(f&31){n=l[0];let a;for(a=0;a<n.length;a+=1){const h=ge(l,n,a);e[a]?(e[a].p(h,f),g(e[a],1)):(e[a]=Ve(h),e[a].c(),g(e[a],1),e[a].m(t,null))}for(R(),a=n.length;a<e.length;a+=1)r(a);U()}},i(l){if(!i){for(let f=0;f<n.length;f+=1)g(e[f]);i=!0}},o(l){e=e.filter(Boolean);for(let f=0;f<e.length;f+=1)B(e[f]);i=!1},d(l){l&&u(t),re(e,l)}}}function Ge(s,t,i){let{segments:n}=t,{date:e}=t,{col:r="event"}=t,{entry:l}=t,{bundle:f}=t,{event:a=null}=t;for(let m=0;m<n.length;m++){const V=n[m];if(V.remote){console.log(m);const T=f.events.find(S=>S.id===V.remote),q=T.segments.map(S=>Object.assign(S,{event:T,remote:!0}));n.splice(m,q.length,...q)}}console.log(n);const h=m=>{const V=f.places.find(T=>T.id===m);return`<a href="/${l}/place/${V.id}" class="underline hover:no-underline">${V.name}</a>`};return s.$$set=m=>{"segments"in m&&i(0,n=m.segments),"date"in m&&i(5,e=m.date),"col"in m&&i(1,r=m.col),"entry"in m&&i(2,l=m.entry),"bundle"in m&&i(3,f=m.bundle),"event"in m&&i(4,a=m.event)},[n,r,l,f,a,e,h]}class Qe extends Ne{constructor(t){super(),Te(this,t,Ge,Pe,Be,{segments:0,date:5,col:1,entry:2,bundle:3,event:4})}}export{Qe as C};