PageSourceSearch

https://www.lovisa.co.uk/cdn/shop/t/811/assets/tagalys-script.js?v=9019566175155535201789977862

js lovisa.co.uk collected 2026-09-26 13:25:33 UTC 86,306 bytes, 802 lines download raw bytes

1const searchThreshold=window.theme.gtmSearchThreshold||2,searchDelay=window.theme.gtmSearchDelayMS||1200;let viewSearchDataLayerDelay,viewItemListDataLayerDelay,clickSortOptionDataLayerDelay,TagalysCustomisations={};const viewSearchResultsDataLayerEvent=(helpers,productCardSelector)=>{viewSearchDataLayerDelay&&clearTimeout(viewSearchDataLayerDelay);const{getEnteredSearchQuery,getQuery,getAPIResponse,getProducts}=helpers,count=getProducts().length,viewSearchResultsActionEvent=()=>{let query;if(getEnteredSearchQuery)query=getEnteredSearchQuery();else if(getQuery)query=getQuery();else return;if(query.length<searchThreshold)return;const promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}"),menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"search_results_action",menu_navigation_state:menuNavigationState,ecommerce:promotionEvent,interaction_type:"View Search Results",search_result_state:{search_type:"productSearch",result_count:count,search_term:query.toLowerCase()}},"search_result_state")},viewItemListEvent=(skusComingIntoView=[])=>{const viewItemListSearchEvent=(itemList=[])=>{itemList.length&&(viewItemListDataLayerDelay&&clearTimeout(viewItemListDataLayerDelay),viewItemListDataLayerDelay=setTimeout(()=>{let promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}");const menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{},isSearchSuggestions=productCardSelector.includes("product-suggestions");let visibleCount=window.viewItemListSearch.length;isSearchSuggestions&&visibleCount>5&&(visibleCount=5),window.pushEvent({event:"view_item_list",menu_navigation_state:menuNavigationState,ecommerce:Object.assign(promotionEvent,{items:itemList,item_list_id:"search",item_list_name:"Search",item_list_type:"Search",item_total_count:count,item_visible_count:visibleCount})},"ecommerce"),skusComingIntoView=[]},1e3))};let productCards=document.querySelectorAll(productCardSelector);productCards.length&&productCards.forEach(card=>{let isVisibleNow=window.theme.isElementVisibleInViewport(card,!0);card.setAttribute("data-visible-by-default",isVisibleNow),isVisibleNow&&skusComingIntoView.push(card.getAttribute("data-sku"));const handleIntersection=(entries,observer2)=>{entries.forEach(entry=>{const visibleByDefault=card.getAttribute("data-visible-by-default")||!1;if(isVisibleNow=window.theme.isElementVisibleInViewport(card,!0),entry.intersectionRatio>0&&(observer2.unobserve(entry.target),card.setAttribute("data-visible-in-viewport",isVisibleNow),isVisibleNow)){const allResults=getProducts();skusComingIntoView.push(card.getAttribute("data-sku"));const itemsInViewport=allResults.filter(item=>skusComingIntoView.includes(item.variants[0].sku));window.viewItemListSearch=window.viewItemListSearch||[];const items=itemsInViewport.map(item=>{const itemExists=window.viewItemListSearch.find(listItem=>listItem.item_id===item.variants[0].sku),index=allResults.findIndex(result=>result.variants[0].sku===item.variants[0].sku),productType=item.product_type,newItem={index:index+1,item_id:item.variants[0].sku,item_name:item.title.replace(/["']/g,""),item_brand:"Lovisa",item_category:productType,item_list_id:"search",item_list_name:"Search",price:item.price,quantity:1,visible_by_default:visibleByDefault};return itemExists||window.viewItemListSearch.push(newItem),card.getAttribute("data-sku")===item.variants[0].sku&&card.addEventListener("click",()=>{window.dataLayer=window.dataLayer||[];let promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}");const menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"select_item",item_list_id:"search",item_list_name:"Search Results",item_list_type:"Search",menu_navigation_state:menuNavigationState,ecommerce:Object.assign(promotionEvent,{impressions:[newItem]})},"ecommerce");const itemDataJson=JSON.stringify({itemListId:"search",itemListName:"Search Results",itemListType:"Search",index:newItem.index,itemCategory:newItem.item_category});localStorage.setItem("ga-select-item",itemDataJson);const itemListImpressions=JSON.parse(localStorage.getItem("ga4-itemListImpressions")||"{}"),impressionItem=JSON.parse(JSON.stringify(newItem));impressionItem.price=newItem.price*100,itemListImpressions[newItem.item_id]=impressionItem,localStorage.setItem("ga4-itemListImpressions",JSON.stringify(itemListImpressions))}),newItem});viewItemListSearchEvent(items)}})};new IntersectionObserver(handleIntersection).observe(card)})};viewSearchDataLayerDelay=setTimeout(()=>{viewSearchResultsActionEvent(),viewItemListEvent()},searchDelay)},clickSortOptionDataLayerEvent=helpers=>{clickSortOptionDataLayerDelay&&clearTimeout(clickSortOptionDataLayerDelay),clickSortOptionDataLayerDelay=setTimeout(()=>{const{label="Default"}=helpers.getAppliedSortOption(),promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}"),menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"item_list_filter",menu_navigation_state:menuNavigationState,ecommerce:promotionEvent,interaction_type:"Sort",list_sort_order:label})},searchDelay)},applyFilterDataLayerEvent=props=>{const{filterId,filterItem,helpers}=props,appliedFilters=helpers.getAppliedFilters(!0)||[],{label="Default"}=helpers.getAppliedSortOption(),filters={};
1appliedFilters.forEach(({id,items})=>{let currentFilterId=id;currentFilterId.includes("_product_type")&&(currentFilterId="looking_for"),items.forEach(item=>{const name=item.label.toLowerCase().split(" ").map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ");filters[currentFilterId]&&filters[currentFilterId].length>0?filters[currentFilterId]+=` | ${name}`:filters[currentFilterId]=name})});let appliedFilterId=filterId;appliedFilterId.includes("_product_type")&&(appliedFilterId="looking_for");const filterName=filterItem.label.toLowerCase().split(" ").map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ");filters[appliedFilterId]&&filters[appliedFilterId].length>0?filters[appliedFilterId]+=` | ${filterName}`:filters[appliedFilterId]=filterName;const promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}"),menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"item_list_filter",menu_navigation_state:menuNavigationState,ecommerce:promotionEvent,interaction_type:"Add Filter",list_sort_order:label,list_filter_state:filters},"list_filter_state")},removeFilterDataLayerEvent=(props,filterId,filterItem)=>{const{helpers}=props,appliedFilters=helpers.getAppliedFilters(!0)||[];let appliedFilterId=filterId;appliedFilterId.includes("_product_type")&&(appliedFilterId="looking_for");let filterName="";filterItem&&filterItem.label&&(filterName=`${filterItem.label[0].toUpperCase()}${filterItem.label.slice(1).toLowerCase()}`);const{label="Default"}=helpers.getAppliedSortOption(),filters={};appliedFilters.forEach(({id,items})=>{let currentFilterId=id;currentFilterId.includes("_product_type")&&(currentFilterId="looking_for"),items.forEach(item=>{const name=item.name?item.name.toLowerCase().split(" ").map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" "):"";currentFilterId===appliedFilterId&&name===filterName||currentFilterId===appliedFilterId&&!filterName.length||(filters[currentFilterId]&&filters[currentFilterId].length>0?filters[currentFilterId]+=` | ${name}`:filters[currentFilterId]=name)})});const promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}"),menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"item_list_filter",menu_navigation_state:menuNavigationState,ecommerce:promotionEvent,interaction_type:"Remove Filter",list_sort_order:label,list_filter_state:filters},"list_filter_state")},clearAllFilterDataLayerEvent=props=>{const{label="Default"}=props.helpers.getAppliedSortOption(),promotionEvent=JSON.parse(localStorage.getItem("ga4-promotionView")||"{}"),menuNavigationState=JSON.parse(localStorage.getItem("ga4-navigationClick")||"{}").menu_navigation_state||{};window.pushEvent({event:"item_list_filter",menu_navigation_state:menuNavigationState,ecommerce:promotionEvent,interaction_type:"Remove Filter",list_sort_order:label,list_filter_state:{}},"list_filter_state")},customTagalysActionEvents=function(helpers){const handleOutsideClick=evt=>{if(evt.target.parents(".collection-filters-block")!==!1)return;const filters=document.querySelectorAll(".collection__filter.expanded, .collection__filter.is-expanded");filters&&filters.length};document.body.addEventListener("click",handleOutsideClick)},forEachTagalysRecentSearchStore=fn=>{Object.keys(window.localStorage).forEach(key=>{if(key.startsWith("tagalysRecentSearches:"))try{const stored=JSON.parse(window.localStorage.getItem(key));if(!Array.isArray(stored?.value?.queries))return;fn(key,stored)}catch{}})},normalizeTagalysSearchTerm=value=>String(value??"").toLowerCase().trim(),REMOVED_TAGALYS_SEARCHES_KEY="tagalysRemovedSearches",getRemovedTagalysSearches=()=>{try{const removed=JSON.parse(window.localStorage.getItem(REMOVED_TAGALYS_SEARCHES_KEY));return Array.isArray(removed)?removed:[]}catch{return[]}},setRemovedTagalysSearches=terms=>{try{window.localStorage.setItem(REMOVED_TAGALYS_SEARCHES_KEY,JSON.stringify(terms.slice(0,20)))}catch{}},cleanTagalysRecentSearches=()=>{const removed=getRemovedTagalysSearches();forEachTagalysRecentSearchStore((key,stored)=>{const seen=new Set,queries=[];
1stored.value.queries.slice().reverse().forEach(item=>{const term=normalizeTagalysSearchTerm(item.query);removed.includes(term)||seen.has(term)||(seen.add(term),queries.unshift(item))}),queries.length!==stored.value.queries.length&&(stored.value.queries=queries,window.localStorage.setItem(key,JSON.stringify(stored)))})},removeTagalysRecentSearch=(event,helpers,query)=>{event.stopPropagation();const term=normalizeTagalysSearchTerm(query),removed=getRemovedTagalysSearches();removed.includes(term)||setRemovedTagalysSearches([term,...removed]),cleanTagalysRecentSearches(),helpers.removeRecentSearch(`query=${encodeURIComponent(query)}`)},restoreTagalysSearchOnNewSearch=()=>{if(window.theme?.template?.name!=="search")return;const nav=window.performance?.getEntriesByType?.("navigation")[0];if(nav&&nav.type!=="navigate")return;const term=normalizeTagalysSearchTerm(new URLSearchParams(window.location.search).get("query")),removed=getRemovedTagalysSearches();!term||!removed.includes(term)||setRemovedTagalysSearches(removed.filter(item=>item!==term))};restoreTagalysSearchOnNewSearch(),cleanTagalysRecentSearches(),document.addEventListener("focus",cleanTagalysRecentSearches,!0);const recordTagalysRecentSearch=query=>{const term=String(query??"").trim(),shopId=window.theme?.permanent_domain,countryCode=window.theme?.tagalysCountryCode;if(!term||!shopId||!countryCode)return;const normalized=normalizeTagalysSearchTerm(term);setRemovedTagalysSearches(getRemovedTagalysSearches().filter(item=>item!==normalized));const key=`tagalysRecentSearches:${shopId}:${countryCode}`;try{const stored=JSON.parse(window.localStorage.getItem(key))??{value:{queries:[]}};if(!Array.isArray(stored?.value?.queries))return;stored.value.queries=stored.value.queries.filter(item=>normalizeTagalysSearchTerm(item.query)!==normalized).concat([{query:term,expiry:Date.now()+36e5}]),window.localStorage.setItem(key,JSON.stringify(stored))}catch{}};document.addEventListener("click",event=>{const goLink=event.target?.closest?.("[data-shd-search-go]:not([data-no-link])");if(!goLink)return;const pill=goLink.closest("[data-shd-search]"),word=pill?.querySelector("[data-ph-word].is-active")??pill?.querySelector("[data-ph-word]");recordTagalysRecentSearch(word?.getAttribute("data-label")??word?.textContent)}),TagalysCustomisations.initTagalysSearchSuggestions=function(){const isSearchPage=window.theme.template.name==="search"||window.theme.template.name==="404",searchElementsFrms=[".search__input"];window.Tagalys.UIWidgets.SearchSuggestions.init(searchElementsFrms,{searchResultsURL:"/search",templates:{widget:{labels:getTagalysLabels("searchResults"),options:{sections:{products:{count:window.innerWidth<theme.settings.grid_medium?24:6},collections:{count:4},pages:{count:2}},hierarchySeparator:"\u279C",position:"bottom",minimumCharactersToShowSuggestions:2,maxRecentSearchesCount:5,maxTotalSearchesCount:10,alignToSelector:isSearchPage?!1:"#search--app",includeTagalysCSS:!1,inheritAlignmentElementWidth:!0},render:function(html,args){var props=args.props,helpers=props.helpers,width=helpers.getTargetNodeWidth();width=isSearchPage?width+40:width;var style=props.inheritAlignmentElementWidth?{width}:{};return html`
2            <div
3              ref=${props.tagalysSearchSuggestionsPopoverRef}
4              style=${style}
5              class="search-suggestions search__results"
6            >
7              <${args.templates.hint} />
8              ${helpers.exceedsMinimumCharactersToShowSuggestions()?html`
9                    <${args.templates.typeSuggestions} />
10                  `:html`
11                    <div class="popular-view">
12                      Trending Searches
13                    </div>
14                    <${args.templates.clickSuggestions} />
15                  `}
16            </div>
17          `}},typeSuggestions:{render:function(html,args){var props=args.props,helpers=props.helpers,textSuggestions=helpers.getTextSuggestions();const multibuyCollectionHandles=(window.theme.multibuy_offer_discounts||[]).map(item=>item.collectionHandle);textSuggestions=textSuggestions.map(item=>item.id!=="collections"?item:{...item,items:item.items.map(collection=>{if(multibuyCollectionHandles.includes(collection.handle)){const multibuyCollection=(window.theme.multibuy_offer_discounts||[]).find(item2=>item2.collectionHandle===collection.handle);if(multibuyCollection){const multibuyCollectionTitle=multibuyCollection.description||multibuyCollection.title||collection.title;return{...collection,title:multibuyCollectionTitle}}}return collection})});var classes=["type-suggestions"];helpers.hasTextSearchSuggestions()>0?classes.push("product-and-text-suggestions"):classes.push("product-suggestions search__results-products ais-index");var className=classes.join(" ");return html`
18            <div class=${className}>
19             <div class="mobi-hint">${html`<${args.templates.hint} />`}</div>
20              ${helpers.hasTextSearchSuggestions()?html`
21                    <ul class="text-suggestions">
22                      ${textSuggestions.map(textSuggestionSection=>html`
23                            <${args.templates.textSuggestionSection} textSuggestionSection=${textSuggestionSection} />
24                          `)}
25                    </ul>
26                  `:""}
27              <${args.templates.products} class="product-suggestions" />
28            </div>
29          `}},hint:{render:function(html,args){var props=args.props,helpers=props.helpers,widgetOptions=helpers.getTemplateOptions("widget"),getLabel=()=>helpers.exceedsMinimumCharactersToShowSuggestions()?"View All Results":"";return html`
30            <div class="hint">
31              <a
32                class="search-results-link"
33                href=${helpers.getURLEncodedQueryString({query:helpers.getEnteredSearchQuery()})}
34              >
35                ${getLabel()}
36              </a>
37              ${getLabel()?html`
38                    <button onClick=${helpers.hideSearchSuggestionsPop
38over}>
39                      ${window.tagalysIcon.closeIcon(html)}
40                    </button>
41                  `:""}
42            </div>
43          `}},recentSearchItem:{render:function(html,args){var props=args.props,helpers=props.helpers,enteredSearchQuery=helpers.getEnteredSearchQuery();return html`
44            <li class="click-suggestion recent-search-item">
45              <a class="search-results-link" href=${helpers.getLink(props.recentSearch.query)}>
46                <${args.templates.recentSearchIcon} />
47                <${args.templates.highlighter}
48                  label=${props.recentSearch.query}
49                  highlight=${enteredSearchQuery}
50                />
51              </a>
52              <button
53                aria-label=${args.labels.searchResults.recentSearch.removeRecentSearch}
54                onClick=${event=>removeTagalysRecentSearch(event,helpers,props.recentSearch.query)}
55              >
56                ${window.tagalysIcon.closeIcon(html)}
57              </button>
58            </li>
59          `}},products:{render:function(html,args){var props=args.props,products=props.helpers.getProducts();return viewSearchResultsDataLayerEvent(props.helpers,".product-suggestions .search-result"),products.length?html`
60            <div class=${`products search__results-grid search__results-products-grid ${props.className}`}>
61              ${products.slice(0,10).map((product,index)=>product.images.length>0?html`
62                    <${args.templates.product} key=${index} product=${product} />
63                  `:"")}
64            </div>
65          `:html``}},product:{render:function(html,args){var props=args.props,helpers=props.helpers,product=props.product,enteredSearchQuery=helpers.getEnteredSearchQuery(),productOptions=helpers.getTemplateOptions("product"),productLink=productOptions.productPageUrl(product);const{price,compareAtPrice}=window.renderHelpers.getPrice(product);return html`
66            <div class="product search-result" data-sku="${product.variants[0].sku}">
67              <a class="product-link" title="${product.title}" href=${productLink}>
68                <span class="product-image-container">
69                  ${window.renderHelpers.productCard.wishlistButton(html,args)}
70
71                  <img class="product-image" src=${product.featured_image?.src} alt=${product.title} />
72                </span>
73                <div class="product-details">
74                  <span class="product-name search-result__title">
75                    <${args.templates.highlighter} label=${product.title} highlight=${enteredSearchQuery} />
76                  </span>
77                  <div class="product-card__price product-card--flex">
78                  ${helpers.isStorefrontAPICallPending()?html`
79                        <span class="skeleton-box"></span>
80                      `:html`
81                        <span class=${`product-prices ${helpers.isProductOnSale(compareAtPrice,price)?" discounted":" full-price"}`}>
82                          
83                           ${compareAtPrice===null?html`
84                              <span
85                                class="product-price-regular"
86                                 dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}} 
87                                />
88              `:html`  <span
89                                class="product-price-regular"
90                                 dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(compareAtPrice)}}
91                                />`}
92                           ${helpers.isProductOnSale(compareAtPrice,price)?html`
93                              <span
94                                class="sale-price-text-color product-price-discounted"
95                                dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}}
96                                
97                                />
98                              `:""}
99                         
100                        </span>
101                      `} ${helpers.isProductOnSale(compareAtPrice,price)?html`
102                                        <span class="product-per-off ${window.theme.showPerOffMobile?"show-per-off-mobile":""}${window.theme.showPerOffDesktop?" show-per-off-desktop":""}">
103                    (-${Math.round((compareAtPrice-price)*100/compareAtPrice)}%)
104                  </span>
105                `:""}
106 </div> 
107                </div>
108              </a>
109            </div>
110          `}},popularSearchIcon:{render:function(html,args){return window.tagalysIcon.popularSearch(html)}}},callbacks:{beforeAPICall:function(requestParams,helpers){const bodyElement=document.querySelector("body"),is404Page=bodyElement.classList.contains("template-404"),elementToObserve=document.querySelector(".tagalys-search-suggestions"),searchWrapper=document.querySelector("#search--app");searchWrapper&&elementToObserve&&searchWrapper.appendChild(elementToObserve);let style=document.querySelector("style#tagalys-custom-style");return style||(style=document.createElement("style"),style.id="tagalys-custom-style",document.head.appendChild(style)),new MutationObserver(()=>{elementToObserve.hasChildNodes()?(elementToObserve.classList.remove("tagalys-namespace"),elementToObserve.id="tagalys--namespace",is404Page&&bodyElement.classList.add("tagalys-404-page")):is404Page&&bodyElement.classList.remove("tagalys-404-page")}).observe(elementToObserve,{subtree:!0,childList:!0}),requestParams},onSuccessfulAPICall:function(response,helpers){return setTimeout(function(){typeof ReloadSmartWishlist=="function"&&ReloadSmartWishlist()},500),response}}})},TagalysCustomisations.initTagalysSearchResults=function(){const noResultWidgetObj=window.theme.tagalysNoResultsWidgetId?{recommendationId:window.theme.tagalysNoResultsWidgetId,options:{templates:{widget:{labels:getTagalysLabels("noResults"),options:{includeTagalysCSS:!1,displayFormat:"grid",perPage:window.theme.tagalysNoSearchResultCount},render:function(html,args){var props=args.props,helpers=props.helpers,products=helpers.getProducts();return props.loading!==!1?html``:products.length===0?html``:html`
111                  <div class="widget">
112                    <${args.templates.header} />
113                    <div class="widget-body">
114                      <div class="collection__products medium-up--one-whole">
115                        <div role="list" class="grid grid--flex display--grid">
116                          <${args.templates.productList} />
117                        </div>
118                        <${args.templates.noResultCTA} />
119                      </div>
120                    </div>
121                    <${args.templates.footer} />
122                  </div>
123                `}},header:{render:function(html,args){var props=args.props;return html`
124                  <div class="widget-header">
125                    <strong class="widget-heading">
126                      ${args.labels.noResults.heading}
127                    </strong>
128                  </div>
129                `}},products:{render:function(html,args){var props=args.props,helpers=props.helpers,products=helpers.getProducts();return viewSearchResultsDataLayerEvent(helpers,".search-results .product-card"),html`
130                  ${products.map((product,index)=>product.images.length>0?html`
131                          <${args.templates.product} key=${index} product=${product} />
132                        `:"")}
133                `},callbacks:{afterInitialRender:function(helpers){setTimeout(function(){window.renderHelpers.updateProductCards(".product-card")},2e3)}}},noResultCTA:{render:function(html,args){var product=args.props.product;return window.theme.tagalysNoResultsCTA_Text?html`
134                  <div class=" tagalys-no-result-cta">
135                    <a href="${window.theme.tagalysNoResultsCTA_URL}" class="btn--text">
136                      ${window.theme.tagalysNoResultsCTA_Text}
137                    </a>
138                  </div>
139                `:html``}},productObj:{render:function(html,args){return window.renderHelpers.productObj(html,args)}},variantSelect:{render:function(html,args){return window.renderHelpers.variantSelect(html,args)}},variantOption:{render:function(html,args){var product=args.props.product,variants=product.variants;return html`
140                    <div class="product-card__variant-picker product-card__variant-picker--with-options">
141                      ${window.renderHelpers.variantOption.header(html,args)}
142                      <div role="list" class="product-card__variants">
143                        ${window.renderHelpers.variantOption.variantList(html,args)}
144                        <div role="listitem" class="product-card__variant-container">
145                          <button
146                            type="button"
147                            class="close-show-variants"
148                            aria-label="${args.labels.products.closeVariants}"
149                          >
150                            ${window.tagalysIcon.closeShowVariants(html)}
151                          </button>
152                        </div>
153                      </div>
154                      <div role="list" class="product-card__mobile-variants">
155                        ${window.renderHelpers.variantOption.variantListMobile(html,args)}
156                      </div>
157                    </div>
158                  `}},addToCartForm:{render:function(html,args){var product=args.props.product,variants=product.variants,isOnlyInStore=!1,tags=product.tags;
158return tags.length&&tags.forEach(function(tag){tag==="in-store"&&(isOnlyInStore=!0)}),html`                
159                  <form action="${window.plp_vars.cart_add_url}" method="post" enctype="multipart/form-data" class="form">
160                    <input type="hidden" name="quantity" value="1" />
161                    <${args.templates.variantSelect} product=${product} />
162                    <${args.templates.variantOption} product=${product} />
163                    ${variants.length>1?html`
164                          <button class="product__add--show-variants" type="button" aria-label="${args.labels.products.quickAdd}">
165                            ${window.tagalysIcon.cart(html)}
166                          </button>
167                          <button
168                            type="button"
169                            class="product__add--mobile product__add--show-variants"
170                            aria-label="${args.labels.products.quickAdd}"
171                          >
172                            ${window.tagalysIcon.cart(html)}
173                          </button>
174                        `:html`
175                          <button
176                            class="product__add"
177                            type="submit"
178                            name="add"
179                            data-add-to-cart=""
180                            aria-label="${args.labels.products.quickAdd}"
181                          >
182                          ${window.tagalysIcon.cart(html)}
183                          </button>
184                          <button
185                            class="product__add--mobile"
186                            type="submit"
187                            name="add"
188                            data-add-to-cart=""
189                            aria-label="${args.labels.products.quickAdd}"
190                          >
191                            ${window.tagalysIcon.shoppingBag(html)}
192                            ${window.tagalysIcon.checkmark(html)}
193                          </button>
194                        `}
195                  </form>
196                `}},product:{render:function(html,args){var props=args.props,helpers=props.helpers,product=props.product,fomoBadgeStyle="",promo_text="",promo_style="",promo_link="",productOptions=helpers.getTemplateOptions("product"),productLink=productOptions.productPageUrl(product),navigateToProductDetailPage=event=>{try{sessionStorage.setItem("tagalys_product_card_clicked",product.id)}catch(e){console.log("Failed to save breadcrumb map to sessionStorage",e)}helpers.navigateToProductDetailPage(event,product)};const{price,compareAtPrice}=window.renderHelpers.getPrice(product);let badge="",badgeStyles="",{isOnlyInStore,isOnlyInStoreClass,offer,offerProperty}=window.renderHelpers.getTags(product.tags);if(!badge){for(var collections=product.collections,collectionsMetaObject=window.theme.collectionMetaobjects,tempbadge=!1,quickviewBadgeCounter=0,quickviewBadgeHtml="",i=0;i<collectionsMetaObject.length;i++){let badgeCollections=collectionsMetaObject[i].collections||[];if(badgeCollections.length>0){for(var j=0;j<collections.length;j++)if(badgeCollections.some(bc=>String(bc.id)===String(collections[j].id))){var quickviewbadgestyle="",quickviewbadgeClass="";if(quickviewbadgestyle=`background-color:  ${collectionsMetaObject[i].badge_background_color}`,quickviewbadgestyle=`${quickviewbadgestyle}; color:  ${collectionsMetaObject[i].badge_text_color};`,collectionsMetaObject[i].badge_border_color&&(quickviewbadgestyle=`${quickviewbadgestyle}; border-color:${collectionsMetaObject[i].badge_border_color};`),collectionsMetaObject[i].opacity&&(quickviewbadgestyle=`${quickviewbadgestyle}; opacity:${collectionsMetaObject[i].opacity};`),collectionsMetaObject[i].fomo_style==!0?quickviewbadgeClass="fomo-badge":collectionsMetaObject[i].default_style==!0&&(quickviewbadgeClass="default-badge"),quickviewBadgeHtml=html`${quickviewBadgeHtml}<div data-product-card-badge="9716480573767" data-badgestr="${collectionsMetaObject[i].badge_text}" class="product-card__badge ${quickviewbadgeClass}" style="${quickviewbadgestyle}">${collectionsMetaObject[i].badge_text}</div>`,quickviewBadgeCounter++,quickviewBadgeCounter>=2)break}}}for(var i=0;i<collectionsMetaObject.length;i++){for(var j=0;j<collections.length;j++)if(collections[j].title==collectionsMetaObject[i].collection_name){badge=collectionsMetaObject[i].badge_text,badgeStyles=`background-color:  ${collectionsMetaObject[i].badge_background_color}`,badgeStyles=`${badgeStyles}; color:  ${collectionsMetaObject[i].badge_text_color};`,collectionsMetaObject[i].badge_border_color&&(badgeStyles=`${badgeStyles}; border-color:${collectionsMetaObject[i].badge_border_color};`),collectionsMetaObject[i].opacity&&(badgeStyles=`${badgeStyles}; opacity:${collectionsMetaObject[i].opacity};`),collectionsMetaObject[i].fomo_style==!0?fomoBadgeStyle="fomo-badge":collectionsMetaObject[i].default_style==!0&&(fomoBadgeStyle="default-badge"),tempbadge=!0;break}if(tempbadge)break}}for(var collections=product.collections,promo_callout_metaobject=window.theme.promo_callout_metaobject,temppromo=!1,i=0;i<promo_callout_metaobject.length;i++){for(var j=0;j<collections.length;j++)if(collections[j].id==promo_callout_metaobject[i].id){promo_text=promo_callout_metaobject[i].promo_text,promo_style=`color:  ${promo_callout_metaobject[i].text_colour};`,promo_link=`/collections/${collections[j].handle}`,temppromo=!0;break}if(temppromo)break}var multibuy_offer_discounts=window.theme.multibuy_offer_discounts||[];const currentPageHandle=window.theme&&window.theme.currentPageHandle?String(window.theme.currentPageHandle):window.location.pathname.includes("/collections/")?window.location.pathname.split("/collections/")[1].split("/")[0].split("?")[0]:"";for(var i=0;i<multibuy_offer_discounts.length;i++){const offer2=multibuy_offer_discounts[i],discount_type=offer2.discount_type,discount_key=offer2.discount_key||"",collection_handle=offer2.collectionHandle||"",collectionTitle=offer2.collectionTitle||"";if(offer2.active===!1||offer2.active==="false"||!discount_key&&!collection_handle)continue;let isMatch=!1;if((discount_type==="collection"||!discount_type)&&(collection_handle&&currentPageHandle&&String(currentPageHandle)===String(collection_handle)&&(isMatch=!0),!isMatch&&discount_key&&currentPageHandle&&String(currentPageHandle)===String(discount_key)&&(isMatch=!0),!isMatch&&product.collections&&Array.isArray(product.collections)&&(isMatch=product.collections.some(function(c){if(!c)return!1;const cHandle=typeof c=="object"&&c!==null?c.handle:typeof c=="string"?c:null,cTitle=typeof c=="object"&&c!==null?c.title:typeof c=="string"?c:null,cId=typeof c=="object"&&c!==null?c.id:typeof c=="number"||typeof c=="string"?c:null;return!!(collection_handle&&cHandle&&String(cHandle)===String(collection_handle)||discount_key&&(cHandle&&String(cHandle)===String(discount_key)||cTitle&&String(cTitle)===String(discount_key))||collectionTitle&&cTitle&&String(cTitle)===String(collectionTitle)||offer2.id&&cId&&String(cId)===String(offer2.id))})),!isMatch&&product.tags&&Array.isArray(product.tags)&&(collection_handle&&product.tags.includes(collection_handle)&&(isMatch=!0),!isMatch&&discount_key&&product.tags.includes(discount_key)&&(isMatch=!0))),!isMatch&&(discount_type==="tag"||!discount_type)&&product.tags&&Array.isArray(product.tags)&&(discount_key&&product.tags.includes(discount_key)&&(isMatch=!0),!isMatch&&collection_handle&&product.tags.includes(collection_handle)&&(isMatch=!0)),isMatch){promo_text=offer2.description||offer2.title||"",promo_link=offer2.collectionUrl||(collection_handle?`/collections/${collection_handle}`:discount_key?`/collections/all/tagged/${discount_key}`:"#"),offer2.color&&(promo_style=`color: ${offer2.color};`),temppromo=!0,promo_format_only=!0;break}}return html`
197                  <div class="grid__item medium-down--one-half large-up--one-whole"  product-card-wrapper>
198                    <div class="product-card product-card--quick" data-offer="${offerProperty}" data-sku="${product.variants[0].sku}">
199                      ${window.renderHelpers.productCard.wishlistButton(html,args)}
200                      <div class="product-card__image">
201                        <div class="product-card__image--wrapper" onClick=${navigateToProductDetailPage}>
202                          <a href="${productLink}" title="${product.title}">
203                            ${window.renderHelpers.productCard.images(html,args)}
204                          </a>
205                        </div>
206                        ${window.renderHelpers.productCard.actions(html,args,isOnlyInStoreClass)}
207                      </div>
208                       ${badge!=""?html`<div style="${badgeStyles}" class="product-card__badge ${fomoBadgeStyle}" data-product-card-badge="${product.id}" data-badgestr="${badge}">${badge}</div><div class="quickviewBadges" style="display:none;">${quickviewBadgeHtml}</div>`:""}
209                      <div class="product-card__info">
210                        <div class="product-card__details">
211                          <div class="product-card__text">
212                          ${promo_text!=""?html`<a href="${promo_link}" style="${promo_style||""}" class="promo_callout" data-text="${promo_text.replace(/\"|\'/g,"").replace(/\s/g,"")}" data-currency="${window.theme.currentCurrency}">
213                                   ${window.tagalysIcon.plpPromoImage(html)}
214                                   ${window.tagalysIcon.quickviewPromoImage(html)}
215                                   <span>${theme.CurrencySwitcher?theme.CurrencySwitcher.getCurrencyHTML(promo_text,html,promo_format_only):promo_text}</span>
216                                   </a>`:""}
217                            <h4 class="product-card__title"  onClick=${navigateToProductDetailPage}>
218                              <a href="${productLink}">
219                                <span>${product.title}</span>
220                              </a>
221                            </h4>
222                            <div class="product-card__price product-card--flex"  onClick=${navigateToProductDetailPage}>
223                                ${helpers.isStorefrontAPICallPending()?html`
224                                      <span class="skeleton-box"></span>
225                                    `:html`
226                                      <span class=${`product-prices ${helpers.isProductOnSale(compareAtPrice,price)?" discounted":" full-price"}`}>
227                                        
228                                         ${compareAtPrice===null?html`
229                                                <span
230                                                  class="product-price-regular"
231                                                  dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}}
232                                                />
233                            `:html`<span
234                                                      class="product-price-regular"
235                                                      dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(compareAtPrice)}}                                              
236                                                    />`}
237                                         ${helpers.isProductOnSale(compareAtPrice,price)?html`
238                                            <span
239                                              class="sale-price-text-color product-price-discounted"
240                                              dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}}
241                                            />
242                                            `:""}
243                                       
244                                      </span>
245                                    `} ${helpers.isProductOnSale(compareAtPrice,price)?html`
246                                          <span class="product-per-off ${window.theme.showPerOffMobile?"show-per-off-mobile":""}${window.theme.showPerOffDesktop?" show-per-off-desktop":""}">
247                                          (-${Math.round((compareAtPrice-price)*100/compareAtPrice)}%)
248                                        </span>
249                                      `:""}
250                              </div>
251                          </div>
252                        </div>
253                      </div>
254                    </div>
255                  </div>
256                `}}}}}:{},noResultsOptions=window.theme.tagalysNoResultsWidgetId?{includeTagalysCSS:!1,widgets:[noResultWidgetObj]}:{};window.Tagalys.UIWidgets.SearchResults.init(".search-results-container",{templates:{widget:{labels:getTagalysLabels("searchResults"),options:{includeTagalysCSS:!1,canAppendQueryStringToUrl:!0,perPage:window.theme.tagalysSearchResultCount},render:function(html,args){var props=args.props,helpers=props.helpers;if(helpers.isInitialLoading())return html`
257              <${args.templates.loader} />
258            `;var classes=["plp","search-results","page-width"];helpers.isFilterDrawerOpen()&&classes.push("filter-drawer-opened"),helpers.isLoading()&&classes.push("loading"),helpers.canShowFiltersInDrawer()&&classes.push("show-filters-in-drawer");var className=classes.join(" ");if(helpers.hasNoSearchResults()&&!helpers.hasAnyFiltersApplied())return html`
259              <div class="plp search-results results-tagalys">
260                <${args.templates.noResults} />
261              </div>
262            `;var currentPageItemCount=helpers.getCurrentPage()*window.theme.tagalysSearchResultCount-(window.theme.tagalysSearchResultCount-1),totalPageItemsCount=helpers.getCurrentPage()*window.theme.tagalysSearchResultCount,totalSearchItemsCount=helpers.getTotalProductsCount()>1?`${helpers.getTotalProductsCount()} Results`:`${helpers.getTotalProductsCount()} Result`;helpers.getCurrentPage()==helpers.getTotalPages()&&helpers.getTotalProductsCount()<totalPageItemsCount&&(totalPageItemsCount=totalSearchItemsCount);
262var searchResultCounterStr=html`Showing <span>${currentPageItemCount} - ${totalPageItemsCount}</span> of ${totalSearchItemsCount}`,appliedFilters=helpers.getAppliedFilters(!0),showClearAllFiltersAction=appliedFilters.length;let previousPageLoad="";helpers.canLoadPreviousResults()==!0&&helpers.getCurrentPage()>1&&(previousPageLoad=html`<${args.templates.loadPrevious} />`);let viewType=localStorage.getItem("collectionViewType")||"view-4";return searchFiltersSticky(),html`
263              <div class=${className}>
264                <${args.templates.header} />
265                <div class="grid grid__uniform collection__container">
266                  <div class="grid__item collection-sorting">
267                    <div class="filter-main">
268                      <div class="hide-filter">
269                        ${window.tagalysIcon.hideFilter(html)}
270                        <span>Hide Filter<span class="hide-filter-space">(${helpers.getTotalProductsCount()})</span></span>
271                      </div>
272                      <div class="show-filter" style="display:none;">
273                        ${window.tagalysIcon.showFilter(html)}
274                        <span>Show Filter<span class="hide-filter-space">(${helpers.getTotalProductsCount()})</span></span>
275                      </div>
276                    </div>
277                    
278                    <div class="collection__filters">
279                      <div class="collection__filter-wrap ">
280                        <div class="collection-sort-block">
281                          <${args.templates.productListHeader} />
282                        </div>
283                        <div class="viewing-main">
284                            <div class="viewing-type viewing-type-3 ${viewType=="view-3"?"active":""}">
285                              ${window.tagalysIcon.view3(html)}
286                            </div>
287                            <div class="viewing-type viewing-type-4 ${viewType=="view-4"?"active":""}">
288                              ${window.tagalysIcon.view4(html)}
289                            </div>
290                        </div>
291                      </div>
292                    </div>
293                  </div>
294                  <div class="grid__item small-down--one-whole medium-up--one-whole filter-wrapper" style="display:none;">
295                    <div class="flex filters-action-block" style="display:none;">
296                      <span class="result-counter">
297                        ${helpers.getTotalProductsCount()>1?`${helpers.getTotalProductsCount()} Results`:`${helpers.getTotalProductsCount()} Result`}
298                      </span>
299                      <div id="toggle-tg-filter-v2" class="toggle-tg-filter">
300                        ${window.tagalysIcon.toggleFilter(html)}
301                        <span class="mobile-facets__open-label button-label">Filter </span>
302                      </div>
303                    </div>
304                    
305                  </div>
306                 
307                  <div class="collection-products-main">
308                  <div class="medium-up--one-fifth grid__item collection_tg_filter-wrap ${helpers.canShowFiltersInDrawer()?"":"open"}">
309                  <div class="collection_tg_filter_mobile_footer">
310                      <div class="filter__label clear-all-filters">
311                        <button type="button" class="clear-all-filters-btn" onclick=${()=>{helpers.clearAllFilters(),clearAllFilterDataLayerEvent(props)}}>
312                          ${showClearAllFiltersAction>0?html`
313                            Clear`:"Clear"}
314                        </button>
315                      </div>
316                      <div class="apply-filter-count" onClick=${props.helpers.closeFilterDrawer}>Apply<span class="mobile-totalCount">${helpers.getTotalProductsCount()?"("+helpers.getTotalProductsCount()+")":""}</span></div>
317                  </div>
318                  <div class="collection_tg_filter_mobile_header">
319                    <div>${helpers.getQuery()}</div>
320                    <button type="button" class="close-filter filter-drawer-toggle" onClick=${props.helpers.closeFilterDrawer}>
321
322                      ${window.tagalysIcon.close(html)}
323                    </button>
324                  </div>
325                  <div class="mobile-appliedFilters collection__filter-actions">
326                  <${args.templates.appliedFilters} />
327        
328                  </div>
329                  <${args.templates.filters} />
330                  </div>
331                  <div class="collection__products grid__item medium-up--one-whole medium-up--four-fifths ${viewType=="view-3"?"type-3":""}">
332                      <div class="collection__filter-actions">
333                        <${args.templates.appliedFilters} />
334                      </div>
335                      <div role="list" class="grid grid--flex display--grid">
336                        ${previousPageLoad}
337                        <${args.templates.products} />
338                        <${args.templates.productListFooter} />
339                      </div>
340                      ${helpers.isFilterDrawerOpen()?html`
341                            <div class="filter-overlay" onclick=${helpers.closeFilterDrawer} />
342                          `:""}
343                    </div>
344                  </div>
345                </div>
346                <${args.templates.footer} />
347              </div>
348            `}},noResults:{options:noResultsOptions,render:function(html,args){return window.renderHelpers.noResults(html,args)}},header:{render:function(html,args){var props=args.props,helpers=props.helpers,filterOptions=helpers.getTemplateOptions("filters");return html`
349            <div class="mobile-search-header-block">
350              <div class="search-result-subheading">${args.labels.searchResults.heading.yourSearchResultsFor}</div>
351              <div class="search-result-key">${helpers.getQuery()}</div>
352            </div>
353            <div class="plp-header">
354              <div class="collection__tabs">
355                <button type="button" id="toggle-tg-filter" class="collection__tab collection__tab--filter filter-drawer-toggle" onclick=${helpers.openFilterDrawer}>
356                  <span class="filter-drawer-btn open-filter-drawer" >
357                    ${window.tagalysIcon.openFilter(html)}
358                    Filter
359                    ${window.renderHelpers.collectionResultsCount(html,args)}
360                  </span>
361                  <span class="filter-drawer-btn close-filter-drawer" onClick=${props.helpers.closeFilterDrawer}>
362                    Filter
363                    ${window.tagalysIcon.minus(html)}
364                    ${window.renderHelpers.collectionResultsCount(html,args)}
365                  </span>
366                </button>
367                <div class="collection__tab collection__tab--clear medium-up--hide">
368                  <div class="clear-filters__container" style="display: none;">
369                    <button type="reset" class="filter__label clear-filters__btn">
370                      ${window.tagalysIcon.clearFilters(html)}
371                      <span>${args.labels.filters.clearFilters}</span>
372                    </button>
373                  </div>
374                </div>
375                <div class="collection__tab collection__tab--grid medium-down--hide medium-up--one-sixth">
376                  <div></div>
377                </div>
378                <div class="collection__tab collection__tab--sort medium-up--one-sixth">
379                  <div class="collection__tab--sort-overlay">
380                    <span>
381                      ${args.labels.sortOptions.sortBy}
382                      ${window.tagalysIcon.sortBy(html)}
383                    </span>
384                  </div>
385                  ${filterOptions.includeSortOptionsInFilters?"":html`
386                        <${args.templates.sortOptions} />
387                      `}
388                </div>
389              </div>
390            </div>
391          `}},productsPerPage:{render:function(html,args){return window.renderHelpers.productsPerPage(html,args)}},productListHeader:{render:function(html,args){return html`
392            <${args.templates.infoAndActions} />
393          `}},infoAndActions:{render:function(html,args){var props=args.props,helpers=props.helpers,filterOptions=helpers.getTemplateOptions("filters");return html`
394            <div class="collection__tab collection__tab--sort display-flex align-center justify-center">
395              <span class="display-flex hide"
396                >Filter
397                ${window.renderHelpers.collectionResultsCount(html,args)}
398              </span>
399              ${filterOptions.includeSortOptionsInFilters?"":html`
400                    <${args.templates.sortOptions} />
401                  `}
402            </div>
403          `}},sortOptions:{render:function(html,args){return window.renderHelpers.sortOptions(html,args)}},products:{render:function(html,args){var props=args.props,helpers=props.helpers,products=helpers.getProducts();return viewSearchResultsDataLayerEvent(helpers,".search-results .product-card"),html`
404            ${products.map((product,index)=>product.images.length>0?html`
405                    <${args.templates.product} key=${index} product=${product} />
406                  `:"")}
407          `},callbacks:{afterInitialRender:function(helpers){setTimeout(function(){window.renderHelpers.updateProductCards(".product-card")},2e3)}}},productObj:{render:function(html,args){return window.renderHelpers.productObj(html,args)}},variantSelect:{render:function(html,args){var product=args.props.product,variants=product.variants;return html`
408            <select name="id" class="no-js" aria-label="${args.labels.products.selectVariant}" data-product-select>
409              ${variants.map((variant,i)=>html`
410                  <option ${i===0?'selected="selected"':""} data-i-${i} value="${variant.id}"
411                    >${variant.title}</option
412                  >
413                `)}
414            </select>
415          `}},variantOption:{render:function(html,args){var product=args.props.product,variants=product.variants;return html`
416              <div class="product-card__variant-picker product-card__variant-picker--with-options">
417                ${window.renderHelpers.variantOption.header(html,args)}
418                <div role="list" class="product-card__variants">
419                  ${window.renderHelpers.variantOption.variantList(html,args)}
420                  <div role="listitem" class="product-card__variant-container">
421                    <button
422                        type="button"
423                        class="close-show-variants"
424                        aria-label="${args.labels.products.closeVariants}"
425                      >
426                      ${window.tagalysIcon.closeShowVariants(html)}
427                    </button>
428                  </div>
429                </div>
430                <div role="list" class="product-card__mobile-variants">
431                  ${window.renderHelpers.variantOption.variantListMobile(html,args)}
432                </div>
433              </div>
434            `}},addToCartForm:{render:function(html,args){var product=args.props.product,variants=product.variants;let{isOnlyInStore,isOnlyInStoreClass}=window.renderHelpers.getTags(product.tags);return html`
435              <form action="${window.plp_vars.cart_add_url}" method="post" enctype="multipart/form-data" class="form">
436                <input type="hidden" name="quantity" value="1" />
437                <${args.templates.variantSelect} product=${product} />
438                <${args.templates.variantOption} product=${product} />
439                ${variants.length>1?html`
440                      <button class="product__add--show-variants" type="button" aria-label="${args.labels.products.quickAdd}">
441                        ${window.tagalysIcon.cart(html)}
442                      </button>
443                      <button
444                        type="button"
445                        class="product__add--mobile product__add--show-variants"
446                        aria-label="${args.labels.products.quickAdd}"
447                      >
448                        ${window.tagalysIcon.cart(html)}
449                      </button>
450                    `:html`
451                      <button
452                        class="product__add"
453                        type="submit"
454                        name="add"
455                        data-add-to-cart=""
456                        aria-label="${args.labels.products.quickAdd}"
457                      >
458                        ${window.tagalysIcon.cart(html)}
459                      </button>
460                      <button
461                        class="product__add--mobile"
462                        type="submit"
463                        name="add"
464                        data-add-to-cart=""
465                        aria-label="${args.labels.products.quickAdd}"
466                      >
467                        ${window.tagalysIcon.shoppingBag(html)}
468                        ${window.tagalysIcon.checkmark(html)}
469                      </button>
470                    `}
471              </form>
472            `}},product:{render:function(html,args){var props=args.props,helpers=props.helpers,product=props.product,fomoBadgeStyle="",promo_text="",promo_style="",promo_link="",promo_format_only2=!1,productOptions=helpers.getTemplateOptions("product"),productLink=productOptions.productPageUrl(product),navigateToProductDetailPage=event=>{try{sessionStorage.setItem("tagalys_product_card_clicked",product.id)}catch(e){console.log("Failed to save breadcrumb map to sessionStorage",e)}helpers.navigateToProductDetailPage(event,product)};const{price,compareAtPrice}=window.renderHelpers.getPrice(product);let badge="",badgeStyles="",{isOnlyInStore,isOnlyInStoreClass,offer,offerProperty}=window.renderHelpers.getTags(product.tags);if(!badge){for(var collections=product.collections,collectionsMetaObject=window.theme.collectionMetaobjects,tempbadge=!1,quickviewBadgeCounter=0,quickviewBadgeHtml="",i=0;i<collectionsMetaObject.length;i++){let badgeCollections=collectionsMetaObject[i].collections||[];if(badgeCollections.length>0){for(var j=0;j<collections.length;
472j++)if(badgeCollections.some(bc=>String(bc.id)===String(collections[j].id))){var quickviewbadgestyle="",quickviewbadgeClass="";if(quickviewbadgestyle=`background-color:  ${collectionsMetaObject[i].badge_background_color}`,quickviewbadgestyle=`${quickviewbadgestyle}; color:  ${collectionsMetaObject[i].badge_text_color};`,collectionsMetaObject[i].badge_border_color&&(quickviewbadgestyle=`${quickviewbadgestyle}; border-color:${collectionsMetaObject[i].badge_border_color};`),collectionsMetaObject[i].opacity&&(quickviewbadgestyle=`${quickviewbadgestyle}; opacity:${collectionsMetaObject[i].opacity};`),collectionsMetaObject[i].fomo_style==!0?quickviewbadgeClass="fomo-badge":collectionsMetaObject[i].default_style==!0&&(quickviewbadgeClass="default-badge"),quickviewBadgeHtml=html`${quickviewBadgeHtml}<div data-product-card-badge="9716480573767" data-badgestr="${collectionsMetaObject[i].badge_text}" class="product-card__badge ${quickviewbadgeClass}" style="${quickviewbadgestyle}">${collectionsMetaObject[i].badge_text}</div>`,quickviewBadgeCounter++,quickviewBadgeCounter>=2)break}}}for(var i=0;i<collectionsMetaObject.length;i++){for(var j=0;j<collections.length;j++)if(collections[j].title==collectionsMetaObject[i].collection_name){badge=collectionsMetaObject[i].badge_text,badgeStyles=`background-color:  ${collectionsMetaObject[i].badge_background_color}`,badgeStyles=`${badgeStyles}; color:  ${collectionsMetaObject[i].badge_text_color};`,collectionsMetaObject[i].badge_border_color&&(badgeStyles=`${badgeStyles}; border-color:${collectionsMetaObject[i].badge_border_color};`),collectionsMetaObject[i].opacity&&(badgeStyles=`${badgeStyles}; opacity:${collectionsMetaObject[i].opacity};`),collectionsMetaObject[i].fomo_style==!0?fomoBadgeStyle="fomo-badge":collectionsMetaObject[i].default_style==!0&&(fomoBadgeStyle="default-badge"),tempbadge=!0;break}if(tempbadge)break}}for(var collections=product.collections,promo_callout_metaobject=window.theme.promo_callout_metaobject,temppromo=!1,i=0;i<promo_callout_metaobject.length;i++){for(var j=0;j<collections.length;j++)if(collections[j].id==promo_callout_metaobject[i].id){promo_text=promo_callout_metaobject[i].promo_text,promo_style=`color:  ${promo_callout_metaobject[i].text_colour};`,promo_link=`/collections/${collections[j].handle}`,temppromo=!0;break}if(temppromo)break}var multibuy_offer_discounts=window.theme.multibuy_offer_discounts||[];const currentPageHandle=window.theme&&window.theme.currentPageHandle?String(window.theme.currentPageHandle):window.location.pathname.includes("/collections/")?window.location.pathname.split("/collections/")[1].split("/")[0].split("?")[0]:"";for(var i=0;i<multibuy_offer_discounts.length;i++){const offer2=multibuy_offer_discounts[i],discount_type=offer2.discount_type,discount_key=offer2.discount_key||"",collection_handle=offer2.collectionHandle||"",collectionTitle=offer2.collectionTitle||"";if(offer2.active===!1||offer2.active==="false"||!discount_key&&!collection_handle)continue;let isMatch=!1;if((discount_type==="collection"||!discount_type)&&(collection_handle&&currentPageHandle&&String(currentPageHandle)===String(collection_handle)&&(isMatch=!0),!isMatch&&discount_key&&currentPageHandle&&String(currentPageHandle)===String(discount_key)&&(isMatch=!0),!isMatch&&product.collections&&Array.isArray(product.collections)&&(isMatch=product.collections.some(function(c){if(!c)return!1;const cHandle=typeof c=="object"&&c!==null?c.handle:typeof c=="string"?c:null,cTitle=typeof c=="object"&&c!==null?c.title:typeof c=="string"?c:null,cId=typeof c=="object"&&c!==null?c.id:typeof c=="number"||typeof c=="string"?c:null;return!!(collection_handle&&cHandle&&String(cHandle)===String(collection_handle)||discount_key&&(cHandle&&String(cHandle)===String(discount_key)||cTitle&&String(cTitle)===String(discount_key))||collectionTitle&&cTitle&&String(cTitle)===String(collectionTitle)||offer2.id&&cId&&String(cId)===String(offer2.id))})),!isMatch&&product.tags&&Array.isArray(product.tags)&&(collection_handle&&product.tags.includes(collection_handle)&&(isMatch=!0),!isMatch&&discount_key&&product.tags.includes(discount_key)&&(isMatch=!0))),!isMatch&&(discount_type==="tag"||!discount_type)&&product.tags&&Array.isArray(product.tags)&&(discount_key&&product.tags.includes(discount_key)&&(isMatch=!0),!isMatch&&collection_handle&&product.tags.includes(collection_handle)&&(isMatch=!0)),isMatch){promo_text=offer2.description||offer2.title||"",promo_link=offer2.collectionUrl||(collection_handle?`/collections/${collection_handle}`:discount_key?`/collections/all/tagged/${discount_key}`:"#"),offer2.color&&(promo_style=`color: ${offer2.color};`),temppromo=!0,promo_format_only2=!0;break}}return html`
473            <div class="grid__item medium-down--one-half large-up--one-whole product-card-wrapper">
474              <div class="product-card product-card--quick" data-offer="${offerProperty}" data-sku="${product.variants[0].sku}">
475                ${window.renderHelpers.productCard.wishlistButton(html,args)}
476                <div class="product-card__image">
477                  <div class="product-card__image--wrapper" onClick=${navigateToProductDetailPage}>
478                    <a href="${productLink}" title="${product.title}">
479                      ${window.renderHelpers.productCard.images(html,args)}
480                    </a>
481                  </div>
482                  ${window.renderHelpers.productCard.actions(html,args,isOnlyInStoreClass)}
483                </div>
484                 ${badge!=""?html`<div style="${badgeStyles}" class="product-card__badge ${fomoBadgeStyle}" data-product-card-badge="${product.id}" data-badgestr="${badge}">${badge}</div><div class="quickviewBadges" style="display:none;">${quickviewBadgeHtml}</div>`:""}
485                <div class="product-card__info">
486                  <div class="product-card__details">
487                    <div class="product-card__text">
488                    ${promo_text!=""?html`<a href="${promo_link}" style="${promo_style||""}" class="promo_callout" data-text="${promo_text.replace(/\"|\'/g,"").replace(/\s/g,"")}" data-currency="${window.theme.currentCurrency}">
489                                  ${window.tagalysIcon.plpPromoImage(html)}
490                                  ${window.tagalysIcon.quickviewPromoImage(html)}
491                                  <span>${theme.CurrencySwitcher.getCurrencyHTML(promo_text,html,promo_format_only2)}</span>
492                                  </a>`:""}
493                      <h4 class="product-card__title"  onClick=${navigateToProductDetailPage}>
494                        <a href="${productLink}">
495                          <span>${product.title}</span>
496                        </a>
497                      </h4>
498                      <div class="product-card__price product-card--flex"  onClick=${navigateToProductDetailPage}>
499                                ${helpers.isStorefrontAPICallPending()?html`
500                                      <span class="skeleton-box"></span>
501                                    `:html`
502                                      <span class=${`product-prices ${helpers.isProductOnSale(compareAtPrice,price)?" discounted":" full-price"}`}>
503                                        
504                                         ${compareAtPrice===null?html`
505                                              <span
506                                                class="product-price-regular"
507                                               dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}}
508                                              />
509                                            `:html`  <span
510                                              class="product-price-regular"
511                                               dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(compareAtPrice)}}
512                                              />`}
513                                         ${helpers.isProductOnSale(compareAtPrice,price)?html`
514                                            <span
515                                              class="sale-price-text-color product-price-discounted"
516                                              dangerouslySetInnerHTML=${{__html:helpers.formatCurrency(price)}}
517                                              />
518                                            `:""}
519                                       
520                                      </span>
521                                    `} ${helpers.isProductOnSale(compareAtPrice,price)?html`
522                                <span class="product-per-off ${window.theme.showPerOffMobile?"show-per-off-mobile":""}${window.theme.showPerOffDesktop?" show-per-off-desktop":""}">
523                                  (-${Math.round((compareAtPrice-price)*100/compareAtPrice)}%)
524                                </span>
525                              `:""}
526
527                              </div>
528                    </div>
529                  </div>
530                </div>
531              </div>
532            </div>
533          `}},filters:{options:{collapsible:!0,includeSortOptionsInFilters:!1,autoCollapse:!0,showAppliedFilters:!0,showClearAllFilters:!0,showClearActionForIndividualFilters:!0,showMatchingProductsCount:window.theme.tagalysShowFilterItemsCount,defaultExpandedFilters:[],expandTopNFiltersByDefault:1,showFiltersInDrawer:()=>window.innerWidth<=768},render:function(html,args){var props=args.props,helpers=props.helpers,filters=helpers.getFilters(),appliedFilters=helpers.getAppliedFilters(!0),showClearAllFiltersAction=props.showClearAllFilters&&appliedFilters.length,classes=["filters"];props.collapsible&&classes.push("collapsible");var className=classes.join(" ");return html`
534
535            <div class="collection-filters-block ">
536              <${args.templates.filtersHeader} />
537
538              ${props.includeSortOptionsInFilters==="top"?html`
539                    <${args.templates.sortOptionInFilters} />
540                  `:""}
541              ${filters.map(filter=>html`
542                    <${args.templates.filter} filter=${filter} />
543                  `)}
544              ${props.includeSortOptionsInFilters===!0||props.includeSortOptionsInFilters==="bottom"?html`
545                    <${args.templates.sortOptionInFilters} />
546                  `:""}
547            </div>
548          `},callbacks:{afterEveryRender:function(helpers){window.renderHelpers.attachSearchListener(helpers),customTagalysActionEvents(helpers)}}},filtersHeader:{render:function(html,args){var props=args.props;return html``}},appliedFilters:{render:function(html,args){var props=args.props,helpers=props.helpers,appliedFilters=helpers.getAppliedFilters(!0);return appliedFilters.length?html`
549            <ul class="applied-filters unstyled-list">
550              ${appliedFilters.map(appliedFilter=>appliedFilter.type==="range"?html`
551                    <li onClick=${()=>{helpers.clearFilter(appliedFilter.id),removeFilterDataLayerEvent(props,appliedFilter.id)}} class="applied-filter">
552                        <span class="applied-filter-label"
553                        dangerouslySetInnerHTML=${{__html:helpers.labelFormatter(appliedFilter.display_format,appliedFilter.selected_min,appliedFilter.currency)+'<span class="price-applied-space"> - </span>'+helpers.labelFormatter(appliedFilter.display_format,appliedFilter.selected_max,appliedFilter.currency)}} />
554                        <button class="applied-filter-action-clear">
555                          ${window.tagalysIcon.closeIcon(html)}
556                        </button>
557                    </li>
558                  `:appliedFilter.items.map(filterItem=>{if(appliedFilter.id=="size")var filterItemName=filterItem.label.toUpperCase();else var filterItemName=filterItem.label.toLowerCase();return html`
559                    <li
560                      class="display-flex applied-filter"
561                      onClick=${()=>{helpers.clearFilter(appliedFilter.id,filterItem.id),removeFilterDataLayerEvent(props,appliedFilter.id,filterItem)}}
562                    >
563                      <span class="filter__label applied-filter-label">
564                        ${filterItemName}
565                      </span>
566                      <span class="filter__label applied-filter-action-clear">
567                        ${window.tagalysIcon.closeIcon(html)}
568                      </span>
569                    </li>
570                  `}))}
571              <li class="applied-filter filter__label clear-all-filters">
572                <button type="button" class="clear-all-filters-btn" onclick=${()=>{helpers.clearAllFilters(),clearAllFilterDataLayerEvent(props)}}>
573                  <span class="filter__label applied-filter-label">${args.labels.filters.clearAllFilters}</span>
574                </button>
575              </li>
576            </ul>
577          `:html``}},filter:{render:function(html,args){return window.renderHelpers.filter(html,args)}},filterHeader:{render:function(html,args){return window.renderHelpers.filterHeader(html,args)}},filterItems:{render:function(html,args){var props=args.props;return props.filter.type==="checkbox"?html`
578                <div class="filter__list filter-body filter-body-checkboxes ${props.filter.id}">
579                  <${args.templates.filterCheckBoxes} filterId=${props.filter.id} filterItems=${props.filter.items} />
580                </div>
581              `:html`
582              <div class="filter__list filter-body filter-body-range">
583                <${args.templates.rangeSliderFilterItem} filter=${props.filter} />
584              </div>
585            `}},filterCheckBoxes:{render:function(html,args){var props=args.props;return html`
586            <ul class="filter-checkboxes">
587              ${props.filterItems.map(filterItem=>html`
588                <${args.templates.checkboxFilterItem}
589                  filterId=${props.filterId}
590                  filterItem=${filterItem}
591                >
592                ${filterItem.selected&&filterItem.items?html`
593                        <${args.templates.filterCheckBoxes}
594                          filterId=${props.filterId}
595                          filterItems=${filterItem.items}
596                        />
597                      `:""}
598              </${args.templates.checkboxFilterItem}>
599            `)}
600            </ul>
601          `}},filterCheckBoxes:{render:function(html,args){var props=args.props,showLessHtml="";return html`
602              <ul class="filter-checkboxes">
603                ${props.filterItems.map((filterItem,index)=>{var classname="",showMoreHtml="";if(window.innerWidth<768&&props.filterId=="colour"){if(index==18){var show_more_count=props.filterItems.length-18;classname="expand",showMoreHtml=html`<li class="show_more"><button class="show_more_color">${args.labels.ui.showMoreCount.replace("{{ count }}",show_more_count)}</button></li>`,showLessHtml=html`<li class="show_less" style="display:none;"><button class="show_less_color">${args.labels.ui.showLess}</button></li>`}}else if(index==5){var show_more_count=props.filterItems.length-5;classname="expand",showMoreHtml=html`<li class="show_more"><button class="show_more_click">${args.labels.ui.showMoreCount.replace("{{ count }}",show_more_count)}
603</button></li>`,showLessHtml=html`<li class="show_less" style="display:none;"><button class="show_less_click">${args.labels.ui.showLess}</button></li>`}return html`
604                 ${showMoreHtml}
605                  <${args.templates.checkboxFilterItem}
606                    filterId=${props.filterId}
607                    filterItem=${filterItem}
608                    index=${index}
609                    class=${classname}
610                  >
611                  ${filterItem.selected&&filterItem.items?html`
612                          <${args.templates.filterCheckBoxes}
613                            filterId=${props.filterId}
614                            filterItems=${filterItem.items}
615                          />
616                        `:""}
617                </${args.templates.checkboxFilterItem}>
618              `})}
619                ${showLessHtml}
620              </ul>
621            `}},checkboxFilterItem:{render:function(html,args){var props=args.props,helpers=props.helpers;const onFilterClick=event=>{event.stopPropagation(),props.filterItem.selected?(helpers.clearFilter(props.filterId,props.filterItem.id),removeFilterDataLayerEvent(props,props.filterId,props.filterItem)):(helpers.applyFilter(props.filterId,props.filterItem.id),applyFilterDataLayerEvent(props))};var icon="",code="#1A1A1A";if(props.filterId=="colour"){var filterName=String(props.filterItem.label.trim()).toLowerCase();window.plp_vars.coloursMeta[filterName]&&(window.plp_vars.coloursMeta[filterName].icon?icon=window.plp_vars.coloursMeta[filterName].icon:window.plp_vars.coloursMeta[filterName].code&&(code=window.plp_vars.coloursMeta[filterName].code))}var colour_icon=html`<span></span>`;return props.filterId=="colour"&&(icon!=""?colour_icon=html`<span class="colour-icon"><img width="16" height="16" loading="lazy" src="${icon}" /></span>`:code!=""&&(colour_icon=html`<span class="colour-icon"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
622                            <g id="Colour">
623                            <circle  cx="8" cy="8" r="8" fill="${code}"></circle>
624                            </g>
625                            </svg></span>`)),html`
626              <li class="filter-item ${props.filterId}" data-filter-item-id=${props.filterItem.id} onClick=${onFilterClick}>
627                <div class="filter__type filter-checkbox-and-label ${props.filterItem.label.toLowerCase()}">
628                  ${colour_icon}
629                  <input name="filter_${props.filterItem.id}" class="checkbox" checked=${props.filterItem.selected} type="checkbox" aria-label=${args.labels.filters.filterItem} />
630                  <span class="filter-item-label-and-count">
631                    <span class="filter-item-label">${props.filterItem.label.toLowerCase()}</span>
632                    ${props.showMatchingProductsCount?html`
633                          <span class="filter-item-count">(${props.filterItem.count})</span>
634                        `:""}
635                  </span>
636                </div>
637                ${props.children}
638              </li>
639            `}},rangeSliderFilterItem:{render:function(html,args){var props=args.props,helpers=props.helpers;let{priceLabel,minPriceValue,maxPriceValue,priceValueLeft,priceValueRight,priceValueLeftClass,priceValueRightClass}=window.renderHelpers.rangeSliderFilterItem(html,args);return html`
640              <div class="range-slider filter-item">
641                <span class="max-range-info" style="display:none;">${priceLabel}</span>
642                <div class="price-range-value" style="display:none;">
643                  <span class="price-range__label--min-price ${priceValueLeftClass}" style="left: ${priceValueLeft};">
644                    ${minPriceValue}
645                  </span>
646                  <span class="price-range__label--max-price ${priceValueRightClass}" style="right: ${priceValueRight};">
647                    ${maxPriceValue}
648                  </span>
649                </div>
650
651                <div></div>
652                <div class="price-range__input-group">
653                  <div class="min-price">
654                  <span class="min-label">${args.labels.filters.min}</span>
655                  <div class="price-range__input input-prefix input-container">
656                    <span class="input-prefix__value">${window.theme.currentCurrencySymbol}</span>
657                    <input
658                      id="priceRangeMin"
659                      type="number"
660                      inputmode="numeric"
661                      class="input-prefix__field field__input pr-input"
662                      placeholder=${props.sliderInputValues[0]}
663                      value=${props.sliderInputValues[0]}
664                      onblur=${props.onInputBlur}
665                      onchange=${props.onMinChange}
666                      onfocus=${this.value=""}
667                      aria-label=${args.labels.filters.priceRangeInput}
668                    />
669                    <label style="display:none;" for="priceRangeMin">
670                      ${helpers.labelFormatter(props.filter.display_format,props.filter.min,props.filter.currency)}
671                    </label>
672                  </div>
673                  </div>
674                  <span class="to" style="display:none;">${args.labels.filters.rangeFilterValueSeparator}</span>
675                   <div class="min-price">
676                  <span class="min-label">${args.labels.filters.max}</span>
677                  <div class="price-range__input input-prefix input-container">
678                    <span class="input-prefix__value">${window.theme.currentCurrencySymbol}</span>
679                    <input
680                      id="priceRangeMax"
681                      type="number"
682                      inputmode="numeric"
683                      class="input-prefix__field field__input pr-input"
684                      placeholder=${props.sliderInputValues[1]}
685                      value=${props.sliderInputValues[1]}
686                      onblur=${props.onInputBlur}
687                      onchange=${props.onMaxChange}
688                    />
689                    <label style="display:none;" for="priceRangeMax">
690                      ${helpers.labelFormatter(props.filter.display_format,props.filter.max,props.filter.currency)}
691                    </label>
692                  </div>
693                  </div>
694                </div>
695                <div ref=${props.sliderRef} />
696              </div>
697            `}},sortOptionInFilters:{render:function(html,args){var props=args.props,helpers=props.helpers,filterOptions=helpers.getTemplateOptions("filters"),appliedSortOption=helpers.getAppliedSortOption(),sortOptions=helpers.getSortOptions();let classes=["filter"],isCollapseOpen=!1;filterOptions.collapsible&&(isCollapseOpen=helpers.isCollapsibleFilterExpanded("sort_options"),isCollapseOpen?classes.push("is-expanded"):classes.push("collapsed"));var className=classes.join(" ");return html`
698            <div data-filter-id="sort_options" class=${className}>
699              <${args.templates.filterHeader} filterHeading=${args.labels.sortOptions.sortBy} filterId=${"sort_options"} />
700              <div class="filter-body filter-body-checkboxes">
701                <ul class="filter-checkboxes">
702                  ${sortOptions.map(sortOption=>{const checked=sortOption.id===appliedSortOption.id;return html`
703                      <li
704                        class="filter-item"
705                        data-filter-item-id=${sortOption.id}
706                        onClick=${()=>{helpers.applySortOption(sortOption.id),clickSortOptionDataLayerEvent(helpers)}}
707                      >
708                        <span class="filter-checkbox-and-label">
709                          <input class="checkbox" checked=${checked} type="checkbox" />
710                          <span class="filter-item-label-and-count">
711                            <span class="filter-item-label">${sortOption.label}</span>
712                          </span>
713                        </span>
714                      </li>
715                    `})}
716                </ul>
717              </div>
718            </div>
719          `}},pagination:{options:{infiniteScroll:!0,trackPageNumbersForInfiniteScroll:!0,showLoadNextAfterEvery:1},render:function(html,args){var props=args.props,helpers=props.helpers,plp_limit=window.theme.tagalysSearchResultCount;let shownProductsCount=plp_limit-8;if(props.infiniteScroll)if(searchFiltersSticky(),helpers.isLoading()){const productCards=document.querySelectorAll(".product-card-wrapper.last-products");productCards&&productCards.length>0&&productCards.forEach(card=>{card.style.removeProperty("display"),card.classList.remove("last-products")});let placeholderCount=plp_limit,placeholderHtml=[];for(var i=0;i<placeholderCount;i++){let _html=html`<div class="grid__item medium-down--one-half large-up--one-whole html2 placeholder-product-card">
720                ${window.tagalysIcon.placeholderProductCard(html)}
721                </div>`;window.innerWidth<=989&&(_html=html`<div class="grid__item medium-down--one-half large-up--one-whole html2 placeholder-product-card">${window.tagalysIcon.placeholderProductCardSmall(html)}</div>`),placeholderHtml.push(_html)}return html`${placeholderHtml}`}else{let buttonHtml=html`<button class="load-next btn btn--primary" onclick=${props.helpers.loadNextPage}>
722              ${helpers.isLoading()?args.labels.pagination.loading:args.labels.pagination.loadNext}
723            </button>`;if(helpers.hasNextPage()||(buttonHtml=""),!helpers.hasNextPage()&&helpers.canLoadPreviousResults()==!1)shownProductsCount=helpers.getTotalProductsCount();else{const productCards=document.querySelectorAll(".product-card-wrapper");if(productCards&&productCards.length>0){const lastProductCard=Array.from(productCards).slice(-8);lastProductCard&&lastProductCard.length>0&&lastProductCard.forEach(card=>{card.style.display="none",card.classList.add("last-products")}),shownProductsCount=productCards.length-8}}const percentage=Number(Math.min(100,Math.max(0,shownProductsCount/helpers.getTotalProductsCount()*100)).toFixed(2));return html`<div class="infinite-scroll-content text-center m-b-xs">
724           <div class="grid__item one-whole search-result-count">You've viewed ${shownProductsCount} of ${helpers.getTotalProductsCount()} products</div>
725           <div class="progress-bar-container">
726            <div class="progress-bar">
727              <div class="load-more-progress-fill" style="width: ${percentage}%;"></div>
728            </div>
729          </div>${buttonHtml}
730            </div>
731          `}return html`
732              <div class="grid__item one-whole collection__pagination pagination">
733                <${args.templates.paginationLinks} />
734              </div>
735            `}},loadPrevious:{render:function(html,args){var props=args.props,helpers=props.helpers;return html`<div class="previous-products-load-wrapper text-center m-b-xs">
736        <button class="load-previous  btn btn--primary" onclick=${props.helpers.loadPreviousPage}>
737          ${helpers.isLoading()?args.labels.pagination.loading:args.labels.pagination.loadPrevious}
738        </button>
739        </div>
740      `}},paginationLinks:{options:{showNumberedPageLinks:!0,numberedPageLinksWindowSize:3,showPreviousPageLink:!0,show
740FirstPageLink:!0,showNextPageLink:!0,scrollTop:!0},render:function(html,args){var props=args.props,helpers=props.helpers,pagesToDisplay=helpers.getPagesToDisplay(props.numberedPageLinksWindowSize);if(!(pagesToDisplay.length<=1)){var currentPage=helpers.getCurrentPage(),hasPreviousPage=helpers.hasPreviousPage(),hasNextPage=helpers.hasNextPage(),goToFirstPage=()=>{helpers.goToPage(1)};return html`
741            <ul class="ais-pagination">
742              ${props.showFirstPageLink?html`
743                    <li class="ais-pagination__item ais-pagination__item--first">
744                      <button
745                        class=${`ais-pagination__link${currentPage===1?" disabled":""}`}
746                        onclick=${currentPage===1?void 0:goToFirstPage}
747                      >
748                        &lt;
749                      </button>
750                    </li>
751                  `:""}
752              ${props.showPreviousPageLink?html`
753                    <li
754                      class=${`ais-pagination__item ais-pagination__item--previous${hasPreviousPage?"":" ais-pagination__item--disabled"}`}
755                    >
756                      <button
757                        class=${`ais-pagination__link${hasPreviousPage?"":" disabled"}`}
758                        onclick=${currentPage===1?void 0:helpers.goToPreviousPage}
759                      >
760                        ${"<"}
761                      </button>
762                    </li>
763                  `:""}
764              ${props.showNumberedPageLinks?pagesToDisplay.map(pageDetail=>{var classes=["ais-pagination__item"],showEllipsis=pageDetail.jumpAfter;pageDetail.current&&classes.push("ais-pagination__item--active"),pageDetail.jumpAfter&&classes.push("page-jump-over");var className=classes.join(" ");return pageDetail.page==helpers.getTotalPages()?html``:html`
765                      <li class=${`${className}`}>
766                        <button
767                          class="ais-pagination__link"
768                          onclick="${()=>{!showEllipsis&&helpers.goToPage(pageDetail.page)}}"
769                        >
770                          ${showEllipsis?"...":pageDetail.page}
771                        </button>
772                      </li>
773                    `}):""}
774              ${props.showNextPageLink?html`
775                  ${helpers.getCurrentPage()!=helpers.getTotalPages()?html`
776                      <li class="ais-pagination__item">
777                        <button class="ais-pagination__link" onclick="${()=>{helpers.goToPage(helpers.getTotalPages())}}">
778                          ${helpers.getTotalPages()}
779                        </button>
780                      </li>`:html`
781                      <li class="ais-pagination__item ais-pagination__item--active">
782                        <button
783                          class="ais-pagination__link"
784                          onclick="${()=>{helpers.goToPage(helpers.getTotalPages())}}"
785                        >
786                          ${helpers.getTotalPages()}
787                        </button>
788                      </li>`}
789                  <li class=${`ais-pagination__item ais-pagination__item--next${hasNextPage?"":" ais-pagination__item--disabled"}`}>
790                    <button
791                      class=${`ais-pagination__link${hasNextPage?"":" disabled"}`}
792                      onclick=${hasNextPage?helpers.goToNextPage:void 0}
793                    >
794                      ${">"}
795                    </button>
796                  </li>`:""}
797            </ul>
798          `}}},downArrow:{render:function(html,args){return html`
799            ${window.tagalysIcon.chevron.down(html)}
800            ${window.tagalysIcon.chevron.up(html)}
801          `}}},callbacks:{onSuccessfulAPICall:function(response,helpers){const topSearchInput=document.querySelector(".search__input"),bodySearchInput=document.querySelector("#search-input");typeof helpers.getQuery()<"u"&&topSearchInput&&(topSearchInput.value=helpers.getQuery()),bodySearchInput&&bodySearchInput.addEventListener("focus",function(){document.querySelector(".header__btn--search").click()});
801const elementToObserve=document.querySelector(".tagalys-search-suggestions"),searchWrapper=document.querySelector("#search--app");return searchWrapper&&elementToObserve&&searchWrapper.appendChild(elementToObserve),new MutationObserver(()=>{const searchContainer=document.querySelector(".search-results-container");elementToObserve.hasChildNodes()?searchContainer.classList.add("search-active"):searchContainer.classList.remove("search-active")}).observe(elementToObserve,{subtree:!0,childList:!0}),$(document).on("focus",".pr-input",function(){this.value=""}),window.renderHelpers.hideOpenedVariants(),setTimeout(function(){window.renderHelpers.updateProductCards(".product-card")},2e3),setTimeout(function(){window.renderHelpers.checkStickyElements(".product-card")},1e3),response}}})};function whenTagalysStatisticsReady(fn){window.theme.consentGating&&window.lovisaConsent?(window.lovisaConsent.onConsentReady(function(){window.lovisaConsent.hasStatistics()&&fn()}),window.addEventListener("lovisa:consent-updated",function(){window.lovisaConsent.hasStatistics()&&fn()})):fn()}onTagalysReady(function(){window.theme.searchProvider=="tagalys"&&(window.theme.template.name==="search"&&(TagalysCustomisations.initTagalysSearchResults(),setTimeout(cleanTagalysRecentSearches,1e3)),whenTagalysStatisticsReady(function(){TagalysCustomisations.initTagalysSearchSuggestions()}))});function searchFiltersSticky(){window.innerWidth>768?setTimeout(function(){var headerHight=typeof theme.getStickyHeaderHeight=="function"?theme.getStickyHeaderHeight():0;headerHight<100&&(headerHight=114),window.theme._sb_headerSection&&window.theme._sb_headerSection.update(),window.theme._sb_collectionSorting&&window.theme._sb_collectionSorting.update(),window.theme._sb_collectionFiltersBlock&&window.theme._sb_collectionFiltersBlock.update(),window.theme._sb_collectionFiltersActions&&window.theme._sb_collectionFiltersActions.update()},1e3):setTimeout(function(){window.theme._sb_collectionFiltersActions&&window.theme._sb_collectionFiltersActions.update()},1e3)}document.addEventListener("DOMContentLoaded",function(){var lastId=sessionStorage.getItem("tagalys_product_card_clicked");if(lastId)var productFindInterval=setInterval(function(){var productCard=document.querySelector(`.product-card[data-sku="${lastId}"]`);productCard&&(productCard.scrollIntoView({behavior:"smooth",block:"center"}),sessionStorage.removeItem("tagalys_product_card_clicked"),clearInterval(productFindInterval))},100)});
802//# sourceMappingURL=/cdn/shop/t/811/assets/tagalys-script.js.map?v=9019566175155535201789977862

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.