1import{d as R,v as $,w as g,e as z,o as s,c,b as n,F as w,i as k,f as S,t as m,g as N,r as P,h,n as U,u as A,l as I}from"./app-B5_m4LVx.js";import{_ as D}from"./WeekSelector.vue_vue_type_style_index_0_lang-DJ8UQZm1.js";import{_ as H}from"./EventObject.vue_vue_type_script_setup_true_lang-CPf9YufO.js";import"./arrow-left-DB-UPPJI.js";import"./arrow-right-CCObYt9N.js";import"./main-xPz3p2ow.js";import"./ticket-BS7UtotX.js";import"./clock-Cd9GChno.js";import"./WeekOpenings.vue_vue_type_style_index_0_lang-DzqqMxt_.js";var E=(i=>(i.activity="activity",i.event="event",i))(E||{});const K={class:"c-program"},M={class:"c-program__toolbar"},W={class:"c-program__filters"},q={class:"c-program__types"},G=["onClick"],J={class:"c-program__tags"},Q=["onClick"],T={class:"c-program__events"},X={key:0,class:"c-program__noEvents"},oe=R({__name:"WeekProgram",props:{experiences:{},weeks:{},locale:{},filters:{}},setup(i){const{t:_}=$(),y=i,r=P(),u=P({}),v=P([]),d=h(()=>Object.values(u.value).filter(e=>e.active)),p=h(()=>v.value.filter(e=>e.active)),C=h(()=>{let e=Object.values(y.experiences).filter(a=>a.weeks[r.value]!==void 0);return d.value.length>0&&(e=e.filter(a=>d.value.every(t=>a.tags.hasOwnProperty(t.id)))),p.value.length>0&&(e=e.filter(a=>p.value.some(t=>t.type===a.type))),e}),x=h(()=>d.value.length>0||p.value.length>0?_("noExperiencesFoundFilteredText"):_("noExperiencesFoundText"));function L(e){e.active=!e.active}function b(e){e.active=!e.active}g(d,(e,a)=>{if(e===a)return;if(!e.length){F("tags");return}const o=Object.values(e).map(l=>l.id).join(",");f("tags",o)}),g(p,(e,a)=>{if(e!==a){if(!e.length){F("type");return}f("type",e.map(t=>t.type).join(","))}}),g(r,(e,a)=>{e!==a&&a&&f("week",e)});function F(e){const a=new URL(window.location.href);a.searchParams.delete(e),window.history.replaceState({},"",a)}function f(e,a){const t=new URL(window.location.href);t.searchParams.set(e,a),window.history.replaceState({},"",t)}function j(){const a=new URL(window.location.href).searchParams.get("week"),t=Object.keys(y.weeks);if(a&&t.includes(a)){r.value=a;return}r.value=t[0],f("week",t[0])}function V(){const a=new URL(window.location.href).searchParams.get("type");a&&a.split(",").forEach(o=>{const l=v.value.find(O=>O.type===o);l&&(l.active=!0)})}function B(){const a=new URL(window.location.href).searchParams.get("tags");a&&a.split(",").forEach(o=>{const l=u.value[o];l&&(l.active=!0)})}return z(()=>{u.value=y.filters,v.value=[{title:"Event",type:E.event,active:!1},{title:"Activity",type:E.activity,active:!1}],j(),V(),B()}),(e,a)=>(s(),c("div",K,[n("div",M,[n("div",W,[n("div",q,[(s(!0),c(w,null,k(v.value,t=>(s(),c("div",{key:t.type,class:U(["o-pill o-pill--dot",{active:t.active,"o-pill--event":t.type==="event","o-pill--activity":t.type==="activity"}]),onClick:o=>b(t)},[n("span",null,m(A(_)(t.title.toLowerCase())),1)],10,G))),128))]),n("div",J,[(s(!0),c(w,null,k(u.value,t=>(s(),c("div",{class:U(["o-pill o-pill--outline",{active:t.active}]),onClick:o=>L(t)},[n("span",null,m(t.title),1)],10,Q))),256))])]),S(D,{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=t=>r.value=t),weeks:i.weeks,locale:i.locale},null,8,["modelValue","weeks","locale"])]),n("div",T,[C.value.length===0?(s(),c("div",X,[n("h3",null,m(e.$t("noExperiencesFoundHeading")),1),n("p",null,m(x.value),1)])):N("",!0),(s(!0),c(w,null,k(C.value,t=>(s(),I(H,{key:t.id,event:t,"active-week-key":r.value,format:"compact"},null,8,["event","active-week-key"]))),128))])]))}});export{oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.