1/* <![CDATA[ */ 2window.ASL = typeof window.ASL !== 'undefined' ? window.ASL : {}; 3window.ASL.wp_rocket_exception = "DOMContentLoaded"; 4window.ASL.js_scope = "jQuery"; 5window.ASL.asl_url = "https:\/\/www.seabrookwa.com\/wp-content\/plugins\/ajax-search-lite\/"; 6window.ASL.detect_ajax = 1; 7window.ASL.media_query = 4760; 8window.ASL.version = 4760; 9window.ASL.pageHTML = ""; 10window.ASL.additional_scripts = []; 11window.ASL.script_async_load = false; 12window.ASL.init_only_in_viewport = true; 13window.ASL.font_url = 14 "https:\/\/www.seabrookwa.com\/wp-content\/plugins\/ajax-search-lite\/css\/fonts\/icons2.woff2"; 15window.ASL.css_async = false; 16window.ASL.highlight = { 17 "enabled": false, 18 "data": [] 19}; 20window.ASL.analytics = { 21 "method": 0, 22 "tracking_id": "", 23 "string": "?ajax_search={asl_term}", 24 "event": { 25 "focus": { 26 "active": 1, 27 "action": "focus", 28 "category": "ASL", 29 "label": "Input focus", 30 "value": "1" 31 }, 32 "search_start": { 33 "active": 0, 34 "action": "search_start", 35 "category": "ASL", 36 "label": "Phrase: {phrase}", 37 "value": "1" 38 }, 39 "search_end": { 40 "active": 1, 41 "action": "search_end", 42 "category": "ASL", 43 "label": "{phrase} | {results_count}", 44 "value": "1" 45 }, 46 "magnifier": { 47 "active": 1, 48 "action": "magnifier", 49 "category": "ASL", 50 "label": "Magnifier clicked", 51 "value": "1" 52 }, 53 "return": { 54 "active": 1, 55 "action": "return", 56 "category": "ASL", 57 "label": "Return button pressed", 58 "value": "1" 59 }, 60 "facet_change": { 61 "active": 0, 62 "action": "facet_change", 63 "category": "ASL", 64 "label": "{option_label} | {option_value}", 65 "value": "1" 66 }, 67 "result_click": { 68 "active": 1, 69 "action": "result_click", 70 "category": "ASL", 71 "label": "{result_title} | {result_url}", 72 "value": "1" 73 } 74 } 75}; 76window.ASL_INSTANCES = []; 77window.ASL_INSTANCES[1] = { 78 "homeurl": "https:\/\/www.seabrookwa.com\/", 79 "resultstype": "vertical", 80 "resultsposition": "hover", 81 "itemscount": 4, 82 "charcount": 0, 83 "highlight": 0, 84 "highlightwholewords": 1, 85 "singleHighlight": 0, 86 "scrollToResults": { 87 "enabled": 0, 88 "offset": 0 89 }, 90 "resultareaclickable": 1, 91 "autocomplete": { 92 "enabled": 1, 93 "lang": "en", 94 "trigger_charcount": 0 95 }, 96 "mobile": { 97 "menu_selector": "#menu-toggle" 98 }, 99 "trigger": { 100 "click": "results_page", 101 "click_location": "same", 102 "update_href": 0, 103 "return": "results_page", 104 "return_location": "same", 105 "facet": 1, 106 "type": 1, 107 "redirect_url": "?s={phrase}", 108 "delay": 300 109 }, 110 "animations": { 111 "pc": { 112 "settings": { 113 "anim": "fadedrop", 114 "dur": 300 115 }, 116 "results": { 117 "anim": "fadedrop", 118 "dur": 300 119 }, 120 "items": "voidanim" 121 }, 122 "mob": { 123 "settings": { 124 "anim": "fadedrop", 125 "dur": 300 126 }, 127 "results": { 128 "anim": "fadedrop", 129 "dur": 300 130 }, 131 "items": "voidanim" 132 } 133 }, 134 "autop": { 135 "state": "disabled", 136 "phrase": "", 137 "count": 1 138 }, 139 "resPage": { 140 "useAjax": 0, 141 "selector": "#main", 142 "trigger_type": 1, 143 "trigger_facet": 1, 144 "trigger_magnifier": 0, 145 "trigger_return": 0 146 }, 147 "resultsSnapTo": "left", 148 "results": { 149 "width": "auto", 150 "width_tablet": "auto", 151 "width_phone": "auto" 152 }, 153 "settingsimagepos": "right", 154 "closeOnDocClick": 1, 155 "overridewpdefault": 1, 156 "override_method": "get" 157}; 158window.ASL_INSTANCES[2] = { 159 "homeurl": "https:\/\/www.seabrookwa.com\/", 160 "resultstype": "vertical", 161 "resultsposition": "hover", 162 "itemscount": 4,
163 "charcount": 0, 164 "highlight": 0, 165 "highlightwholewords": 1, 166 "singleHighlight": 0, 167 "scrollToResults": { 168 "enabled": 0, 169 "offset": 0 170 }, 171 "resultareaclickable": 1, 172 "autocomplete": { 173 "enabled": 1, 174 "lang": "en", 175 "trigger_charcount": 0 176 }, 177 "mobile": { 178 "menu_selector": "#menu-toggle" 179 }, 180 "trigger": { 181 "click": "results_page", 182 "click_location": "same", 183 "update_href": 0, 184 "return": "results_page", 185 "return_location": "same", 186 "facet": 1, 187 "type": 1, 188 "redirect_url": "?s={phrase}", 189 "delay": 300 190 }, 191 "animations": { 192 "pc": { 193 "settings": { 194 "anim": "fadedrop", 195 "dur": 300 196 }, 197 "results": { 198 "anim": "fadedrop", 199 "dur": 300 200 }, 201 "items": "voidanim" 202 }, 203 "mob": { 204 "settings": { 205 "anim": "fadedrop", 206 "dur": 300 207 }, 208 "results": { 209 "anim": "fadedrop", 210 "dur": 300 211 }, 212 "items": "voidanim" 213 } 214 }, 215 "autop": { 216 "state": "disabled", 217 "phrase": "", 218 "count": 1 219 }, 220 "resPage": { 221 "useAjax": 0, 222 "selector": "#main", 223 "trigger_type": 1, 224 "trigger_facet": 1, 225 "trigger_magnifier": 0, 226 "trigger_return": 0 227 }, 228 "resultsSnapTo": "left", 229 "results": { 230 "width": "auto", 231 "width_tablet": "auto", 232 "width_phone": "auto" 233 }, 234 "settingsimagepos": "right", 235 "closeOnDocClick": 1, 236 "overridewpdefault": 1, 237 "override_method": "get" 238}; 239/* ]]> */ 240 241 242 243 244// asl-prereq 245(function () { 246 window.WPD = "undefined" !== typeof window.WPD ? window.WPD : {}; if ("undefined" != typeof WPD.dom) return !1; WPD.dom = function () { 247 if ("undefined" == typeof WPD.dom.fn || "undefined" == typeof WPD.dom.fn.a) WPD.dom.fn = { 248 a: [], is_wpd_dom: !0, length: 0, get: function (a) { return "undefined" == typeof a ? this.a.slice() : "undefined" != typeof this.a[a] ? this.a[a] : null }, _: function (a) { return "<" === a.charAt(0) ? WPD.dom._fn.createElementsFromHTML(a) : Array.prototype.slice.call(document.querySelectorAll(a)) }, $: function (a, b) { 249 let c = this.copy(this, 250 !0); c.a = "undefined" != typeof b ? null !== b ? b.find(a).get() : [] : "string" == typeof a ? c._(a) : null !== a ? [a] : []; c.length = c.a.length; return c 251 }, extend: function () { for (let a = 1; a < arguments.length; a++)for (let b in arguments[a]) arguments[a].hasOwnProperty(b) && (arguments[0][b] = arguments[a][b]); return arguments[0] }, copy: function (a, b) { let c, d, e; if ("object" != typeof a || null === a) return a; c = new a.constructor; for (d in a) a.hasOwnProperty(d) && (e = typeof a[d], c[d] = b && "object" === e && null !== a[d] ? this.copy(a[d]) : a[d]); return c }, parent: function (a) { 252 let b = 253 this.get(0), c = this.copy(this, !0); c.a = []; null != b && (b = b.parentElement, "undefined" != typeof a ? b.matches(a) && (c.a = [b]) : c.a = null == b ? [] : [b]); return c 254 }, first: function () { let a = this.copy(this, !0); a.a = "undefined" != typeof a.a[0] ? [a.a[0]] : []; a.length = a.a.length; return a }, last: function () { let a = this.copy(this, !0); a.a = 0 < a.a.length ? [a.a[a.a.length - 1]] : []; a.length = a.a.length; return a }, prev: function (a) { 255 let b = this.copy(this, !0); if ("undefined" == typeof a) b.a = "undefined" != typeof b.a[0] && null != b.a[0].previousElementSibling ? 256 [b.a[0].previousElementSibling] : []; else if ("undefined" != typeof b.a[0]) { let c = b.a[0].previousElementSibling; for (b.a = []; null != c;) { if (c.matches(a)) { b.a = [c]; break } c = c.previousElementSibling } } b.length = b.a.length; return b 257 }, next: function (a) { 258 let b = this.copy(this, !0); if ("undefined" == typeof a) b.a = "undefined" != typeof b.a[0] && null != b.a[0].nextElementSibling ? [b.a[0].nextElementSibling] : []; else if ("undefined" != typeof b.a[0]) { 259 let c = b.a[0].nextElementSibling; for (b.a = []; null != c;) { 260 if (c.matches(a)) { b.a = [c]; break } c = 261 c.nextElementSibling 262 } 263 } b.length = b.a.length; return b 264 }, closest: function (a) { let b = this.get(0), c = this.copy(this, !0); c.a = []; if ("string" === typeof a) { if (null !== b && "undefined" != typeof b.matches && "" !== a) { if (!b.matches(a)) for (; (b = b.parentElement) && !b.matches(a);); c.a = null == b ? [] : [b] } } else if (null !== b && "undefined" != typeof b.matches && "undefined" != typeof a.matches) { if (b !== a) for (; (b = b.parentElement) && b !== a;); c.a = null == b ? [] : [b] } c.length = c.a.length; return c }, add: function (a) { 265 if ("undefined" !== typeof a) if ("undefined" !== 266 typeof a.nodeType) -1 == this.a.indexOf(a) && this.a.push(a); else if ("undefined" !== typeof a.a) { let b = this; a.a.forEach(function (c) { -1 == b.a.indexOf(c) && b.a.push(c) }) } return this 267 }, find: function (a) { let b = this.copy(this, !0); b.a = []; this.forEach(function (c) { null !== c && "undefined" != typeof c.querySelectorAll && (b.a
267= b.a.concat(Array.prototype.slice.call(c.querySelectorAll(a)))) }); b.length = b.a.length; return b }, forEach: function (a) { this.a.forEach(function (b, c, d) { a.apply(b, [b, c, d]) }); return this }, each: function (a) { return this.forEach(a) }, 268 hasClass: function (a) { let b = this.get(0); return null != b ? b.classList.contains(a) : !1 }, addClass: function (a) { let b = a; "string" == typeof a && (b = a.split(" ")); b = b.filter(function (c) { return "" !== c.trim() }); 0 < b.length && this.forEach(function (c) { c.classList.add.apply(c.classList, b) }); return this }, removeClass: function (a) { 269 if ("undefined" != typeof a) { let b = a; "string" == typeof a && (b = a.split(" ")); b = b.filter(function (c) { return "" !== c.trim() }); 0 < b.length && this.forEach(function (c) { c.classList.remove.apply(c.classList, b) }) } else this.forEach(function (b) { 270 0 < 271 b.classList.length && b.classList.remove.apply(b.classList, b.classList) 272 }); return this 273 }, is: function (a) { let b = this.get(0); return null != b ? b.matches(a) : !1 }, val: function (a) { 274 let b = this.get(0); if (null != b) if (1 == arguments.length) if ("select-multiple" == b.type) { a = "string" === typeof a ? a.split(",") : a; for (let c = 0, d = b.options.length, e; c < d; c++)e = b.options[c], e.selected = -1 != a.indexOf(e.value) } else b.value = a; else return "select-multiple" == b.type ? Array.prototype.map.call(b.selectedOptions, function (c) { return c.value }) : b.value; 275 return this 276 }, isVisible: function () { let a = this.get(0), b = !0, c; for (; null !== a;) { c = window.getComputedStyle(a); if ("none" == c.display || "hidden" == c.visibility || 0 == c.opacity) { b = !1; break } a = a.parentElement } return b }, attr: function (a, b) { let c, d = arguments, e = this; this.forEach(function (f) { 2 == d.length ? (f.setAttribute(a, b), c = e) : "object" === typeof a ? Object.keys(a).forEach(function (g) { f.setAttribute(g, a[g]) }) : c = f.getAttribute(a) }); return c }, removeAttr: function (a) { this.forEach(function (b) { b.removeAttribute(a) }); return this }, 277 prop: function (a, b) { let c, d = arguments; this.forEach(function (e) { 2 == d.length ? e[a] = b : c = "undefined" != typeof e[a] ? e[a] : null }); return 2 == d.length ? this : c }, data: function (a, b) { let c = this.get(0), d = a.replace(/-([a-z])/g, function (e) { return e[1].toUpperCase() }); return null != c ? 2 == arguments.length ? (c.dataset[d] = b, this) : "undefined" == typeof c.dataset[d] ? "" : c.dataset[d] : "" }, html: function (a) { let b = this.get(0); return null != b ? 1 == arguments.length ? (b.innerHTML = a, this) : b.innerHTML : "" }, text: function (a) { 278 let b = this.get(0); return null != 279 b ? 1 == arguments.length ? (b.textContent = a, this) : b.textContent : "" 280 }, css: function (a, b) { let c = this.get(), d; for (let e = 0; e < c.length; e++)if (d = c[e], 1 == arguments.length) if ("object" == typeof a) Object.keys(a).forEach(function (f) { d.style[f] = a[f] }); else return window.getComputedStyle(d)[a]; else d.style[a] = b; return this }, position: function () { let a = this.get(0); return null != a ? { top: a.offsetTop, left: a.offsetLeft } : { top: 0, left: 0 } }, offset: function () { 281 let a = this.get(0); return null != a ? WPD.dom._fn.hasFixedParent(a) ? a.getBoundingClientRect() : 282 WPD.dom._fn.absolutePosition(a) : { top: 0, left: 0 } 283 }, outerWidth: function (a) { a = a || !1; let b = this.get(0); if (null != b) return a ? parseInt(b.offsetWidth) + parseInt(this.css("marginLeft")) + parseInt(this.css("marginRight")) : parseInt(b.offsetWidth) }, outerHeight: function (a) { return a ? parseInt(this.css("height")) + parseInt(this.css("marginTop")) + parseInt(this.css("marginBottom")) : parseInt(this.css("height")) }, innerWidth: function () { 284 var a = this.get(0); return null != a ? (a = window.getComputedStyle(a), this.outerWidth() - parseFloat(a.borderLeftWidth) - 285 parseFloat(a.borderRightWidth)) : 0 286 }, width: function () { return this.outerWidth() }, height: function () { return this.outerHeight() }, on: function () { 287 let a = arguments, b = function (d, e) { 288 let f; if ("mouseenter" == e.type || "mouseleave" == e.type || "hover" == e.type) { var g = document.elementFromPoint(e.clientX, e.clientY); if (!g.matches(d[1])) for (; (g = g.parentElement) && !g.matches(d[1]);); null != g && (f = WPD.dom(g)) } else f = WPD.dom(e.target).closest(d[1]); if (null != f && 0 < f.closest(this).length) { 289 g = []; g.push(e); if ("undefined" != typeof d[4]) for (e = 290 4; e < d.length; e++)g.push(d[e]); d[2].apply(f.get(0), g) 291 } 292 }, c = a[0].split(" "); for (let d = 0; d < c.length; d++) { 293 let e = c[d]; if ("string" == typeof a[1]) this.forEach(function (f) { if (!WPD.dom._fn.hasEventListener(f, e, a[2])) { let g = b.bind(f, a); f.addEventListener(e, g, a[3]); f._wpd_el = "undefined" == typeof f._wpd_el ? [] : f._wpd_el; f._wpd_el.push({ type: e, selector: a[1], func: g, trigger: a[2], args: a[3] }) } }); else for (let f = 0; f < c.length; f++) { 294 let g = c[f]; this.forEach(function (h) { 295 WPD.dom._fn.hasEventListener(h, g, a[1]) || (h.addEventListener(g, 296 a[1], a[2]), h._wpd_el = "undefined" == typeof h._wpd_el ? [] : h._wpd_el, h._wpd_el.push({ type: g, func: a[1], trigger: a[1], args: a[2] })) 297 }) 298 } 299 } return this 300 }, off: function (a, b) { 301 this.forEach(function (c) { 302 if ("undefined" != typeof c._wpd_el && 0 < c._wpd_el.length) if ("undefined" === typeof a) { let d; for (; d = c._wpd_el.pop();)c.removeEventListener(d.type, d.func, d.args); c._wpd_el = [] } else a.split(" ").forEach(function (d) { 303 if ("undefined" == typeof b) { let e; for (; e = c._wpd_el.pop();)c.removeEventListener(d, e.func, e.args); c._wpd_el = [] } else { 304 let e = 305 []; c._wpd_el.forEach(function (f) { f.type == d && f.trigger == b ? c.removeEventListener(d, f.func, f.args) : e.push(f) }); c._wpd_el = e 306 } 307 }) 308 }); return this 309 }, offForced: function () { let a = this; this.forEach(function (b, c) { let d = b.cloneNode(!0); b.parentNode.replaceChild(d, b); a.a[c] = d }); return this }, trigger: function (a, b, c, d) { 310 c = c || !1; d = d || !1; this.forEach(function (e) { 311 var f = !1; d && "undefined" != typeof jQuery && "undefined" != typeof jQuery._data && "undefined" != typeof jQuery._data(e, "events") && "undefined" != typeof jQuery._data(e, "events")[a] && 312 (jQuery(e).trigger(a, b), f = !0); !f && c && (f = new Event(a), f.detail = b, e.dispatchEvent(f)); if ("undefined" != typeof e._wpd_el) e._wpd_el.forEach(function (g) { if (g.type == a) { let h = new Event(a); g.trigger.apply(e, [h].concat(b)) } }); else { 313 let g = !1, h = e; for (; ;) { 314 h = h.parentElement; if (null == h) break; "undefined" != typeof h._wpd_el && h._wpd_el.forEach(function (k) { 315 if ("undefined" !== typeof k.selector) { 316 var m = WPD.dom(h).find(k.selector); 0 < m.length && 0 <= m.get().indexOf(e) && k.type == a && (m = new Event(a), k.trigger.apply(e, [m].concat(b)), 317 g = !0) 318 } 319 }); if (g) break 320 } 321 } 322 }); return this 323 }, clone: function () { let a = this.get(0); null != a ? (this.a = [a.cloneNode(!0)], this.length = this.a.length) : this.a = []; this.length = this.a.length; return this }, remove: function (a) { if ("undefined" != typeof a) return a.parentElement.removeChild(a); this.forEach(function (b) { if (null != b.parentElement) return b.parentElement.removeChild(b) }); this.a = []; this.length = this.a.length; return null }, detach: function () { 324 let a = this, b = []; this.forEach(function (c) { c = a.remove(c); null != c && b.push(c) }); this.a = 325 b; this.length = this.a.length; return this 326 }, prepend: function (a) { "string" == typeof a && (a = WPD.dom._fn.createElementsFromHTML(a)); a = Array.isArray(a) ? a : [a]; this.forEach(function (b) { a.forEach(function (c) { "undefined" != typeof c.is_wpd_dom ? c.forEac
326h(function (d) { b.insertBefore(d, b.children[0]) }) : b.insertBefore(c, b.children[0]) }) }); return this }, append: function (a) { 327 "string" == typeof a && (a = WPD.dom._fn.createElementsFromHTML(a)); a = Array.isArray(a) ? a : [a]; this.forEach(function (b) { 328 a.forEach(function (c) { 329 null != c && ("undefined" != 330 typeof c.is_wpd_dom ? c.forEach(function (d) { b.appendChild(d) }) : b.appendChild(c.cloneNode(!0))) 331 }) 332 }); return this 333 }, uuidv4: function () { return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (a) { let b = 16 * Math.random() | 0; return ("x" == a ? b : b & 3 | 8).toString(16) }) } 334 }, WPD.dom._fn = { 335 bodyTransform: function () { 336 let a = 0, b = 0; if ("undefined" !== typeof WebKitCSSMatrix) { 337 var c = window.getComputedStyle(document.body); "undefined" != typeof c.transform && (c = new WebKitCSSMatrix(c.transform), "undefined" != c.m41 && (a = c.m41), 338 "undefined" != c.m42 && (b = c.m42)) 339 } return { x: a, y: b } 340 }, bodyTransformY: function () { return this.bodyTransform().y }, bodyTransformX: function () { return this.bodyTransform().x }, hasFixedParent: function (a) { if (0 != WPD.dom._fn.bodyTransformY()) return !1; do if ("fixed" == window.getComputedStyle(a).position) return !0; while (a = a.parentElement); return !1 }, hasEventListener: function (a, b, c) { if ("undefined" == typeof a._wpd_el) return !1; for (let d = 0; d < a._wpd_el.length; d++)if (a._wpd_el[d].trigger == c && a._wpd_el[d].type == b) return !0; return !1 }, 341 allDescendants: function (a) { let b = [], c = this; Array.isArray(a) || (a = [a]); a.forEach(function (d) { for (let e = 0; e < d.childNodes.length; e++) { let f = d.childNodes[e]; b.push(f); b = b.concat(c.allDescendants(f)) } }); return b }, createElementsFromHTML: function (a) { let b = document.createElement("template"); b.innerHTML = a.replace(/(\r\n|\n|\r)/gm, ""); return Array.prototype.slice.call(b.content.childNodes) }, absolutePosition: function (a) { 342 if (!a.getClientRects().length) return { top: 0, left: 0 }; let b = a.getBoundingClientRect(); a = a.ownerDocument.defaultView; 343 return { top: b.top + a.pageYOffset, left: b.left + a.pageXOffset } 344 }, plugin: function (a, b) { WPD.dom.fn[a] = function (c) { return "undefined" != typeof c && b[c] ? b[c].apply(this, Array.prototype.slice.call(arguments, 1)) : this.each(function (d) { d["wpd_dom_" + a] = Object.create(b).init(c, d) }) } } 345 }, WPD.dom.version = 1; return 1 <= arguments.length ? WPD.dom.fn.$.apply(WPD.dom.fn, arguments) : WPD.dom.fn 346 }; WPD.dom(); document.dispatchEvent(new Event("wpd-dom-core-loaded")) 347})(); 348(function () { 349 if ("undefined" != typeof WPD.dom.fn.animate) return !1; WPD.dom.fn._animate = { easing: { linear: function (a) { return a }, easeInOutQuad: function (a) { return .5 > a ? 2 * a * a : 1 - Math.pow(-2 * a + 2, 2) / 2 }, easeOutQuad: function (a) { return 1 - (1 - a) * (1 - a) } } }; WPD.dom.fn.animate = function (a, b, c) { 350 let d = this; b = b || 200; c = c || "linear"; this.forEach(function (e) { 351 let f, g = 0, h, k = {}, m = {}, n, p, q; n = d.prop("_wpd_dom_animations"); n = null == n ? [] : n; !1 === a ? n.forEach(function (l) { clearInterval(l) }) : (q = "undefined" != typeof d._animate.easing[c] ? d._animate.easing[c] : 352 d._animate.easing.easeInOutQuad, Object.keys(a).forEach(function (l) { -1 < l.indexOf("scroll") ? k[l] = e[l] : k[l] = parseInt(window.getComputedStyle(e)[l]); m[l] = a[l] - k[l] }), f = b / 1E3 * 60, p = setInterval(function () { g++; g > f ? clearInterval(p) : (h = q(g / f), Object.keys(m).forEach(function (l) { -1 < l.indexOf("scroll") ? e[l] = k[l] + m[l] * h : e.style[l] = k[l] + m[l] * h + "px" })) }, 1E3 / 60), n.push(p), d.prop("_wpd_dom_animations", n)) 353 }); return this 354 }; document.dispatchEvent(new Event("wpd-dom-animate-loaded")) 355})(); 356(function () { 357 let a = WPD.dom; if ("undefined" != typeof WPD.dom.fn.unhighlight) return !1; WPD.dom.fn.unhighlight = function (b) { let c = { className: "highlight", element: "span" }; a.fn.extend(c, b); return this.find(c.element + "." + c.className).each(function () { let d = this.parentNode; d.replaceChild(this.firstChild, this); d.normalize() }) }; WPD.dom.fn.highlight = function (b, c) { 358 function d(g, h, k, m, n) { 359 n = "" == n ? ".exhghttt" : n; if (3 === g.nodeType) { 360 if (h = g.data.normalize("NFD").replace(/[\u0300-\u036f]/g, "").match(h)) return k = document.createElement(k || 361 "span"), k.className = m || "highlight", m = /\.|,|\s/.test(h[0].charAt(0)) ? h.index + 1 : h.index, g = g.splitText(m), g.splitText(h[1].length), m = g.cloneNode(!0), k.appendChild(m), g.parentNode.replaceChild(k, g), 1 362 } else if (1 === g.nodeType && g.childNodes && !/(script|style)/i.test(g.tagName) && 0 < !a(g).closest(n).length && (g.tagName !== k.toUpperCase() || g.className !== m)) for (let p = 0; p < g.childNodes.length; p++)p += d(g.childNodes[p], h, k, m, n); return 0 363 } let e = { className: "highlight", element: "span", caseSensitive: !1, wordsOnly: !1, excludeParents: "" }; 364 a.fn.extend(e, c); b.constructor === String && (b = [b]); b = b.filter(function (g) { return "" != g }); b.forEach(function (g, h, k) { k[h] = g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&").normalize("NFD").replace(/[\u0300-\u036f]/g, "") }); if (0 == b.length) return this; c = e.caseSensitive ? "" : "i"; b = "(" + b.join("|") + ")";
364 e.wordsOnly && (b = "(?:,|^|\\s)" + b + "(?:,|$|\\s)"); let f = new RegExp(b, c); return this.each(function (g) { d(g, f, e.element, e.className, e.excludeParents) }) 365 } 366})(); 367(function () { 368 if ("undefined" != typeof WPD.dom.fn.serialize) return !1; WPD.dom.fn.serialize = function () { 369 let a = this.get(0); if (a && "FORM" === a.nodeName) { 370 var b, c, d = []; for (b = a.elements.length - 1; 0 <= b; --b)if ("" !== a.elements[b].name) switch (a.elements[b].nodeName) { 371 case "INPUT": switch (a.elements[b].type) { 372 case "text": case "hidden": case "password": case "button": case "reset": case "submit": d.push(a.elements[b].name + "=" + encodeURIComponent(a.elements[b].value)); break; case "checkbox": case "radio": a.elements[b].checked && d.push(a.elements[b].name + 373 "=" + encodeURIComponent(a.elements[b].value)) 374 }break; case "TEXTAREA": d.push(a.elements[b].name + "=" + encodeURIComponent(a.elements[b].value)); break; case "SELECT": switch (a.elements[b].type) { case "select-one": d.push(a.elements[b].name + "=" + encodeURIComponent(a.elements[b].value)); break; case "select-multiple": for (c = a.elements[b].options.length - 1; 0 <= c; --c)a.elements[b].options[c].selected && d.push(a.elements[b].name + "=" + encodeURIComponent(a.elements[b].options[c].value)) }break; case "BUTTON": switch (a.elements[b].type) { 375 case "reset": case "submit": case "button": d.push(a.elements[b].name + 376 "=" + encodeURIComponent(a.elements[b].value)) 377 } 378 }return d.join("&") 379 } 380 }; WPD.dom.fn.serializeForAjax = function (a, b) { let c = [], d; for (d in a) if (a.hasOwnProperty(d)) { let e = b ? b + "[" + d + "]" : d, f = a[d]; c.push(null !== f && "object" === typeof f ? WPD.dom.fn.serializeForAjax(f, e) : encodeURIComponent(e) + "=" + encodeURIComponent(f)) } return c.join("&") }; document.dispatchEvent(new Event("wpd-dom-serialize-loaded")) 381})(); 382(function () { 383 if ("undefined" != typeof WPD.dom.fn.inViewPort) return !1; WPD.dom.fn.inViewPort = function (a, b) { 384 var c = this.get(0); let d; if (null == c) return !1; a = "undefined" == typeof a ? 0 : a; b = "undefined" == typeof b ? window : "string" == typeof b ? document.querySelector(b) : b; var e = c.getBoundingClientRect(); c = e.top; let f = e.bottom, g = e.left, h = e.right; null == b && (b = window); b === window ? (e = window.innerWidth || 0, d = window.innerHeight || 0) : (e = b.clientWidth, d = b.clientHeight, b = b.getBoundingClientRect(), c -= b.top, f -= b.top, g -= b.left, h -= b.left); 385 a = ~~Math.round(parseFloat(a)); return 0 >= h || g >= e ? !1 : 0 < a ? c >= a && f < d - a : (0 < f && c <= d - a) | (0 >= c && f > a) 386 }; document.dispatchEvent(new Event("wpd-dom-viewport-loaded")) 387})(); 388(function () { 389 if ("undefined" != typeof WPD.dom.fn.ajax) return !1; WPD.dom.fn.ajax = function (a) { 390 a = this.extend({ url: "", method: "GET", cors: "cors", data: {}, success: null, fail: null, accept: "text/html", contentType: "application/x-www-form-urlencoded; charset=UTF-8" }, a); if ("cors" != a.cors) { 391 var b = "ajax_cb_" + this.uuidv4().replaceAll("-", ""); WPD.dom.fn[b] = function () { a.success.apply(this, arguments); delete WPD.dom.fn[a.data.fn] }; a.data.callback = "WPD.dom.fn." + b; a.data.fn = b; b = document.createElement("script"); b.type = "text/javascript"; 392 b.src = a.url + "?" + this.serializeForAjax(a.data); b.onload = function () { this.remove() }; document.body.appendChild(b) 393 } else return b = new XMLHttpRequest, b.onreadystatechange = function () { null != a.success && 4 == this.readyState && 200 == this.status && a.success(this.responseText); null != a.fail && 4 == this.readyState && 400 <= this.status && a.fail(this) }, b.open(a.method.toUpperCase(), a.url, !0), b.setRequestHeader("Content-type", a.contentType), b.setRequestHeader("Accept", a.accept), b.send(this.serializeForAjax(a.data)), b 394 }; document.dispatchEvent(new Event("wpd-dom-xhttp-loaded")) 395})(); 396window.WPD = window.WPD || {}; 397window.WPD.Base64 = { 398 _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
398+/=", encode: function (a) { let b = ""; let c, d, e, f, g, h = 0; for (a = this._utf8_encode(a); h < a.length;) { var k = a.charCodeAt(h++); c = a.charCodeAt(h++); d = a.charCodeAt(h++); e = k >> 2; k = (k & 3) << 4 | c >> 4; f = (c & 15) << 2 | d >> 6; g = d & 63; isNaN(c) ? f = g = 64 : isNaN(d) && (g = 64); b = b + this._keyStr.charAt(e) + this._keyStr.charAt(k) + this._keyStr.charAt(f) + this._keyStr.charAt(g) } return b }, decode: function (a) { 399 let b = ""; let c, d, e, f = 0; for (a = a.replace(/[^A-Za-z0-9\+\/=]/g, 400 ""); f < a.length;) { var g = this._keyStr.indexOf(a.charAt(f++)); var h = this._keyStr.indexOf(a.charAt(f++)); d = this._keyStr.indexOf(a.charAt(f++)); e = this._keyStr.indexOf(a.charAt(f++)); g = g << 2 | h >> 4; h = (h & 15) << 4 | d >> 2; c = (d & 3) << 6 | e; b += String.fromCharCode(g); 64 != d && (b += String.fromCharCode(h)); 64 != e && (b += String.fromCharCode(c)) } return b = this._utf8_decode(b) 401 }, _utf8_encode: function (a) { 402 a = a.replace(/\r\n/g, "\n"); let b = ""; for (let c = 0; c < a.length; c++) { 403 let d = a.charCodeAt(c); 128 > d ? b += String.fromCharCode(d) : (127 < d && 2048 > 404 d ? b += String.fromCharCode(d >> 6 | 192) : (b += String.fromCharCode(d >> 12 | 224), b += String.fromCharCode(d >> 6 & 63 | 128)), b += String.fromCharCode(d & 63 | 128)) 405 } return b 406 }, _utf8_decode: function (a) { let b = "", c = 0, d, e, f; for (; c < a.length;)d = a.charCodeAt(c), 128 > d ? (b += String.fromCharCode(d), c++) : 191 < d && 224 > d ? (e = a.charCodeAt(c + 1), b += String.fromCharCode((d & 31) << 6 | e & 63), c += 2) : (e = a.charCodeAt(c + 1), f = a.charCodeAt(c + 2), b += String.fromCharCode((d & 15) << 12 | (e & 63) << 6 | f & 63), c += 3); return b } 407}; 408(function () { 409 window.WPD = window.WPD || {}; WPD.Hooks = WPD.Hooks || {}; let a = WPD.Hooks; a.filters = a.filters || {}; a.addFilter = function (b, c, d, e) { a.filters[b] = a.filters[b] || []; a.filters[b].push({ priority: "undefined" === typeof d ? 10 : d, scope: "undefined" === typeof e ? null : e, callback: c }) }; a.removeFilter = function (b, c) { "undefined" != typeof a.filters[b] && ("undefined" == typeof c ? a.filters[b] = [] : a.filters[b].forEach(function (d, e) { d.callback === c && a.filters[b].splice(e, 1) })) }; a.applyFilters = function (b) { 410 let c = [], d = Array.prototype.slice.call(arguments), 411 e = arguments[1]; "undefined" !== typeof a.filters[b] && 0 < a.filters[b].length && (a.filters[b].forEach(function (f) { c[f.priority] = c[f.priority] || []; c[f.priority].push({ scope: f.scope, callback: f.callback }) }), d.splice(0, 2), c.forEach(function (f) { f.forEach(function (g) { e = g.callback.apply(g.scope, [e].concat(d)) }) })); return e 412 } 413})(); window.WPD = window.WPD || {}; 414window.WPD.intervalUntilExecute = function (a, b, c, d) { let e, f = 0, g = "function" === typeof b ? b() : b; c = "undefined" == typeof c ? 100 : c; d = "undefined" == typeof d ? 50 : d; if (!1 === g) e = setInterval(function () { g = "function" === typeof b ? b() : b; f++; if (f > d) return clearInterval(e), !1; if (!1 !== g) return clearInterval(e), a(g) }, c); else return a(g) }; 415 416// asl-core 417(function () { window.WPD = "undefined" !== typeof window.WPD ? window.WPD : {}; window.WPD.ajaxsearchlite = new function () { this.prevState = null; this.firstIteration = !0; this.helpers = {}; this.plugin = {}; this.addons = { addons: [], add: function (d) { -1 == this.addons.indexOf(d) && (d = this.addons.push(d), this.addons[d - 1].init()) }, remove: function (d) { this.addons.filter(function (b) { return b.name == d ? ("undefined" != typeof b.destroy && b.destroy(), !1) : !0 }) } } } })(); 418(function (d) { let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { setFilterStateInput: function (a) { let c = this; "undefined" == typeof a && (a = 65); let f = function () { JSON.stringify(c.originalFormData) != JSON.stringify(b.formData(d("form", c.n("searchsettings")))) ? c.n("searchsettings").find("input[name=filters_initial]").val(0) : c.n("searchsettings").find("input[name=filters_initial]").val(1) }; 0 == a ? f() : setTimeout(function () { f() }, a) } }) })(WPD.dom); 419(function (d) { 420 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 421 liveLoad: function (a, c, f, e) { 422 function l(h) { 423 h = b.Hooks.applyFilters("asl/live_load/raw_data", h, g); var n = new DOMParser; let p = n.parseFromString(h, "text/html"), q = d(p); g.o.statistics && g.stat_addKeyword(g.o.id, g.n("text").val()); "" != h && 0 < q.length && 0 < q.find(a).length && (h = h.replace(/&asl_force_reset_pagination=1/gmi, ""), h = h.replace(/%26asl_force_reset_pagination%3D1/gmi, ""), h = h.replace(/&asl_force_reset_pagination=1/gmi, 424 ""), b.isSafari() && (h = h.replace(/srcset/gmi, "nosrcset")), h = b.Hooks.applyFilters("asl/live_load/html", h, g.o.id, g.o.iid), h = b.wp_hooks_apply_filters("asl/live_load/html", h, g.o.id, g.o.iid), q = d(n.parseFromString(h, "text/html")), n = q.find(a).get(0), n = b.Hooks.applyFilters("asl/live_load/replacement_node", n, g, k.get(0), h), null != n && k.get(0).parentNode.replaceChild(n, k.get(0)), k = d(a).first(), f && (document.title = p.title, history.pushState({}, null, c)), d(a).first().find(".woocommerce-ordering").on("change", "select.orderby", 425 function () { d(this).closest("form").trigger("submit") }), g.addHighlightString(d(a).find("a")), b.Hooks.applyFilters("asl/live_load/finished", c, g, a, k.get(0)), ASL.initialize(), g.lastSuccesfulSearch = d("form", g.n("searchsettings")).serialize() + g.n("text").val().trim(), g.lastSearchData = h); g.n("s").trigger("asl_search_end", [g.o.id, g.o.iid, g.n("text").val(), h], !0, !0); let r, t; null == (t = (r = g).gaEvent) || t.call(r, "search_end", { results_count: "unknown" }); let u, v; null == (v = (u = g).gaPageview) || v.call(u, g.n("text").val()); 426 g.hideLoader(); k.css("opacity", 1); g.searching = !1; "" != g.n("text").val() && g.n("proclose").css({ display: "block" }) 427 } if ("body" == a || "html" == a) return console.log("Ajax Search Pro: Do not use html or body as the live loader selector."), !1; "" == ASL.pageHTML && "undefined" === typeof ASL._ajax_page_html && (ASL._ajax_page_html = !0, d.fn.ajax({ url: location.href, method: "GET", success: function (h) { ASL.pageHTML = h }, dataType: "html" })); f = "undefined" == typeof f ? !0 : f; e = "undefined" == typeof e ? !1 : e; let m = ".search-content #content #Content div[role=main] main[role=main] div.theme-content div.td-ss-main-content main.l-content #primary".split(" "); 428 "#main" != a && m.unshift("#main"); if (1 > d(a).length && (m.forEach(function (h) { if (0 < d(h).length) return a = h, !1 }), 1 > d(a).length)) return console.log("Ajax Search Lite: The live search selector does not exist on the page."), !1; a = b.Hooks.applyFilters("asl/live_load/selector", a, this); let k = d(a).first(), g = this; g.searchAbort(); k.css("opacity", .4); b.Hooks.applyFilters("asl/live_load/start", c, g, a, k.get(0)); e || 1 != g.n("searchsettings").find("input[name=filters_initial]").val() || "" != g.n("text").val() ? (g.searching = !0, 429 g.post = d.fn.ajax({ url: c, method: "GET", success: function (h) { l(h) }, dataType: "html", fail: function (h) { k.css("opacity", 1); h.aborted || (k.html("This request has failed. Please check your connection."), g.hideLoader(), g.searching = !1, g.n("proclose").css({ display: "block" })) } })) : window.WPD.intervalUntilExecute(function () { l(ASL.pageHTML) }, function () { return "" != ASL.pageHTML }) 430 }, getCurrentLiveURL: function () { 431 var a = "asl_ls=" + b.nicePhrase(this.n("text").val()); let c = "&", f = window.location.href; f = -1 < f.indexOf("asl_ls=") ? 432 f.slice(0, f.indexOf("asl_ls=")) : f; f = -1 < f.indexOf("asl_ls&") ? f.slice(0, f.indexOf("asl_ls&")) : f; f = -1 < f.indexOf("p_asid=") ? f.slice(0, f.indexOf("p_asid=")) : f; f = -1 < f.indexOf("asl_") ? f.slice(0, f.indexOf("asl_")) : f; -1 === f.indexOf("?") && (c = "?"); a = f + c + a + "&asl_active=1&asl_force_reset_pagination=1&p_asid=" + this.o.id + "&p_asl_data=1&" + d("form", this.n("searchsettings")).serialize(); return a = a.replace("?&", "?") 433 } 434 }) 435})(WPD.dom); 436(function (d) { d.fn.extend(window.WPD.ajaxsearchlite.plugin, { showLoader: function () { this.n("proloading").css({ display: "block" }) }, hideLoader: function () { this.n("proloading").css({ display: "none" }); this.n("results").css("display", "") } }) })(WPD.dom); 437(function (d) { 438 d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 439 loadASLFonts: function () { !1 !== ASL.font_url && ((new FontFace("aslsicons2", "url(" + ASL.font_url + ")", { style: "normal", weight: "normal", "font-display": "swap" })).load().then(function (b) { document.fonts.add(b) }).catch(function (b) { }), ASL.font_url = !1) }, updateHref: function () { 440 if (this.o.trigger.update_href && !this.usingLiveLoader) { 441 window.location.origin || (window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ":" + 442 window.location.port : ""));
442 let b = this.getStateURL() + (this.resultsOpened ? "&asl_s=" : "&asl_ls=") + this.n("text").val(); history.replaceState("", "", b.replace(location.origin, "")) 443 } 444 }, fixClonedSelf: function () { 445 let b = this.o.iid, a = this.o.rid; for (; !ASL.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 = "ajaxsearchlite" + this.o.rid, this.n("search").removeClass("asl_m_" + a).addClass("asl_m_" + this.o.rid).data("instance", this.o.iid), this.n("searchsettings").get(0).id = 446 this.n("searchsettings").get(0).id.replace("settings" + a, "settings" + this.o.rid), this.n("searchsettings").hasClass("asl_s_" + a) ? this.n("searchsettings").removeClass("asl_s_" + a).addClass("asl_s_" + this.o.rid).data("instance", this.o.iid) : this.n("searchsettings").removeClass("asl_sb_" + a).addClass("asl_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("asl_r_" + a).addClass("asl_r_" + 447 this.o.rid).data("instance", this.o.iid), this.n("container").find(".asl_init_data").data("instance", this.o.iid), this.n("container").find(".asl_init_data").get(0).id = this.n("container").find(".asl_init_data").get(0).id.replace("asl_init_id_" + a, "asl_init_id_" + this.o.rid), this.n("prosettings").data("opened", 0)) 448 }, destroy: function () { 449 let b = this; Object.keys(b.nodes).forEach(function (h) { let n, p; null == (p = (n = b.nodes[h]).off) || p.call(n) }); let a, c; null == (c = (a = b.n("searchsettings")).remove) || c.call(a); let f, e; 450 null == (e = (f = b.n("resultsDiv")).remove) || e.call(f); let l, m; null == (m = (l = b.n("search")).remove) || m.call(l); let k, g; null == (g = (k = b.n("container")).remove) || g.call(k); b.documentEventHandlers.forEach(function (h) { d(h.node).off(h.event, h.handler) }) 451 } 452 }) 453})(WPD.dom); 454(function (d) { 455 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 456 isRedirectToFirstResult: function () { return (0 < d(".asl_res_url", this.n("resultsDiv")).length || 0 < d(".asl_es_" + this.o.id + " a").length || this.o.resPage.useAjax && 0 < d(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) }, 457 doRedirectToFirstResult: function () { 458 let a, c; a = "click" == this.ktype ? this.o.trigger.click_location : this.o.trigger.return_location; 0 < d(".asl_res_url", this.n("resultsDiv")).length ? c = d(d(".asl_res_url", this.n("resultsDiv")).get(0)).attr("href") : 0 < d(".asl_es_" + this.o.id + " a").length ? c = d(d(".asl_es_" + this.o.id + " a").get(0)).attr("href") : this.o.resPage.useAjax && 0 < d(this.o.resPage.selector + "a").length && (c = d(d(this.o.resPage.selector + "a").get(0)).attr("href")); "" != c && ("same" == a ? location.href = c : b.openInNewTab(c), 459 this.hideLoader(), this.hideResults()); return !1 460 }, doRedirectToResults: function (a) { 461 return; // Disable Enter to search results page 462 let c; c = "click" == a ? this.o.trigger.click_location : this.o.trigger.return_location; a = this.getRedirectURL(a); if (this.o.overridewpdefault) { 463 if (1 == this.o.resPage.useAjax) return this.hideResults(), this.liveLoad(this.o.resPage.selector, a), this.showLoader(), 0 == this.o.blocking && this.hideSettings(), !1; "post" == this.o.override_method ? b.submitToUrl(a, "post", { asl_active: 1, p_asl_data: d("form", this.n("searchsettings")).serialize() }, c) : 464 "same" == c ? location.href = a : b.openInNewTab(a) 465 } else b.submitToUrl(a, "post", { np_asl_data: d("form", this.n("searchsettings")).serialize() }, c); this.n("proloading").css("display", "none"); this.hideLoader(); this.hideResults(); this.searchAbort() 466 }, getRedirectURL: function (a) { 467 a = "click" == ("undefined" !== typeof a ? a : "enter") ? this.o.trigger.click : this.o.trigger.return; "results_page" == a || "ajax_search" == a ? a = "?s=" + b.nicePhrase(this.n("text").val()) : "woo_results_page" == a ? a = "?post_type=product&s=" + b.nicePhrase(this.n("text").val()) : 468 (a = this.o.trigger.redirect_url, a = a.replace(/{phrase}/g, b.nicePhrase(this.n("text").val()))); 1 < this.o.homeurl.indexOf("?") && 0 === a.indexOf("?") && (a = a.replace("?", "&")); if (this.o.overridewpdefault && "post" != this.o.override_method) { let
468c = "&"; -1 === this.o.homeurl.indexOf("?") && -1 === a.indexOf("?") && (c = "?"); a = a + c + "asl_active=1&p_asl_data=1&" + d("form", this.n("searchsettings")).serialize(); a = this.o.homeurl + a } else a = this.o.homeurl + a; a = a.replace("https://", "https:///"); a = a.replace("http://", "http:///"); a = a.replace(/\/\//g, 469 "/"); a = b.Hooks.applyFilters("asl/redirect/url", a, this.o.id, this.o.iid); return a = b.wp_hooks_apply_filters("asl/redirect/url", a, this.o.id, this.o.iid) 470 } 471 }) 472})(WPD.dom); 473(function (d) { 474 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 475 showResults: function () { this.initResults(); this.createVerticalScroll(); this.showVerticalResults(); this.hideLoader(); this.n("proclose").css({ display: "block" }); null != this.n("showmore") && (0 < this.n("items").length ? this.n("showmore").css({ display: "block" }) : this.n("showmore").css({ display: "none" })); "undefined" != typeof WPD.lazy && setTimeout(function () { WPD.lazy(".asl_lazy") }, 100); this.resultsOpened = !0 }, hideResults: function (a) { 476 let c = 477 this; a = "undefined" == typeof a ? !0 : a; if (!c.resultsOpened) return !1; c.n("resultsDiv").removeClass(c.resAnim.showClass).addClass(c.resAnim.hideClass); setTimeout(function () { c.n("resultsDiv").css(c.resAnim.hideCSS) }, c.resAnim.duration); c.n("proclose").css({ display: "none" }); b.isMobile() && a && document.activeElement.blur(); c.resultsOpened = !1; c.n("s").trigger("asl_results_hide", [c.o.id, c.o.iid], !0, !0) 478 }, showResultsBox: function () { 479 this.n("s").trigger("asl_results_show", [this.o.id, this.o.iid], !0, !0); this.n("resultsDiv").css({ 480 display: "block", 481 height: "auto" 482 }); this.n("resultsDiv").css(this.resAnim.showCSS); this.n("resultsDiv").removeClass(this.resAnim.hideClass).addClass(this.resAnim.showClass); this.fixResultsPosition(!0) 483 }, addHighlightString: function (a) { 484 let c = this, f = c.n("text").val().replace(/["']/g, ""); a = "undefined" == typeof a ? c.n("items").find("a.asl_res_url") : a; 1 == c.o.singleHighlight && "" != f && 0 < a.length && a.forEach(function () { 485 try { 486 const e = new URL(d(this).attr("href")); e.searchParams.set("asl_highlight", f); e.searchParams.set("p_asid", c.o.id); 487 d(this).attr("href", e.href) 488 } catch (e) { } 489 }) 490 }, scrollToResults: function () { var a = Math.floor(.1 * window.innerHeight); if (this.resultsOpened && 1 == this.o.scrollToResults.enabled && !this.n("resultsDiv").inViewPort(a)) { a = "hover" == this.o.resultsposition ? this.n("probox").offset().top - 20 : this.n("resultsDiv").offset().top - 20; a += this.o.scrollToResults.offset; var c = d("#wpadminbar"); 0 < c.length && (a -= c.height()); window.scrollTo({ top: 0 > a ? 0 : a, behavior: "smooth" }) } } 491 }) 492})(WPD.dom); 493(function (d) { d.fn.extend(window.WPD.ajaxsearchlite.plugin, { createVerticalScroll: function () { } }) })(WPD.dom); 494(function (d) { 495 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 496 searchAbort: function () { null != this.post && this.post.abort() }, searchWithCheck: function (a) { let c = this; "undefined" == typeof a && (a = 50); c.n("text").val().length < c.o.charcount || (c.searchAbort(), clearTimeout(c.timeouts.searchWithCheck), c.timeouts.searchWithCheck = setTimeout(function () { c.search() }, a)) }, search: function () { 497 let a = this; if (!(a.n("text").val().length < a.o.charcount)) { 498 a.searching = !0; a.n("proloading").css({ display: "block" }); 499 a.n("proclose").css({ display: "none" }); 500 var c = { action: "ajaxsearchlite_search", aslp: a.n("text").val(), asid: a.o.id, options: d("form", a.n("searchsettings")).serialize() }; 501 c = b.Hooks.applyFilters("asl/search/data", c); 502 c = b.wp_hooks_apply_filters("asl/search/data", c);
503 if (JSON.stringify(c) === JSON.stringify(a.lastSearchData)) return a.resultsOpened || a.showResults(), a.hideLoader(), a.isRedirectToFirstResult() && a.doRedirectToFirstResult(), !1; 504 var f; null == (f = a.gaEvent) || f.call(a, "search_start"); 505 if (0 < d(".asl_es_" + a.o.id).length) { 506 a.liveLoad(".asl_es_" + a.o.id, a.getCurrentLiveURL(), !1) 507 } else { 508 if (a.o.resPage.useAjax) { 509 a.liveLoad(a.o.resPage.selector, a.getRedirectURL()) 510 } else { 511 $.ajax({ 512 type:'POST', 513 url:"/search", 514 data:{ 515 search_term: c.aslp, 516 asid: 1 517 }, 518 success:function(e) { 519 e = e.match(/___ASLSTART___(.*[\s\S]*)___ASLEND___/); 520 e= e[1]; 521 e = b.Hooks.applyFilters("asl/search/html", e); 522 e = b.wp_hooks_apply_filters("asl/search/html", e); 523 a.n("resdrg").html(""); a.n("resdrg").html(e); d(".asl_keyword", a.n("resdrg")).on("click", function () { 524 a.n("text").val(d(this).html()); 525 d("input.orig", a.n("container")).val(d(this).html()).trigger("keydown"); d("form", a.n("container")).trigger("submit", "ajax"); a.search() 526 }); 527 a.nodes.items = d(".item", a.n("resultsDiv")); 528 a.addHighlightString(); 529 let l; 530 null == (l = a.gaEvent) || l.call(a, "search_end", { results_count: a.n("items").length }); 531 let m; null == (m = a.gaPageview) || m.call(a, a.n("text").val()); 532 if (a.isRedirectToFirstResult()) return a.doRedirectToFirstResult(), !1; a.hideLoader(); a.showResults(); a.scrollToResults(); a.lastSuccesfulSearch = d("form", a.n("searchsettings")).serialize() + 533 a.n("text").val().trim(); a.lastSearchData = c; a.updateHref(); 0 == a.n("items").length ? null != a.n("showmore") && a.n("showmore").css("display", "none") : null != a.n("showmore") && (a.n("showmore").css("display", "block"), d("span", a.n("showmore")).off(), d("span", a.n("showmore")).on("click", function () { 534 var k = a.o.trigger.click; k = "results_page" == k ? "?s=" + b.nicePhrase(a.n("text").val()) : "woo_results_page" == k ? "?post_type=product&s=" + b.nicePhrase(a.n("text").val()) : a.o.trigger.redirect_url.replace("{phrase}", b.nicePhrase(a.n("text").val())); 535 a.o.overridewpdefault ? "post" == a.o.override_method ? b.submitToUrl(a.o.homeurl + k, "post", { asl_active: 1, p_asl_data: d("form", a.n("searchsettings")).serialize() }) : location.href = a.o.homeurl + k + "&asl_active=1&p_asid=" + a.o.id + "&p_asl_data=1&" + d("form", a.n("searchsettings")).serialize() : b.submitToUrl(a.o.homeurl + k, "post", { np_asl_data: d("form", a.n("searchsettings")).serialize() }) 536 })) 537 }, 538 fail: function (e) { 539 e.aborted || (a.n("resdrg").html(""), a.n("resdrg").html('<div class="asl_nores">The request failed. Please check your connection! Status: ' + 540 e.status + "</div>"), a.nodes.items = d(".item", a.n("resultsDiv")), a.hideLoader(), a.showResults(), a.scrollToResults()) 541 } 542 }) 543 } 544 } 545 } 546 } 547 }) 548})(WPD.dom); 549(function (d) { 550 d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 551 searchFor: function (b) { "undefined" != typeof b && this.n("text").val(b); this.n("textAutocomplete").val(""); this.search(!1, !1, !1, !0) }, 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) { 552 "undefined" != typeof b && b && (this.n("text").val(""), this.n("textAutocomplete").val("")); this.hideResults(); this.n("proloading").css("display", 553 "none"); this.hideLoader(); this.searchAbort() 554 }, getStateURL: function () { let b = location.href, a; b = b.split("p_asid"); b = b[0]; b = b.replace("&asl_active=1", ""); b = b.replace("?asl_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_asl_data=1&" + d("form", this.n("searchsettings")).serialize() }, resetSearch: function () { this.resetSearchFilters() }, filtersInitial: function () { return 1 == this.n("searchsettings").find("input[name=filters_initial]").val() }, 555 filtersChanged: function () { return 1 == this.n("searchsettings").find("input[name=filters_changed]").val() } 556 }) 557})(WPD.dom); 558(function (d) { 559 d.fn.extend(window.WPD.ajaxsearchlite.helpers, { 560 Hooks: window.WPD.Hooks, deviceType: function () { let b = window.innerWidth; return 640 >= b ? "phone" : 1024 >= b ? "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 b = window.navigator.userAgent; let a = b.indexOf("MSIE "); b = b.indexOf("Trident/"); return 0 < a || 0 < b ? !0 : !1 }, isMobile: function () { 561 try { 562 return document.createEvent("TouchEvent"), 563 !0 564 } catch (b) { return !1 } 565 }, isTouchDevice: function () { return "ontouchstart" in window }, isSafari: function () { return /^((?!chrome|android).)*safari/i.test(navigator.userAgent) }, whichjQuery: function (b) { let a = !1; "undefined" != typeof window.$ && ("undefined" === typeof b ? a = window.$ : "undefined" != typeof window.$.fn[b] && (a = window.$)); !1 === a && "undefined" != typeof window.jQuery && (a = window.jQuery, "undefined" === typeof b ? a = window.jQuery : "undefined" != typeof window.jQuery.fn[b] && (a = window.jQuery)); return a }, formData: function (b, 566 a) { 567 let c = this, f = b.find("input,textarea,select,button").get(); if (1 === arguments.length) return a = {}, f.forEach(function (e) { e.name && !e.disabled && (e.checked || /select|textarea/i.test(e.nodeName) || /text/i.test(e.type) || d(e).hasClass("hasDatepicker") || d(e).hasClass("asl_slider_hidden")) && (void 0 == a[e.name] && (a[e.name] = []), d(e).hasClass("hasDatepicker") ? a[e.name].push(d(e).parent().find(".asl_datepicker_hidden").val()) : a[e.name].push(d(e).val())) }), JSON.stringify(a); "object" != typeof a && (a = JSON.parse(a)); f.forEach(function (e) { 568 if (e.name) if (a[e.name]) { 569 let l = 570 a[e.name], m = d(e); "[object Array]" !== Object.prototype.toString.call(l) && (l = [l]); if ("checkbox" == e.type || "radio" == e.type) { let k = m.val(), g = !1; for (let h = 0; h < l.length; h++)if (l[h] == k) { g = !0; break } m.prop("checked", g) } else m.val(l[0]), (d(e).hasClass("asl_gochosen") || d(e).hasClass("asl_goselect2")) && WPD.intervalUntilExecute(function (k) { k(e).trigger("change.asl_select2") }, function () { return c.whichjQuery("asl_select2") }, 50, 3), d(e).hasClass("hasDatepicker") && WPD.intervalUntilExecute(function (k) { 571 let g = l[0], h = k(m.get(0)).datepicker("option", 572 "dateFormat"); k(m.get(0)).datepicker("option", "dateFormat", "yy-mm-dd"); k(m.get(0)).datepicker("setDate", g); k(m.get(0)).datepicker("option", "dateFormat", h); k(m.get(0)).trigger("selectnochange") 573 }, function () { return c.whichjQuery("datepicker") }, 50, 3) 574 } else "checkbox" != e.type && "radio" != e.type || d(e).prop("checked", !1) 575 }); return b 576 }, submitToUrl: function (b, a, c, f) { 577 let e; e = d('<form style="display: none;" />'); e.attr("action", b); e.attr("method", a); d("body").append(e); "undefined" !== typeof c && null !== c && Object.keys(c).forEac
577h(function (l) { 578 let m = 579 c[l], k = d('<input type="hidden" />'); k.attr("name", l); k.attr("value", m); e.append(k) 580 }); "undefined" != typeof f && "new" == f && e.attr("target", "_blank"); e.get(0).submit() 581 }, openInNewTab: function (b) { Object.assign(document.createElement("a"), { target: "_blank", href: b }).click() }, isScrolledToBottom: function (b, a) { return b.scrollHeight - b.scrollTop - d(b).outerHeight() < a }, getWidthFromCSSValue: function (b, a) { 582 b += ""; b = -1 < b.indexOf("px") ? parseInt(b, 10) : -1 < b.indexOf("%") ? "undefined" != typeof a && null != a ? Math.floor(parseInt(b, 583 10) / 100 * a) : parseInt(b, 10) : parseInt(b, 10); return 100 > b ? 100 : b 584 }, nicePhrase: function (b) { return encodeURIComponent(b).replace(/%20/g, "+") }, unqoutePhrase: function (b) { return b.replace(/["']/g, "") }, decodeHTMLEntities: function (b) { let a = document.createElement("div"); b && "string" === typeof b && (b = b.replace(/<script[^>]*>([\S\s]*?)<\/script>/gmi, ""), b = b.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gmi, ""), a.innerHTML = b, b = a.textContent, a.textContent = ""); return b }, isScrolledToRight: function (b) { 585 return b.scrollWidth - 586 d(b).outerWidth() === b.scrollLeft 587 }, isScrolledToLeft: function (b) { return 0 === b.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 } 588 }) 589})(WPD.dom); 590(function (d) { 591 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 592 detectAndFixFixedPositioning: function () { 593 let a = !1, c = this.n("search").get(0); for (; c;)if (c = c.parentElement, null != c && "fixed" == window.getComputedStyle(c).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.o.blocking || this.n("searchsettings").css({ position: "fixed", "z-index": 2147483647 })) : 594 ("fixed" == this.n("resultsDiv").css("position") && this.n("resultsDiv").css("position", "absolute"), this.o.blocking || this.n("searchsettings").css("position", "absolute")) 595 }, fixResultsPosition: function (a) { 596 a = "undefined" == typeof a ? !1 : a; var c = d("body"); let f = 0; var e = this.n("resultsDiv").css("position"); if (0 != d._fn.bodyTransformY() || "static" != c.css("position")) f = c.offset().top; 0 != d._fn.bodyTransformY() && "fixed" == e && (e = "absolute", this.n("resultsDiv").css("position", "absolute")); "fixed" == e && (f = 0); if ("fixed" == 597 e || "absolute" == e) if (1 == a || "visible" == this.n("resultsDiv").css("visibility")) { 598 a = this.n("search").offset(); e = 0; if (0 != d._fn.bodyTransformX() || "static" != c.css("position")) e = c.offset().left; if ("undefined" != typeof a) { 599 let l = 0; c = "phone" == b.deviceType() ? this.o.results.width_phone : "tablet" == b.deviceType() ? this.o.results.width_tablet : this.o.results.width; "auto" == c && (c = 240 > this.n("search").outerWidth() ? 240 : this.n("search").outerWidth()); this.n("resultsDiv").css("width", isNaN(c) ? c : c + "px"); "right" == this.o.resultsSnapTo ? 600 l = this.n("resultsDiv").outerWidth() - this.n("search").outerWidth() : "center" == this.o.resultsSnapTo && (l = 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 - l - e + "px" }) 601 } 602 } 603 }, fixSettingsPosition: function (a) { 604 a = "undefined" == typeof a ? !1 : a; var c = d("body"), f = 0, e = this.n("searchsettings").css("position"); if (0 != d._fn.bodyTransformY() || "static" != c.css("position")) f = c.offset().top; 0 != d._fn.bodyTransformY() && 605 "fixed" == e && (e = "absolute", this.n("searchsettings").css("position", "absolute")); "fixed" == e && (f = 0); if (1 == a || 0 != this.n("prosettings").data("opened")) { 606 a = 0; if (0 != d._fn.bodyTransformX() || "static" != c.css("position")) a = c.offset().left; this.fixSettingsWidth(); c = "none" != this.n("prosettings").css("display") ? this.n("prosettings") : this.n("promagnifier"); e = c.offset(); f = e.top + c.height() - 2 - f + "px"; c = "left" == this.o.settingsimagepos ? e.left : e.left + c.width() - this.n("searchsettings").width(); c = c - a + "px"; this.n("searchsettings").css({ 607 display: "block", 608 top: f, left: c 609 }) 610 } 611 }, fixSettingsWidth: function () { }, hideOnInvisibleBox: function () { if (1 == this.o.detectVisibility && !this.n("search").hasClass("hiddend") && (this.n("search").is(":hidden") || !this.n("search").is(":visible"))) { let a; null == (a = this.hideSettings) || a.call(this); this.hideResults() } } 612 }) 613})(WPD.dom); 614(function (d) { 615 d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 616 initMagnifierEvents: function () { 617 let b = this; b.n("promagnifier").on("click", function (a) { 618 b.keycode = a.keyCode || a.which; b.ktype = a.type; let c; null == (c = b.gaEvent) || c.call(b, "magnifier"); if (b.n("text").val().length >= b.o.charcount && 1 == b.o.redirectOnClick && "first_result" != b.o.trigger.click) return b.doRedirectToResults("click"), clearTimeout(void 0), !1; if ("ajax_search" != b.o.trigger.click && "first_result" != b.o.trigger.click) return !1; b.searchAbort(); clearTimeout(b.timeouts.search); 619 b.n("proloading").css("display", "none"); b.timeouts.search = setTimeout(function () { d("form", b.n("searchsettings")).serialize() + b.n("text").val().trim() != b.lastSuccesfulSearch || !b.resultsOpened && !b.usingLiveLoader ? b.search() : b.isRedirectToFirstResult() ? b.doRedirectToFirstResult() : b.n("proclose").css("display", "block") }, b.o.trigger.delay) 620 }) 621 } 622 }) 623})(WPD.dom); 624(function (d) { 625 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 626 initInputEvents: function () { 627 let a = this, c = !1, f = function () { 628 a.n("text").off("mousedown touchstart keydown", f); 629 if (!c) { 630 a._initFocusInput(); a.o.trigger.type && a._initSearchInput(); a._initEnterEvent(); a._initFormEvent(); let e; 631 null == (e = a.initAutocompleteEvent) || e.call(a); c = !0 632 } 633 }; 634 a.n("text").on("mousedown touchstart keydown", f, { passive: !0 }) }, _initFocusInput: function () { 635 let a = this; a.n("text").on("click", function (c) { 636 c.stopPropagation(); 637 c.stopImmediatePropagation(); d(this).trigger("focus"); let f; null == (f = a.gaEvent) || f.call(a, "focus"); if (d("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 638 }); a.n("text").on("focus input", function (c) { a.searching || ("" != d(this).val() ? a.n("proclose").css("display", "block") : a.n("proclose").css({ display: "none" })) }) 639 }, _initSearchInput: function () { 640 let a = this, c = a.n("text").val(); 641 a.n("text").on("input", function (f) { 642 a.keycode = f.keyCode || f.which; a.ktype = f.type; if (b.detectIE()) { if (c == a.n("text").val()) return !1; c = a.n("text").val() } a.updateHref(); if (a.n("text").val().length < a.o.charcount) { a.n("proloading").css("display", "none"); if (0 == a.o.blocking) { let e; null == (e = a.hideSettings) || e.call(a) } a.hideResults(!1); a.searchAbort(); clearTimeout(a.timeouts.search); return !1 } a.searchAbort(); clearTimeout(a.timeouts.search); a.n("proloading").css("display", "none"); a.timeouts.search = setTimeout(function () { 643 d("form", 644 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") 645 }, a.o.trigger.delay) 646 }) 647 }, _initEnterEvent: function () { 648 let a = this, c, f = !1; a.n("text").on("keyup", function (e) { 649 a.keycode = e.keyCode || e.which; a.ktype = e.type; if (13 == a.keycode) { clearTimeout(c); c = setTimeout(function () { f = !1 }, 300); if (f) return !1; f = !0 } e = d(this).hasClass("orig"); if (a.n("text").val().length >= 650 a.o.charcount && e && 13 == a.keycode) { let l; null == (l = a.gaEvent) || l.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 && (d("form", a.n("searchsettings")).serialize() + a.n("text").val().trim() != a.lastSuccesfulSearch || !a.resultsOpened && !a.usingLiveLoader) && a.search(); clearTimeout(a.timeouts.search) } 651 }) 652 }, _initFormEvent: function () { 653 let a = this; d(a.n("text").closest("form").get(0)).on("submit", function (c, f) { 654 c.preventDefault(); 655 b.isMobile() ? a.o.redirectOnEnter ? (c = new Event("keyup"), c.keyCode = c.which = 13, this.n("text").get(0).dispatchEvent(c)) : (a.search(), document.activeElement.blur()) : "undefined" != typeof f && "ajax" == f && a.search() 656 }) 657 } 658 }) 659})(WPD.dom); 660(function (d) { 661 d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 662 initNavigationEvents: function () { 663 let b = this, a = function (c) { 664 let f = c.keyCode || c.which; if (0 < d(".item", b.n("resultsDiv")).length && "none" != b.n("resultsDiv").css("display") && "vertical" == b.o.resultstype) { 665 if (40 == f || 38 == f) { 666 var e = b.n("resultsDiv").find(".item.hovered"); b.n("text").trigger("blur"); 0 == e.length ? b.n("resultsDiv").find(".item").first().addClass("hovered") : (40 == f && (0 == e.next(".item").length ? b.n("resultsDiv").find(".item").removeClass("hovered").first().addClass("hovered") : 667 e.removeClass("hovered").next(".item").addClass("hovered")), 38 == f && (0 == e.prev(".item").length ? b.n("resultsDiv").find(".item").removeClass("hovered").last().addClass("hovered") : e.removeClass("hovered").prev(".item").addClass("hovered"))); c.stopPropagation(); c.preventDefault(); b.n("resultsDiv").find(".resdrg .item.hovered").inViewPort(50, b.n("resultsDiv").get(0)) || (e = b.n("resultsDiv").find(".resdrg .item.hovered").get(0), null != e && "undefined" != typeof e.scrollIntoView && e.scrollIntoView({ 668 behavior: "smooth", 669 block: "start", inline: "nearest" 670 })) 671 } 13 == f && 0 < d(".item.hovered", b.n("resultsDiv")).length && (c.stopPropagation(), c.preventDefault(), d(".item.hovered a.asl_res_url", b.n("resultsDiv")).get(0).click()) 672 } 673 }; b.documentEventHandlers.push({ node: document, event: "keydown", handler: a }); d(document).on("keydown", a) 674 } 675 }) 676})(WPD.dom); 677(function (d) { 678 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 679 initOtherEvents: function () { 680 let a = this; if (b.isMobile() && b.detectIOS()) a.n("text").on("touchstart", function () { a.savedScrollTop = window.scrollY; a.savedContainerTop = a.n("search").offset().top }); a.n("proclose").on(a.clickTouchend, function (f) { 681 f.preventDefault(); f.stopImmediatePropagation(); a.n("text").val(""); a.n("textAutocomplete").val(""); a.hideResults(); a.n("text").trigger("focus"); a.n("proloading").css("display", 682 "none"); a.hideLoader(); a.searchAbort(); 0 < d(".asl_es_" + a.o.id).length ? (a.showLoader(), a.liveLoad(".asl_es_" + a.o.id, a.getCurrentLiveURL(), !1)) : a.o.resPage.useAjax && (a.showLoader(), a.liveLoad(a.o.resPage.selector, a.getRedirectURL())); a.n("text").get(0).focus() 683 }); if (b.isMobile()) { var c = function () { a.orientationChange(); setTimeout(function () { a.orientationChange() }, 600) }; a.documentEventHandlers.push({ node: window, event: "orientationchange", handler: c }); d(window).on("orientationchange", c) } else c = function () { a.resize() }, 684 a.documentEventHandlers.push({ node: window, event: "resize", handler: c }), d(window).on("resize", c, { passive: !0 }); c = function () { a.scrolling(!1) }; a.documentEventHandlers.push({ node: window, event: "scroll", handler: c }); d(window).on("scroll", c, { passive: !0 }); if (b.isMobile() && "" != a.o.mobile.menu_selector) d(a.o.mobile.menu_selector).on("touchend", function () { 685 let f = this; setTimeout(function () { 686 let e = d(f).find("input.orig"); e = 0 == e.length ? d(f).next().find("input.orig") : e; e = 0 == e.length ? d(f).parent().find("input.orig") : e; 687 e = 0 == e.length ? a.n("text") : e; a.n("search").inViewPort() && e.get(0).focus() 688 }, 300) 689 }); b.detectIOS() && b.isMobile() && b.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"), d("body").append("<style>#ajaxsearchlite" + a.o.rid + " input.orig::-webkit-input-placeholder{font-size: 16px !important;}</style>")) 690 }, orientationChange: function () { 691 this.detectAndFixFixedPositioning(); this.fixSettingsPosition(); 692 this.fixResultsPosition(); "isotopic" == this.o.resultstype && "visible" == this.n("resultsDiv").css("visibility") && (this.calculateIsotopeRows(), this.showPagination(!0), this.removeAnimation()) 693 }, resize: function () { this.detectAndFixFixedPositioning(); this.fixSettingsPosition(); this.fixResultsPosition(); "isotopic" == this.o.resultstype && "visible" == this.n("resultsDiv").css("visibility") && (this.calculateIsotopeRows(), this.showPagination(!0), this.removeAnimation()) }, scrolling: function (a) { 694 this.detectAndFixFixedPositioning(); 695 this.hideOnInvisibleBox(); this.fixSettingsPosition(a); this.fixResultsPosition(a) 696 }, initTryThisEvents: function () { let a = this; 0 < a.n("trythis").find("a").length && (a.n("trythis").find("a").on("click touchend", function (c) { c.preventDefault(); c.stopImmediatePropagation(); document.activeElement.blur(); a.n("textAutocomplete").val(""); a.n("text").val(d(this).html()); let f; null == (f = a.gaEvent) || f.call(a, "try_this"); a.searchWithCheck(80) }), a.n("trythis").css({ visibility: "visible" })) } 697 }) 698})(WPD.dom); 699(function (d) { 700 d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 701 initResultsEvents: function () { 702 let b = this; b.n("resultsDiv").css({ opacity: "0" }); let a = function (c) { let f = c.keyCode || c.which, e = c.type; 0 == d(c.target).closest(".asl_w").length && (b.hideOnInvisibleBox(), "click" == e && "touchend" == e && 3 == f || 0 == b.resultsOpened || 1 != b.o.
702closeOnDocClick || b.dragging || (b.hideLoader(), b.searchAbort(), b.hideResults())) }; b.documentEventHandlers.push({ node: document, event: b.clickTouchend, handler: a }); d(document).on(b.clickTouchend, 703 a); b.n("resultsDiv").on("click", ".results .item", function () { let c; null == (c = b.gaEvent) || c.call(b, "result_click", { result_title: d(this).find("a.asl_res_url").text(), result_url: d(this).find("a.asl_res_url").attr("href") }) }) 704 } 705 }) 706})(WPD.dom); (function (d) { d.fn.extend(window.WPD.ajaxsearchlite.plugin, { monitorTouchMove: function () { let b = this; b.dragging = !1; d("body").on("touchmove", function () { b.dragging = !0 }).on("touchstart", function () { b.dragging = !1 }) } }) })(WPD.dom); 707(function (d) { d.fn.extend(window.WPD.ajaxsearchlite.plugin, { initAutop: function () { let b = this; if ("disabled" == b.o.autop.state) return !1; let a = window.location.href; if (-1 < a.indexOf("asl_ls=") || -1 < a.indexOf("asl_ls&")) return !1; let c = b.o.autop.count; window.WPD.intervalUntilExecute(function () { b.isAutoP = !0; "phrase" == b.o.autop.state ? (b.o.is_results_page || b.n("text").val(b.o.autop.phrase), b.search(c)) : "latest" == b.o.autop.state ? b.search(c, 1) : b.search(c, 2) }, function () { return !window.ASL.css_async || "undefined" != typeof window.ASL.css_loaded }) } }) })(WPD.dom); 708(function (d) { let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { initEtc: function () { b.Hooks.addFilter("asl/init/etc", this) } }) })(WPD.dom); 709(function (d) { 710 let b = window.WPD.ajaxsearchlite, a = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 711 init: function (c, f) { 712 this.autopStartedTheSearch = this.isAutoP = this.triggerPrevState = this.searching = !1; this.autopData = {}; this.resultsOpened = this.settingsChanged = this.resultsInitialized = this.settingsInitialized = !1; this.postAuto = this.post = null; this.scroll = {}; this.savedContainerTop = this.savedScrollTop = 0; this.disableMobileScroll = !1; this.clickTouchend = "click touchend"; this.mouseupTouchend = 713 "mouseup touchend"; this.noUiSliders = []; this.timeouts = { compactBeforeOpen: null, compactAfterOpen: null, search: null, searchWithCheck: null }; this.eh = {}; this.documentEventHandlers = []; this.settScroll = null; this.currentPage = 1; this.sIsotope = this.isotopic = null; this.lastSuccesfulSearch = ""; this.lastSearchData = {}; this._no_animations = !1; this.results_num = this.call_num = 0; this.o = d.fn.extend({}, c); this.nodes = {}; this.nodes.search = d(f); a.isMobile() ? this.animOptions = this.o.animations.mob : this.animOptions = this.o.animations.pc; 714 this.initNodeVariables(); this.animationOpacity = 0 > this.animOptions.items.indexOf("In") ? "opacityOne" : "opacityZero"; 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; if (this.usingLiveLoader = this.o.resPage.useAjax && 0 < d(this.o.resPage.selector).length || 0 < d(".asl_es_" + this.o.id).length) this.o.trigger.type = this.o.resPage.trigger_type, this.o.trigger.facet = this.o.resPage.trigger_facet, 715 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"); this.monitorTouchMove(); this.initEvents(); this.initAutop(); this.initEtc(); b.firstIteration = !1; this.n("s").trigger("asl_init_search_bar", [this.o.id, this.o.iid], !0, !0); return this 716 }, n: function (c) { 717 if ("undefined" === typeof this.nodes[c]) switch (c) { 718 case "s": this.nodes[c] = this.nodes.search; break; case "container": this.nodes[c] = 719 this.nodes.search.closest(".asl_w_container"); break; case "searchsettings": this.nodes[c] = d(".asl_s", this.n("container")); break; case "resultsDiv": this.nodes[c] = d(".asl_r", this.n("container")); break; case "probox": this.nodes[c] = d(".probox", this.nodes.search); break; case "proinput": this.nodes[c] = d(".proinput", this.nodes.search); break; case "text": this.nodes[c] = d(".proinput input.orig", this.nodes.search); break; case "textAutocomplete": this.nodes[c] = d(".proinput input.autocomplete", this.nodes.search); break; 720 case "proloading": this.nodes[c] = d(".proloading", this.nodes.search); break; case "proclose": this.nodes[c] = d(".proclose", this.nodes.search); break; case "promagnifier": this.nodes[c] = d(".promagnifier", this.nodes.search); break; case "prosettings": this.nodes[c] = d(".prosettings", this.nodes.search); break; case "settingsAppend": this.nodes[c] = d("#wpdreams_asl_settings_" + this.o.id); break; case "resultsAppend": this.nodes[c] = d("#wpdreams_asl_results_" + this.o.id); break; case "trythis": this.nodes[c] = d("#asp-try-" + this.o.rid); 721 break; case "hiddenContainer": this.nodes[c] = d(".asl_hidden_data", this.n("container")); break; case "aspItemOverlay": this.nodes[c] = d(".asl_item_overlay", this.n("hiddenContainer")); break; case "showmore": this.nodes[c] = d(".showmore", this.n("resultsDiv")); break; case "items": this.nodes[c] = 0 < d(".item", this.n("resultsDiv")).length ? d(".item", this.n("resultsDiv")) : d(".photostack-flip", this.n("resultsDiv")); break; case "results": this.nodes[c] = d(".results", this.n("resultsDiv")); break; case "resdrg": this.nodes[c] = 722 d(".resdrg", this.n("resultsDiv")) 723 }return this.nodes[c] 724 }, 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() }
724, initEvents: function () { let c; null == (c = this.initSettingsSwitchEvents) || c.call(this); this.initOtherEvents(); this.initMagnifierEvents(); this.initInputEvents() } 725 }) 726})(WPD.dom); 727(function (d) { 728 let b = window.WPD.ajaxsearchlite.helpers; d.fn.extend(window.WPD.ajaxsearchlite.plugin, { 729 initResults: function () { if (!this.resultsInitialized) { this.initResultsBox(); this.initResultsEvents(); let a; null == (a = this.initNavigationEvents) || a.call(this) } }, initResultsBox: function () { 730 this.initResultsAnimations(); b.isMobile() && 1 == this.o.mobile.force_res_hover ? (this.o.resultsposition = "hover", this.nodes.resultsDiv = this.n("resultsDiv").clone(), d("body").append(this.nodes.resultsDiv), this.nodes.resultsDiv.css({ position: "absolute" }), 731 this.detectAndFixFixedPositioning()) : "hover" == this.o.resultsposition && 0 >= this.n("resultsAppend").length ? (this.nodes.resultsDiv = this.n("resultsDiv").clone(), d("body").append(this.n("resultsDiv"))) : (this.o.resultsposition = "block", this.n("resultsDiv").css({ position: "static" }), 0 < this.n("resultsAppend").length && (0 < this.n("resultsAppend").find(".asl_w").length ? this.nodes.resultsDiv = this.n("resultsAppend").find(".asl_w") : (this.nodes.resultsDiv = this.n("resultsDiv").clone(), this.nodes.resultsAppend.append(this.n("resultsDiv"))))); 732 this.nodes.showmore = d(".showmore", this.n("resultsDiv")); this.nodes.items = 0 < d(".item", this.n("resultsDiv")).length ? d(".item", this.n("resultsDiv")) : d(".photostack-flip", this.n("resultsDiv")); this.nodes.results = d(".results", this.n("resultsDiv")); this.nodes.resdrg = d(".resdrg", this.n("resultsDiv")); this.n("resultsDiv").get(0).id = this.n("resultsDiv").get(0).id.replace("__original__", ""); this.detectAndFixFixedPositioning(); this.resultsInitialized = !0 733 }, initResultsAnimations: function () { 734 this.resAnim = { 735 showClass: "asl_an_fadeInDrop", 736 showCSS: { visibility: "visible", display: "block", opacity: 1, "animation-duration": "300ms" }, hideClass: "asl_an_fadeOutDrop", hideCSS: { visibility: "hidden", opacity: 0, display: "none" }, duration: 300 737 }; this.n("resultsDiv").css({ "-webkit-animation-duration": "300ms", "animation-duration": "300ms" }) 738 } 739 }) 740})(WPD.dom); window.ASL = "undefined" !== typeof window.ASL ? window.ASL : {}; 741window.ASL.api = function () { 742 let d = function (c, f, e, l) { c = ASL.instances.get(c, f); return !1 !== c && c[e].apply(c, [l]) }, b = function (c, f, e) { if (!isNaN(parseFloat(f)) && isFinite(f)) return c = ASL.instances.get(c, f), !1 !== c && c[e].apply(c); c = ASL.instances.get(c); return !1 !== c && c.forEach(function (l) { l[f].apply(l, [e]) }) }, a = function (c, f) { if ("exists" == f) return ASL.instances.exist(c); c = ASL.instances.get(c); return !1 !== c && c.forEach(function (e) { e[f].apply(e) }) }; if (4 == arguments.length) return d.apply(this, arguments); if (3 == arguments.length) return b.apply(this, 743 arguments); if (2 == arguments.length) return a.apply(this, arguments); 0 == arguments.length && (console.log("Usage: ASL.api(id, [optional]instance, function, [optional]args);"), console.log("For more info: https://knowledgebase.ajaxsearchlite.com/other/javascript-api")) 744}; 745 746// asl-results-vertical 747(function (a) { 748 a.fn.extend(window.WPD.ajaxsearchlite.plugin, { 749 showVerticalResults: function () { 750 this.showResultsBox(); if (0 < this.n("items").length) { 751 let b = this.n("items").length < this.o.itemscount ? this.n("items").length : this.o.itemscount; b = 0 >= b ? 9999 : b; let h = a(".asl_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) { 752 let c = 0, d = 0, e = 0, g = 0; this.n("items").forEach(function () { 753 d += 754 a(this).outerHeight(!0); a(this).outerHeight(!0) > g && (g = a(this).outerHeight(!0)); c++ 755 }); e = g * b; e > d && (e = d); c = 1 > c ? 1 : c; d = d / c * b; 0 < h.length && h.forEach(function (f, k) { f = Array.prototype.slice.call(f.parentNode.children).indexOf(f); f - k - Math.floor(f / 3) < b && (e += a(this).outerHeight(!0)) }); this.n("results").css({ height: e + "px" }) 756 } this.n("items").last().addClass("asl_last_item"); this.n("results").find(".asl_group_header").prev(".item").addClass("asl_last_item"); 1 == this.o.highlight && a("div.item", this.n("resultsDiv")).highlight(this.n("text").val().split(" "), 757 { element: "span", className: "highlighted", wordsOnly: this.o.highlightWholewords }) 758 } this.resize(); 0 == this.n("items").length && this.n("results").css({ height: "auto" }); this.n("results").css({ overflowY: "auto" }); this.n("results").get(0).scrollTop = 0; this.fixResultsPosition(!0); this.searching = !1 759 } 760 }) 761})(WPD.dom); 762 763// asl-autocomplete 764(function (c) { 765 c.fn.extend(window.WPD.ajaxsearchlite.plugin, { 766 autocompleteGoogleOnly: function () { 767 let a = this, d = a.n("text").val(); if ("" == a.n("text").val()) a.n("textAutocomplete").val(""); else { 768 var e = a.n("textAutocomplete").val(); if ("" == e || 0 != e.indexOf(d)) { 769 a.n("textAutocomplete").val(""); var f = a.o.autocomplete.lang;["wpml_lang", "polylang_lang", "qtranslate_lang"].forEach(function (b) { 770 0 < c('input[name="' + b + '"]', a.n("searchsettings")).length && 1 < c('input[name="' + b + '"]', a.n("searchsettings")).val().length && (f = c('input[name="' + 771 b + '"]', a.n("searchsettings")).val()) 772 }); a.n("text").val().length >= a.o.autocomplete.trigger_charcount && c.fn.ajax({ url: "https://clients1.google.com/complete/search", cors: "no-cors", data: { q: d, hl
772: f, nolabels: "t", client: "hp", ds: "" }, success: function (b) { 0 < b[1].length && (b = b[1][0][0].replace(/(<([^>]+)>)/ig, ""), b = c("<textarea />").html(b).text(), b = b.substr(d.length), a.n("textAutocomplete").val(d + b), a.fixAutocompleteScrollLeft()) } }) 773 } 774 } 775 }, fixAutocompleteScrollLeft: function () { 776 this.n("textAutocomplete").get(0).scrollLeft = 777 this.n("text").get(0).scrollLeft 778 } 779 }) 780})(WPD.dom); 781(function (c) { 782 c.fn.extend(window.WPD.ajaxsearchlite.plugin, { 783 initAutocompleteEvent: function () { 784 // Removed google autocomplete code 785 } 786 }) 787})(WPD.dom); 788 789// asl-load 790WPD.dom._fn.plugin("ajaxsearchlite", window.WPD.ajaxsearchlite.plugin); 791 792// asl-wrapper 793window._ASL_load = function () { 794 let d = WPD.dom; window.ASL.instances = { 795 instances: [], get: function (b, a) { this.clean(); if ("undefined" === typeof b || 0 == b) return this.instances; if ("undefined" === typeof a) { a = []; for (var c = 0; c < this.instances.length; c++)this.instances[c].o.id == b && a.push(this.instances[c]); return 0 < a.length ? a : !1 } for (c = 0; c < this.instances.length; c++)if (this.instances[c].o.id == b && this.instances[c].o.iid == a) return this.instances[c]; return !1 }, set: function (b) { 796 if (this.exist(b.o.id, b.o.iid)) return !1; this.instances.push(b); 797 return !0 798 }, exist: function (b, a) { this.clean(); for (let c = 0; c < this.instances.length; c++)if (this.instances[c].o.id == b && ("undefined" === typeof a || this.instances[c].o.iid == a)) return !0; return !1 }, clean: function () { let b = [], a = this; this.instances.forEach(function (c, e) { 0 == d(".asl_m_" + c.o.rid).length && b.push(e) }); b.forEach(function (c) { "undefined" !== typeof a.instances[c] && (a.instances[c].destroy(), a.instances.splice(c, 1)) }) }, destroy: function (b, a) { 799 let c = this.get(b, a); if (!1 !== c) if (Array.isArray(c)) c.forEach(function (e) { e.destroy() }), 800 this.instances = []; else { let e = 0; this.instances.forEach(function (h, f) { h.o.id == b && h.o.iid == a && (e = f) }); c.destroy(); this.instances.splice(e, 1) } 801 } 802 }; window.ASL.initialized = !1; window.ASL.initializeSearchByID = function (b) { 803 let a = ASL.getInstances(); if ("undefined" !== typeof b && "object" != typeof b) if ("undefined" !== typeof a[b]) { let e = []; e[b] = a[b]; a = e } else return !1; let c = 0; a.forEach(function (e, h) { 804 d(".asl_w_container_" + h).forEach(function (f) { 805 var g = d(f).parent(); g.is("a") && (f = document.createElement("div"), g = g.get(0), 806 f.innerHTML = g.innerHTML, g.replaceWith(f)) 807 }); d(".asl_m_" + h).forEach(function (f) { let g = d(f); if ("undefined" != typeof g.get(0).hasAsl) return ++c, !0; f.hasAsl = !0; ++c; return g.ajaxsearchlite(e) }) 808 }) 809 }; window.ASL.getInstances = function () { 810 if ("undefined" !== typeof window.ASL_INSTANCES) return window.ASL_INSTANCES; let b = []; d(".asl_init_data").forEach(function (a) { 811 if ("undefined" === typeof a.dataset.asldata) return !0; let c = WPD.Base64.decode(a.dataset.asldata); if ("undefined" === typeof c || "" == c) return !0; b[a.dataset.aslId] = 812 JSON.parse(c) 813 }); return b 814 }; window.ASL.initialize = function (b) { 815 if ("undefined" == typeof ASL.version) return !1; if (window.IntersectionObserver) if (ASL.script_async_load || ASL.init_only_in_viewport) { if (b = document.querySelectorAll(".asl_w_container"), b.length) { let a = new IntersectionObserver(function (c) { c.forEach(function (e) { e.isIntersecting && (ASL.initializeSearchByID(e.target.dataset.id), a.unobserve(e.target)) }) }); b.forEach(function (c) { a.observe(c) }) } } else ASL.initializeSearchByID(b); else ASL.initializeSearchByID(b); 816 ASL.initializeMutateDetector(); ASL.initializeHighlight(); ASL.initializeOtherEvents(); ASL.initialized = !0 817 }; window.ASL.initializeHighlight = function () { 818 if (this.highlight.enabled) return this.highlight.data.forEach(function (b) { 819 var a = "" != b.selector && 0 < d(b.selector).length ? b.selector : "article"; a = 0 < d(a).length ? a : "body"; var c = new URLSearchParams(location.search); c = c.get("s") || c.get("asl_highlight"); d(a).unhighlight({ className: "asl_single_highlighted" }); null !== c && "" != c.trim() && (a = 0 < d(a).length ? a : "body", d(a).highlight(c.trim().split(" "), 820 { element: "span", className: "asl_single_highlighted", wordsOnly: b.whole, excludeParents: ".asl_w, .asl-try" }), a = d(".asl_single_highlighted"), b.scroll && 0 < a.length && (a = a.offset().top - 120, c = d("#wpadminbar"), 0 < c.length && (a -= c.height()), a += b.scroll_offset, a = 0 > a ? 0 : a, d("html").animate({ scrollTop: a }, 500))) 821 }), !1 822 }; window.ASL.initializeOtherEvents = function () { 823 let b, a = this; d("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]", 824 function () { clearTimeout(b); b = setTimeout(function () { a.initializeSearchByID() }, 300) }); if ("undefined" != typeof jQuery) jQuery(document).on("elementor/popup/show", function () { setTimeout(function () { a.initializeSearchByID() }, 10) }) 825 }; window.ASL.initializeMutateDetector = function () { let b; "undefined" != typeof ASL.detect_ajax && 1 == ASL.detect_ajax && (new MutationObserver(function () { clearTimeout(b); b = setTimeout(function () { ASL.initializeSearchByID() }, 500) })).observe(document.querySelector("body"), { subtree: !0, childList: !0 }) }; 826 window.ASL.ready = function () { if ("complete" === document.readyState || "loaded" === document.readyState || "interactive" === document.readyState) this.initialize(); else d(document).on("DOMContentLoaded", this.initialize) }; window.ASL.loadScriptStack = function (b) { let a; 0 < b.length && (a = document.createElement("script"), a.src = b.shift().src, a.onload = function () { 0 < b.length ? window.ASL.loadScriptStack(b) : window.ASL.ready() }, document.body.appendChild(a)) }; window.ASL.init = function () { 827 ASL.script_async_load ? window.ASL.loadScriptStack(ASL.additional_scripts) : 828 "undefined" !== typeof WPD.ajaxsearchlite && window.ASL.ready() 829 }; window.WPD.intervalUntilExecute(window.ASL.init, function () { return "undefined" != typeof window.ASL.version && "undefined" != d.fn.ajaxsearchlite }) 830}; (function () { "undefined" != typeof WPD && "undefined" != typeof WPD.dom ? window._ASL_load() : document.addEventListener("wpd-dom-core-loaded", window._ASL_load) })(); 831 832 833 834 835 836
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.