!function(e){if(e){var t="fst-popup-search",n={enterIcon:' \x3c!-- Generator: Adobe Illustrator 24.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e ',closeIcon:''},a={wrapper:t+"-wrapper",firstTab:t+"-first-tabindex",lastTab:t+"-last-tabindex",close:t+"-close",clear:t+"-clear",form:t+"-form",label:t+"-label",overlay:t+"-overlay",btnSubmit:t+"-submit",btnWrapper:t+"-btns",active:t+"-active"},o={placeholderText:"Search...",labelText:"What are you looking for?",elementNotExit:"provided element not exist on DOM"},c={action:"",method:"get",closeIcon:n.closeIcon,clearIcon:n.clearIcon,enterIcon:n.enterIcon,placeholderText:o.placeholderText,labelText:o.labelText};e.fn.fstPopupSearch=function(n){if(0===e(this).length)return console.info(o.elementNotExist),this;e.data(document.body,t)||(e.data(document.body,t,!0),e.fn.fstPopupSearch.settings=e.extend({},c,n),e.fn.fstPopupSearch.init(this))},e.fn.fstPopupSearch.init=function(t){var o,c=this.settings,l=e("body");function s(){l.addClass(a.active),setTimeout(function(){e(`.${a.wrapper} input`).focus()},500)}function r(){l.removeClass(a.active),e(t).focus()}o=function(e){var t=e.labelText?"

"+e.labelText+"

":"";return'
"+t+'
'}({action:c.action,method:c.method,placeholderText:c.placeholderText,labelText:c.labelText}),!e(`.${a.wrapper}`).length&&l.append(o),e(t).on("click",s),e(`.${a.close}`).on("click",r),e(`.${a.clear}`).on("click",function(t){t.preventDefault(),e("body").hasClass(a.active)&&e(`.${a.wrapper} input`).val("")}),e(document).on("keydown",function(e){27===e.keyCode&&r()}),this.enableAccessibility()},e.fn.fstPopupSearch.enableAccessibility=function(){e(document).on("focus","."+a.firstTab,function(t){e(t.target).parents("."+a.wrapper).find(`.${a.btnSubmit}`).focus()}),e(document).on("focus","."+a.lastTab,function(t){e(t.target).parents("."+a.wrapper).find(`.${a.close}`).focus()})}}}(window.jQuery||window.$);