1let swsUtils={analyticCategoryTypes:{search_term_has_results:"[Search term] has results",search_term_no_results:"[Search term] no results",promo_banner_click:"[Promo banner] link click",selected_categories_click:"[Selected Categories] link click",recommended_products_click:"[Recommended Products] link click",search_results_link_click:"[Found Suggestions] link click",search_results_cart_click:"[Found Suggestions] add-to-cart click",view_all_click:"[View All] button click"},pushToDataLayer:function(e,s,t){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"swsEvent",swsTerm:e,swsCategory:s,swsWidgetId:t})},pushToAnalytics:function(e){var{term:e,category:s,wId:t}=e;window.swsL10n.analytics.ga4&&(console.log("SWS pushToAnalytics ",`[${t}]: [${e}] "${s}"`),swsUtils.pushToDataLayer(e,s,t))},updateRecentSearches:(e=!1)=>{!0===e&&document.querySelector(".sws-search-recent-wrapper")?.classList.remove("sws-search-recent-wrapper--hidden_mod");e=JSON.parse(localStorage.getItem("swsLatestSearches")).slice(-5);let t=document.querySelector(".sws-search-recent-list");t.innerHTML="",e.forEach(e=>{var s=document.createElement("li");s.className="sws-search-recent-list-item",s.innerHTML=` 2 <span class="sws-search-recent-list-item-trigger">${e}</span> 3 <span class="sws-search-recent-list-item-delete" data-item="${e}" aria-label="close"> 4 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960" fill="currentColor"> 5 <path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/> 6 </svg> 7 </span> 8 `,t.appendChild(s)})}};document.addEventListener("DOMContentLoaded",function(){window.swsL10n.analytics.ga4&&(document.addEventListener("click",function(e){var s;e.target.closest(".sws-promo-banner")&&(s=e.target.closest("a"))&&(e.preventDefault(),e=s.getAttribute("href"),s=s.closest("form"),swsUtils.pushToAnalytics({term:e,category:swsUtils.analyticCategoryTypes.promo_banner_click,wId:s?s.getAttribute("data-id"):null}),window.open(e,"_blank"))},!0),document.addEventListener("click",function(e){var s=e.target.closest(".sws-selected-categories-link");s&&(e.preventDefault(),e=s.getAttribute("href"),s=s.closest("form"),swsUtils.pushToAnalytics({term:e,category:swsUtils.analyticCategoryTypes.selected_categories_click,wId:s?s.getAttribute("data-id"):null}),window.open(e,"_blank"))},!0),document.addEventListener("click",function(e){var s;e.target.closest(".sws-selected-products-item")&&(s=e.target.closest("a"))&&(e.preventDefault(),e.stopImmediatePropagation(),e=s.getAttribute("href"),s=s.closest("form"),swsUtils.pushToAnalytics({term:e,category:swsUtils.analyticCategoryTypes.recommended_products_click,wId:s?s.getAttribute("data-id"):null}),window.open(e,"_blank"))},!0),document.addEventListener("click",function(e){var s=e.target.closest("a.smart-search-post-url");s&&!s.classList.contains("add_to_cart_button")&&(e.preventDefault(),e.stopImmediatePropagation(),e=s.getAttribute("href"),s=s.closest("form"),swsUtils.pushToAnalytics({term:e,category:swsUtils.analyticCategoryTypes.search_results_link_click,wId:s?s.getAttribute("data-id"):null}),window.open(e,"_blank"))},!0),document.addEventListener("click",function(e){var s,t,i;e.target.closest(".smart-search-add_to_cart-holder")&&(s=e.target.closest("a"))&&((t=s.classList.contains("ajax_add_to_cart"))||e.preventDefault(),e=(e=s.closest(".autocomplete-suggestion"))?e.querySelector(".smart-search-post-url")?.getAttribute("href"):null,i=s.closest("form"),swsUtils.pushToAnalytics({term:e,category:swsUtils.analyticCategoryTypes.search_results_cart_click,wId:i?i.getAttribute("data-id"):null}),t||window.open(s.getAttribute("href"),"_blank"))},!0),document.addEventListener("click",function(e){var s,t;e.target.closest(".smart-search-view-all-holder")&&(s=e.target.closest("a"))&&(e.preventDefault(),e.stopImmediatePropagation(),e=s.getAttribute("href"),(s=s.closest("form"))&&(t=s.querySelector('.smart-search-input-wrapper input[type="search"]')||s.querySelector('input[type="search"]')||s.querySelector('input[type="text"]'))&&swsUtils.pushToAnalytics({term:t.value,category:swsUtils.analyticCategoryTypes.view_all_click,wId:s.getAttribute("data-id")}),window.open(e,"_blank"))},!0))}),(k=>{k(function(){var _=window.swsL10n||{};if(_)for(var t in _.widgets)if(k(_.widgets[t].selector).length){let e=_.widgets[t],s={id:t,serviceUrl:_.restUrl+"id="+encodeURIComponent(t),layout:_.widgets[t].layout,columns:_.widgets[t].columns,productSlug:_.widgets[t].productSlug,maxHeight:_.widgets[t].popupHeight,maxHeightMobile:_.widgets[t].popupHeightMobile,minChars:_.widgets[t].charCount,disableAjax:_.widgets[t].disableAjax,no_results_text:_.widgets[t].noResultsText,loaderIcon:_.widgets[t].loaderIcon,loaderImage:_.widgets[t].loaderImage,preventBadQueries:_.widgets[t].preventBadQueries,fullScreenMode:_.widgets[t].fullScreenMode,placeholder:_.widgets[t].placeholder,recentSearches:_.widgets[t].recentSearches,recentSearchesTitle:_.widgets[t].recentSearchesTitle,keywords:_.widgets[t].keywords,keywordsLabel:_.widgets[t].keywordsLabel,selectedCategories:_.widgets[t].selectedCategories,selectedCategoriesLabel:_.widgets[t].selectedCategoriesLabel,selectedCategoriesLocation:_.widgets[t].selectedCategoriesLocation,selectedCategoriesMobile:_.widgets[t].selectedCategoriesMobile,selectedCategoriesCount:_.widgets[t].selectedCategoriesCount,selectedCategoriesOnOpen:_.widgets[t].selectedCategoriesOnOpen,selectedProducts:_.widgets[t].selectedProducts,selectedProductsLabel:_.widgets[t].selectedProductsLabel,selectedProductsMobile:_.widgets[t].selectedProductsMobile,promoBannerLocation:_.widgets[t].promoBannerLocation,promoBannerImage:_.widgets[t].promoBannerImage,promoBannerLink:_.widgets[t].promoBannerLink,promoBannerOnOpe
8n:_.widgets[t].promoBannerOnOpen,selectedPromoBannerMobile:_.widgets[t].selectedPromoBannerMobile};k(e.selector).each(function(){var f=e.fullScreenMode,y=768<=k(window).width();if("desktop_only"==f&&y||"mobile_only"==f&&!y||"enable"==f){y=this;f=s;let g=f.placeholder||"",m=k(y),w="FORM"===y.tagName||"form"===y.tagName?m:m.find("form"),v=w.find(".smart-search-popup");if(!m.hasClass("ysm-active")&&!w.hasClass("ysm-active")){if(w.addClass("ysm-active").addClass("ysm-hide"),!k(document.body).toggleClass("ysm-widget-active",!k(document.body).hasClass("ysm-widget-active")))return;k(document.body).hasClass("ysm-widget-active")&&(m.parents(".et_pb_column").css({overflow:"visible",zIndex:"10"}),m.parents(".et_pb_module").css("overflow","visible")),k('<div class="smart-search-fullscreen"><div class="smart-search-fullscreen-backdrop"></div><div class="smart-search-fullscreen-inner"><div class="smart-search-input-wrapper"><input type="search" class="ssf-search-input" placeholder="'+g+'" name="s" id="smart-search-fullscreen-'+f.id+'"><span class="ssf-search-icon-search"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="currentColor"><path d="M784-120 532-372q-30 24-69 38t-83 14q-109 0-184.5-75.5T120-580q0-109 75.5-184.5T380-840q109 0 184.5 75.5T640-580q0 44-14 83t-38 69l252 252-56 56ZM380-400q75 0 127.5-52.5T560-580q0-75-52.5-127.5T380-760q-75 0-127.5 52.5T200-580q0 75 52.5 127.5T380-400Z"/></svg></span><span class="ssf-search-icon-close" aria-label="close"><svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24" fill="currentColor"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg></span></div><div class="smart-search-results-main"><div class="smart-search-results">\t<div class="smart-search-results-inner"></div></div></div></div></div>').appendTo(w);let e=w.find(".smart-search-fullscreen"),s=w.find(".smart-search-fullscreen-backdrop"),t=m.find('input[type="search"]').length?m.find('input[type="search"]'):m.find('input[type="text"]'),o=(m.find(".ssf-search-input").length,m.find(".ssf-search-input")),a=w.find(".smart-search-results-main"),l=w.find(".smart-search-results"),c=l.find(".smart-search-results-inner"),i=w.find(".ssf-search-icon-close"),r=m.find(".search-submit").length?m.find(".search-submit"):"",d=JSON.parse(localStorage.getItem("swsLatestSearches"))||[],h=[];y={id:"",serviceUrl:_.restUrl,layout:"",columns:1,productSlug:"product",maxHeight:500,maxHeightMobile:400,minChars:3,disableAjax:!1,no_results_text:"",loaderIcon:"",preventBadQueries:!0,cache:!0};let u=k.extend({},y,f);if(u.selectedCategories||u.promoBannerImage){a.addClass("smart-search-results-main--column_mod"),u.selectedCategoriesMobile&&a.addClass("smart-search-results-main--hidden_mobile_mod"),u.selectedCategoriesOnOpen&&a.addClass("smart-search-results-main--on_open_mod"),k('<div class="sws-sidebar-holder"></div>').prependTo(a),k('<div class="sws-sidebar sws-sidebar--left-mod"><div class="sws-sidebar-widget sws-sidebar--left_slot"></div><div class="sws-sidebar-widget sws-sidebar--left_slot_2"></div></div>').prependTo(a),k('<div class="sws-sidebar sws-sidebar--right-mod"><div class="sws-sidebar-widget sws-sidebar--right_slot"></div><div class="sws-sidebar-widget sws-sidebar--right_slot_2"></div></div>').appendTo(a);let e=k('<div class="sws-selected-categories "><h4 class="sws-selected-categories-title">'+u.selectedCategoriesLabel+'</h4><ul class="sws-selected-categories-list"></ul></div>');u.selectedCategories||(e="");var y=a.find(".sws-sidebar--left-mod .sws-sidebar--left_slot"),f=a.find(".sws-sidebar--left-mod .sws-sidebar--left_slot_2"),b=a.find(".sws-sidebar--right-mod .sws-sidebar--right_slot"),C=a.find(".sws-sidebar--right-mod .sws-sidebar--right_slot_2");let s="";s=u.promoBannerLink.length?k('<div class="sws-promo-banner"><a href="'+u.promoBannerLink+'" target="_blank"> '+u.promoBannerImage+"</a></div>"):k('<div class="sws-promo-banner">'+u.promoBannerImage+"</div>"),k(".sws-sidebar-holder").hide(),u.selectedCategories&&e.prependTo(a.find(".sws-sidebar--"+u.selectedCategoriesLocation)),u.promoBannerImage&&(u.promoBannerOnOpe
8n&&a.addClass("smart-search-results-main--banner_on_open_mod"),s.prependTo(a.find(".sws-sidebar--"+u.promoBannerLocation)),u.selectedPromoBannerMobile)&&k(".sws-promo-banner").addClass("sws-promo-banner--hidden_mobile_mod"),b.is(":empty")&&C.is(":empty")&&a.addClass("smart-search-results-main--widgets-on-left--mod"),y.is(":empty")&&f.is(":empty")&&(k(".sws-sidebar-holder").show(),a.addClass("smart-search-results-main--widgets-on-right--mod")),u.selectedCategories&&u.selectedCategories.forEach(e=>{a.find(".sws-selected-categories-list").append(` 9 <li class="sws-selected-categories-item"> 10 <a class="sws-selected-categories-link" href="${e.url}" target="_blank"> 11 ${e.name} 12 ${u.selectedCategoriesCount&&0<e.count?`(${e.count})`:""} 13 </a> 14 </li> 15 `)})}u.recentSearches&&(k('<div class="sws-search-recent-wrapper sws-search-recent-wrapper--hidden_mod"><h4 class="sws-search-recent-title">'+u.recentSearchesTitle+'</h4><ul class="sws-search-recent-list"></ul></div>').prependTo(a),d.length)&&swsUtils.updateRecentSearches(!0),u.loaderImage.length&&o.parent().append("<img src="+u.loaderImage+' class="sws-loader-image" alt="Loading...">'),u.selectedProducts&&(a.addClass("smart-search-results-recent-products--mod"),l.addClass("smart-search-results-hidden"),k('<div class="sws-recent-products-wrapper"><h3 class="sws-recent-products-heading">'+u.selectedProductsLabel+'</h3><div class="swiper swsProductsSwiper sws-recent-products"><div class="swiper-wrapper"></div></div><div class="swiper-button-next"></div><div class="swiper-button-prev"></div></div>').insertBefore(a.find(".smart-search-results")),u.selectedProductsMobile&&k(".sws-recent-products-wrapper").addClass("sws-recent-products-wrapper--hidden_mobile_mod"),u.selectedProducts.forEach(t=>{var e=` 16 <div class="swiper-slide"> 17 <div class="sws-selected-products-item"> 18 <a class="sws-selected-products-picture" href="${t.permalink}"><picture>${t.image}</picture></a> 19 <div class="smart-search-post-category">${t.category}</div> 20 <a class="sws-selected-products-title" href="${t.permalink}">${t.name}</a> 21 <div class="sws-selected-products-meta"> 22 ${0<t.rating_count?`<div class="sws-product-rating" style="display: flex; gap: 2px; float: left;"> 23 ${[...Array(5)].map((e,s)=>{s+=1;return t.average_rating>=s?'<span style="color: #ffc107; font-size: 20px;">â </span>':t.average_rating>=s-.5?'<span style="color: #ffc107; font-size: 20px;">â</span>':'<span style="color: #ddd; font-size: 20px;">â</span>'}).join("")} 24 </div>`:""} 25 ${t.price} 26 ${"variable"===t.type?`<a href="${t.permalink}" class="button product_type_variable" target="_blank" rel="nofollow"> 27 <img src="${t.icon_variable}" alt=""> 28 </a>`:`<a href="?add-to-cart=${t.id}" 29 class="button add_to_cart_button ajax_add_to_cart" 30 data-product_id="${t.id}" 31 aria-label="Add â${t.name}â to your cart" 32 rel="nofollow"> 33 <img src="${t.icon}" alt=""> 34 </a>`} 35 </div> 36 </div> 37 </div> 38 `;a.find(".swiper-wrapper").append(e)}),(b=document.createElement("script")).src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js",b.async=!0,b.onload=function(){new Swiper(".swsProductsSwiper",{slidesPerView:"auto",spaceBetween:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",clickable:!0}})},document.body.appendChild(b)),k(document).off("click",".sws-search-recent-list-item-trigger").on("click",".sws-search-recent-list-item-trigger",e=>{e.stopPropagation();var s=k(e.target).text();k(e.currentTarget).parents("form").find('input[type="search"]').val(s).focus()}),k(document).off("click",".sws-search-recent-list-item-delete").on("click",".sws-search-recent-list-item-delete",function(e){e.stopPropagation();let s=k(this).data("item");e=JSON.parse(localStorage.getItem("swsLatestSearches")).filter(e=>e!==s);localStorage.setItem("swsLatestSearches",JSON.stringify(e)),d=JSON.parse(localStorage.getItem("swsLatestSearches")),swsUtils.updateRecentSearches(!0),0==d.length&&k(".sws-search-recent-wrapper").addClass("sws-search-recent-wrapper--hidden_mod")});let n=()=>{e.addClass("ssf-active"),d=JSON.parse(localStorage.getItem("swsLatestSearches"))||[],setTimeout(()=>{e.addClass("ssf-animated"),k(document.body).addClass("ysm-widget-opened"),k(".ssf-search-input").focus()},100)},p=()=>{e.removeClass("ssf-active ssf-animated"),k(document.body).removeClass("ysm-widget-opened"),k(".sws-search-recent-wrapper").removeClass("sws-search-recent-wrapper--hidden_by_keywords"),k(".smart-search-keywords-wrapper").addClass("smart-search-keywords-wrapper--hidden_mod"),setTimeout(()=>{k(".ssf-search-input").val(""),l.css({maxHeight:0}),k(".smart-search-view-all-holder").hide(),k(".smart-search-suggestions").empty(),w.addClass("ysm-hide"),w.removeClass("sws-no-results"),u.selectedProducts&&(k(".sws-recent-products-wrapper").show(),l.addClass("smart-search-results-hidden"))},500)};t.on("click",()=>{n()}),r.length&&r.on("click",()=>{n()}),k(document).on("keydown",e=>{"Tab"===e.key&&setTimeout(()=>{k(document.activeElement).is(t)&&n()},0),"Escape"===e.key&&p()}),s.on("click",()=>{p()}),0<i.length&&i.on("click",function(){p()});var S,x=Math.min(window.screen.width,window.screen.height)<768?u.maxHeightMobile:u.maxHeight;w.on("submit",function(e){var s=o.val();if(""===s||s.length<u.minChars)return!1;var t=_.searchPageUrl;s=(s=s.replace(/\+/g,"%2b")).replace(/\s/g,"+"),t=(t+=-1!==t.indexOf("?")?"&":"?")+"s="+s+"&search_id="+u.id,"product"===u.layout&&(t+="&post_type="+u.productSlug),e.preventDefault(),window.swsL10n.analytics.ga4?(swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.view_all_click,wId:u.id}),window.open(t,"_blank")):location.href=t}
38),u.disableAjax||(S=0,o.outerWidth()&&(S=o.outerWidth(),v.css({width:S+"px"})),-1!==navigator.userAgent.indexOf("Windows")&&-1!==navigator.userAgent.indexOf("Firefox")&&l.addClass("smart-search-firefox"),k(window).on("resize",function(){v.css({width:o.outerWidth()+"px"})}),o.devbridgeAutocomplete({minChars:u.minChars,appendTo:c,serviceUrl:u.serviceUrl,maxHeight:1e5,dataType:"json",deferRequestBy:100,noCache:!u.cache,containerClass:"smart-search-suggestions",triggerSelectOnValidInput:!1,showNoSuggestionNotice:!!u.no_results_text.length,noSuggestionNotice:u.no_results_text,preventBadQueries:u.preventBadQueries,ajaxSettings:{beforeSend:function(e){_.nonce&&e.setRequestHeader("X-WP-Nonce",_.nonce)}},formatResult:function(e,s){return e.data},onSearchStart:function(e){-1!==this.value.indexOf(" ")&&(this.value=this.value.replace(/\s+/g," ")),e.query=e.query.replace(/%20/g," "),this.value!=e.query+" "&&(u.loaderImage.length||o.css({"background-image":"url("+u.loaderIcon+")","background-repeat":"no-repeat","background-position":"50% 50%"}),k(".sws-loader-image").addClass("sws-loader-image--visible"),w.addClass("ysm-hide").removeClass("sws-no-results"),a.addClass("sws-hiding-results"),l.removeClass("smart-search-results-hidden"))},onSelect:function(e){-1!=e.id&&e.url&&!e.addToCart&&(window.location.href=e.url)},transformResult:function(e,s){e&&e.suggestions&&0<e.suggestions.length?swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.search_term_has_results,wId:u.id}):swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.search_term_no_results,wId:u.id});s="string"==typeof e?k.parseJSON(e):e;o.val();return s&&s.view_all_link&&""!=s.view_all_link&&(a.find(".smart-search-view-all-holder").length||a.addClass("has-viewall-button").append('<div class="smart-search-view-all-holder"></div>'),a.find(".smart-search-view-all-holder").html(s.view_all_link)),o.css("background-image","none"),k(".sws-loader-image").removeClass("sws-loader-image--visible"),s},onSearchComplete:function(s,t){if(k.trim(s)===k.trim(o.val())){S||(S=o.outerWidth(),v.css({width:S+"px"})),o.css("background-image","none"),k(".sws-loader-image").removeClass("sws-loader-image--visible");var i=(s,t,i)=>{if(o.val().length<u.minChars)s.hide();else{var r=o.devbridgeAutocomplete();let e=u.serviceUrl;t=(e=k.isFunction(e)?e.call(r.element,t):e)+"?"+k.param({query:t});r.cachedResponse&&r.cachedResponse[t]&&i(r.cachedResponse[t]),s.show()}},r=a.find(".smart-search-view-all-holder");if((r.length||u.keywords)&&(r.length&&i(r,s,e=>{r.html(e.view_all_link)}),u.keywords)&&(n=k(".sws-search-recent-wrapper"),i(k(".smart-search-keywords-wrapper"),s,e=>{h=e.keywords}),a.find(".smart-search-keywords-wrapper").length||a.addClass("sws-has-keywords").prepend('<div class="smart-search-keywords-wrapper smart-search-keywords-wrapper--hidden_mod"><h3 class="smart-search-keywords-title">'+u.keywordsLabel+'</h3><ul class="smart-search-keywords-list"></ul></div>'),h.length&&(k(".smart-search-keywords-list").empty(),k(".smart-search-keywords-wrapper").removeClass("smart-search-keywords-wrapper--hidden_mod"),h.forEach(e=>{k(".smart-search-keywords-list").append(` 39 <li class="sws-search-recent-list-item"> 40 <span class="sws-search-recent-list-item-trigger">${e}</span> 41 </li> 42 `)})),n.length)&&(h.length?(k(".smart-search-keywords-wrapper").removeClass("smart-search-keywords-wrapper--hidden_mod"),n.addClass("sws-search-recent-wrapper--hidden_by_keywords")):(k(".smart-search-keywords-wrapper").addClass("smart-search-keywords-wrapper--hidden_mod"),n.removeClass("sws-search-recent-wrapper--hidden_by_keywords"))),0<t.length){w.removeClass("ysm-hide").removeClass("sws-no-results"),a.removeClass("sws-hiding-results"),l.removeClass("smart-search-results-hidden");var i=l.outerWidth(),n=u.columns,t=(0===i&&(i=o.outerWidth(),l.width(i+"px")),i<200*n&&(n=Math.floor(i/200)),window.innerHeight);let e=0;i=t-180-(r.length?60:0)-(e=u.recentSearches||u.keywords?768<=k(window).width()?45:110:e);i<x?l.css({maxHeight:i+"px"}):l.css({maxHeight:x+"px"}),l.outerHeight()||(t=c.find(".smart-search-suggestions").outerHeight())&&
42(t=parseInt(t,10),l.height(x<t?x:t)),l.attr("data-columns",n).nanoScroller({contentClass:"smart-search-results-inner",alwaysVisible:!1,iOSNativeScrolling:!0}),u.recentSearches&&(i=s,d.includes(i)||(d.push(i),10<d.length&&d.shift(),localStorage.setItem("swsLatestSearches",JSON.stringify(d))),d.length)&&swsUtils.updateRecentSearches(!0),u.selectedProducts&&k(".sws-recent-products-wrapper").hide()}else u.no_results_text.length?(w.removeClass("ysm-hide").addClass("sws-no-results"),a.removeClass("sws-hiding-results")):w.addClass("ysm-hide").addClass("sws-no-results")}},onSearchError:function(e,s,t,i){"error"===t&&((t=s.getResponseHeader("X-Wp-Nonce"))&&_.nonce!==t?(window.swsL10n.nonce=t,o.devbridgeAutocomplete().onValueChange()):_.nonce&&(window.swsL10n.nonce="",o.devbridgeAutocomplete().onValueChange()))},onInvalidateSelection:function(){},onHide:function(){}}).on("focus",function(){o.devbridgeAutocomplete().onValueChange()}))}}else{C=this;y=s;let e=k(C),n=e.find('input[type="search"]').length?e.find('input[type="search"]'):e.find('input[type="text"]'),o="FORM"===C.tagName||"form"===C.tagName?e:e.find("form"),a=JSON.parse(localStorage.getItem("swsLatestSearches"))||[],l=[];if(n.length&&!e.hasClass("ysm-active")&&!o.hasClass("ysm-active")){if(o.addClass("ysm-active").addClass("ysm-hide"),!k(document.body).toggleClass("ysm-widget-active",!k(document.body).hasClass("ysm-widget-active")))return;k(document.body).hasClass("ysm-widget-active")&&(e.parents(".et_pb_column").css({overflow:"visible",zIndex:"10"}),e.parents(".et_pb_module").css("overflow","visible"));var c,d,h,u,p,C={id:"",serviceUrl:_.restUrl,layout:"",columns:1,productSlug:"product",maxHeight:500,maxHeightMobile:400,minChars:3,disableAjax:!1,no_results_text:"",loaderIcon:"",preventBadQueries:!0,cache:!0},g=k.extend({},C,y);o.on("submit",function(e){var s=n.val();if(""===s||s.length<g.minChars)return!1;var t=_.searchPageUrl;s=(s=s.replace(/\+/g,"%2b")).replace(/\s/g,"+"),t=(t+=-1!==t.indexOf("?")?"&":"?")+"s="+s+"&search_id="+g.id,"product"===g.layout&&(t+="&post_type="+g.productSlug),e.preventDefault(),window.swsL10n.analytics.ga4?(swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.view_all_click,wId:g.id}),window.open(t,"_blank")):location.href=t}),g.disableAjax||(k('<div class="smart-search-popup"><div class="smart-search-results"><div class="smart-search-results-inner"></div></div></div>').appendTo(o),c=o.find(".smart-search-popup"),d=0,n.outerWidth()&&(d=n.outerWidth(),c.css({width:d+"px"})),h=o.find(".smart-search-results"),u=h.find(".smart-search-results-inner"),p=Math.min(window.screen.width,window.screen.height)<768?g.maxHeightMobile:g.maxHeight,h.css({maxHeight:p+"px"}),-1!==navigator.userAgent.indexOf("Windows")&&-1!==navigator.userAgent.indexOf("Firefox")&&h.addClass("smart-search-firefox"),k(document).off("click",".sws-search-recent-list-item-trigger").on("click",".sws-search-recent-list-item-trigger",e=>{e.stopPropagation();var s=k(e.target).text();k(e.currentTarget).parents("form").find('input[type="search"]').val(s).focus()}),k(document).off("click",".sws-search-recent-list-item-delete").on("click",".sws-search-recent-list-item-delete",function(e){e.stopPropagation();let s=k(this).data("item");e=JSON.parse(localStorage.getItem("swsLatestSearches")).filter(e=>e!==s);localStorage.setItem("swsLatestSearches",JSON.stringify(e)),a=JSON.parse(localStorage.getItem("swsLatestSearches")),swsUtils.updateRecentSearches(!0),0==a.length&&k(".sws-search-recent-wrapper").addClass("sws-search-recent-wrapper--hidden_mod")}),g.recentSearches&&(k('<div class="sws-search-recent-wrapper"><h4 class="sws-search-recent-title">'+g.recentSearchesTitle+'</h4><ul class="sws-search-recent-list"></ul></div>').prependTo(c),a.length)&&swsUtils.updateRecentSearches(!0),k(window).on("resize",function(){c.css({width:n.outerWidth()+"px"})}),k(document).on("click",".smart-search-popup-backdrop",()=>{o.addClass("ysm-hide").removeClass("sws-no-results")}),k(window).on("touchstart",function(e){(k(e.target).hasClass("ysm-active")?k(e.target):k(e.target).parents(".ysm-active")).length||k(".ysm-active").addClass("ysm-hide")}),g.loaderImage.length&&n.parent().append("<img src="+g.loaderImage+' class="sws-loader-image" alt="Loading...">'),n.devbridgeAutocomplete({minChars:g.minChars,appendTo:u,serviceUrl:g.serviceUrl,maxHeight:1e5,dataType:"json",deferRequestBy:100,noCache:!g.cache,containerClass:"smart-search-suggestions",triggerSelectOnValidInput:!1,showNoSuggestionNotice:!!g.no_results_text.length,noSuggestionNotice:g.no_results_text,preventBadQueries:g.preventBadQueries,ajaxSettings:{beforeSend:function(e){_.nonce&&e.setRequestHeader("X-WP-Nonce",_.nonce)}},formatResult:function(e,s){return e.data},onSearchStart:function(e){-1!==this.value.indexOf(" ")&&(this.value=this.value.replace(/\s+/g," ")),e.query=e.query.replace(/%20/g," "),this.value!=e.query+" "&&(g.loaderImage.length||n.css({"background-image":"url("+g.loaderIcon+")","background-repeat":"no-repeat","background-position":"50% 50%"}),k(".sws-loader-image").addClass("sws-loader-image--visible"),o.addClass("ysm-hide").removeClass("sws-no-results"))},onSelect:function(e){-1!=e.id&&e.url&&!e.addToCart&&(window.location.href=e.url)},transformResult:function(e,s){e&&e.suggestions&&0<e.suggestions.length?swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.search_term_has_results,wId:g.id}):swsUtils.pushToAnalytics({term:s,category:swsUtils.analyticCategoryTypes.search_term_no_results,wId:g.id});s="string"==typeof e?k.parseJSON(e):e;n.val();return s&&s.view_all_link&&""!=s.view_all_link&&(c.find(".smart-search-view-all-holder").length||c.addClass("has-viewall-button").append('<div class="smart-search-view-all-holder"></div>'),c.find(".smart-search-view-all-holder").html(s.view_all_link)),n.css("background-image","none"),k(".sws-loader-image").removeClass("sws-loader-image--visible"),s.keywords.length?c.addClass("hidden-searches"):c.removeClass("hidden-searches"),s},onSearchComplete:function(e,s){var t,i,r;k.trim(e)===k.trim(n.val())&&(d||(d=n.outerWidth(),c.css({width:d+"px"})),n.css("background-image","none"),k(".sws-loader-image").removeClass("sws-loader-image--visible"),0<s.length?(o.removeClass("ysm-hide").removeClass("sws-no-results"),s=k(".sws-search-recent-wrapper"),t=c.find(".smart-search-view-all-holder"),setTimeout(function(){var e=h.outerWidth(),s=g.columns;0===e&&(e=n.outerWidth(),h.width(e+"px")),e<200*s&&(s=Math.floor(e/200)),h.outerHeight()||(e=u.find(".smart-search-suggestions").outerHeight())&&
42(e=parseInt(e,10),h.height(p<e?p:e)),h.attr("data-columns",s).nanoScroller({contentClass:"smart-search-results-inner",alwaysVisible:!1,iOSNativeScrolling:!0})},100),(t.length||g.keywords)&&(r=(s,t,i)=>{if(n.val().length<g.minChars)s.hide();else{var r=n.devbridgeAutocomplete();let e=g.serviceUrl;t=(e=k.isFunction(e)?e.call(r.element,t):e)+"?"+k.param({query:t});r.cachedResponse&&r.cachedResponse[t]&&i(r.cachedResponse[t]),s.show()}},t.length&&r(t,e,e=>{t.html(e.view_all_link)}),g.keywords)&&(i=k(".sws-search-recent-wrapper"),r(k(".smart-search-keywords-wrapper"),e,e=>{l=e.keywords}),c.find(".smart-search-keywords-wrapper").length||c.addClass("sws-has-keywords").prepend('<div class="smart-search-keywords-wrapper smart-search-keywords-wrapper--hidden_mod"><h3 class="smart-search-keywords-title">'+g.keywordsLabel+'</h3><ul class="smart-search-keywords-list"></ul></div>'),l.length&&(k(".smart-search-keywords-list").empty(),k(".smart-search-keywords-wrapper").removeClass("smart-search-keywords-wrapper--hidden_mod"),l.forEach(e=>{k(".smart-search-keywords-list").append(` 43 <li class="sws-search-recent-list-item"> 44 <span class="sws-search-recent-list-item-trigger">${e}</span> 45 </li> 46 `)})),i.length)&&(l.length?(k(".smart-search-keywords-wrapper").removeClass("smart-search-keywords-wrapper--hidden_mod"),k(".sws-search-recent-wrapper").addClass("sws-search-recent-wrapper--hidden_by_keywords")):(k(".smart-search-keywords-wrapper").addClass("smart-search-keywords-wrapper--hidden_mod"),k(".sws-search-recent-wrapper").removeClass("sws-search-recent-wrapper--hidden_by_keywords"))),g.recentSearches&&(r=e,a.includes(r)||(a.push(r),10<a.length&&a.shift(),localStorage.setItem("swsLatestSearches",JSON.stringify(a))),a.length)&&(0==s.length&&k('<div class="sws-search-recent-wrapper"><h4 class="sws-search-recent-title">'+g.recentSearchesTitle+'</h4><ul class="sws-search-recent-list"></ul></div>').prependTo(c),swsUtils.updateRecentSearches(!0))):(g.no_results_text.length?o.removeClass("ysm-hide"):o.addClass("ysm-hide")).addClass("sws-no-results"))},onSearchError:function(e,s,t,i){if("error"===t){t=s.getResponseHeader("X-Wp-Nonce");if(t&&_.nonce!==t)return window.swsL10n.nonce=t,void n.devbridgeAutocomplete().onValueChange();if(_.nonce)return window.swsL10n.nonce="",void n.devbridgeAutocomplete().onValueChange()}o.addClass("ysm-hide").removeClass("sws-no-results")},onInvalidateSelection:function(){},onHide:function(e){o.addClass("ysm-hide").removeClass("sws-no-results")}}).on("focus",function(){n.devbridgeAutocomplete().onValueChange()}))}}})}})})(jQuery),(e=>{"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports&&"function"==typeof require?e(require("jquery")):e(jQuery)})(function(u){var t={escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},createNode:function(e){var s=document.createElement("div");return s.className=e,s.style.position="absolute",s.style.display="none",s}},i=27,r=9,n=13,o=38,a=39,l=40;function c(e,s){function t(){}var i=this,r={ajaxSettings:{},autoSelectFirst:!1,appendTo:document.body,serviceUrl:null,lookup:null,onSelect:null,width:"auto",minChars:1,maxHeight:300,deferRequestBy:0,params:{},formatResult:c.formatResult,delimiter:null,zIndex:9999,type:"GET",noCache:!1,onSearchStart:t,onSearchComplete:t,onSearchError:t,preserveInput:!1,containerClass:"autocomplete-suggestions",tabDisabled:!1,dataType:"text",currentRequest:null,triggerSelectOnValidInput:!0,preventBadQueries:!0,lookupFilter:function(e,s,t){return-1!==e.value.toLowerCase().indexOf(t)},paramName:"query",transformResult:function(e){return"string"==typeof e?u.parseJSON(e):e},showNoSuggestionNotice:!1,noSuggestionNotice:"No results",orientation:"bottom",forceFixPosition:!1};i.element=e,i.el=u(e),i.suggestions=[],i.badQueries=[],i.selectedIndex=-1,i.currentValue=i.element.value,i.intervalId=0,i.cachedResponse={},i.onChangeInterval=null,i.onChange=null,i.isLocal=!1,i.suggestionsContainer=null,i.noSuggestionsContainer=null,i.options=u.extend({},r,s),i.classes={selected:"autocomplete-selected",suggestion:"autocomplete-suggestion"},i.hint=null,i.hintValue="",i.selection=null,i.initialize(),i.setOptions(s)}c.utils=t,(u.Autocomplete=c).formatResult=function(e,s){s="("+t.escapeRegExChars(s)+")";return e.value.replace(new RegExp(s,"gi"),"<strong>$1</strong>").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/<(\/?strong)>/g,"<$1>")},c.prototype={killerFn:null,initialize:function(){var e,s=this,t="."+s.classes.suggestion,i=s.classes.selected,r=s.options;s.element.setAttribute("autocomplete","off"),s.killerFn=function(e){0===u(e.target).closest(r.appendTo).length&&(s.killSuggestions(),s.disableKillerFn())},s.noSuggestionsContainer=u('<div class="autocomplete-no-suggestion"></div>').html(this.options.noSuggestionNotice).get(0),s.suggestionsContainer=c.utils.createNode(r.containerClass),(e=u(s.suggestionsContainer)).appendTo(r.appendTo),"auto"!==r.width&&e.width(r.width),e.on("mouseover.autocomplete",t,function(){s.activate(u(this).data("index"))}),e.on("mouseout.autocomplete",function(){s.selectedIndex=-1,e.children("."+i).removeClass(i)}),e.on("click.autocomplete",t,function(e){s.select(u(this).data("index"),e)}),s.fixPositionCapture=function(){s.visible&&s.fixPosition()},u(window).on("resize.autocomplete",s.fixPositionCapture),s.el.on("key
46down.autocomplete",function(e){s.onKeyPress(e)}),s.el.on("keyup.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("blur.autocomplete",function(){s.onBlur()}),s.el.on("focus.autocomplete",function(){s.onFocus()}),s.el.on("change.autocomplete",function(e){s.onKeyUp(e)}),s.el.on("input.autocomplete",function(e){s.onKeyUp(e)})},onFocus:function(){this.fixPosition(),0===this.options.minChars&&0===this.el.val().length&&this.onValueChange()},onBlur:function(){this.enableKillerFn()},abortAjax:function(){this.currentRequest&&(this.currentRequest.abort(),this.currentRequest=null)},setOptions:function(e){var s=this,t=s.options;u.extend(t,e),s.isLocal=u.isArray(t.lookup),s.isLocal&&(t.lookup=s.verifySuggestionsFormat(t.lookup)),t.orientation=s.validateOrientation(t.orientation,"bottom"),u(s.suggestionsContainer).css({"max-height":t.maxHeight+"px",width:t.width+"px","z-index":t.zIndex})},clearCache:function(){this.cachedResponse={},this.badQueries=[]},clear:function(){this.clearCache(),this.currentValue="",this.suggestions=[]},disable:function(){this.disabled=!0,clearInterval(this.onChangeInterval),this.abortAjax()},enable:function(){this.disabled=!1},fixPosition:function(){var e,s,t,i,r,n,o,a,l=this,c=u(l.suggestionsContainer),d=c.parent().get(0);d!==document.body&&!l.options.forceFixPosition||(n=l.options.orientation,e=c.outerHeight(),s=l.el.outerHeight(),t={top:(a=l.el.offset()).top,left:a.left},"auto"===n&&(o=u(window).height(),i=-(r=u(window).scrollTop())+a.top-e,r=r+o-(a.top+s+e),n=Math.max(i,r)===i?"top":"bottom"),t.top+="top"===n?-e:s,d!==document.body&&(o=c.css("opacity"),l.visible||c.css("opacity",0).show(),a=c.offsetParent().offset(),t.top-=a.top,t.left-=a.left,l.visible||c.css("opacity",o).hide()),"auto"===l.options.width&&(t.width=l.el.outerWidth()-2+"px"),c.css(t))},enableKillerFn:function(){u(document).on("click.autocomplete",this.killerFn)},disableKillerFn:function(){u(document).off("click.autocomplete",this.killerFn)},killSuggestions:function(){var e=this;e.stopKillSuggestions(),e.intervalId=window.setInterval(function(){e.visible&&(e.el.val(e.currentValue),e.hide()),e.stopKillSuggestions()},50)},stopKillSuggestions:function(){window.clearInterval(this.intervalId)},isCursorAtEnd:function(){var e=this.el.val().length,s=this.element.selectionStart;return"number"==typeof s?s===e:!document.selection||((s=document.selection.createRange()).moveStart("character",-e),e===s.text.length)},onKeyPress:function(e){var s=this;if(s.disabled||s.visible||e.which!==l||!s.currentValue){if(!s.disabled&&s.visible){switch(e.which){case i:s.el.val(s.currentValue),s.hide();break;case a:if(s.hint&&s.options.onHint&&s.isCursorAtEnd()){s.selectHint();break}return;case r:if(s.hint&&s.options.onHint)return void s.selectHint();if(-1===s.selectedIndex)return void s.hide();if(s.select(s.selectedIndex),!1===s.options.tabDisabled)return;break;case n:if(-1===s.selectedIndex)return void s.hide();s.select(s.selectedIndex);break;case o:s.moveUp();break;case l:s.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}}else s.suggest()},onKeyUp:function(e){var s=this;if(!s.disabled){switch(e.which){case o:case l:return}clearInterval(s.onChangeInterval),s.currentValue!==s.el.val()&&(s.findBestHint(),0<s.options.deferRequestBy?s.onChangeInterval=setInterval(function(){s.onValueChange()},s.options.deferRequestBy):s.onValueChange())}},onValueChange:function(){var e=this,s=e.options,t=e.el.val(),i=e.getQuery(t);e.selection&&e.currentValue!==i&&(e.selection=null,(s.onInvalidateSelection||u.noop).call(e.element)),clearInterval(e.onChangeInterval),e.currentValue=t,e.selectedIndex=-1,s.triggerSelectOnValidInput&&e.isExactMatch(i)?e.select(0):i.length<s.minChars?e.hide():e.getSuggestions(i)},isExactMatch:function(e){var s=this.suggestions;return 1===s.length&&s[0].value.toLowerCase()===e.toLowerCase()},getQuery:function(e){return u.trim(e)},getSuggestionsLocal:function(s){var e=this.options,t=s.toLowerCase(),i=e.lookupFilter,r=parseInt(e.lookupLimit,10),e={suggestions:u.grep(e.lookup,function(e){return i(e,s,t)})};return r&&e.suggestions.length>r&&(e.suggestions=e.suggestions.slice(0,r)),e},getSuggestions:function(i){var e,s,t,r=this,n=r.options,o=n.serviceUrl;n.params[n.paramName]=i,e=n.ignoreParams?null:n.params,!1!==n.onSearchStart.call(r.element,n.params)&&(u.isFunction(n.lookup)?n.lookup(i,function(e){r.suggestions=e.suggestions,r.suggest(),n.onSearchComplete.call(r.element,i,e.suggestions)}):(t=r.isLocal?r.getSuggestionsLocal(i):(u.isFunction(o)&&(o=o.call(r.element,i)),s=o+"?"+u.param(e||{}),r.cachedResponse[s]))&&u.isArray(t.suggestions)?(r.suggestions=t.suggestions,r.suggest(),n.onSearchComplete.call(r.element,i,t.suggestions)):r.isBadQuery(i)?n.onSearchComplete.call(r.element,i,[]):(r.abortAjax(),t={url:o,data:e,type:n.type,dataType:n.dataType},u.extend(t,n.ajaxSettings),r.currentRequest=u.ajax(t).done(function(e){r.currentRequest=null,e=n.transformResult(e,i),r.processResponse(e,i,s),n.onSearchComplete.call(r.element,i,e.suggestions)}).fail(function(e,s,t){n.onSearchError.call(r.element,i,e,s,t)})))},isBadQuery:function(e){if(this.options.preventBadQueries)for(var s=this.badQueries,t=s.length;t--;)if(0===e.indexOf(s[t]))return!0;return!1},hide:function(){var e=this,s=u(e.suggestionsContainer);u.isFunction(e.options.onHide)&&e.visible&&e.options.onHide.call(e.element,s),e.visible=!1,e.selectedIndex=-1,
46clearInterval(e.onChangeInterval),u(e.suggestionsContainer).hide(),e.signalHint(null)},suggest:function(){var e,s,t,i,r,n,o,a,l,c,d,h;0===this.suggestions.length?this.options.showNoSuggestionNotice?this.noSuggestions():this.hide():(s=(e=this).options,t=s.groupBy,i=s.formatResult,r=e.getQuery(e.currentValue),n=e.classes.suggestion,o=e.classes.selected,a=u(e.suggestionsContainer),l=u(e.noSuggestionsContainer),c=s.beforeRender,d="",s.triggerSelectOnValidInput&&e.isExactMatch(r)?e.select(0):(u.each(e.suggestions,function(e,s){t&&(d+=(e=>(e=e.data[t],h===e?"":'<div class="autocomplete-group"><strong>'+(h=e)+"</strong></div>"))(s)),d+='<div class="'+n+'" data-index="'+e+'">'+i(s,r)+"</div>"}),this.adjustContainerWidth(),l.detach(),a.html(d),u.isFunction(c)&&c.call(e.element,a),e.fixPosition(),a.show(),s.autoSelectFirst&&(e.selectedIndex=0,a.scrollTop(0),a.children("."+n).first().addClass(o)),e.visible=!0,e.findBestHint()))},noSuggestions:function(){var e=u(this.suggestionsContainer),s=u(this.noSuggestionsContainer);this.adjustContainerWidth(),s.detach(),e.empty(),e.append(s),this.fixPosition(),e.show(),this.visible=!0},adjustContainerWidth:function(){var e=this.options,s=u(this.suggestionsContainer);"auto"===e.width&&(e=this.el.outerWidth()-2,s.width(0<e?e:300))},findBestHint:function(){var i=this.el.val().toLowerCase(),r=null;i&&(u.each(this.suggestions,function(e,s){var t=0===s.value.toLowerCase().indexOf(i);return t&&(r=s),!t}),this.signalHint(r))},signalHint:function(e){var s="",t=this;e&&(s=t.currentValue+e.value.substr(t.currentValue.length)),t.hintValue!==s&&(t.hintValue=s,t.hint=e,(this.options.onHint||u.noop)(s))},verifySuggestionsFormat:function(e){return e.length&&"string"==typeof e[0]?u.map(e,function(e){return{value:e,data:null}}):e},validateOrientation:function(e,s){return e=u.trim(e||"").toLowerCase(),e=-1===u.inArray(e,["auto","bottom","top"])?s:e},processResponse:function(e,s,t){var i=this,r=i.options;e.suggestions=i.verifySuggestionsFormat(e.suggestions),r.noCache||(i.cachedResponse[t]=e,r.preventBadQueries&&0===e.suggestions.length&&i.badQueries.push(s)),s===i.getQuery(i.currentValue)&&(i.suggestions=e.suggestions,i.suggest())},activate:function(e){var s=this,t=s.classes.selected,i=u(s.suggestionsContainer),r=i.find("."+s.classes.suggestion);return i.find("."+t).removeClass(t),s.selectedIndex=e,-1!==s.selectedIndex&&r.length>s.selectedIndex?(i=r.get(s.selectedIndex),u(i).addClass(t),i):null},selectHint:function(){var e=u.inArray(this.hint,this.suggestions);this.select(e)},select:function(e,s){s&&s.target&&!u(s.target).hasClass("smart-search-add_to_cart")&&(this.hide(),this.onSelect(e))},moveUp:function(){var e=this;-1!==e.selectedIndex&&(0===e.selectedIndex?(u(e.suggestionsContainer).children().first().removeClass(e.classes.selected),e.selectedIndex=-1,e.el.val(e.currentValue),e.findBestHint()):e.adjustScroll(e.selectedIndex-1))},moveDown:function(){this.selectedIndex!==this.suggestions.length-1&&this.adjustScroll(this.selectedIndex+1)},adjustScroll:function(e){var s,t,i,r=this,n=r.activate(e);n&&(s=u(n).outerHeight(),n=n.offsetTop,i=(t=u(r.suggestionsContainer).scrollTop())+r.options.maxHeight-s,n<t?u(r.suggestionsContainer).scrollTop(n):i<n&&u(r.suggestionsContainer).scrollTop(n-r.options.maxHeight+s),r.options.preserveInput||r.el.val(r.getValue(r.suggestions[e].value)),r.signalHint(null))},onSelect:function(e){var s=this,t=s.options.onSelect,e=s.suggestions[e];e&&(s.signalHint(null),s.suggestions=[],s.selection=e,u.isFunction(t))&&t.call(s.element,e)},getValue:function(e){var s,t=this.options.delimiter;return!t||1===(t=(s=this.currentValue).split(t)).length?e:s.substr(0,s.length-t[t.length-1].length)+e},dispose:function(){this.el.off(".autocomplete").removeData("autocomplete"),this.disableKillerFn(),u(window).off("resize.autocomplete",this.fixPositionCapture),u(this.suggestionsContainer).remove()}},u.fn.autocomplete=u.fn.devbridgeAutocomplete=function(t,i){var r="autocomplete";return 0===arguments.length?this.first().data(r):this.each(function(){var e=u(this),s=e.data(r);"string"==typeof t?s&&"function"==typeof s[t]&&s[t](i):(s&&s.dispose&&s.dispose(),s=new c(this,t),e.data(r,s))})}}),(s=>{"function"==typeof define&&define.amd?define(["jquery"],function(e){return s(e,window,document)}):"object"==typeof exports?module.exports=s(require("jquery"),window,document):s(jQuery,window,document)}
46)(function(i,n,t){var l,c,r,d,s,h,u,p,o,a,g,m,w,v,f,y,b,C,S,x,_,k,T;function e(e,s){this.el=e,this.options=s,c=c||b(),this.$el=i(this.el),this.doc=i(this.options.documentContext||t),this.win=i(this.options.windowContext||n),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}y={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},m="scroll",s="mousedown",h="mouseenter",u="mousemove",o="mousewheel",p="mouseup",g="resize",v="up",r="DOMMouseScroll",d="down",w="touchmove",l="Microsoft Internet Explorer"===n.navigator.appName&&/msie 7./i.test(n.navigator.appVersion)&&n.ActiveXObject,c=null,x=n.requestAnimationFrame,f=n.cancelAnimationFrame,k=t.createElement("div").style,T=(()=>{for(var e,s=["t","webkitT","MozT","msT","OT"],t=e=0,i=s.length;e<i;t=++e)if(s[t],s[t]+"ransform"in k)return s[t].substr(0,s[t].length-1);return!1})(),_=function(e){return!1!==T&&(""===T?e:T+e.charAt(0).toUpperCase()+e.substr(1))}("transform"),C=!1!==_,b=function(){var e=t.createElement("div"),s=e.style;return s.position="absolute",s.width="100px",s.height="100px",s.overflow=m,s.top="-9999px",t.body.appendChild(e),s=e.offsetWidth-e.clientWidth,t.body.removeChild(e),s},S=function(){var e=n.navigator.userAgent,s=/(?=.+Mac OS X)(?=.+Firefox)/.test(e);return!!s&&(e=(e=/Firefox\/\d{2}\./.exec(e))&&e[0].replace(/\D+/g,""),s)&&23<+e},e.prototype.preventScrolling=function(e,s){this.isActive&&(e.type===r?(s===d&&0<e.originalEvent.detail||s===v&&e.originalEvent.detail<0)&&e.preventDefault():e.type===o&&e.originalEvent&&e.originalEvent.wheelDelta&&(s===d&&e.originalEvent.wheelDelta<0||s===v&&0<e.originalEvent.wheelDelta)&&e.preventDefault())},e.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},e.prototype.updateScrollValues=function(){var e=this.content;this.maxScrollTop=e.scrollHeight-e.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=e.scrollTop,e=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!=e&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:e}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},e.prototype.setOnScrollStyles=function(){var e,s;C?(e={})[_]="translate(0, "+this.sliderTop+"px)":e={top:this.sliderTop},x?(f&&this.scrollRAF&&f(this.scrollRAF),this.scrollRAF=x((s=this,function(){return s.scrollRAF=null,s.slider.css(e)}))):this.slider.css(e)},e.prototype.createEvents=function(){var s,t,i,r,n,o,a,l;this.events={down:function(e){return l.isBeingDragged=!0,l.offsetY=e.pageY-l.slider.offset().top,l.slider.is(e.target)||(l.offsetY=0),l.pane.addClass(l.options.activeClass),l.doc.bind(u,l.events.drag).bind(p,l.events.up),l.body.bind(h,l.events.enter),!1},drag:function(e){return a.sliderY=e.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1},up:function(e){return o.isBeingDragged=!1,o.pane.removeClass(o.options.activeClass),o.doc.unbind(u,o.events.drag).unbind(p,o.events.up),o.body.unbind(h,o.events.enter),!1},resize:function(e){n.reset()},panedown:function(e){return r.sliderY=(e.offsetY||e.originalEvent.layerY)-.5*r.sliderHeight,r.scroll(),r.events.down(e),!1},scroll:function(e){i.updateScrollValues(),i.isBeingDragged||(i.iOSNativeScrolling||(i.sliderY=i.sliderTop,i.setOnScrollStyles()),null!=e&&(i.maxScrollTop<=i.contentScrollTop?(i.options.preventPageScrolling&&i.preventScrolling(e,d),i.prevScrollTop!==i.maxScrollTop&&i.$el.trigger("scrollend")):0===i.contentScrollTop&&(i.options.preventPageScrolling&&i.preventScrolling(e,v),0!==i.prevScrollTop)&&i.$el.trigger("scrolltop")))},wheel:function(e){if(null!=e)return(e=e.delta||e.wheelDelta||e.originalEvent&&e.originalEvent.wheelDelta||-e.detail||e.originalEvent&&-e.originalEvent.detail)&&(t.sliderY+=-e/3),t.scroll(),!1},enter:(s=t=i=r=n=o=a=l=this,function(e){return s.isBeingDragged&&1!==(e.buttons||e.which)?(e=s.events).up.apply(e,arguments):void 0})}},e.prototype.addEvents=function(){var e;this.removeEvents(),e=this.events,this.options.disableResize||this.win.bind(g,e[g]),this.iOSNativeScrolling||(this.slider.bind(s,e[d]),this.pane.bind(s,e.panedown).bind(o+" "+r,e.wheel)),this.$content.bind(m+" "+o+" "+r+" "+w,e[m])},e.prototype.removeEvents=function(){var e=this.events;this.win.unbind(g,e[g]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(m+" "+o+" "+r+" "+w,e[m])},e.prototype.generate=function(){var e,s,t=this.options,i=t.paneClass,r=t.sliderClass;return(s=this.$el.children("."+i)).length||s.children("."+r).length||this.$el.append('<div class="'+i+'"><div class="'+r+'" /></div>'),this.pane=this.$el.children("."+i),this.slider=this.pane.find("."+r),0===c&&S()?e={right:-14,paddingRight:+n.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,"")+14}:c&&(e={right:-c},this.$el.addClass(t.enabledClass)),null!=e&&this.$content.css(e),this},e.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},e.prototype.reset=function(){var e,s,t,i,r,n,o,a;if(!this.iOSNativeScrolling)return this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(
46),t=(s=(e=this.content).style).overflowY,l&&this.$content.css({height:this.$content.height()}),o=e.scrollHeight+c,0<(n=parseInt(this.$el.css("max-height"),10))&&(this.$el.height(""),this.$el.height(e.scrollHeight>n?n:e.scrollHeight)),i=(n=this.pane.outerHeight(!1))+(r=parseInt(this.pane.css("top"),10))+parseInt(this.pane.css("bottom"),10),(a=Math.round(i/o*n))<this.options.sliderMinHeight?a=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&a>this.options.sliderMaxHeight&&(a=this.options.sliderMaxHeight),t===m&&s.overflowX!==m&&(a+=c),this.maxSliderTop=i-a,this.contentHeight=o,this.paneHeight=n,this.paneOuterHeight=i,this.sliderHeight=a,this.paneTop=r,this.slider.height(a),this.events.scroll(),this.pane.show(),this.isActive=!0,e.scrollHeight===e.clientHeight||this.pane.outerHeight(!0)>=e.scrollHeight&&t!==m?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===e.scrollHeight&&t===m?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),"static"!==(s=this.$content.css("position"))&&"relative"!==s||(o=parseInt(this.$content.css("right"),10))&&this.$content.css({right:"",marginRight:o}),this;this.contentHeight=this.content.scrollHeight},e.prototype.scroll=function(){if(this.isActive)return this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this},e.prototype.scrollBottom=function(e){if(this.isActive)return this.$content.scrollTop(this.contentHeight-this.$content.height()-e).trigger(o),this.stop().restore(),this},e.prototype.scrollTop=function(e){if(this.isActive)return this.$content.scrollTop(+e).trigger(o),this.stop().restore(),this},e.prototype.scrollTo=function(e){if(this.isActive)return this.scrollTop(this.$el.find(e).get(0).offsetTop),this},e.prototype.stop=function(){return f&&this.scrollRAF&&(f(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},e.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),l&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},e.prototype.flash=function(){var e;if(!this.iOSNativeScrolling&&this.isActive)return this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(){e.pane.removeClass(e.options.flashedClass)},(e=this).options.flashDelay),this},a=e,i.fn.nanoScroller=function(t){return this.each(function(){var e,s;if((s=this.nanoscroller)||(e=i.extend({},y,t),this.nanoscroller=s=new a(this,e)),t&&"object"==typeof t){if(i.extend(s.options,t),null!=t.scrollBottom)return s.scrollBottom(t.scrollBottom);if(null!=t.scrollTop)return s.scrollTop(t.scrollTop);if(t.scrollTo)return s.scrollTo(t.scrollTo);if("bottom"===t.scroll)return s.scrollBottom(0);if("top"===t.scroll)return s.scrollTop(0);if(t.scroll&&t.scroll instanceof i)return s.scrollTo(t.scroll);if(t.stop)return s.stop();if(t.destroy)return s.destroy();if(t.flash)return s.flash()}return s.reset()})},i.fn.nanoScroller.Constructor=a});
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.