site_oueb_2/wp-content/themes/oceanwp/assets/js/drop-down-search.min.js

1 line
7.4 KiB
JavaScript
Raw Normal View History

2022-11-22 20:23:31 +01:00
!function o(n,s,l){function u(t,e){if(!s[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(a)return a(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=s[t]={exports:{}},n[t][0].call(r.exports,function(e){return u(n[t][1][e]||e)},r,r.exports,o,n,s,l)}return s[t].exports}for(var a="function"==typeof require&&require,e=0;e<l.length;e++)u(l[e]);return u}({1:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.options=void 0;var o=oceanwpLocalize;r.options=o},{}],2:[function(e,t,r){"use strict";var o=e("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(e("@babel/runtime/helpers/classCallCheck")),s=o(e("@babel/runtime/helpers/defineProperty"));r.default=function e(){(0,n.default)(this,e),(0,s.default)(this,"focus",function(e,t){var r=1e3*parseFloat(getComputedStyle(e).transitionDuration.replace("s",""));(r=r||600)&&setTimeout(function(){e.querySelector(t).focus()},r)})}},{"@babel/runtime/helpers/classCallCheck":7,"@babel/runtime/helpers/defineProperty":11,"@babel/runtime/helpers/interopRequireDefault":14}],3:[function(e,t,r){"use strict";var o=e("@babel/runtime/helpers/interopRequireDefault"),n=o(e("@babel/runtime/helpers/classCallCheck")),s=o(e("@babel/runtime/helpers/assertThisInitialized")),l=o(e("@babel/runtime/helpers/inherits")),u=o(e("@babel/runtime/helpers/possibleConstructorReturn")),a=o(e("@babel/runtime/helpers/getPrototypeOf")),i=o(e("@babel/runtime/helpers/classPrivateFieldSet")),p=o(e("@babel/runtime/helpers/classPrivateFieldGet")),f=e("../../constants"),e=o(e("./base"));function c(r){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var e,t=(0,a.default)(r);return t=o?(e=(0,a.default)(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),(0,u.default)(this,t)}}var d=new WeakMap,b=new WeakMap,x=new WeakMap,h=new WeakMap,y=new WeakMap,e=function(e){(0,l.default)(o,e);var t=c(o);function o(){var r;return(0,n.default)(this,o),r=t.call(this),d.set((0,s.default)(r),{writable:!0,value:void 0}),b.set((0,s.default)(r),{writable:!0,value:function(){(0,i.default)((0,s.default)(r),d,{toggleSearchBtn:document.querySelector("a.search-dropdown-toggle"),form:document.querySelector("#searchform-dropdown")})}}),x.set((0,s.default)(r),{writable:!0,value:function(){var e;null!==(e=(0,p.default)((0,s.default)(r),d).toggleSearchBtn)&&void 0!==e&&e.addEventListener("click",(0,p.default)((0,s.default)(r),h)),document.addEventListener("click",(0,p.default)((0,s.default)(r),y))}}),h.set((0,s.default)(r),{writable:!0,value:function(e){e.preventDefault(),e.stopPropagation();var t=(0,p.default)((0,s.default)(r),d),e=t.toggleSearchBtn,t=t.form;e.parentNode.classList.toggle("active"),t.classList.toggle("show"),r.focus(t,"input.field")}}),y.set((0,s.default)(r),{writable:!0,value:function(e){e.target.closest("#searchform-dropdown.show")||(null!==(e=(0,p.default)((0,s.default)(r),d).form)&&void 0!==e&&e.classList.remove("show"),null===(e=(0,p.default)((0,s.default)(r),d).toggleSearchBtn)||void 0===e||null!==(e=e.parentNode)&&void 0!==e&&e.classList.remove("active"))}}),"drop_down"!==f.options.menuSearchStyle?(0,u.default)(r):((0,p.default)((0,s.default)(r),b).call((0,s.default)(r)),(0,p.default)((0,s.default)(r),x).call((0,s.default)(r)),r)}return o}(e.default);window.oceanwp=window.oceanwp||{},oceanwp.dropDownSearch=new e},{"../../constants":1,"./base":2,"@babel/runtime/helpers/assertThisInitialized":4,"@babel/runtime/helpers/classCallCheck":7,"@babel/runtime/helpers/classPrivateFieldGet":9,"@babel/runtime/helpers/classPrivateFieldSet":10,"@babel/runtime/helpers/getPrototypeOf":12,"@babel/runtime/helpers/inherits":13,"@babel/runtime/helpers/interopRequireDefault":14,"@babel/runtime/helpers/possibleConstructorReturn":15}],4:[function(e