OwlCyberSecurity - MANAGER
Edit File: apbct-public-bundle.min.js
function ownKeys(t,e){var o,n=Object.keys(t);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(t),e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,o)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(o),!0).forEach(function(e){_defineProperty(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ownKeys(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function _callSuper(e,t,o){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,o||[],_getPrototypeOf(e).constructor):t.apply(e,o))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createForOfIteratorHelper(e,t){var o,n,c,a,i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(i)return c=!(n=!0),{s:function(){i=i.call(e)},n:function(){var e=i.next();return n=e.done,e},e:function(e){c=!0,o=e},f:function(){try{n||null==i.return||i.return()}finally{if(c)throw o}}};if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var o;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(o="Object"===(o={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:o)||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,o){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0===o)return("string"===t?String:Number)(e);o=o.call(e,t||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var ApbctCore=(()=>_createClass(function e(t){_classCallCheck(this,e),_defineProperty(this,"ajax_parameters",{}),_defineProperty(this,"restParameters",{}),_defineProperty(this,"selector",null),_defineProperty(this,"elements",[]),_defineProperty(this,"eventCallback",void 0),_defineProperty(this,"eventSelector",void 0),_defineProperty(this,"event",void 0),this.select(t)},[{key:"select",value:function(e){return e instanceof HTMLCollection?(this.selector=null,this.elements=[],this.elements=Array.prototype.slice.call(e)):"object"===_typeof(e)?(this.selector=null,this.elements=[],this.elements[0]=e):"string"==typeof e?(this.selector=e,this.elements=Array.prototype.slice.call(document.querySelectorAll(e))):this.deselect(),this}},{key:"addElement",value:function(e){"object"===_typeof(e)?this.elements.push(e):"string"==typeof e?(this.selector=e,this.elements=Array.prototype.slice.call(document.querySelectorAll(e))):this.deselect()}},{key:"push",value:function(e){this.elements.push(e)}},{key:"reduce",value:function(){this.elements=this.elements.slice(0,-1)}},{key:"deselect",value:function(){this.elements=[]}},{key:"css",value:function(e,t){if(t=t||!1,"object"===_typeof(e)){for(var o in e)if(Object.hasOwn(e,o))for(var n=o.replace(/([-_][a-z])/g,function(e){return e.toUpperCase().replace("-","").replace("_","")}),c=0;c<this.elements.length;c++)this.elements[c].style[n]=e[o];return this}var a;if("string"==typeof e)return void 0!==(a=getComputedStyle(this.elements[0])[e])&&!t&&(a=a.replace(/(\d)(em|pt|%|px){1,2}$/,"$1"),Number(a)==a)?Number(a):a}},{key:"hide",value:function(){this.prop("prev-display",this.css("display")),this.css({display:"none"})}},{key:"show",value:function(){this.css({display:this.prop("prev-display")})}},{key:"addClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.add(className)}},{key:"removeClass",value:function(){for(var e=0;e<this.elements.length;e++)this.elements[e].classList.remove(className)}},{key:"toggleClass",value:function(e){for(var t=0;t<this.elements.length;t++)this.elements[t].classList.toggle(e)}},{key:"ajax",value:function(e){return this.ajax_parameters=e,new ApbctAjax(e)}},{key:"rest",value:function(e){return this.restParameters=e,new ApbctRest(e)}},{key:"on",value:function(){this.event=arguments.length<=0?void 0:arguments[0],this.eventCallback=(arguments.length<=2?void 0:arguments[2])||(arguments.length<=1?void 0:arguments[1]),this.eventSelector="string"==typeof(arguments.length<=1?void 0:arguments[1])?arguments.length<=1?void 0:arguments[1]:null;for(var e=0;e<this.elements.length;e++)this.elements[e].addEventListener(this.event,null!==this.eventSelector?this.onChecker.bind(this):this.eventCallback)}},{key:"onChecker",value:function(e){if(e.target===document.querySelector(this.eventSelector))return e.stopPropagation(),this.eventCallback(e)}},{key:"ready",value:function(e){document.addEventListener("DOMContentLoaded",e)}},{key:"change",value:function(e){this.on("change",e)}},{key:"attr",value:function(e){for(var t=[],o=0;o<this.elements.length;o++)void 0!==this.elements[o][e]?t.push(this.elements[o][e]):t.push(this.elements[o].getAttribute(e));return 1===t.length?t[0]:t}},{key:"prop",value:function(e,t){if(void 0!==t){for(var o=0;o<this.elements.length;o++)this.elements[o][e]=t;return this}for(var n=[],c=0;c<this.elements.length;c++)n.push(this.elements[c][e]);return 1===n.length?n[0]:n}},{key:"html",value:function(e){return void 0!==e?this.prop("innerHTML",e):this.prop("innerHTML")}},{key:"val",value:function(e){return void 0!==e?this.prop("value",e):this.prop("value")}},{key:"data",value:function(e,t){return void 0!==t?this.prop("apbct-data",e,t):this.prop("apbct-data")}},{key:"is",value:function(e){var t,o=!1,n=_createForOfIteratorHelper(this.elements);try{for(n.s();!(t=n.n()).done;)var c=t.value,o=o||this.isElem(c,e)}catch(e){n.e(e)}finally{n.f()}return o}},{key:"isElem",value:function(e,t){var o=!1;return"function"==typeof t&&(o=o||t.call(this,e)),o="string"==typeof t?t.match(/^[a-z]/)&&(e=>(e=document.createElement(e).constructor,!Boolean(~[HTMLElement,HTMLUnknownElement].indexOf(e))))(t)?o||e.tagName.toLowerCase()===t.toLowerCase():t.match(/^[a-z]/)?o||Boolean(e[t]):o||(null!==this.selector?null!==document.querySelector(this.selector+t):this.isWithoutSelector(e,t)):o}},{key:"isWithoutSelector",value:function(e,t){var o,n=!1,c=_createForOfIteratorHelper(document.querySelectorAll(t));try{for(c.s();!(o=c.n()).done;)n=n||e===o.value}catch(e){c.e(e)}finally{c.f()}return n}},{key:"filter",value:function(e){this.selector=null;for(var t=this.elements.length-1;0<=t;t--)this.isElem(this.elements[t],e)||this.elements.splice(Number(t),1);return this}},{key:"parent",value:function(e){return this.select(this.elements[0].parentElement),void 0===e||this.is(e)||this.deselect(),this}},{key:"parents",value:function(e){for(this.select(this.elements[0]);null!==this.elements[this.elements.length-1].parentElement;)this.push(this.elements[this.elements.length-1].parentElement);return this.elements.splice(0,1),void 0!==e&&this.filter(e),this}},{key:"children",value:function(e){return this.select(this.elements[0].children),void 0!==e&&this.filter(e),this}},{key:"siblings",value:function(e){var t=this.elements[0];return this.parent(),this.children(e),this.elements.splice(this.elements.indexOf(t),1),this}},{key:"remove",value:function(){var e,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(e=t.n()).done;)e.value.remove()}catch(e){t.e(e)}finally{t.f()}}},{key:"after",value:function(e){var t,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.after(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"append",value:function(e){var t,o=_createForOfIteratorHelper(this.elements);try{for(o.s();!(t=o.n()).done;)t.value.append(e)}catch(e){o.e(e)}finally{o.f()}}},{key:"fadeIn",value:function(n){var c,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(c=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity+(new Date-o)/n,o=+new Date,+t.style.opacity<1&&(window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16))}var t=c.value,o=(t.style.opacity=0,t.style.display="block",+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}},{key:"fadeOut",value:function(n){var c,t=_createForOfIteratorHelper(this.elements);try{for(t.s();!(c=t.n()).done;)(()=>{function e(){t.style.opacity=+t.style.opacity-(new Date-o)/n,o=+new Date,0<+t.style.opacity?window.requestAnimationFrame&&requestAnimationFrame(e)||setTimeout(e,16):t.style.display="none"}var t=c.value,o=(t.style.opacity=1,+new Date);e()})()}catch(e){t.e(e)}finally{t.f()}}}]))();function ctProcessError(e,t){var o={},e=(e&&e.message?o.err={msg:e.message,file:e.fileName||!1,ln:e.lineNumber||lineNo||!1,col:e.columnNumber||columnNo||!1,stacktrace:e.stack||!1,cause:!!t&&JSON.stringify(t),errorObj:error||!1}:(o.err={msg:e},t&&(o.err.file=t)),o.url=window.location.href,o.userAgent=window.navigator.userAgent,"ct_js_errors");null===(n=localStorage.getItem(e))&&(n="[]");for(var n=JSON.parse(n),c=0;c<n.length;c++)if(n[c].err.msg===o.err.msg)return;n.push(o),localStorage.setItem(e,JSON.stringify(n))}function selectActualNonce(){var e="";return ctPublicFunctions.hasOwnProperty("_fresh_nonce")&&"string"==typeof ctPublicFunctions._fresh_nonce&&0<ctPublicFunctions._fresh_nonce.length?ctPublicFunctions._fresh_nonce:("admin_ajax"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_ajax_nonce")&&"string"==typeof ctPublicFunctions._ajax_nonce&&0<ctPublicFunctions._ajax_nonce.length&&(e=ctPublicFunctions._ajax_nonce),"rest"===ctPublicFunctions.data__ajax_type&&ctPublicFunctions.hasOwnProperty("_rest_nonce")&&"string"==typeof ctPublicFunctions._rest_nonce&&0<ctPublicFunctions._rest_nonce.length?ctPublicFunctions._rest_nonce:e)}function apbct(e){return(new ApbctCore).select(e)}1===Math.floor(100*Math.random())&&(window.onerror=function(e,t){for(var o=["apbct","ctPublic"],n=o.length;n--;)-1!==e.indexOf(o[n])&&ctProcessError(e,t);return!1});var ApbctXhr=(()=>{function n(e){for(var t in _classCallCheck(this,n),_defineProperty(this,"xhr",new XMLHttpRequest),_defineProperty(this,"method","POST"),_defineProperty(this,"url",""),_defineProperty(this,"async",!0),_defineProperty(this,"user",null),_defineProperty(this,"password",null),_defineProperty(this,"data",{}),_defineProperty(this,"button",null),_defineProperty(this,"spinner",null),_defineProperty(this,"progressbar",null),_defineProperty(this,"context",this),_defineProperty(this,"callback",null),_defineProperty(this,"onErrorCallback",null),_defineProperty(this,"responseType","json"),_defineProperty(this,"headers",{}),_defineProperty(this,"timeout",15e3),_defineProperty(this,"methods_to_convert_data_to_URL",["GET","HEAD"]),_defineProperty(this,"body",null),_defineProperty(this,"http_code",0),_defineProperty(this,"status_text",""),e)void 0!==this[t]&&(this[t]=e[t]);if(this.prepare(),Object.keys(this.data).length&&(this.deleteDoubleJSONEncoding(this.data),this.convertData()),!this.url)return console.log("%cXHR%c not URL provided","color: red; font-weight: bold;","color: grey; font-weight: normal;"),!1;this.xhr.open(this.method,this.url,this.async,this.user,this.password),this.setHeaders(),this.xhr.responseType=this.responseType,this.xhr.timeout=this.timeout,this.xhr.onreadystatechange=function(){this.isWpNonceError()?this.getFreshNonceAndRerunXHR(e):this.onReadyStateChange()}.bind(this),this.xhr.onload=function(){this.onLoad()}.bind(this),this.xhr.onprogress=function(e){this.onProgress(e)}.bind(this),this.xhr.onerror=function(){this.onError()}.bind(this),this.xhr.ontimeout=function(){this.onTimeout()}.bind(this),this.xhr.send(this.body)}return _createClass(n,[{key:"prepare",value:function(){this.button&&(this.button.setAttribute("disabled","disabled"),this.button.style.cursor="not-allowed"),this.spinner&&(this.spinner.style.display="inline")}},{key:"complete",value:function(){this.http_code=this.xhr.status,this.status_text=this.xhr.statusText,this.button&&(this.button.removeAttribute("disabled"),this.button.style.cursor="auto"),this.spinner&&(this.spinner.style.display="none"),this.progressbar&&this.progressbar.fadeOut("slow")}},{key:"onReadyStateChange",value:function(){null!==this.on_ready_state_change&&"function"==typeof this.on_ready_state_change&&this.on_ready_state_change()}},{key:"onProgress",value:function(e){null!==this.on_progress&&"function"==typeof this.on_progress&&this.on_progress()}},{key:"onError",value:function(){console.log("error"),this.complete(),this.error(this.http_code,this.status_text),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback(this.status_text)}},{key:"onTimeout",value:function(){this.complete(),this.error(0,"timeout"),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback("Timeout")}},{key:"onLoad",value:function(){if(this.complete(),"json"===this.responseType){if(null===this.xhr.response)return this.error(this.http_code,this.status_text,"No response"),!1;if(void 0!==this.xhr.response.error)return this.error(this.http_code,this.status_text,this.xhr.response.error),!1}null!==this.callback&&"function"==typeof this.callback&&this.callback.call(this.context,this.xhr.response,this.data)}},{key:"isWpNonceError",value:function(){var e=!1,t=!1;return 4==this.xhr.readyState&&(e="object"===_typeof(this.xhr.response)&&null!==this.xhr.response&&this.xhr.response.hasOwnProperty("data")&&this.xhr.response.data.hasOwnProperty("status")&&403===this.xhr.response.data.status,t="-1"===this.xhr.response&&403===this.xhr.status),e||t}},{key:"getFreshNonceAndRerunXHR",value:function(e){var t,o="";e.hasOwnProperty("headers")&&e.headers.hasOwnProperty("X-WP-Nonce")&&(o=e.headers["X-WP-Nonce"]),""!==(o=e.hasOwnProperty("data")&&e.data.hasOwnProperty("_ajax_nonce")?e.data._ajax_nonce:o)&&((t={method:"POST"}).data={spbc_remote_call_action:"get_fresh_wpnonce",plugin_name:"antispam",nonce_prev:o,initial_request_params:e},t.notJson=!0,t.url=ctPublicFunctions.host_url,t.callback=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var n=t[0],c=!1;(c=void 0!==t[1]&&t[1].hasOwnProperty("initial_request_params")?t[1].initial_request_params:c)&&n.hasOwnProperty("wpnonce")&&(ctPublicFunctions._fresh_nonce=n.wpnonce,"rest"===ctPublicFunctions.data__ajax_type?(new ApbctCore).rest(c):(new ApbctCore).ajax(c))},new n(t))}},{key:"error",value:function(e,t,o){var n="";"timeout"===t?n+="Server response timeout":200===e?"parsererror"===t?n+="Unexpected response from server. See console for details.":(n+="Unexpected error. Status: "+t+".",void 0!==o&&(n+=" Additional error info: "+o)):n+=500===e?"Internal server error.":"Unexpected response code:"+e,this.errorOutput(n),null!==this.onErrorCallback&&"function"==typeof this.onErrorCallback&&this.onErrorCallback(this.status_text)}},{key:"errorOutput",value:function(e){console.log("%c ctXHR error: %c"+e,"color: red;","color: grey;")}},{key:"setHeaders",value:function(){for(var e in this.headers)void 0!==this.headers[e]&&this.xhr.setRequestHeader(e,this.headers[e])}},{key:"convertData",value:function(){return~this.methods_to_convert_data_to_URL.indexOf(this.method)?this.convertDataToURL():this.convertDataToBody()}},{key:"convertDataToURL",value:function(){var e=new URLSearchParams(this.data).toString(),t=this.url.match(/^(https?:\/{2})?[a-z0-9.]+\?/)?"&":"?";return this.url+=t+e,this.url}},{key:"convertDataToBody",value:function(){for(var e in this.body=new FormData,this.data)Object.hasOwn(this.data,e)&&this.body.append(e,"object"===_typeof(this.data[e])?JSON.stringify(this.data[e]):this.data[e]);return this.body}},{key:"deleteDoubleJSONEncoding",value:function(e){if("object"===_typeof(e))for(var t in e){var o;Object.hasOwn(e,t)&&("object"===_typeof(e[t])&&(e[t]=this.deleteDoubleJSONEncoding(e[t])),"string"==typeof e[t])&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}}])})(),ApbctAjax=(()=>{function n(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return _classCallCheck(this,n),(t=t[0]).data._ajax_nonce=selectActualNonce(),_callSuper(this,n,[t])}return _inherits(n,ApbctXhr),_createClass(n)})(),ApbctRest=(()=>{function c(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];_classCallCheck(this,c);var t=t[0],n=selectActualNonce();return t.url=c.default_route+t.route,t.headers={"X-WP-Nonce":n},_defineProperty(n=_callSuper(this,c,[t]),"route",""),n}return _inherits(c,ApbctXhr),_createClass(c)})(),ApbctCollectingUserActivity=(_defineProperty(ApbctRest,"default_route",ctPublicFunctions._rest_url+"cleantalk-antispam/v1/"),Object.prototype.hasOwn||Object.defineProperty(Object.prototype,"hasOwn",{value:function(e){return Object.prototype.hasOwnProperty.call(this,e)},enumerable:!1,configurable:!0,writable:!0}),(()=>_createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"elementBody",document.querySelector("body")),_defineProperty(this,"collectionForms",document.forms),this.setListeners()},[{key:"setListeners",value:function(){var t=this;this.elementBody.addEventListener("click",function(e){t.checkElementInForms(e,"addClicks")}),this.elementBody.addEventListener("mouseup",function(e){"Range"==document.getSelection().type.toString()&&t.addSelected()}),this.elementBody.addEventListener("mousemove",function(e){t.checkElementInForms(e,"trackMouseMovement")})}},{key:"checkElementInForms",value:function(e,t){for(var o,n=0;n<this.collectionForms.length;n++)o=0<e.target.outerHTML.length&&0<this.collectionForms[n].innerHTML.length?this.collectionForms[n].innerHTML.indexOf(e.target.outerHTML):-1;switch(t){case"addClicks":o<0&&this.addClicks();break;case"trackMouseMovement":-1<o&&this.trackMouseMovement()}}},{key:"addClicks",value:function(){document.ctCollectingUserActivityData?document.ctCollectingUserActivityData.clicks?document.ctCollectingUserActivityData.clicks++:document.ctCollectingUserActivityData.clicks=1:document.ctCollectingUserActivityData={clicks:1}}},{key:"addSelected",value:function(){document.ctCollectingUserActivityData?document.ctCollectingUserActivityData.selected?document.ctCollectingUserActivityData.selected++:document.ctCollectingUserActivityData.selected=1:document.ctCollectingUserActivityData={selected:1}}},{key:"trackMouseMovement",value:function(){document.ctCollectingUserActivityData||(document.ctCollectingUserActivityData={}),document.ctCollectingUserActivityData.mouseMovementsInsideForm||(document.ctCollectingUserActivityData.mouseMovementsInsideForm=!1),document.ctCollectingUserActivityData.mouseMovementsInsideForm=!0}}]))());function ctSetCookie(e,t,n){var o,c=["ct_sfw_pass_key","ct_sfw_passed","wordpress_apbct_antibot","apbct_anticrawler_passed","apbct_bot_detector_exist","apbct_antiflood_passed","apbct_email_encoder_passed"],a=!1;"string"==typeof e&&(a="ct_pointer_data"===e,"string"!=typeof t&&"number"!=typeof t||(e=[[e,t,n]])),"none"===ctPublicFunctions.data__cookies_type?(o=[],e.forEach(function(e){-1!==c.indexOf(e[0])?o.push(e):apbctLocalStorage.set(e[0],e[1])}),0<o.length&&ctSetAlternativeCookie(o),ctPublic.force_alt_cookies&&!a?ctSetAlternativeCookie(e,{forceAltCookies:!0}):ctNoCookieAttachHiddenFieldsToForms()):"native"===ctPublicFunctions.data__cookies_type?(ctPublic.force_alt_cookies&&!a&&ctSetAlternativeCookie(e,{forceAltCookies:!0}),e.forEach(function(e){var t=void 0!==e[2]?"expires="+n+"; ":"",o="https:"===location.protocol?"; secure":"";document.cookie=ctPublicFunctions.cookiePrefix+e[0]+"="+encodeURIComponent(e[1])+"; "+t+"path=/; samesite=lax"+o})):"alternative"!==ctPublicFunctions.data__cookies_type||a||ctSetAlternativeCookie(e)}function ctDetectForcedAltCookiesForms(){var e=0<document.querySelectorAll("#tmpl-nf-layout").length,t=0<document.querySelectorAll(".uael-registration-form-wrapper").length,o=0<document.querySelectorAll('script[id*="smart-forms"]').length,n=0<document.querySelectorAll('iframe[name="jetpack_remote_comment"]').length,c=0<document.querySelectorAll(".cwginstock-subscribe-form").length,a=0<document.querySelectorAll('div[id^="user-registration-form"]').length,i=0<document.querySelectorAll('div[class^="et_pb_newsletter_form"]').length,r=0<document.querySelectorAll('div[class^="fluent_booking_app"]').length,s=0<document.querySelectorAll('div[class^="et_bloom_form_container"]').length,l=0<document.querySelectorAll('div[class*="pafe-form"]').length,d=0<document.querySelectorAll('div [class*="otter-form"]').length,u=0<document.querySelectorAll("form .sqbform, .fields_reorder_enabled").length;ctPublic.force_alt_cookies=o||e||n||t||c||a||i||r||l||s||d||u,setTimeout(function(){var e;ctPublic.force_alt_cookies||(e=0<document.querySelectorAll('main[id^="bookingpress_booking_form"]').length,ctPublic.force_alt_cookies=e)},1e3)}function ctSetAlternativeCookie(e,t){"function"==typeof getJavascriptClientData?Array.isArray(e)&&(e=getJavascriptClientData(e)):console.log("APBCT ERROR: getJavascriptClientData() is not loaded");try{e=JSON.parse(e)}catch(e){return void console.log("APBCT ERROR: JSON parse error:"+e)}var o=t&&t.callback||null,n=t&&t.onErrorCallback||null;t&&t.forceAltCookies&&(e.apbct_force_alt_cookies=!0),"rest"===ctPublicFunctions.data__ajax_type?("string"==typeof e.apbct_pixel_url&&-1!==e.apbct_pixel_url.indexOf("%3A")&&(e.apbct_pixel_url=decodeURIComponent(e.apbct_pixel_url)),apbct_public_sendREST("alt_sessions",{method:"POST",data:{cookies:e},callback:o,onErrorCallback:n})):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_alt_session__save__AJAX",cookies:e},{notJson:1,callback:o,onErrorCallback:n,beforeSend:function(e){e.setRequestHeader("X-Robots-Tag","noindex, nofollow")}})}function ctGetCookie(e){e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function ctDeleteCookie(e){var t;"none"!==ctPublicFunctions.data__cookies_type&&("native"===ctPublicFunctions.data__cookies_type?(t="https:"===location.protocol?"; secure":"",document.cookie=e+'=""; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax'+t):ctPublicFunctions.data__cookies_type)}function apbct_public_sendAJAX(e,t,o){var n=[],o=(n.callback=t.callback||null,n.onErrorCallback=t.onErrorCallback||null,n.callback_context=t.callback_context||null,n.callback_params=t.callback_params||null,n.async=t.async||!0,n.notJson=t.notJson||null,n.responseType=t.notJson?"text":"json",n.timeout=t.timeout||15e3,n.obj=o||null,n.button=t.button||null,n.spinner=t.spinner||null,n.progressbar=t.progressbar||null,n.silent=t.silent||null,n.no_nonce=t.no_nonce||null,n.data=e,n.url=ctPublicFunctions._ajax_url,selectActualNonce());"string"==typeof e?(n.no_nonce||(n.data=n.data+"&_ajax_nonce="+o),n.data=n.data+"&no_cache="+Math.random()):(n.no_nonce||(n.data._ajax_nonce=o),n.data.no_cache=Math.random()),(new ApbctCore).ajax(n)}function apbct_public_sendREST(e,t){var o=[];o.route=e,o.callback=t.callback||null,o.onErrorCallback=t.onErrorCallback||null,o.data=t.data||[],o.method=t.method||"POST",(new ApbctCore).rest(o)}function apbctGenerateUniqueID(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(2,10)}var apbctLocalStorage={get:function(t,o){void 0===o&&(o="value");t=localStorage.getItem(t);if(null!==t)try{var n=JSON.parse(t);if(!n.hasOwnProperty(o))return n;try{return JSON.parse(n[o])}catch(e){return n[o].toString()}}catch(e){return t}return!1},set:function(e,t){var o;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},localStorage.setItem(e,JSON.stringify(o))):localStorage.setItem(e,t)},isAlive:function(e,t){return void 0===t&&(t=86400),this.get(e,"timestamp")+t>Math.floor((new Date).getTime()/1e3)},isSet:function(e){return null!==localStorage.getItem(e)},delete:function(e){localStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<localStorage.length;t++){var o=localStorage.key(t);-1===o.indexOf("ct_")&&-1===o.indexOf("apbct_")||(e[o.toString()]=apbctLocalStorage.get(o))}return e}},apbctSessionStorage={get:function(t,e){void 0===e&&(e="value");t=sessionStorage.getItem(t);if(null!==t)try{var o=JSON.parse(t);return o.hasOwnProperty(e)?JSON.parse(o[e]):o}catch(e){return t}return!1},set:function(e,t){var o;!(2<arguments.length&&void 0!==arguments[2])||arguments[2]?(o={value:JSON.stringify(t),timestamp:Math.floor((new Date).getTime()/1e3)},sessionStorage.setItem(e,JSON.stringify(o))):sessionStorage.setItem(e,t)},isSet:function(e){return null!==sessionStorage.getItem(e)},delete:function(e){sessionStorage.removeItem(e)},getCleanTalkData:function(){for(var e={},t=0;t<sessionStorage.length;t++){var o=sessionStorage.key(t);-1===o.indexOf("ct_")&&-1===o.indexOf("apbct_")||(e[o.toString()]=apbctSessionStorage.get(o))}return e}};function apbctOnAnimationStart(e){("onautofillstart"===e.animationName?apbctAutocomplete:apbctCancelAutocomplete)(e.target)}function apbctOnInput(e){("insertReplacementText"!==e.inputType&&"data"in e?apbctCancelAutocomplete:apbctAutocomplete)(e.target)}function apbctAutocomplete(e){var t;e.hasAttribute("autocompleted")||(e.setAttribute("autocompleted",""),t=new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!0,detail:null}),e.dispatchEvent(t))||(e.value="")}function apbctCancelAutocomplete(e){e.hasAttribute("autocompleted")&&(e.removeAttribute("autocompleted"),e.dispatchEvent(new window.CustomEvent("onautocomplete",{bubbles:!0,cancelable:!1,detail:null})))}var ApbctForceProtection=(()=>_createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"wrappers",[]),this.wrappers=this.findWrappers(),this.wrappers.length<1||this.checkBot()},[{key:"findWrappers",value:function(){return document.querySelectorAll("div.ct-encoded-form-wrapper")}},{key:"checkBot",value:function(){var t=this,e={event_javascript_data:getJavascriptClientData(),post_url:document.location.href,referrer:document.referrer};"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("force_protection_check_bot",{data:e,method:"POST",callback:function(e){return t.checkBotCallback(e)}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&(e.action="apbct_force_protection_check_bot",apbct_public_sendAJAX(e,{callback:function(e){return t.checkBotCallback(e)}}))}},{key:"checkBotCallback",value:function(e){if(e.data&&e.data.status&&200!==e.data.status)console.log("ApbctForceProtection connection error occurred"),this.decodeForms();else{if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return console.log("ApbctForceProtection decodeForms error",e),void this.decodeForms()}"object"===_typeof(e)&&e.allow&&1===e.allow?(this.decodeForms(),document.dispatchEvent(new Event("apbctForceProtectionAllowed"))):this.showMessageForBot(e.message)}}},{key:"decodeForms",value:function(){var t;this.wrappers.forEach(function(e){t=e.querySelector("div.ct-encoded-form").dataset.encodedForm;try{t&&"string"==typeof t&&(e.outerHTML=atob(t))}catch(e){console.log(e)}})}},{key:"showMessageForBot",value:function(t){this.wrappers.forEach(function(e){e.querySelector("div.ct-encoded-form").dataset.encodedForm&&(e.outerHTML='<div class="ct-encoded-form-forbidden">'+t+"</div>")})}}]))();function apbctForceProtect(){ctPublic.settings__forms__force_protection&&void 0!==ApbctForceProtection&&new ApbctForceProtection}ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbctForceProtect():apbct_attach_event_handler(document,"DOMContentLoaded",apbctForceProtect));var ctMouseReadInterval,ctMouseWriteDataInterval,tokenCheckerIntervalId,CTTypoData=(()=>_createClass(function e(){_classCallCheck(this,e),_defineProperty(this,"fieldData",{isAutoFill:!1,isUseBuffer:!1,speedDelta:0,firstKeyTimestamp:0,lastKeyTimestamp:0,lastDelta:0,countOfKey:0}),_defineProperty(this,"fields",document.querySelectorAll("textarea[name=comment]")),_defineProperty(this,"data",[])},[{key:"gatheringFields",value:function(){var o=this;Array.prototype.slice.call(this.fields).forEach(function(e,t){o.data.push(Object.assign({},o.fieldData))})}},{key:"setListeners",value:function(){var n=this;this.fields.forEach(function(e,t){e.addEventListener("paste",function(){n.data[t].isUseBuffer=!0})}),this.fields.forEach(function(e,t){e.addEventListener("onautocomplete",function(){n.data[t].isAutoFill=!0})}),this.fields.forEach(function(e,o){e.addEventListener("input",function(){n.data[o].countOfKey++;var e,t=+new Date;1===n.data[o].countOfKey?(n.data[o].lastKeyTimestamp=t,n.data[o].firstKeyTimestamp=t):(e=t-n.data[o].lastKeyTimestamp,2===n.data[o].countOfKey?(n.data[o].lastKeyTimestamp=t,n.data[o].lastDelta=e):2<n.data[o].countOfKey&&(n.data[o].speedDelta+=Math.abs(n.data[o].lastDelta-e),n.data[o].lastKeyTimestamp=t,n.data[o].lastDelta=e))})})}}]))(),ctDate=new Date,ctTimeMs=(new Date).getTime(),ctMouseEventTimerFlag=!0,ctMouseData=[],ctMouseDataCounter=0,ctCheckedEmails={},ctCheckedEmailsExist={},botDetectorLogLastUpdate=0,botDetectorLogEventTypesCollected=[];function apbct_attach_event_handler(e,t,o){"function"==typeof window.addEventListener?e.addEventListener(t,o):e.attachEvent(t,o)}function apbct_remove_event_handler(e,t,o){"function"==typeof window.removeEventListener?e.removeEventListener(t,o):e.detachEvent(t,o)}var ctFunctionFirstKey=function(e){ctSetCookie("ct_fkp_timestamp",Math.floor((new Date).getTime()/1e3)),ctKeyStopStopListening()},ctFunctionMouseMove=(cronFormsHandler(2e3),ctPublicFunctions.hasOwnProperty("data__bot_detector_enabled")&&1==ctPublicFunctions.data__bot_detector_enabled&&ctPublicFunctions.hasOwnProperty("data__frontend_data_log_enabled")&&1==ctPublicFunctions.data__frontend_data_log_enabled&&sendBotDetectorLogToAltSessions(1e3),ctPublic.data__key_is_ok&&(ctMouseReadInterval=setInterval(function(){ctMouseEventTimerFlag=!0},150),ctMouseWriteDataInterval=setInterval(function(){ctSetCookie("ct_pointer_data",JSON.stringify(ctMouseData))},1200)),function(e){ctSetMouseMoved(),!0===ctMouseEventTimerFlag&&(ctMouseData.push([Math.round(e.clientY),Math.round(e.clientX),Math.round((new Date).getTime()-ctTimeMs)]),ctMouseEventTimerFlag=!1,50<=++ctMouseDataCounter)&&ctMouseStopData()});function cronFormsHandler(){setTimeout(function(){setInterval(function(){restartFieldsListening(),restartBotDetectorEventTokenAttach()},2e3)},0<arguments.length&&void 0!==arguments[0]?arguments[0]:2e3)}function sendBotDetectorLogToAltSessions(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:3e3,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e3;setTimeout(function(){setInterval(function(){var e=apbctLocalStorage.get("ct_bot_detector_frontend_data_log");needsSaveLogToAltSessions(e)&&(botDetectorLogLastUpdate=e.log_last_update,ctSetAlternativeCookie([],{forceAltCookies:!0}))},t)},e)}function needsSaveLogToAltSessions(e){if(e&&e.hasOwnProperty("log_last_update")&&botDetectorLogLastUpdate!==e.log_last_update)try{for(var t=0;t<e.records.length;t++){var o=e.records[t].frontend_data.js_event;if(void 0===o||!botDetectorLogEventTypesCollected.includes(o))return botDetectorLogEventTypesCollected.push(o),!0}}catch(e){console.log("APBCT: bot detector log collection error: ".e.toString())}return!1}function restartBotDetectorEventTokenAttach(){var e,t=0<document.getElementsByClassName("latepoint-form").length||0<document.getElementsByClassName("mec-booking-form-container").length||null!==document.getElementById("login-form-popup");try{t&&(e=apbctLocalStorage.get("bot_detector_event_token"),"function"==typeof setEventTokenField)&&void 0!==e&&64===e.length&&setEventTokenField(e)}catch(e){console.log(e.toString())}}function ctMouseStopData(){apbct_remove_event_handler(document,"mousemove",ctFunctionMouseMove),clearInterval(ctMouseReadInterval),clearInterval(ctMouseWriteDataInterval)}function ctKeyStopStopListening(){apbct_remove_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_remove_event_handler(document,"keydown",ctFunctionFirstKey)}function checkEmail(e){var t=e.target.value;!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||!t||t in ctCheckedEmails||("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_before_post",{method:"POST",data:{email:t},callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_before_post",email:t},{callback:function(e){e.result&&(ctCheckedEmails[t]={result:e.result,timestamp:Date.now()/1e3|0},ctSetCookie("ct_checked_emails",JSON.stringify(ctCheckedEmails)))}}))}function checkEmailExist(t){var e,o=t.target.value;o&&o.length?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)&&(o in ctCheckedEmailsExist?(e=ctCheckedEmailsExist[o],getResultCheckEmailExist(t,e,o)):(viewCheckEmailExist(t,"load"),(ctPublicFunctions.data__ajax_type="rest")===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("check_email_exist_post",{method:"POST",data:{email:o},callback:function(e){getResultCheckEmailExist(t,e,o)}}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_email_check_exist_post",email:o},{callback:function(e){getResultCheckEmailExist(t,e,o)}}))):((e=document.getElementById("apbct-check_email_exist-block"))&&e.remove(),(e=document.getElementById("apbct-check_email_exist-popup_description"))&&e.remove())}function getResultCheckEmailExist(e,t,o){t&&t.result&&(t=t.result,ctCheckedEmailsExist[o]={result:t,timestamp:Date.now()/1e3|0},"EXISTS"==t.result?viewCheckEmailExist(e,"good_email",t.text_result):viewCheckEmailExist(e,"bad_email",t.text_result),ctSetCookie("ct_checked_emails_exist",JSON.stringify(ctCheckedEmailsExist)))}function viewCheckEmailExist(e,t,o){var n,c,e=e.target.parentElement,a=e.querySelector('[name*="email"]');if(a)switch(document.getElementById("apbct-check_email_exist-block")?n=document.getElementById("apbct-check_email_exist-block"):((n=document.createElement("div")).setAttribute("class","apbct-check_email_exist-block"),n.setAttribute("id","apbct-check_email_exist-block"),window.addEventListener("scroll",function(){n.style.top=a.getBoundingClientRect().top+"px"}),e.after(n)),document.getElementById("apbct-check_email_exist-popup_description")?c=document.getElementById("apbct-check_email_exist-popup_description"):((c=document.createElement("div")).setAttribute("class","apbct-check_email_exist-popup_description"),c.setAttribute("id","apbct-check_email_exist-popup_description"),window.addEventListener("scroll",function(){c.style.top=n.getBoundingClientRect().top+"px"}),n.after(c)),ctEmailExistSetElementsPositions(),window.addEventListener("resize",function(e){ctEmailExistSetElementsPositions()}),t){case"load":n.classList.remove("apbct-check_email_exist-good_email","apbct-check_email_exist-bad_email"),n.classList.add("apbct-check_email_exist-load");break;case"good_email":n.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-bad_email"),n.classList.add("apbct-check_email_exist-good_email"),n.onmouseover=function(){c.textContent=o,c.style.display="block",c.style.top=a.getBoundingClientRect().top-c.getBoundingClientRect().height+"px",c.style.color="#1C7129"},n.onmouseout=function(){c.style.display="none"};break;case"bad_email":n.classList.remove("apbct-check_email_exist-load","apbct-check_email_exist-good_email"),n.classList.add("apbct-check_email_exist-bad_email"),n.onmouseover=function(){c.textContent=o,c.style.display="block",c.style.top=a.getBoundingClientRect().top-c.getBoundingClientRect().height+"px",c.style.color="#E01111"},n.onmouseout=function(){c.style.display="none"}}}function ctEmailExistSetElementsPositions(){var e,t=document.querySelector('comment-form input[name*="email"], input#email');t&&((e=document.getElementById("apbct-check_email_exist-block"))&&(e.style.top=t.getBoundingClientRect().top+"px",e.style.left=t.getBoundingClientRect().right-35-10+"px",e.style.height=t.offsetHeight+"px",e.style.width="35px"),e=document.getElementById("apbct-check_email_exist-popup_description"))&&(e.style.width=t.offsetWidth+"px",e.style.left=t.getBoundingClientRect().left+"px")}function ctIsDrawPixel(){return("3"!=ctPublic.pixel__setting||"1"!=ctPublic.settings__data__bot_detector_enabled)&&(+ctPublic.pixel__enabled||"none"===ctPublic.data__cookies_type&&0===document.querySelectorAll("img#apbct_pixel").length||"alternative"===ctPublic.data__cookies_type&&0===document.querySelectorAll("img#apbct_pixel").length)}function ctSetPixelImg(e){if("3"==ctPublic.pixel__setting&&"1"==ctPublic.settings__data__bot_detector_enabled)return!1;var t;ctSetCookie("apbct_pixel_url",e),ctIsDrawPixel()&&!document.getElementById("apbct_pixel")&&((t=document.createElement("img")).setAttribute("alt","CleanTalk Pixel"),t.setAttribute("title","CleanTalk Pixel"),t.setAttribute("id","apbct_pixel"),t.setAttribute("style","display: none; left: 99999px;"),t.setAttribute("src",e),apbct("body").append(t))}function ctSetPixelImgFromLocalstorage(e){if("3"==ctPublic.pixel__setting&&"1"==ctPublic.settings__data__bot_detector_enabled)return!1;var t;ctIsDrawPixel()&&!document.getElementById("apbct_pixel")&&((t=document.createElement("img")).setAttribute("alt","CleanTalk Pixel"),t.setAttribute("title","CleanTalk Pixel"),t.setAttribute("id","apbct_pixel"),t.setAttribute("style","display: none; left: 99999px;"),t.setAttribute("src",decodeURIComponent(e)),apbct("body").append(t))}function ctGetPixelUrl(){if("3"==ctPublic.pixel__setting&&"1"==ctPublic.settings__data__bot_detector_enabled)return!1;var e=apbctLocalStorage.get("apbct_pixel_url");if(!1!==e){if(apbctLocalStorage.isAlive("apbct_pixel_url",10800))return void ctSetPixelImgFromLocalstorage(e);apbctLocalStorage.delete("apbct_pixel_url")}"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_get_pixel_url",{method:"POST",callback:function(e){e&&("string"==typeof e||e instanceof String)&&0===e.indexOf("https")&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))}}):apbct_public_sendAJAX({action:"apbct_get_pixel_url"},{notJson:!0,callback:function(e){e&&("string"==typeof e||e instanceof String)&&0===e.indexOf("https")&&(apbctLocalStorage.get("apbct_pixel_url")||(apbctLocalStorage.set("apbct_pixel_url",e),ctNoCookieAttachHiddenFieldsToForms()),ctSetPixelImg(e))},beforeSend:function(e){e.setRequestHeader("X-Robots-Tag","noindex, nofollow")}})}function ctSetHasScrolled(){apbctLocalStorage.isSet("ct_has_scrolled")&&apbctLocalStorage.get("ct_has_scrolled")||(ctSetCookie("ct_has_scrolled","true"),apbctLocalStorage.set("ct_has_scrolled",!0)),"native"===ctPublic.data__cookies_type&&void 0===ctGetCookie("ct_has_scrolled")&&ctSetCookie("ct_has_scrolled","true")}function ctSetMouseMoved(){apbctLocalStorage.isSet("ct_mouse_moved")&&apbctLocalStorage.get("ct_mouse_moved")||(ctSetCookie("ct_mouse_moved","true"),apbctLocalStorage.set("ct_mouse_moved",!0)),"native"===ctPublic.data__cookies_type&&void 0===ctGetCookie("ct_mouse_moved")&&ctSetCookie("ct_mouse_moved","true")}function restartFieldsListening(){apbctLocalStorage.isSet("ct_has_input_focused")||apbctLocalStorage.isSet("ct_has_key_up")||ctStartFieldsListening()}function ctStartFieldsListening(){if(!apbctLocalStorage.isSet("ct_has_key_up")&&!apbctLocalStorage.get("ct_has_key_up")||!apbctLocalStorage.isSet("ct_has_input_focused")&&!apbctLocalStorage.get("ct_has_input_focused")||"native"!==ctPublic.data__cookies_type||void 0===ctGetCookie("ct_has_input_focused")||void 0===ctGetCookie("ct_has_key_up")){var e=ctGetPageForms();if(ctPublic.handled_fields=[],0<e.length)for(var t=0;t<e.length;t++)for(var o=e[t].querySelectorAll("input,textarea"),n=0;n<o.length;n++)"hidden"!==o[n].type&&(ctPublic.handled_fields.push(o[n]),apbct_attach_event_handler(o[n],"focus",ctFunctionHasInputFocused),apbct_attach_event_handler(o[n],"keyup",ctFunctionHasKeyUp))}}function ctStopFieldsListening(e,t){if(void 0!==ctPublic.handled_fields&&0<ctPublic.handled_fields.length)for(var o=0;o<ctPublic.handled_fields.length;o++)apbct_remove_event_handler(ctPublic.handled_fields[o],e,t)}var ctFunctionHasInputFocused=function(e){ctSetHasInputFocused(),ctStopFieldsListening("focus",ctFunctionHasInputFocused)},ctFunctionHasKeyUp=function(e){ctSetHasKeyUp(),ctStopFieldsListening("keyup",ctFunctionHasKeyUp)};function ctSetHasInputFocused(){apbctLocalStorage.isSet("ct_has_input_focused")&&apbctLocalStorage.get("ct_has_input_focused")||apbctLocalStorage.set("ct_has_input_focused",!0),("native"===ctPublic.data__cookies_type&&void 0===ctGetCookie("ct_has_input_focused")||"alternative"===ctPublic.data__cookies_type||"none"===ctPublic.data__cookies_type&&(void 0!==ctPublic.force_alt_cookies||void 0!==ctPublic.force_alt_cookies&&ctPublic.force_alt_cookies))&&ctSetCookie("ct_has_input_focused","true")}function ctSetHasKeyUp(){apbctLocalStorage.isSet("ct_has_key_up")&&apbctLocalStorage.get("ct_has_key_up")||apbctLocalStorage.set("ct_has_key_up",!0),("native"===ctPublic.data__cookies_type&&void 0===ctGetCookie("ct_has_key_up")||"alternative"===ctPublic.data__cookies_type||"none"===ctPublic.data__cookies_type&&(void 0!==ctPublic.force_alt_cookies||void 0!==ctPublic.force_alt_cookies&&ctPublic.force_alt_cookies))&&ctSetCookie("ct_has_key_up","true")}function apbctPrepareBlockForAjaxForms(){function n(e){if(e.responseText&&-1!==e.responseText.indexOf('"apbct')&&-1===e.responseText.indexOf("DOCTYPE"))try{ctParseBlockMessage(JSON.parse(e.responseText))}catch(e){console.log(e.toString())}}"undefined"!=typeof jQuery?"function"!=typeof jQuery(document).ajaxComplete()?jQuery(document).on("ajaxComplete",function(e,t,o){n(t)}):jQuery(document).ajaxComplete(function(e,t,o){n(t)}):"undefined"!=typeof XMLHttpRequest&&document.addEventListener("readystatechange",function(e){4===e.target.readyState&&n(e.target)})}function startForcedAltEventTokenChecker(){tokenCheckerIntervalId=setInterval(function(){var e;"1"===apbctLocalStorage.get("event_token_forced_set")?clearInterval(tokenCheckerIntervalId):(e=apbctLocalStorage.get("bot_detector_event_token"))&&(ctSetAlternativeCookie([["ct_bot_detector_event_token",e]],{forceAltCookies:!0}),apbctLocalStorage.set("event_token_forced_set","1"),clearInterval(tokenCheckerIntervalId))},1e3)}function apbct_ready(){document.addEventListener("gform_page_loaded",function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||(ctNoCookieAttachHiddenFieldsToForms(),"function"!=typeof setEventTokenField)||"function"!=typeof botDetectorLocalStorage||setEventTokenField(botDetectorLocalStorage.get("bot_detector_event_token"))}),ctPublic.wc_ajax_add_to_cart||apbctCheckAddToCartByGet(),apbctPrepareBlockForAjaxForms(),apbctSessionStorage.isSet("apbct_session_id")?apbctLocalStorage.set("apbct_page_hits",Number(apbctLocalStorage.get("apbct_page_hits"))+1):(e=apbctGenerateUniqueID(),apbctSessionStorage.set("apbct_session_id",e,!1),apbctLocalStorage.set("apbct_page_hits",1),document.referrer&&new URL(document.referrer).host!==location.host&&apbctSessionStorage.set("apbct_site_referer",document.referrer,!1)),apbctWriteReferrersToSessionStorage();var e=apbctLocalStorage.get("ct_cookies_type"),e=(e&&e===ctPublic.data__cookies_type||(apbctLocalStorage.set("ct_cookies_type",ctPublic.data__cookies_type),apbctLocalStorage.delete("ct_mouse_moved"),apbctLocalStorage.delete("ct_has_scrolled")),"alternative"!==ctPublic.data__cookies_type&&(ctStartFieldsListening(),setTimeout(ctStartFieldsListening,1e3)),window.addEventListener("animationstart",apbctOnAnimationStart,!0),window.addEventListener("input",apbctOnInput,!0),document.ctTypoData=new CTTypoData,document.ctTypoData.gatheringFields(),document.ctTypoData.setListeners(),[["ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)],["ct_fkp_timestamp","0"],["ct_pointer_data","0"],["ct_timezone",ctDate.getTimezoneOffset()/60*-1],["ct_screen_info",apbctGetScreenInfo()],["apbct_headless",navigator.webdriver]]);if(apbctLocalStorage.set("ct_ps_timestamp",Math.floor((new Date).getTime()/1e3)),apbctLocalStorage.set("ct_fkp_timestamp","0"),apbctLocalStorage.set("ct_pointer_data","0"),apbctLocalStorage.set("ct_timezone",ctDate.getTimezoneOffset()/60*-1),apbctLocalStorage.set("ct_screen_info",apbctGetScreenInfo()),apbctLocalStorage.set("apbct_headless",navigator.webdriver),"native"!==ctPublic.data__cookies_type)e.push(["apbct_visible_fields","0"]);else{var t=document.cookie.split(";");if(0!==t.length)for(var o=0;o<t.length;o++){var n=t[o].trim().split("=")[0];0===n.indexOf("apbct_visible_fields_")&&ctDeleteCookie(n)}}!+ctPublic.pixel__setting||3==+ctPublic.pixel__setting&&1==ctPublic.settings__data__bot_detector_enabled||(ctIsDrawPixel()?ctGetPixelUrl():e.push(["apbct_pixel_url",ctPublic.pixel__url])),+ctPublic.data__email_check_before_post&&(e.push(["ct_checked_emails","0"]),apbct("input[type = 'email'], #email").on("blur",checkEmail)),+ctPublic.data__email_check_exist_post&&(e.push(["ct_checked_emails_exist","0"]),apbct("comment-form input[name = 'email'], input#email").on("blur",checkEmailExist)),apbctLocalStorage.isSet("ct_checkjs")?e.push(["ct_checkjs",apbctLocalStorage.get("ct_checkjs")]):e.push(["ct_checkjs",0]),ctDetectForcedAltCookiesForms();var c=apbctLocalStorage.get("bot_detector_event_token"),a=(void 0!==ctPublic.force_alt_cookies&&ctPublic.force_alt_cookies&&ctPublic.settings__data__bot_detector_enabled&&(apbctLocalStorage.set("event_token_forced_set","0"),c?(e.push(["ct_bot_detector_event_token",c]),apbctLocalStorage.set("event_token_forced_set","1")):startForcedAltEventTokenChecker()),ctSetCookie(e),setTimeout(function(){void 0!==ctPublic.force_alt_cookies&&("undefined"===ctPublic.force_alt_cookies||ctPublic.force_alt_cookies)||ctNoCookieAttachHiddenFieldsToForms(),void 0!==ctPublic.data__cookies_type&&"none"===ctPublic.data__cookies_type&&(ctAjaxSetupAddCleanTalkDataBeforeSendAjax(),ctAddWCMiddlewares());for(var e=0;e<document.forms.length;e++){var t,o,n=document.forms[e];ctCheckHiddenFieldsExclusions(document.forms[e],"visible_fields")||n.querySelector('input[name="wspsc_add_cart_submit"]')||n.querySelector('input[name="option"][value="com_vikrentcar"]')||n.querySelector('input[name="option"][value="com_vikbooking"]')||void 0!==document.forms[e].elements.apbct_visible_fields&&0<document.forms[e].elements.apbct_visible_fields.length||(n.querySelector('input[name="apbct_visible_fields"]')&&(t=n.querySelector('input[name="apbct_visible_fields"]'),n.removeChild(t)),(t=document.createElement("input")).setAttribute("type","hidden"),t.setAttribute("id","apbct_visible_fields_"+e),t.setAttribute("name","apbct_visible_fields"),(o={})[0]=apbct_collect_visible_fields(n),t.value=btoa(JSON.stringify(o)),n.append(t),n.onsubmit_prev=n.onsubmit,n.ctFormIndex=e,n.onsubmit=function(e){"native"!==ctPublic.data__cookies_type&&void 0!==e.target.ctFormIndex&&apbct_visible_fields_set_cookie(apbct_collect_visible_fields(this),e.target.ctFormIndex),"none"===ctPublic.data__cookies_type&&isFormThatNeedCatchXhr(e.target)&&(window.XMLHttpRequest.prototype.send=function(e){var t=getNoCookieData();defaultSend.call(this,"data%5Bct_no_cookie_hidden_field%5D="+t+"&"+e),setTimeout(function(){window.XMLHttpRequest.prototype.send=defaultSend},0)}),e.target.onsubmit_prev instanceof Function&&!ctOnsubmitPrevCallExclude(e.target)&&(void 0!==e.target.classList&&e.target.classList.contains("brave_form_form")&&e.preventDefault(),setTimeout(function(){e.target.onsubmit_prev.call(e.target,e)},0))})}},1e3),document.querySelectorAll("[data-original-string]"));if((ctPublic.encodedEmailNodes=a).length)for(var i=0;i<a.length;++i)a[i].addEventListener("click",ctFillDecodedEmailHandler);var r,s=_createForOfIteratorHelper(document.forms);try{for(s.s();!(r=s.n()).done;)(()=>{var t=r.value;if("undefined"!=typeof ctPublic&&1==+ctPublic.settings__forms__search_test&&("searchform"===t.getAttribute("id")||null!==t.getAttribute("class")&&-1!==t.getAttribute("class").indexOf("search-form")||null!==t.getAttribute("role")&&-1!==t.getAttribute("role").indexOf("search")))t.querySelector("input.dgwt-wcas-search-input")||"hero-search-form"===t.getAttribute("id")||"hb-booking-search-form"===t.getAttribute("class")||(t.apbctSearchPrevOnsubmit=t.onsubmit,t.onsubmit=function(e){return ctSearchFormOnSubmitHandler(e,t)})})()}catch(e){s.e(e)}finally{s.f()}apbctCatchXmlHttpRequest(),new ApbctCollectingUserActivity,ctPublic.settings__sfw__anti_crawler&&checkBotDetectorExist()}function checkBotDetectorExist(){var e;ctPublic.settings__data__bot_detector_enabled&&(e=setInterval(function(){!localStorage.bot_detector_event_token||(ctSetCookie("apbct_bot_detector_exist","1","3600"),clearInterval(e))},500))}function ctAddWCMiddlewares(){window.hasOwnProperty("wp")&&window.wp.hasOwnProperty("apiFetch")&&"function"==typeof window.wp.apiFetch.use&&window.wp.apiFetch.use(function(e,t){return"object"===_typeof(e)&&null!==e&&e.hasOwnProperty("data")&&e.hasOwnProperty("path")&&(e.data.hasOwnProperty("requests")&&0<e.data.requests.length&&e.data.requests[0].hasOwnProperty("path")&&"/wc/store/v1/cart/add-item"===e.data.requests[0].path&&(e.data.requests[0].data.ct_no_cookie_hidden_field=getNoCookieData(),e.data.requests[0].data.event_token=localStorage.getItem("bot_detector_event_token")),"/wc/store/v1/checkout"===e.path)&&(e.data.ct_no_cookie_hidden_field=getNoCookieData(),e.data.event_token=localStorage.getItem("bot_detector_event_token")),t(e)})}function apbctCatchXmlHttpRequest(){var n;null!==document.querySelector("div.wfu_container")&&(n=XMLHttpRequest.prototype.send,XMLHttpRequest.prototype.send=function(e){if(e&&"string"==typeof e&&-1!==e.indexOf("action=wfu_ajax_action_ask_server")){var t="",o=localStorage.getItem("bot_detector_event_token");try{o=JSON.parse(o)}catch(e){o=!1}null!==o&&!1!==o&&o.hasOwnProperty("value")&&""!==o.value&&(t+="&data%5Bct_bot_detector_event_token%5D="+(o=o.value));o=getNoCookieData();return n.apply(this,[e+=t+="&data%5Bct_no_cookie_hidden_field%5D="+o])}return n.apply(this,[e])})}function apbctAjaxSetImportantParametersOnCacheExist(e){e&&("rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_set_important_parameters",{}):"admin_ajax"===ctPublicFunctions.data__ajax_type&&apbct_public_sendAJAX({action:"apbct_set_important_parameters"},{}))}function ctAjaxSetupAddCleanTalkDataBeforeSendAjax(){var n=!1;"undefined"!=typeof jQuery&&"function"==typeof jQuery.ajaxSetup&&jQuery.ajaxSetup({beforeSend:function(e,t){var o=!1;if("string"==typeof t.data&&(-1!==t.data.indexOf("twt_cc_signup")&&(o="twt_cc_signup"),-1!==t.data.indexOf("action=mailpoet")&&(o="action=mailpoet"),-1!==t.data.indexOf("action=user_registration")&&-1!==t.data.indexOf("ur_frontend_form_nonce")&&(o="action=user_registration"),-1!==t.data.indexOf("action=happyforms_message")&&(o="action=happyforms_message"),-1!==t.data.indexOf("action=new_activity_comment"))&&(o="action=new_activity_comment"),"string"==typeof t.url&&-1!==t.url.indexOf("wc-ajax=add_to_cart")&&(o="wc-ajax=add_to_cart",null!==localStorage.getItem("bot_detector_event_token"))){n=localStorage.getItem("bot_detector_event_token");try{n=JSON.parse(n)}catch(e){n=!1}!1!==n&&n.hasOwnProperty("value")&&""!==n.value&&(n=n.value)}o&&(o=getNoCookieData(),n="string"==typeof n?"data%5Bct_bot_detector_event_token%5D="+n+"&":"",t.data=(o="data%5Bct_no_cookie_hidden_field%5D="+o+"&")+n+t.data)}})}function ctOnsubmitPrevCallExclude(e){return!!e.classList.contains("hb-booking-search-form")}function ctSearchFormOnSubmitHandler(e,t){try{var o,n,c,a=t.querySelector('[name*="apbct_email_id__"]'),i=null,r=(null!==a&&null!==a.value&&(i=a.value),getCleanTalkStorageDataArray()),s=apbctLocalStorage.get("bot_detector_event_token");null===r&&null===a&&null===s||(e.preventDefault(),o=function(){null!==a&&a.parentNode.removeChild(a),"function"==typeof t.apbctSearchPrevOnsubmit?t.apbctSearchPrevOnsubmit():HTMLFormElement.prototype.submit.call(t)},n=r,null!==i&&(n.apbct_search_form__honeypot_value=i),n.ct_bot_detector_event_token=s,"string"==typeof n.apbct_pixel_url&&-1!==n.apbct_pixel_url.indexOf("%3A")&&(n.apbct_pixel_url=decodeURIComponent(n.apbct_pixel_url)),void 0!==(c=JSON.stringify(n))&&0!==c.length?ctSetAlternativeCookie(c,{callback:o,onErrorCallback:o,forceAltCookies:!0}):o())}catch(e){console.warn("APBCT search form onsubmit handler error. "+e)}}function getJavascriptClientData(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t={},o=(t.ct_checked_emails=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checked_emails"),t.ct_checked_emails_exist=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checked_emails_exist"),t.ct_checkjs=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_checkjs"),t.ct_fkp_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_fkp_timestamp"),t.ct_pointer_data=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_pointer_data"),t.ct_ps_timestamp=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_ps_timestamp"),t.ct_screen_info=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_screen_info"),t.ct_timezone=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_timezone"),apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_mouse_moved")),n=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),c=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_cookies_type"),a=apbctLocalStorage.get("apbct_page_hits"),i=apbctSessionStorage.get("apbct_prev_referer"),r=apbctSessionStorage.get("apbct_site_referer"),s=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_js_errors"),l=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"apbct_pixel_url"),d=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"apbct_headless"),u=apbctLocalStorage.get(ctPublicFunctions.cookiePrefix+"ct_bot_detector_frontend_data_log"),p=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_mouse_moved"),_=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_has_scrolled"),m=ctGetCookie(ctPublicFunctions.cookiePrefix+"ct_cookies_type"),f=ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_pixel_url"),b=!!ctGetCookie(ctPublicFunctions.cookiePrefix+"apbct_headless");if(t.ct_mouse_moved=void 0!==o?o:p,t.ct_has_scrolled=void 0!==n?n:_,t.ct_cookies_type=void 0!==c?c:m,t.apbct_pixel_url=void 0!==l?l:f,t.apbct_headless=void 0!==d?d:b,t.ct_bot_detector_frontend_data_log=void 0!==u?u:"",t.apbct_pixel_url&&"string"==typeof t.apbct_pixel_url&&t.apbct_pixel_url.indexOf("%3A%2F")&&(t.apbct_pixel_url=decodeURIComponent(t.apbct_pixel_url)),t.apbct_page_hits=a,t.apbct_prev_referer=i,t.apbct_site_referer=r,t.apbct_ct_js_errors=s,t.apbct_pixel_url||(t.apbct_pixel_url=ctPublic.pixel__url),"object"===_typeof(e))for(var h=0;h<e.length;++h)"object"===_typeof(e[h][1])?t[e[h][1][0]]=e[h][1][1]:t[e[h][0]]=e[h][1];else console.log("APBCT JS ERROR: Collecting data type mismatch");return t=removeDoubleJsonEncoding(t),JSON.stringify(t)}function removeDoubleJsonEncoding(e){if("object"===_typeof(e))for(var t in e){var o;"object"===_typeof(e[t])&&(e[t]=removeDoubleJsonEncoding(e[t])),"string"==typeof e[t]&&null!==e[t].match(/^[\[{].*?[\]}]$/)&&"object"===_typeof(o=JSON.parse(e[t]))&&(e[t]=o)}return e}function apbct_collect_visible_fields(e){var t,o=[],n="",c=0,a="",i=0,r=[];for(t in e.elements)isNaN(+t)||(o[t]=e.elements[t]);return(o=o.filter(function(e){return-1===r.indexOf(e.getAttribute("name"))&&(-1===["radio","checkbox"].indexOf(e.getAttribute("type"))||(r.push(e.getAttribute("name")),!1))})).forEach(function(e,t,o){"submit"!==e.getAttribute("type")&&null!==e.getAttribute("name")&&"ct_checkjs"!==e.getAttribute("name")&&("none"!==getComputedStyle(e).display&&"hidden"!==getComputedStyle(e).visibility&&"0"!==getComputedStyle(e).opacity&&"hidden"!==e.getAttribute("type")||e.classList.contains("wp-editor-area")?(n+=" "+e.getAttribute("name"),c++):(a+=" "+e.getAttribute("name"),i++))}),a=a.trim(),{visible_fields:n=n.trim(),visible_fields_count:c,invisible_fields:a,invisible_fields_count:i}}function apbct_visible_fields_set_cookie(e,t){var o="object"===_typeof(e)&&null!==e?e:{};if("native"===ctPublic.data__cookies_type)for(var n in o){if(10<n)return;ctSetCookie("apbct_visible_fields_"+(void 0!==t?t:n),JSON.stringify(o[n]))}else ctSetCookie("apbct_visible_fields",JSON.stringify(o))}function apbct_js_keys__set_input_value(e,t,o,n){if(0<document.querySelectorAll("[name^=ct_checkjs]").length)for(var c=document.querySelectorAll("[name^=ct_checkjs]"),a=0;a<c.length;a++)c[a].value=e.js_key}function apbctGetScreenInfo(){return JSON.stringify({fullWidth:document.documentElement.scrollWidth,fullHeight:Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),visibleWidth:document.documentElement.clientWidth,visibleHeight:document.documentElement.clientHeight})}function ctParseBlockMessage(e){var t="";void 0!==e.apbct&&(e=e.apbct).blocked&&(t=e.comment),(t=void 0!==e.data&&void 0!==(e=e.data).message?e.message:t)&&(document.dispatchEvent(new CustomEvent("apbctAjaxBockAlert",{bubbles:!0,detail:{message:t}})),cleantalkModal.loaded=t,cleantalkModal.open(),1==+e.stop_script)&&window.stop()}function ctSetPixelUrlLocalstorage(e){ctSetCookie("apbct_pixel_url",e)}function ctNoCookieConstructHiddenField(e){var t="hidden",e=("submit"===e&&(t="submit"),""),o=getCleanTalkStorageDataArray(),o=JSON.stringify(o);return o="_ct_no_cookie_data_"+btoa(o),(e=document.createElement("input")).setAttribute("name","ct_no_cookie_hidden_field"),e.setAttribute("value",o),e.setAttribute("type",t),e.classList.add("apbct_special_field"),e.classList.add("ct_no_cookie_hidden_field"),e}function getCleanTalkStorageDataArray(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),o={typo:[]},n=(document.ctTypoData&&document.ctTypoData.data&&(o={typo:document.ctTypoData.data}),{collecting_user_activity_data:[]});return document.ctCollectingUserActivityData&&(n={collecting_user_activity_data:JSON.parse(JSON.stringify(document.ctCollectingUserActivityData))}),_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e),t),o),n)}function ctGetPageForms(){var e=document.forms;return e||!1}function ctGetHiddenFieldExclusionsType(e){var t={no_cookie:0,visible_fields:0},o=((0==+ctPublic.data__visible_fields_required||"get"===e.method.toString().toLowerCase()&&0===e.querySelectorAll(".nf-form-content").length&&"twt_cc_signup"!==e.id||e.classList.contains("slp_search_form")||e.parentElement.classList.contains("mec-booking")||-1!==e.action.toString().indexOf("activehosted.com")||e.id&&"caspioform"===e.id||e.classList&&e.classList.contains("tinkoffPayRow")||e.classList&&e.classList.contains("give-form")||e.id&&"ult-forgot-password-form"===e.id||e.id&&-1!==e.id.toString().indexOf("calculatedfields")||e.id&&-1!==e.id.toString().indexOf("sac-form")||e.id&&-1!==e.id.toString().indexOf("cp_tslotsbooking_pform")||e.name&&-1!==e.name.toString().indexOf("cp_tslotsbooking_pform")||"https://epayment.epymtservice.com/epay.jhtml"===e.action.toString()||e.name&&-1!==e.name.toString().indexOf("tribe-bar-form")||e.id&&"ihf-login-form"===e.id||e.id&&"subscriberForm"===e.id&&-1!==e.action.toString().indexOf("actionType=update")||e.id&&"ihf-main-search-form"===e.id||e.id&&"frmCalc"===e.id||-1!==e.action.toString().indexOf("property-organizer-delete-saved-search-submit")||null!==e.querySelector('a[name="login"]'))&&(t.visible_fields=1),e.parentNode);return(o&&o.classList.contains("proinput")||"options"===e.name&&e.classList.contains("asp-fss-flex"))&&(t.no_cookie=1),e&&e.classList.contains("woocommerce-form-login")&&(t.visible_fields=1,t.no_cookie=1),t}function ctCheckHiddenFieldsExclusions(e,t){var o="string"==typeof e.action?e.action:"";return!!Boolean(e.querySelector("fieldset.asl_sett_scroll"))||!!e.classList.contains("swpf-instant-filtering")||-1!==o.indexOf("secure.payu.com")||-1!==o.indexOf("hsforms")||"string"==typeof t&&-1!==["visible_fields","no_cookie"].indexOf(t)&&1===ctGetHiddenFieldExclusionsType(e)[t]}function ctNoCookieAttachHiddenFieldsToForms(){if("none"===ctPublic.data__cookies_type){var e=ctGetPageForms();if(e)for(var t=0;t<e.length;t++)if(!ctCheckHiddenFieldsExclusions(document.forms[t],"no_cookie")&&(null===document.forms[t].getAttribute("method")||"post"===document.forms[t].getAttribute("method").toLowerCase())){for(var o=e[t].querySelectorAll(".ct_no_cookie_hidden_field"),n=0;n<o.length;n++)o[n].outerHTML="";document.forms[t].append(ctNoCookieConstructHiddenField())}}}ctPublic.data__key_is_ok&&(apbct_attach_event_handler(document,"mousemove",ctFunctionMouseMove),apbct_attach_event_handler(document,"mousedown",ctFunctionFirstKey),apbct_attach_event_handler(document,"keydown",ctFunctionFirstKey),apbct_attach_event_handler(document,"scroll",ctSetHasScrolled)),ctPublic.data__key_is_ok&&("loading"!==document.readyState?apbct_ready():apbct_attach_event_handler(document,"DOMContentLoaded",apbct_ready),apbctLocalStorage.set("ct_checkjs",ctPublic.ct_checkjs_key,!0));var defaultFetch=window.fetch,defaultSend=XMLHttpRequest.prototype.send;function checkFormsExistForCatching(){setTimeout(function(){isFormThatNeedCatch()&&(window.fetch=function(){for(var e,t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return o&&o[0]&&"function"==typeof o[0].includes&&o[0].includes("/wp-json/metform/")&&(e=getNoCookieData(),o)&&o[1]&&o[1].body&&o[1].body.append("ct_no_cookie_hidden_field",e),defaultFetch.apply(window,o)})},1e3)}function isFormThatNeedCatch(){var e,o=["metform-form-content"],n=!1,t=_createForOfIteratorHelper(document.forms);try{for(t.s();!(e=t.n()).done;)(()=>{var t=e.value;o.forEach(function(e){t.classList.contains(e)&&(n=!0)})})()}catch(e){t.e(e)}finally{t.f()}return n}function isFormThatNeedCatchXhr(e){return null==document.querySelector("div.elementor-widget[title='Login/Signup']")&&!(!e||!e.action||-1===e.action.toString().indexOf("mailpoet_subscription_form"))}function getNoCookieData(){var e=apbctLocalStorage.getCleanTalkData(),t=apbctSessionStorage.getCleanTalkData(),e=_objectSpread(_objectSpread({},e),t),e=JSON.stringify(e);return"_ct_no_cookie_data_"+btoa(e)}function apbctWriteReferrersToSessionStorage(){var e=apbctSessionStorage.get("apbct_session_current_page");!1!==e&&document.location.href!==e&&apbctSessionStorage.set("apbct_prev_referer",e,!1),apbctSessionStorage.set("apbct_session_current_page",document.location.href,!1)}function apbctCheckAddToCartByGet(){document.querySelectorAll("a.add_to_cart_button:not(.product_type_variable):not(.wc-interactive)").forEach(function(n){n.addEventListener("click",function(e){var t=n.getAttribute("href"),o=apbctLocalStorage.get("bot_detector_event_token");o&&(-1===t.indexOf("?")?t+="?":t+="&",n.setAttribute("href",t+="ct_bot_detector_event_token="+o))})})}"loading"!==document.readyState?checkFormsExistForCatching():apbct_attach_event_handler(document,"DOMContentLoaded",checkFormsExistForCatching);var cleantalkModal={loaded:!1,loading:!1,opened:!1,opening:!1,ignoreURLConvert:!1,load:function(e){var t;this.loaded||(this.loading=!0,t=function(e,t,o,n){cleantalkModal.loading=!1,cleantalkModal.loaded=e,document.dispatchEvent(new CustomEvent("cleantalkModalContentLoaded",{bubbles:!0}))},("function"==typeof apbct_admin_sendAJAX?apbct_admin_sendAJAX:apbct_public_sendAJAX)({action:e},{callback:t,notJson:!0}))},open:function(){function e(){var e,t="";for(e in this.styles)t+=e+":"+this.styles[e]+";";return t}var t={styles:{"z-index":"9999999999",position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex","justify-content":"center","align-items":"center"},toString:e},o={styles:{position:"relative",padding:"30px",background:"#FFF",border:"1px solid rgba(0,0,0,0.75)","border-radius":"4px","box-shadow":"7px 7px 5px 0px rgba(50,50,50,0.75)"},toString:e},n={styles:{position:"absolute",background:"#FFF",width:"20px",height:"20px",border:"2px solid rgba(0,0,0,0.75)","border-radius":"15px",cursor:"pointer",top:"-8px",right:"-8px","box-sizing":"content-box"},toString:e},c={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(45deg)"},toString:e},a={styles:{content:'""',display:"block",position:"absolute",background:"#000","border-radius":"1px",width:"2px",height:"16px",top:"2px",left:"9px",transform:"rotate(-45deg)"},toString:e},i={styles:{overflow:"hidden"},toString:e},r=document.createElement("style"),i=(r.setAttribute("id","cleantalk-modal-styles"),r.innerHTML="body.cleantalk-modal-opened{"+i+"}",r.innerHTML+="#cleantalk-modal-overlay{"+t+"}",r.innerHTML+="#cleantalk-modal-close{"+n+"}",r.innerHTML+="#cleantalk-modal-close:before{"+c+"}",r.innerHTML+="#cleantalk-modal-close:after{"+a+"}",document.body.append(r),document.createElement("div")),t=(i.setAttribute("id","cleantalk-modal-overlay"),document.body.append(i),document.body.classList.add("cleantalk-modal-opened"),document.createElement("div")),n=(t.setAttribute("id","cleantalk-modal-inner"),t.setAttribute("style",o),i.append(t),document.createElement("div")),c=(n.setAttribute("id","cleantalk-modal-close"),t.append(n),document.createElement("div"));this.loaded?/.*\/inc/g.test(this.loaded)||this.ignoreURLConvert?c.innerHTML=this.loaded:c.innerHTML=this.loaded.replace(/(https?:\/\/[^\s]+)/g,'<a href="$1" target="_blank">$1</a>'):(c.innerHTML="Loading...",this.load("get_options_template")),c.setAttribute("id","cleantalk-modal-content"),t.append(c),this.opened=!0},close:function(){document.body.classList.remove("cleantalk-modal-opened"),document.getElementById("cleantalk-modal-overlay").remove(),document.getElementById("cleantalk-modal-styles").remove(),document.dispatchEvent(new CustomEvent("cleantalkModalClosed",{bubbles:!0}))}};function closeAllPopupTRP(){var e=document.querySelectorAll(".apbct-real-user-popup.visible");0<e.length&&e.forEach(function(e){e.classList.remove("visible")})}function apbctSetEmailDecoderPopupAnimation(){var e=["apbct_dog_one","apbct_dog_two","apbct_dog_three"],t=document.createElement("div");t.classList="apbct-ee-animation-wrapper";for(var o=0;o<e.length;o++){var n=document.createElement("span");n.classList="apbct_dog "+e[o],n.innerText="@",t.append(n)}return t}function ctFillDecodedEmailHandler(){var e,t,o,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0],c=!1,a="",i="",r=("undefined"!=typeof ctPublic?(this.removeEventListener("click",ctFillDecodedEmailHandler),c=this,ctPublic.encodedEmailNodesIsMixed=!1,a=ctPublic.wl_brandname,i=ctPublic.encodedEmailNodes):"undefined"!=typeof ctAdminCommon&&(a=ctAdminCommon.plugin_name,i=ctAdminCommon.encodedEmailNode),document.body.classList.add("apbct-popup-fade"),document.getElementById("apbct_popup"));r?(r.setAttribute("style","display: inherit"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?document.getElementById("apbct_popup_text").innerHTML=ctPublicFunctions.text__ee_wait_for_decoding:document.getElementById("apbct_popup_text").innerHTML=ctAdminCommon.text__ee_wait_for_decoding):((r=document.createElement("div")).setAttribute("class","apbct-popup apbct-email-encoder-popup"),r.setAttribute("id","apbct_popup"),(e=document.createElement("span")).classList="apbct-email-encoder-elements_center",(t=document.createElement("p")).innerText=a,t.setAttribute("class","apbct-email-encoder--popup-header"),e.append(t),(a=document.createElement("div")).setAttribute("id","apbct_popup_text"),a.setAttribute("class","apbct-email-encoder-elements_center"),a.style.color="black",(t=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_first","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_wait_for_decoding?t.innerText=ctPublicFunctions.text__ee_wait_for_decoding:t.innerText=ctAdminCommon.text__ee_wait_for_decoding,t.setAttribute("class","apbct-email-encoder-elements_center"),(o=document.createElement("p")).id="apbct_email_ecoder__popup_text_node_second","undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_decoding_process?o.innerText=ctPublicFunctions.text__ee_decoding_process:o.innerText=ctAdminCommon.text__ee_decoding_process,a.append(t),a.append(o),r.append(e),r.append(a),r.append(apbctSetEmailDecoderPopupAnimation()),document.body.append(r)),apbctAjaxEmailDecodeBulk(n,i,c)}function apbctAjaxEmailDecodeBulk(e,t,o){if(e&&o){for(var n={event_javascript_data:getJavascriptClientData(),post_url:document.location.href,referrer:document.referrer,encodedEmails:""},c={},a=0;a<t.length;a++){void 0!==t[a].href&&0===t[a].href.indexOf("mailto:")&&(e.preventDefault(),ctPublic.encodedEmailNodesIsMixed=!0);var i=document.createElement("div");i.setAttribute("class","apbct-tooltip"),apbct(t[a]).append(i),c[a]=t[a].dataset.originalString}n.encodedEmails=JSON.stringify(c),"rest"===ctPublicFunctions.data__ajax_type?apbct_public_sendREST("apbct_decode_email",{data:n,method:"POST",callback:function(e){ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}):(n.action="apbct_decode_email",apbct_public_sendAJAX(n,{notJson:!1,callback:function(e){console.log("result"),console.log(e),ctSetCookie("apbct_email_encoder_passed",ctPublic.emailEncoderPassKey,""),apbctEmailEncoderCallbackBulk(e,t,o)},onErrorCallback:function(e){resetEncodedNodes(),ctShowDecodeComment(e)}}))}else{var n=t.dataset.originalString,n={encodedEmails:JSON.stringify({0:n})},r=document.createElement("div");r.setAttribute("class","apbct-tooltip"),t.appendChild(r),apbct_admin_sendAJAX({action:"apbct_decode_email",encodedEmails:n.encodedEmails},{callback:function(e){apbctEmailEncoderCallbackBulk(e,t,!1)},notJson:!0})}}function apbctEmailEncoderCallbackBulk(a,i){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2];a.success&&!0===a.data[0].is_allowed?setTimeout(function(){var t,e,o,n,c=document.getElementById("apbct_popup");null!==c&&(n="",n=r?(a.data.forEach(function(e){e.encoded_email===r.dataset.originalString&&(t=e)}),t.decoded_email.split(/[&?]/)[0]):a.data[0].decoded_email,o=c.querySelector("#apbct_email_ecoder__popup_text_node_first"),(e=document.createElement("b")).setAttribute("class","apbct-email-encoder-select-whole-email"),e.innerText=n,"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_click_to_select?e.title=ctPublicFunctions.text__ee_click_to_select:e.title=ctAdminCommon.text__ee_click_to_select,o&&("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_original_email?o.innerHTML=ctPublicFunctions.text__ee_original_email+" "+e.outerHTML:o.innerHTML=ctAdminCommon.text__ee_original_email+" "+e.outerHTML,o.setAttribute("style","flex-direction: row;")),(n=c.querySelector(".apbct-ee-animation-wrapper"))&&n.remove(),(e=c.querySelector("#apbct_email_ecoder__popup_text_node_second"))&&e.remove(),(o=document.createElement("span")).classList="apbct-email-encoder-elements_center top-margin-long",document.querySelector(".apbct-email-encoder-got-it-button")||(n=document.createElement("button"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_got_it?n.innerText=ctPublicFunctions.text__ee_got_it:n.innerText=ctAdminCommon.text__ee_got_it,n.classList="apbct-email-encoder-got-it-button",n.addEventListener("click",function(){document.body.classList.remove("apbct-popup-fade"),c.setAttribute("style","display:none"),fillDecodedNodes(i,a),"undefined"!=typeof ctPublic&&ctPublic.encodedEmailNodesIsMixed&&r&&r.click()}),o.append(n),c.append(o)))},3e3):r?a.success?(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_blocked?ctShowDecodeComment(ctPublicFunctions.text__ee_blocked+": "+a.data[0].comment):ctShowDecodeComment(ctAdminCommon.text__ee_blocked+": "+a.data[0].comment)):(resetEncodedNodes(),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_connect?ctShowDecodeComment(ctPublicFunctions.text__ee_cannot_connect+": "+a.apbct.comment):ctShowDecodeComment(ctAdminCommon.text__ee_cannot_connect+": "+a.data[0].comment)):console.log("result",a)}function resetEncodedNodes(){void 0!==ctPublic.encodedEmailNodes&&ctPublic.encodedEmailNodes.forEach(function(e){e.addEventListener("click",ctFillDecodedEmailHandler)})}function ctShowDecodeComment(e){e=e||("undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_cannot_decode?ctPublicFunctions:ctAdminCommon).text__ee_cannot_decode;var t=document.getElementById("apbct_popup"),o=document.getElementById("apbct_popup_text");null!==t&&(document.body.classList.remove("apbct-popup-fade"),"undefined"!=typeof ctPublicFunctions&&ctPublicFunctions.text__ee_email_decoder?o.innerText=ctPublicFunctions.text__ee_email_decoder+": "+e:o.innerText=ctAdminCommon.text__ee_email_decoder+": "+e,setTimeout(function(){t.setAttribute("style","display:none")},3e3))}function fillDecodedNodes(a,i){if(0<a.length){for(var e,t=0;t<a.length;t++)if(0!==(e=(t=>{var o,e;if(i.data.forEach(function(e){e.encoded_email===a[t].dataset.originalString&&(o=e)}),!1===o.is_allowed)return{v:void 0};if(void 0===a[t].href||0!==a[t].href.indexOf("mailto:")&&0!==a[t].href.indexOf("tel:"))a[t].classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(o,a[t])},2e3);else{if(0===a[t].href.indexOf("mailto:"))e="mailto:";else{if(0!==a[t].href.indexOf("tel:"))return 0;e="tel:"}var n=a[t].href.replace(e,""),c=a[t].innerHTML;a[t].innerHTML=c.replace(n,o.decoded_email),a[t].href=e+o.decoded_email,a[t].querySelectorAll("span.apbct-email-encoder").forEach(function(t){var o="";i.data.forEach(function(e){e.encoded_email===t.dataset.originalString&&(o=e.decoded_email)}),t.innerHTML=o})}a[t].removeEventListener("click",ctFillDecodedEmailHandler)})(t))&&e)return e.v}else{var o=i.data[0];a.classList.add("no-blur"),setTimeout(function(){ctProcessDecodedDataResult(o,a)},2e3),a.removeEventListener("click",ctFillDecodedEmailHandler)}}function ctProcessDecodedDataResult(e,t){t.setAttribute("title",""),t.removeAttribute("style"),ctFillDecodedEmail(t,e.decoded_email)}function ctFillDecodedEmail(e,t){e.innerHTML=e.innerHTML.replace(/.+?(<div class=["']apbct-tooltip["'].+?<\/div>)/,t+"$1")}document.addEventListener("click",function(e){!e.target||"cleantalk-modal-overlay"!==e.target.id&&"cleantalk-modal-close"!==e.target.id||cleantalkModal.close()}),document.addEventListener("cleantalkModalContentLoaded",function(e){cleantalkModal.opened&&cleantalkModal.loaded&&(document.getElementById("cleantalk-modal-content").innerHTML=cleantalkModal.loaded)}),document.addEventListener("DOMContentLoaded",function(){var e,t=this,l=void 0,d=!1;"undefined"==typeof ctPublic&&"undefined"==typeof ctTrpAdminLocalize||void 0===(l="undefined"!=typeof ctPublic&&ctPublic.theRealPerson?ctPublic.theRealPerson:l)&&"undefined"!=typeof ctTrpAdminLocalize&&ctTrpAdminLocalize.theRealPerson&&(l=ctTrpAdminLocalize.theRealPerson,d=!0),l&&(e='.apbct-trp *[class*="comment-author"]',document.querySelector(".apbct-trp .comment-author .comment-author-link")&&(e='.apbct-trp *[class*="comment-author-link"]'),0!==(e=document.querySelectorAll(e+',.apbct-trp *[class*="review__author"],.apbct-trp td[class*="column-author"] > strong')).length)&&(e.forEach(function(e,t){var o,n,c,a,i,r,s;"undefined"==typeof pagenow&&e.parentElement.className.indexOf("group")<0&&"DIV"!=e.tagName||((o=document.createElement("div")).setAttribute("class","apbct-real-user-badge"),(n=document.createElement("img")).setAttribute("src",l.imgPersonUrl),n.setAttribute("class","apbct-real-user-popup-img"),(c=document.createElement("div")).setAttribute("class","apbct-real-user-popup"),(a=document.createElement("p")).setAttribute("class","apbct-real-user-popup-header"),a.append(l.phrases.trpHeading),(i=document.createElement("div")).setAttribute("class","apbct-real-user-popup-content_row"),(r=document.createElement("span")).append(l.phrases.trpContent1+" "),r.append(l.phrases.trpContent2),d&&((s=document.createElement("a")).setAttribute("href",l.trpContentLink),s.setAttribute("target","_blank"),s.text=l.phrases.trpContentLearnMore,r.append(" "),r.append(s)),i.append(r),c.append(a,i),o.append(n),e.append(o),e.append(c))}),document.querySelectorAll(".apbct-real-user-badge").forEach(function(n){var c=void 0,e=(t.body.addEventListener("click",function(e){-1==e.target.className.indexOf("apbct-real-user")&&-1==e.target.parentElement.className.indexOf("apbct-real-user")&&closeAllPopupTRP()}),n.addEventListener("click",function(){var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.toggle("visible")}),n.addEventListener("mouseenter",function(){closeAllPopupTRP();var e=this.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.add("visible")}),n.addEventListener("mouseleave",function(){var t=this;c=setTimeout(function(){var e=t.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),n.nextElementSibling);e.addEventListener("mouseenter",function(){clearTimeout(c),e.classList.add("visible")}),e.addEventListener("mouseleave",function(){c=setTimeout(function(){e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},1e3)}),n.addEventListener("touchend",function(){var o=this;c=setTimeout(function(){var e=o.nextElementSibling,t=window.getSelection();e&&t&&e.classList.contains("apbct-real-user-popup")&&0===t.toString().length?e.classList.remove("visible"):(clearTimeout(c),document.addEventListener("selectionchange",function e(){var t=window.getSelection();t&&0===t.toString().length&&(c=setTimeout(function(){var e=n.nextElementSibling;e&&e.classList.contains("apbct-real-user-popup")&&e.classList.remove("visible")},3e3),document.removeEventListener("selectionchange",e))}))},3e3)})}))});