PageSourceSearch

https://www.granngarden.se/dist/Component.SearchPage.3e4c06fd.js

js granngarden.se collected 2026-09-24 18:17:37 UTC 26,845 bytes, 1 lines download raw bytes

1"use strict";(self.fkaWebpackJsonp=self.fkaWebpackJsonp||[]).push([[3067],{3107:(e,t,s)=>{s.d(t,{A:()=>i});var r=s(2649);const i=(e,t,s,i)=>{const o={event:"view_search_results",search_term:t,search_type:e,item_search_results:s};return"standard"===e&&i&&(o.item_search_results_is_zero=0===(i.products??0),o.article_search_results_is_zero=0===(i.other??0),o.shop_search_results_is_zero=0===(i.stores??0)),r.V(o)}},3106:(e,t,s)=>{s.r(t),s.d(t,{default:()=>be});var r=s(641);const i={class:"search"};var o=s(3751),a=s(33);const n=["action"],l={class:"search__header",style:{margin:"0 auto 30px",maxWidth:"600px"}},h={class:"sr-only"},c={class:"search__search-wrapper input--small"},u={class:"sr-only search__input-field",for:"search"},p=["name","placeholder"],d={type:"submit",class:"search__button-submit"},g={class:"sr-only"},_={key:0,class:"search-results__category-suggestions"},k={class:"search-results__category-suggestions-label"},y=["href"],v={key:0,class:"search-results__category-suggestion-separator"},f={key:1,class:"search-results"},m={class:"search-results__wrapper"},C={key:0,class:"search-results__facets"},b={key:1,class:"search-results__tags-container"},S={key:0,class:"search-results__filter-tags"},w=["onClick"],L={key:1,class:"sort"},F={class:"sr-only",for:"search-results-sort"},E=["value"],X={key:0,class:"search-results__heading"},M={class:"search-results__query"},Q={key:1,class:"search-results__no-hits"},H={class:"search-results__no-hits-message"},T={class:"search-results__did-you-mean-label"},A={class:"search-results__autocompletes"},x=["href","onClick"],I=["href","onClick"],O={key:1,class:"search-results__zero-results-products product-grid product-grid--four-column"},R={class:"search-results__zero-results-products-title h3"},V={key:1},$={key:3,class:"search-results__pagination"},P={class:"search-results__page"},z={class:"search-results__loading",src:"/UI/Icons/loading.svg",alt:""};function N(e){return null==e?e:e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}var K=s(4324),D=s(463),q=s(1724),Y=s(2577),W=s(7258),j=s(5052);const U={class:"article-teaser article-teaser--ingress article-teaser--editorial-search-result"},B=["href","aria-label"],J=["src","alt"],G={class:"article-teaser__content"},Z={class:"article-teaser__heading"},ee=["href"],te=["datetime"],se={key:1,class:"article-teaser__ingress"},re={key:2,class:"article-teaser__tags"},ie=["href"],oe={key:1};const ae=(0,r.pM)({name:"EditorialSearchResult",mixins:[(0,K.m)()],props:{id:Number,heading:String,link:String,image:Object,date:String,mainIntro:String,tags:Object,ticket:String},methods:{formatDate(e){const t=new Date(e);return t.getDay()+"/"+(t.getMonth()+1)+"/"+t.getFullYear()},clickNotification(){}}});var ne=s(6262);const le=(0,ne.A)(ae,[["render",function(e,t,s,i,o,n){return(0,r.uX)(),(0,r.CE)("article",U,[e.image&&e.image.link&&(e.mainIntro||e.tags||e.date)?((0,r.uX)(),(0,r.CE)("a",{key:0,href:e.link,"aria-label":`${e.translate("readMoreAbout")} ${e.heading}`,class:"article-teaser__image",onClick:t[0]||(t[0]=(...t)=>e.clickNotification&&e.clickNotification(...t))},[(0,r.Lk)("picture",null,[(0,r.Lk)("img",{src:e.image.link,alt:e.image.alternateText,width:"150",height:"150"},null,8,J)])],8,B)):(0,r.Q3)("",!0),(0,r.Lk)("article",G,[(0,r.Lk)("h2",Z,[(0,r.Lk)("a",{href:e.link,class:"link"},(0,a.v_)(e.heading),9,ee)]),e.date?((0,r.uX)(),(0,r.CE)("time",{key:0,datetime:e.date,class:"article-teaser__time"},(0,a.v_)(e.formatDate(e.date)),9,te)):(0,r.Q3)("",!0),e.mainIntro?((0,r.uX)(),(0,r.CE)("p",se,(0,a.v_)(e.mainIntro),1)):(0,r.Q3)("",!0),e.tags?((0,r.uX)(),(0,r.CE)("ul",re,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.tags,((e,t)=>((0,r.uX)(),(0,r.CE)("li",{class:"article-teaser__tag",key:t},[e?((0,r.uX)(),(0,r.CE)("a",{key:0,href:e},(0,a.v_)(t),9,ie)):(0,r.Q3)("",!0),e?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("span",oe,(0,a.v_)(t),1))])))),128))])):(0,r.Q3)("",!0)])])}]]);var he=s(9901),ce=s(8857),ue=s(6327);const pe=["products","stores","other","spareparts"],de=(0,r.pM)({name:"SearchResults",mixins:[(0,K.m)()],emits:["facets-change"],components:{Alert:W.default,Facets:D.A,ProductCard:q.default,StoreListStore:Y.A,EditorialSearchResult:le,Icon:j.A},props:{action:String,locale:String,googleMapsApiKey:String,response:Object,isFetching:Boolean,loadMore:Function,search:Function,query:String,searchFor:Function,initialView:String,parameters:Object,sort:Array,attributionToken:String},data(){return{searchValue:this.query||"",isMounted:!1,isCategoriesOpe
1n:!1,view:this.initialView,error:null,loadedProducts:this.response?.products?.hits.length??0,activeSort:this.sort?.some((e=>e.selected))?this.sort?.find((e=>e.selected))?.id:this.sort?.find((e=>e.isDefault))?.id,observer:null,infiniteScroll:!0,debounceTimer:null}},watch:{sort(){this.sort?.find((e=>e.id===this.activeSort))||(this.activeSort=this.sort?.find((e=>e.isDefault))?.id)},activeSort(){const{$refs:e}=this,t=e.facets;this.search&&this.search(t?.value,null,this.activeSort,this.searchValue)},response(e,t){const s=e?.query!==t?.query;this.view=this.getPreferredView({preserveCurrentView:!s}),this.hasSearchQuery&&0===this.hitCount&&s&&(0,ue.V)({searchQuery:this.searchValue,products:[],offset:0,attributionToken:this.attributionToken||""})},products(e,t){if(!this.response||!this.$store||!Array.isArray(e))return;let s=e;Array.isArray(t)&&t.length&&this.page>1&&this.loadedProducts<this.hitCount&&0!==this.loadedProducts&&(s=e.filter((e=>!t.includes(e)))),(0,he.aK)(this.$store,{listName:this.translate("listName")??"search",products:s,indexOffset:Math.max(0,this.pageOffset)}),this.hasSearchQuery&&s.length&&(0,ue.V)({searchQuery:this.searchValue,products:s,offset:Math.max(0,this.pageOffset),attributionToken:this.attributionToken||""}),this.loadedProducts+=s.length},showLoadMore(){this.observeLoadMore()}},computed:{pageOffset(){return this.response&&this.response.pageSize?(this.page-1)*this.response.pageSize:0},hasSearchQuery(){return"string"==typeof this.searchValue&&""!==this.searchValue.trim()},hasSortChanged(){return!!this.sort?.find((e=>e.id!==this.activeSort))?.isDefault},facets(){return this.view&&this.response?this.response[this.view]?.facets:[]},didYouMean(){return this.noHits?this.response?.didYouMean:this.view&&this.response?this.response[this.view]?.didYouMean:[]},hits(){return pe.filter((e=>!!this.response&&(this.response[e]?.hitCount||this.response[e]?.facets?.length)))},products(){return this.response&&"products"===this.view?this.response.products.hits:null},stores(){return this.response&&"stores"===this.view?this.response.stores.hits:null},other(){return this.response&&"other"===this.view?this.response.other?.hits:null},noHits(){return 0===this.hits.length&&this.hasSearchQuery},zeroResultsSuggestions(){return this.response?.zeroResultsSuggestions??null},filteredAutocomplete(){const e=this.zeroResultsSuggestions?.autocomplete??[];if(!this.didYouMean?.length)return e;const t=new Set(this.didYouMean);return e.filter((e=>!t.has(e)))},toggles(){const{hits:e,response:t}=this;return e.map((e=>({type:e,hitCount:t?.[e]?.hitCount??0})))},categorySuggestions(){return this.response?.categorySuggestions??[]},hitCount(){if(!this.response)return 0;const{products:e,stores:t,other:s,spareparts:r}=this.response;switch(this.view){case"products":return e.hitCount??0;case"stores":return t.hitCount??0;case"other":return s?.hitCount??0;case"spareparts":return r?.hitCount??0;default:return 0}},pagination(){return this.page<this.pages},page:{get(){if(!this.response)return 0;const{products:e,stores:t,other:s,spareparts:r}=this.response;switch(this.view){case"products":return e.page??1;case"stores":return t.page??1;case"other":return s?.page??1;case"spareparts":return r?.page??1;default:return 1}},set(e){if(!this.response)return 0;const{products:t,stores:s,other:r,spareparts:i}=this.response;switch(this.view){case"products":return t.page=e;case"stores":return s.page=e;case"other":if(r)return r.page=e;case"spareparts":if(i)return i.page=e;default:return 1}}},pages(){return!this.response||this.response.pageSize<=0?0:Math.ceil(this.hitCount/this.response.pageSize)},searchPhrase(){return N(this.response?.query)??""},showLoadMore(){return!this.isFetching&&(this.hitCount??0)>(this.products?.length??0)}},methods:{handleSearch(){this.handleResetSort(),this.$nextTick((()=>{this.search&&this.search(null,null,null,this.searchValue)}))},handleSuggestionClick(e,t){this.searchValue=e,(0,ue.V)({searchQuery:e,products:[],offset:0,attributionToken:this.attributionToken||"",completionDetail:{completionAttributionToken:this.attributionToken||"",selectedSuggestion:e,selectedPosition:t}}),this.searchFor&&this.searchFor(e)},onFacetsChange(e){this.search&&this.search(e,null,this.activeSort,this.searchValue)},updateSort(e){this.activeSort=e},handleResetFilter(){if(!this.facets)return;const e=this.response?.products?.facets.map((e=>(e.values=e.values?.map((e=>({...e,selected:!1}))),e)));(0,ce.gR)(e),this.$nextTick((()=>{this.search&&this.search(null,null,null,this.searchValue)}))},handleResetSort(){this.activeSort=this.sort?.find((e=>e.isDefault))?.id},getPreferredView({preserveCurrentView:e=!0}={}){return e&&this.view&&this.hits.includes(this.view)?(this.page=1,this.view):this.hits[0]?this.hits[0]:null},nextPage(){null!==this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((async()=>{const{$refs:e,view:t,loadMore:s,page:r}=this,i=e.facets;if(t)try{s&&await s(t,r+1,i?.value??"","",this.activeSort??"",this.searchValue),this.error=null}catch(e){this.error={message:this.translate("errorOccuredFetchingPage"),type:"scroll"},console.error(e)}}),250)},observeLoadMore(){!this.showLoadMore||!this.infiniteScroll||this.page>=3?this.page>=3&&(this.infiniteScroll=!1):this.$nextTick((()=>{this.$refs["load-more"]&&this.observer?.observe(this.$refs["load-more"])}))}},mounted(){this.$nextTick((()=>{this.isMounted=!0,"IntersectionObserver"in window&&(this.observer||(this.observer=new IntersectionObserver((e=>{for(let t=0;t<e.length;t++){const s=e[t];s.intersectionRatio>0&&(this.observer?.unobserve(s.target),this.nextPage())}}),{rootMargin:"200px 0px",threshold:.01})),this.observeLoadMore())})),this.hasSearchQuery&&0===this.hitCount&&(0,ue.V)({searchQuery:this.searchValue,products:[],offset:M
1ath.max(0,this.pageOffset),attributionToken:this.attributionToken||""}),Array.isArray(this.products)&&this.products.length>0&&this.$store&&(0,he.aK)(this.$store,{listName:this.translate("listName")??"search",products:this.products})},created(){this.view=this.getPreferredView()}}),ge=(0,ne.A)(de,[["render",function(e,t,s,i,N,K){const D=(0,r.g2)("icon"),q=(0,r.g2)("facets"),Y=(0,r.g2)("product-card"),W=(0,r.g2)("store-list-store"),j=(0,r.g2)("EditorialSearchResult"),U=(0,r.g2)("alert");return(0,r.uX)(),(0,r.CE)("form",{action:e.action,onSubmit:t[3]||(t[3]=(0,o.D$)(((...t)=>e.handleSearch&&e.handleSearch(...t)),["prevent"]))},[(0,r.Lk)("div",l,[(0,r.Lk)("h1",h,(0,a.v_)(e.translate("search")),1),(0,r.Lk)("div",c,[(0,r.Lk)("label",u,(0,a.v_)(e.translate("label")),1),(0,r.bo)((0,r.Lk)("input",{"onUpdate:modelValue":t[0]||(t[0]=t=>e.searchValue=t),class:"search__input",id:"search",type:"text",name:e.parameters&&e.parameters.search,placeholder:e.translate("placeholder")},null,8,p),[[o.Jo,e.searchValue]]),(0,r.Lk)("button",d,[(0,r.Lk)("span",g,(0,a.v_)(e.translate("search")),1),(0,r.bF)(D,{height:"24",width:"24",icon:"search-light"})])])]),e.categorySuggestions?.length?((0,r.uX)(),(0,r.CE)("div",_,[(0,r.Lk)("span",k,(0,a.v_)(e.translate("categories"))+": ",1),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.categorySuggestions,((t,s)=>((0,r.uX)(),(0,r.CE)(r.FK,{key:t.link},[(0,r.Lk)("a",{href:t.link,class:"search-results__category-suggestion-link"},(0,a.v_)(t.text),9,y),s<e.categorySuggestions.length-1?((0,r.uX)(),(0,r.CE)("span",v,", ")):(0,r.Q3)("",!0)],64)))),128))])):(0,r.Q3)("",!0),e.response?((0,r.uX)(),(0,r.CE)("div",f,[(0,r.Lk)("div",m,[e.facets?.length?((0,r.uX)(),(0,r.CE)("div",C,[(0,r.bF)(q,{sort:e.sort,facets:e.facets,onChange:e.onFacetsChange,isFetching:e.isFetching,onHandleResetFilter:e.handleResetFilter,lang:e.translate("facets"),ref:"facets",onActiveSort:e.updateSort,onResetSort:e.handleResetSort,"has-sort-changed":e.hasSortChanged,"active-sort":e.activeSort,"active-sort-text":e.sort?.find((t=>t.id===e.activeSort))?.text},null,8,["sort","facets","onChange","isFetching","onHandleResetFilter","lang","onActiveSort","onResetSort","has-sort-changed","active-sort","active-sort-text"])])):(0,r.Q3)("",!0),e.hits?.length||e.facets?.length?((0,r.uX)(),(0,r.CE)("section",b,[e.hits.length?((0,r.uX)(),(0,r.CE)("div",S,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.toggles,(t=>((0,r.uX)(),(0,r.CE)("button",{onClick:(0,o.D$)((s=>e.view=t.type),["prevent"]),class:(0,a.C4)(["search-results__view",{"search-results__view--selected":t.type===e.view}]),key:t.type,type:"button"},(0,a.v_)(e.translate(t.type))+" ("+(0,a.v_)(t.hitCount)+") ",11,w)))),128))])):(0,r.Q3)("",!0),e.facets?.length?((0,r.uX)(),(0,r.CE)("div",L,[(0,r.Lk)("label",F,(0,a.v_)(e.translate("sort")),1),e.sort?(0,r.bo)(((0,r.uX)(),(0,r.CE)("select",{key:0,name:"sort","onUpdate:modelValue":t[1]||(t[1]=t=>e.activeSort=t),id:"search-results-sort"},[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.sort,(e=>((0,r.uX)(),(0,r.CE)("option",{key:e.id,value:e.id},(0,a.v_)(e.text),9,E)))),128))],512)),[[o.u1,e.activeSort]]):(0,r.Q3)("",!0),(0,r.bF)(D,{height:"20px",width:"20px",icon:"sort"})])):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0),(0,r.Lk)("div",{class:(0,a.C4)(["search-results__content",{"search-results__content--hits":e.hits.length}])},[e.searchPhrase?((0,r.uX)(),(0,r.CE)("h1",X,[(0,r.eW)((0,a.v_)(e.translate("youSearchedFor"))+" ",1),(0,r.Lk)("span",M,'"'+(0,a.v_)(e.searchPhrase)+'"',1)])):(0,r.Q3)("",!0),e.noHits||e.zeroResultsSuggestions?((0,r.uX)(),(0,r.CE)("div",Q,[(0,r.Lk)("p",H,[(0,r.eW)((0,a.v_)(e.translate("noHitsFor"))+" ",1),(0,r.Lk)("strong",null,'"'+(0,a.v_)(e.searchValue)+'"',1)]),e.didYouMean&&e.didYouMean.length||e.filteredAutocomplete?.length?((0,r.uX)(),(0,r.CE)("div",{key:0,class:(0,a.C4)(["search-results__did-you-mean",{"search-results__did-you-mean--center":e.noHits}])},[(0,r.Lk)("strong",T,(0,a.v_)(e.translate("didYouMean"))+":",1),(0,r.Lk)("ul",A,[e.filteredAutocomplete?.length&&!e.didYouMean?.length?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(e.filteredAutocomplete,((t,s)=>((0,r.uX)(),(0,r.CE)("li",{key:t},[(0,r.Lk)("a",{href:`?${e.parameters&&e.parameters.search}=${encodeURIComponent(t)}`,class:"search-results__autocomplete-link link",onClick:(0,o.D$)((r=>e.handleSuggestionClick(t,s+1)),["prevent"])},(0,a.v_)(t),9,x)])))),128)):(0,r.Q3)("",!0),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.didYouMean,((t,s)=>((0,r.uX)(),(0,r.CE)("li",{key:t},[(0,r.Lk)("a",{href:`?${e.parameters&&e.parameters.search}=${encodeURIComponent(t)}`,onClick:(0,o.D$)((r=>e.handleSuggestionClick(t,s+1)),["prevent"]),class:"link link--underline-primary"},(0,a.v_)(t),9,I)])))),128))])],2)):(0,r.Q3)("",!0),e.zeroResultsSuggestions?.products?((0,r.uX)(),(0,r.CE)("div",O,[(0,r.Lk)("h2",R,(0,a.v_)(e.translate("zeroResultsProducts")),1),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.zeroResultsSuggestions.products,((t,s)=>((0,r.uX)(),(0,r.CE)("div",{key:t.productNumber,class:"search-results__zero-results-product"},[(0,r.bF)(Y,(0,r.v6)({ref_for:!0},t,{attributionToken:e.attributionToken,variant:5,hasFetchedPriority:0===s,lang:e.translate("productCard"),listName:e.translate("listName"),listIndex:s,headingLevel:"h2"}),null,16,["attributionToken","hasFetchedPriority","lang","listName","listIndex"])])))),128))])):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0),e.products||e.stores||e.other?((0,r.uX)(),(0,r.CE)("ul",{key:2,class:(0,a.C4)(["search-results__hits","search-results__hits--"+e.view])},[e.products?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:0},(0,r.pI)(e.products,((t,s)=>((0,r.uX)(),(0,r.CE)("li",{key:t.productNumber},[(0,r.bF)(Y,(0,r.v6)({ref_for:!0},t,{attributionToken:e.attributionToken,variant:5,hasFetchedPriority:0===s,lang:e.translate("productCard"),listName:e.translate("listName"),listIndex:s,headingLevel:"h2"}),null,16,["attributionToken","hasFetchedPriority","lang","listName","listIndex"])])))),128)):(0,r.Q3)("",!0),e.stores?((0,r.uX)(),(0,r.CE)("li",V,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.stores,(t=>
1((0,r.uX)(),(0,r.Wv)(W,(0,r.v6)({key:t.storeId,ref_for:!0},t,{locale:e.locale,googleMapsApiKey:e.googleMapsApiKey,lang:e.translate("store"),showMap:!1}),null,16,["locale","googleMapsApiKey","lang"])))),128))])):(0,r.Q3)("",!0),e.other?((0,r.uX)(!0),(0,r.CE)(r.FK,{key:2},(0,r.pI)(e.other,(t=>((0,r.uX)(),(0,r.CE)("li",{class:"search-results__hit search-results__hit--content",key:t.id},[(0,r.bF)(j,(0,r.v6)({ref_for:!0},t,{lang:e.translate("editorialSearchResult")}),null,16,["lang"])])))),128)):(0,r.Q3)("",!0)],2)):(0,r.Q3)("",!0),!e.isFetching&&e.pagination?((0,r.uX)(),(0,r.CE)("div",$,[e.error&&"scroll"===e.error.type?((0,r.uX)(),(0,r.Wv)(U,{key:0,class:"product-list__alert",message:e.error.message},null,8,["message"])):(0,r.Q3)("",!0),(0,r.Lk)("p",P,(0,a.v_)(e.translateFormat([e.page,e.pages],"showingPageXofY")),1),e.showLoadMore?((0,r.uX)(),(0,r.CE)("button",{key:1,type:"button",class:"button button--secondary button--small",onClick:t[2]||(t[2]=(0,o.D$)(((...t)=>e.nextPage&&e.nextPage(...t)),["prevent"])),ref:"load-more"},(0,a.v_)(e.translate("showMoreHits")),513)):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0),(0,r.bo)((0,r.Lk)("img",z,null,512),[[o.aG,e.isFetching]])],2)])])):(0,r.Q3)("",!0)],40,n)}]]),_e=ge;var ke=s(6663),ye=s(5094),ve=s(7985),fe=s(2543),me=s(3107);const Ce=(0,r.pM)({name:"SearchPage",mixins:[(0,K.m)()],components:{SearchResults:_e},props:{parameters:Object,initialSearchResponse:Object,sortModel:Array,action:String},data:()=>({abortController:"undefined"!=typeof AbortController?new AbortController:null,fetching:{suggestions:!1,response:!1},autocomplete:null,suggestions:null,response:null,value:"",facetString:"",categoryString:"",sortString:"",attributionToken:""}),methods:{updateSort(e){this.sortString=e},debouncedSeach(){},async search(e,t,s,r=""){this.abortController?.abort(),this.fetching.response=!0;try{this.abortController=new AbortController;const i=await ve.A.get("/api/search",{query:{query:r,facets:"string"==typeof e?e:void 0,categories:"string"==typeof t?t:void 0,sort:"string"==typeof s?s:void 0,attributionToken:this.attributionToken||void 0},signal:this.abortController?.signal}),o=await i.json();this.abortController=null,this.response=o,this.updateHistory(r,"string"==typeof e?e:void 0,"string"==typeof t?t:void 0,void 0,"string"==typeof s?s:void 0),o.attributionToken?this.attributionToken=o.attributionToken:this.attributionToken="",r&&(0,me.A)("standard",r,o.products?.hitCount||0,{products:o.products?.hitCount??0,other:o.other?.hitCount??0,stores:o.stores?.hitCount??0}),this.autocomplete=null,this.suggestions=null}catch(e){ye.z(e)}finally{this.fetching.response=!1}this.fetching.response=!1},async loadMore(e,t,s,r,i,o=""){this.abortController?.abort(),this.fetching.response=!0;try{const a=await ve.A.get(`/api/search/${e}`,{query:{query:o,facets:s,categories:r,page:t,sort:i}}),n=await a.json();if(n&&this.response){const{hits:a,...l}=n;this.response[e]={...l,hits:(this.response[e]?.hits??[]).concat(a)},this.updateHistory(o,s,r,t,i)}this.fetching.response=!1}catch(e){throw this.fetching.response=!1,ye.z(e),new Error(e)}finally{this.fetching.response=!1}},updateHistory(e,t,s,r,i){"undefined"!=typeof window&&"replaceState"in window.history&&(window.history.replaceState("","",`?${this.stringifyQueryParameters(e,t,s,r,i)}`),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"search",searchTerm:e}))},stringifyQueryParameters(e,t,s,r,i){return this.parameters?ke.stringify({[this.parameters.search]:e,[this.parameters.facets]:t,[this.parameters.categories]:s,[this.parameters.page]:r,[this.parameters.sort]:i}):null},handleFacetsChange(e,t,s){"string"==typeof e&&(this.facetString=e,this.sortString=s||this.sortString||"",this.categoryString=this.categoryString||t||"",this.search(e,this.categoryString.length>0?this.categoryString:null,this.sortString.length>0?this.sortString:null))},searchFor(e){this.value=e,this.search(null,null,null,this.value)}},mounted(){this.value.trim().length>1&&(0,me.A)("standard",this.value,this.response?.products?.hitCount||0,{products:this.response?.products?.hitCount??0,other:this.response?.other?.hitCount??0,stores:this.response?.stores?.hitCount??0})},created(){this.initialSearchResponse&&(this.response=this.initialSearchResponse,this.value=N(this.initialSearchResponse.query)??"",this.attributionToken=this.initialSearchResponse.attributionToken,this.debouncedSeach=(0,fe.debounce)(this.search,150))}}),be=(0,ne.A)(Ce,[["render",function(e,t,s,o,a,n){const l=(0,r.g2)("search-results");return(0,r.uX)(),(0,r.CE)("div",i,[(0,r.bF)(l,{response:e.response,lang:e.translate("searchResults"),onFacetsChange:e.handleFacetsChange,isFetching:e.fetching.response,loadMore:e.loadMore,parameters:e.parameters,searchFor:e.searchFor,search:e.debouncedSeach,sort:e.sortModel,"update-sort":e.updateSort,action:e.action,query:e.value,attributionToken:e.attributionToken},null,8,["response","lang","onFacetsChange","isFetching","loadMore","parameters","searchFor","search","sort","update-sort","action","query","attributionToken"])])}],["__scopeId","data-v-0d686b8c"]])},2577:(e,t,s)=>{s.d(t,{A:()=>R});var r=s(641),i=s(33);const o={class:"store-list-store"},a={class:"store-list-store__inner-wrapper"},n={class:"store-list-store__info"},l={class:"h4 store-list-store__heading"},h=["href"],c={class:"store-list-store__contact"},u={class:"store-list-store__contact--adress"},p={class:"store-list-store__contact--adress"},d={class:"store-list-store__contact--map-link"},g=["href"],_={key:0,class:"store-list-store__contact--phone"},k=["href"],y={key:1,class:"store-list-store__contact--email"},v=["href"],f={key:0},m={class:"alert alert--info false"},C={class:"alert__icon"},b={class:"alert__message store-list-store__temporarily-closed-message"},S=["aria-expanded"],w={class:"store-list-store__show-opening-hours--text"},L={class:"store-list-store__opening-hours-heading"},F={class:"store-list-store__opening-hours--standard"},E={key:0,class:"sr-only"},X={class:"store-list-store__opening-hours-value"},M={key:0,class:"store-list-store__opening-hours--holidays"},Q={key:0},H={class:"store-list-store__opening-hours-value"};var T=s(8857);const A=(0,r.pM)({methods:{notEmpty:T.z2}});var x=s(4324),I=s(5052);const O=(0,r.pM)({name:"StoreListStore",mixins:[(0,x.m)(),A],components:{Icon:I.A},props:{storeId:String,storeName:String,address:String,zipCode:String,city:String,email:String,google:String,latitude:Number,longitude:Number,openingHours:Object,specialOpeningHours:Object,phone:String,link:String,locale:String,googleMapsApiKey:String,details:Boolean,showMap:{type:Boolean,default:!0}},data:()=>({showOpeningHours:!1}),computed:{distance:()=>null,mapLink(){const{address:e,city:t,google:s,zipCode:r}=this,i=encodeURI(`${e} ${r} ${t}`);return s??`//google.com/maps/search/${i}`},hasCoordinates(){return!(!this.latitude||!this.longitude)}},methods:{isClosedOpeningHour:e=>!!e&&/closed|stangt|stängt|stengt/i.test(e)}});const R=(0,s(6262).A)(O,[["render",function(e,t,s,T,A,x){const I=(0,r.g2)("Icon"),O=(0,r.g2)("icon");return(0,r.uX)(),(0,r.CE)("article",o,[(0,r.Lk)("div",a,[(0,r.Lk)("div",n,[(0,r.Lk)("h2",l,[(0,r.Lk)("a",{href:e.link,class:"link"},(0,i.v_)(e.storeName),9,h),(0,r.bF)(I,{icon:"arrow-right-light",he
1ight:"16",width:"14"})]),(0,r.Lk)("ul",c,[(0,r.Lk)("li",u,(0,i.v_)(e.address),1),(0,r.Lk)("li",p,(0,i.v_)(e.zipCode)+" "+(0,i.v_)(e.city),1),(0,r.Lk)("li",d,[(0,r.Lk)("a",{class:"link",href:e.mapLink,target:"_blank",rel:"noopener"},[(0,r.bF)(O,{icon:"location",height:"20",width:"20"}),(0,r.eW)(" "+(0,i.v_)(e.translate("map")),1)],8,g)]),e.phone?((0,r.uX)(),(0,r.CE)("li",_,[(0,r.Lk)("a",{href:"tel:"+e.phone,class:"link"},[(0,r.bF)(O,{icon:"phone",height:"20",width:"20"}),(0,r.eW)(" "+(0,i.v_)(e.phone),1)],8,k)])):(0,r.Q3)("",!0),e.email?((0,r.uX)(),(0,r.CE)("li",y,[(0,r.Lk)("a",{href:"mailto:"+e.email,class:"link"},[(0,r.bF)(O,{icon:"email",height:"20",width:"20"}),(0,r.eW)(" "+(0,i.v_)(e.email),1)],8,v)])):(0,r.Q3)("",!0)])]),e.openingHours&&e.openingHours.isTemporarilyClosed?((0,r.uX)(),(0,r.CE)("div",f,[(0,r.Lk)("div",m,[(0,r.Lk)("div",C,[(0,r.bF)(O,{icon:"alert",height:"20",width:"20"})]),(0,r.Lk)("span",b,(0,i.v_)(e.translate("temporarilyClosed")),1)])])):(0,r.Q3)("",!0),!e.showOpeningHours&&e.openingHours&&e.notEmpty(e.openingHours.days)?((0,r.uX)(),(0,r.CE)("button",{key:1,onClick:t[0]||(t[0]=t=>e.showOpeningHours=!0),type:"button","aria-expanded":e.showOpeningHours?"true":"false","aria-controls":"opening-hours",class:"store-list-store__show-opening-hours"},[e.showOpeningHours?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.Wv)(I,{key:0,icon:"clock2",class:"store-list-store__clock-icon",height:"20",width:"20"})),(0,r.Lk)("span",w,(0,i.v_)(e.translate("openingHours")),1),(0,r.bF)(I,{class:"store-list-store__show-opening-hours--caret-icon",icon:"caret-up",width:"12",height:"12"})],8,S)):(0,r.Q3)("",!0),e.openingHours&&!e.openingHours.isTemporarilyClosed&&e.notEmpty(e.openingHours.days)?((0,r.uX)(),(0,r.CE)("div",{key:2,class:(0,i.C4)(["store-list-store__opening-hours",{"store-list-store__opening-hours--open":e.showOpeningHours}]),id:"opening-hours"},[(0,r.Lk)("h3",L,[(0,r.bF)(I,{icon:"clock2",class:"store-list-store__clock-icon",height:"20",width:"20"}),(0,r.Lk)("span",null,(0,i.v_)(e.translate("openingHours")),1)]),(0,r.Lk)("table",F,[e.openingHours.caption?((0,r.uX)(),(0,r.CE)("caption",E,(0,i.v_)(e.openingHours.caption),1)):(0,r.Q3)("",!0),(0,r.Lk)("tbody",null,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.openingHours.days,(t=>((0,r.uX)(),(0,r.CE)("tr",{key:t.date,class:(0,i.C4)({"store-list-store__today":t.active,"is-special":t.isSpecialOpeningHour,"store-list-store__opening-hours-row--closed":e.isClosedOpeningHour(t.openingHours)})},[(0,r.Lk)("td",null,(0,i.v_)(t.date),1),(0,r.Lk)("td",null,[(0,r.Lk)("strong",null,(0,i.v_)(t.dayNameShort),1)]),(0,r.Lk)("td",X,(0,i.v_)(t.openingHours),1)],2)))),128))])]),e.specialOpeningHours&&e.notEmpty(e.specialOpeningHours.days)?((0,r.uX)(),(0,r.CE)("table",M,[e.specialOpeningHours.caption?((0,r.uX)(),(0,r.CE)("caption",Q,(0,i.v_)(e.specialOpeningHours.caption),1)):(0,r.Q3)("",!0),(0,r.Lk)("tbody",null,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(e.specialOpeningHours.days,(t=>((0,r.uX)(),(0,r.CE)("tr",{key:t.date,class:(0,i.C4)({"store-list-store__today":t.active,"store-list-store__opening-hours-row--closed":e.isClosedOpeningHour(t.openingHours)})},[(0,r.Lk)("td",null,(0,i.v_)(t.date),1),(0,r.Lk)("td",null,(0,i.v_)(t.dayName),1),(0,r.Lk)("td",H,(0,i.v_)(t.openingHours),1)],2)))),128))])])):(0,r.Q3)("",!0)],2)):(0,r.Q3)("",!0)])])}]])}}]);

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.