1import{d as K,X as E,I,r as F,f as e,a,b as _,e as t,t as b,g as y,F as L,i as R,n as k,Y as B,j as M,k as S,c as N,u as J,J as A,h as O,v as W,o as q,M as z,U as Q,K as X,S as D,Z as Y}from"../js/app.main-4c5f2bc8.js";const Z={key:0,class:"event-filter__distance"},G={class:"p-bold"},H=["id","checked","onChange","onKeydown"],ee=["for"],te=K({__name:"DistanceFilter",setup(j){const c=E(),{distanceFilter:r,selectedDistanceFilter:g}=I(c),p=F(!1),d=()=>{p.value=!0},v=l=>{p.value&&(p.value=!1,f(l))},w=l=>{f(l)},f=l=>{var n=new URLSearchParams(window.location.search);l?n.set("g_DistanceCourse",l):n.delete("g_DistanceCourse"),n.delete("page"),window.location.hash="filter",window.location.search=n.toString()};return(l,n)=>e(r)?(a(),_("div",Z,[t("p",G,b(e(y)("sv.filter.type.selecttext")),1),(a(!0),_(L,null,R(e(r)?.options,(o,h)=>(a(),_("div",{key:h,class:k([{"event-filter__radio--checked":o.id===e(g)},{"remote-selected":e(g)==="True"&&o.id===e(g)},"event-filter__radio"])},[t("input",{id:`distance-radio-${h}-btn`,type:"radio",name:"distance",checked:o.id==e(g),onChange:m=>v(o.id),onPointerdown:d,onKeydown:B(M(m=>w(o.id),["prevent"]),["space"])},null,40,H),t("label",{for:`distance-radio-${h}-btn`},b(o.label),9,ee)],2))),128))])):S("",!0)}}),le={key:0,class:"event-filter__show"},se={class:"p-bold"},ae=["id","checked","onChange","onKeydown"],oe=["for"],ne=K({__name:"EventFilter",setup(j){const c=E(),{eventFilter:r,selectedEventFilter:g}=I(c),p=F(!1),d=()=>{p.value=!0},v=l=>{p.value&&(p.value=!1,f(l))},w=l=>{f(l)},f=l=>{var n=new URLSearchParams(window.location.search);l?n.set("g_EventType",l):n.delete("g_EventType"),n.delete("page"),window.location.hash="filter",window.location.search=n.toString()};return(l,n)=>e(r)?(a(),_("div",le,[t("p",se,b(e(y)("sv.filter.showtext")),1),(a(!0),_(L,null,R(e(r)?.options,(o,h)=>(a(),_("div",{key:h,class:k([{"event-filter__radio--checked":o.id===e(g)},"event-filter__radio"])},[t("input",{id:`event-radio-${h}-btn`,type:"radio",name:"event",checked:o.id===e(g),onChange:m=>v(o.id),onPointerdown:d,onKeydown:B(M(m=>w(o.id),["prevent"]),["space"])},null,40,ae),t("label",{for:`event-radio-${h}-btn`},b(o.label),9,oe)],2))),128))])):S("",!0)}}),ie={key:0,class:"event-filter__startdate"},re={class:"p-bold"},ce=["id","checked","onChange","onKeydown"],de=["for"],ue=K({__name:"StartDateFilter",setup(j){const c=E(),{startDateFilter:r,selectedStartDateFilter:g}=I(c),p=F(!1),d=()=>{p.value=!0},v=l=>{p.value&&(p.value=!1,f(l))},w=l=>{f(l)},f=l=>{var n=new URLSearchParams(window.location.search);l?n.set("StartDate",l):n.delete("StartDate"),window.location.hash="filter",window.location.search=n.toString()};return(l,n)=>e(r)?(a(),_("div",ie,[t("p",re,b(e(y)("sv.filter.startdate")),1),(a(!0),_(L,null,R(e(r)?.options,o=>(a(),_("div",{key:o.id,class:k([{"event-filter__radio--checked":o.id===e(g)},"event-filter__radio"])},[t("input",{id:`date-radio-${o.id}Btn`,type:"radio",name:"startdate",checked:o.id==e(g),onChange:h=>v(o.id),onPointerdown:d,onKeydown:B(M(h=>w(o.id),["prevent"]),["space"])},null,40,ce),t("label",{for:`date-radio-${o.id}Btn`},b(o.label),9,de)],2))),128))])):S("",!0)}}),_e={key:0,class:"p-bold"},ve={class:"subject-list"},fe=["onClick"],V=K({__name:"SubjetcsFilterInSearch",props:{showSelected:{type:Boolean},cssClass:{}},setup(j){const c=E(),{categoryFilter:r,selectedCategoryFilter:g}=I(c),p=v=>g.value.includes(v),d=v=>{const w=new URLSearchParams(window.location.search);if(!w.getAll("category").includes(v))w.append("category",v);else{const l=w.getAll("category").filter(n=>n!==v);w.delete("category");for(const n of l)w.append("category",n)}window.location.hash="filter",window.location.search=w.toString()};return(v,w)=>e(r)?(a(),_("div",{key:0,class:k(`event-filter__subjects${v.cssClass?" "+v.cssClass:""}`)},[v.showSelected?S("",!0):(a(),_("p",_e,b(e(y)("sv.filter.subjecttext")),1)),t("ul",ve,[(a(!0),_(L,null,R(v.showSelected?e(r).options?.filter(f=>e(g).includes(f.id)):e(r).options,(f,l)=>(a(),_("li",{key:l,class:k([{"subject-list__item--show-selected":v.showSelected},"subject-list__item "])},[t("button",{class:k([{"subject-list__item-link--selected":p(f.id)},"subject-list__item-link","sub-text"]),onClick:n=>d(f.id)},b(f.label),11,fe)],2))),128))])],2)):S("",!0)}}),he=["aria-expanded","aria-label"],ge={class:"sort-selection"}
1,pe={id:"sort-options",class:"select-list__list"},we=["aria-label","onClick"],ye=["id","checked","onChange","onKeydown"],be=["for"],me=K({__name:"SortList",setup(j){const c=E(),r=N(()=>c.sortItems),g=F(!1),p=F(null),d=()=>{p.value&&clearTimeout(p.value),g.value=!0},v=()=>{p.value=setTimeout(()=>{g.value=!1,h.value=!1},100)},w=F(!1),f=()=>{w.value=!0},l=P=>{w.value&&(w.value=!1,o(P))},n=P=>{o(P)},o=P=>{window.location.href=P},h=F(!1),m=F();return J(m,()=>{h.value&&(h.value=!1)}),(P,x)=>r.value.length>0?(a(),_("div",{key:0,ref_key:"componentRef",ref:m,class:"select-list",onFocusin:d,onFocusout:v},[t("button",{type:"button","aria-expanded":h.value,"aria-label":e(y)("sv.filter.sortby"),"aria-controls":"sort-options",class:k([{"select-list__selected--open":h.value},"select-list__selected","p-bold"]),onClick:x[0]||(x[0]=$=>h.value=!h.value)},[t("strong",null,b(e(y)("sv.filter.sortby")),1),A("Â "),t("span",ge,b(r.value.find($=>$.selected===!0)?r.value.find($=>$.selected===!0)?.text:r.value[0].text),1)],10,he),O(t("ul",pe,[(a(!0),_(L,null,R(r.value,($,T)=>(a(),_("li",{key:T,class:"select-list__list-item","aria-label":($.selected?e(y)("sv.aria.label.clearfilter"):e(y)("sv.aria.label.addfilter"))+" "+$.text,onPointerdown:f,onClick:i=>l($.value)},[t("input",{id:`sort-radio-${T}`,type:"radio",name:"sort-options",checked:$.selected,onChange:i=>l($.value),onPointerdown:f,onKeydown:B(M(i=>n($.value),["prevent"]),["space"])},null,40,ye),t("label",{for:`sort-radio-${T}`},b($.text),9,be)],40,we))),128))],512),[[W,h.value]])],544)):S("",!0)}}),ke=["aria-label"],$e={key:0,class:"select-list__list"},Se={class:"select-list__list-item"},Ce=["placeholder"],Fe={class:"select-list__list-item select-list__header"},Pe=["value","onClick"],Te=["id","onUpdate:modelValue","aria-label"],xe=["for"],De=K({__name:"CityFilter",setup(j){const c=F(!1),r=F(null),g=()=>{r.value&&clearTimeout(r.value),c.value=!0},p=()=>{r.value=setTimeout(()=>{c.value=!1,d.value=!1,f(!1)},100)},d=F(!1),v=F(),w=F(""),f=i=>{localStorage.setItem("cityFilterToggle",JSON.stringify(i))},l=()=>{const i=localStorage.getItem("cityFilterToggle");if(i!==null)d.value=JSON.parse(i);else{const s=window.innerWidth>900;localStorage.setItem("cityFilterToggle",JSON.stringify(s)),d.value=s}},n=()=>
1{if(P.value!=="True")d.value=!d.value,f(d.value);else{const i=document.querySelector(".remote-selected input");i&&(i.classList.add("warn"),setTimeout(()=>{i.classList.remove("warn")},1e3))}};J(v,()=>{d.value&&(d.value=!1,f(d.value))});const o=E(),{cityFilter:h,selectedCityFilter:m,selectedDistanceFilter:P}=I(o),x=N(()=>{const i=h.value.options.filter(C=>C.id!==""&&C.label.toLowerCase().includes(w.value.toLowerCase())).map(C=>({...C,selected:m.value.includes(C.id)})),s=i.filter(C=>C.selected),u=i.filter(C=>!C.selected);return[...s,...u]}),$=i=>{const s=x.value.find(u=>u.id===i);s&&(s.selected=!s.selected,T(i))},T=i=>{const s=m.value.indexOf(i);s===-1?m.value.push(i):m.value.splice(s,1);const u=new URLSearchParams(window.location.search);u.delete("g_PremisesPostalCity"),m.value.forEach(C=>{u.append("g_PremisesPostalCity",C)}),m.value.length===0&&u.delete("g_PremisesPostalCity"),u.delete("page"),window.location.hash="filter",window.location.search=u.toString()};return q(()=>{l()}),(i,s)=>e(h).options?(a(),_("div",{key:0,ref_key:"componentRef",ref:v,class:"event-filter__city"},[t("div",{class:"select-list event-filter__select",onFocusin:g,onFocusout:p},[t("div",{class:k([{"select-list__selected--open":d.value},{"select-list__disabled":e(P)==="True"},"select-list__selected"]),tabindex:"0","aria-label":e(y)("sv.aria.label.togglecityfilter"),onClick:s[0]||(s[0]=u=>n()),onKeydown:s[1]||(s[1]=B(M(u=>n(),["prevent"]),["enter"]))},b(e(m).length===0?e(h).options[0].label:e(m).join(", ")),43,ke),d.value?(a(),_("ul",$e,[t("li",Se,[O(t("input",{"onUpdate:modelValue":s[2]||(s[2]=u=>w.value=u),type:"text",placeholder:e(y)("sv.filter.search.placeholder"),class:"select-list__search"},null,8,Ce),[[z,w.value]])]),t("li",Fe,b(e(y)("sv.filter.city.selecttext")),1),(a(!0),_(L,null,R(x.value,(u,C)=>(a(),_("li",{key:C,value:u.id,class:"select-list__list-item",onClick:U=>$(u.id)},[O(t("input",{id:"option_"+C,"onUpdate:modelValue":U=>u.selected=U,type:"checkbox","aria-label":(u.selected?e(y)("sv.aria.label.clearfilter"):e(y)("sv.aria.label.addfilter"))+u.label},null,8,Te),[[Q,u.selected]]),t("label",{for:"option_"+C},b(u.label),9,xe)],8,Pe))),128))])):S("",!0)],32)],512)):S("",!0)}}),Ke={class:"event-filter__modal-header"},Ee=t("span",{class:"medium-text"},"Filter",-1),je=["aria-expanded","aria-label"],Ie=["aria-expanded","aria-label"],Le={key:0,class:"sub-text"},Re={key:1,class:"sub-text"},Be=["aria-label"],Me={id:"filter-options",class:k(["event-filter__wrap"])},Oe={class:k(["event-filter__modal-footer"])},Ue=["aria-expanded","aria-label"],Ve=["aria-label"],Je=K({__name:"ProductFilter",props:{count:{}},setup(j){const c=F(!1),r=E();q(()=>{window.localStorage.getItem("filterToggle")?c.value=window.localStorage.getItem("filterToggle")==="true":(window.localStorage.setItem("filterToggle",window.innerWidth<=900?"false":"true"),c.value=window.innerWidth>900);const i=window.location.hash;if(i==="#filter"){const s=document.querySelector(i);s&&s.scrollIntoView({behavior:"smooth",block:"start"})}});const g=r.clearFilter,p=()=>{c.value=!c.value,window.localStorage.setItem("filterToggle",c.value.toString())};r.setFilterData();const{categories:d,distanceFilter:v,eventFilter:w,countyFilter:f,startDateFilter:l,cityFilter:n,selectedCountyFilter:o,categoryFilter:h,selectedCityFilter:m,selectedDistanceFilter:P,selectedEventFilter:x,selectedStartDateFilter:$,selectedCategoryFilter:T}=I(r);return(i,s)=>(a(),_("div",{class:k([{"event-filter--open":c.value},"event-filter"])},[t("div",Ke,[t("div",null,[Ee,t("button",{type:"button","aria-expanded":c.value,"aria-label":e(y)("sv.aria.label.clearallfilter"),class:k(["event-filter__close"]),onClick:s[0]||(s[0]=()=>p())},null,8,je)])]),t("div",{class:k(["event-filter__filter-sort",{"search-page":e(d)?.name==="Sökresultat"}])},[t("div",null,[t("button",{type:"button","aria-expanded":c.value,"aria-label":e(y)("sv.aria.label.clearallfilter"),"aria-controls":"filter-options",class:k([{"event-filter__toggle--open":c.value},"event-filter__toggle","p-bold"]),onClick:s[1]||(s[1]=()=>p())}," Filter ",10,Ie)]),e(d)?.name==="Kategorier"?(a(),_("p",Le,[t("strong",null,b(i.count),1),A(" "+b(e(y)("sv.filter.hitstext")),1)])):(a(),_("p",Re)),t("div",null,[X(me)]),t("div",null,[e(T)&&e(T).length>0?(a(),D(V,{key:0,"css-class":"event-filter__subjects--alt","show-selected":!0})):S("",!0),e(d)?.name==="Kategorier"&&(e(o)||e(m)||e(P)||e(x)||e($)||e(T)&&e(T).length>0)?(a(),_("button",{key:1,type:"button","aria-label":e(y)("sv.aria.label.clearallfilter"),class:k(["event-filter__clear","p-bold"]),onClick:s[2]||(s[2]=(...u)=>e(g)&&e(g)(...u))},b(e(y)("sv.filter.clearalltext")),9,Be)):S("",!0)])],2),O(t("div",Me,[t("div",{class:k([{"event-filter__container--open":c.value},"event-filter__container"])},[t("div",null,[e(f)?(a(),D(Y,{key:0})):S("",!0),e(n)?(a(),D(De,{key:1})):S("",!0)]),e(v)?(a(),D(te,{key:0})):S("",!0),e(w)?(a(),D(ne,{key:1})):S("",!0),e(l)?(a(),D(ue,{key:2})):S("",!0)],2),t("div",null,[e(h)?(a(),D(V,{key:0,"show-selected":!1})):S("",!0)]),t("div",Oe,[t("button",{type:"button","aria-expanded":c.value,"aria-label":e(y)("sv.aria.label.clearallfilter"),class:k(["event-filter__show-selection button rounded"]),onClick:s[3]||(s[3]=()=>p())},b(e(y)("sv.filter.showselection"))+" ("+b(i.count)+") ",9,Ue),e(o)||e(m)||e(P)||e(x)||e($)||e(T)&&e(T).length>
10?(a(),_("button",{key:0,type:"button","aria-label":e(y)("sv.aria.label.clearallfilter"),class:k(["event-filter__clear","p-bold","event-filter__sticky"]),onClick:s[4]||(s[4]=(...u)=>e(g)&&e(g)(...u))},b(e(y)("sv.filter.clearalltext")),9,Ve)):S("",!0)])],512),[[W,c.value]])],2))}});export{Je 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.