site_oueb_2/wp-content/themes/oceanwp/assets/js/header-replace-search.min.js

1 line
9.2 KiB
JavaScript
Raw Permalink Normal View History

2022-11-22 20:23:31 +01:00
!function o(l,a,s){function u(t,e){if(!a[t]){if(!l[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(n)return n(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=a[t]={exports:{}},l[t][0].call(r.exports,function(e){return u(l[t][1][e]||e)},r,r.exports,o,l,a,s)}return a[t].exports}for(var n="function"==typeof require&&require,e=0;e<s.length;e++)u(s[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 l=o(e("@babel/runtime/helpers/classCallCheck")),a=o(e("@babel/runtime/helpers/defineProperty"));r.default=function e(){(0,l.default)(this,e),(0,a.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"),l=o(e("@babel/runtime/helpers/classCallCheck")),a=o(e("@babel/runtime/helpers/assertThisInitialized")),s=o(e("@babel/runtime/helpers/inherits")),u=o(e("@babel/runtime/helpers/possibleConstructorReturn")),n=o(e("@babel/runtime/helpers/getPrototypeOf")),i=o(e("@babel/runtime/helpers/classPrivateFieldSet")),f=o(e("@babel/runtime/helpers/classPrivateFieldGet")),c=e("../../constants"),e=o(e("./base"));function d(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,n.default)(r);return t=o?(e=(0,n.default)(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),(0,u.default)(this,t)}}var p=new WeakMap,h=new WeakMap,b=new WeakMap,x=new WeakMap,m=new WeakMap,v=new WeakMap,y=new WeakMap,e=function(e){(0,s.default)(o,e);var t=d(o);function o(){var r;return(0,l.default)(this,o),r=t.call(this),p.set((0,a.default)(r),{writable:!0,value:void 0}),h.set((0,a.default)(r),{writable:!0,value:function(){(0,i.default)((0,a.default)(r),p,{toggleSearchBtn:document.querySelector("a.search-header-replace-toggle"),closeBtn:document.querySelector("#searchform-header-replace-close"),form:document.querySelector("#searchform-header-replace"),topLeftSide:document.querySelector("#site-header.top-header .header-top .left"),topRightSide:document.querySelector("#site-header.top-header .header-top .right"),nav:document.querySelector("#site-header.header-replace #site-navigation"),menu:document.querySelector(".main-menu"),header:document.querySelector("#site-header")})}}),b.set((0,a.default)(r),{writable:!0,value:function(){var e;null!==(e=(0,f.default)((0,a.default)(r),p).toggleSearchBtn)&&void 0!==e&&e.addEventListener("click",(0,f.default)((0,a.default)(r),x)),null!==(e=(0,f.default)((0,a.default)(r),p).closeBtn)&&void 0!==e&&e.addEventListener("click",(0,f.default)((0,a.default)(r),m)),document.addEventListener("click",(0,f.default)((0,a.default)(r),v))}}),x.set((0,a.default)(r),{writable:!0,value:function(e){e.preventDefault(),e.stopPropagation();var t=(0,f.default)((0,a.default)(r),p).form;t.classList.toggle("show"),(0,f.default)((0,a.default)(r),y).call((0,a.default)(r))?((0,f.default)((0,a.default)(r),p).topLeftSide.classList.toggle("hide"),(0,f.default)((0,a.default)(r),p).topRightSide.classList.toggle("hide")):((0,f.default)((0,a.default)(r),p).nav.classList.contains("hide")||((0,f.default)((0,a.default)(r),p).menu.style.minWidth="370px"),(0,f.default)((0,a.default)(r),p).nav.classList.toggle("hide"),t.style.maxWidth=(null===(e=document.querySelector("#site-navigation > ul.dropdown-menu"))||void 0===e?void 0:e.offsetWidth)+60+"px"),r.focus(t,'inpu