/*
 swiped-events.js - v@version@
 Pure JavaScript swipe events
 https://github.com/john-doherty/swiped-events
 @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element
 @author John Doherty <www.johndoherty.info>
 @license MIT
*/
(function(){window.WPD="undefined"!==typeof window.WPD?window.WPD:{};if("undefined"!=typeof WPD.dom)return!1;WPD.dom=function(){if("undefined"==typeof WPD.dom.fn||"undefined"==typeof WPD.dom.fn.a)WPD.dom.fn={a:[],is_wpd_dom:!0,length:0,get:function(c){return"undefined"==typeof c?this.a.slice():"undefined"!=typeof this.a[c]?this.a[c]:null},_:function(c){return"<"===c.charAt(0)?WPD.dom._fn.createElementsFromHTML(c):Array.prototype.slice.call(document.querySelectorAll(c))},$:function(c,d){let b=this.copy(this,
!0);b.a="undefined"!=typeof d?null!==d?d.find(c).get():[]:"string"==typeof c?b._(c):null!==c?[c]:[];b.length=b.a.length;return b},extend:function(){for(let c=1;c<arguments.length;c++)for(let d in arguments[c])arguments[c].hasOwnProperty(d)&&(arguments[0][d]=arguments[c][d]);return arguments[0]},copy:function(c,d){let b,a,e;if("object"!=typeof c||null===c)return c;b=new c.constructor;for(a in c)c.hasOwnProperty(a)&&(e=typeof c[a],b[a]=d&&"object"===e&&null!==c[a]?this.copy(c[a]):c[a]);return b},parent:function(c){let d=
this.get(0),b=this.copy(this,!0);b.a=[];null!=d&&(d=d.parentElement,"undefined"!=typeof c?d.matches(c)&&(b.a=[d]):b.a=null==d?[]:[d]);return b},first:function(){let c=this.copy(this,!0);c.a="undefined"!=typeof c.a[0]?[c.a[0]]:[];c.length=c.a.length;return c},last:function(){let c=this.copy(this,!0);c.a=0<c.a.length?[c.a[c.a.length-1]]:[];c.length=c.a.length;return c},prev:function(c){let d=this.copy(this,!0);if("undefined"==typeof c)d.a="undefined"!=typeof d.a[0]&&null!=d.a[0].previousElementSibling?
[d.a[0].previousElementSibling]:[];else if("undefined"!=typeof d.a[0]){let b=d.a[0].previousElementSibling;for(d.a=[];null!=b;){if(b.matches(c)){d.a=[b];break}b=b.previousElementSibling}}d.length=d.a.length;return d},next:function(c){let d=this.copy(this,!0);if("undefined"==typeof c)d.a="undefined"!=typeof d.a[0]&&null!=d.a[0].nextElementSibling?[d.a[0].nextElementSibling]:[];else if("undefined"!=typeof d.a[0]){let b=d.a[0].nextElementSibling;for(d.a=[];null!=b;){if(b.matches(c)){d.a=[b];break}b=
b.nextElementSibling}}d.length=d.a.length;return d},closest:function(c){let d=this.get(0),b=this.copy(this,!0);b.a=[];if("string"===typeof c){if(null!==d&&"undefined"!=typeof d.matches&&""!==c){if(!d.matches(c))for(;(d=d.parentElement)&&!d.matches(c););b.a=null==d?[]:[d]}}else if(null!==d&&"undefined"!=typeof d.matches&&"undefined"!=typeof c.matches){if(d!==c)for(;(d=d.parentElement)&&d!==c;);b.a=null==d?[]:[d]}b.length=b.a.length;return b},add:function(c){if("undefined"!==typeof c)if("undefined"!==
typeof c.nodeType)-1==this.a.indexOf(c)&&this.a.push(c);else if("undefined"!==typeof c.a){let d=this;c.a.forEach(function(b){-1==d.a.indexOf(b)&&d.a.push(b)})}return this},find:function(c){let d=this.copy(this,!0);d.a=[];this.forEach(function(b){null!==b&&"undefined"!=typeof b.querySelectorAll&&(d.a=d.a.concat(Array.prototype.slice.call(b.querySelectorAll(c))))});d.length=d.a.length;return d},forEach:function(c){this.a.forEach(function(d,b,a){c.apply(d,[d,b,a])});return this},each:function(c){return this.forEach(c)},
hasClass:function(c){let d=this.get(0);return null!=d?d.classList.contains(c):!1},addClass:function(c){let d=c;"string"==typeof c&&(d=c.split(" "));d=d.filter(function(b){return""!==b.trim()});0<d.length&&this.forEach(function(b){b.classList.add.apply(b.classList,d)});return this},removeClass:function(c){if("undefined"!=typeof c){let d=c;"string"==typeof c&&(d=c.split(" "));d=d.filter(function(b){return""!==b.trim()});0<d.length&&this.forEach(function(b){b.classList.remove.apply(b.classList,d)})}else this.forEach(function(d){0<
d.classList.length&&d.classList.remove.apply(d.classList,d.classList)});return this},is:function(c){let d=this.get(0);return null!=d?d.matches(c):!1},val:function(c){let d=this.get(0);if(null!=d)if(1==arguments.length)if("select-multiple"==d.type){c="string"===typeof c?c.split(","):c;for(let b=0,a=d.options.length,e;b<a;b++)e=d.options[b],e.selected=-1!=c.indexOf(e.value)}else d.value=c;else return"select-multiple"==d.type?Array.prototype.map.call(d.selectedOptions,function(b){return b.value}):d.value;
return this},isVisible:function(){let c=this.get(0),d=!0,b;for(;null!==c;){b=window.getComputedStyle(c);if("none"==b.display||"hidden"==b.visibility||0==b.opacity){d=!1;break}c=c.parentElement}return d},attr:function(c,d){let b,a=arguments,e=this;this.forEach(function(f){2==a.length?(f.setAttribute(c,d),b=e):"object"===typeof c?Object.keys(c).forEach(function(h){f.setAttribute(h,c[h])}):b=f.getAttribute(c)});return b},removeAttr:function(c){this.forEach(function(d){d.removeAttribute(c)});return this},
prop:function(c,d){let b,a=arguments;this.forEach(function(e){2==a.length?e[c]=d:b="undefined"!=typeof e[c]?e[c]:null});return 2==a.length?this:b},data:function(c,d){let b=this.get(0),a=c.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()});return null!=b?2==arguments.length?(b.dataset[a]=d,this):"undefined"==typeof b.dataset[a]?"":b.dataset[a]:""},html:function(c){let d=this.get(0);return null!=d?1==arguments.length?(d.innerHTML=c,this):d.innerHTML:""},text:function(c){let d=this.get(0);return null!=
d?1==arguments.length?(d.textContent=c,this):d.textContent:""},css:function(c,d){let b=this.get(),a;for(let e=0;e<b.length;e++)if(a=b[e],1==arguments.length)if("object"==typeof c)Object.keys(c).forEach(function(f){a.style[f]=c[f]});else return window.getComputedStyle(a)[c];else a.style[c]=d;return this},position:function(){let c=this.get(0);return null!=c?{top:c.offsetTop,left:c.offsetLeft}:{top:0,left:0}},offset:function(){let c=this.get(0);return null!=c?WPD.dom._fn.hasFixedParent(c)?c.getBoundingClientRect():
WPD.dom._fn.absolutePosition(c):{top:0,left:0}},outerWidth:function(c){c=c||!1;let d=this.get(0);if(null!=d)return c?parseInt(d.offsetWidth)+parseInt(this.css("marginLeft"))+parseInt(this.css("marginRight")):parseInt(d.offsetWidth)},outerHeight:function(c){return c?parseInt(this.css("height"))+parseInt(this.css("marginTop"))+parseInt(this.css("marginBottom")):parseInt(this.css("height"))},innerWidth:function(){var c=this.get(0);return null!=c?(c=window.getComputedStyle(c),this.outerWidth()-parseFloat(c.borderLeftWidth)-
parseFloat(c.borderRightWidth)):0},width:function(){return this.outerWidth()},height:function(){return this.outerHeight()},on:function(){let c=arguments,d=function(a,e){let f;if("mouseenter"==e.type||"mouseleave"==e.type||"hover"==e.type){var h=document.elementFromPoint(e.clientX,e.clientY);if(!h.matches(a[1]))for(;(h=h.parentElement)&&!h.matches(a[1]););null!=h&&(f=WPD.dom(h))}else f=WPD.dom(e.target).closest(a[1]);if(null!=f&&0<f.closest(this).length){h=[];h.push(e);if("undefined"!=typeof a[4])for(e=
4;e<a.length;e++)h.push(a[e]);a[2].apply(f.get(0),h)}},b=c[0].split(" ");for(let a=0;a<b.length;a++){let e=b[a];if("string"==typeof c[1])this.forEach(function(f){if(!WPD.dom._fn.hasEventListener(f,e,c[2])){let h=d.bind(f,c);f.addEventListener(e,h,c[3]);f._wpd_el="undefined"==typeof f._wpd_el?[]:f._wpd_el;f._wpd_el.push({type:e,selector:c[1],func:h,trigger:c[2],args:c[3]})}});else for(let f=0;f<b.length;f++){let h=b[f];this.forEach(function(g){WPD.dom._fn.hasEventListener(g,h,c[1])||(g.addEventListener(h,
c[1],c[2]),g._wpd_el="undefined"==typeof g._wpd_el?[]:g._wpd_el,g._wpd_el.push({type:h,func:c[1],trigger:c[1],args:c[2]}))})}}return this},off:function(c,d){this.forEach(function(b){if("undefined"!=typeof b._wpd_el&&0<b._wpd_el.length)if("undefined"===typeof c){let a;for(;a=b._wpd_el.pop();)b.removeEventListener(a.type,a.func,a.args);b._wpd_el=[]}else c.split(" ").forEach(function(a){if("undefined"==typeof d){let e;for(;e=b._wpd_el.pop();)b.removeEventListener(a,e.func,e.args);b._wpd_el=[]}else{let e=
[];b._wpd_el.forEach(function(f){f.type==a&&f.trigger==d?b.removeEventListener(a,f.func,f.args):e.push(f)});b._wpd_el=e}})});return this},offForced:function(){let c=this;this.forEach(function(d,b){let a=d.cloneNode(!0);d.parentNode.replaceChild(a,d);c.a[b]=a});return this},trigger:function(c,d,b,a){b=b||!1;a=a||!1;this.forEach(function(e){var f=!1;a&&"undefined"!=typeof jQuery&&"undefined"!=typeof jQuery._data&&"undefined"!=typeof jQuery._data(e,"events")&&"undefined"!=typeof jQuery._data(e,"events")[c]&&
(jQuery(e).trigger(c,d),f=!0);!f&&b&&(f=new Event(c),f.detail=d,e.dispatchEvent(f));if("undefined"!=typeof e._wpd_el)e._wpd_el.forEach(function(h){if(h.type==c){let g=new Event(c);h.trigger.apply(e,[g].concat(d))}});else{let h=!1,g=e;for(;;){g=g.parentElement;if(null==g)break;"undefined"!=typeof g._wpd_el&&g._wpd_el.forEach(function(k){if("undefined"!==typeof k.selector){var l=WPD.dom(g).find(k.selector);0<l.length&&0<=l.get().indexOf(e)&&k.type==c&&(l=new Event(c),k.trigger.apply(e,[l].concat(d)),
h=!0)}});if(h)break}}});return this},clone:function(){let c=this.get(0);null!=c?(this.a=[c.cloneNode(!0)],this.length=this.a.length):this.a=[];this.length=this.a.length;return this},remove:function(c){if("undefined"!=typeof c)return c.parentElement.removeChild(c);this.forEach(function(d){if(null!=d.parentElement)return d.parentElement.removeChild(d)});this.a=[];this.length=this.a.length;return null},detach:function(){let c=this,d=[];this.forEach(function(b){b=c.remove(b);null!=b&&d.push(b)});this.a=
d;this.length=this.a.length;return this},prepend:function(c){"string"==typeof c&&(c=WPD.dom._fn.createElementsFromHTML(c));c=Array.isArray(c)?c:[c];this.forEach(function(d){c.forEach(function(b){"undefined"!=typeof b.is_wpd_dom?b.forEach(function(a){d.insertBefore(a,d.children[0])}):d.insertBefore(b,d.children[0])})});return this},append:function(c){"string"==typeof c&&(c=WPD.dom._fn.createElementsFromHTML(c));c=Array.isArray(c)?c:[c];this.forEach(function(d){c.forEach(function(b){null!=b&&("undefined"!=
typeof b.is_wpd_dom?b.forEach(function(a){d.appendChild(a)}):d.appendChild(b.cloneNode(!0)))})});return this},uuidv4:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(c){let d=16*Math.random()|0;return("x"==c?d:d&3|8).toString(16)})}},WPD.dom._fn={bodyTransform:function(){let c=0,d=0;if("undefined"!==typeof WebKitCSSMatrix){var b=window.getComputedStyle(document.body);"undefined"!=typeof b.transform&&(b=new WebKitCSSMatrix(b.transform),"undefined"!=b.m41&&(c=b.m41),
"undefined"!=b.m42&&(d=b.m42))}return{x:c,y:d}},bodyTransformY:function(){return this.bodyTransform().y},bodyTransformX:function(){return this.bodyTransform().x},hasFixedParent:function(c){if(0!=WPD.dom._fn.bodyTransformY())return!1;do if("fixed"==window.getComputedStyle(c).position)return!0;while(c=c.parentElement);return!1},hasEventListener:function(c,d,b){if("undefined"==typeof c._wpd_el)return!1;for(let a=0;a<c._wpd_el.length;a++)if(c._wpd_el[a].trigger==b&&c._wpd_el[a].type==d)return!0;return!1},
allDescendants:function(c){let d=[],b=this;Array.isArray(c)||(c=[c]);c.forEach(function(a){for(let e=0;e<a.childNodes.length;e++){let f=a.childNodes[e];d.push(f);d=d.concat(b.allDescendants(f))}});return d},createElementsFromHTML:function(c){let d=document.createElement("template");d.innerHTML=c.replace(/(\r\n|\n|\r)/gm,"");return Array.prototype.slice.call(d.content.childNodes)},absolutePosition:function(c){if(!c.getClientRects().length)return{top:0,left:0};let d=c.getBoundingClientRect();c=c.ownerDocument.defaultView;
return{top:d.top+c.pageYOffset,left:d.left+c.pageXOffset}},plugin:function(c,d){WPD.dom.fn[c]=function(b){return"undefined"!=typeof b&&d[b]?d[b].apply(this,Array.prototype.slice.call(arguments,1)):this.each(function(a){a["wpd_dom_"+c]=Object.create(d).init(b,a)})}}},WPD.dom.version=1;return 1<=arguments.length?WPD.dom.fn.$.apply(WPD.dom.fn,arguments):WPD.dom.fn};WPD.dom();document.dispatchEvent(new Event("wpd-dom-core-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.animate)return!1;WPD.dom.fn._animate={easing:{linear:function(c){return c},easeInOutQuad:function(c){return.5>c?2*c*c:1-Math.pow(-2*c+2,2)/2},easeOutQuad:function(c){return 1-(1-c)*(1-c)}}};WPD.dom.fn.animate=function(c,d,b){let a=this;d=d||200;b=b||"linear";this.forEach(function(e){let f,h=0,g,k={},l={},n,m,q;n=a.prop("_wpd_dom_animations");n=null==n?[]:n;!1===c?n.forEach(function(p){clearInterval(p)}):(q="undefined"!=typeof a._animate.easing[b]?a._animate.easing[b]:
a._animate.easing.easeInOutQuad,Object.keys(c).forEach(function(p){-1<p.indexOf("scroll")?k[p]=e[p]:k[p]=parseInt(window.getComputedStyle(e)[p]);l[p]=c[p]-k[p]}),f=d/1E3*60,m=setInterval(function(){h++;h>f?clearInterval(m):(g=q(h/f),Object.keys(l).forEach(function(p){-1<p.indexOf("scroll")?e[p]=k[p]+l[p]*g:e.style[p]=k[p]+l[p]*g+"px"}))},1E3/60),n.push(m),a.prop("_wpd_dom_animations",n))});return this};document.dispatchEvent(new Event("wpd-dom-animate-loaded"))})();
(function(){let c=WPD.dom;if("undefined"!=typeof WPD.dom.fn.unhighlight)return!1;WPD.dom.fn.unhighlight=function(d){let b={className:"highlight",element:"span"};c.extend(b,d);return this.find(b.element+"."+b.className).each(function(){let a=this.parentNode;a.replaceChild(this.firstChild,this);a.normalize()})};WPD.dom.fn.highlight=function(d,b){function a(h,g,k,l,n){n=""==n?".exhghttt":n;if(3===h.nodeType){if(g=h.data.normalize("NFD").replace(/[\u0300-\u036f]/g,"").match(g))return k=document.createElement(k||
"span"),k.className=l||"highlight",l=/\.|,|\s/.test(g[0].charAt(0))?g.index+1:g.index,h=h.splitText(l),h.splitText(g[1].length),l=h.cloneNode(!0),k.appendChild(l),h.parentNode.replaceChild(k,h),1}else if(1===h.nodeType&&h.childNodes&&!/(script|style)/i.test(h.tagName)&&0< !c(h).closest(n).length&&(h.tagName!==k.toUpperCase()||h.className!==l))for(let m=0;m<h.childNodes.length;m++)m+=a(h.childNodes[m],g,k,l,n);return 0}let e={className:"highlight",element:"span",caseSensitive:!1,wordsOnly:!1,excludeParents:""};
c.fn.extend(e,b);d.constructor===String&&(d=[d]);d=d.filter(function(h){return""!=h});d.forEach(function(h,g,k){k[g]=h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g,"")});if(0==d.length)return this;b=e.caseSensitive?"":"i";d="("+d.join("|")+")";e.wordsOnly&&(d="(?:,|^|\\s)"+d+"(?:,|$|\\s)");let f=new RegExp(d,b);return this.each(function(h){a(h,f,e.element,e.className,e.excludeParents)})}})();
(function(){if("undefined"!=typeof WPD.dom.fn.serialize)return!1;WPD.dom.fn.serialize=function(){let c=this.get(0);if(c&&"FORM"===c.nodeName){var d,b,a=[];for(d=c.elements.length-1;0<=d;--d)if(""!==c.elements[d].name)switch(c.elements[d].nodeName){case "INPUT":switch(c.elements[d].type){case "text":case "hidden":case "password":case "button":case "reset":case "submit":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "checkbox":case "radio":c.elements[d].checked&&a.push(c.elements[d].name+
"="+encodeURIComponent(c.elements[d].value))}break;case "TEXTAREA":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "SELECT":switch(c.elements[d].type){case "select-one":a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].value));break;case "select-multiple":for(b=c.elements[d].options.length-1;0<=b;--b)c.elements[d].options[b].selected&&a.push(c.elements[d].name+"="+encodeURIComponent(c.elements[d].options[b].value))}break;case "BUTTON":switch(c.elements[d].type){case "reset":case "submit":case "button":a.push(c.elements[d].name+
"="+encodeURIComponent(c.elements[d].value))}}return a.join("&")}};WPD.dom.fn.serializeForAjax=function(c,d){let b=[],a;for(a in c)if(c.hasOwnProperty(a)){let e=d?d+"["+a+"]":a,f=c[a];b.push(null!==f&&"object"===typeof f?WPD.dom.fn.serializeForAjax(f,e):encodeURIComponent(e)+"="+encodeURIComponent(f))}return b.join("&")};document.dispatchEvent(new Event("wpd-dom-serialize-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.inViewPort)return!1;WPD.dom.fn.inViewPort=function(c,d){var b=this.get(0);let a;if(null==b)return!1;c="undefined"==typeof c?0:c;d="undefined"==typeof d?window:"string"==typeof d?document.querySelector(d):d;var e=b.getBoundingClientRect();b=e.top;let f=e.bottom,h=e.left,g=e.right;null==d&&(d=window);d===window?(e=window.innerWidth||0,a=window.innerHeight||0):(e=d.clientWidth,a=d.clientHeight,d=d.getBoundingClientRect(),b-=d.top,f-=d.top,h-=d.left,g-=d.left);
c=~~Math.round(parseFloat(c));return 0>=g||h>=e?!1:0<c?b>=c&&f<a-c:(0<f&&b<=a-c)|(0>=b&&f>c)};document.dispatchEvent(new Event("wpd-dom-viewport-loaded"))})();
(function(){if("undefined"!=typeof WPD.dom.fn.ajax)return!1;WPD.dom.fn.ajax=function(c){c=this.extend({url:"",method:"GET",cors:"cors",data:{},success:null,fail:null,accept:"text/html",contentType:"application/x-www-form-urlencoded; charset=UTF-8"},c);if("cors"!=c.cors){var d="ajax_cb_"+this.uuidv4().replaceAll("-","");WPD.dom.fn[d]=function(){c.success.apply(this,arguments);delete WPD.dom.fn[c.data.fn]};c.data.callback="WPD.dom.fn."+d;c.data.fn=d;d=document.createElement("script");d.type="text/javascript";
d.src=c.url+"?"+this.serializeForAjax(c.data);d.onload=function(){this.remove()};document.body.appendChild(d)}else return d=new XMLHttpRequest,d.onreadystatechange=function(){null!=c.success&&4==this.readyState&&200==this.status&&c.success(this.responseText);null!=c.fail&&4==this.readyState&&400<=this.status&&c.fail(this)},d.open(c.method.toUpperCase(),c.url,!0),d.setRequestHeader("Content-type",c.contentType),d.setRequestHeader("Accept",c.accept),d.send(this.serializeForAjax(c.data)),d};document.dispatchEvent(new Event("wpd-dom-xhttp-loaded"))})();
window.WPD=window.WPD||{};
window.WPD.Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(c){let d="";let b,a,e,f,h,g=0;for(c=this._utf8_encode(c);g<c.length;){var k=c.charCodeAt(g++);b=c.charCodeAt(g++);a=c.charCodeAt(g++);e=k>>2;k=(k&3)<<4|b>>4;f=(b&15)<<2|a>>6;h=a&63;isNaN(b)?f=h=64:isNaN(a)&&(h=64);d=d+this._keyStr.charAt(e)+this._keyStr.charAt(k)+this._keyStr.charAt(f)+this._keyStr.charAt(h)}return d},decode:function(c){let d="";let b,a,e,f=0;for(c=c.replace(/[^A-Za-z0-9\+\/=]/g,
"");f<c.length;){var h=this._keyStr.indexOf(c.charAt(f++));var g=this._keyStr.indexOf(c.charAt(f++));a=this._keyStr.indexOf(c.charAt(f++));e=this._keyStr.indexOf(c.charAt(f++));h=h<<2|g>>4;g=(g&15)<<4|a>>2;b=(a&3)<<6|e;d+=String.fromCharCode(h);64!=a&&(d+=String.fromCharCode(g));64!=e&&(d+=String.fromCharCode(b))}return d=this._utf8_decode(d)},_utf8_encode:function(c){c=c.replace(/\r\n/g,"\n");let d="";for(let b=0;b<c.length;b++){let a=c.charCodeAt(b);128>a?d+=String.fromCharCode(a):(127<a&&2048>
a?d+=String.fromCharCode(a>>6|192):(d+=String.fromCharCode(a>>12|224),d+=String.fromCharCode(a>>6&63|128)),d+=String.fromCharCode(a&63|128))}return d},_utf8_decode:function(c){let d="",b=0,a,e,f;for(;b<c.length;)a=c.charCodeAt(b),128>a?(d+=String.fromCharCode(a),b++):191<a&&224>a?(e=c.charCodeAt(b+1),d+=String.fromCharCode((a&31)<<6|e&63),b+=2):(e=c.charCodeAt(b+1),f=c.charCodeAt(b+2),d+=String.fromCharCode((a&15)<<12|(e&63)<<6|f&63),b+=3);return d}};
(function(){window.WPD=window.WPD||{};WPD.Hooks=WPD.Hooks||{};let c=WPD.Hooks;c.filters=c.filters||{};c.addFilter=function(d,b,a,e){c.filters[d]=c.filters[d]||[];c.filters[d].push({priority:"undefined"===typeof a?10:a,scope:"undefined"===typeof e?null:e,callback:b})};c.removeFilter=function(d,b){"undefined"!=typeof c.filters[d]&&("undefined"==typeof b?c.filters[d]=[]:c.filters[d].forEach(function(a,e){a.callback===b&&c.filters[d].splice(e,1)}))};c.applyFilters=function(d){let b=[],a=Array.prototype.slice.call(arguments),
e=arguments[1];"undefined"!==typeof c.filters[d]&&0<c.filters[d].length&&(c.filters[d].forEach(function(f){b[f.priority]=b[f.priority]||[];b[f.priority].push({scope:f.scope,callback:f.callback})}),a.splice(0,2),b.forEach(function(f){f.forEach(function(h){e=h.callback.apply(h.scope,[e].concat(a))})}));return e}})();window.WPD=window.WPD||{};
window.WPD.intervalUntilExecute=function(c,d,b,a){let e,f=0,h="function"===typeof d?d():d;b="undefined"==typeof b?100:b;a="undefined"==typeof a?50:a;if(!1===h)e=setInterval(function(){h="function"===typeof d?d():d;f++;if(f>a)return clearInterval(e),!1;if(!1!==h)return clearInterval(e),c(h)},b);else return c(h)};
(function(c,d){function b(l,n,m){for(;l&&l!==d.documentElement;){var q=l.getAttribute(n);if(q)return q;l=l.parentNode}return m}"function"!==typeof c.CustomEvent&&(c.CustomEvent=function(l,n){n=n||{bubbles:!1,cancelable:!1,detail:void 0};var m=d.createEvent("CustomEvent");m.initCustomEvent(l,n.bubbles,n.cancelable,n.detail);return m},c.CustomEvent.prototype=c.Event.prototype);d.addEventListener("touchstart",function(l){"true"!==l.target.getAttribute("data-swipe-ignore")&&(k=l.target,g=Date.now(),a=
l.touches[0].clientX,e=l.touches[0].clientY,h=f=0)},!1);d.addEventListener("touchmove",function(l){if(a&&e){var n=l.touches[0].clientY;f=a-l.touches[0].clientX;h=e-n}},!1);d.addEventListener("touchend",function(l){if(k===l.target){var n=parseInt(b(k,"data-swipe-threshold","20"),10),m=parseInt(b(k,"data-swipe-timeout","500"),10),q=Date.now()-g,p="";l=l.changedTouches||l.touches||[];Math.abs(f)>Math.abs(h)?Math.abs(f)>n&&q<m&&(p=0<f?"swiped-left":"swiped-right"):Math.abs(h)>n&&q<m&&(p=0<h?"swiped-up":
"swiped-down");""!==p&&(n={dir:p.replace(/swiped-/,""),xStart:parseInt(a,10),xEnd:parseInt((l[0]||{}).clientX||-1,10),yStart:parseInt(e,10),yEnd:parseInt((l[0]||{}).clientY||-1,10)},k.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:n})),k.dispatchEvent(new CustomEvent(p,{bubbles:!0,cancelable:!0,detail:n})));g=e=a=null}},!1);var a=null,e=null,f=null,h=null,g=null,k=null})(window,document);
(function(){window.WPD="undefined"!==typeof window.WPD?window.WPD:{};window.WPD.ajaxsearchpro=new function(){this.firstIteration=!0;this.helpers={};this.plugin={};this.addons={addons:[],add:function(c){-1==this.addons.indexOf(c)&&(c=this.addons.push(c),this.addons[c-1].init())},remove:function(c){this.addons.filter(function(d){return d.name==c?("undefined"!=typeof d.destroy&&d.destroy(),!1):!0})}}}})();WPD.dom._fn.plugin("ajaxsearchpro",window.WPD.ajaxsearchpro.plugin);
(function(c){c.fn.extend(window.WPD.ajaxsearchpro.helpers,{Hooks:window.WPD.Hooks,deviceType:function(){let d=window.innerWidth;return 640>=d?"phone":1024>=d?"tablet":"desktop"},detectIOS:function(){return"undefined"!=typeof window.navigator&&"undefined"!=typeof window.navigator.userAgent?null!=window.navigator.userAgent.match(/(iPod|iPhone|iPad)/):!1},detectIE:function(){var d=window.navigator.userAgent;let b=d.indexOf("MSIE ");d=d.indexOf("Trident/");return 0<b||0<d?!0:!1},isMobile:function(){try{return document.createEvent("TouchEvent"),
!0}catch(d){return!1}},isTouchDevice:function(){return"ontouchstart"in window},isSafari:function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},escapeHtml:function(d){return d.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#039;")},whichjQuery:function(d){let b=!1;"undefined"!=typeof window.$&&("undefined"===typeof d?b=window.$:"undefined"!=typeof window.$.fn[d]&&(b=window.$));!1===b&&"undefined"!=typeof window.jQuery&&
(b=window.jQuery,"undefined"===typeof d?b=window.jQuery:"undefined"!=typeof window.jQuery.fn[d]&&(b=window.jQuery));return b},formData:function(d,b){let a=this,e=d.find("input,textarea,select,button").get();if(1===arguments.length)return b={},e.forEach(function(f){f.name&&!f.disabled&&(f.checked||/select|textarea/i.test(f.nodeName)||/text/i.test(f.type)||c(f).hasClass("hasDatepicker")||c(f).hasClass("asp_slider_hidden"))&&(void 0==b[f.name]&&(b[f.name]=[]),c(f).hasClass("hasDatepicker")?b[f.name].push(c(f).parent().find(".asp_datepicker_hidden").val()):
b[f.name].push(c(f).val()))}),JSON.stringify(b);"object"!=typeof b&&(b=JSON.parse(b));e.forEach(function(f){if(f.name)if(b[f.name]){let h=b[f.name],g=c(f);"[object Array]"!==Object.prototype.toString.call(h)&&(h=[h]);if("checkbox"==f.type||"radio"==f.type){let k=g.val(),l=!1;for(let n=0;n<h.length;n++)if(h[n]==k){l=!0;break}g.prop("checked",l)}else g.val(h[0]),c(f).hasClass("asp_gochosen")||c(f).hasClass("asp_goselect2")?WPD.intervalUntilExecute(function(k){k(f).trigger("change.asp_select2")},function(){return a.whichjQuery("asp_select2")},
50,3):c(f).hasClass("hasDatepicker")&&WPD.intervalUntilExecute(function(k){let l=h[0],n=k(g.get(0)).datepicker("option","dateFormat");k(g.get(0)).datepicker("option","dateFormat","yy-mm-dd");k(g.get(0)).datepicker("setDate",l);k(g.get(0)).datepicker("option","dateFormat",n);k(g.get(0)).trigger("selectnochange")},function(){return a.whichjQuery("datepicker")},50,3)}else"checkbox"!=f.type&&"radio"!=f.type||c(f).prop("checked",!1)});return d},submitToUrl:function(d,b,a,e){let f;f=c('<form style="display: none;" />');
f.attr("action",d);f.attr("method",b);c("body").append(f);"undefined"!==typeof a&&null!==a&&Object.keys(a).forEach(function(h){let g=a[h],k=c('<input type="hidden" />');k.attr("name",h);k.attr("value",g);f.append(k)});"undefined"!=typeof e&&"new"==e&&f.attr("target","_blank");f.get(0).submit()},openInNewTab:function(d){Object.assign(document.createElement("a"),{target:"_blank",href:d}).click()},isScrolledToBottom:function(d,b){return d.scrollHeight-d.scrollTop-c(d).outerHeight()<b},getWidthFromCSSValue:function(d,
b){d+="";d=-1<d.indexOf("px")?parseInt(d,10):-1<d.indexOf("%")?"undefined"!=typeof b&&null!=b?Math.floor(parseInt(d,10)/100*b):parseInt(d,10):parseInt(d,10);return 100>d?100:d},nicePhrase:function(d){return encodeURIComponent(d).replace(/%20/g,"+")},unqoutePhrase:function(d){return d.replace(/["']/g,"")},decodeHTMLEntities:function(d){let b=document.createElement("div");d&&"string"===typeof d&&(d=d.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi,""),d=d.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi,
""),b.innerHTML=d,d=b.textContent,b.textContent="");return d},isScrolledToRight:function(d){return d.scrollWidth-c(d).outerWidth()===d.scrollLeft},isScrolledToLeft:function(d){return 0===d.scrollLeft},wp_hooks_apply_filters:function(){return"undefined"!=typeof wp&&"undefined"!=typeof wp.hooks&&"undefined"!=typeof wp.hooks.applyFilters?wp.hooks.applyFilters.apply(null,arguments):"undefined"!=typeof arguments[1]?arguments[1]:!1}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{addAnimation:function(){let b=this,a=0,e=1,f=!0;if(0<b.call_num||b._no_animations)return b.n("results").find(".item, .asp_group_header").removeClass("opacityZero").removeClass("asp_an_"+b.animOptions.items),!1;b.n("results").find(".item, .asp_group_header").each(function(){let h=this;1===e&&(f=c(h).inViewPort(0));if(1<e&&f&&!c(h).inViewPort(0)||80<e)return c(h).removeClass("opacityZero"),!0;"isotopic"==
b.o.resultstype&&e>b.il.itemsPerPage?c(h).removeClass("opacityZero"):(setTimeout(function(){c(h).addClass("asp_an_"+b.animOptions.items);c(h).removeClass("opacityZero")},a+25),a+=45,e++)})},removeAnimation:function(){let b=this;this.n("items").each(function(){c(this).removeClass("asp_an_"+b.animOptions.items)})},autocomplete:function(){let b=this,a=b.n("text").val();if(""==b.n("text").val())b.n("textAutocomplete").val("");else{var e=b.n("textAutocomplete").val();if(""==e||0!=e.indexOf(a))b.n("textAutocomplete").val(""),
b.n("text").val().length>=b.o.autocomplete.trigger_charcount&&(e={action:"ajaxsearchpro_autocomplete",asid:b.o.id,sauto:b.n("text").val(),asp_inst_id:b.o.rid,options:c("form",b.n("searchsettings")).serialize()},b.postAuto=c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:e,success:function(f){0<f.length&&(f=c("<textarea />").html(f).text(),f=f.replace(/^\s*[\r\n]/gm,""),f=a+f.substr(a.length));b.n("textAutocomplete").val(f);b.fixAutocompleteScrollLeft()}}))}},autocompleteGoogleOnly:function(){let b=this,
a=b.n("text").val();if(""==b.n("text").val())b.n("textAutocomplete").val("");else{var e=b.n("textAutocomplete").val();if(""==e||0!=e.indexOf(a)){b.n("textAutocomplete").val("");var f=b.o.autocomplete.lang;["wpml_lang","polylang_lang","qtranslate_lang"].forEach(function(h){0<c('input[name="'+h+'"]',b.n("searchsettings")).length&&1<c('input[name="'+h+'"]',b.n("searchsettings")).val().length&&(f=c('input[name="'+h+'"]',b.n("searchsettings")).val())});b.n("text").val().length>=b.o.autocomplete.trigger_charcount&&
c.fn.ajax({url:"https://clients1.google.com/complete/search",cors:"no-cors",data:{q:a,hl:f,nolabels:"t",client:"hp",ds:""},success:function(h){0<h[1].length&&(h=h[1][0][0].replace(/(<([^>]+)>)/ig,""),h=c("<textarea />").html(h).text(),h=h.substr(a.length),b.n("textAutocomplete").val(a+h),b.fixAutocompleteScrollLeft())}})}}},fixAutocompleteScrollLeft:function(){this.n("textAutocomplete").get(0).scrollLeft=this.n("text").get(0).scrollLeft},openCompact:function(){let b=this;b.n("search").is("[asp-compact-w]")||
(b.n("probox").attr("asp-compact-w",b.n("probox").innerWidth()),b.n("search").attr("asp-compact-w",b.n("search").innerWidth()));b.n("search").css({width:b.n("search").width()+"px"});b.n("probox").css({width:"auto"});setTimeout(function(){b.n("search").find(".probox>div:not(.promagnifier)").removeClass("hiddend")},80);clearTimeout(b.timeouts.compactBeforeOpen);b.timeouts.compactBeforeOpen=setTimeout(function(){let a;a="phone"==d.deviceType()?b.o.compact.width_phone:"tablet"==d.deviceType()?b.o.compact.width_tablet:
b.o.compact.width;a=d.Hooks.applyFilters("asp_compact_width",a,b.o.id,b.o.iid);a=d.wp_hooks_apply_filters("asp_compact_width",a,b.o.id,b.o.iid);a=isNaN(a)?a:a+"px";"static"!=b.o.compact.position?b.n("search").css({"max-width":a,width:a}):(b.n("container").css({"max-width":a,width:a}),b.n("search").css({"max-width":"100%",width:"100%"}));1==b.o.compact.overlay&&(b.n("search").css("z-index",999999),b.n("searchsettings").css("z-index",999999),b.n("resultsDiv").css("z-index",999999),b.n("trythis").css("z-index",
999998),c("#asp_absolute_overlay").css({opacity:1,width:"100%",height:"100%","z-index":999990}));b.n("search").attr("asp-compact","open")},50);clearTimeout(b.timeouts.compactAfterOpen);b.timeouts.compactAfterOpen=setTimeout(function(){b.resize();b.n("trythis").css({display:"block"});1==b.o.compact.enabled&&"static"!=b.o.compact.position&&b.n("trythis").css({top:b.n("search").offset().top+b.n("search").outerHeight(!0)+"px",left:b.n("search").offset().left+"px"});b.o.compact.focus&&b.n("text").get(0).focus();
b.n("text").trigger("focus");b.scrolling()},500)},closeCompact:function(){let b=this;clearTimeout(b.timeouts.compactBeforeOpen);clearTimeout(b.timeouts.compactAfterOpen);b.timeouts.compactBeforeOpen=setTimeout(function(){b.n("search").attr("asp-compact","closed")},50);b.n("search").find(".probox>div:not(.promagnifier)").addClass("hiddend");"static"!=b.o.compact.position?b.n("search").css({width:"auto"}):(b.n("container").css({width:"auto"}),b.n("search").css({"max-width":"unset",width:"auto"}));b.n("probox").css({width:b.n("probox").attr("asp-compact-w")+
"px"});b.n("trythis").css({left:b.n("search").position().left,display:"none"});1==b.o.compact.overlay&&(b.n("search").css("z-index",""),b.n("searchsettings").css("z-index",""),b.n("resultsDiv").css("z-index",""),b.n("trythis").css("z-index",""),c("#asp_absolute_overlay").css({opacity:0,width:0,height:0,"z-index":0}))},setFilterStateInput:function(b){let a=this;"undefined"==typeof b&&(b=65);let e=function(){JSON.stringify(a.originalFormData)!=JSON.stringify(d.formData(c("form",a.n("searchsettings"))))?
a.n("searchsettings").find("input[name=filters_initial]").val(0):a.n("searchsettings").find("input[name=filters_initial]").val(1)};0==b?e():setTimeout(function(){e()},b)},resetSearchFilters:function(){d.formData(c("form",this.n("searchsettings")),this.originalFormData);this.resetNoUISliderFilters();"undefined"!=typeof this.select2jQuery&&this.select2jQuery(this.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2");this.n("text").val("");this.n("proloading").css("display",
"none");this.hideLoader();this.searchAbort();this.setFilterStateInput(0)},resetNoUISliderFilters:function(){0<this.noUiSliders.length&&this.noUiSliders.forEach(function(b){if("undefined"!=typeof b.noUiSlider){let a=[];c(b).parent().find(".asp_slider_hidden").forEach(function(e){a.push(c(e).val())});0<a.length&&b.noUiSlider.set(a)}})},gaPageview:function(b){let a=this.gaGetTrackingID();if("undefined"==typeof ASP.analytics||"pageview"!=ASP.analytics.method)return!1;if(""!=ASP.analytics.string){let e=
"function"==typeof __gaTracker?__gaTracker:"function"==typeof ga?ga:!1,f="function"==typeof gtag?gtag:!1;window.location.origin||(window.location.origin=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));let h=this.o.homeurl.replace(window.location.origin,"");if(!1!==f)!1!==a&&a.forEach(function(g){f("config",g,{page_path:h+ASP.analytics.string.replace("{asp_term}",b)})});else if(!1!==e){let g={page:h+ASP.analytics.string.replace("{asp_term}",
b),title:"Ajax Search"};!1!==a?a.forEach(function(k){e("create",k,"auto");e("send","pageview",g)}):e("send","pageview",g)}}},gaEvent:function(b,a){let e=this.gaGetTrackingID();if("undefined"==typeof ASP.analytics||"event"!=ASP.analytics.method)return!1;let f="function"==typeof gtag?gtag:!1,h="function"==typeof window.__gaTracker?window.__gaTracker:"function"==typeof window.ga?window.ga:!1;if(!1===f&&!1===h)return!1;if("undefined"!=typeof ASP.analytics.event[b]&&1==ASP.analytics.event[b].active){let g=
{search_id:this.o.id,search_name:this.n("search").data("name"),phrase:this.n("text").val(),option_name:"",option_value:"",result_title:"",result_url:"",results_count:""},k={event_category:ASP.analytics.event[b].category,event_label:ASP.analytics.event[b].label,value:ASP.analytics.event[b].value};a=c.fn.extend(g,a);Object.keys(a).forEach(function(l){let n=a[l];n=String(n).replace(/[\s\n\r]+/g," ").trim();Object.keys(k).forEach(function(m){k[m]=k[m].replace(new RegExp("{"+l+"}","gmi"),n)})});!1===f?
!1!==e?e.forEach(function(l){h("create",l,"auto");h("send","event",k.event_category,ASP.analytics.event[b].action,k.event_label,k.value)}):h("send","event",k.event_category,ASP.analytics.event[b].action,k.event_label,k.value):!1!==e?e.forEach(function(l){k.send_to=l;f("event",ASP.analytics.event[b].action,k)}):f("event",ASP.analytics.event[b].action,k)}},gaGetTrackingID:function(){if("undefined"==typeof ASP.analytics)return!1;if("undefined"!=typeof ASP.analytics.tracking_id&&""!=ASP.analytics.tracking_id)return[ASP.analytics.tracking_id];
if(!1===("function"==typeof window.gtag?window.gtag:!1)&&"undefined"!=typeof window.ga&&"undefined"!=typeof window.ga.getAll){let b=[];window.ga.getAll().forEach(function(a){b.push(a.get("trackingId"))});return 0<b.length?b:!1}return!1},liveLoad:function(b,a,e,f,h){function g(q){let p=d.Hooks.applyFilters("asp/live_load/raw_data",q,l);var r=new DOMParser;let t=r.parseFromString(p,"text/html"),u=c(t);l.o.statistics&&l.stat_addKeyword(l.o.id,l.n("text").val());if(""!=p&&0<u.length&&0<u.find(k).length){p=
p.replace(/&asp_force_reset_pagination=1/gmi,"");p=p.replace(/%26asp_force_reset_pagination%3D1/gmi,"");p=p.replace(/&#038;asp_force_reset_pagination=1/gmi,"");d.isSafari()&&(p=p.replace(/srcset/gmi,"nosrcset"));p=d.Hooks.applyFilters("asp_live_load_html",p,l.o.id,l.o.iid);p=d.wp_hooks_apply_filters("asp_live_load_html",p,l.o.id,l.o.iid);u=c(r.parseFromString(p,"text/html"));r=u.find(k).get(0);r=d.Hooks.applyFilters("asp/live_load/replacement_node",r,l,m.get(0),p);null!=r&&m.get(0).parentNode.replaceChild(r,
m.get(0));m=c(k).first();e&&(document.title=t.title,history.pushState({},null,a));c(k).first().find(".woocommerce-ordering select.orderby").on("change",function(){0<c(this).closest("form").length&&c(this).closest("form").get(0).submit()});if(1==l.o.singleHighlight)c(k).find("a").on("click",function(){localStorage.removeItem("asp_phrase_highlight");""!=d.unqoutePhrase(l.n("text").val())&&localStorage.setItem("asp_phrase_highlight",JSON.stringify({phrase:d.unqoutePhrase(l.n("text").val()),id:l.o.id}))});
d.Hooks.applyFilters("asp/live_load/finished",a,l,k,m.get(0));ASP.initialize();l.lastSuccesfulSearch=c("form",l.n("searchsettings")).serialize()+l.n("text").val().trim();l.lastSearchData=p;l.setLiveLoadCache(q,b)}l.n("s").trigger("asp_search_end",[l.o.id,l.o.iid,l.n("text").val(),p],!0,!0);let v,w;null==(w=(v=l).gaEvent)||w.call(v,"search_end",{results_count:"unknown"});let x,y;null==(y=(x=l).gaPageview)||y.call(x,l.n("text").val());l.hideLoader();m.css("opacity",1);l.searching=!1;""!=l.n("text").val()&&
l.n("proclose").css({display:"block"})}let k=b;if("body"==k||"html"==k)return console.log("Ajax Search Pro: Do not use html or body as the live loader selector."),!1;let l=this;""!=ASP.pageHTML&&l.setLiveLoadCache(ASP.pageHTML,b);e="undefined"==typeof e?!0:e;f="undefined"==typeof f?!1:f;let n=".search-content #content #Content div[role=main] main[role=main] div.theme-content div.td-ss-main-content main.l-content #primary".split(" ");"#main"!=k&&n.unshift("#main");if(1>c(k).length&&(n.forEach(function(q,
p){if(0<c(q).length)return k=q,!1}),1>c(k).length))return console.log("Ajax Search Pro: The live search selector does not exist on the page."),!1;k=d.Hooks.applyFilters("asp/live_load/selector",k,this);let m=c(k).first();l.searchAbort();m.css("opacity",.4);a=d.Hooks.applyFilters("asp/live_load/url",a,l,k,m.get(0));d.Hooks.applyFilters("asp/live_load/start",a,l,k,m.get(0));f||1!=l.n("searchsettings").find("input[name=filters_initial]").val()||""!=l.n("text").val()?"undefined"!=typeof h?g(h.html):(l.searching=
!0,l.post=c.fn.ajax({url:a,method:"GET",success:function(q){g(q);l.isAutoP=!1},dataType:"html",fail:function(q){m.css("opacity",1);q.aborted||(m.html("This request has failed. Please check your connection."),l.hideLoader(),l.searching=!1,l.n("proclose").css({display:"block"}),l.isAutoP=!1)}})):window.WPD.intervalUntilExecute(function(){g(ASP.pageHTML)},function(){return""!=ASP.pageHTML})},usingLiveLoader:function(){return this._usingLiveLoader="undefined"==typeof this._usingLiveLoader?0<c(".asp_es_"+
this.o.id).length||this.o.resPage.useAjax&&0<c(this.o.resPage.selector).length||this.o.wooShop.useAjax&&0<c(this.o.wooShop.selector).length||this.o.taxArchive.useAjax&&0<c(this.o.taxArchive.selector).length:this._usingLiveLoader},getLiveURLbyBaseLocation(b){let a="asp_ls="+d.nicePhrase(this.n("text").val()),e="&";-1===b.indexOf("?")&&(e="?");b=b+e+a+"&asp_active=1&asp_force_reset_pagination=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();b=b.replace("?&","?");
return b=b.replace("&&","&")},getCurrentLiveURL:function(){var b="asp_ls="+d.nicePhrase(this.n("text").val());let a="&",e=window.location.href;e=-1<e.indexOf("asp_ls=")?e.slice(0,e.indexOf("asp_ls=")):e;e=-1<e.indexOf("asp_ls&")?e.slice(0,e.indexOf("asp_ls&")):e;e=-1<e.indexOf("p_asid=")?e.slice(0,e.indexOf("p_asid=")):e;e=-1<e.indexOf("asp_")?e.slice(0,e.indexOf("asp_")):e;-1===e.indexOf("?")&&(a="?");b=e+a+b+"&asp_active=1&asp_force_reset_pagination=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",
this.n("searchsettings")).serialize();b=b.replace("?&","?");return b=b.replace("&&","&")},initLiveLoaderPopState:function(){let b=this;b.liveLoadCache=[];window.addEventListener("popstate",a=>{a=b.getLiveLoadCache();!1!==a&&(b.n("text").val(a.phrase),d.formData(c("form",b.n("searchsettings")),a.settings),b.resetNoUISliderFilters(),b.liveLoad(a.selector,document.location.href,!1,!1,a))});""==ASP.pageHTML&&"undefined"===typeof ASP._ajax_page_html&&(ASP._ajax_page_html=!0,c.fn.ajax({url:b.currentPageURL,
method:"GET",success:function(a){ASP.pageHTML=a},dataType:"html"}))},setLiveLoadCache:function(b,a){0==this.liveLoadCache.filter(e=>e.href==document.location.href).length&&this.liveLoadCache.push({href:b==ASP.pageHTML?this.currentPageURL:document.location.href,phrase:b==ASP.pageHTML?"":this.n("text").val(),selector:a,html:b,settings:b==ASP.pageHTML?this.originalFormData:d.formData(c("form",this.n("searchsettings")))})},getLiveLoadCache:function(){let b=this.liveLoadCache.filter(a=>a.href==document.location.href);
return 0<b.length?b[0]:!1},showMoreResLoader:function(){this.n("resultsDiv").addClass("asp_more_res_loading")},showLoader:function(b){b="undefined"!==typeof b?b:!1;if("none"!=this.o.loaderLocation){this.n("search").hasClass("hiddend")||"results"==this.o.loaderLocation||this.n("proloading").css({display:"block"});if(!1!==b)return!1;(!this.n("search").hasClass("hiddend")||"search"==this.o.loaderLocation)&&(this.n("search").hasClass("hiddend")||"both"!=this.o.loaderLocation&&"results"!=this.o.loaderLocation)||
this.usingLiveLoader()||(0<this.n("resultsDiv").find(".asp_results_top").length&&this.n("resultsDiv").find(".asp_results_top").css("display","none"),this.showResultsBox(),c(".asp_res_loader",this.n("resultsDiv")).removeClass("hiddend"),this.n("results").css("display","none"),this.n("showmore").css("display","none"),"undefined"!==typeof this.hidePagination&&this.hidePagination())}},hideLoader:function(){this.n("proloading").css({display:"none"});c(".asp_res_loader",this.n("resultsDiv")).addClass("hiddend");
this.n("results").css("display","");this.n("resultsDiv").removeClass("asp_more_res_loading")},loadASPFonts:function(){!1!==ASP.font_url&&(this.fontsLoaded=!0,(new FontFace("asppsicons2","url("+ASP.font_url+")",{style:"normal",weight:"normal","font-display":"swap"})).load().then(function(b){document.fonts.add(b)}).catch(function(b){}),ASP.font_url=!1)},updateHref:function(){if(this.o.trigger.update_href&&!this.usingLiveLoader()){window.location.origin||(window.location.origin=window.location.protocol+
"//"+window.location.hostname+(window.location.port?":"+window.location.port:""));let b=this.getStateURL()+(this.resultsOpened?"&asp_s=":"&asp_ls=")+this.n("text").val();history.replaceState("","",b.replace(location.origin,""))}},stat_addKeyword:function(b,a){c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:{action:"ajaxsearchpro_addkeyword",id:b,keyword:a},success:function(e){}})},fixClonedSelf:function(){let b=this.o.iid,a=this.o.rid;for(;!ASP.instances.set(this)&&!(++this.o.iid,50<this.o.iid););b!=
this.o.iid&&(this.o.rid=this.o.id+"_"+this.o.iid,this.n("search").get(0).id="ajaxsearchpro"+this.o.rid,this.n("search").removeClass("asp_m_"+a).addClass("asp_m_"+this.o.rid).data("instance",this.o.iid),this.n("searchsettings").get(0).id=this.n("searchsettings").get(0).id.replace("settings"+a,"settings"+this.o.rid),this.n("searchsettings").hasClass("asp_s_"+a)?this.n("searchsettings").removeClass("asp_s_"+a).addClass("asp_s_"+this.o.rid).data("instance",this.o.iid):this.n("searchsettings").removeClass("asp_sb_"+
a).addClass("asp_sb_"+this.o.rid).data("instance",this.o.iid),this.n("resultsDiv").get(0).id=this.n("resultsDiv").get(0).id.replace("prores"+a,"prores"+this.o.rid),this.n("resultsDiv").removeClass("asp_r_"+a).addClass("asp_r_"+this.o.rid).data("instance",this.o.iid),this.n("container").find(".asp_init_data").data("instance",this.o.iid),this.n("container").find(".asp_init_data").get(0).id=this.n("container").find(".asp_init_data").get(0).id.replace("asp_init_id_"+a,"asp_init_id_"+this.o.rid),this.n("prosettings").data("opened",
0))},destroy:function(){let b=this;Object.keys(b.nodes).forEach(function(l){let n,m;null==(m=(n=b.nodes[l]).off)||m.call(n)});"undefined"!==typeof b.n("searchsettings").get(0).referenced?(--b.n("searchsettings").get(0).referenced,0>b.n("searchsettings").get(0).referenced&&b.n("searchsettings").remove()):b.n("searchsettings").remove();if("undefined"!==typeof b.n("resultsDiv").get(0).referenced){if(--b.n("resultsDiv").get(0).referenced,0>b.n("resultsDiv").get(0).referenced){let l,n;null==(n=(l=b.n("resultsDiv")).remove)||
n.call(l)}}else{let l,n;null==(n=(l=b.n("resultsDiv")).remove)||n.call(l)}let a,e;null==(e=(a=b.n("trythis")).remove)||e.call(a);let f,h;null==(h=(f=b.n("search")).remove)||h.call(f);let g,k;null==(k=(g=b.n("container")).remove)||k.call(g);b.documentEventHandlers.forEach(function(l){c(l.node).off(l.event,l.handler)})},isRedirectToFirstResult:function(){return(0<c(".asp_res_url",this.n("resultsDiv")).length||0<c(".asp_es_"+this.o.id+" a").length||this.o.resPage.useAjax&&0<c(this.o.resPage.selector+
"a").length)&&(1==this.o.redirectOnClick&&"click"==this.ktype&&"first_result"==this.o.trigger.click||1==this.o.redirectOnEnter&&("input"==this.ktype||"keyup"==this.ktype)&&13==this.keycode&&"first_result"==this.o.trigger.return||"button"==this.ktype&&"first_result"==this.o.sb.redirect_action)},doRedirectToFirstResult:function(){let b,a;b="click"==this.ktype?this.o.trigger.click_location:"button"==this.ktype?this.o.sb.redirect_location:this.o.trigger.return_location;0<c(".asp_res_url",this.n("resultsDiv")).length?
a=c(c(".asp_res_url",this.n("resultsDiv")).get(0)).attr("href"):0<c(".asp_es_"+this.o.id+" a").length?a=c(c(".asp_es_"+this.o.id+" a").get(0)).attr("href"):this.o.resPage.useAjax&&0<c(this.o.resPage.selector+"a").length&&(a=c(c(this.o.resPage.selector+"a").get(0)).attr("href"));""!=a&&("same"==b?location.href=a:d.openInNewTab(a),this.hideLoader(),this.hideResults());return!1},doRedirectToResults:function(b){let a;if(!this.reportSettingsValidity())return this.showNextInvalidFacetMessage(),!1;a="click"==
b?this.o.trigger.click_location:"button"==b?this.o.sb.redirect_location:this.o.trigger.return_location;b=this.getRedirectURL(b);if(this.o.overridewpdefault){if(1==this.o.resPage.useAjax)return this.hideResults(),this.liveLoad(this.o.resPage.selector,b),this.showLoader(),0==this.att("blocking")&&this.hideSettings(),!1;"post"==this.o.override_method?d.submitToUrl(b,"post",{asp_active:1,p_asid:this.o.id,p_asp_data:c("form",this.n("searchsettings")).serialize()},a):"same"==a?location.href=b:d.openInNewTab(b)}else d.submitToUrl(b,
"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()},a);this.n("proloading").css("display","none");this.hideLoader();0==this.att("blocking")&&this.hideSettings();this.hideResults();this.searchAbort()},getRedirectURL:function(b){b="undefined"!==typeof b?b:"enter";var a="click"==b?this.o.trigger.click:"button"==b?this.o.sb.redirect_action:this.o.trigger.return;"results_page"==a?b="?s="+d.nicePhrase(this.n("text").val()):"woo_results_page"==a?b="?post_type=product&s="+
d.nicePhrase(this.n("text").val()):(b="button"==b?"elementor_page"==a?this.o.sb.elementor_url:this.o.sb.redirect_url:"elementor_page"==a?this.o.trigger.elementor_url:this.o.trigger.redirect_url,b=d.decodeHTMLEntities(b),b=this.parseCustomRedirectURL(b,this.n("text").val()));1<this.o.homeurl.indexOf("?")&&0===b.indexOf("?")&&(b=b.replace("?","&"));if(this.o.overridewpdefault&&"post"!=this.o.override_method){let e="&";-1!==this.o.homeurl.indexOf("?")&&"elementor_page"!=a||-1!==b.indexOf("?")||(e="?");
b=b+e+"asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize();a="elementor_page"==a?b:this.o.homeurl+b}else a="elementor_page"==a?b:this.o.homeurl+b;a=a.replace("https://","https:///");a=a.replace("http://","http:///");a=a.replace(/\/\//g,"/");a=d.Hooks.applyFilters("asp_redirect_url",a,this.o.id,this.o.iid);return a=d.wp_hooks_apply_filters("asp_redirect_url",a,this.o.id,this.o.iid)},parseCustomRedirectURL:function(b,a){let e=this,f=d.decodeHTMLEntities(b).replace(/{phrase}/g,
d.nicePhrase(a));b=f.match(/{(.*?)}/g);null!==b&&b.forEach(function(h){h=h.replace(/[{}]/g,"");var g=c('input[type=radio][name*="aspf['+h+'_"]:checked',e.n("searchsettings"));0==g.length&&(g=c('input[type=text][name*="aspf['+h+'_"]',e.n("searchsettings")));0==g.length&&(g=c('input[type=hidden][name*="aspf['+h+'_"]',e.n("searchsettings")));0==g.length&&(g=c('select[name*="aspf['+h+'_"]:not([multiple])',e.n("searchsettings")));0==g.length&&(g=c('input[type=radio][name*="termset['+h+'"]:checked',e.n("searchsettings")));
0==g.length&&(g=c('input[type=text][name*="termset['+h+'"]',e.n("searchsettings")));0==g.length&&(g=c('input[type=hidden][name*="termset['+h+'"]',e.n("searchsettings")));0==g.length&&(g=c('select[name*="termset['+h+'"]:not([multiple])',e.n("searchsettings")));if(0==g.length)return!0;g=g.val();f=f.replace("{"+h+"}",""+g)});return f},showResults:function(){let b=this;d.Hooks.applyFilters("asp/results/show/start",b);b.initResults();"horizontal"==b.o.resultstype?b.createHorizontalScroll():"vertical"==
b.o.resultstype&&b.createVerticalScroll();switch(b.o.resultstype){case "horizontal":b.showHorizontalResults();break;case "vertical":b.showVerticalResults();break;case "polaroid":b.showPolaroidResults();break;case "isotopic":b.showIsotopicResults();break;default:b.showHorizontalResults()}b.showAnimatedImages();b.hideLoader();b.n("proclose").css({display:"block"});d.isMobile()&&b.o.mobile.hide_keyboard&&!b.resultsOpened&&document.activeElement.blur();b.o.settingsHideOnRes&&0==b.att("blocking")&&b.hideSettings();
"undefined"!=typeof WPD.lazy&&setTimeout(function(){WPD.lazy(".asp_lazy")},100);b.eh.resulsDivHoverMouseEnter=b.eh.resulsDivHoverMouseEnter||function(){c(".item",b.n("resultsDiv")).removeClass("hovered");c(this).addClass("hovered")};b.eh.resulsDivHoverMouseLeave=b.eh.resulsDivHoverMouseLeave||function(){c(".item",b.n("resultsDiv")).removeClass("hovered")};b.n("resultsDiv").find(".item").on("mouseenter",b.eh.resulsDivHoverMouseEnter);b.n("resultsDiv").find(".item").on("mouseleave",b.eh.resulsDivHoverMouseLeave);
b.fixSettingsAccessibility();b.resultsOpened=!0;d.Hooks.addFilter("asp/results/show/end",b)},hideResults:function(b){let a=this;b="undefined"==typeof b?!0:b;a.initResults();if(!a.resultsOpened)return!1;a.n("resultsDiv").removeClass(a.resAnim.showClass).addClass(a.resAnim.hideClass);setTimeout(function(){a.n("resultsDiv").css(a.resAnim.hideCSS)},a.resAnim.duration);a.n("proclose").css({display:"none"});d.isMobile()&&b&&document.activeElement.blur();a.resultsOpened=!1;"undefined"!=typeof a.ptstack&&
delete a.ptstack;a.hideArrowBox();a.n("s").trigger("asp_results_hide",[a.o.id,a.o.iid],!0,!0)},updateResults:function(b){if(""===b.replace(/^\s*[\r\n]/gm,"")||c(b).hasClass("asp_nores")||0<c(b).find(".asp_nores").length)this.n("showmore").css("display","none"),c("span",this.n("showmore")).html("");else if("isotopic"==this.o.resultstype&&0<this.call_num&&null!=this.isotopic&&"undefined"!=typeof this.isotopic.appended&&0<this.n("items").length){b=c(b);let a=this.n("items").last(),e=parseInt(this.n("items").last().attr("data-itemnum"));
b.get().forEach(function(f){c(f).attr("data-itemnum",++e).css({width:a.css("width"),height:a.css("height")})});this.n("resdrg").append(b);this.isotopic.appended(b.get());this.nodes.items=0<c(".item",this.n("resultsDiv")).length?c(".item",this.n("resultsDiv")):c(".photostack-flip",this.n("resultsDiv"))}else 0<this.call_num&&"vertical"==this.o.resultstype?this.n("resdrg").html(this.n("resdrg").html()+'<div class="asp_v_spacer"></div>'+b):this.n("resdrg").html(this.n("resdrg").html()+b)},showResultsBox:function(){this.initResults();
this.n("s").trigger("asp_results_show",[this.o.id,this.o.iid],!0,!0);this.n("resultsDiv").css({display:"block",height:"auto"});this.n("results").find(".item, .asp_group_header").addClass(this.animationOpacity);this.n("resultsDiv").css(this.resAnim.showCSS);this.n("resultsDiv").removeClass(this.resAnim.hideClass).addClass(this.resAnim.showClass);this.fixResultsPosition(!0)},scrollToResults:function(){var b=Math.floor(.1*window.innerHeight);if(!(!this.resultsOpened||0<this.call_num||1!=this.o.scrollToResults.enabled||
0<this.n("search").closest(".asp_preview_data").length||1==this.o.compact.enabled||this.n("resultsDiv").inViewPort(b))){b="hover"==this.o.resultsposition?this.n("probox").offset().top-20:this.n("resultsDiv").offset().top-20;b+=this.o.scrollToResults.offset;var a=c("#wpadminbar");0<a.length&&(b-=a.height());window.scrollTo({top:0>b?0:b,behavior:"smooth"})}},showAnimatedImages:function(){this.n("items").each(function(){let b=c(this).find(".asp_image[data-src]"),a=b.data("src");if("undefined"!=typeof a&&
null!=a&&""!==a&&-1<a.indexOf(".gif")&&0==b.find("canvas").length){b.prepend(c('<div class="asp_item_canvas"><canvas></canvas></div>').get(0));let e=c(this).find("canvas").get(0),f=c(this).find(".asp_item_canvas"),h=e.getContext("2d"),g=new Image;g.crossOrigin="anonymous";g.onload=function(){c(e).attr({width:g.width,height:g.height});h.drawImage(g,0,0,g.width,g.height);f.css({"background-image":"url("+e.toDataURL()+")"})};g.src=a}})},updateInfoHeader:function(b){let a,e=this.n("resultsDiv").find(".asp_results_top"),
f=this.n("text").val().trim();0<e.length&&(0>=this.n("items").length?e.css("display","none"):("undefined"==typeof this.resInfoBoxTxt&&(this.resInfoBoxTxt=0<this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").length?this.n("resultsDiv").find(".asp_results_top .asp_rt_phrase").html():"",this.resInfoBoxTxtNoPhrase=0<this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").length?this.n("resultsDiv").find(".asp_results_top .asp_rt_nophrase").html():""),""!==f&&""!==this.resInfoBoxTxt?a=
this.resInfoBoxTxt:""===f&&""!==this.resInfoBoxTxtNoPhrase&&(a=this.resInfoBoxTxtNoPhrase),""!==a?(a=a.replaceAll("{phrase}",d.escapeHtml(this.n("text").val())),a=a.replaceAll("{results_count}",this.n("items").length),a=a.replaceAll("{results_count_total}",b),e.html(a),e.css("display","block")):e.css("display","none")))},showHorizontalResults:function(){this.n("resultsDiv").css("display","block");this.fixResultsPosition(!0);this.n("items").css("opacity",this.animationOpacity);"hover"==this.o.resultsposition&&
this.n("resultsDiv").css("width",this.n("search").width()-(this.n("resultsDiv").outerWidth(!0)-this.n("resultsDiv").width())+"px");if(0<this.n("items").length&&this.o.scrollBar.horizontal.enabled){let b=parseInt(this.n("items").css("marginLeft")),a=this.n("items").outerWidth()+2*b;this.n("results").css("overflowX","auto");this.n("resdrg").css("width",this.n("items").length*a+2*b+"px")}else this.n("results").css("overflowX","hidden"),this.n("resdrg").css("width","auto");1==this.o.highlight&&c("div.item",
this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:1==this.o.highlightWholewords});if(1>this.call_num){let b=this.n("results");b.get(0).scrollLeft=0;if(this.o.scrollBar.horizontal.enabled){let a=0,e=Date.now();b.off("mousewheel");b.on("mousewheel",function(f){let h="undefined"!=typeof f.deltaFactor?f.deltaFactor:65,g=0<f.deltaY?1:-1;var k=Date.now()-e;k=100<k?1:3-2*k/100;a!=f.deltaY&&(k=1);c(this).animate(!1).animate({scrollLeft:this.scrollLeft+
g*h*2*k},250,"easeOutQuad");a=f.deltaY;e=Date.now();d.isScrolledToRight(b.get(0))&&1==g||d.isScrolledToLeft(b.get(0))&&-1==g||f.preventDefault()})}}this.showResultsBox();this.addAnimation();this.searching=!1},showIsotopicResults:function(){if(1==this._no_animations)return this.showResultsBox(),this.addAnimation(),this.searching=!1,!0;this.preProcessIsotopicResults();this.showResultsBox();0<this.n("items").length&&(this.n("results").css({height:"auto"}),1==this.o.highlight&&c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),
{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords}));0==this.call_num&&this.calculateIsotopeRows();this.showPagination();this.isotopicPagerScroll();if(0==this.n("items").length)this.n("results").css({height:"11110px"}),this.n("results").css({height:"auto"}),this.n("resdrg").css({height:"auto"});else if("undefined"!==typeof rpp_isotope){if(null!=this.isotopic&&"undefined"!=typeof this.isotopic.destroy&&0==this.call_num&&this.isotopic.destroy(),0==this.call_num||null==this.isotopic)this.isotopic=
new rpp_isotope("#ajaxsearchprores"+this.o.rid+" .resdrg",{isOriginLeft:!c("body").hasClass("rtl"),itemSelector:"div.item",layoutMode:"masonry",filter:this.filterFns.number,masonry:{gutter:this.o.isotopic.gutter}})}else return!1;this.addAnimation();this.initIsotopicClick();this.searching=!1},initIsotopicClick:function(){let b=this;b.eh.isotopicClickhandle=b.eh.isotopicClickhandle||function(a){if(!b.dragging){let e=c(this).find(".asp_content a.asp_res_url"),f=e.attr("href");""!==f&&(a.preventDefault(),
2==a.which||"_blank"==e.attr("target")?d.openInNewTab(f):location.href=f)}};b.n("resultsDiv").find(".asp_isotopic_item").on("click",b.eh.isotopicClickhandle)},preProcessIsotopicResults:function(){let b=this,a=0,e="";b.o.isotopic.showOverlay&&0<b.n("aspItemOverlay").length&&(e=b.n("aspItemOverlay").get(0).outerHTML);b.n("items").forEach(function(f){let h="";var g=0<c(f).find(".asp_image").length,k=c(f).find(".asp_image");g&&(g=k.data("src"),k=b.o.isotopic.blurOverlay&&!d.isMobile()?"aspblur":"no_aspblur",
h=c("<div data-src='"+g+"' ></div>"),"undefined"==typeof WPD.lazy&&h.css({"background-image":"url("+g+")"}),h.css({filter:"url(#"+k+")","-webkit-filter":"url(#"+k+")","-moz-filter":"url(#"+k+")","-o-filter":"url(#"+k+")","-ms-filter":"url(#"+k+")"}).addClass("asp_item_overlay_img asp_lazy"),h=h.get(0).outerHTML);c(f).prepend(h+e+"");c(f).attr("data-itemnum",a);a++})},isotopicPagerScroll:function(){if(0>=c("nav>ul li.asp_active",this.n("resultsDiv")).length)return!1;var b=c("nav>ul li.asp_active",
this.n("resultsDiv")).offset().left;let a=c("nav>ul li.asp_active",this.n("resultsDiv")).outerWidth(!0),e=c("nav>a.asp_next",this.n("resultsDiv")).offset().left;var f=c("nav>a.asp_prev",this.n("resultsDiv")).offset().left;0>=a||(f=Math.ceil((f-b+2*a)/a),0<f?0==c("nav>ul li.asp_active",this.n("resultsDiv")).prev().length?c("nav>ul",this.n("resultsDiv")).css({left:a+"px"}):c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left+a*f+"px"}):(b=0==c("nav>ul li.asp_active",
this.n("resultsDiv")).next().length?Math.ceil((b-e+a)/a):Math.ceil((b-e+2*a)/a),0<b&&c("nav>ul",this.n("resultsDiv")).css({left:c("nav>ul",this.n("resultsDiv")).position().left-a*b+"px"})))},showPagination:function(b){b="undefined"!==typeof b?b:!1;if(!this.o.isotopic.pagination)return null!=this.isotopic&&b&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number}),!1;(1>this.call_num||b)&&c("nav.asp_navigation ul li",this.n("resultsDiv")).remove();c("nav.asp_navigation",this.n("resultsDiv")).css("display",
"none");if(0<this.n("items").length){var a=1;0<this.call_num&&!b&&(a=this.n("resultsDiv").find("nav.asp_navigation ul").first().find("li").length+1);let e=Math.ceil(this.n("items").length/this.il.itemsPerPage);if(1<e){let f=b&&0<this.il.lastVisibleItem?Math.ceil(this.il.lastVisibleItem/this.il.itemsPerPage):1;for(f=0>=f?1:f;a<=e;a++)a==f?c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li class='asp_active'><span>"+a+"</span></li>"):c("nav.asp_navigation ul",this.n("resultsDiv")).append("<li><span>"+
a+"</span></li>");c("nav.asp_navigation",this.n("resultsDiv")).css("display","block");b?c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click_trigger"):c("nav.asp_navigation ul li.asp_active",this.n("resultsDiv")).trigger("click")}else null!=this.isotopic&&b&&this.isotopic.arrange({transitionDuration:0,filter:this.filterFns.number})}},hidePagination:function(){c("nav.asp_navigation",this.n("resultsDiv")).css("display","none")},visiblePagination:function(){return"none"!=c("nav.asp_navigation",
this.n("resultsDiv")).css("display")},calculateIsotopeRows:function(){let b=this;let a;var e=parseFloat(b.n("results").width());if("desktop"===d.deviceType()){var f=d.getWidthFromCSSValue(b.o.isotopic.itemWidth,e);a=d.getWidthFromCSSValue(b.o.isotopic.itemHeight,e)}else"tablet"===d.deviceType()?(f=d.getWidthFromCSSValue(b.o.isotopic.itemWidthTablet,e),a=d.getWidthFromCSSValue(b.o.isotopic.itemHeightTablet,e)):(f=d.getWidthFromCSSValue(b.o.isotopic.itemWidthPhone,e),a=d.getWidthFromCSSValue(b.o.isotopic.itemHeightPhone,
e));let h=b.o.isotopic.gutter,g=Math.floor(e/f);0>=g&&(g=1);Math.abs(e/g-f)>Math.abs(e/(g+1)-f)&&g++;e=e/g-(g-1)*h/g;f=e/f*a;b.il.columns=g;b.il.itemsPerPage=g*b.il.rows;b.il.lastVisibleItem=0;b.n("results").find(".asp_isotopic_item").forEach(function(k,l){"none"!=c(k).css("display")&&(b.il.lastVisibleItem=l)});isNaN(b.il.columns)||isNaN(b.il.itemsPerPage)||(b.n("resultsDiv").data("colums",b.il.columns),b.n("resultsDiv").data("itemsperpage",b.il.itemsPerPage));b.currentPage=1;b.n("items").css({width:Math.floor(e)+
"px",height:Math.floor(f)+"px"})},showPolaroidResults:function(){var b;null==(b=this.loadASPFonts)||b.call(this);this.n("results").addClass("photostack");c(".photostack>nav",this.n("resultsDiv")).remove();b=c("figure",this.n("resultsDiv"));this.n("resultsDiv").css({display:"block",height:"auto"});this.showResultsBox();if(0<b.length)if(this.n("results").css({height:this.o.prescontainerheight}),1==this.o.highlight&&c("figcaption",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",
className:"highlighted",wordsOnly:this.o.highlightWholewords}),"undefined"!==typeof Photostack)this.ptstack=new Photostack(this.n("results").get(0),{callback:function(a){}});else return!1;0==b.length&&(this.n("results").css({height:"11110px"}),this.n("results").css({height:"auto"}));this.addAnimation();this.fixResultsPosition(!0);this.searching=!1;this.initPolaroidEvents(b)},initPolaroidEvents:function(b){let a=this,e=1;b.each(function(){1<e&&c(this).removeClass("photostack-current");c(this).attr("idx",
e);e++});b.on("click",function(f){c(this).hasClass("photostack-current")||(f.preventDefault(),f=c(this).attr("idx"),c(".photostack>nav span:nth-child("+f+")",a.n("resultsDiv")).trigger("click",[],!0))});b.on("mousewheel",function(f){f.preventDefault();1<=(0<f.deltaY?1:-1)?0<c(".photostack>nav span.current",a.n("resultsDiv")).next().length?c(".photostack>nav span.current",a.n("resultsDiv")).next().trigger("click",[],!0):c(".photostack>nav span:nth-child(1)",a.n("resultsDiv")).trigger("click",[],!0):
0<c(".photostack>nav span.current",a.n("resultsDiv")).prev().length?c(".photostack>nav span.current",a.n("resultsDiv")).prev().trigger("click",[],!0):c(".photostack>nav span:nth-last-child(1)",a.n("resultsDiv")).trigger("click",[],!0)});a.n("resultsDiv").on("swiped-left",function(){0<c(".photostack>nav span.current",a.n("resultsDiv")).next().length?c(".photostack>nav span.current",a.n("resultsDiv")).next().trigger("click",[],!0):c(".photostack>nav span:nth-child(1)",a.n("resultsDiv")).trigger("click",
[],!0)});a.n("resultsDiv").on("swiped-right",function(){0<c(".photostack>nav span.current",a.n("resultsDiv")).prev().length?c(".photostack>nav span.current",a.n("resultsDiv")).prev().trigger("click",[],!0):c(".photostack>nav span:nth-last-child(1)",a.n("resultsDiv")).trigger("click",[],!0)})},showVerticalResults:function(){this.showResultsBox();if(0<this.n("items").length){let a=this.n("items").length<this.o.itemscount?this.n("items").length:this.o.itemscount;a=0>=a?9999:a;var b=c(".asp_group_header",
this.n("resultsDiv"));if(0==this.o.itemscount||this.n("items").length<=this.o.itemscount)this.n("results").css({height:"auto"});else if(1>this.call_num&&this.n("results").css({height:"30px"}),1>this.call_num){let e=0,f=0,h=0,g=0;this.n("items").each(function(){f+=c(this).outerHeight(!0);c(this).outerHeight(!0)>g&&(g=c(this).outerHeight(!0));e++});h=g*a;h>f&&(h=f);e=1>e?1:e;f=f/e*a;0<b.length&&b.each(function(k,l){k=Array.prototype.slice.call(k.parentNode.children).indexOf(k);k-l-Math.floor(k/3)<a&&
(h+=c(this).outerHeight(!0))});this.n("results").css({height:h+"px"})}this.n("items").last().addClass("asp_last_item");this.n("results").find(".asp_group_header").prev(".item").addClass("asp_last_item");1==this.o.highlight&&c("div.item",this.n("resultsDiv")).highlight(this.n("text").val().split(" "),{element:"span",className:"highlighted",wordsOnly:this.o.highlightWholewords})}this.resize();0==this.n("items").length&&this.n("results").css({height:"auto"});this.n("results").css({overflowY:"auto"});
1>this.call_num&&(this.n("results").get(0).scrollTop=0);if(this.o.preventBodyScroll){let a;b=c("body");let e=b.css("overflow"),f="undefined"===typeof b.attr("style");this.n("results").off("touchstart");this.n("results").off("touchend");this.n("results").on("touchstart",function(){clearTimeout(a);c("body").css("overflow","hidden")}).on("touchend",function(){clearTimeout(a);a=setTimeout(function(){f?c("body").removeAttr("style"):c("body").css("overflow",e)},300)})}this.addAnimation();this.fixResultsPosition(!0);
this.searching=!1},createResultsScroll:function(b){let a=this,e,f=a.n("results");b="undefined"==typeof b?"vertical":b;f.on("scroll",function(){document.dispatchEvent(new Event("wpd-lazy-trigger"));a.o.show_more.infinite&&(clearTimeout(e),e=setTimeout(function(){a.checkAndTriggerInfiniteScroll(b)},60))})},createVerticalScroll:function(){this.createResultsScroll("vertical")},createHorizontalScroll:function(){this.createResultsScroll("horizontal")},checkAndTriggerInfiniteScroll:function(b){var a=c(".item",
this.n("resultsDiv"));b="undefined"==typeof b?"window":b;if(0==this.n("showmore").length||"none"==this.n("showmore").css("display"))return!1;if("window"==b||"horizontal"==b){if("isotopic"==this.o.resultstype&&"none"!=c("nav.asp_navigation",this.n("resultsDiv")).css("display"))return!1;b=a.last().inViewPort(0,this.n("resultsDiv").get(0));let e=a.last().inViewPort(0);!this.searching&&0<a.length&&b&&e&&this.n("showmore").find("a.asp_showmore").trigger("click")}else"vertical"==b?(a=this.n("results"),
d.isScrolledToBottom(a.get(0),20)&&this.n("showmore").find("a.asp_showmore").trigger("click")):"isotopic"==b&&!this.searching&&0<a.length&&this.n("resultsDiv").find("nav.asp_navigation ul li").last().hasClass("asp_active")&&this.n("showmore").find("a.asp_showmore").trigger("click")},isDuplicateSearchTriggered:function(){for(let b=0;25>b;b++)if(this.o.id+"_"+b!=this.o.rid&&!1!==ASP.instances.get(this.o.id,b))return ASP.instances.get(this.o.id,b).searching;return!1},searchAbort:function(){null!=this.post&&
(this.post.abort(),this.isAutoP=!1)},searchWithCheck:function(b){let a=this;"undefined"==typeof b&&(b=50);a.n("text").val().length<a.o.charcount||(a.searchAbort(),clearTimeout(a.timeouts.searchWithCheck),a.timeouts.searchWithCheck=setTimeout(function(){a.search()},b))},search:function(b,a,e,f,h){let g=this,k=!1;if(g.isDuplicateSearchTriggered())return!1;e="undefined"==typeof e?!1:e;f="undefined"==typeof f?!1:f;h="undefined"==typeof h?!1:h;let l={action:"ajaxsearchpro_search",aspp:g.n("text").val(),
asid:g.o.id,asp_inst_id:g.o.rid,options:c("form",g.n("searchsettings")).serialize()};l=d.Hooks.applyFilters("asp_search_data",l,g.o.id,g.o.iid);l=d.wp_hooks_apply_filters("asp_search_data",l,g.o.id,g.o.iid);g.hideArrowBox();g.isAutoP||g.reportSettingsValidity()||(h||(g.showNextInvalidFacetMessage(),g.scrollToNextInvalidFacetMessage()),k=!0);g.isAutoP&&(l.autop=1);if(!e&&!f&&JSON.stringify(l)===JSON.stringify(g.lastSearchData)){g.resultsOpened||g.usingLiveLoader()||g.showResults();if(g.isRedirectToFirstResult())return g.doRedirectToFirstResult(),
!1;k=!0}if(k)return g.hideLoader(),g.searchAbort(),!1;g.n("s").trigger("asp_search_start",[g.o.id,g.o.iid,g.n("text").val()],!0,!0);g.searching=!0;g.n("proclose").css({display:"none"});g.showLoader(e);0==g.att("blocking")&&0==g.o.trigger.facet&&g.hideSettings();e?(g.call_num++,l.asp_call_num=g.call_num,g.autopStartedTheSearch&&(l.options+="&"+c.fn.serializeForAjax(g.autopData),--l.asp_call_num)):(g.call_num=0,g.autopStartedTheSearch=!!l.autop);f=c('form[name="asp_data"]');0<f.length&&(l.asp_preview_options=
f.serialize());"undefined"!=typeof b&&!1!==b&&(l.options+="&force_count="+parseInt(b));"undefined"!=typeof a&&!1!==a&&(l.options+="&force_order="+parseInt(a));let n;null==(n=g.gaEvent)||n.call(g,"search_start");0<c(".asp_es_"+g.o.id).length?g.liveLoad(".asp_es_"+g.o.id,g.getCurrentLiveURL(),g.o.trigger.update_href):g.o.resPage.useAjax?g.liveLoad(g.o.resPage.selector,g.getRedirectURL()):g.o.wooShop.useAjax?g.liveLoad(g.o.wooShop.selector,g.getLiveURLbyBaseLocation(g.o.wooShop.url)):g.o.taxArchive.useAjax?
g.liveLoad(g.o.taxArchive.selector,g.getLiveURLbyBaseLocation(g.o.taxArchive.url)):g.post=c.fn.ajax({url:ASP.ajaxurl,method:"POST",data:l,success:function(m){var q;null==(q=g.gaPageview)||q.call(g,g.n("text").val());g.searching=!1;m=m.replace(/^\s*[\r\n]/gm,"");q=m.match(/___ASPSTART_HTML___(.*[\s\S]*)___ASPEND_HTML___/);m=m.match(/___ASPSTART_DATA___(.*[\s\S]*)___ASPEND_DATA___/);if(null==q||"object"!=typeof q||"undefined"==typeof q[1])return g.hideLoader(),alert('Ajax Search Pro Error:\r\n\r\nPlease look up "The response data is missing" from the documentation at\r\n\r\n documentation.ajaxsearchpro.com'),
!1;q=q[1];q=d.Hooks.applyFilters("asp_search_html",q,g.o.id,g.o.iid);q=d.wp_hooks_apply_filters("asp_search_html",q,g.o.id,g.o.iid);m=JSON.parse(m[1]);g.n("s").trigger("asp_search_end",[g.o.id,g.o.iid,g.n("text").val(),m],!0,!0);g.autopStartedTheSearch&&("undefined"!=typeof l.autop?(g.autopData.not_in={},g.autopData.not_in_count=0,Array.isArray(m.results)&&m.results.forEach(function(r){"undefined"==typeof g.autopData.not_in[r.content_type]&&(g.autopData.not_in[r.content_type]=[]);g.autopData.not_in[r.content_type].push(r.id);
++g.autopData.not_in_count})):m.full_results_count+=g.autopData.not_in_count);e?(g.updateResults(q),g.results_num+=m.results_count):(g.n("resdrg").html(""),g.n("resdrg").html(q),g.results_num=m.results_count,g.o.statistics&&g.stat_addKeyword(g.o.id,g.n("text").val()));g.nodes.items=0<c(".item",g.n("resultsDiv")).length?c(".item",g.n("resultsDiv")):c(".photostack-flip",g.n("resultsDiv"));var p;null==(p=g.gaEvent)||p.call(g,"search_end",{results_count:g.n("items").length});if(g.isRedirectToFirstResult())return g.doRedirectToFirstResult(),
!1;g.hideLoader();g.showResults();g.scrollToResults();g.lastSuccesfulSearch=c("form",g.n("searchsettings")).serialize()+g.n("text").val().trim();g.lastSearchData=l;g.updateInfoHeader(m.full_results_count);g.updateHref();c(".asp_keyword",g.n("resdrg")).on("click",function(){g.n("text").val(d.decodeHTMLEntities(c(this).text()));g.n("textAutocomplete").val("");0!=g.o.redirectOnClick&&0!=g.o.redirectOnEnter&&1!=g.o.trigger.type||g.search()});0<g.n("showmore").length&&(0<c("span",g.n("showmore")).length&&
0<m.results_count&&0<m.full_results_count-g.results_num?(""==g.n("showmore").data("text")&&g.n("showmore").data("text",g.n("showmore").html()),g.n("showmore").html(g.n("showmore").data("text").replaceAll("{phrase}",d.escapeHtml(g.n("text").val()))),g.n("showmore").css("display","block"),c("span",g.n("showmore")).html("("+(m.full_results_count-g.results_num)+")"),p=c("a",g.n("showmore")),p.attr("href",""),p.off(),p.on(g.clickTouchend,function(r){r.preventDefault();r.stopImmediatePropagation();if("ajax"==
g.o.show_more.action){if(g.searching)return!1;g.showMoreResLoader();g.search(!1,!1,!0)}else c(this).off(),"results_page"==g.o.show_more.action?r="?s="+d.nicePhrase(g.n("text").val()):"woo_results_page"==g.o.show_more.action?r="?post_type=product&s="+d.nicePhrase(g.n("text").val()):(r="elementor_page"==g.o.show_more.action?g.parseCustomRedirectURL(g.o.show_more.elementor_url,g.n("text").val()):g.parseCustomRedirectURL(g.o.show_more.url,g.n("text").val()),r=c("<textarea />").html(r).text()),"elementor_page"!=
g.o.show_more.action&&1<g.o.homeurl.indexOf("?")&&0==r.indexOf("?")&&(r=r.replace("?","&")),r="elementor_page"==g.o.show_more.action?r:g.o.homeurl+r,g.o.overridewpdefault?"post"==g.o.override_method?d.submitToUrl(r,"post",{asp_active:1,p_asid:g.o.id,p_asp_data:c("form",g.n("searchsettings")).serialize()},g.o.show_more.location):(r=r+"&asp_active=1&p_asid="+g.o.id+"&p_asp_data=1&"+c("form",g.n("searchsettings")).serialize(),"same"==g.o.show_more.location?location.href=r:d.openInNewTab(r)):d.submitToUrl(r,
"post",{np_asid:g.o.id,np_asp_data:c("form",g.n("searchsettings")).serialize()},g.o.show_more.location)})):(g.n("showmore").css("display","none"),c("span",g.n("showmore")).html("")));g.isAutoP=!1},fail:function(m){m.aborted||(g.n("resdrg").html(""),g.n("resdrg").html('<div class="asp_nores">The request failed. Please check your connection! Status: '+m.status+"</div>"),g.nodes.item=0<c(".item",g.n("resultsDiv")).length?c(".item",g.n("resultsDiv")):c(".photostack-flip",g.n("resultsDiv")),g.results_num=
0,g.searching=!1,g.hideLoader(),g.showResults(),g.scrollToResults(),g.isAutoP=!1)}})},showSettings:function(b){let a=this,e;null==(e=a.initSettings)||e.call(a);b="undefined"==typeof b?!0:b;a.n("s").trigger("asp_settings_show",[a.o.id,a.o.iid],!0,!0);b?(a.n("searchsettings").css(a.settAnim.showCSS),a.n("searchsettings").removeClass(a.settAnim.hideClass).addClass(a.settAnim.showClass)):a.n("searchsettings").css({display:"block",visibility:"visible",opacity:1});if(!("masonry"!=a.o.fss_layout||null!=
a.sIsotope||d.isMobile()&&d.detectIOS()))if("undefined"!==typeof rpp_isotope)setTimeout(function(){let f=a.n("searchsettings").attr("id");a.n("searchsettings").css("width","100%");a.sIsotope=new rpp_isotope("#"+f+" form",{isOriginLeft:!c("body").hasClass("rtl"),itemSelector:"fieldset",layoutMode:"masonry",transitionDuration:0,masonry:{columnWidth:a.n("searchsettings").find("fieldset:not(.hiddend)").outerWidth()}})},20);else return!1;"undefined"!=typeof a.select2jQuery&&a.select2jQuery(a.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").trigger("change.asp_select2");
a.n("prosettings").data("opened",1);a.fixSettingsPosition(!0);a.fixSettingsAccessibility()},hideSettings:function(){let b=this,a;null==(a=b.initSettings)||a.call(b);b.n("s").trigger("asp_settings_hide",[b.o.id,b.o.iid],!0,!0);b.n("searchsettings").removeClass(b.settAnim.showClass).addClass(b.settAnim.hideClass);setTimeout(function(){b.n("searchsettings").css(b.settAnim.hideCSS)},b.settAnim.duration);b.n("prosettings").data("opened",0);null!=b.sIsotope&&setTimeout(function(){b.sIsotope.destroy();b.sIsotope=
null},b.settAnim.duration);"undefined"!=typeof b.select2jQuery&&"undefined"!=typeof b.select2jQuery.fn.asp_select2&&b.select2jQuery(b.n("searchsettings").get(0)).find(".asp_gochosen,.asp_goselect2").asp_select2("close");b.hideArrowBox()},reportSettingsValidity:function(){let b=!0;if("hidden"==this.n("searchsettings").css("visibility"))return!0;this.n("searchsettings").find("fieldset.asp_required").each(function(){let a=c(this),e=!0;a.find("input[type=text]:not(.asp_select2-search__field)").each(function(){""==
c(this).val()&&(e=!1)});a.find("select").each(function(){if(null==c(this).val()||""==c(this).val()||c(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type")&&"-1"==c(this).val())e=!1});0<a.find("input[type=checkbox]").length&&(0===a.find("input[type=checkbox]:checked").length?e=!1:1===a.find("input[type=checkbox]:checked").length&&""===a.find("input[type=checkbox]:checked").val()&&(e=!1));0<a.find("input[type=radio]").length&&(0===a.find("input[type=radio]:checked").length&&(e=
!1),e&&a.find("input[type=radio]").each(function(){c(this).prop("checked")&&(""==c(this).val()||c(this).closest("fieldset").is(".asp_filter_tax, .asp_filter_content_type")&&"-1"==c(this).val())&&(e=!1)}));e?a.removeClass("asp-invalid"):(a.addClass("asp-invalid"),b=!1)});b||this.n("searchsettings").find("button.asp_s_btn").prop("disabled",!0);this.n("searchsettings").find("button.asp_s_btn").prop("disabled",!1);return b},showArrowBox:function(b,a){let e=this;var f=c("body");let h=f.find(".asp_arrow_box");
0===h.length&&(f.append("<div class='asp_arrow_box'></div>"),h=f.find(".asp_arrow_box"),h.on("mouseout",function(){e.hideArrowBox()}));f=c(b).offset().top-window.scrollY;var g=!1;let k=b;for(;k;)if(k=k.parentElement,null!=k&&"fixed"==window.getComputedStyle(k).position){g=!0;break}g?(h.css("position","fixed"),g=0):(h.css("position","absolute"),g=window.scrollY);h.html(a);h.css("display","block");a=b.getBoundingClientRect().left+c(b).outerWidth()/2-h.outerWidth()/2+"px";100<f?(h.removeClass("asp_arrow_box_bottom"),
h.css({top:g+b.getBoundingClientRect().top-h.outerHeight()-4+"px",left:a})):(h.addClass("asp_arrow_box_bottom"),h.css({top:g+b.getBoundingClientRect().bottom+4+"px",left:a}))},hideArrowBox:function(){c("body").find(".asp_arrow_box").css("display","none")},showNextInvalidFacetMessage:function(){0<this.n("searchsettings").find(".asp-invalid").length&&this.showArrowBox(this.n("searchsettings").find(".asp-invalid").first().get(0),this.n("searchsettings").find(".asp-invalid").first().data("asp_invalid_msg"))},
scrollToNextInvalidFacetMessage:function(){if(0<this.n("searchsettings").find(".asp-invalid").length){var b=this.n("searchsettings").find(".asp-invalid").first();if(!b.inViewPort(0))if("undefined"!=typeof b.get(0).scrollIntoView)b.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"});else{b=b.offset().top-20;let a=c("#wpadminbar");0<a.length&&(b-=a.height());b=0>b?0:b;window.scrollTo({top:b,behavior:"smooth"})}}},settingsCheckboxToggle:function(b,a){a="undefined"==typeof a?!0:
a;let e=b,f=b.find('input[type="checkbox"]');b=parseInt(b.data("lvl"))+1;let h=0;for(;;){e=e.next();if(0<e.length&&"undefined"!=typeof e.data("lvl")&&parseInt(e.data("lvl"))>=b)a&&e.find('input[type="checkbox"]').prop("checked",f.prop("checked")),this.o.settings.hideChildren&&(f.prop("checked")?e.removeClass("hiddend"):e.addClass("hiddend"));else break;h++;if(400<h)break}},searchFor:function(b){"undefined"!=typeof b&&this.n("text").val(b);this.n("textAutocomplete").val("");this.search(!1,!1,!1,!0)},
searchRedirect:function(b){b=this.parseCustomRedirectURL(this.o.trigger.redirect_url,b);1<this.o.homeurl.indexOf("?")&&0==b.indexOf("?")&&(b=b.replace("?","&"));this.o.overridewpdefault?"post"==this.o.override_method?d.submitToUrl(this.o.homeurl+b,"post",{asp_active:1,p_asid:this.o.id,p_asp_data:c("form",this.n("searchsettings")).serialize()}):location.href=this.o.homeurl+b+"&asp_active=1&p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize():d.submitToUrl(this.o.homeurl+
b,"post",{np_asid:this.o.id,np_asp_data:c("form",this.n("searchsettings")).serialize()})},toggleSettings:function(b){"undefined"!=typeof b?"show"==b?this.showSettings():this.hideSettings():1==this.n("prosettings").data("opened")?this.hideSettings():this.showSettings()},closeResults:function(b){"undefined"!=typeof b&&b&&(this.n("text").val(""),this.n("textAutocomplete").val(""));this.hideResults();this.n("proloading").css("display","none");this.hideLoader();this.searchAbort()},getStateURL:function(){let b=
location.href,a;b=b.split("p_asid");b=b[0];b=b.replace("&asp_active=1","");b=b.replace("?asp_active=1","");b="?"==b.slice(-1)?b.slice(0,-1):b;b="&"==b.slice(-1)?b.slice(0,-1):b;a=1<b.indexOf("?")?"&":"?";return b+a+"p_asid="+this.o.id+"&p_asp_data=1&"+c("form",this.n("searchsettings")).serialize()},resetSearch:function(){this.resetSearchFilters()},filtersInitial:function(){return 1==this.n("searchsettings").find("input[name=filters_initial]").val()},filtersChanged:function(){return 1==this.n("searchsettings").find("input[name=filters_changed]").val()}})})(WPD.dom);
(function(c){c(".ajaxsearchprotop").each(function(){let d=JSON.parse(c(this).data("aspdata")),b=d.id;if(0==d.action)c("a",c(this)).on("click",function(a){a.preventDefault()});else if(2==d.action)c("a",c(this)).on("click",function(a){a.preventDefault();ASP.api(b,"searchFor",c(this).html());c("html").animate({scrollTop:c("div[id*=ajaxsearchpro"+b+"_]").first().offset().top-40},500)});else if(1==d.action)c("a",c(this)).on("click",function(a){if(ASP.api(b,"exists"))return a.preventDefault(),ASP.api(b,
"searchRedirect",c(this).html())})})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers,b=window.WPD.ajaxsearchpro;c.fn.extend(window.WPD.ajaxsearchpro.plugin,{detectAndFixFixedPositioning:function(){let a=!1,e=this.n("search").get(0);for(;e;)if(e=e.parentElement,null!=e&&"fixed"==window.getComputedStyle(e).position){a=!0;break}a||"fixed"==this.n("search").css("position")?("absolute"==this.n("resultsDiv").css("position")&&this.n("resultsDiv").css({position:"fixed","z-index":2147483647}),this.att("blocking")||this.n("searchsettings").css({position:"fixed",
"z-index":2147483647})):("fixed"==this.n("resultsDiv").css("position")&&this.n("resultsDiv").css("position","absolute"),this.att("blocking")||this.n("searchsettings").css("position","absolute"))},fixSettingsAccessibility:function(){this.n("searchsettings").find("input.asp_select2-search__field").attr("aria-label","Select2 search")},fixTryThisPosition:function(){this.n("trythis").css({left:this.n("search").position().left})},fixResultsPosition:function(a){a="undefined"==typeof a?!1:a;var e=c("body");
let f=0;var h=this.n("resultsDiv").css("position");if(0!=c._fn.bodyTransformY()||"static"!=e.css("position"))f=e.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==h&&(h="absolute",this.n("resultsDiv").css("position","absolute"));"fixed"==h&&(f=0);if("fixed"==h||"absolute"==h)if(1==a||"visible"==this.n("resultsDiv").css("visibility")){a=this.n("search").offset();h=0;if(0!=c._fn.bodyTransformX()||"static"!=e.css("position"))h=e.offset().left;if("undefined"!=typeof a){let g=0;e="phone"==d.deviceType()?
this.o.results.width_phone:"tablet"==d.deviceType()?this.o.results.width_tablet:this.o.results.width;"auto"==e&&(e=240>this.n("search").outerWidth()?240:this.n("search").outerWidth());this.n("resultsDiv").css("width",isNaN(e)?e:e+"px");"right"==this.o.resultsSnapTo?g=this.n("resultsDiv").outerWidth()-this.n("search").outerWidth():"center"==this.o.resultsSnapTo&&(g=Math.floor((this.n("resultsDiv").outerWidth()-parseInt(this.n("search").outerWidth()))/2));this.n("resultsDiv").css({top:a.top+this.n("search").outerHeight(!0)-
f+"px",left:a.left-g-h+"px"})}}},fixSettingsPosition:function(a){a="undefined"==typeof a?!1:a;var e=c("body"),f=0,h=this.n("searchsettings").css("position");if(0!=c._fn.bodyTransformY()||"static"!=e.css("position"))f=e.offset().top;0!=c._fn.bodyTransformY()&&"fixed"==h&&(h="absolute",this.n("searchsettings").css("position","absolute"));"fixed"==h&&(f=0);if((1==a||0!=this.n("prosettings").data("opened"))&&1!=this.att("blocking")){a=0;if(0!=c._fn.bodyTransformX()||"static"!=e.css("position"))a=e.offset().left;
this.fixSettingsWidth();e="none"!=this.n("prosettings").css("display")?this.n("prosettings"):this.n("promagnifier");h=e.offset();f=h.top+e.height()-2-f+"px";e="left"==this.o.settingsimagepos?h.left:h.left+e.width()-this.n("searchsettings").width();e=e-a+"px";this.n("searchsettings").css({display:"block",top:f,left:e})}},fixSettingsWidth:function(){if(!this.att("blocking")&&"masonry"!=this.o.fss_layout&&(this.n("searchsettings").css({width:"100%"}),10<this.n("searchsettings").width()%c("fieldset",
this.n("searchsettings")).outerWidth(!0))){let a=Math.floor(this.n("searchsettings").width()/c("fieldset",this.n("searchsettings")).outerWidth(!0));a=0>=a?1:a;this.n("searchsettings").css({width:a*c("fieldset",this.n("searchsettings")).outerWidth(!0)+8+"px"})}},hideOnInvisibleBox:function(){1!=this.o.detectVisibility||0!=this.o.compact.enabled||this.n("search").hasClass("hiddend")||this.n("search").isVisible()||(this.hideSettings(),this.hideResults())},initAutocompleteEvent:function(){let a=this,
e;if(1==a.o.autocomplete.enabled&&!d.isMobile()||1==a.o.autocomplete.mobile&&d.isMobile())a.n("text").on("keyup",function(f){a.keycode=f.keyCode||f.which;a.ktype=f.type;let h=39;c("body").hasClass("rtl")&&(h=37);a.keycode==h&&""!=a.n("textAutocomplete").val()?(f.preventDefault(),a.n("text").val(a.n("textAutocomplete").val()),0!=a.o.trigger.type&&(a.searchAbort(),a.search())):(clearTimeout(e),null!=a.postAuto&&a.postAuto.abort(),1==a.o.autocomplete.googleOnly?a.autocompleteGoogleOnly():e=setTimeout(function(){a.autocomplete();
e=null},a.o.trigger.autocomplete_delay))}),a.n("text").on("keyup mouseup input blur select",function(){a.fixAutocompleteScrollLeft()})},initMagnifierEvents:function(){let a=this;a.n("promagnifier").on("click",function(e){let f=a.n("search").attr("asp-compact")||"closed";a.keycode=e.keyCode||e.which;a.ktype=e.type;if(1==a.o.compact.enabled&&("closed"==f||1==a.o.compact.closeOnMagnifier&&"open"==f))return!1;let h;null==(h=a.gaEvent)||h.call(a,"magnifier");if(a.n("text").val().length>=a.o.charcount&&
1==a.o.redirectOnClick&&"first_result"!=a.o.trigger.click)return a.doRedirectToResults("click"),clearTimeout(void 0),!1;if("ajax_search"!=a.o.trigger.click&&"first_result"!=a.o.trigger.click)return!1;a.searchAbort();clearTimeout(a.timeouts.search);a.n("proloading").css("display","none");a.n("text").val().length>=a.o.charcount&&(a.timeouts.search=setTimeout(function(){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch||!a.resultsOpened&&!a.usingLiveLoader()?
a.search():a.isRedirectToFirstResult()?a.doRedirectToFirstResult():a.n("proclose").css("display","block")},a.o.trigger.delay))})},initButtonEvents:function(){let a=this;a.n("searchsettings").find("button.asp_s_btn").on("click",function(e){a.ktype="button";e.preventDefault();if(a.n("text").val().length>=a.o.charcount){if("ajax_search"!=a.o.sb.redirect_action)if("first_result"!=a.o.sb.redirect_action)a.doRedirectToResults("button");else{if(a.isRedirectToFirstResult())return a.doRedirectToFirstResult(),
!1;a.search()}else c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch&&a.resultsOpened||a.search();clearTimeout(a.timeouts.search)}});a.n("searchsettings").find("button.asp_r_btn").on("click",function(e){let f=d.formData(c("form",a.n("searchsettings"))),h=a.n("text").val();e.preventDefault();a.resetSearchFilters();"live"!=a.o.rb.action||JSON.stringify(f)==JSON.stringify(d.formData(c("form",a.n("searchsettings"))))&&""==h?"close"==a.o.rb.action&&a.hideResults():
a.search(!1,!1,!1,!0,!0)})},initCompactEvents:function(){let a=this;a.n("promagnifier").on("click",function(){let e=a.n("search").attr("asp-compact")||"closed";a.hideSettings();a.hideResults();"closed"==e?(a.openCompact(),a.n("text").trigger("focus")):1==a.o.compact.closeOnMagnifier&&(a.closeCompact(),a.searchAbort(),a.n("proloading").css("display","none"))})},initDatePicker:function(){let a=this;WPD.intervalUntilExecute(function(e){function f(h,g,k,l,n){h=null!=k?e(k):e("#"+g.id);g=e(".asp_datepicker_hidden",
e(h).parent()).val();k="";if(null==h.datepicker("getDate"))e(".asp_datepicker_hidden",e(h).parent()).val("");else{k=String(h.datepicker("getDate"));var m=new Date(k.match(/(.*?)00:/)[1].trim());k=String(m.getFullYear());let q=("0"+(m.getMonth()+1)).slice(-2);m=("0"+String(m.getDate())).slice(-2);k=k+"-"+q+"-"+m;e(".asp_datepicker_hidden",e(h).parent()).val(k)}"undefined"!=typeof n&&null!=l||k==g||c(h.get(0)).trigger("change")}e(".asp_datepicker, .asp_datepicker_field",a.n("searchsettings").get(0)).each(function(){let h=
e(".asp_datepicker_format",e(this).parent()).val(),g=this,k=e(this).val();e(this).removeClass("hasDatepicker");e(this).datepicker({changeMonth:!0,changeYear:!0,dateFormat:"yy-mm-dd",onSelect:f,beforeShow:function(){e("#ui-datepicker-div").addClass("asp-ui")}});""==k?e(this).datepicker("setDate",""):e(this).datepicker("setDate",k);e(this).datepicker("option","dateFormat",h);f(null,null,g,!0);e(this).on("selectnochange",function(){f(null,null,g,!0)});e(this).on("keyup",function(){null==e(g).datepicker("getDate")&&
e(".asp_datepicker_hidden",e(g).parent()).val("");e(g).datepicker("hide")})});if(d.isMobile()&&d.detectIOS())e(window).on("pageshow",function(h){h.originalEvent.persisted&&setTimeout(function(){e(".asp_datepicker, .asp_datepicker_field",a.n("searchsettings").get(0)).each(function(){let g=e(this).datepicker("option","dateFormat");e(this).datepicker("option","dateFormat","yy-mm-dd");e(this).datepicker("setDate",e(this).next(".asp_datepicker_hidden").val());e(this).datepicker("option","dateFormat",g)})},
100)})},function(){return d.whichjQuery("datepicker")})},initFacetEvents:function(){let a=this,e=null;c(".asp_custom_f input[type=text]:not(.asp_select2-search__field):not(.asp_datepicker_field):not(.asp_datepicker)",a.n("searchsettings")).on("keydown",function(f){let h=f.keyCode||f.which,g=this;a.ktype=f.type;13==h&&(f.preventDefault(),f.stopImmediatePropagation());clearTimeout(e);e=setTimeout(function(){let k;null==(k=a.gaEvent)||k.call(a,"facet_change",{option_label:c(g).closest("fieldset").find("legend").text(),
option_value:c(g).val()})},1400);a.n("searchsettings").find("input[name=filters_changed]").val(1);a.setFilterStateInput(65);0!=a.o.trigger.facet&&a.searchWithCheck(240)});0!=a.o.trigger.facet&&(c("select",a.n("searchsettings")).on("change slidechange",function(f){a.ktype=f.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let h;null==(h=a.gaEvent)||h.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).find("option:checked").get().map(function(g){return g.text}).join()});
a.setFilterStateInput(65);a.searchWithCheck(80);null!=a.sIsotope&&a.sIsotope.arrange()}),c("input:not([type=checkbox]):not([type=text]):not([type=radio])",a.n("searchsettings")).on("change slidechange",function(f){a.ktype=f.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let h;null==(h=a.gaEvent)||h.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).val()});a.setFilterStateInput(65);a.searchWithCheck(80)}),c("input[type=radio]",
a.n("searchsettings")).on("change slidechange",function(f){a.ktype=f.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let h;null==(h=a.gaEvent)||h.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).closest("label").text()});a.setFilterStateInput(65);a.searchWithCheck(80)}),c("input[type=checkbox]",a.n("searchsettings")).on("asp_chbx_change",function(f){a.ktype=f.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);
let h;null==(h=a.gaEvent)||h.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).closest(".asp_option").find(".asp_option_label").text()+(c(this).prop("checked")?"(checked)":"(unchecked)")});a.setFilterStateInput(65);a.searchWithCheck(80)}),c("input.asp_datepicker, input.asp_datepicker_field",a.n("searchsettings")).on("change",function(f){a.ktype=f.type;a.n("searchsettings").find("input[name=filters_changed]").val(1);let h;null==(h=a.gaEvent)||
h.call(a,"facet_change",{option_label:c(this).closest("fieldset").find("legend").text(),option_value:c(this).val()});a.setFilterStateInput(65);a.searchWithCheck(80)}),c('div[id*="-handles"]',a.n("searchsettings")).each(function(f){a.ktype=f.type;if("undefined"!=typeof this.noUiSlider)this.noUiSlider.on("change",function(h){let g="undefined"!=typeof this.target?this.target:this,k;null==(k=a.gaEvent)||k.call(a,"facet_change",{option_label:c(g).closest("fieldset").find("legend").text(),option_value:h});
a.n("searchsettings").find("input[name=filters_changed]").val(1);a.setFilterStateInput(65);a.searchWithCheck(80)})}))},initInputEvents:function(){let a=this,e=!1,f=function(){a.n("text").off("mousedown touchstart keydown",f);if(!e){a._initFocusInput();a.o.trigger.type&&a._initSearchInput();a._initEnterEvent();a._initFormEvent();let h;null==(h=a.initAutocompleteEvent)||h.call(a);e=!0}};a.n("text").on("mousedown touchstart keydown",f,{passive:!0})},_initFocusInput:function(){let a=this;a.n("text").on("click",
function(e){e.stopPropagation();e.stopImmediatePropagation();c(this).trigger("focus");let f;null==(f=a.gaEvent)||f.call(a,"focus");if(c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch)return a.resultsOpened||a.usingLiveLoader()||(a._no_animations=!0,a.showResults(),a._no_animations=!1),!1});a.n("text").on("focus input",function(){a.searching||(""!=c(this).val()?a.n("proclose").css("display","block"):a.n("proclose").css({display:"none"}))})},_initSearchInput:function(){let a=
this,e=a.n("text").val();a.n("text").on("input",function(f){a.keycode=f.keyCode||f.which;a.ktype=f.type;if(d.detectIE()){if(e==a.n("text").val())return!1;e=a.n("text").val()}a.updateHref();if(!a.o.trigger.type)return a.searchAbort(),clearTimeout(a.timeouts.search),a.hideLoader(),!1;a.hideArrowBox();if(a.n("text").val().length<a.o.charcount)return a.n("proloading").css("display","none"),0==a.att("blocking")&&a.hideSettings(),a.hideResults(!1),a.searchAbort(),clearTimeout(a.timeouts.search),!1;a.searchAbort();
clearTimeout(a.timeouts.search);a.n("proloading").css("display","none");a.timeouts.search=setTimeout(function(){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch||!a.resultsOpened&&!a.usingLiveLoader()?a.search():a.isRedirectToFirstResult()?a.doRedirectToFirstResult():a.n("proclose").css("display","block")},a.o.trigger.delay)})},_initEnterEvent:function(){let a=this,e,f=!1;a.n("text").on("keyup",function(h){a.keycode=h.keyCode||h.which;a.ktype=h.type;if(13==
a.keycode){clearTimeout(e);e=setTimeout(function(){f=!1},300);if(f)return!1;f=!0}h=c(this).hasClass("orig");if(a.n("text").val().length>=a.o.charcount&&h&&13==a.keycode){let g;null==(g=a.gaEvent)||g.call(a,"return");1==a.o.redirectOnEnter?"first_result"!=a.o.trigger.return?a.doRedirectToResults(a.ktype):a.search():"ajax_search"==a.o.trigger.return&&(c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch&&a.resultsOpened||a.search());clearTimeout(a.timeouts.search)}})},
_initFormEvent:function(){let a=this;c(a.n("text").closest("form").get(0)).on("submit",function(e,f){e.preventDefault();d.isMobile()?a.o.redirectOnEnter?(e=new Event("keyup"),e.keyCode=e.which=13,this.n("text").get(0).dispatchEvent(e)):(a.search(),document.activeElement.blur()):"undefined"!=typeof f&&"ajax"==f&&a.search()})},initIsotopicPagination:function(){let a=this;a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>a",function(e){e.preventDefault();e.stopImmediatePropagation();e=c(this).closest("nav").find("li.asp_active");
"next"==(c(this).hasClass("asp_prev")?"prev":"next")?0<e.next("li").length?e.next("li").trigger("click"):c(this).closest("nav").find("li").first().trigger("click"):0<e.prev("li").length?e.prev("li").trigger("click"):c(this).closest("nav").find("li").last().trigger("click")});a.n("resultsDiv").on(a.clickTouchend+" click_trigger","nav>ul li",function(e){e.preventDefault();e.stopImmediatePropagation();let f=e.type,h=this;e=1;d.isMobile()&&(a.n("text").trigger("blur"),e=300);setTimeout(function(){a.currentPage=
parseInt(c(h).find("span").html(),10);c("nav>ul li",a.n("resultsDiv")).removeClass("asp_active");c("nav",a.n("resultsDiv")).each(function(g){c(c(g).find("ul li").get(a.currentPage-1)).addClass("asp_active")});"click_trigger"===f?a.isotopic.arrange({transitionDuration:0,filter:a.filterFns.number}):a.isotopic.arrange({transitionDuration:400,filter:a.filterFns.number});a.isotopicPagerScroll();a.removeAnimation();"undefined"!=typeof WPD.lazy&&document.dispatchEvent(new Event("wpd-lazy-trigger"));a.n("resultsDiv").trigger("nav_switch")},
e)})},initNavigationEvents:function(){let a=this,e=function(f){let h=f.keyCode||f.which;if(0<c(".item",a.n("resultsDiv")).length&&"none"!=a.n("resultsDiv").css("display")&&"vertical"==a.o.resultstype){if(40==h||38==h){var g=a.n("resultsDiv").find(".item.hovered");a.n("text").trigger("blur");0==g.length?a.n("resultsDiv").find(".item").first().addClass("hovered"):(40==h&&(0==g.next(".item").length?a.n("resultsDiv").find(".item").removeClass("hovered").first().addClass("hovered"):g.removeClass("hovered").next(".item").addClass("hovered")),
38==h&&(0==g.prev(".item").length?a.n("resultsDiv").find(".item").removeClass("hovered").last().addClass("hovered"):g.removeClass("hovered").prev(".item").addClass("hovered")));f.stopPropagation();f.preventDefault();a.n("resultsDiv").find(".resdrg .item.hovered").inViewPort(50,a.n("resultsDiv").get(0))||(g=a.n("resultsDiv").find(".resdrg .item.hovered").get(0),null!=g&&"undefined"!=typeof g.scrollIntoView&&g.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}))}13==h&&0<c(".item.hovered",
a.n("resultsDiv")).length&&(f.stopPropagation(),f.preventDefault(),c(".item.hovered a.asp_res_url",a.n("resultsDiv")).get(0).click())}};a.documentEventHandlers.push({node:document,event:"keydown",handler:e});c(document).on("keydown",e)},initNoUIEvents:function(){let a=this,e=a.nodes.searchsettings,f;e.find("div[class*=noui-slider-json]").each(function(h,g){let k=c(this).data("aspnoui");if("undefined"===typeof k)return!1;k=WPD.Base64.decode(k);if("undefined"===typeof k||""==k)return!1;let l=JSON.parse(k);
Object.keys(l.links).forEach(function(n){l.links[n].target="#"+e.get(0).id+" "+l.links[n].target});if(0<c(l.node,e).length){f=c(l.node,e).get(0);h=c(h).parent().find(".asp_slider_hidden");l.main.start=1<h.length?[h.first().val(),h.last().val()]:[h.first().val()];if("undefined"!==typeof noUiSlider)"undefined"!=typeof f.noUiSlider&&f.noUiSlider.destroy(),f.innerHTML="",noUiSlider.create(f,l.main);else return!1;a.noUiSliders[g]=f;f.noUiSlider.on("update",function(n,m){let q=n[m];m?l.links.forEach(function(p){let r=
wNumb(p.wNumb);"upper"==p.handle&&(c(p.target,e).is("input")?c(p.target,e).val(q):c(p.target,e).html(r.to(parseFloat(q))));c(l.node,e).on("slide",function(t){t.preventDefault()})}):l.links.forEach(function(p){let r=wNumb(p.wNumb);"lower"==p.handle&&(c(p.target,e).is("input")?c(p.target,e).val(q):c(p.target,e).html(r.to(parseFloat(q))));c(l.node,e).on("slide",function(t){t.preventDefault()})})})}})},initOtherEvents:function(){let a=this;if(d.isMobile()&&d.detectIOS())a.n("text").on("touchstart",function(){a.savedScrollTop=
window.scrollY;a.savedContainerTop=a.n("search").offset().top});if(a.o.focusOnPageload)c(window).on("load",function(){a.n("text").get(0).focus()},{options:{once:!0}});a.n("proclose").on(a.clickTouchend,function(f){f.preventDefault();f.stopImmediatePropagation();a.n("text").val("");a.n("textAutocomplete").val("");a.hideResults();a.n("text").trigger("focus");a.n("proloading").css("display","none");a.hideLoader();a.searchAbort();if(0<c(".asp_es_"+a.o.id).length)a.showLoader(),a.liveLoad(".asp_es_"+a.o.id,
a.getCurrentLiveURL(),a.o.trigger.update_href);else{f=["resPage","wooShop","taxArchive"];for(let h=0;h<f.length;h++)if(a.o[f[h]].useAjax){a.showLoader();a.liveLoad(a.o[f[h]].selector,a.getCurrentLiveURL());break}}a.n("text").get(0).focus()});if(d.isMobile()){var e=function(){a.orientationChange();setTimeout(function(){a.orientationChange()},600)};a.documentEventHandlers.push({node:window,event:"orientationchange",handler:e});c(window).on("orientationchange",e)}else e=function(){a.resize()},a.documentEventHandlers.push({node:window,
event:"resize",handler:e}),c(window).on("resize",e,{passive:!0});e=function(){a.scrolling(!1)};a.documentEventHandlers.push({node:window,event:"scroll",handler:e});c(window).on("scroll",e,{passive:!0});if(d.isMobile()&&""!=a.o.mobile.menu_selector)c(a.o.mobile.menu_selector).on("touchend",function(){let f=this;setTimeout(function(){let h=c(f).find("input.orig");h=0==h.length?c(f).next().find("input.orig"):h;h=0==h.length?c(f).parent().find("input.orig"):h;h=0==h.length?a.n("text"):h;a.n("search").inViewPort()&&
h.get(0).focus()},300)});d.detectIOS()&&d.isMobile()&&d.isTouchDevice()&&16>parseInt(a.n("text").css("font-size"))&&(a.n("text").data("fontSize",a.n("text").css("font-size")).css("font-size","16px"),a.n("textAutocomplete").css("font-size","16px"),c("body").append("<style>#ajaxsearchpro"+a.o.rid+" input.orig::-webkit-input-placeholder{font-size: 16px !important;}</style>"))},orientationChange:function(){this.detectAndFixFixedPositioning();this.fixSettingsPosition();this.fixResultsPosition();this.fixTryThisPosition();
"isotopic"==this.o.resultstype&&"visible"==this.n("resultsDiv").css("visibility")&&(this.calculateIsotopeRows(),this.showPagination(!0),this.removeAnimation())},resize:function(){this.detectAndFixFixedPositioning();this.fixSettingsPosition();this.fixResultsPosition();this.fixTryThisPosition();this.hideArrowBox();"isotopic"==this.o.resultstype&&"visible"==this.n("resultsDiv").css("visibility")&&(this.calculateIsotopeRows(),this.showPagination(!0),this.removeAnimation())},scrolling:function(a){this.detectAndFixFixedPositioning();
this.hideOnInvisibleBox();this.fixSettingsPosition(a);this.fixResultsPosition(a)},initTryThisEvents:function(){let a=this;0<a.n("trythis").find("a").length&&(a.n("trythis").find("a").on("click touchend",function(e){e.preventDefault();e.stopImmediatePropagation();a.o.compact.enabled&&"closed"==(a.n("search").attr("asp-compact")||"closed")&&a.n("promagnifier").trigger("click");document.activeElement.blur();a.n("textAutocomplete").val("");a.n("text").val(c(this).html());let f;null==(f=a.gaEvent)||f.call(a,
"try_this");a.searchWithCheck(80)}),a.n("trythis").css({visibility:"visible"}))},initSelect2:function(){let a=this;window.WPD.intervalUntilExecute(function(e){"undefined"!==typeof e.fn.asp_select2&&(a.select2jQuery=e,c("select.asp_gochosen, select.asp_goselect2",a.n("searchsettings")).each(function(){c(this).removeAttr("data-asp_select2-id");c(this).find('option[value=""]').val("__any__");a.select2jQuery(this).asp_select2({width:"100%",theme:"flat",allowClear:0<c(this).find('option[value=""]').length,
language:{noResults:function(){return a.o.select2.nores}}});a.select2jQuery(this).on("change",function(){c(this).trigger("change")})}))},function(){return d.whichjQuery("asp_select2")})},initResultsEvents:function(){let a=this;a.n("resultsDiv").css({opacity:"0"});let e=function(f){let h=f.keyCode||f.which,g=f.type;if(0==c(f.target).closest(".asp_w").length&&(a.hideOnInvisibleBox(),a.hideArrowBox(),"click"!=g||"touchend"!=g||3!=h)){if(a.o.compact.enabled)f=a.n("search").attr("asp-compact")||"closed",
1!=a.o.compact.closeOnDocument||"open"!=f||a.resultsOpened||(a.closeCompact(),a.searchAbort(),a.hideLoader());else if(0==a.resultsOpened||1!=a.o.closeOnDocClick)return;a.dragging||(a.hideLoader(),a.searchAbort(),a.hideResults())}};a.documentEventHandlers.push({node:document,event:a.clickTouchend,handler:e});c(document).on(a.clickTouchend,e);a.n("resultsDiv").on("click",".results .item",function(){let f;null==(f=a.gaEvent)||f.call(a,"result_click",{result_title:c(this).find("a.asp_res_url").text(),
result_url:c(this).find("a.asp_res_url").attr("href")});1==a.o.singleHighlight&&(localStorage.removeItem("asp_phrase_highlight"),""!=a.n("text").val().replace(/["']/g,"")&&localStorage.setItem("asp_phrase_highlight",JSON.stringify({phrase:a.n("text").val().replace(/["']/g,""),id:a.o.id})))});"isotopic"==a.o.resultstype&&(a.n("resultsDiv").on("swiped-left",function(){a.visiblePagination()&&a.n("resultsDiv").find("a.asp_next").trigger("click")}),a.n("resultsDiv").on("swiped-right",function(){a.visiblePagination()&&
a.n("resultsDiv").find("a.asp_prev").trigger("click")}))},initSettingsSwitchEvents:function(){let a=this;a.n("prosettings").on("click",function(){0==a.n("prosettings").data("opened")?a.showSettings():a.hideSettings()});d.isMobile()?("open"==a.o.mobile.force_sett_state||"none"==a.o.mobile.force_sett_state&&1==a.o.settingsVisible)&&a.showSettings(!1):1==a.o.settingsVisible&&a.showSettings(!1)},initSettingsEvents:function(){let a=this,e,f=function(){"undefined"===typeof a.originalFormData&&(a.originalFormData=
d.formData(c("form",a.n("searchsettings"))));a.n("searchsettings").off("mousedown touchstart mouseover",f)};a.n("searchsettings").on("mousedown touchstart mouseover",f);let h=function(g){0==c(g.target).closest(".asp_w").length&&(0!=a.att("blocking")||a.dragging||0!=c(g.target).closest(".ui-datepicker").length||0!=c(g.target).closest(".noUi-handle").length||0!=c(g.target).closest(".asp_select2").length||0!=c(g.target).closest(".asp_select2-container").length||a.hideSettings())};a.documentEventHandlers.push({node:document,
event:a.clickTouchend,handler:h});c(document).on(a.clickTouchend,h);a.n("searchsettings").on("click",function(){a.settingsChanged=!0});a.n("searchsettings").on(a.clickTouchend,function(g){a.dragging||a.updateHref();"undefined"==typeof g.target||c(g.target).hasClass("noUi-handle")?"click"==g.type&&g.stopImmediatePropagation():g.stopImmediatePropagation()});c('.asp_option_cat input[type="checkbox"]',a.n("searchsettings")).on("asp_chbx_change",function(){a.settingsCheckboxToggle(c(this).closest(".asp_option_cat"))});
c(".asp_option_cat",a.n("searchsettings")).each(function(g){a.settingsCheckboxToggle(c(g),!1)});c("div.asp_option",a.n("searchsettings")).on(a.mouseupTouchend,function(g){g.preventDefault();g.stopImmediatePropagation();if(a.dragging)return!1;c(this).find('input[type="checkbox"]').prop("checked",!c(this).find('input[type="checkbox"]').prop("checked"));clearTimeout(e);let k=this;e=setTimeout(function(){c(k).find('input[type="checkbox"]').trigger("asp_chbx_change")},50)});c("div.asp_option label",a.n("searchsettings")).on("click",
function(g){g.preventDefault()});c("fieldset.asp_checkboxes_filter_box",a.n("searchsettings")).each(function(){let g=!0;c(this).find('.asp_option:not(.asp_option_selectall) input[type="checkbox"]').each(function(){if(1==c(this).prop("checked"))return g=!1});g&&c(this).find('.asp_option_selectall input[type="checkbox"]').prop("checked",!1).removeAttr("data-origvalue")});c("fieldset",a.n("searchsettings")).each(function(){c(this).find(".asp_option:not(.hiddend)").last().addClass("asp-o-last")});c('.asp_option_cat input[type="checkbox"], .asp_option_cff input[type="checkbox"]',
a.n("searchsettings")).on("asp_chbx_change",function(){let g=c(this).data("targetclass");"string"==typeof g&&""!=g&&c("input."+g,a.n("searchsettings")).prop("checked",c(this).prop("checked"))})},monitorTouchMove:function(){let a=this;a.dragging=!1;c("body").on("touchmove",function(){a.dragging=!0}).on("touchstart",function(){a.dragging=!1})},initAutop:function(){if("disabled"==this.o.autop.state)return!1;var a=window.location.href;if(-1<a.indexOf("asp_ls=")||-1<a.indexOf("asp_ls&"))return!1;a=this.o.show_more.enabled&&
"ajax"==this.o.show_more.action?!1:this.o.autop.count;this.isAutoP=!0;1==this.o.compact.enabled&&this.openCompact();"phrase"==this.o.autop.state?(this.o.is_results_page||this.n("text").val(this.o.autop.phrase),this.search(a)):"latest"==this.o.autop.state?this.search(a,1):this.search(a,2)},initCompact:function(){let a=this;1==a.o.compact.enabled&&"fixed"!=a.o.compact.position&&(a.o.compact.overlay=0);1==a.o.compact.enabled&&a.n("trythis").css({display:"none"});1==a.o.compact.enabled&&"fixed"==a.o.compact.position&&
window.WPD.intervalUntilExecute(function(){let e=c("body");a.nodes.container=a.n("search").closest(".asp_w_container");e.append(a.n("search").detach());e.append(a.n("trythis").detach());a.n("search").css({top:a.n("search").position().top+"px"})},function(){return"fixed"==a.n("search").css("position")})},initEtc:function(){let a=this;a.il={columns:3,rows:a.o.isotopic.pagination?a.o.isotopic.rows:1E4,itemsPerPage:6,lastVisibleItem:-1};a.filterFns={number:function(e,f){if("undefined"===typeof f||"object"===
typeof e)f=e;e=c(f).attr("data-itemnum");const h=a.currentPage,g=a.il.itemsPerPage;e%(a.il.columns*a.il.rows)<a.il.columns*(a.il.rows-1)?c(f).addClass("asp_gutter_bottom"):c(f).removeClass("asp_gutter_bottom");return parseInt(e,10)<g*h&&parseInt(e,10)>=g*(h-1)}};d.Hooks.applyFilters("asp/init/etc",a)},initInfiniteScroll:function(){let a=this;if(a.o.show_more.infinite&&"polaroid"!=a.o.resultstype){let e,f;f=function(){clearTimeout(e);e=setTimeout(function(){a.checkAndTriggerInfiniteScroll("window")},
80)};a.documentEventHandlers.push({node:window,event:"scroll",handler:f});c(window).on("scroll",f);a.n("results").on("scroll",f);let h;a.n("resultsDiv").on("nav_switch",function(){clearTimeout(h);h=setTimeout(function(){a.checkAndTriggerInfiniteScroll("isotopic")},800)})}},hooks:function(){let a=this;a.n("s").on("asp_elementor_results",function(e,f){a.o.id==f&&"function"==typeof jetpackLazyImagesModule&&setTimeout(function(){jetpackLazyImagesModule()},300)})},init:function(a,e){this.autopStartedTheSearch=
this.isAutoP=this.triggerPrevState=this.searching=!1;this.autopData={};this.fontsLoaded=this.resultsOpened=this.settingsChanged=this.resultsInitialized=this.settingsInitialized=!1;this.postAuto=this.post=null;this.savedContainerTop=this.savedScrollTop=0;this.disableMobileScroll=!1;this.clickTouchend="click touchend";this.mouseupTouchend="mouseup touchend";this.noUiSliders=[];this.timeouts={compactBeforeOpen:null,compactAfterOpen:null,search:null,searchWithCheck:null};this.eh={};this.documentEventHandlers=
[];this.currentPage=1;this.currentPageURL=location.href;this.sIsotope=this.isotopic=null;this.lastSuccesfulSearch="";this.lastSearchData={};this._no_animations=!1;this.results_num=this.call_num=0;this.o=c.fn.extend({},a);this.dynamicAtts={};this.nodes={};this.nodes.search=c(e);d.isMobile()?this.animOptions=this.o.animations.mob:this.animOptions=this.o.animations.pc;this.initNodeVariables();this.animationOpacity=0>this.animOptions.items.indexOf("In")?"opacityOne":"opacityZero";this.o.resPage.useAjax=
this.o.compact.enabled?0:this.o.resPage.useAjax;d.isMobile()&&(this.o.trigger.type=this.o.mobile.trigger_on_type,this.o.trigger.click=this.o.mobile.click_action,this.o.trigger.click_location=this.o.mobile.click_action_location,this.o.trigger.return=this.o.mobile.return_action,this.o.trigger.return_location=this.o.mobile.return_action_location,this.o.trigger.redirect_url=this.o.mobile.redirect_url,this.o.trigger.elementor_url=this.o.mobile.elementor_url);this.o.redirectOnClick="ajax_search"!=this.o.trigger.click&&
"nothing"!=this.o.trigger.click;this.o.redirectOnEnter="ajax_search"!=this.o.trigger.return&&"nothing"!=this.o.trigger.return;this.usingLiveLoader()&&(this.o.trigger.type=this.o.resPage.trigger_type,this.o.trigger.facet=this.o.resPage.trigger_facet,this.o.resPage.trigger_magnifier&&(this.o.redirectOnClick=0,this.o.trigger.click="ajax_search"),this.o.resPage.trigger_return&&(this.o.redirectOnEnter=0,this.o.trigger.return="ajax_search"));1==this.o.compact.overlay&&0==c("#asp_absolute_overlay").length&&
c("body").append("<div id='asp_absolute_overlay'></div>");if(this.usingLiveLoader()){let f;null==(f=this.initLiveLoaderPopState)||f.call(this)}"undefined"!==typeof this.initCompact&&this.initCompact();this.monitorTouchMove();this.initEvents();this.initAutop();this.initEtc();this.hooks();b.firstIteration=!1;this.n("s").trigger("asp_init_search_bar",[this.o.id,this.o.iid],!0,!0);return this},n:function(a){if("undefined"===typeof this.nodes[a])switch(a){case "s":this.nodes[a]=this.nodes.search;break;
case "container":this.nodes[a]=this.nodes.search.closest(".asp_w_container");break;case "searchsettings":this.nodes[a]=c(".asp_ss",this.n("container"));break;case "resultsDiv":this.nodes[a]=c(".asp_r",this.n("container"));break;case "probox":this.nodes[a]=c(".probox",this.nodes.search);break;case "proinput":this.nodes[a]=c(".proinput",this.nodes.search);break;case "text":this.nodes[a]=c(".proinput input.orig",this.nodes.search);break;case "textAutocomplete":this.nodes[a]=c(".proinput input.autocomplete",
this.nodes.search);break;case "proloading":this.nodes[a]=c(".proloading",this.nodes.search);break;case "proclose":this.nodes[a]=c(".proclose",this.nodes.search);break;case "promagnifier":this.nodes[a]=c(".promagnifier",this.nodes.search);break;case "prosettings":this.nodes[a]=c(".prosettings",this.nodes.search);break;case "settingsAppend":this.nodes[a]=c("#wpdreams_asp_settings_"+this.o.id);break;case "resultsAppend":this.nodes[a]=c("#wpdreams_asp_results_"+this.o.id);break;case "trythis":this.nodes[a]=
c("#asp-try-"+this.o.rid);break;case "hiddenContainer":this.nodes[a]=c(".asp_hidden_data",this.n("container"));break;case "aspItemOverlay":this.nodes[a]=c(".asp_item_overlay",this.n("hiddenContainer"));break;case "showmore":this.nodes[a]=c(".showmore",this.n("resultsDiv"));break;case "items":this.nodes[a]=0<c(".item",this.n("resultsDiv")).length?c(".item",this.n("resultsDiv")):c(".photostack-flip",this.n("resultsDiv"));break;case "results":this.nodes[a]=c(".results",this.n("resultsDiv"));break;case "resdrg":this.nodes[a]=
c(".resdrg",this.n("resultsDiv"))}return this.nodes[a]},att:function(a){if("undefined"===typeof this.dynamicAtts[a])switch(a){case "blocking":this.dynamicAtts[a]=this.n("searchsettings").hasClass("asp_sb")}return this.dynamicAtts[a]},initNodeVariables:function(){this.o.id=this.nodes.search.data("id");this.o.iid=this.nodes.search.data("instance");this.o.rid=this.o.id+"_"+this.o.iid;this.fixClonedSelf()},initEvents:function(){let a;null==(a=this.initSettingsSwitchEvents)||a.call(this);this.initOtherEvents();
this.initTryThisEvents();this.initMagnifierEvents();this.initInputEvents();1==this.o.compact.enabled&&this.initCompactEvents()},initResults:function(){if(!this.resultsInitialized){this.initResultsBox();this.initResultsEvents();if("vertical"==this.o.resultstype){let a;null==(a=this.initNavigationEvents)||a.call(this)}if("isotopic"==this.o.resultstype){let a;null==(a=this.initIsotopicPagination)||a.call(this)}}},initResultsBox:function(){this.initResultsAnimations();d.isMobile()&&1==this.o.mobile.force_res_hover?
(this.o.resultsposition="hover",this.nodes.resultsDiv=this.n("resultsDiv").clone(),c("body").append(this.nodes.resultsDiv),this.n("resultsDiv").css({position:"absolute"})):"hover"==this.o.resultsposition&&0>=this.n("resultsAppend").length?(this.nodes.resultsDiv=this.n("resultsDiv").clone(),c("body").append(this.nodes.resultsDiv)):(this.o.resultsposition="block",this.n("resultsDiv").css({position:"static"}),0<this.n("resultsAppend").length&&(0<this.n("resultsAppend").find(".asp_r_"+this.o.id).length?
(this.nodes.resultsDiv=this.n("resultsAppend").find(".asp_r_"+this.o.id),"undefined"!==typeof this.nodes.resultsDiv.get(0).referenced?++this.nodes.resultsDiv.get(0).referenced:this.nodes.resultsDiv.get(0).referenced=1):(this.nodes.resultsDiv=this.nodes.resultsDiv.clone(),this.nodes.resultsAppend.append(this.nodes.resultsDiv))));this.nodes.showmore=c(".showmore",this.nodes.resultsDiv);this.nodes.items=0<c(".item",this.n("resultsDiv")).length?c(".item",this.nodes.resultsDiv):c(".photostack-flip",this.nodes.resultsDiv);
this.nodes.results=c(".results",this.nodes.resultsDiv);this.nodes.resdrg=c(".resdrg",this.nodes.resultsDiv);this.nodes.resultsDiv.get(0).id=this.nodes.resultsDiv.get(0).id.replace("__original__","");this.detectAndFixFixedPositioning();this.initInfiniteScroll();this.resultsInitialized=!0},initResultsAnimations:function(){let a=this.n("resultsDiv").css("position");this.resAnim={showClass:"",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":this.animOptions.results.dur+"ms"},
hideClass:"",hideCSS:{visibility:"hidden",opacity:0,display:"none"},duration:this.animOptions.results.dur+"ms"};"fade"==this.animOptions.results.anim&&(this.resAnim.showClass="asp_an_fadeIn",this.resAnim.hideClass="asp_an_fadeOut");"fadedrop"!=this.animOptions.results.anim||"fixed"!=a&&"absolute"!=a?"fadedrop"==this.animOptions.results.anim&&(this.resAnim.showClass="asp_an_fadeIn",this.resAnim.hideClass="asp_an_fadeOut"):(this.resAnim.showClass="asp_an_fadeInDrop",this.resAnim.hideClass="asp_an_fadeOutDrop");
this.n("resultsDiv").css({"-webkit-animation-duration":this.resAnim.duration+"ms","animation-duration":this.resAnim.duration+"ms"})},initSettings:function(){if(!this.settingsInitialized){let a;null==(a=this.loadASPFonts)||a.call(this);let e;null==(e=this.initSettingsBox)||e.call(this);let f;null==(f=this.initSettingsEvents)||f.call(this);let h;null==(h=this.initButtonEvents)||h.call(this);let g;null==(g=this.initNoUIEvents)||g.call(this);let k;null==(k=this.initDatePicker)||k.call(this);let l;null==
(l=this.initSelect2)||l.call(this);let n;null==(n=this.initFacetEvents)||n.call(this)}},initSettingsBox:function(){let a=this,e=function(h){let g=a.n("searchsettings").get(0);a.nodes.searchsettings=a.nodes.searchsettings.clone();h.append(a.nodes.searchsettings);c(g).find("*[id]").forEach(function(k){0>k.id.indexOf("__original__")&&(k.id="__original__"+k.id)});a.n("searchsettings").find("*[id]").forEach(function(k){-1<k.id.indexOf("__original__")&&(k.id=k.id.replace("__original__",""))})},f;null==
(f=a.initSettingsAnimations)||f.call(a);1==a.o.compact.enabled&&"fixed"==a.o.compact.position||d.isMobile()&&1==a.o.mobile.force_sett_hover?(a.n("searchsettings").attr("id",a.n("searchsettings").attr("id").replace("probsettings","prosettings")),a.n("searchsettings").removeClass("asp_sb asp_sb_"+a.o.id+" asp_sb_"+a.o.rid).addClass("asp_s asp_s_"+a.o.id+" asp_s_"+a.o.rid),a.dynamicAtts.blocking=!1,e(c("body")),a.n("searchsettings").css({position:"absolute"}),a.dynamicAtts.blocking=!1):0<a.n("settingsAppend").length?
0<a.n("settingsAppend").find(".asp_ss_"+a.o.id).length?(a.nodes.searchsettings=a.nodes.settingsAppend.find(".asp_ss_"+a.o.id),"undefined"!==typeof a.nodes.searchsettings.get(0).referenced?++a.nodes.searchsettings.get(0).referenced:a.nodes.searchsettings.get(0).referenced=1):(0==a.att("blocking")&&(a.n("searchsettings").attr("id",a.n("searchsettings").attr("id").replace("prosettings","probsettings")),a.n("searchsettings").removeClass("asp_s asp_s_"+a.o.id+" asp_s_"+a.o.rid).addClass("asp_sb asp_sb_"+
a.o.id+" asp_sb_"+a.o.rid),a.dynamicAtts.blocking=!0),e(a.nodes.settingsAppend)):0==a.att("blocking")&&e(c("body"));a.n("searchsettings").get(0).id=a.n("searchsettings").get(0).id.replace("__original__","");a.detectAndFixFixedPositioning();a.settingsInitialized=!0},initSettingsAnimations:function(){this.settAnim={showClass:"",showCSS:{visibility:"visible",display:"block",opacity:1,"animation-duration":this.animOptions.settings.dur+"ms"},hideClass:"",hideCSS:{visibility:"hidden",opacity:0,display:"none"},
duration:this.animOptions.settings.dur+"ms"};"fade"==this.animOptions.settings.anim&&(this.settAnim.showClass="asp_an_fadeIn",this.settAnim.hideClass="asp_an_fadeOut");"fadedrop"!=this.animOptions.settings.anim||this.att("blocking")?"fadedrop"==this.animOptions.settings.anim&&(this.settAnim.showClass="asp_an_fadeIn",this.settAnim.hideClass="asp_an_fadeOut"):(this.settAnim.showClass="asp_an_fadeInDrop",this.settAnim.hideClass="asp_an_fadeOutDrop");this.n("searchsettings").css({"-webkit-animation-duration":this.settAnim.duration+
"ms","animation-duration":this.settAnim.duration+"ms"})}})})(WPD.dom);window.ASP="undefined"!==typeof window.ASP?window.ASP:{};
window.ASP.api=function(){let c=function(a,e,f,h){a=ASP.instances.get(a,e);return!1!==a&&a[f].apply(a,[h])},d=function(a,e,f){if(!isNaN(parseFloat(e))&&isFinite(e))return a=ASP.instances.get(a,e),!1!==a&&a[f].apply(a);a=ASP.instances.get(a);return!1!==a&&a.forEach(function(h){h[e].apply(h,[f])})},b=function(a,e){if("exists"==e)return ASP.instances.exist(a);a=ASP.instances.get(a);return!1!==a&&a.forEach(function(f){f[e].apply(f)})};if(4==arguments.length)return c.apply(this,arguments);if(3==arguments.length)return d.apply(this,
arguments);if(2==arguments.length)return b.apply(this,arguments);0==arguments.length&&(console.log("Usage: ASP.api(id, [optional]instance, function, [optional]args);"),console.log("For more info: https://knowledgebase.ajaxsearchpro.com/other/javascript-api"))};
window._ASP_load=function(){let c=WPD.dom;window.ASP.instances={instances:[],get:function(d,b){this.clean();if("undefined"===typeof d||0==d)return this.instances;if("undefined"===typeof b){b=[];for(var a=0;a<this.instances.length;a++)this.instances[a].o.id==d&&b.push(this.instances[a]);return 0<b.length?b:!1}for(a=0;a<this.instances.length;a++)if(this.instances[a].o.id==d&&this.instances[a].o.iid==b)return this.instances[a];return!1},set:function(d){if(this.exist(d.o.id,d.o.iid))return!1;this.instances.push(d);
return!0},exist:function(d,b){this.clean();for(let a=0;a<this.instances.length;a++)if(this.instances[a].o.id==d&&("undefined"===typeof b||this.instances[a].o.iid==b))return!0;return!1},clean:function(){let d=[],b=this;this.instances.forEach(function(a,e){0==c(".asp_m_"+a.o.rid).length&&d.push(e)});d.forEach(function(a){"undefined"!==typeof b.instances[a]&&(b.instances[a].destroy(),b.instances.splice(a,1))})},destroy:function(d,b){let a=this.get(d,b);if(!1!==a)if(Array.isArray(a))a.forEach(function(e){e.destroy()}),
this.instances=[];else{let e=0;this.instances.forEach(function(f,h){f.o.id==d&&f.o.iid==b&&(e=h)});a.destroy();this.instances.splice(e,1)}}};window.ASP.initialized=!1;window.ASP.initializeSearchByID=function(d){let b=ASP.getInstances();if("undefined"!==typeof d&&"object"!=typeof d)if("undefined"!==typeof b[d]){let e=[];e[d]=b[d];b=e}else return!1;let a=0;b.forEach(function(e,f){c(".asp_m_"+f).forEach(function(h){let g=c(h);if("undefined"!=typeof g.get(0).hasAsp)return++a,!0;h.hasAsp=!0;++a;return g.ajaxsearchpro(e)})})};
window.ASP.getInstances=function(){if("undefined"!==typeof window.ASP_INSTANCES)return window.ASP_INSTANCES;let d=[];c(".asp_init_data").forEach(function(b){if("undefined"===typeof b.dataset.aspdata)return!0;let a=WPD.Base64.decode(b.dataset.aspdata);if("undefined"===typeof a||""==a)return!0;d[b.dataset.aspId]=JSON.parse(a)});return d};window.ASP.initialize=function(d){if("undefined"==typeof ASP.version)return!1;if(window.IntersectionObserver)if(ASP.script_async_load||ASP.init_only_in_viewport){d=
document.querySelectorAll(".asp_w_container");if(d.length){let b=new IntersectionObserver(function(a){a.forEach(function(e){e.isIntersecting&&(ASP.initializeSearchByID(e.target.dataset.id),b.unobserve(e.target))})});d.forEach(function(a){b.observe(a)})}ASP.getInstances().forEach(function(b,a){1==b.compact.enabled&&"fixed"==b.compact.position&&ASP.initializeSearchByID(a)})}else ASP.initializeSearchByID(d);else ASP.initializeSearchByID(d);ASP.initializeMutateDetector();ASP.initializeHighlight();ASP.initializeOtherEvents();
ASP.initialized=!0};window.ASP.initializeHighlight=function(){if(this.highlight.enabled){let d=localStorage.getItem("asp_phrase_highlight");localStorage.removeItem("asp_phrase_highlight");null!=d&&(d=JSON.parse(d),this.highlight.data.forEach(function(b){if(b.id==d.id){var a=""!=b.selector&&0<c(b.selector).length?b.selector:"article";a=0<c(a).length?a:"body";c(a).highlight(d.phrase.split(" "),{element:"span",className:"asp_single_highlighted_"+d.id,wordsOnly:b.whole,excludeParents:".asp_w, .asp-try"});
a=c(".asp_single_highlighted_"+d.id);if(b.scroll&&0<a.length){a=a.offset().top-120;let e=c("#wpadminbar");0<e.length&&(a-=e.height());a+=b.scroll_offset;a=0>a?0:a;c("html").animate({scrollTop:a},500)}return!1}}))}};window.ASP.initializeOtherEvents=function(){let d,b=this;c("body").on("click touchend","#menu-item-search, .fa-search, .fa, .fas, .fusion-flyout-menu-toggle, .fusion-main-menu-search-open, #search_button, .mini-search.popup-search, .icon-search, .menu-item-search-dropdown, .mobile-menu-button, .td-icon-search, .tdb-search-icon, .side_menu_button, .search_button, .raven-search-form-toggle, [data-elementor-open-lightbox], .elementor-button-link, .elementor-button, i[class*=-search], a[class*=-search]",
function(){clearTimeout(d);d=setTimeout(function(){b.initializeSearchByID()},300)});if("undefined"!=typeof jQuery)jQuery(document).on("elementor/popup/show",function(){setTimeout(function(){b.initializeSearchByID()},10)})};window.ASP.initializeMutateDetector=function(){let d;"undefined"!=typeof ASP.detect_ajax&&1==ASP.detect_ajax&&(new MutationObserver(function(){clearTimeout(d);d=setTimeout(function(){ASP.initializeSearchByID()},500)})).observe(document.querySelector("body"),{subtree:!0,childList:!0})};
window.ASP.ready=function(){if("complete"===document.readyState||"loaded"===document.readyState||"interactive"===document.readyState)this.initialize();else c(document).on("DOMContentLoaded",this.initialize)};window.ASP.loadScriptStack=function(d){let b;0<d.length&&(b=document.createElement("script"),b.src=d.shift().src,b.onload=function(){0<d.length?window.ASP.loadScriptStack(d):window.ASP.ready()},document.body.appendChild(b))};window.ASP.init=function(){ASP.script_async_load?window.ASP.loadScriptStack(ASP.additional_scripts):
"undefined"!==typeof WPD.ajaxsearchpro&&window.ASP.ready()};window.WPD.intervalUntilExecute(window.ASP.init,function(){return"undefined"!=typeof window.ASP.version&&"undefined"!=c.fn.ajaxsearchpro})};(function(){"undefined"!=typeof WPD&&"undefined"!=typeof WPD.dom?window._ASP_load():document.addEventListener("wpd-dom-core-loaded",window._ASP_load)})();
(function(c){let d=window.WPD.ajaxsearchpro.helpers;window.WPD.ajaxsearchpro.addons.add(new function(){this.name="Divi Widget Fixes";this.init=function(){d.Hooks.addFilter("asp/init/etc",this.diviBodyCommerceResultsPage,10,this)};this.diviBodyCommerceResultsPage=function(b){b.o.divi.bodycommerce&&b.o.is_results_page&&WPD.intervalUntilExecute(function(a){setTimeout(function(){a("#divi_filter_button").trigger("click")},50)},function(){return"undefined"!==typeof jQuery?jQuery:!1});return b}})})(WPD.dom);
(function(c){let d=window.WPD.ajaxsearchpro.helpers;window.WPD.ajaxsearchpro.addons.add(new function(){this.name="Elementor Widget Fixes";this.init=function(){d.Hooks.addFilter("asp/init/etc",this.fixElementorPostPagination,10,this);d.Hooks.addFilter("asp/live_load/selector",this.fixSelector,10,this);d.Hooks.addFilter("asp/live_load/url",this.url,10,this);d.Hooks.addFilter("asp/live_load/start",this.start,10,this);d.Hooks.addFilter("asp/live_load/replacement_node",this.fixElementorLoadMoreResults,
10,this);d.Hooks.addFilter("asp/live_load/finished",this.finished,10,this)};this.fixSelector=function(b){-1<b.indexOf("asp_es_")&&(b+=" .elementor-widget-container");return b};this.url=function(b,a,e,f){0<=b.indexOf("asp_force_reset_pagination=1")&&(b=b.replace(/\?product\-page=[0-9]+&/,"?"));return b};this.start=function(b,a,e,f){c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()==a.lastSuccesfulSearch&&0<c(f).find(".e-load-more-spinner").length&&c(f).css("opacity",1)};this.finished=
function(b,a,e,f){f=c(f);!1!==e.indexOf("asp_es_")&&"undefined"!=typeof elementorFrontend&&"undefined"!=typeof elementorFrontend.init&&0==f.find(".asp_elementor_nores").length&&(e=f.parent().data("widget_type"),""!=e&&"undefined"!=typeof jQuery&&elementorFrontend.hooks.doAction("frontend/element_ready/"+e,jQuery(f.parent().get(0))),this.fixElementorPostPagination(a,b),a.o.scrollToResults.enabled&&this.scrollToResultsIfNeeded(f),a.n("s").trigger("asp_elementor_results",[a.o.id,a.o.iid,f.parent().get(0)],
!0,!0))};this.scrollToResultsIfNeeded=function(b){b=b.find(".elementor-post, .product").first();b.length&&!b.inViewPort(40)&&b.get(0).scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})};this.fixElementorPostPagination=function(b,a){let e=this,f=c(".asp_es_"+b.o.id);a="undefined"==typeof a?location.href:a;if(0<f.length){e.elementorHideSpinner(f.get(0));var h=a.indexOf("?");if(0<=h){let g=a.substring(h+1);g&&(g=g.replace(/&asp_force_reset_pagination=1/gmi,""),0<f.find(".e-load-more-anchor").length&&
0==f.find(".elementor-pagination a").length?(h=function(k){k.preventDefault();k.stopPropagation();if(!b.searching){k=""==f.data("page")?2:parseInt(f.data("page"))+1;let l=g.split("&page=");f.data("page",k);b.showLoader();e.elementorShowSpinner(f.get(0));b.liveLoad(".asp_es_"+b.o.id,a.split("?")[0]+"?"+l[0]+"&page="+k,!1,!0)}},f.find(".e-load-more-anchor").next(".elementor-button-wrapper").find("a").attr("href",""),f.find(".e-load-more-anchor").next(".elementor-button-wrapper").offForced().on("click",
h),f.find(".asp_e_load_more_anchor").on("asp_e_load_more",h)):(f.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a").each(function(){let k=c(this).attr("href");0>k.indexOf("asp_ls=")&&0>k.indexOf("asp_ls&")&&(0>k.indexOf("?")?c(this).attr("href",k+"?"+g):c(this).attr("href",k+"&"+g))}),f.find(".elementor-pagination a, .elementor-widget-container .woocommerce-pagination a").on("click",function(k){k.preventDefault();k.stopImmediatePropagation();k.stopPropagation();
b.showLoader();b.liveLoad(".asp_es_"+b.o.id,c(this).attr("href"),!1,!0)})))}}return b};this.fixElementorLoadMoreResults=function(b,a,e,f){f=c(e).closest("div[data-settings]").data("settings");let h=c(e).find(".asp_e_load_more_anchor");if(null!=f&&""!=f&&(f=JSON.parse(f),"load_more_infinite_scroll"==f.pagination_type&&0==h.length&&(c(".e-load-more-anchor").css("display","none"),c(e).append('<div class="asp_e_load_more_anchor"></div>'),h=c(e).find(".asp_e_load_more_anchor"),f=function(){h.inViewPort(50)&&
(h.trigger("asp_e_load_more"),h.remove())},a.documentEventHandlers.push({node:window,event:"scroll",handler:f}),c(window).on("scroll",f)),0<c(b).find(".e-load-more-spinner").length)){c(e).removeClass("e-load-more-pagination-loading");a=c("form",a.n("searchsettings")).serialize()+a.n("text").val().trim()!=a.lastSuccesfulSearch;f=c(e).find(".e-load-more-anchor").next(".elementor-button-wrapper");let g=c(e).find(".e-load-more-message");if(0<c(b).find("article").length){b=c(b).find("article").parent().get(0).innerHTML;
let k=c(e).data("asp-previous-data");""==k||a?(c(e).find("article").parent().get(0).innerHTML=b,c(e).data("asp-previous-data",b),f.css("display","block"),g.css("display","none")):k==b?(f.css("display","none"),g.css("display","block"),h.remove()):(c(e).find("article").parent().get(0).innerHTML+=b,c(e).data("asp-previous-data",b))}else f.css("display","none"),g.css("display","block"),h.remove();return null}return b};this.elementorShowSpinner=function(b){c(b).addClass("e-load-more-pagination-loading");
c(b).find(".e-load-more-spinner>*").addClass("eicon-animation-spin");c(b).css("opacity",1)};this.elementorHideSpinner=function(b){c(b).removeClass("e-load-more-pagination-loading");c(b).find(".eicon-animation-spin").removeClass("eicon-animation-spin")}})})(WPD.dom);
