{"version":3,"file":"apbct-public-bundle_ext-protection.min.js","sources":["apbct-public-bundle_ext-protection.js"],"sourcesContent":["/**\n * Base class\n */\nclass ApbctCore {\n    ajax_parameters = {};\n    restParameters = {};\n\n    selector = null;\n    elements = [];\n\n    // Event properties\n    eventCallback;\n    eventSelector;\n    event;\n\n    /**\n     * Default constructor\n     * @param {string} selector\n     */\n    constructor(selector) {\n        this.select(selector);\n    }\n\n    /**\n     * Get elements by CSS selector\n     *\n     * @param {string} selector\n     * @return {*}\n     */\n    select(selector) {\n        if (selector instanceof HTMLCollection) {\n            this.selector = null;\n            this.elements = [];\n            this.elements = Array.prototype.slice.call(selector);\n        } else if ( typeof selector === 'object' ) {\n            this.selector = null;\n            this.elements = [];\n            this.elements[0] = selector;\n        } else if ( typeof selector === 'string' ) {\n            this.selector = selector;\n            this.elements = Array.prototype.slice.call(document.querySelectorAll(selector));\n            // this.elements = document.querySelectorAll(selector)[0];\n        } else {\n            this.deselect();\n        }\n\n        return this;\n    }\n\n    /**\n     * @param {object|string} elemToAdd\n     */\n    addElement(elemToAdd) {\n        if ( typeof elemToAdd === 'object' ) {\n            this.elements.push(elemToAdd);\n        } else if ( typeof elemToAdd === 'string' ) {\n            this.selector = elemToAdd;\n            this.elements = Array.prototype.slice.call(document.querySelectorAll(elemToAdd));\n        } else {\n            this.deselect();\n        }\n    }\n\n    /**\n     * @param {object} elem\n     */\n    push(elem) {\n        this.elements.push(elem);\n    }\n\n    /**\n     * reduce\n     */\n    reduce() {\n        this.elements = this.elements.slice(0, -1);\n    }\n\n    /**\n     * deselect\n     */\n    deselect() {\n        this.elements = [];\n    }\n\n    /**\n     * Set or get CSS for/of currently selected element\n     *\n     * @param {object|string} style\n     * @param {boolean} getRaw\n     *\n     * @return {boolean|*}\n     */\n    css(style, getRaw) {\n        getRaw = getRaw || false;\n\n        // Set style\n        if (typeof style === 'object') {\n            const stringToCamelCase = (str) =>\n                str.replace(/([-_][a-z])/g, (group) =>\n                    group\n                        .toUpperCase()\n                        .replace('-', '')\n                        .replace('_', ''),\n                );\n\n            // Apply multiple styles\n            for (const styleName in style) {\n                if (Object.hasOwn(style, styleName)) {\n                    const DomStyleName = stringToCamelCase(styleName);\n\n                    // Apply to multiple elements (currently selected)\n                    for (let i=0; i<this.elements.length; i++) {\n                        this.elements[i].style[DomStyleName] = style[styleName];\n                    }\n                }\n            }\n\n            return this;\n        }\n\n        // Get style of first currently selected element\n        if (typeof style === 'string') {\n            let computedStyle = getComputedStyle(this.elements[0])[style];\n\n            // Process\n            if ( typeof computedStyle !== 'undefined' && ! getRaw) {\n                // Cut of units\n                computedStyle = computedStyle.replace(/(\\d)(em|pt|%|px){1,2}$/, '$1');\n                // Cast to INT\n                computedStyle = Number(computedStyle) == computedStyle ? Number(computedStyle) : computedStyle;\n                return computedStyle;\n            }\n\n            // Return unprocessed\n            return computedStyle;\n        }\n    }\n\n    /**\n     * hide\n     */\n    hide() {\n        this.prop('prev-display', this.css('display'));\n        this.css({'display': 'none'});\n    }\n\n    /**\n     * show\n     */\n    show() {\n        this.css({'display': this.prop('prev-display')});\n    }\n\n    /**\n     * addClass\n     */\n    addClass() {\n        for (let i=0; i<this.elements.length; i++) {\n            this.elements[i].classList.add(className);\n        }\n    }\n\n    /**\n     * removeClass\n     */\n    removeClass() {\n        for (let i=0; i<this.elements.length; i++) {\n            this.elements[i].classList.remove(className);\n        }\n    }\n\n    /**\n     * @param {string} className\n     */\n    toggleClass(className) {\n        for (let i=0; i<this.elements.length; i++) {\n            this.elements[i].classList.toggle(className);\n        }\n    }\n\n    /**\n     * Wrapper for apbctAJAX class\n     *\n     * @param {object|array} ajaxParameters\n     * @return {ApbctAjax}\n     */\n    ajax(ajaxParameters) {\n        this.ajax_parameters = ajaxParameters;\n        return new ApbctAjax(ajaxParameters);\n    }\n\n    /**\n     * Wrapper for apbctREST class\n     *\n     * @param {object|array} restParameters\n     * @return {ApbctRest}\n     */\n    rest(restParameters) {\n        this.restParameters = restParameters;\n        return new ApbctRest(restParameters);\n    }\n\n    /**\n     * ************ EVENTS *************\n     */\n\n    /**\n     *\n     * Why the mess with arguments?\n     *\n     * Because we need to support the following function signatures:\n     *      on('click',                   function(){ alert('some'); });\n     *      on('click', 'inner_selector', function(){ alert('some'); });\n     *\n     * @param {object|array} args\n     */\n    on(...args) {\n        this.event = args[0];\n        this.eventCallback = args[2] || args[1];\n        this.eventSelector = typeof args[1] === 'string' ? args[1] : null;\n\n        for (let i=0; i<this.elements.length; i++) {\n            this.elements[i].addEventListener(\n                this.event,\n                this.eventSelector !== null ?\n                    this.onChecker.bind(this) :\n                    this.eventCallback,\n            );\n        }\n    }\n\n    /**\n     * Check if a selector of an event matches current target\n     *\n     * @param {object} event\n     * @return {*}\n     */\n    onChecker(event) {\n        if (event.target === document.querySelector(this.eventSelector)) {\n            event.stopPropagation();\n            return this.eventCallback(event);\n        }\n    }\n\n    /**\n     * @param {object|function|string} callback\n     */\n    ready(callback) {\n        document.addEventListener('DOMContentLoaded', callback);\n    }\n\n    /**\n     * @param {object|function|string} callback\n     */\n    change(callback) {\n        this.on('change', callback);\n    }\n\n    /**\n     * ATTRIBUTES\n     */\n\n    /**\n     * Get an attribute or property of an element\n     *\n     * @param {string} attrName\n     * @return {*|*[]}\n     */\n    attr(attrName) {\n        let outputValue = [];\n\n        for (let i=0; i<this.elements.length; i++) {\n            // Use property instead of attribute if possible\n            if (typeof this.elements[i][attrName] !== 'undefined') {\n                outputValue.push(this.elements[i][attrName]);\n            } else {\n                outputValue.push(this.elements[i].getAttribute(attrName));\n            }\n        }\n\n        // Return a single value instead of array if only one value is present\n        return outputValue.length === 1 ? outputValue[0] : outputValue;\n    }\n\n    /**\n     * @param {string} propName\n     * @param {mixed} value\n     * @return {*|*[]|ApbctCore}\n     */\n    prop(propName, value) {\n        // Setting values\n        if (typeof value !== 'undefined') {\n            for (let i=0; i<this.elements.length; i++) {\n                this.elements[i][propName] = value;\n            }\n\n            return this;\n\n            // Getting values\n        } else {\n            const outputValue = [];\n\n            for (let i=0; i<this.elements.length; i++) {\n                outputValue.push(this.elements[i][propName]);\n            }\n\n            // Return a single value instead of array if only one value is present\n            return outputValue.length === 1 ? outputValue[0] : outputValue;\n        }\n    }\n\n    /**\n     * Set or get inner HTML\n     *\n     * @param {string} value\n     * @return {*|*[]}\n     */\n    html(value) {\n        return typeof value !== 'undefined' ?\n            this.prop('innerHTML', value) :\n            this.prop('innerHTML');\n    }\n\n    /**\n     * Set or get value of input tags\n     *\n     * @param {mixed} value\n     * @return {*|*[]|undefined}\n     */\n    val(value) {\n        return typeof value !== 'undefined' ?\n            this.prop('value', value) :\n            this.prop('value');\n    }\n\n    /**\n     * @param {string} name\n     * @param {mixed} value\n     * @return {*|*[]|ApbctCore}\n     */\n    data(name, value) {\n        return typeof value !== 'undefined' ?\n            this.prop('apbct-data', name, value) :\n            this.prop('apbct-data');\n    }\n\n    /**\n     * END OF ATTRIBUTES\n     */\n\n    /**\n     * FILTERS\n     */\n\n    /**\n     * Check if the current elements are corresponding to filter\n     *\n     * @param {mixed} filter\n     * @return {boolean}\n     */\n    is(filter) {\n        let outputValue = false;\n\n        for (let elem of this.elements) {\n            outputValue ||= this.isElem(elem, filter);\n        }\n\n        return outputValue;\n    }\n\n    /**\n     * @param {string|object} elemToCheck\n     * @param {mixed} filter\n     * @return {boolean}\n     */\n    isElem(elemToCheck, filter) {\n        let is = false;\n        let isRegisteredTagName = function(name) {\n            let newlyCreatedElement = document.createElement(name).constructor;\n            return ! Boolean( ~[HTMLElement, HTMLUnknownElement].indexOf(newlyCreatedElement) );\n        };\n\n        // Check for filter function\n        if (typeof filter === 'function') {\n            is ||= filter.call(this, elemToCheck);\n        }\n\n        // Check for filter function\n        if (typeof filter === 'string') {\n            // Filter is tag name\n            if ( filter.match(/^[a-z]/) && isRegisteredTagName(filter) ) {\n                is ||= elemToCheck.tagName.toLowerCase() === filter.toLowerCase();\n\n                // Filter is property\n            } else if ( filter.match(/^[a-z]/) ) {\n                is ||= Boolean(elemToCheck[filter]);\n\n                // Filter is CSS selector\n            } else {\n                is ||= this.selector !== null ?\n                    document.querySelector(this.selector + filter) !== null : // If possible\n                    this.isWithoutSelector(elemToCheck, filter); // Search through all elems with such selector\n            }\n        }\n\n        return is;\n    }\n\n    /**\n     * @param {object|string} elemToCheck\n     * @param {mixed} filter\n     * @return {boolean}\n     */\n    isWithoutSelector(elemToCheck, filter) {\n        const elems = document.querySelectorAll(filter);\n        let outputValue = false;\n\n        for (let elem of elems) {\n            outputValue ||= elemToCheck === elem;\n        }\n\n        return outputValue;\n    }\n\n    /**\n     * @param {mixed} filter\n     * @return {ApbctCore}\n     */\n    filter(filter) {\n        this.selector = null;\n\n        for ( let i = this.elements.length - 1; i >= 0; i-- ) {\n            if ( ! this.isElem(this.elements[i], filter) ) {\n                this.elements.splice(Number(i), 1);\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * NODES\n     */\n\n    /**\n     * @param {mixed} filter\n     * @return {ApbctCore}\n     */\n    parent(filter) {\n        this.select(this.elements[0].parentElement);\n\n        if ( typeof filter !== 'undefined' && ! this.is(filter) ) {\n            this.deselect();\n        }\n\n        return this;\n    }\n\n    /**\n     * @param {mixed} filter\n     * @return {ApbctCore}\n     */\n    parents(filter) {\n        this.select(this.elements[0]);\n\n        for ( ; this.elements[this.elements.length - 1].parentElement !== null; ) {\n            this.push(this.elements[this.elements.length - 1].parentElement);\n        }\n\n        this.elements.splice(0, 1); // Deleting initial element from the set\n\n        if ( typeof filter !== 'undefined' ) {\n            this.filter(filter);\n        }\n\n        return this;\n    }\n\n    /**\n     * @param {mixed} filter\n     * @return {ApbctCore}\n     */\n    children(filter) {\n        this.select(this.elements[0].children);\n\n        if ( typeof filter !== 'undefined' ) {\n            this.filter(filter);\n        }\n\n        return this;\n    }\n\n    /**\n     * @param {mixed} filter\n     * @return {ApbctCore}\n     */\n    siblings(filter) {\n        let current = this.elements[0]; // Remember current to delete it later\n\n        this.parent();\n        this.children(filter);\n        this.elements.splice(this.elements.indexOf(current), 1); // Remove current element\n\n        return this;\n    }\n\n    /** ************ DOM MANIPULATIONS **************/\n    remove() {\n        for (let elem of this.elements) {\n            elem.remove();\n        }\n    }\n\n    /**\n     * @param {string} content\n     */\n    after(content) {\n        for (let elem of this.elements) {\n            elem.after(content);\n        }\n    }\n\n    /**\n     * @param {string} content\n     */\n    append(content) {\n        for (let elem of this.elements) {\n            elem.append(content);\n        }\n    }\n\n    /** ************  ANIMATION  **************/\n    /**\n     * @param {number} time\n     */\n    fadeIn(time) {\n        for (let elem of this.elements) {\n            elem.style.opacity = 0;\n            elem.style.display = 'block';\n\n            let last = +new Date();\n            const tick = function() {\n                elem.style.opacity = +elem.style.opacity + (new Date() - last) / time;\n                last = +new Date();\n\n                if (+elem.style.opacity < 1) {\n                    (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n                }\n            };\n\n            tick();\n        }\n    }\n\n    /**\n     * @param {number} time\n     */\n    fadeOut(time) {\n        for (let elem of this.elements) {\n            elem.style.opacity = 1;\n\n            let last = +new Date();\n            const tick = function() {\n                elem.style.opacity = +elem.style.opacity - (new Date() - last) / time;\n                last = +new Date();\n\n                if (+elem.style.opacity > 0) {\n                    (window.requestAnimationFrame && requestAnimationFrame(tick)) || setTimeout(tick, 16);\n                } else {\n                    elem.style.display = 'none';\n                }\n            };\n\n            tick();\n        }\n    }\n}\n\n/**\n * Hack\n *\n * Make a proxy to keep both properties and methods from:\n *  - the native object and\n *  - the new one from ApbctCore for selected element.\n *\n * For example:\n * apbct('#id).innerHTML = 'some';\n * apbct('#id).css({'backgorund-color': 'black'});\n */\n// apbct = new Proxy(\n//         apbct,\n//         {\n//             get(target, prop) {\n//                 if (target.elements.length) {\n//                     return target.elements[0][prop];\n//                 } else {\n//                     return null;\n//                 }\n//             },\n//             set(target, prop, value){\n//                 if (target.elements.length) {\n//                     target.elements[0][prop] = value;\n//                     return true;\n//                 } else {\n//                     return false;\n//                 }\n//             },\n//             apply(target, thisArg, argArray) {\n//\n//             }\n//         }\n//     );\n\n/**\n * @param {mixed} msg\n * @param {string} url\n */\nfunction ctProcessError(msg, url) {\n    let log = {};\n    if (msg && msg.message) {\n        log.err = {\n            'msg': msg.message,\n            'file': !!msg.fileName ? msg.fileName : false,\n            'ln': !!msg.lineNumber ? msg.lineNumber : !!lineNo ? lineNo : false,\n            'col': !!msg.columnNumber ? msg.columnNumber : !!columnNo ? columnNo : false,\n            'stacktrace': !!msg.stack ? msg.stack : false,\n            'cause': !!url ? JSON.stringify(url) : false,\n            'errorObj': !!error ? error : false,\n        };\n    } else {\n        log.err = {\n            'msg': msg,\n        };\n\n        if (!!url) {\n            log.err.file = url;\n        }\n    }\n\n    log.url = window.location.href;\n    log.userAgent = window.navigator.userAgent;\n\n    let ctJsErrors = 'ct_js_errors';\n    let errArray = localStorage.getItem(ctJsErrors);\n    if (errArray === null) errArray = '[]';\n    errArray = JSON.parse(errArray);\n    for (let i = 0; i < errArray.length; i++) {\n        if (errArray[i].err.msg === log.err.msg) {\n            return;\n        }\n    }\n\n    errArray.push(log);\n    localStorage.setItem(ctJsErrors, JSON.stringify(errArray));\n}\n\nif (Math.floor(Math.random() * 100) === 1) {\n    window.onerror = function(exception, url) {\n        let filterWords = ['apbct', 'ctPublic'];\n        let length = filterWords.length;\n        while (length--) {\n            if (exception.indexOf(filterWords[length]) !== -1) {\n                ctProcessError(exception, url);\n            }\n        }\n\n        return false;\n    };\n}\n\n/**\n * Select actual WP nonce depending on the ajax type and the fresh nonce provided.\n * @return {string} url\n */\nfunction selectActualNonce() {\n    let defaultNonce = '';\n    // return fresh nonce immediately if persists\n    if (\n        ctPublicFunctions.hasOwnProperty('_fresh_nonce') &&\n        typeof ctPublicFunctions._fresh_nonce === 'string' &&\n        ctPublicFunctions._fresh_nonce.length > 0\n    ) {\n        return ctPublicFunctions._fresh_nonce;\n    }\n    // select from default rest/ajax nonces\n    if (\n        ctPublicFunctions.data__ajax_type === 'admin_ajax' &&\n        ctPublicFunctions.hasOwnProperty('_ajax_nonce') &&\n        typeof ctPublicFunctions._ajax_nonce === 'string' &&\n        ctPublicFunctions._ajax_nonce.length > 0\n    ) {\n        defaultNonce = ctPublicFunctions._ajax_nonce;\n    }\n    if (\n        ctPublicFunctions.data__ajax_type === 'rest' &&\n        ctPublicFunctions.hasOwnProperty('_rest_nonce') &&\n        typeof ctPublicFunctions._rest_nonce === 'string' &&\n        ctPublicFunctions._rest_nonce.length > 0\n    ) {\n        defaultNonce = ctPublicFunctions._rest_nonce;\n    }\n\n    return defaultNonce;\n}\n\n/**\n * Enter point to ApbctCore class\n *\n * @param {array|object} params\n * @return {*}\n */\n// eslint-disable-next-line no-unused-vars, require-jsdoc\nfunction apbct(params) {\n    return new ApbctCore()\n        .select(params);\n}\n\n/**\n * ApbctXhr\n */\nclass ApbctXhr {\n    xhr = new XMLHttpRequest();\n\n    // Base parameters\n    method = 'POST'; // HTTP-request type\n    url = ''; // URL to send the request\n    async = true;\n    user = null; // HTTP-authorization username\n    password = null; // HTTP-authorization password\n    data = {}; // Data to send\n\n    // Optional params\n    button = null; // Button that should be disabled when request is performing\n    spinner = null; // Spinner that should appear when request is in process\n    progressbar = null; // Progress bar for the current request\n    context = this; // Context\n    callback = null;\n    onErrorCallback = null;\n\n    responseType = 'json'; // Expected data type from server\n    headers = {};\n    timeout = 15000; // Request timeout in milliseconds\n\n    methods_to_convert_data_to_URL = [\n        'GET',\n        'HEAD',\n    ];\n\n    body = null;\n    http_code = 0;\n    status_text = '';\n\n    // eslint-disable-next-line require-jsdoc\n    constructor(parameters) {\n        // Set class properties\n        for ( let key in parameters ) {\n            if ( typeof this[key] !== 'undefined' ) {\n                this[key] = parameters[key];\n            }\n        }\n\n        // Modifying DOM-elements\n        this.prepare();\n\n        // Modify URL with data for GET and HEAD requests\n        if ( Object.keys(this.data).length ) {\n            this.deleteDoubleJSONEncoding(this.data);\n            this.convertData();\n        }\n\n        if ( ! this.url ) {\n            console.log('%cXHR%c not URL provided',\n                'color: red; font-weight: bold;', 'color: grey; font-weight: normal;');\n            return false;\n        }\n\n        // Configure the request\n        this.xhr.open(this.method, this.url, this.async, this.user, this.password);\n        this.setHeaders();\n\n        this.xhr.responseType = this.responseType;\n        this.xhr.timeout = this.timeout;\n\n        /* EVENTS */\n        // Monitoring status\n        this.xhr.onreadystatechange = function() {\n            if (this.isWpNonceError()) {\n                this.getFreshNonceAndRerunXHR(parameters);\n                return;\n            }\n            this.onReadyStateChange();\n        }.bind(this);\n\n        // Run callback\n        this.xhr.onload = function() {\n            this.onLoad();\n        }.bind(this);\n\n        // On progress\n        this.xhr.onprogress = function(event) {\n            this.onProgress(event);\n        }.bind(this);\n\n        // On error\n        this.xhr.onerror = function() {\n            this.onError();\n        }.bind(this);\n\n        this.xhr.ontimeout = function() {\n            this.onTimeout();\n        }.bind(this);\n\n        // Send the request\n        this.xhr.send(this.body);\n    }\n\n    /**\n     * prepare\n     */\n    prepare() {\n        // Disable button\n        if (this.button) {\n            this.button.setAttribute('disabled', 'disabled');\n            this.button.style.cursor = 'not-allowed';\n        }\n\n        // Enable spinner\n        if (this.spinner) {\n            this.spinner.style.display = 'inline';\n        }\n    }\n\n    /**\n     * complete\n     */\n    complete() {\n        this.http_code = this.xhr.status;\n        this.status_text = this.xhr.statusText;\n\n        // Disable button\n        if (this.button) {\n            this.button.removeAttribute('disabled');\n            this.button.style.cursor = 'auto';\n        }\n\n        // Enable spinner\n        if (this.spinner) {\n            this.spinner.style.display = 'none';\n        }\n\n        if ( this.progressbar ) {\n            this.progressbar.fadeOut('slow');\n        }\n    }\n\n    /**\n     * onReadyStateChange\n     */\n    onReadyStateChange() {\n        if (this.on_ready_state_change !== null && typeof this.on_ready_state_change === 'function') {\n            this.on_ready_state_change();\n        }\n    }\n\n    /**\n     * @param {object} event\n     */\n    onProgress(event) {\n        if (this.on_progress !== null && typeof this.on_progress === 'function') {\n            this.on_progress();\n        }\n    }\n\n    /**\n     * onError\n     */\n    onError() {\n        console.log('error');\n\n        this.complete();\n        this.error(\n            this.http_code,\n            this.status_text,\n        );\n\n        if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function') {\n            this.onErrorCallback(this.status_text);\n        }\n    }\n\n    /**\n     * onTimeout\n     */\n    onTimeout() {\n        this.complete();\n        this.error(\n            0,\n            'timeout',\n        );\n\n        if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function') {\n            this.onErrorCallback('Timeout');\n        }\n    }\n\n    /**\n     * @return {boolean}\n     */\n    onLoad() {\n        this.complete();\n\n        if (this.responseType === 'json' ) {\n            if (this.xhr.response === null) {\n                this.error(this.http_code, this.status_text, 'No response');\n                return false;\n            } else if ( typeof this.xhr.response.error !== 'undefined') {\n                this.error(this.http_code, this.status_text, this.xhr.response.error);\n                return false;\n            }\n        }\n\n        if (this.callback !== null && typeof this.callback === 'function') {\n            this.callback.call(this.context, this.xhr.response, this.data);\n        }\n    }\n\n    /**\n     * Check if 403 code of WP nonce error\n     * @return {bool}\n     */\n    isWpNonceError() {\n        let restErrror = false;\n        let ajaxErrror = false;\n        // check rest error\n        if (this.xhr.readyState == 4) {\n            restErrror = (\n                typeof this.xhr.response === 'object' && this.xhr.response !== null &&\n                this.xhr.response.hasOwnProperty('data') &&\n                this.xhr.response.data.hasOwnProperty('status') &&\n                this.xhr.response.data.status === 403\n            );\n            ajaxErrror = this.xhr.response === '-1' && this.xhr.status === 403;\n        }\n        // todo check AJAX error\n        return restErrror || ajaxErrror;\n    }\n\n    /**\n     * Get the fresh nonce and rerun the initial XHR with params\n     * @param {[]} initialRequestParams\n     */\n    getFreshNonceAndRerunXHR(initialRequestParams) {\n        let noncePrev = '';\n\n        // Check if initialRequestParams['headers']['X-WP-Nonce'] exists.\n        if (\n            initialRequestParams.hasOwnProperty('headers') &&\n            initialRequestParams.headers.hasOwnProperty('X-WP-Nonce')\n        ) {\n            noncePrev = initialRequestParams['headers']['X-WP-Nonce'];\n        }\n\n        // Check if initialRequestParams['data']['_ajax_nonce'] exists.\n        if (\n            initialRequestParams.hasOwnProperty('data') &&\n            initialRequestParams.data.hasOwnProperty('_ajax_nonce')\n        ) {\n            noncePrev = initialRequestParams['data']['_ajax_nonce'];\n        }\n\n        // Nonce is not provided. Exit.\n        if ( noncePrev === '' ) {\n            return;\n        }\n\n        // prepare params for refreshing nonce\n        let params = {};\n        params.method = 'POST';\n        params.data = {\n            'spbc_remote_call_action': 'get_fresh_wpnonce',\n            'plugin_name': 'antispam',\n            'nonce_prev': noncePrev,\n            'initial_request_params': initialRequestParams,\n        };\n        params.notJson = true;\n        params.url = ctPublicFunctions.host_url;\n        // this callback will rerun the XHR with initial params\n        params.callback = function(...args) {\n            // the refresh result itself\n            let freshNonceResult = args[0];\n            let newRequestParams = false;\n            // provided initial params\n            if (args[1] !== undefined && args[1].hasOwnProperty('initial_request_params')) {\n                newRequestParams = args[1].initial_request_params;\n            }\n            if (newRequestParams && freshNonceResult.hasOwnProperty('wpnonce')) {\n                ctPublicFunctions._fresh_nonce = freshNonceResult.wpnonce;\n                if (ctPublicFunctions.data__ajax_type === 'rest') {\n                    new ApbctCore().rest(newRequestParams);\n                } else {\n                    new ApbctCore().ajax(newRequestParams);\n                }\n            }\n        };\n        // run the nonce refreshing call\n        new ApbctXhr(params);\n    }\n\n    /**\n     * @param {number} httpCode\n     * @param {string} statusText\n     * @param {string} additionalMsg\n     */\n    error(httpCode, statusText, additionalMsg) {\n        let errorString = '';\n\n        if ( statusText === 'timeout' ) {\n            errorString += 'Server response timeout';\n        } else if ( httpCode === 200 ) {\n            if ( statusText === 'parsererror' ) {\n                errorString += 'Unexpected response from server. See console for details.';\n            } else {\n                errorString += 'Unexpected error. Status: ' + statusText + '.';\n                if ( typeof additionalMsg !== 'undefined' ) {\n                    errorString += ' Additional error info: ' + additionalMsg;\n                }\n            }\n        } else if (httpCode === 500) {\n            errorString += 'Internal server error.';\n        } else {\n            errorString += 'Unexpected response code:' + httpCode;\n        }\n\n        this.errorOutput( errorString );\n\n        if (this.onErrorCallback !== null && typeof this.onErrorCallback === 'function') {\n            this.onErrorCallback(this.status_text);\n        }\n    }\n\n    /**\n     * @param {string} errorMsg\n     */\n    errorOutput(errorMsg) {\n        console.log( '%c ctXHR error: %c' + errorMsg, 'color: red;', 'color: grey;' );\n    }\n\n    /**\n     * setHeaders\n     */\n    setHeaders() {\n        // Set headers if passed\n        for ( let headerName in this.headers ) {\n            if ( typeof this.headers[headerName] !== 'undefined' ) {\n                this.xhr.setRequestHeader(headerName, this.headers[headerName]);\n            }\n        }\n    }\n\n    /**\n     * @return {string|*}\n     */\n    convertData() {\n        // GET, HEAD request-type\n        if ( ~this.methods_to_convert_data_to_URL.indexOf( this.method ) ) {\n            return this.convertDataToURL();\n\n            // POST request-type\n        } else {\n            return this.convertDataToBody();\n        }\n    }\n\n    /**\n     * @return {string}\n     */\n    convertDataToURL() {\n        let paramsAppendix = new URLSearchParams(this.data).toString();\n        let paramsPrefix = this.url.match(/^(https?:\\/{2})?[a-z0-9.]+\\?/) ? '&' : '?';\n        this.url += paramsPrefix + paramsAppendix;\n\n        return this.url;\n    }\n\n    /**\n     * @return {null}\n     */\n    convertDataToBody() {\n        this.body = new FormData();\n        for (let dataKey in this.data) {\n            if (Object.hasOwn(this.data, dataKey)) {\n                this.body.append(\n                    dataKey,\n                    typeof this.data[dataKey] === 'object' ?\n                        JSON.stringify(this.data[dataKey]) :\n                        this.data[dataKey],\n                );\n            }\n        }\n\n        return this.body;\n    }\n\n    /**\n     * Recursive\n     *\n     * Recursively decode JSON-encoded properties\n     *\n     * @param {object} object\n     * @return {*}\n     */\n    deleteDoubleJSONEncoding(object) {\n        if ( typeof object === 'object') {\n            for (let objectKey in object) {\n                if (Object.hasOwn(object, objectKey)) {\n                    // Recursion\n                    if ( typeof object[objectKey] === 'object') {\n                        object[objectKey] = this.deleteDoubleJSONEncoding(object[objectKey]);\n                    }\n\n                    // Common case (out)\n                    if (\n                        typeof object[objectKey] === 'string' &&\n                        object[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n                    ) {\n                        let parsedValue = JSON.parse(object[objectKey]);\n                        if ( typeof parsedValue === 'object' ) {\n                            object[objectKey] = parsedValue;\n                        }\n                    }\n                }\n            }\n        }\n\n        return object;\n    }\n}\n// eslint-disable-next-line require-jsdoc\nclass ApbctAjax extends ApbctXhr {\n    // eslint-disable-next-line require-jsdoc\n    constructor(...args) {\n        args = args[0];\n        args.data._ajax_nonce = selectActualNonce();\n        super(args);\n    }\n}\n// eslint-disable-next-line require-jsdoc\nclass ApbctRest extends ApbctXhr {\n    static default_route = ctPublicFunctions._rest_url + 'cleantalk-antispam/v1/';\n    route = '';\n\n    // eslint-disable-next-line require-jsdoc\n    constructor(...args) {\n        args = args[0];\n        const nonce = selectActualNonce();\n        args.url = ApbctRest.default_route + args.route;\n        args.headers = {\n            'X-WP-Nonce': nonce,\n        };\n        super(args);\n    }\n}\n\n// add hasOwn\nif (!Object.prototype.hasOwn) {\n    Object.defineProperty(Object.prototype, 'hasOwn', { // eslint-disable-line\n        value: function(property) {\n            return Object.prototype.hasOwnProperty.call(this, property);\n        },\n        enumerable: false,\n        configurable: true,\n        writable: true,\n    });\n}\n\n/**\n * Class collecting user activity data\n *\n */\n// eslint-disable-next-line no-unused-vars, require-jsdoc\nclass ApbctCollectingUserActivity {\n    elementBody = document.querySelector('body');\n    collectionForms = document.forms;\n    /**\n     * Constructor\n     */\n    constructor() {\n        this.setListeners();\n    }\n\n    /**\n     * Set listeners\n     */\n    setListeners() {\n        this.elementBody.addEventListener('click', (event) => {\n            this.checkElementInForms(event, 'addClicks');\n        });\n\n        this.elementBody.addEventListener('mouseup', (event) => {\n            const selectedType = document.getSelection().type.toString();\n            if (selectedType == 'Range') {\n                this.addSelected();\n            }\n        });\n\n        this.elementBody.addEventListener('mousemove', (event) => {\n            this.checkElementInForms(event, 'trackMouseMovement');\n        });\n    }\n\n    /**\n     * Checking if there is an element in the form\n     * @param {object} event\n     * @param {string} addTarget\n     */\n    checkElementInForms(event, addTarget) {\n        let resultCheck;\n        for (let i = 0; i < this.collectionForms.length; i++) {\n            if (\n                event.target.outerHTML.length > 0 &&\n                this.collectionForms[i].innerHTML.length > 0\n            ) {\n                resultCheck = this.collectionForms[i].innerHTML.indexOf(event.target.outerHTML);\n            } else {\n                resultCheck = -1;\n            }\n        }\n\n        switch (addTarget) {\n        case 'addClicks':\n            if (resultCheck < 0) {\n                this.addClicks();\n            }\n            break;\n        case 'trackMouseMovement':\n            if (resultCheck > -1) {\n                this.trackMouseMovement();\n            }\n            break;\n        default:\n            break;\n        }\n    }\n\n    /**\n     * Add clicks\n     */\n    addClicks() {\n        if (document.ctCollectingUserActivityData) {\n            if (document.ctCollectingUserActivityData.clicks) {\n                document.ctCollectingUserActivityData.clicks++;\n            } else {\n                document.ctCollectingUserActivityData.clicks = 1;\n            }\n            return;\n        }\n\n        document.ctCollectingUserActivityData = {clicks: 1};\n    }\n\n    /**\n     * Add selected\n     */\n    addSelected() {\n        if (document.ctCollectingUserActivityData) {\n            if (document.ctCollectingUserActivityData.selected) {\n                document.ctCollectingUserActivityData.selected++;\n            } else {\n                document.ctCollectingUserActivityData.selected = 1;\n            }\n            return;\n        }\n\n        document.ctCollectingUserActivityData = {selected: 1};\n    }\n\n    /**\n     * Track mouse movement\n     */\n    trackMouseMovement() {\n        if (!document.ctCollectingUserActivityData) {\n            document.ctCollectingUserActivityData = {};\n        }\n        if (!document.ctCollectingUserActivityData.mouseMovementsInsideForm) {\n            document.ctCollectingUserActivityData.mouseMovementsInsideForm = false;\n        }\n\n        document.ctCollectingUserActivityData.mouseMovementsInsideForm = true;\n    }\n}\n\n/**\n * @param {object|array|string} cookies\n * @param {object|array|string} value\n * @param {string|number} expires\n */\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction ctSetCookie( cookies, value, expires ) {\n    let listOfCookieNamesToForceAlt = [\n        'ct_sfw_pass_key',\n        'ct_sfw_passed',\n        'wordpress_apbct_antibot',\n        'apbct_anticrawler_passed',\n        'apbct_bot_detector_exist',\n        'apbct_antiflood_passed',\n        'apbct_email_encoder_passed',\n    ];\n\n    let skipAlt = false;\n\n    if ( typeof cookies === 'string') {\n        skipAlt = cookies === 'ct_pointer_data';\n        if ( typeof value === 'string' || typeof value === 'number' ) {\n            cookies = [[cookies, value, expires]];\n        }\n    }\n\n    // Cookies disabled\n    if ( ctPublicFunctions.data__cookies_type === 'none' ) {\n        let forcedAltCookiesSet = [];\n        cookies.forEach( function(item) {\n            if (listOfCookieNamesToForceAlt.indexOf(item[0]) !== -1) {\n                forcedAltCookiesSet.push(item);\n            } else {\n                apbctLocalStorage.set(item[0], item[1]);\n            }\n        });\n\n        // if cookies from list found use alt cookies for this selection set\n        if ( forcedAltCookiesSet.length > 0 ) {\n            ctSetAlternativeCookie(forcedAltCookiesSet);\n        }\n\n        // If problem integration forms detected use alt cookies for whole cookies set\n        if ( ctPublic.force_alt_cookies && !skipAlt) {\n            // do it just once\n            ctSetAlternativeCookie(cookies, {forceAltCookies: true});\n        } else {\n            ctNoCookieAttachHiddenFieldsToForms();\n        }\n\n        // Using traditional cookies\n    } else if ( ctPublicFunctions.data__cookies_type === 'native' ) {\n        // If problem integration forms detected use alt cookies for whole cookies set\n        if ( ctPublic.force_alt_cookies && !skipAlt) {\n            // do it just once\n            ctSetAlternativeCookie(cookies, {forceAltCookies: true});\n        }\n        cookies.forEach( function(item) {\n            const _expires = typeof item[2] !== 'undefined' ? 'expires=' + expires + '; ' : '';\n            let ctSecure = location.protocol === 'https:' ? '; secure' : '';\n            document.cookie = ctPublicFunctions.cookiePrefix +\n                item[0] +\n                '=' +\n                encodeURIComponent(item[1]) +\n                '; ' +\n                _expires +\n                'path=/; samesite=lax' +\n                ctSecure;\n        });\n\n        // Using alternative cookies\n    } else if ( ctPublicFunctions.data__cookies_type === 'alternative' && !skipAlt ) {\n        ctSetAlternativeCookie(cookies);\n    }\n}\n\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction ctDetectForcedAltCookiesForms() {\n    let ninjaFormsSign = document.querySelectorAll('#tmpl-nf-layout').length > 0;\n    let elementorUltimateAddonsRegister = document.querySelectorAll('.uael-registration-form-wrapper').length > 0;\n    let smartFormsSign = document.querySelectorAll('script[id*=\"smart-forms\"]').length > 0;\n    let jetpackCommentsForm = document.querySelectorAll('iframe[name=\"jetpack_remote_comment\"]').length > 0;\n    let cwginstockForm = document.querySelectorAll('.cwginstock-subscribe-form').length > 0;\n    let userRegistrationProForm = document.querySelectorAll('div[id^=\"user-registration-form\"]').length > 0;\n    let etPbDiviSubscriptionForm = document.querySelectorAll('div[class^=\"et_pb_newsletter_form\"]').length > 0;\n    let fluentBookingApp = document.querySelectorAll('div[class^=\"fluent_booking_app\"]').length > 0;\n    let bloomPopup = document.querySelectorAll('div[class^=\"et_bloom_form_container\"]').length > 0;\n    let pafeFormsFormElementor = document.querySelectorAll('div[class*=\"pafe-form\"]').length > 0;\n    let otterForm = document.querySelectorAll('div [class*=\"otter-form\"]').length > 0;\n    let smartQuizBuilder = document.querySelectorAll('form .sqbform, .fields_reorder_enabled').length > 0;\n    ctPublic.force_alt_cookies = smartFormsSign ||\n        ninjaFormsSign ||\n        jetpackCommentsForm ||\n        elementorUltimateAddonsRegister ||\n        cwginstockForm ||\n        userRegistrationProForm ||\n        etPbDiviSubscriptionForm ||\n        fluentBookingApp ||\n        pafeFormsFormElementor ||\n        bloomPopup ||\n        otterForm ||\n        smartQuizBuilder;\n\n    setTimeout(function() {\n        if (!ctPublic.force_alt_cookies) {\n            let bookingPress = document.querySelectorAll('main[id^=\"bookingpress_booking_form\"]').length > 0;\n            ctPublic.force_alt_cookies = bookingPress;\n        }\n    }, 1000);\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction ctSetAlternativeCookie(cookies, params) {\n    if (typeof (getJavascriptClientData) === 'function' ) {\n        // reprocess already gained cookies data\n        if (Array.isArray(cookies)) {\n            cookies = getJavascriptClientData(cookies);\n        }\n    } else {\n        console.log('APBCT ERROR: getJavascriptClientData() is not loaded');\n    }\n\n    try {\n        cookies = JSON.parse(cookies);\n    } catch (e) {\n        console.log('APBCT ERROR: JSON parse error:' + e);\n        return;\n    }\n\n    const callback = params && params.callback || null;\n    const onErrorCallback = params && params.onErrorCallback || null;\n\n    if ( params && params.forceAltCookies ) {\n        cookies.apbct_force_alt_cookies = true;\n    }\n\n    // Using REST API handler\n    if ( ctPublicFunctions.data__ajax_type === 'rest' ) {\n        // fix for url encoded cookie apbct_pixel_url on REST route\n        if (typeof cookies.apbct_pixel_url === 'string' &&\n            cookies.apbct_pixel_url.indexOf('%3A') !== -1\n        ) {\n            cookies.apbct_pixel_url = decodeURIComponent(cookies.apbct_pixel_url);\n        }\n        apbct_public_sendREST(\n            'alt_sessions',\n            {\n                method: 'POST',\n                data: {cookies: cookies},\n                callback: callback,\n                onErrorCallback: onErrorCallback,\n            },\n        );\n\n        // Using AJAX request and handler\n    } else if ( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n        apbct_public_sendAJAX(\n            {\n                action: 'apbct_alt_session__save__AJAX',\n                cookies: cookies,\n            },\n            {\n                notJson: 1,\n                callback: callback,\n                onErrorCallback: onErrorCallback,\n                beforeSend: function(xhr) {\n                    xhr.setRequestHeader('X-Robots-Tag', 'noindex, nofollow');\n                },\n            },\n        );\n    }\n}\n\n/**\n * Get cookie by name\n * @param name\n * @return {string|undefined}\n */\n// eslint-disable-next-line require-jsdoc,no-unused-vars\nfunction ctGetCookie(name) {\n    let matches = document.cookie.match(new RegExp(\n        '(?:^|; )' + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + '=([^;]*)',\n    ));\n    return matches ? decodeURIComponent(matches[1]) : undefined;\n}\n\n// eslint-disable-next-line require-jsdoc,no-unused-vars\nfunction ctDeleteCookie(cookieName) {\n    // Cookies disabled\n    if ( ctPublicFunctions.data__cookies_type === 'none' ) {\n        return;\n\n    // Using traditional cookies\n    } else if ( ctPublicFunctions.data__cookies_type === 'native' ) {\n        let ctSecure = location.protocol === 'https:' ? '; secure' : '';\n        document.cookie = cookieName + '=\"\"; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; samesite=lax' + ctSecure;\n\n    // Using alternative cookies\n    } else if ( ctPublicFunctions.data__cookies_type === 'alternative' ) {\n        // @ToDo implement this logic\n    }\n}\n\n// eslint-disable-next-line require-jsdoc,camelcase\nfunction apbct_public_sendAJAX(data, params, obj) {\n    // Default params\n    let _params = [];\n    _params['callback'] = params.callback || null;\n    _params['onErrorCallback'] = params.onErrorCallback || null;\n    _params['callback_context'] = params.callback_context || null;\n    _params['callback_params'] = params.callback_params || null;\n    _params['async'] = params.async || true;\n    _params['notJson'] = params.notJson || null;\n    _params['responseType']= params.notJson ? 'text' : 'json';\n    _params['timeout'] = params.timeout || 15000;\n    _params['obj'] = obj || null;\n    _params['button'] = params.button || null;\n    _params['spinner'] = params.spinner || null;\n    _params['progressbar'] = params.progressbar || null;\n    _params['silent'] = params.silent || null;\n    _params['no_nonce'] = params.no_nonce || null;\n    _params['data'] = data;\n    _params['url'] = ctPublicFunctions._ajax_url;\n    const nonce = selectActualNonce();\n\n    if (typeof (data) === 'string') {\n        if ( ! _params['no_nonce'] ) {\n            _params['data'] = _params['data'] + '&_ajax_nonce=' + nonce;\n        }\n        _params['data'] = _params['data'] + '&no_cache=' + Math.random();\n    } else {\n        if ( ! _params['no_nonce'] ) {\n            _params['data']._ajax_nonce = nonce;\n        }\n        _params['data'].no_cache = Math.random();\n    }\n\n    new ApbctCore().ajax(_params);\n}\n\n// eslint-disable-next-line require-jsdoc,camelcase\nfunction apbct_public_sendREST( route, params ) {\n    let _params = [];\n    _params['route'] = route;\n    _params['callback'] = params.callback || null;\n    _params['onErrorCallback'] = params.onErrorCallback || null;\n    _params['data'] = params.data || [];\n    _params['method'] = params.method || 'POST';\n\n    new ApbctCore().rest(_params);\n}\n\n/**\n * Generate unique ID\n * @return {string}\n */\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction apbctGenerateUniqueID() {\n    return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(2, 10);\n}\n\nlet apbctLocalStorage = {\n    get: function(key, property) {\n        if ( typeof property === 'undefined' ) {\n            property = 'value';\n        }\n        const storageValue = localStorage.getItem(key);\n        if ( storageValue !== null ) {\n            try {\n                const json = JSON.parse(storageValue);\n                if ( json.hasOwnProperty(property) ) {\n                    try {\n                        // if property can be parsed as JSON - do it\n                        return JSON.parse( json[property] );\n                    } catch (e) {\n                        // if not - return string of value\n                        return json[property].toString();\n                    }\n                } else {\n                    return json;\n                }\n            } catch (e) {\n                return storageValue;\n            }\n        }\n        return false;\n    },\n    set: function(key, value, isJson = true) {\n        if (isJson) {\n            let objToSave = {'value': JSON.stringify(value), 'timestamp': Math.floor(new Date().getTime() / 1000)};\n            localStorage.setItem(key, JSON.stringify(objToSave));\n        } else {\n            localStorage.setItem(key, value);\n        }\n    },\n    isAlive: function(key, maxLifetime) {\n        if ( typeof maxLifetime === 'undefined' ) {\n            maxLifetime = 86400;\n        }\n        const keyTimestamp = this.get(key, 'timestamp');\n        return keyTimestamp + maxLifetime > Math.floor(new Date().getTime() / 1000);\n    },\n    isSet: function(key) {\n        return localStorage.getItem(key) !== null;\n    },\n    delete: function(key) {\n        localStorage.removeItem(key);\n    },\n    getCleanTalkData: function() {\n        let data = {};\n        for (let i=0; i<localStorage.length; i++) {\n            let key = localStorage.key(i);\n            if (key.indexOf('ct_') !==-1 || key.indexOf('apbct_') !==-1) {\n                data[key.toString()] = apbctLocalStorage.get(key);\n            }\n        }\n        return data;\n    },\n\n};\n\nlet apbctSessionStorage = {\n    get: function(key, property) {\n        if ( typeof property === 'undefined' ) {\n            property = 'value';\n        }\n        const storageValue = sessionStorage.getItem(key);\n        if ( storageValue !== null ) {\n            try {\n                const json = JSON.parse(storageValue);\n                return json.hasOwnProperty(property) ? JSON.parse(json[property]) : json;\n            } catch (e) {\n                return storageValue;\n            }\n        }\n        return false;\n    },\n    set: function(key, value, isJson = true) {\n        if (isJson) {\n            let objToSave = {'value': JSON.stringify(value), 'timestamp': Math.floor(new Date().getTime() / 1000)};\n            sessionStorage.setItem(key, JSON.stringify(objToSave));\n        } else {\n            sessionStorage.setItem(key, value);\n        }\n    },\n    isSet: function(key) {\n        return sessionStorage.getItem(key) !== null;\n    },\n    delete: function(key) {\n        sessionStorage.removeItem(key);\n    },\n    getCleanTalkData: function() {\n        let data = {};\n        for (let i=0; i<sessionStorage.length; i++) {\n            let key = sessionStorage.key(i);\n            if (key.indexOf('ct_') !==-1 || key.indexOf('apbct_') !==-1) {\n                data[key.toString()] = apbctSessionStorage.get(key);\n            }\n        }\n        return data;\n    },\n};\n\n/**\n * Handler for -webkit based browser that listen for a custom\n * animation create using the :pseudo-selector in the stylesheet.\n * Works with Chrome, Safari\n *\n * @param {AnimationEvent} event\n */\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction apbctOnAnimationStart(event) {\n    ('onautofillstart' === event.animationName) ?\n        apbctAutocomplete(event.target) : apbctCancelAutocomplete(event.target);\n}\n\n/**\n * Handler for non-webkit based browser that listen for input\n * event to trigger the autocomplete-cancel process.\n * Works with Firefox, Edge, IE11\n *\n * @param {InputEvent} event\n */\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction apbctOnInput(event) {\n    ('insertReplacementText' === event.inputType || !('data' in event)) ?\n        apbctAutocomplete(event.target) : apbctCancelAutocomplete(event.target);\n}\n\n/**\n * Manage an input element when its value is autocompleted\n * by the browser in the following steps:\n * - add [autocompleted] attribute from event.target\n * - create 'onautocomplete' cancelable CustomEvent\n * - dispatch the Event\n *\n * @param {HtmlInputElement} element\n */\nfunction apbctAutocomplete(element) {\n    if (element.hasAttribute('autocompleted')) return;\n    element.setAttribute('autocompleted', '');\n\n    let event = new window.CustomEvent('onautocomplete', {\n        bubbles: true, cancelable: true, detail: null,\n    });\n\n    // no autofill if preventDefault is called\n    if (!element.dispatchEvent(event)) {\n        element.value = '';\n    }\n}\n\n/**\n * Manage an input element when its autocompleted value is\n * removed by the browser in the following steps:\n * - remove [autocompleted] attribute from event.target\n * - create 'onautocomplete' non-cancelable CustomEvent\n * - dispatch the Event\n *\n * @param {HtmlInputElement} element\n */\nfunction apbctCancelAutocomplete(element) {\n    if (!element.hasAttribute('autocompleted')) return;\n    element.removeAttribute('autocompleted');\n\n    // dispatch event\n    element.dispatchEvent(new window.CustomEvent('onautocomplete', {\n        bubbles: true, cancelable: false, detail: null,\n    }));\n}\n\n/**\n * ApbctForceProtection\n */\nclass ApbctForceProtection {\n    wrappers = [];\n\n    /**\n     * Constructor\n     */\n    constructor() {\n        this.wrappers = this.findWrappers();\n\n        if (this.wrappers.length < 1) {\n            return;\n        }\n\n        this.checkBot();\n    }\n\n    /**\n     * Find wrappers\n     * @return {HTMLElement[]}\n     */\n    findWrappers() {\n        return document.querySelectorAll('div.ct-encoded-form-wrapper');\n    }\n\n    /**\n     * Check bot\n     * @return {void}\n     */\n    checkBot() {\n        let data = {\n            event_javascript_data: getJavascriptClientData(),\n            post_url: document.location.href,\n            referrer: document.referrer,\n        };\n\n        if (ctPublicFunctions.data__ajax_type === 'rest') {\n            apbct_public_sendREST('force_protection_check_bot', {\n                data,\n                method: 'POST',\n                callback: (result) => this.checkBotCallback(result),\n            });\n        } else if (ctPublicFunctions.data__ajax_type === 'admin_ajax') {\n            data.action = 'apbct_force_protection_check_bot';\n            apbct_public_sendAJAX(data, {callback: (result) => this.checkBotCallback(result)});\n        }\n    }\n\n    /**\n     * Check bot callback\n     * @param {Object} result\n     * @return {void}\n     */\n    checkBotCallback(result) {\n        // if error occurred\n        if (result.data && result.data.status && result.data.status !== 200) {\n            console.log('ApbctForceProtection connection error occurred');\n            this.decodeForms();\n            return;\n        }\n\n        if (typeof result === 'string') {\n            try {\n                result = JSON.parse(result);\n            } catch (e) {\n                console.log('ApbctForceProtection decodeForms error', e);\n                this.decodeForms();\n                return;\n            }\n        }\n\n        if (typeof result === 'object' && result.allow && result.allow === 1) {\n            this.decodeForms();\n            document.dispatchEvent(new Event('apbctForceProtectionAllowed'));\n        } else {\n            this.showMessageForBot(result.message);\n        }\n    }\n\n    /**\n     * Decode forms\n     * @return {void}\n     */\n    decodeForms() {\n        let form;\n\n        this.wrappers.forEach((wrapper) => {\n            form = wrapper.querySelector('div.ct-encoded-form').dataset.encodedForm;\n\n            try {\n                if (form && typeof(form) == 'string') {\n                    wrapper.outerHTML = atob(form);\n                }\n            } catch (error) {\n                console.log(error);\n            }\n        });\n    }\n\n    /**\n     * Show message for bot\n     * @param {string} message\n     * @return {void}\n     */\n    showMessageForBot(message) {\n        let form;\n\n        this.wrappers.forEach((wrapper) => {\n            form = wrapper.querySelector('div.ct-encoded-form').dataset.encodedForm;\n            if (form) {\n                wrapper.outerHTML = '<div class=\"ct-encoded-form-forbidden\">' + message + '</div>';\n            }\n        });\n    }\n}\n\n/**\n * Force protection\n */\nfunction apbctForceProtect() {\n    if (ctPublic.settings__forms__force_protection && typeof ApbctForceProtection !== 'undefined') {\n        new ApbctForceProtection();\n    }\n}\n\nif (ctPublic.data__key_is_ok) {\n    if (document.readyState !== 'loading') {\n        apbctForceProtect();\n    } else {\n        apbct_attach_event_handler(document, 'DOMContentLoaded', apbctForceProtect);\n    }\n}\n\n/**\n * Class for gathering data about user typing.\n *\n * ==============================\n * isAutoFill       - only person can use auto fill\n * isUseBuffer      - use buffer for fill current field\n * ==============================\n * lastKeyTimestamp - timestamp of last key press in current field\n * speedDelta       - change for each key press in current field,\n *                    as difference between current and previous key press timestamps,\n *                    robots in general have constant speed of typing.\n *                    If speedDelta is constant for each key press in current field,\n *                    so, speedDelta will be roughly to 0, then it is robot.\n * ==============================\n */\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nclass CTTypoData {\n    fieldData = {\n        isAutoFill: false,\n        isUseBuffer: false,\n        speedDelta: 0,\n        firstKeyTimestamp: 0,\n        lastKeyTimestamp: 0,\n        lastDelta: 0,\n        countOfKey: 0,\n    };\n\n    fields = document.querySelectorAll('textarea[name=comment]');\n\n    data = [];\n\n    /**\n     * Gather fields.\n     */\n    gatheringFields() {\n        let fieldSet = Array.prototype.slice.call(this.fields);\n        fieldSet.forEach((field, i) => {\n            this.data.push(Object.assign({}, this.fieldData));\n        });\n    }\n\n    /**\n     * Set listeners.\n     */\n    setListeners() {\n        this.fields.forEach((field, i) => {\n            field.addEventListener('paste', () => {\n                this.data[i].isUseBuffer = true;\n            });\n        });\n\n        this.fields.forEach((field, i) => {\n            field.addEventListener('onautocomplete', () => {\n                this.data[i].isAutoFill = true;\n            });\n        });\n\n        this.fields.forEach((field, i) => {\n            field.addEventListener('input', () => {\n                this.data[i].countOfKey++;\n                let time = + new Date();\n                let currentDelta = 0;\n\n                if (this.data[i].countOfKey === 1) {\n                    this.data[i].lastKeyTimestamp = time;\n                    this.data[i].firstKeyTimestamp = time;\n                    return;\n                }\n\n                currentDelta = time - this.data[i].lastKeyTimestamp;\n                if (this.data[i].countOfKey === 2) {\n                    this.data[i].lastKeyTimestamp = time;\n                    this.data[i].lastDelta = currentDelta;\n                    return;\n                }\n\n                if (this.data[i].countOfKey > 2) {\n                    this.data[i].speedDelta += Math.abs(this.data[i].lastDelta - currentDelta);\n                    this.data[i].lastKeyTimestamp = time;\n                    this.data[i].lastDelta = currentDelta;\n                }\n            });\n        });\n    }\n}\n\n// eslint-disable-next-line camelcase\nconst ctDate = new Date();\nconst ctTimeMs = new Date().getTime();\nlet ctMouseEventTimerFlag = true; // Reading interval flag\nlet ctMouseData = [];\nlet ctMouseDataCounter = 0;\nlet ctCheckedEmails = {};\nlet ctCheckedEmailsExist = {};\nlet ctMouseReadInterval;\nlet ctMouseWriteDataInterval;\nlet tokenCheckerIntervalId;\nlet botDetectorLogLastUpdate = 0;\nlet botDetectorLogEventTypesCollected = [];\n\n// eslint-disable-next-line require-jsdoc,camelcase\nfunction apbct_attach_event_handler(elem, event, callback) {\n    if (typeof window.addEventListener === 'function') elem.addEventListener(event, callback);\n    else elem.attachEvent(event, callback);\n}\n// eslint-disable-next-line require-jsdoc,camelcase\nfunction apbct_remove_event_handler(elem, event, callback) {\n    if (typeof window.removeEventListener === 'function') elem.removeEventListener(event, callback);\n    else elem.detachEvent(event, callback);\n}\n\n// Writing first key press timestamp\nconst ctFunctionFirstKey = function output(event) {\n    let KeyTimestamp = Math.floor(new Date().getTime() / 1000);\n    ctSetCookie('ct_fkp_timestamp', KeyTimestamp);\n    ctKeyStopStopListening();\n};\n\n/**\n * Run cron jobs\n */\n// forms handler cron\ncronFormsHandler(2000);\n\n// bot_detector frontend_data log alt session saving cron\nif (\n    ctPublicFunctions.hasOwnProperty('data__bot_detector_enabled') &&\n    ctPublicFunctions.data__bot_detector_enabled == 1 &&\n    ctPublicFunctions.hasOwnProperty('data__frontend_data_log_enabled') &&\n    ctPublicFunctions.data__frontend_data_log_enabled == 1\n) {\n    sendBotDetectorLogToAltSessions(1000);\n}\n/**\n * Cron jobs end.\n */\n\n// mouse read\nif (ctPublic.data__key_is_ok) {\n    // Reading interval\n    ctMouseReadInterval = setInterval(function() {\n        ctMouseEventTimerFlag = true;\n    }, 150);\n\n    // Writting interval\n    ctMouseWriteDataInterval = setInterval(function() {\n        ctSetCookie('ct_pointer_data', JSON.stringify(ctMouseData));\n    }, 1200);\n}\n\n// Logging mouse position each 150 ms\nconst ctFunctionMouseMove = function output(event) {\n    ctSetMouseMoved();\n    if (ctMouseEventTimerFlag === true) {\n        ctMouseData.push([\n            Math.round(event.clientY),\n            Math.round(event.clientX),\n            Math.round(new Date().getTime() - ctTimeMs),\n        ]);\n\n        ctMouseDataCounter++;\n        ctMouseEventTimerFlag = false;\n        if (ctMouseDataCounter >= 50) {\n            ctMouseStopData();\n        }\n    }\n};\n\n/**\n * Do handle periodical actions.\n * @param {int} cronStartTimeout Time to go before cron start.\n */\nfunction cronFormsHandler(cronStartTimeout = 2000) {\n    setTimeout(function() {\n        setInterval(function() {\n            restartFieldsListening();\n            restartBotDetectorEventTokenAttach();\n        }, 2000);\n    }, cronStartTimeout);\n}\n\n/**\n * Send BotDetector logs data to alternative sessions.\n * If log_last_update has changed and log contains new event types, the log will be sent to the alternative sessions.\n * @param {int} cronStartTimeout delay before cron start\n * @param {int} interval check fires on interval\n */\nfunction sendBotDetectorLogToAltSessions(cronStartTimeout = 3000, interval = 1000) {\n    setTimeout(function() {\n        setInterval(function() {\n            const currentLog = apbctLocalStorage.get('ct_bot_detector_frontend_data_log');\n            if (needsSaveLogToAltSessions(currentLog)) {\n                botDetectorLogLastUpdate = currentLog.log_last_update;\n                // the log will be taken from javascriptclientdata\n                ctSetAlternativeCookie([], {forceAltCookies: true});\n            }\n        }, interval);\n    }, cronStartTimeout);\n}\n\n/**\n * Check if the log needs to be saved to the alt sessions. If the log has new event types, it will be saved.\n * @param {object} currentLog\n * @return {boolean}\n */\nfunction needsSaveLogToAltSessions(currentLog) {\n    if (\n        currentLog && currentLog.hasOwnProperty('log_last_update') &&\n        botDetectorLogLastUpdate !== currentLog.log_last_update\n    ) {\n        try {\n            for (let i = 0; i < currentLog.records.length; i++) {\n                const currentType = currentLog.records[i].frontend_data.js_event;\n                // check if this event type was already collected\n                if (currentType !== undefined && botDetectorLogEventTypesCollected.includes(currentType)) {\n                    continue;\n                }\n                // add new event type to collection, this type will be sent to the alt sessions further\n                botDetectorLogEventTypesCollected.push(currentType);\n                return true;\n            }\n        } catch (e) {\n            console.log('APBCT: bot detector log collection error: ' . e.toString());\n        }\n    }\n    return false;\n}\n\n/**\n * Restart event_token attachment if some forms load after document ready.\n */\nfunction restartBotDetectorEventTokenAttach() {\n    // List there any new conditions, right now it works only for LatePoint forms.\n    // Probably, we can remove this condition at all, because setEventTokenField()\n    // checks all the forms without the field\n    const doAttach = (\n        document.getElementsByClassName('latepoint-form').length > 0 ||\n        document.getElementsByClassName('mec-booking-form-container').length > 0 ||\n        document.getElementById('login-form-popup') !== null\n    );\n\n    try {\n        if ( doAttach ) {\n            // get token from LS\n            const token = apbctLocalStorage.get('bot_detector_event_token');\n            if (typeof setEventTokenField === 'function' && token !== undefined && token.length === 64) {\n                setEventTokenField(token);\n            }\n            // probably there we could use a new botDetectorInit if token is not found\n        }\n    } catch (e) {\n        console.log(e.toString());\n    }\n}\n\n/**\n * Stop mouse observing function\n */\nfunction ctMouseStopData() {\n    apbct_remove_event_handler(document, 'mousemove', ctFunctionMouseMove);\n    clearInterval(ctMouseReadInterval);\n    clearInterval(ctMouseWriteDataInterval);\n}\n\n/**\n * Stop key listening function\n */\nfunction ctKeyStopStopListening() {\n    apbct_remove_event_handler(document, 'mousedown', ctFunctionFirstKey);\n    apbct_remove_event_handler(document, 'keydown', ctFunctionFirstKey);\n}\n\n/**\n * @param {mixed} e\n */\nfunction checkEmail(e) {\n    let currentEmail = e.target.value;\n\n    if (! /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(currentEmail)) {\n        return;\n    }\n\n    if (currentEmail && !(currentEmail in ctCheckedEmails)) {\n        // Using REST API handler\n        if ( ctPublicFunctions.data__ajax_type === 'rest' ) {\n            apbct_public_sendREST(\n                'check_email_before_post',\n                {\n                    method: 'POST',\n                    data: {'email': currentEmail},\n                    callback: function(result) {\n                        if (result.result) {\n                            ctCheckedEmails[currentEmail] = {\n                                'result': result.result,\n                                'timestamp': Date.now() / 1000 |0,\n                            };\n                            ctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n                        }\n                    },\n                },\n            );\n            // Using AJAX request and handler\n        } else if ( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n            apbct_public_sendAJAX(\n                {\n                    action: 'apbct_email_check_before_post',\n                    email: currentEmail,\n                },\n                {\n                    callback: function(result) {\n                        if (result.result) {\n                            ctCheckedEmails[currentEmail] = {\n                                'result': result.result,\n                                'timestamp': Date.now() / 1000 |0,\n                            };\n                            ctSetCookie('ct_checked_emails', JSON.stringify(ctCheckedEmails));\n                        }\n                    },\n                },\n            );\n        }\n    }\n}\n\n/**\n * @param {mixed} e\n */\nfunction checkEmailExist(e) {\n    let currentEmail = e.target.value;\n    let result;\n\n    if (!currentEmail || !currentEmail.length) {\n        let envelope = document.getElementById('apbct-check_email_exist-block');\n        if (envelope) {\n            envelope.remove();\n        }\n        let hint = document.getElementById('apbct-check_email_exist-popup_description');\n        if (hint) {\n            hint.remove();\n        }\n        return;\n    }\n\n    if (! /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(currentEmail)) {\n        return;\n    }\n\n    if (currentEmail in ctCheckedEmailsExist) {\n        result = ctCheckedEmailsExist[currentEmail];\n        getResultCheckEmailExist(e, result, currentEmail);\n\n        return;\n    }\n\n    viewCheckEmailExist(e, 'load');\n\n    // Using REST API handler\n    ctPublicFunctions.data__ajax_type = 'rest';\n    if (ctPublicFunctions.data__ajax_type === 'rest') {\n        apbct_public_sendREST(\n            'check_email_exist_post',\n            {\n                method: 'POST',\n                data: {'email': currentEmail},\n                callback: function(result) {\n                    getResultCheckEmailExist(e, result, currentEmail);\n                },\n            },\n        );\n\n        return;\n    }\n\n    if (ctPublicFunctions.data__ajax_type === 'admin_ajax') {\n        apbct_public_sendAJAX(\n            {\n                action: 'apbct_email_check_exist_post',\n                email: currentEmail,\n            },\n            {\n                callback: function(result) {\n                    getResultCheckEmailExist(e, result, currentEmail);\n                },\n            },\n        );\n    }\n}\n\n/**\n * @param {mixed} e\n * @param {mixed} result\n * @param {string} currentEmail\n */\nfunction getResultCheckEmailExist(e, result, currentEmail) {\n    if (!result || !result.result) {\n        return;\n    }\n\n    result = result.result;\n\n    ctCheckedEmailsExist[currentEmail] = {\n        'result': result,\n        'timestamp': Date.now() / 1000 |0,\n    };\n\n    if (result.result == 'EXISTS') {\n        viewCheckEmailExist(e, 'good_email', result.text_result);\n    } else {\n        viewCheckEmailExist(e, 'bad_email', result.text_result);\n    }\n\n    ctSetCookie('ct_checked_emails_exist', JSON.stringify(ctCheckedEmailsExist));\n}\n\n/**\n * @param {mixed} e\n * @param {string} state\n * @param {string} textResult\n */\nfunction viewCheckEmailExist(e, state, textResult) {\n    let parentElement = e.target.parentElement;\n    let inputEmail = parentElement.querySelector('[name*=\"email\"]');\n\n    if (!inputEmail) {\n        return;\n    }\n\n    let envelope;\n    let hint;\n\n    // envelope\n    if (document.getElementById('apbct-check_email_exist-block')) {\n        envelope = document.getElementById('apbct-check_email_exist-block');\n    } else {\n        envelope = document.createElement('div');\n        envelope.setAttribute('class', 'apbct-check_email_exist-block');\n        envelope.setAttribute('id', 'apbct-check_email_exist-block');\n        window.addEventListener('scroll', function() {\n            envelope.style.top = inputEmail.getBoundingClientRect().top + 'px';\n        });\n        parentElement.after(envelope);\n    }\n\n    // hint\n    if (document.getElementById('apbct-check_email_exist-popup_description')) {\n        hint = document.getElementById('apbct-check_email_exist-popup_description');\n    } else {\n        hint = document.createElement('div');\n        hint.setAttribute('class', 'apbct-check_email_exist-popup_description');\n        hint.setAttribute('id', 'apbct-check_email_exist-popup_description');\n        window.addEventListener('scroll', function() {\n            hint.style.top = envelope.getBoundingClientRect().top + 'px';\n        });\n\n        envelope.after(hint);\n    }\n\n    ctEmailExistSetElementsPositions();\n\n    window.addEventListener('resize', function(event) {\n        ctEmailExistSetElementsPositions();\n    });\n\n    switch (state) {\n    case 'load':\n        envelope.classList.remove('apbct-check_email_exist-good_email', 'apbct-check_email_exist-bad_email');\n        envelope.classList.add('apbct-check_email_exist-load');\n        break;\n\n    case 'good_email':\n        envelope.classList.remove('apbct-check_email_exist-load', 'apbct-check_email_exist-bad_email');\n        envelope.classList.add('apbct-check_email_exist-good_email');\n\n        envelope.onmouseover = function() {\n            hint.textContent = textResult;\n            hint.style.display = 'block';\n            hint.style.top = inputEmail.getBoundingClientRect().top - hint.getBoundingClientRect().height + 'px';\n            hint.style.color = '#1C7129';\n        };\n\n        envelope.onmouseout = function() {\n            hint.style.display = 'none';\n        };\n\n        break;\n\n    case 'bad_email':\n        envelope.classList.remove('apbct-check_email_exist-load', 'apbct-check_email_exist-good_email');\n        envelope.classList.add('apbct-check_email_exist-bad_email');\n\n        envelope.onmouseover = function() {\n            hint.textContent = textResult;\n            hint.style.display = 'block';\n            hint.style.top = inputEmail.getBoundingClientRect().top - hint.getBoundingClientRect().height + 'px';\n            hint.style.color = '#E01111';\n        };\n\n        envelope.onmouseout = function() {\n            hint.style.display = 'none';\n        };\n\n        break;\n\n    default:\n        break;\n    }\n}\n\n/**\n * Shift the envelope to the input field on resizing the window\n * @param {object} envelope\n * @param {object} inputEmail\n */\nfunction ctEmailExistSetElementsPositions() {\n    const envelopeWidth = 35;\n    const inputEmail = document.querySelector('comment-form input[name*=\"email\"], input#email');\n    if (!inputEmail) {\n        return;\n    }\n    const envelope = document.getElementById('apbct-check_email_exist-block');\n    if (envelope) {\n        envelope.style.top = inputEmail.getBoundingClientRect().top + 'px';\n        envelope.style.left = inputEmail.getBoundingClientRect().right - envelopeWidth - 10 + 'px';\n        envelope.style.height = inputEmail.offsetHeight + 'px';\n        envelope.style.width = envelopeWidth + 'px';\n    }\n\n    const hint = document.getElementById('apbct-check_email_exist-popup_description');\n    if (hint) {\n        hint.style.width = inputEmail.offsetWidth + 'px';\n        hint.style.left = inputEmail.getBoundingClientRect().left + 'px';\n    }\n}\n\n/**\n * @return {bool}\n */\nfunction ctIsDrawPixel() {\n    if (ctPublic.pixel__setting == '3' && ctPublic.settings__data__bot_detector_enabled == '1') {\n        return false;\n    }\n\n    return +ctPublic.pixel__enabled ||\n        (ctPublic.data__cookies_type === 'none' && document.querySelectorAll('img#apbct_pixel').length === 0) ||\n        (ctPublic.data__cookies_type === 'alternative' && document.querySelectorAll('img#apbct_pixel').length === 0);\n}\n\n/**\n * @param {string} pixelUrl\n * @return {bool}\n */\nfunction ctSetPixelImg(pixelUrl) {\n    if (ctPublic.pixel__setting == '3' && ctPublic.settings__data__bot_detector_enabled == '1') {\n        return false;\n    }\n    ctSetCookie('apbct_pixel_url', pixelUrl);\n    if ( ctIsDrawPixel() ) {\n        if ( ! document.getElementById('apbct_pixel') ) {\n            let insertedImg = document.createElement('img');\n            insertedImg.setAttribute('alt', 'CleanTalk Pixel');\n            insertedImg.setAttribute('title', 'CleanTalk Pixel');\n            insertedImg.setAttribute('id', 'apbct_pixel');\n            insertedImg.setAttribute('style', 'display: none; left: 99999px;');\n            insertedImg.setAttribute('src', pixelUrl);\n            apbct('body').append(insertedImg);\n        }\n    }\n}\n\n/**\n * @param {string} pixelUrl\n * @return {bool}\n */\nfunction ctSetPixelImgFromLocalstorage(pixelUrl) {\n    if (ctPublic.pixel__setting == '3' && ctPublic.settings__data__bot_detector_enabled == '1') {\n        return false;\n    }\n    if ( ctIsDrawPixel() ) {\n        if ( ! document.getElementById('apbct_pixel') ) {\n            let insertedImg = document.createElement('img');\n            insertedImg.setAttribute('alt', 'CleanTalk Pixel');\n            insertedImg.setAttribute('title', 'CleanTalk Pixel');\n            insertedImg.setAttribute('id', 'apbct_pixel');\n            insertedImg.setAttribute('style', 'display: none; left: 99999px;');\n            insertedImg.setAttribute('src', decodeURIComponent(pixelUrl));\n            apbct('body').append(insertedImg);\n        }\n    }\n}\n\n/**\n * ctGetPixelUrl\n * @return {bool}\n */\nfunction ctGetPixelUrl() {\n    if (ctPublic.pixel__setting == '3' && ctPublic.settings__data__bot_detector_enabled == '1') {\n        return false;\n    }\n\n    // Check if pixel is already in localstorage and is not outdated\n    let localStoragePixelUrl = apbctLocalStorage.get('apbct_pixel_url');\n    if ( localStoragePixelUrl !== false ) {\n        if ( ! apbctLocalStorage.isAlive('apbct_pixel_url', 3600 * 3) ) {\n            apbctLocalStorage.delete('apbct_pixel_url');\n        } else {\n            // if so - load pixel from localstorage and draw it skipping AJAX\n            ctSetPixelImgFromLocalstorage(localStoragePixelUrl);\n            return;\n        }\n    }\n    // Using REST API handler\n    if ( ctPublicFunctions.data__ajax_type === 'rest' ) {\n        apbct_public_sendREST(\n            'apbct_get_pixel_url',\n            {\n                method: 'POST',\n                callback: function(result) {\n                    if (result &&\n                        (typeof result === 'string' || result instanceof String) && result.indexOf('https') === 0) {\n                        // set  pixel url to localstorage\n                        if ( ! apbctLocalStorage.get('apbct_pixel_url') ) {\n                            // set pixel to the storage\n                            apbctLocalStorage.set('apbct_pixel_url', result);\n                            // update pixel data in the hidden fields\n                            ctNoCookieAttachHiddenFieldsToForms();\n                        }\n                        // then run pixel drawing\n                        ctSetPixelImg(result);\n                    }\n                },\n            },\n        );\n        // Using AJAX request and handler\n    } else {\n        apbct_public_sendAJAX(\n            {\n                action: 'apbct_get_pixel_url',\n            },\n            {\n                notJson: true,\n                callback: function(result) {\n                    if (result &&\n                        (typeof result === 'string' || result instanceof String) && result.indexOf('https') === 0) {\n                        // set  pixel url to localstorage\n                        if ( ! apbctLocalStorage.get('apbct_pixel_url') ) {\n                            // set pixel to the storage\n                            apbctLocalStorage.set('apbct_pixel_url', result);\n                            // update pixel data in the hidden fields\n                            ctNoCookieAttachHiddenFieldsToForms();\n                        }\n                        // then run pixel drawing\n                        ctSetPixelImg(result);\n                    }\n                },\n                beforeSend: function(xhr) {\n                    xhr.setRequestHeader('X-Robots-Tag', 'noindex, nofollow');\n                },\n            },\n        );\n    }\n}\n\n/**\n * ctSetHasScrolled\n */\nfunction ctSetHasScrolled() {\n    if ( ! apbctLocalStorage.isSet('ct_has_scrolled') || ! apbctLocalStorage.get('ct_has_scrolled') ) {\n        ctSetCookie('ct_has_scrolled', 'true');\n        apbctLocalStorage.set('ct_has_scrolled', true);\n    }\n    if (\n        ctPublic.data__cookies_type === 'native' &&\n        ctGetCookie('ct_has_scrolled') === undefined\n    ) {\n        ctSetCookie('ct_has_scrolled', 'true');\n    }\n}\n\n/**\n * ctSetMouseMoved\n */\nfunction ctSetMouseMoved() {\n    if ( ! apbctLocalStorage.isSet('ct_mouse_moved') || ! apbctLocalStorage.get('ct_mouse_moved') ) {\n        ctSetCookie('ct_mouse_moved', 'true');\n        apbctLocalStorage.set('ct_mouse_moved', true);\n    }\n    if (\n        ctPublic.data__cookies_type === 'native' &&\n        ctGetCookie('ct_mouse_moved') === undefined\n    ) {\n        ctSetCookie('ct_mouse_moved', 'true');\n    }\n}\n\n/**\n * Restart listen fields to set ct_has_input_focused or ct_has_key_up\n */\nfunction restartFieldsListening() {\n    if (!apbctLocalStorage.isSet('ct_has_input_focused') && !apbctLocalStorage.isSet('ct_has_key_up')) {\n        ctStartFieldsListening();\n    }\n}\n\n/**\n * init listeners for keyup and focus events\n */\nfunction ctStartFieldsListening() {\n    if (\n        (apbctLocalStorage.isSet('ct_has_key_up') || apbctLocalStorage.get('ct_has_key_up')) &&\n        (apbctLocalStorage.isSet('ct_has_input_focused') || apbctLocalStorage.get('ct_has_input_focused')) &&\n        (\n            ctPublic.data__cookies_type === 'native' &&\n            ctGetCookie('ct_has_input_focused') !== undefined &&\n            ctGetCookie('ct_has_key_up') !== undefined\n        )\n    ) {\n        // already set\n        return;\n    }\n\n    let forms = ctGetPageForms();\n    ctPublic.handled_fields = [];\n\n    if (forms.length > 0) {\n        for (let i = 0; i < forms.length; i++) {\n            // handle only inputs and textareas\n            const handledFormFields = forms[i].querySelectorAll('input,textarea');\n            for (let i = 0; i < handledFormFields.length; i++) {\n                if (handledFormFields[i].type !== 'hidden') {\n                    // collect handled fields to remove handler in the future\n                    ctPublic.handled_fields.push(handledFormFields[i]);\n                    // do attach handlers\n                    apbct_attach_event_handler(handledFormFields[i], 'focus', ctFunctionHasInputFocused);\n                    apbct_attach_event_handler(handledFormFields[i], 'keyup', ctFunctionHasKeyUp);\n                }\n            }\n        }\n    }\n}\n\n/**\n * stop listening keyup and focus\n * @param {string} eventName\n * @param {string} functionName\n */\nfunction ctStopFieldsListening(eventName, functionName) {\n    if (typeof ctPublic.handled_fields !== 'undefined' && ctPublic.handled_fields.length > 0) {\n        for (let i = 0; i < ctPublic.handled_fields.length; i++) {\n            apbct_remove_event_handler(ctPublic.handled_fields[i], eventName, functionName);\n        }\n    }\n}\n\nlet ctFunctionHasInputFocused = function output(event) {\n    ctSetHasInputFocused();\n    ctStopFieldsListening('focus', ctFunctionHasInputFocused);\n};\n\nlet ctFunctionHasKeyUp = function output(event) {\n    ctSetHasKeyUp();\n    ctStopFieldsListening('keyup', ctFunctionHasKeyUp);\n};\n\n/**\n * set ct_has_input_focused ct_has_key_up cookies on session period\n */\nfunction ctSetHasInputFocused() {\n    if ( ! apbctLocalStorage.isSet('ct_has_input_focused') || ! apbctLocalStorage.get('ct_has_input_focused') ) {\n        apbctLocalStorage.set('ct_has_input_focused', true);\n    }\n    if (\n        (\n            (\n                ctPublic.data__cookies_type === 'native' &&\n                ctGetCookie('ct_has_input_focused') === undefined\n            ) ||\n            ctPublic.data__cookies_type === 'alternative'\n        ) ||\n        (\n            ctPublic.data__cookies_type === 'none' &&\n            (\n                typeof ctPublic.force_alt_cookies !== 'undefined' ||\n                (ctPublic.force_alt_cookies !== undefined && ctPublic.force_alt_cookies)\n            )\n        )\n    ) {\n        ctSetCookie('ct_has_input_focused', 'true');\n    }\n}\n\n/**\n * ctSetHasKeyUp\n */\nfunction ctSetHasKeyUp() {\n    if ( ! apbctLocalStorage.isSet('ct_has_key_up') || ! apbctLocalStorage.get('ct_has_key_up') ) {\n        apbctLocalStorage.set('ct_has_key_up', true);\n    }\n    if (\n        (\n            (\n                ctPublic.data__cookies_type === 'native' &&\n                ctGetCookie('ct_has_key_up') === undefined\n            ) ||\n            ctPublic.data__cookies_type === 'alternative'\n        ) ||\n        (\n            ctPublic.data__cookies_type === 'none' &&\n            (\n                typeof ctPublic.force_alt_cookies !== 'undefined' ||\n                (ctPublic.force_alt_cookies !== undefined && ctPublic.force_alt_cookies)\n            )\n        )\n    ) {\n        ctSetCookie('ct_has_key_up', 'true');\n    }\n}\n\nif (ctPublic.data__key_is_ok) {\n    apbct_attach_event_handler(document, 'mousemove', ctFunctionMouseMove);\n    apbct_attach_event_handler(document, 'mousedown', ctFunctionFirstKey);\n    apbct_attach_event_handler(document, 'keydown', ctFunctionFirstKey);\n    apbct_attach_event_handler(document, 'scroll', ctSetHasScrolled);\n}\n\n/**\n * Prepare block to intercept AJAX response\n */\nfunction apbctPrepareBlockForAjaxForms() {\n    // eslint-disable-next-line require-jsdoc\n    function ctPrepareBlockMessage(xhr) {\n        if (xhr.responseText &&\n            xhr.responseText.indexOf('\"apbct') !== -1 &&\n            xhr.responseText.indexOf('DOCTYPE') === -1\n        ) {\n            try {\n                ctParseBlockMessage(JSON.parse(xhr.responseText));\n            } catch (e) {\n                console.log(e.toString());\n            }\n        }\n    }\n\n    if (typeof jQuery !== 'undefined') {\n        // Capturing responses and output block message for unknown AJAX forms\n        if (typeof jQuery(document).ajaxComplete() !== 'function') {\n            jQuery(document).on('ajaxComplete', function(event, xhr, settings) {\n                ctPrepareBlockMessage(xhr);\n            });\n        } else {\n            jQuery(document).ajaxComplete( function(event, xhr, settings) {\n                ctPrepareBlockMessage(xhr);\n            });\n        }\n    } else {\n        // if Jquery is not avaliable try to use xhr\n        if (typeof XMLHttpRequest !== 'undefined') {\n            // Capturing responses and output block message for unknown AJAX forms\n            document.addEventListener('readystatechange', function(event) {\n                if (event.target.readyState === 4) {\n                    ctPrepareBlockMessage(event.target);\n                }\n            });\n        }\n    }\n}\n\n/**\n * For forced alt cookies.\n * If token is not added to the LS on apbc_ready, check every second if so and send token to the alt sessions.\n */\nfunction startForcedAltEventTokenChecker() {\n    tokenCheckerIntervalId = setInterval( function() {\n        if (apbctLocalStorage.get('event_token_forced_set') === '1') {\n            clearInterval(tokenCheckerIntervalId);\n            return;\n        }\n        let eventToken = apbctLocalStorage.get('bot_detector_event_token');\n        if (eventToken) {\n            ctSetAlternativeCookie([['ct_bot_detector_event_token', eventToken]], {forceAltCookies: true});\n            apbctLocalStorage.set('event_token_forced_set', '1');\n            clearInterval(tokenCheckerIntervalId);\n        } else {\n        }\n    }, 1000);\n}\n\n\n/**\n * Ready function\n */\n// eslint-disable-next-line camelcase,require-jsdoc\nfunction apbct_ready() {\n    document.addEventListener('gform_page_loaded', function() {\n        if (\n            typeof ctPublic.force_alt_cookies === 'undefined' ||\n            (ctPublic.force_alt_cookies !== 'undefined' && !ctPublic.force_alt_cookies)\n        ) {\n            ctNoCookieAttachHiddenFieldsToForms();\n            if (typeof setEventTokenField === 'function' && typeof botDetectorLocalStorage === 'function') {\n                setEventTokenField(botDetectorLocalStorage.get('bot_detector_event_token'));\n            }\n        }\n    });\n    if ( ! ctPublic.wc_ajax_add_to_cart ) {\n        apbctCheckAddToCartByGet();\n    }\n\n    apbctPrepareBlockForAjaxForms();\n\n    // set session ID\n    if (!apbctSessionStorage.isSet('apbct_session_id')) {\n        const sessionID = apbctGenerateUniqueID();\n        apbctSessionStorage.set('apbct_session_id', sessionID, false);\n        apbctLocalStorage.set('apbct_page_hits', 1);\n        if (document.referrer) {\n            let urlReferer = new URL(document.referrer);\n            if (urlReferer.host !== location.host) {\n                apbctSessionStorage.set('apbct_site_referer', document.referrer, false);\n            }\n        }\n    } else {\n        apbctLocalStorage.set('apbct_page_hits', Number(apbctLocalStorage.get('apbct_page_hits')) + 1);\n    }\n\n    apbctWriteReferrersToSessionStorage();\n\n    const cookiesType = apbctLocalStorage.get('ct_cookies_type');\n    if ( ! cookiesType || cookiesType !== ctPublic.data__cookies_type ) {\n        apbctLocalStorage.set('ct_cookies_type', ctPublic.data__cookies_type);\n        apbctLocalStorage.delete('ct_mouse_moved');\n        apbctLocalStorage.delete('ct_has_scrolled');\n    }\n\n    if (ctPublic.data__cookies_type !== 'alternative') {\n        ctStartFieldsListening();\n        // 2nd try to add listeners for delayed appears forms\n        setTimeout(ctStartFieldsListening, 1000);\n    }\n\n    window.addEventListener('animationstart', apbctOnAnimationStart, true);\n    window.addEventListener('input', apbctOnInput, true);\n    document.ctTypoData = new CTTypoData();\n    document.ctTypoData.gatheringFields();\n    document.ctTypoData.setListeners();\n\n    // Collect scrolling info\n    const initCookies = [\n        ['ct_ps_timestamp', Math.floor(new Date().getTime() / 1000)],\n        ['ct_fkp_timestamp', '0'],\n        ['ct_pointer_data', '0'],\n        // eslint-disable-next-line camelcase\n        ['ct_timezone', ctDate.getTimezoneOffset()/60*(-1)],\n        ['ct_screen_info', apbctGetScreenInfo()],\n        ['apbct_headless', navigator.webdriver],\n    ];\n\n    apbctLocalStorage.set('ct_ps_timestamp', Math.floor(new Date().getTime() / 1000));\n    apbctLocalStorage.set('ct_fkp_timestamp', '0');\n    apbctLocalStorage.set('ct_pointer_data', '0');\n    // eslint-disable-next-line camelcase\n    apbctLocalStorage.set('ct_timezone', ctDate.getTimezoneOffset()/60*(-1) );\n    apbctLocalStorage.set('ct_screen_info', apbctGetScreenInfo());\n    apbctLocalStorage.set('apbct_headless', navigator.webdriver);\n\n    if ( ctPublic.data__cookies_type !== 'native' ) {\n        initCookies.push(['apbct_visible_fields', '0']);\n    } else {\n        // Delete all visible fields cookies on load the page\n        let cookiesArray = document.cookie.split(';');\n        if ( cookiesArray.length !== 0 ) {\n            for ( let i = 0; i < cookiesArray.length; i++ ) {\n                let currentCookie = cookiesArray[i].trim();\n                let cookieName = currentCookie.split('=')[0];\n                if ( cookieName.indexOf('apbct_visible_fields_') === 0 ) {\n                    ctDeleteCookie(cookieName);\n                }\n            }\n        }\n    }\n\n    if (\n        +ctPublic.pixel__setting &&\n        !(+ctPublic.pixel__setting == 3 && ctPublic.settings__data__bot_detector_enabled == 1)\n    ) {\n        if ( ctIsDrawPixel() ) {\n            ctGetPixelUrl();\n        } else {\n            initCookies.push(['apbct_pixel_url', ctPublic.pixel__url]);\n        }\n    }\n\n    if ( +ctPublic.data__email_check_before_post) {\n        initCookies.push(['ct_checked_emails', '0']);\n        apbct('input[type = \\'email\\'], #email').on('blur', checkEmail);\n    }\n\n    if ( +ctPublic.data__email_check_exist_post) {\n        initCookies.push(['ct_checked_emails_exist', '0']);\n        apbct('comment-form input[name = \\'email\\'], input#email').on('blur', checkEmailExist);\n    }\n\n    if (apbctLocalStorage.isSet('ct_checkjs')) {\n        initCookies.push(['ct_checkjs', apbctLocalStorage.get('ct_checkjs')]);\n    } else {\n        initCookies.push(['ct_checkjs', 0]);\n    }\n\n    // detect integrated forms that need to be handled via alternative cookies\n    ctDetectForcedAltCookiesForms();\n\n    // send bot detector event token to alt cookies on problem forms\n    let tokenForForceAlt = apbctLocalStorage.get('bot_detector_event_token');\n    if (typeof ctPublic.force_alt_cookies !== 'undefined' &&\n        ctPublic.force_alt_cookies &&\n        ctPublic.settings__data__bot_detector_enabled\n    ) {\n        apbctLocalStorage.set('event_token_forced_set', '0');\n        if (tokenForForceAlt) {\n            initCookies.push(['ct_bot_detector_event_token', tokenForForceAlt]);\n            apbctLocalStorage.set('event_token_forced_set', '1');\n        } else {\n            startForcedAltEventTokenChecker();\n        }\n    }\n\n    ctSetCookie(initCookies);\n\n    setTimeout(function() {\n        if (\n            typeof ctPublic.force_alt_cookies == 'undefined' ||\n            (ctPublic.force_alt_cookies !== 'undefined' && !ctPublic.force_alt_cookies)\n        ) {\n            ctNoCookieAttachHiddenFieldsToForms();\n        }\n\n        if (\n            typeof ctPublic.data__cookies_type !== 'undefined' &&\n            ctPublic.data__cookies_type === 'none'\n        ) {\n            ctAjaxSetupAddCleanTalkDataBeforeSendAjax();\n            ctAddWCMiddlewares();\n        }\n\n        for (let i = 0; i < document.forms.length; i++) {\n            let form = document.forms[i];\n\n            // Exclusion for forms\n            if (ctCheckHiddenFieldsExclusions(document.forms[i], 'visible_fields')) {\n                continue;\n            }\n\n            // The Form has hidden field like apbct_visible_fields\n            if (\n                document.forms[i].elements.apbct_visible_fields !== undefined &&\n                document.forms[i].elements.apbct_visible_fields.length > 0\n            ) {\n                continue;\n            }\n\n            if (form.querySelector('input[name=\"apbct_visible_fields\"]')) {\n                let visibleFields = form.querySelector('input[name=\"apbct_visible_fields\"]');\n                form.removeChild(visibleFields);\n            }\n\n            let hiddenInput = document.createElement( 'input' );\n            hiddenInput.setAttribute( 'type', 'hidden' );\n            hiddenInput.setAttribute( 'id', 'apbct_visible_fields_' + i );\n            hiddenInput.setAttribute( 'name', 'apbct_visible_fields');\n            let visibleFieldsToInput = {};\n            visibleFieldsToInput[0] = apbct_collect_visible_fields(form);\n            hiddenInput.value = btoa(JSON.stringify(visibleFieldsToInput));\n            form.append( hiddenInput );\n\n            form.onsubmit_prev = form.onsubmit;\n\n            form.ctFormIndex = i;\n            form.onsubmit = function(event) {\n                if ( ctPublic.data__cookies_type !== 'native' && typeof event.target.ctFormIndex !== 'undefined' ) {\n                    apbct_visible_fields_set_cookie( apbct_collect_visible_fields(this), event.target.ctFormIndex );\n                }\n\n                if (ctPublic.data__cookies_type === 'none' && isFormThatNeedCatchXhr(event.target)) {\n                    window.XMLHttpRequest.prototype.send = function(data) {\n                        let noCookieData = getNoCookieData();\n                        noCookieData = 'data%5Bct_no_cookie_hidden_field%5D=' + noCookieData + '&';\n                        defaultSend.call(this, noCookieData + data);\n                        setTimeout(() => {\n                            window.XMLHttpRequest.prototype.send = defaultSend;\n                        }, 0);\n                    };\n                }\n\n                // Call previous submit action\n                if (event.target.onsubmit_prev instanceof Function && !ctOnsubmitPrevCallExclude(event.target)) {\n                    event.preventDefault();\n                    setTimeout(function() {\n                        event.target.onsubmit_prev.call(event.target, event);\n                    }, 0);\n                }\n            };\n        }\n    }, 1000);\n\n    // Listen clicks on encoded emails\n    let encodedEmailNodes = document.querySelectorAll('[data-original-string]');\n    ctPublic.encodedEmailNodes = encodedEmailNodes;\n    if (encodedEmailNodes.length) {\n        for (let i = 0; i < encodedEmailNodes.length; ++i) {\n            encodedEmailNodes[i].addEventListener('click', ctFillDecodedEmailHandler);\n        }\n    }\n\n    // WordPress Search form processing\n    for (const _form of document.forms) {\n        if (\n            typeof ctPublic !== 'undefined' &&\n            + ctPublic.settings__forms__search_test === 1 &&\n            (\n                _form.getAttribute('id') === 'searchform' ||\n                (_form.getAttribute('class') !== null && _form.getAttribute('class').indexOf('search-form') !== -1) ||\n                (_form.getAttribute('role') !== null && _form.getAttribute('role').indexOf('search') !== -1)\n            )\n        ) {\n            // fibosearch integration\n            if (_form.querySelector('input.dgwt-wcas-search-input')) {\n                continue;\n            }\n\n            if (\n                _form.getAttribute('id') === 'hero-search-form' ||\n                _form.getAttribute('class') === 'hb-booking-search-form'\n            ) {\n                continue;\n            }\n\n            // this handles search forms onsubmit process\n            _form.apbctSearchPrevOnsubmit = _form.onsubmit;\n            _form.onsubmit = (e) => ctSearchFormOnSubmitHandler(e, _form);\n        }\n    }\n\n    // Check any XMLHttpRequest connections\n    apbctCatchXmlHttpRequest();\n\n    // Initializing the collection of user activity\n    new ApbctCollectingUserActivity();\n\n    // Set important paramaters via ajax if problematic cache solutions found\n    // todo These AJAX calls removed untill we find a better solution, reason is a lot of requests to the server.\n    // apbctAjaxSetImportantParametersOnCacheExist(ctPublic.advancedCacheExists || ctPublic.varnishCacheExists);\n\n    // Checking that the bot detector has loaded and received the event token for Anti-Crawler\n    if (ctPublic.settings__sfw__anti_crawler) {\n        checkBotDetectorExist();\n    }\n}\n\n/**\n * Checking that the bot detector has loaded and received the event token\n */\nfunction checkBotDetectorExist() {\n    if (ctPublic.settings__data__bot_detector_enabled) {\n        const botDetectorIntervalSearch = setInterval(() => {\n            let botDetectorEventToken = localStorage.bot_detector_event_token ? true : false;\n\n            if (botDetectorEventToken) {\n                ctSetCookie('apbct_bot_detector_exist', '1', '3600');\n                clearInterval(botDetectorIntervalSearch);\n            }\n        }, 500);\n    }\n}\n\n/**\n * Insert no_cookies_data to rest request\n */\nfunction ctAddWCMiddlewares() {\n    const ctPinDataToRequest = (options, next) => {\n        if (typeof options !== 'object' || options === null ||\n            !options.hasOwnProperty('data') || !options.hasOwnProperty('path')\n        ) {\n            return next(options);\n        }\n\n        // add to cart\n        if (options.data.hasOwnProperty('requests') &&\n            options.data.requests.length > 0 &&\n            options.data.requests[0].hasOwnProperty('path') &&\n            options.data.requests[0].path === '/wc/store/v1/cart/add-item'\n        ) {\n            options.data.requests[0].data.ct_no_cookie_hidden_field = getNoCookieData();\n            options.data.requests[0].data.event_token = localStorage.getItem('bot_detector_event_token');\n        }\n\n        // checkout\n        if (options.path === '/wc/store/v1/checkout') {\n            options.data.ct_no_cookie_hidden_field = getNoCookieData();\n            options.data.event_token = localStorage.getItem('bot_detector_event_token');\n        }\n\n        return next(options);\n    };\n\n    if (window.hasOwnProperty('wp') &&\n        window.wp.hasOwnProperty('apiFetch') &&\n        typeof window.wp.apiFetch.use === 'function'\n    ) {\n        window.wp.apiFetch.use(ctPinDataToRequest);\n    }\n}\n\n/**\n * Insert event_token and no_cookies_data to some ajax request\n */\nfunction apbctCatchXmlHttpRequest() {\n    // 1) Check the page if it needed to catch XHR\n    if ( document.querySelector('div.wfu_container') !== null ) {\n        const originalSend = XMLHttpRequest.prototype.send;\n        XMLHttpRequest.prototype.send = function(body) {\n            // 2) Check the caught request fi it needed to modify\n            if (\n                body &&\n                typeof body === 'string' &&\n                (\n                    body.indexOf('action=wfu_ajax_action_ask_server') !== -1\n                )\n            ) {\n                let addidionalCleantalkData = '';\n                let eventToken = localStorage.getItem('bot_detector_event_token');\n                try {\n                    eventToken = JSON.parse(eventToken);\n                } catch {\n                    eventToken = false;\n                }\n                if (\n                    eventToken !== null &&\n                    eventToken !== false &&\n                    eventToken.hasOwnProperty('value') &&\n                    eventToken.value !== ''\n                ) {\n                    eventToken = eventToken.value;\n                    addidionalCleantalkData += '&' + 'data%5Bct_bot_detector_event_token%5D=' + eventToken;\n                }\n\n                let noCookieData = getNoCookieData();\n                addidionalCleantalkData += '&' + 'data%5Bct_no_cookie_hidden_field%5D=' + noCookieData;\n\n                body += addidionalCleantalkData;\n\n                return originalSend.apply(this, [body]);\n            }\n            return originalSend.apply(this, [body]);\n        };\n    }\n}\n\n/**\n * Run AJAX to set important_parameters on the site backend if problematic cache solutions are defined.\n * @param {boolean} cacheExist\n */\nfunction apbctAjaxSetImportantParametersOnCacheExist(cacheExist) { // eslint-disable-line no-unused-vars\n    // Set important parameters via ajax\n    if ( cacheExist ) {\n        if ( ctPublicFunctions.data__ajax_type === 'rest' ) {\n            apbct_public_sendREST('apbct_set_important_parameters', {});\n        } else if ( ctPublicFunctions.data__ajax_type === 'admin_ajax' ) {\n            apbct_public_sendAJAX({action: 'apbct_set_important_parameters'}, {});\n        }\n    }\n}\n\n/**\n * Prepare jQuery.ajaxSetup to add nocookie data to the jQuery ajax request.\n * Notes:\n * - Do it just once, the ajaxSetup.beforeSend will be overwritten for any calls.\n * - Signs of forms need to be caught will be checked during ajaxSetup.settings.data process on send.\n * - Any sign of the form HTML of the caller is insignificant in this process.\n * @return {void}\n */\nfunction ctAjaxSetupAddCleanTalkDataBeforeSendAjax() {\n    // jquery ajax call intercept\n    // this is the only place where we can found hard dependency on jQuery, if the form use it - the script\n    // will work independing if jQuery is loaded by CleanTalk or not\n    let eventToken = false;\n    if ( typeof jQuery !== 'undefined' && typeof jQuery.ajaxSetup === 'function') {\n        jQuery.ajaxSetup({\n            beforeSend: function(xhr, settings) {\n                let sourceSign = false;\n                // settings data is string (important!)\n                if ( typeof settings.data === 'string' ) {\n                    if (settings.data.indexOf('twt_cc_signup') !== -1) {\n                        sourceSign = 'twt_cc_signup';\n                    }\n\n                    if (settings.data.indexOf('action=mailpoet') !== -1) {\n                        sourceSign = 'action=mailpoet';\n                    }\n\n                    if (\n                        settings.data.indexOf('action=user_registration') !== -1 &&\n                        settings.data.indexOf('ur_frontend_form_nonce') !== -1\n                    ) {\n                        sourceSign = 'action=user_registration';\n                    }\n\n                    if (settings.data.indexOf('action=happyforms_message') !== -1) {\n                        sourceSign = 'action=happyforms_message';\n                    }\n\n                    if (settings.data.indexOf('action=new_activity_comment') !== -1) {\n                        sourceSign = 'action=new_activity_comment';\n                    }\n                }\n                if ( typeof settings.url === 'string' ) {\n                    if (settings.url.indexOf('wc-ajax=add_to_cart') !== -1) {\n                        sourceSign = 'wc-ajax=add_to_cart';\n                        if (localStorage.getItem('bot_detector_event_token') !== null) {\n                            eventToken = localStorage.getItem('bot_detector_event_token');\n                            try {\n                                eventToken = JSON.parse(eventToken);\n                            } catch {\n                                eventToken = false;\n                            }\n                            if (eventToken !== false && eventToken.hasOwnProperty('value') && eventToken.value !== '') {\n                                eventToken = eventToken.value;\n                            }\n                        }\n                    }\n                }\n\n                if (sourceSign) {\n                    let noCookieData = getNoCookieData();\n                    if (typeof eventToken === 'string') {\n                        eventToken = 'data%5Bct_bot_detector_event_token%5D=' + eventToken + '&';\n                    } else {\n                        eventToken = '';\n                    }\n                    noCookieData = 'data%5Bct_no_cookie_hidden_field%5D=' + noCookieData + '&';\n\n                    settings.data = noCookieData + eventToken + settings.data;\n                }\n            },\n        });\n    }\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction ctOnsubmitPrevCallExclude(form) {\n    if (form.classList.contains('hb-booking-search-form')) {\n        return true;\n    }\n\n    return false;\n}\n\nif (ctPublic.data__key_is_ok) {\n    if (document.readyState !== 'loading') {\n        apbct_ready();\n    } else {\n        apbct_attach_event_handler(document, 'DOMContentLoaded', apbct_ready);\n    }\n\n    apbctLocalStorage.set('ct_checkjs', ctPublic.ct_checkjs_key, true );\n}\n\n/**\n * @param {SubmitEvent} e\n * @param {object} targetForm\n */\nfunction ctSearchFormOnSubmitHandler(e, targetForm) {\n    try {\n        // get honeypot field and it's value\n        const honeyPotField = targetForm.querySelector('[name*=\"apbct_email_id__\"]');\n        let hpValue = null;\n        if (\n            honeyPotField !== null &&\n            honeyPotField.value !== null\n        ) {\n            hpValue = honeyPotField.value;\n        }\n\n        // get cookie data from storages\n        let cleantalkStorageDataArray = getCleanTalkStorageDataArray();\n\n        // get event token from storage\n        let eventTokenLocalStorage = apbctLocalStorage.get('bot_detector_event_token');\n\n        // if noCookie data or honeypot data is set, proceed handling\n        if ( cleantalkStorageDataArray !== null || honeyPotField !== null || eventTokenLocalStorage !== null ) {\n            e.preventDefault();\n            const callBack = () => {\n                if (honeyPotField !== null) {\n                    honeyPotField.parentNode.removeChild(honeyPotField);\n                }\n                if (typeof targetForm.apbctSearchPrevOnsubmit === 'function') {\n                    targetForm.apbctSearchPrevOnsubmit();\n                } else {\n                    HTMLFormElement.prototype.submit.call(targetForm);\n                }\n            };\n\n            let cookiesArray = cleantalkStorageDataArray;\n\n            // if honeypot data provided add the fields to the parsed data\n            if ( hpValue !== null ) {\n                cookiesArray.apbct_search_form__honeypot_value = hpValue;\n            }\n\n            // set event token\n            cookiesArray.ct_bot_detector_event_token = eventTokenLocalStorage;\n\n            // if the pixel needs to be decoded\n            if (\n                typeof cookiesArray.apbct_pixel_url === 'string' &&\n                cookiesArray.apbct_pixel_url.indexOf('%3A') !== -1\n            ) {\n                cookiesArray.apbct_pixel_url = decodeURIComponent(cookiesArray.apbct_pixel_url);\n            }\n\n            // data to JSON\n            const parsedCookies = JSON.stringify(cookiesArray);\n\n            // if any data provided, proceed data to xhr\n            if ( typeof parsedCookies !== 'undefined' && parsedCookies.length !== 0 ) {\n                ctSetAlternativeCookie(\n                    parsedCookies,\n                    {callback: callBack, onErrorCallback: callBack, forceAltCookies: true},\n                );\n            } else {\n                callBack();\n            }\n        }\n    } catch (error) {\n        console.warn('APBCT search form onsubmit handler error. ' + error);\n    }\n}\n\n/**\n * @param {mixed} commonCookies\n * @return {string}\n */\nfunction getJavascriptClientData(commonCookies = []) { // eslint-disable-line no-unused-vars\n    let resultDataJson = {};\n\n    resultDataJson.ct_checked_emails = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checked_emails');\n    resultDataJson.ct_checked_emails_exist = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checked_emails_exist');\n    resultDataJson.ct_checkjs = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_checkjs');\n    resultDataJson.ct_fkp_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_fkp_timestamp');\n    resultDataJson.ct_pointer_data = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_pointer_data');\n    resultDataJson.ct_ps_timestamp = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_ps_timestamp');\n    resultDataJson.ct_screen_info = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_screen_info');\n    resultDataJson.ct_timezone = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_timezone');\n\n    // collecting data from localstorage\n    const ctMouseMovedLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n    const ctHasScrolledLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n    const ctCookiesTypeLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n    const apbctPageHits = apbctLocalStorage.get('apbct_page_hits');\n    const apbctPrevReferer = apbctSessionStorage.get('apbct_prev_referer');\n    const apbctSiteReferer = apbctSessionStorage.get('apbct_site_referer');\n    const ctJsErrorsLocalStorage = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'ct_js_errors');\n    const ctPixelUrl = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'apbct_pixel_url');\n    const apbctHeadless = apbctLocalStorage.get(ctPublicFunctions.cookiePrefix + 'apbct_headless');\n    const ctBotDetectorFrontendDataLog = apbctLocalStorage.get(\n        ctPublicFunctions.cookiePrefix + 'ct_bot_detector_frontend_data_log',\n    );\n\n    // collecting data from cookies\n    const ctMouseMovedCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_mouse_moved');\n    const ctHasScrolledCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_has_scrolled');\n    const ctCookiesTypeCookie = ctGetCookie(ctPublicFunctions.cookiePrefix + 'ct_cookies_type');\n    const ctCookiesPixelUrl = ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_pixel_url');\n    const apbctHeadlessNative = !!ctGetCookie(ctPublicFunctions.cookiePrefix + 'apbct_headless');\n\n\n    resultDataJson.ct_mouse_moved = ctMouseMovedLocalStorage !== undefined ?\n        ctMouseMovedLocalStorage : ctMouseMovedCookie;\n    resultDataJson.ct_has_scrolled = ctHasScrolledLocalStorage !== undefined ?\n        ctHasScrolledLocalStorage : ctHasScrolledCookie;\n    resultDataJson.ct_cookies_type = ctCookiesTypeLocalStorage !== undefined ?\n        ctCookiesTypeLocalStorage : ctCookiesTypeCookie;\n    resultDataJson.apbct_pixel_url = ctPixelUrl !== undefined ?\n        ctPixelUrl : ctCookiesPixelUrl;\n    resultDataJson.apbct_headless = apbctHeadless !== undefined ?\n        apbctHeadless : apbctHeadlessNative;\n    resultDataJson.ct_bot_detector_frontend_data_log = ctBotDetectorFrontendDataLog !== undefined ?\n        ctBotDetectorFrontendDataLog : '';\n    if (resultDataJson.apbct_pixel_url && typeof(resultDataJson.apbct_pixel_url) == 'string') {\n        if (resultDataJson.apbct_pixel_url.indexOf('%3A%2F')) {\n            resultDataJson.apbct_pixel_url = decodeURIComponent(resultDataJson.apbct_pixel_url);\n        }\n    }\n\n    resultDataJson.apbct_page_hits = apbctPageHits;\n    resultDataJson.apbct_prev_referer = apbctPrevReferer;\n    resultDataJson.apbct_site_referer = apbctSiteReferer;\n    resultDataJson.apbct_ct_js_errors = ctJsErrorsLocalStorage;\n\n    if (!resultDataJson.apbct_pixel_url) {\n        resultDataJson.apbct_pixel_url = ctPublic.pixel__url;\n    }\n\n    if ( typeof (commonCookies) === 'object') {\n        for (let i = 0; i < commonCookies.length; ++i) {\n            if ( typeof (commonCookies[i][1]) === 'object' ) {\n                // this is for handle SFW cookies\n                resultDataJson[commonCookies[i][1][0]] = commonCookies[i][1][1];\n            } else {\n                resultDataJson[commonCookies[i][0]] = commonCookies[i][1];\n            }\n        }\n    } else {\n        console.log('APBCT JS ERROR: Collecting data type mismatch');\n    }\n\n    // Parse JSON properties to prevent double JSON encoding\n    resultDataJson = removeDoubleJsonEncoding(resultDataJson);\n\n\n    return JSON.stringify(resultDataJson);\n}\n\n/**\n * Recursive\n *\n * Recursively decode JSON-encoded properties\n *\n * @param {mixed} object\n * @return {*}\n */\nfunction removeDoubleJsonEncoding(object) {\n    if ( typeof object === 'object') {\n        // eslint-disable-next-line guard-for-in\n        for (let objectKey in object) {\n            // Recursion\n            if ( typeof object[objectKey] === 'object') {\n                object[objectKey] = removeDoubleJsonEncoding(object[objectKey]);\n            }\n\n            // Common case (out)\n            if (\n                typeof object[objectKey] === 'string' &&\n                object[objectKey].match(/^[\\[{].*?[\\]}]$/) !== null // is like JSON\n            ) {\n                const parsedValue = JSON.parse(object[objectKey]);\n                if ( typeof parsedValue === 'object' ) {\n                    object[objectKey] = parsedValue;\n                }\n            }\n        }\n    }\n\n    return object;\n}\n\n// eslint-disable-next-line camelcase,require-jsdoc\nfunction apbct_collect_visible_fields( form ) {\n    // Get only fields\n    let inputs = [];\n    let inputsVisible = '';\n    let inputsVisibleCount = 0;\n    let inputsInvisible = '';\n    let inputsInvisibleCount = 0;\n    let inputsWithDuplicateNames = [];\n\n    for (let key in form.elements) {\n        if (!isNaN(+key)) {\n            inputs[key] = form.elements[key];\n        }\n    }\n\n    // Filter fields\n    inputs = inputs.filter(function(elem) {\n        // Filter already added fields\n        if ( inputsWithDuplicateNames.indexOf( elem.getAttribute('name') ) !== -1 ) {\n            return false;\n        }\n        // Filter inputs with same names for type == radio\n        if ( -1 !== ['radio', 'checkbox'].indexOf( elem.getAttribute('type') )) {\n            inputsWithDuplicateNames.push( elem.getAttribute('name') );\n            return false;\n        }\n        return true;\n    });\n\n    // Visible fields\n    inputs.forEach(function(elem, i, elements) {\n        // Unnecessary fields\n        if (\n            elem.getAttribute('type') === 'submit' || // type == submit\n            elem.getAttribute('name') === null ||\n            elem.getAttribute('name') === 'ct_checkjs'\n        ) {\n            return;\n        }\n        // Invisible fields\n        if (\n            getComputedStyle(elem).display === 'none' || // hidden\n            getComputedStyle(elem).visibility === 'hidden' || // hidden\n            getComputedStyle(elem).opacity === '0' || // hidden\n            elem.getAttribute('type') === 'hidden' // type == hidden\n        ) {\n            if ( elem.classList.contains('wp-editor-area') ) {\n                inputsVisible += ' ' + elem.getAttribute('name');\n                inputsVisibleCount++;\n            } else {\n                inputsInvisible += ' ' + elem.getAttribute('name');\n                inputsInvisibleCount++;\n            }\n            // eslint-disable-next-line brace-style\n        }\n        // Visible fields\n        else {\n            inputsVisible += ' ' + elem.getAttribute('name');\n            inputsVisibleCount++;\n        }\n    });\n\n    inputsInvisible = inputsInvisible.trim();\n    inputsVisible = inputsVisible.trim();\n\n    return {\n        visible_fields: inputsVisible,\n        visible_fields_count: inputsVisibleCount,\n        invisible_fields: inputsInvisible,\n        invisible_fields_count: inputsInvisibleCount,\n    };\n}\n\n// eslint-disable-next-line camelcase,require-jsdoc\nfunction apbct_visible_fields_set_cookie( visibleFieldsCollection, formId ) {\n    let collection = typeof visibleFieldsCollection === 'object' && visibleFieldsCollection !== null ?\n        visibleFieldsCollection : {};\n\n    if ( ctPublic.data__cookies_type === 'native' ) {\n        // eslint-disable-next-line guard-for-in\n        for ( let i in collection ) {\n            if ( i > 10 ) {\n                // Do not generate more than 10 cookies\n                return;\n            }\n            let collectionIndex = formId !== undefined ? formId : i;\n            ctSetCookie('apbct_visible_fields_' + collectionIndex, JSON.stringify( collection[i] ) );\n        }\n    } else {\n        ctSetCookie('apbct_visible_fields', JSON.stringify( collection ) );\n    }\n}\n\n// eslint-disable-next-line camelcase,require-jsdoc,no-unused-vars\nfunction apbct_js_keys__set_input_value(result, data, params, obj) {\n    if ( document.querySelectorAll('[name^=ct_checkjs]').length > 0 ) {\n        let elements = document.querySelectorAll('[name^=ct_checkjs]');\n        for ( let i = 0; i < elements.length; i++ ) {\n            elements[i].value = result.js_key;\n        }\n    }\n}\n\n/**\n * @return {string}\n */\nfunction apbctGetScreenInfo() {\n    return JSON.stringify({\n        fullWidth: document.documentElement.scrollWidth,\n        fullHeight: Math.max(\n            document.body.scrollHeight, document.documentElement.scrollHeight,\n            document.body.offsetHeight, document.documentElement.offsetHeight,\n            document.body.clientHeight, document.documentElement.clientHeight,\n        ),\n        visibleWidth: document.documentElement.clientWidth,\n        visibleHeight: document.documentElement.clientHeight,\n    });\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction ctParseBlockMessage(response) {\n    if (typeof response.apbct !== 'undefined') {\n        response = response.apbct;\n        if (response.blocked) {\n            document.dispatchEvent(\n                new CustomEvent( 'apbctAjaxBockAlert', {\n                    bubbles: true,\n                    detail: {message: response.comment},\n                } ),\n            );\n\n            // Show the result by modal\n            cleantalkModal.loaded = response.comment;\n            cleantalkModal.open();\n\n            if (+response.stop_script === 1) {\n                window.stop();\n            }\n        }\n    }\n}\n\n// eslint-disable-next-line no-unused-vars,require-jsdoc\nfunction ctSetPixelUrlLocalstorage(ajaxPixelUrl) {\n    // set pixel to the storage\n    ctSetCookie('apbct_pixel_url', ajaxPixelUrl);\n}\n\n// eslint-disable-next-line require-jsdoc\nfunction ctNoCookieConstructHiddenField(type) {\n    let inputType = 'hidden';\n    if (type === 'submit') {\n        inputType = 'submit';\n    }\n    let field = '';\n\n    let noCookieData = getCleanTalkStorageDataArray();\n    noCookieData = JSON.stringify(noCookieData);\n    noCookieData = '_ct_no_cookie_data_' + btoa(noCookieData);\n    field = document.createElement('input');\n    field.setAttribute('name', 'ct_no_cookie_hidden_field');\n    field.setAttribute('value', noCookieData);\n    field.setAttribute('type', inputType);\n    field.classList.add('apbct_special_field');\n    field.classList.add('ct_no_cookie_hidden_field');\n    return field;\n}\n\n/**\n * Retrieves the clentalk \"cookie\" data from starages.\n * Contains {...noCookieDataLocal, ...noCookieDataSession, ...noCookieDataTypo, ...noCookieDataFromUserActivity}.\n * @return {string}\n */\nfunction getCleanTalkStorageDataArray() {\n    let noCookieDataLocal = apbctLocalStorage.getCleanTalkData();\n    let noCookieDataSession = apbctSessionStorage.getCleanTalkData();\n\n    let noCookieDataTypo = {typo: []};\n    if (document.ctTypoData && document.ctTypoData.data) {\n        noCookieDataTypo = {typo: document.ctTypoData.data};\n    }\n\n    let noCookieDataFromUserActivity = {collecting_user_activity_data: []};\n\n    if (document.ctCollectingUserActivityData) {\n        let collectingUserActivityData = JSON.parse(JSON.stringify(document.ctCollectingUserActivityData));\n        noCookieDataFromUserActivity = {collecting_user_activity_data: collectingUserActivityData};\n    }\n\n    return {...noCookieDataLocal, ...noCookieDataSession, ...noCookieDataTypo, ...noCookieDataFromUserActivity};\n}\n\n/**\n * @return {boolean|*}\n */\nfunction ctGetPageForms() {\n    let forms = document.forms;\n    if (forms) {\n        return forms;\n    }\n    return false;\n}\n\n/**\n * Get type of the field should be excluded. Return exclusion signs via object.\n * @param {object} form Form dom object.\n * @return {object} {'no_cookie': 1|0, 'visible_fields': 1|0}\n */\nfunction ctGetHiddenFieldExclusionsType(form) {\n    // visible fields\n    let result = {'no_cookie': 0, 'visible_fields': 0};\n    if (\n        +ctPublic.data__visible_fields_required === 0 ||\n        (form.method.toString().toLowerCase() === 'get' &&\n        form.querySelectorAll('.nf-form-content').length === 0 &&\n        form.id !== 'twt_cc_signup') ||\n        form.classList.contains('slp_search_form') || // StoreLocatorPlus form\n        form.parentElement.classList.contains('mec-booking') ||\n        form.action.toString().indexOf('activehosted.com') !== -1 || // Active Campaign\n        (form.id && form.id === 'caspioform') || // Caspio Form\n        (form.classList && form.classList.contains('tinkoffPayRow')) || // TinkoffPayForm\n        (form.classList && form.classList.contains('give-form')) || // GiveWP\n        (form.id && form.id === 'ult-forgot-password-form') || // ult forgot password\n        (form.id && form.id.toString().indexOf('calculatedfields') !== -1) || // CalculatedFieldsForm\n        (form.id && form.id.toString().indexOf('sac-form') !== -1) || // Simple Ajax Chat\n        (form.id &&\n            form.id.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n        (form.name &&\n            form.name.toString().indexOf('cp_tslotsbooking_pform') !== -1) || // WP Time Slots Booking Form\n        form.action.toString() === 'https://epayment.epymtservice.com/epay.jhtml' || // Custom form\n        (form.name && form.name.toString().indexOf('tribe-bar-form') !== -1) || // The Events Calendar\n        (form.id && form.id === 'ihf-login-form') || // Optima Express login\n        (form.id &&\n            form.id === 'subscriberForm' &&\n            form.action.toString().indexOf('actionType=update') !== -1) || // Optima Express update\n        (form.id && form.id === 'ihf-main-search-form') || // Optima Express search\n        (form.id && form.id === 'frmCalc') || // nobletitle-calc\n        form.action.toString().indexOf('property-organizer-delete-saved-search-submit') !== -1 ||\n        form.querySelector('a[name=\"login\"]') !== null // digimember login form\n    ) {\n        result.visible_fields = 1;\n    }\n\n    // ajax search pro exclusion\n    let ncFieldExclusionsSign = form.parentNode;\n    if (\n        ncFieldExclusionsSign && ncFieldExclusionsSign.classList.contains('proinput') ||\n        (form.name === 'options' && form.classList.contains('asp-fss-flex'))\n    ) {\n        result.no_cookie = 1;\n    }\n\n    // woocommerce login form\n    if (\n        form && form.classList.contains('woocommerce-form-login')\n    ) {\n        result.visible_fields = 1;\n        result.no_cookie = 1;\n    }\n\n    return result;\n}\n\n/**\n * Check if the form should be skipped from hidden field attach.\n * Return exclusion description if it is found, false otherwise.\n * @param {object} form Form dom object.\n * @param {string} hiddenFieldType Type of hidden field that needs to be checked.\n * Possible values: 'no_cookie'|'visible_fields'.\n * @return {boolean}\n */\nfunction ctCheckHiddenFieldsExclusions(form, hiddenFieldType) {\n    const formAction = typeof(form.action) == 'string' ? form.action : '';\n    // Ajax Search Lite\n    if (Boolean(form.querySelector('fieldset.asl_sett_scroll'))) {\n        return true;\n    }\n    // Super WooCommerce Product Filter\n    if (form.classList.contains('swpf-instant-filtering')) {\n        return true;\n    }\n    // PayU 3-rd party service forms\n    if (formAction.indexOf('secure.payu.com') !== -1 ) {\n        return true;\n    }\n\n    if (formAction.indexOf('hsforms') !== -1 ) {\n        return true;\n    }\n\n    if (typeof (hiddenFieldType) === 'string' &&\n        ['visible_fields', 'no_cookie'].indexOf(hiddenFieldType) !== -1) {\n        const exclusions = ctGetHiddenFieldExclusionsType(form);\n        return exclusions[hiddenFieldType] === 1;\n    }\n\n    return false;\n}\n\n/**\n * ctNoCookieAttachHiddenFieldsToForms\n */\nfunction ctNoCookieAttachHiddenFieldsToForms() {\n    if (ctPublic.data__cookies_type !== 'none') {\n        return;\n    }\n\n    let forms = ctGetPageForms();\n\n    if (forms) {\n        for ( let i = 0; i < forms.length; i++ ) {\n            if ( ctCheckHiddenFieldsExclusions(document.forms[i], 'no_cookie') ) {\n                continue;\n            }\n\n            // ignore forms with get method @todo We need to think about this\n            if (document.forms[i].getAttribute('method') === null ||\n                document.forms[i].getAttribute('method').toLowerCase() === 'post') {\n                // remove old sets\n                let fields = forms[i].querySelectorAll('.ct_no_cookie_hidden_field');\n                for ( let j = 0; j < fields.length; j++ ) {\n                    fields[j].outerHTML = '';\n                }\n                // add new set\n                document.forms[i].append(ctNoCookieConstructHiddenField());\n            }\n        }\n    }\n}\n\nconst defaultFetch = window.fetch;\nconst defaultSend = XMLHttpRequest.prototype.send;\n\nif (document.readyState !== 'loading') {\n    checkFormsExistForCatching();\n} else {\n    apbct_attach_event_handler(document, 'DOMContentLoaded', checkFormsExistForCatching);\n}\n\n/**\n * checkFormsExistForCatching\n */\nfunction checkFormsExistForCatching() {\n    setTimeout(function() {\n        if (isFormThatNeedCatch()) {\n            window.fetch = function(...args) {\n                if (args &&\n                    args[0] &&\n                    typeof args[0].includes === 'function' &&\n                    args[0].includes('/wp-json/metform/')\n                ) {\n                    let noCookieData = getNoCookieData();\n\n                    if (args && args[1] && args[1].body) {\n                        args[1].body.append('ct_no_cookie_hidden_field', noCookieData);\n                    }\n                }\n\n                return defaultFetch.apply(window, args);\n            };\n        }\n    }, 1000);\n}\n\n/**\n * @return {boolean}\n */\nfunction isFormThatNeedCatch() {\n    const formClasses = [\n        'metform-form-content',\n    ];\n    let classExists = false;\n\n    const forms = document.forms;\n    for (let form of forms) {\n        formClasses.forEach(function(classForm) {\n            if (form.classList.contains(classForm)) {\n                classExists = true;\n            }\n        });\n    }\n\n    return classExists;\n}\n\n/**\n * @param {HTMLElement} form\n * @return {boolean}\n */\nfunction isFormThatNeedCatchXhr(form) {\n    if (document.querySelector('div.elementor-widget[title=\\'Login/Signup\\']') != null) {\n        return false;\n    }\n    if (form && form.action && form.action.toString().indexOf('mailpoet_subscription_form') !== -1) {\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * @return {string}\n */\nfunction getNoCookieData() {\n    let noCookieDataLocal = apbctLocalStorage.getCleanTalkData();\n    let noCookieDataSession = apbctSessionStorage.getCleanTalkData();\n    let noCookieData = {...noCookieDataLocal, ...noCookieDataSession};\n    noCookieData = JSON.stringify(noCookieData);\n\n    return '_ct_no_cookie_data_' + btoa(noCookieData);\n}\n\n/**\n * Set three statements to the sessions storage: apbct_session_current_page, apbct_prev_referer.\n * @return {void}\n */\nfunction apbctWriteReferrersToSessionStorage() {\n    const sessionCurrentPage = apbctSessionStorage.get('apbct_session_current_page');\n\n    // set session apbct_referer\n    if (sessionCurrentPage!== false && document.location.href !== sessionCurrentPage) {\n        apbctSessionStorage.set('apbct_prev_referer', sessionCurrentPage, false);\n    }\n\n    // set session current page to know referrer\n    apbctSessionStorage.set('apbct_session_current_page', document.location.href, false);\n}\n\n/**\n * WooCommerce add to cart by GET request params collecting\n */\nfunction apbctCheckAddToCartByGet() {\n    // 1) Collect all links with add_to_cart_button class\n    document.querySelectorAll('a.add_to_cart_button:not(.product_type_variable):not(.wc-interactive)').forEach((el) => {\n        el.addEventListener('click', function(e) {\n            let href = el.getAttribute('href');\n            // 2) Add to href attribute additional parameter ct_bot_detector_event_token gathered from apbctLocalStorage\n            let eventToken = apbctLocalStorage.get('bot_detector_event_token');\n            if ( eventToken ) {\n                if ( href.indexOf('?') === -1 ) {\n                    href += '?';\n                } else {\n                    href += '&';\n                }\n                href += 'ct_bot_detector_event_token=' + eventToken;\n                el.setAttribute('href', href);\n            }\n        });\n    });\n}\n\n/* Cleantalk Modal object */\nlet cleantalkModal = {\n\n    // Flags\n    loaded: false,\n    loading: false,\n    opened: false,\n    opening: false,\n    ignoreURLConvert: false,\n\n    // Methods\n    load: function( action ) {\n        if ( ! this.loaded ) {\n            this.loading = true;\n            let callback = function( result, data, params, obj ) {\n                cleantalkModal.loading = false;\n                cleantalkModal.loaded = result;\n                document.dispatchEvent(\n                    new CustomEvent( 'cleantalkModalContentLoaded', {\n                        bubbles: true,\n                    } ),\n                );\n            };\n            // eslint-disable-next-line camelcase\n            if ( typeof apbct_admin_sendAJAX === 'function' ) {\n                apbct_admin_sendAJAX( {'action': action}, {'callback': callback, 'notJson': true} );\n            } else {\n                apbct_public_sendAJAX( {'action': action}, {'callback': callback, 'notJson': true} );\n            }\n        }\n    },\n\n    open: function() {\n        /* Cleantalk Modal CSS start */\n        let renderCss = function() {\n            let cssStr = '';\n            // eslint-disable-next-line guard-for-in\n            for ( const key in this.styles ) {\n                cssStr += key + ':' + this.styles[key] + ';';\n            }\n            return cssStr;\n        };\n        let overlayCss = {\n            styles: {\n                'z-index': '9999999999',\n                'position': 'fixed',\n                'top': '0',\n                'left': '0',\n                'width': '100%',\n                'height': '100%',\n                'background': 'rgba(0,0,0,0.5)',\n                'display': 'flex',\n                'justify-content': 'center',\n                'align-items': 'center',\n            },\n            toString: renderCss,\n        };\n        let innerCss = {\n            styles: {\n                'position': 'relative',\n                'padding': '30px',\n                'background': '#FFF',\n                'border': '1px solid rgba(0,0,0,0.75)',\n                'border-radius': '4px',\n                'box-shadow': '7px 7px 5px 0px rgba(50,50,50,0.75)',\n            },\n            toString: renderCss,\n        };\n        let closeCss = {\n            styles: {\n                'position': 'absolute',\n                'background': '#FFF',\n                'width': '20px',\n                'height': '20px',\n                'border': '2px solid rgba(0,0,0,0.75)',\n                'border-radius': '15px',\n                'cursor': 'pointer',\n                'top': '-8px',\n                'right': '-8px',\n                'box-sizing': 'content-box',\n            },\n            toString: renderCss,\n        };\n        let closeCssBefore = {\n            styles: {\n                'content': '\"\"',\n                'display': 'block',\n                'position': 'absolute',\n                'background': '#000',\n                'border-radius': '1px',\n                'width': '2px',\n                'height': '16px',\n                'top': '2px',\n                'left': '9px',\n                'transform': 'rotate(45deg)',\n            },\n            toString: renderCss,\n        };\n        let closeCssAfter = {\n            styles: {\n                'content': '\"\"',\n                'display': 'block',\n                'position': 'absolute',\n                'background': '#000',\n                'border-radius': '1px',\n                'width': '2px',\n                'height': '16px',\n                'top': '2px',\n                'left': '9px',\n                'transform': 'rotate(-45deg)',\n            },\n            toString: renderCss,\n        };\n        let bodyCss = {\n            styles: {\n                'overflow': 'hidden',\n            },\n            toString: renderCss,\n        };\n        let cleantalkModalStyle = document.createElement( 'style' );\n        cleantalkModalStyle.setAttribute( 'id', 'cleantalk-modal-styles' );\n        cleantalkModalStyle.innerHTML = 'body.cleantalk-modal-opened{' + bodyCss + '}';\n        cleantalkModalStyle.innerHTML += '#cleantalk-modal-overlay{' + overlayCss + '}';\n        cleantalkModalStyle.innerHTML += '#cleantalk-modal-close{' + closeCss + '}';\n        cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:before{' + closeCssBefore + '}';\n        cleantalkModalStyle.innerHTML += '#cleantalk-modal-close:after{' + closeCssAfter + '}';\n        document.body.append( cleantalkModalStyle );\n        /* Cleantalk Modal CSS end */\n\n        let overlay = document.createElement( 'div' );\n        overlay.setAttribute( 'id', 'cleantalk-modal-overlay' );\n        document.body.append( overlay );\n\n        document.body.classList.add( 'cleantalk-modal-opened' );\n\n        let inner = document.createElement( 'div' );\n        inner.setAttribute( 'id', 'cleantalk-modal-inner' );\n        inner.setAttribute( 'style', innerCss );\n        overlay.append( inner );\n\n        let close = document.createElement( 'div' );\n        close.setAttribute( 'id', 'cleantalk-modal-close' );\n        inner.append( close );\n\n        let content = document.createElement( 'div' );\n        if ( this.loaded ) {\n            const urlRegex = /(https?:\\/\\/[^\\s]+)/g;\n            const serviceContentRegex = /.*\\/inc/g;\n            if (serviceContentRegex.test(this.loaded) || this.ignoreURLConvert) {\n                content.innerHTML = this.loaded;\n            } else {\n                content.innerHTML = this.loaded.replace(urlRegex, '<a href=\"$1\" target=\"_blank\">$1</a>');\n            }\n        } else {\n            content.innerHTML = 'Loading...';\n            // @ToDo Here is hardcoded parameter. Have to get this from a 'data-' attribute.\n            this.load( 'get_options_template' );\n        }\n        content.setAttribute( 'id', 'cleantalk-modal-content' );\n        inner.append( content );\n\n        this.opened = true;\n    },\n\n    close: function() {\n        document.body.classList.remove( 'cleantalk-modal-opened' );\n        document.getElementById( 'cleantalk-modal-overlay' ).remove();\n        document.getElementById( 'cleantalk-modal-styles' ).remove();\n        document.dispatchEvent(\n            new CustomEvent( 'cleantalkModalClosed', {\n                bubbles: true,\n            } ),\n        );\n    },\n\n};\n\n/* Cleantalk Modal helpers */\ndocument.addEventListener('click', function( e ) {\n    if ( e.target && (e.target.id === 'cleantalk-modal-overlay' || e.target.id === 'cleantalk-modal-close') ) {\n        cleantalkModal.close();\n    }\n});\ndocument.addEventListener('cleantalkModalContentLoaded', function( e ) {\n    if ( cleantalkModal.opened && cleantalkModal.loaded ) {\n        document.getElementById( 'cleantalk-modal-content' ).innerHTML = cleantalkModal.loaded;\n    }\n});\n\ndocument.addEventListener('DOMContentLoaded', function() {\n    let ctTrpLocalize = undefined;\n    let ctTrpIsAdminCommentsList = false;\n\n    if ( typeof ctPublic !== 'undefined' || typeof ctTrpAdminLocalize !== 'undefined' ) {\n        if ( typeof ctPublic !== 'undefined' && ctPublic.theRealPerson ) {\n            ctTrpLocalize = ctPublic.theRealPerson;\n        }\n        if (\n            typeof ctTrpLocalize === 'undefined' &&\n            typeof ctTrpAdminLocalize !== 'undefined' &&\n            ctTrpAdminLocalize.theRealPerson\n        ) {\n            ctTrpLocalize = ctTrpAdminLocalize.theRealPerson;\n            ctTrpIsAdminCommentsList = true;\n        }\n    }\n\n    if ( ! ctTrpLocalize ) {\n        return;\n    }\n\n    // Selectors. Try to handle the WIDE range of themes.\n    let themesCommentsSelector = '.apbct-trp *[class*=\"comment-author\"]';\n    if ( document.querySelector('.apbct-trp .comment-author .comment-author-link') ) {\n        // For Spacious theme\n        themesCommentsSelector = '.apbct-trp *[class*=\"comment-author-link\"]';\n    }\n    let woocommerceReviewsSelector = '.apbct-trp *[class*=\"review__author\"]';\n    let adminCommentsListSelector = '.apbct-trp td[class*=\"column-author\"] > strong';\n    const trpComments = document.querySelectorAll(\n        themesCommentsSelector + ',' +\n        woocommerceReviewsSelector + ',' +\n        adminCommentsListSelector);\n\n    if ( trpComments.length === 0 ) {\n        return;\n    }\n\n    trpComments.forEach(( element, index ) => {\n        // Exceptions for items that are included in the selection\n        if (\n            typeof pagenow == 'undefined' &&\n            element.parentElement.className.indexOf('group') < 0 &&\n            element.tagName != 'DIV'\n        ) {\n            return;\n        }\n\n        let trpLayout = document.createElement('div');\n        trpLayout.setAttribute('class', 'apbct-real-user-badge');\n\n        let trpImage = document.createElement('img');\n        trpImage.setAttribute('src', ctTrpLocalize.imgPersonUrl);\n        trpImage.setAttribute('class', 'apbct-real-user-popup-img');\n\n        let trpDescription = document.createElement('div');\n        trpDescription.setAttribute('class', 'apbct-real-user-popup');\n\n        let trpDescriptionHeading = document.createElement('p');\n        trpDescriptionHeading.setAttribute('class', 'apbct-real-user-popup-header');\n        trpDescriptionHeading.append(ctTrpLocalize.phrases.trpHeading);\n\n        let trpDescriptionContent = document.createElement('div');\n        trpDescriptionContent.setAttribute('class', 'apbct-real-user-popup-content_row');\n\n        let trpDescriptionContentSpan = document.createElement('span');\n        trpDescriptionContentSpan.append(ctTrpLocalize.phrases.trpContent1 + ' ');\n        trpDescriptionContentSpan.append(ctTrpLocalize.phrases.trpContent2);\n\n        if ( ctTrpIsAdminCommentsList ) {\n            let learnMoreLink = document.createElement('a');\n            learnMoreLink.setAttribute('href', ctTrpLocalize.trpContentLink);\n            learnMoreLink.setAttribute('target', '_blank');\n            learnMoreLink.text = ctTrpLocalize.phrases.trpContentLearnMore;\n            trpDescriptionContentSpan.append(' '); // Need one space\n            trpDescriptionContentSpan.append(learnMoreLink);\n        }\n\n        trpDescriptionContent.append(trpDescriptionContentSpan);\n        trpDescription.append(trpDescriptionHeading, trpDescriptionContent);\n        trpLayout.append(trpImage);\n        element.append(trpLayout);\n        element.append(trpDescription);\n    });\n\n    const badges = document.querySelectorAll('.apbct-real-user-badge');\n\n    badges.forEach((badge) => {\n        let hideTimeout = undefined;\n\n        this.body.addEventListener('click', function(e) {\n            if (\n                e.target.className.indexOf('apbct-real-user') == -1 &&\n                e.target.parentElement.className.indexOf('apbct-real-user') == -1\n            ) {\n                closeAllPopupTRP();\n            }\n        });\n\n        badge.addEventListener('click', function() {\n            const popup = this.nextElementSibling;\n            if (popup && popup.classList.contains('apbct-real-user-popup')) {\n                popup.classList.toggle('visible');\n            }\n        });\n\n        badge.addEventListener('mouseenter', function() {\n            closeAllPopupTRP();\n            const popup = this.nextElementSibling;\n            if (popup && popup.classList.contains('apbct-real-user-popup')) {\n                popup.classList.add('visible');\n            }\n        });\n\n        badge.addEventListener('mouseleave', function() {\n            hideTimeout = setTimeout(() => {\n                const popup = this.nextElementSibling;\n                if (popup && popup.classList.contains('apbct-real-user-popup')) {\n                    popup.classList.remove('visible');\n                }\n            }, 1000);\n        });\n\n        const popup = badge.nextElementSibling;\n        popup.addEventListener('mouseenter', function() {\n            clearTimeout(hideTimeout);\n            popup.classList.add('visible');\n        });\n\n        popup.addEventListener('mouseleave', function() {\n            hideTimeout = setTimeout(() => {\n                if (popup.classList.contains('apbct-real-user-popup')) {\n                    popup.classList.remove('visible');\n                }\n            }, 1000);\n        });\n\n        // For mobile devices\n        badge.addEventListener('touchend', function() {\n            hideTimeout = setTimeout(() => {\n                const popup = this.nextElementSibling;\n                const selection = window.getSelection();\n                // Check if no text is selected\n                if (popup && selection && popup.classList.contains('apbct-real-user-popup') &&\n                    selection.toString().length === 0\n                ) {\n                    popup.classList.remove('visible');\n                } else {\n                    clearTimeout(hideTimeout);\n                    document.addEventListener('selectionchange', function onSelectionChange() {\n                        const selection = window.getSelection();\n                        if (selection && selection.toString().length === 0) {\n                            // Restart the hide timeout when selection is cleared\n                            hideTimeout = setTimeout(() => {\n                                const popup = badge.nextElementSibling;\n                                if (popup && popup.classList.contains('apbct-real-user-popup')) {\n                                    popup.classList.remove('visible');\n                                }\n                            }, 3000);\n                            document.removeEventListener('selectionchange', onSelectionChange);\n                        }\n                    });\n                }\n            }, 3000);\n        });\n    });\n});\n\n/**\n * Closing all TRP popup\n */\nfunction closeAllPopupTRP() {\n    let allDisplayPopup = document.querySelectorAll('.apbct-real-user-popup.visible');\n    if (allDisplayPopup.length > 0) {\n        allDisplayPopup.forEach((element) => {\n            element.classList.remove('visible');\n        });\n    }\n}\n\n/**\n * Handle external forms\n */\nfunction ctProtectExternal() {\n    for (let i = 0; i < document.forms.length; i++) {\n        if (document.forms[i].cleantalk_hidden_action === undefined &&\n            document.forms[i].cleantalk_hidden_method === undefined) {\n            // current form\n            const currentForm = document.forms[i];\n\n            // skip excluded forms\n            if ( formIsExclusion(currentForm)) {\n                continue;\n            }\n\n            // Ajax checking for the integrated forms - will be changed the whole form object to make protection\n            if ( isIntegratedForm(currentForm) ) {\n                apbctProcessExternalForm(currentForm, i, document);\n\n                // Ajax checking for the integrated forms - will be changed only submit button to make protection\n            } else if (\n                // MooForm 3rd party service\n                currentForm.dataset.mailingListId !== undefined ||\n                (typeof(currentForm.action) == 'string' &&\n                    (currentForm.action.indexOf('webto.salesforce.com') !== -1)) ||\n                (typeof(currentForm.action) == 'string' &&\n                currentForm.querySelector('[href*=\"activecampaign\"]')) ||\n                (\n                    typeof(currentForm.action) == 'string' &&\n                    currentForm.action.indexOf('hsforms.com') !== -1 &&\n                    currentForm.getAttribute('data-hs-cf-bound')\n                )\n            ) {\n                apbctProcessExternalFormByFakeButton(currentForm, i, document);\n                // Common flow - modify form's action\n            } else if (\n                typeof(currentForm.action) == 'string' &&\n                ( currentForm.action.indexOf('http://') !== -1 ||\n                    currentForm.action.indexOf('https://') !== -1 )\n            ) {\n                let tmp = currentForm.action.split('//');\n                tmp = tmp[1].split('/');\n                const host = tmp[0].toLowerCase();\n\n                if (host !== location.hostname.toLowerCase()) {\n                    const ctAction = document.createElement('input');\n                    ctAction.name = 'cleantalk_hidden_action';\n                    ctAction.value = currentForm.action;\n                    ctAction.type = 'hidden';\n                    currentForm.appendChild(ctAction);\n\n                    const ctMethod = document.createElement('input');\n                    ctMethod.name = 'cleantalk_hidden_method';\n                    ctMethod.value = currentForm.method;\n                    ctMethod.type = 'hidden';\n\n                    currentForm.method = 'POST';\n\n                    currentForm.appendChild(ctMethod);\n\n                    currentForm.action = document.location;\n                }\n            }\n        }\n    }\n    // Trying to process external form into an iframe\n    apbctProcessIframes();\n    // if form is still not processed by fields listening, do it here\n    ctStartFieldsListening();\n}\n\n/**\n * Exclusion forms\n * @param {HTMLElement} currentForm\n * @return {boolean}\n */\nfunction formIsExclusion(currentForm) {\n    const exclusionsById = [\n        'give-form', // give form exclusion because of direct integration\n        'frmCalc', // nobletitle-calc\n        'ihf-contact-request-form',\n        'wpforms', // integration with wpforms\n    ];\n\n    const exclusionsByRole = [\n        'search', // search forms\n    ];\n\n    const exclusionsByClass = [\n        'search-form', // search forms\n        'hs-form', // integrated hubspot plugin through dynamicRenderedForms logic\n        'ihc-form-create-edit', // integrated Ultimate Membership Pro plugin through dynamicRenderedForms logic\n        'nf-form-content', // integration with Ninja Forms for js events\n        'elementor-form', // integration with elementor-form\n        'wpforms', // integration with wpforms\n        'et_pb_searchform', // integration with elementor-search-form\n    ];\n\n    const exclusionsByAction = [\n        'paypal.com/cgi-bin/webscr', // search forms\n    ];\n\n    let result = false;\n\n    try {\n        // mewto forms exclusion\n        if (currentForm.parentElement &&\n            currentForm.parentElement.classList.length > 0 &&\n            currentForm.parentElement.classList[0].indexOf('mewtwo') !== -1) {\n            result = true;\n        }\n\n        if (currentForm.getAttribute('action') !== null) {\n            exclusionsByAction.forEach(function(exclusionAction) {\n                if (currentForm.getAttribute('action').indexOf(exclusionAction) !== -1) {\n                    result = true;\n                }\n            });\n        }\n\n        exclusionsById.forEach(function(exclusionId) {\n            const formId = currentForm.getAttribute('id');\n            if ( formId !== null && typeof (formId) !== 'undefined' && formId.indexOf(exclusionId) !== -1 ) {\n                result = true;\n            }\n        });\n\n        exclusionsByClass.forEach(function(exclusionClass) {\n            let foundClass = '';\n            if (currentForm.getAttribute('class')) {\n                foundClass = currentForm.getAttribute('class');\n            } else {\n                foundClass = apbctGetFormClass(currentForm, exclusionClass);\n            }\n            const formClass = foundClass;\n            if ( formClass !== null && typeof formClass !== 'undefined' && formClass.indexOf(exclusionClass) !== -1 ) {\n                if (currentForm.getAttribute('data-hs-cf-bound')) {\n                    result = false;\n                } else {\n                    result = true;\n                }\n            }\n        });\n\n        exclusionsByRole.forEach(function(exclusionRole) {\n            const formRole = currentForm.getAttribute('id');\n            if ( formRole !== null && typeof formRole !== 'undefined'&& formRole.indexOf(exclusionRole) !== -1 ) {\n                result = true;\n            }\n        });\n    } catch (e) {\n        console.table('APBCT ERROR: formIsExclusion() - ', e);\n    }\n\n    return result;\n}\n\n/**\n * Gets the form class if it is not in <form>\n * @param {HTMLElement} currentForm\n * @param {string} exclusionClass\n * @return {string}\n */\nfunction apbctGetFormClass(currentForm, exclusionClass) {\n    if (typeof(currentForm) == 'object' && currentForm.querySelector('.' + exclusionClass)) {\n        return exclusionClass;\n    }\n}\n\n/**\n * Handle external forms in iframes\n */\nfunction apbctProcessIframes() {\n    const frames = document.getElementsByTagName('iframe');\n\n    if ( frames.length > 0 ) {\n        for ( let j = 0; j < frames.length; j++ ) {\n            if ( frames[j].contentDocument == null ) {\n                continue;\n            }\n\n            const iframeForms = frames[j].contentDocument.forms;\n            if ( iframeForms.length === 0 ) {\n                continue;\n            }\n\n            for ( let y = 0; y < iframeForms.length; y++ ) {\n                const currentForm = iframeForms[y];\n                if ( formIsExclusion(currentForm)) {\n                    continue;\n                }\n                apbctProcessExternalForm(currentForm, y, frames[j].contentDocument);\n            }\n        }\n    }\n}\n\n/**\n * Process external forms\n * @param {HTMLElement} currentForm\n * @param {int} iterator\n * @param {HTMLElement} documentObject\n */\nfunction apbctProcessExternalForm(currentForm, iterator, documentObject) {\n    const cleantalkPlaceholder = document.createElement('i');\n    cleantalkPlaceholder.className = 'cleantalk_placeholder';\n    cleantalkPlaceholder.style = 'display: none';\n\n    currentForm.parentElement.insertBefore(cleantalkPlaceholder, currentForm);\n\n    // Deleting form to prevent submit event\n    const prev = currentForm.previousSibling;\n    const formHtml = currentForm.outerHTML;\n    const formOriginal = currentForm;\n\n    // Remove the original form\n    currentForm.parentElement.removeChild(currentForm);\n\n    // Insert a clone\n    const placeholder = document.createElement('div');\n    placeholder.innerHTML = formHtml;\n    prev.after(placeholder.firstElementChild);\n\n    const forceAction = document.createElement('input');\n    forceAction.name = 'action';\n    forceAction.value = 'cleantalk_force_ajax_check';\n    forceAction.type = 'hidden';\n\n    const reUseCurrentForm = documentObject.forms[iterator];\n\n    reUseCurrentForm.appendChild(forceAction);\n    reUseCurrentForm.apbctPrev = prev;\n    reUseCurrentForm.apbctFormOriginal = formOriginal;\n\n    // mailerlite integration - disable click on submit button\n    let mailerliteDetectedClass = false;\n    if (reUseCurrentForm.classList !== undefined) {\n        // list there all the mailerlite classes\n        const mailerliteClasses = ['newsletterform', 'ml-block-form'];\n        mailerliteClasses.forEach(function(mailerliteClass) {\n            if (reUseCurrentForm.classList.contains(mailerliteClass)) {\n                mailerliteDetectedClass = mailerliteClass;\n            }\n        });\n    }\n\n    let mailerliteSubmitButton = null;\n    if ( mailerliteDetectedClass ) {\n        mailerliteSubmitButton = reUseCurrentForm.querySelector('button[type=\"submit\"]');\n        if ( mailerliteSubmitButton !== null && mailerliteSubmitButton !== undefined ) {\n            mailerliteSubmitButton.addEventListener('click', function(event) {\n                event.preventDefault();\n                sendAjaxCheckingFormData(reUseCurrentForm);\n            });\n        }\n        return;\n    }\n\n    documentObject.forms[iterator].onsubmit = function(event) {\n        event.preventDefault();\n        sendAjaxCheckingFormData(event.currentTarget);\n    };\n}\n\n/**\n * Process external forms via fake button replacing\n * @param {HTMLElement} currentForm\n * @param {int} iterator\n * @param {HTMLElement} documentObject\n */\nfunction apbctProcessExternalFormByFakeButton(currentForm, iterator, documentObject) {\n    const submitButtonOriginal = currentForm.querySelector('[type=\"submit\"]');\n    const onsubmitOriginal = currentForm.querySelector('[type=\"submit\"]').form.onsubmit;\n\n    if ( ! submitButtonOriginal ) {\n        return;\n    }\n\n    const parent = submitButtonOriginal.parentElement;\n    const submitButtonHtml = submitButtonOriginal.outerHTML;\n\n    // Remove the original submit button\n    submitButtonOriginal.remove();\n\n    // Insert a clone of the submit button\n    const placeholder = document.createElement('div');\n    placeholder.innerHTML = submitButtonHtml;\n    parent.appendChild(placeholder.firstElementChild);\n\n    const forceAction = document.createElement('input');\n    forceAction.name = 'action';\n    forceAction.value = 'cleantalk_force_ajax_check';\n    forceAction.type = 'hidden';\n\n    const reUseCurrentForm = documentObject.forms[iterator];\n\n    reUseCurrentForm.appendChild(forceAction);\n    reUseCurrentForm.apbctParent = parent;\n    reUseCurrentForm.submitButtonOriginal = submitButtonOriginal;\n    reUseCurrentForm.onsubmitOriginal = onsubmitOriginal;\n\n    documentObject.forms[iterator].onsubmit = function(event) {\n        event.preventDefault();\n\n        // MooSend spinner activate\n        apbctMoosendSpinnerToggle(event.currentTarget);\n\n        sendAjaxCheckingFormData(event.currentTarget);\n    };\n}\n\n/**\n * Activate or deactivate spinner for Moosend form during request checking\n * @param {HTMLElement} form\n */\nfunction apbctMoosendSpinnerToggle(form) {\n    const buttonElement = form.querySelector('button[type=\"submit\"]');\n    if ( buttonElement ) {\n        const spinner = buttonElement.querySelector('i');\n        const submitText = buttonElement.querySelector('span');\n        if (spinner && submitText) {\n            if ( spinner.style.zIndex == 1 ) {\n                submitText.style.opacity = 1;\n                spinner.style.zIndex = -1;\n                spinner.style.opacity = 0;\n            } else {\n                submitText.style.opacity = 0;\n                spinner.style.zIndex = 1;\n                spinner.style.opacity = 1;\n            }\n        }\n    }\n}\n\n/**\n * Process external forms\n * @param {HTMLElement} formSource\n * @param {HTMLElement} formTarget\n */\nfunction apbctReplaceInputsValuesFromOtherForm(formSource, formTarget) {\n    const inputsSource = formSource.querySelectorAll('button, input, textarea, select');\n    const inputsTarget = formTarget.querySelectorAll('button, input, textarea, select');\n\n    if (formSource.outerHTML.indexOf('action=\"https://www.kulahub.net') !== -1 ||\n        isFormHasDiviRedirect(formSource) ||\n        formSource.outerHTML.indexOf('class=\"et_pb_contact_form') !== -1 ||\n        formSource.outerHTML.indexOf('action=\"https://api.kit.com') !== -1\n    ) {\n        inputsSource.forEach((elemSource) => {\n            inputsTarget.forEach((elemTarget) => {\n                if (elemSource.name === elemTarget.name) {\n                    if (elemTarget.type === 'checkbox' || elemTarget.type === 'radio') {\n                        elemTarget.checked = apbctVal(elemSource);\n                    } else {\n                        elemTarget.value = apbctVal(elemSource);\n                    }\n                }\n            });\n        });\n\n        return;\n    }\n\n    inputsSource.forEach((elemSource) => {\n        inputsTarget.forEach((elemTarget) => {\n            if (elemSource.outerHTML === elemTarget.outerHTML) {\n                if (elemTarget.type === 'checkbox' || elemTarget.type === 'radio') {\n                    elemTarget.checked = apbctVal(elemSource);\n                } else {\n                    elemTarget.value = apbctVal(elemSource);\n                }\n            }\n        });\n    });\n}\n// clear protected iframes list\napbctLocalStorage.set('apbct_iframes_protected', []);\nwindow.addEventListener('load', function() {\n    if ( ! +ctPublic.settings__forms__check_external ) {\n        return;\n    }\n\n    setTimeout(function() {\n        ctProtectExternal();\n        catchDynamicRenderedForm();\n        catchNextendSocialLoginForm();\n        ctProtectOutsideIframe();\n    }, 2000);\n\n    ctProtectKlaviyoForm();\n});\n\n/**\n * Protect klaviyo forms\n */\nfunction ctProtectKlaviyoForm() {\n    if (!document.querySelector('link[rel=\"dns-prefetch\"][href=\"//static.klaviyo.com\"]')) {\n        return;\n    }\n\n    let i = setInterval(() => {\n        const klaviyoForms = document.querySelectorAll('form.klaviyo-form');\n        if (klaviyoForms.length) {\n            clearInterval(i);\n            klaviyoForms.forEach((form, index) => {\n                apbctProcessExternalFormKlaviyo(form, index, document);\n            });\n        }\n    }, 500);\n}\n\n/**\n * Protect klaviyo forms\n * @param {HTMLElement} form\n * @param {int} iterator\n * @param {HTMLElement} documentObject\n */\nfunction apbctProcessExternalFormKlaviyo(form, iterator, documentObject) {\n    const btn = form.querySelector('button[type=\"button\"].needsclick');\n    if (!btn) {\n        return;\n    }\n    btn.disabled = true;\n\n    const forceAction = document.createElement('input');\n    forceAction.name = 'action';\n    forceAction.value = 'cleantalk_force_ajax_check';\n    forceAction.type = 'hidden';\n    form.appendChild(forceAction);\n\n    let cover = document.createElement('div');\n    cover.id = 'apbct-klaviyo-cover';\n    cover.style.width = '100%';\n    cover.style.height = '100%';\n    cover.style.background = 'black';\n    cover.style.opacity = 0;\n    cover.style.position = 'absolute';\n    cover.style.top = 0;\n    cover.style.cursor = 'pointer';\n    cover.onclick = function(e) {\n        sendAjaxCheckingFormData(form);\n    };\n    btn.parentNode.style.position = 'relative';\n    btn.parentNode.appendChild(cover);\n}\n\n/**\n * Protect forms placed in iframe with outside src\n */\nfunction ctProtectOutsideIframe() {\n    let iframes = document.querySelectorAll('iframe');\n    if (iframes.length > 0) {\n        iframes.forEach(function(iframe) {\n            if (iframe.src.indexOf('form.typeform.com') !== -1 ||\n                iframe.src.indexOf('forms.zohopublic.com') !== -1 ||\n                iframe.src.indexOf('link.surepathconnect.com') !== -1 ||\n                iframe.src.indexOf('hello.dubsado.com') !== -1 ||\n                iframe.classList.contains('hs-form-iframe') ||\n                ( iframe.src.indexOf('facebook.com') !== -1 && iframe.src.indexOf('plugins/comments.php') !== -1)\n            ) {\n                // pass if is already protected\n                if (false !== apbctLocalStorage.get('apbct_iframes_protected') &&\n                    apbctLocalStorage.get('apbct_iframes_protected').length > 0 &&\n                    typeof iframe.id !== 'undefined' &&\n                    apbctLocalStorage.get('apbct_iframes_protected').indexOf[iframe.id] !== -1\n                ) {\n                    return;\n                }\n                ctProtectOutsideIframeHandler(iframe);\n            }\n        });\n    }\n}\n\nlet ctProtectOutsideIframeCheck;\n/**\n * Protect forms placed in iframe with outside src handler\n * @param {HTMLElement} iframe\n */\nfunction ctProtectOutsideIframeHandler(iframe) {\n    let cover = document.createElement('div');\n    cover.style.width = '100%';\n    cover.style.height = '100%';\n    cover.style.background = 'black';\n    cover.style.opacity = 0;\n    cover.style.position = 'absolute';\n    cover.style.top = 0;\n    cover.onclick = function(e) {\n        if (ctProtectOutsideIframeCheck === undefined) {\n            let currentDiv = e.currentTarget;\n            currentDiv.style.opacity = 0.5;\n            let preloader = document.createElement('div');\n            preloader.className = 'apbct-iframe-preloader';\n            currentDiv.appendChild(preloader);\n            let botDetectorToken = '';\n            if (document.querySelector('[name*=\"ct_bot_detector_event_token\"]')) {\n                botDetectorToken = document.querySelector('[name*=\"ct_bot_detector_event_token\"]').value;\n            }\n\n            let data = {\n                'action': 'cleantalk_outside_iframe_ajax_check',\n                'ct_no_cookie_hidden_field': getNoCookieData(),\n                'ct_bot_detector_event_token': botDetectorToken,\n            };\n\n            apbct_public_sendAJAX(\n                data,\n                {\n                    async: false,\n                    callback: function(result) {\n                        ctProtectOutsideIframeCheck = true;\n                        if (result.apbct.blocked === false) {\n                            document.querySelectorAll('div.apbct-iframe-preloader').forEach(function(el) {\n                                el.parentNode.remove();\n                            });\n                        } else {\n                            document.querySelectorAll('div.apbct-iframe-preloader').forEach((el) => {\n                                el.parentNode.style.color = 'white';\n                                el.parentNode.innerHTML += result.apbct.comment;\n                            });\n                            document.querySelectorAll('div.apbct-iframe-preloader').forEach((el) => {\n                                el.remove();\n                            });\n                        }\n                    },\n                },\n            );\n        }\n    };\n    iframe.parentNode.style.position = 'relative';\n    iframe.parentNode.appendChild(cover);\n    let iframes = apbctLocalStorage.get('apbct_iframes_protected');\n    if (false === iframes) {\n        iframes = [];\n    }\n    if (typeof iframe.id !== 'undefined') {\n        iframes.push(iframe.id);\n        apbctLocalStorage.set('apbct_iframes_protected', iframes);\n    }\n}\n\n/**\n * Catch NSL form integration\n */\nfunction catchNextendSocialLoginForm() {\n    let blockNSL = document.getElementById('nsl-custom-login-form-main');\n    if (blockNSL) {\n        blockBtnNextendSocialLogin(blockNSL);\n    }\n}\n\n/**\n * Blocking NSL plugin buttons\n * @param {HTMLElement} blockNSL\n */\nfunction blockBtnNextendSocialLogin(blockNSL) {\n    let parentBtnsNSL = blockNSL.querySelectorAll('.nsl-container-buttons a');\n    let childBtnsNSL = blockNSL.querySelectorAll('a[data-plugin=\"nsl\"] .nsl-button');\n    parentBtnsNSL.forEach((el) => {\n        el.setAttribute('data-oauth-login-blocked', 'true');\n        el.addEventListener('click', (event) => {\n            event.preventDefault();\n        });\n    });\n    childBtnsNSL.forEach((el) => {\n        el.addEventListener('click', (event) => {\n            event.preventDefault();\n            event.stopPropagation();\n            ctCheckAjax(el);\n        });\n    });\n}\n\n/**\n * Unlocking the button and clicking on it after an ajax response\n * @param {HTMLElement} childBtn\n */\nfunction allowAjaxNextendSocialLogin(childBtn) {\n    childBtn.parentElement.setAttribute('data-oauth-login-blocked', 'false');\n    childBtn.parentElement.click();\n}\n\n/**\n * Locking the button and entering a message after an ajax response\n * @param {HTMLElement} childBtn\n * @param {string} msg\n */\nfunction forbiddenAjaxNextendSocialLogin(childBtn, msg) {\n    let parentElement = childBtn.parentElement;\n    if (parentElement.getAttribute('data-oauth-login-blocked') == 'false') {\n        parentElement.setAttribute('data-oauth-login-blocked', 'true');\n    }\n    if (!document.querySelector('.ct-forbidden-msg')) {\n        let elemForMsg = document.createElement('div');\n        elemForMsg.className = 'ct-forbidden-msg';\n        elemForMsg.style.background = 'red';\n        elemForMsg.style.color = 'white';\n        elemForMsg.style.padding = '5px';\n        elemForMsg.innerHTML = msg;\n        parentElement.insertAdjacentElement('beforebegin', elemForMsg);\n    }\n}\n\n/**\n * User verification using user data and ajax\n * @param {HTMLElement} elem\n */\nfunction ctCheckAjax(elem) {\n    let data = {\n        'action': 'cleantalk_nsl_ajax_check',\n        'ct_no_cookie_hidden_field': document.getElementsByName('ct_no_cookie_hidden_field')[0].value,\n    };\n\n    apbct_public_sendAJAX(\n        data,\n        {\n            async: false,\n            callback: function(result) {\n                if (result.apbct.blocked === false) {\n                    allowAjaxNextendSocialLogin(elem);\n                } else {\n                    forbiddenAjaxNextendSocialLogin(elem, result.apbct.comment);\n                }\n            },\n        },\n    );\n}\n\n/**\n * Checking the form integration\n * @param {HTMLElement} formObj\n * @return {boolean}\n */\nfunction isIntegratedForm(formObj) {\n    const formAction = typeof(formObj.action) == 'string' ? formObj.action : '';\n    const formId = formObj.getAttribute('id') !== null ? formObj.getAttribute('id') : '';\n\n    if (\n        (\n            formAction.indexOf('app.convertkit.com') !== -1 || // ConvertKit form\n            formAction.indexOf('app.kit.com') !== -1 || // ConvertKit new form\n            formAction.indexOf('api.kit.com') !== -1 // ConvertKit new form\n        ) ||\n        ( formObj.firstChild.classList !== undefined &&\n            formObj.firstChild.classList.contains('cb-form-group') ) || // Convertbox form\n        formAction.indexOf('mailerlite.com') !== -1 || // Mailerlite integration\n        formAction.indexOf('colcolmail.co.uk') !== -1 || // colcolmail.co.uk integration\n        formAction.indexOf('paypal.com') !== -1 ||\n        formAction.indexOf('infusionsoft.com') !== -1 ||\n        formAction.indexOf('secure2.convio.net') !== -1 ||\n        formAction.indexOf('hookb.in') !== -1 ||\n        formAction.indexOf('external.url') !== -1 ||\n        formAction.indexOf('tp.media') !== -1 ||\n        formAction.indexOf('flodesk.com') !== -1 ||\n        formAction.indexOf('sendfox.com') !== -1 ||\n        formAction.indexOf('aweber.com') !== -1 ||\n        formAction.indexOf('secure.payu.com') !== -1 ||\n        formAction.indexOf('mautic') !== -1 || formId.indexOf('mauticform_') !== -1 ||\n        formId.indexOf('ihf-contact-request-form') !== -1 ||\n        formAction.indexOf('crm.zoho.com') !== -1 ||\n        formId.indexOf('delivra-external-form') !== -1 ||\n        // todo Return to Hubspot for elementor in the future, disabled of reason https://doboard.com/1/task/9227\n        // ( formObj.classList !== undefined &&\n        //     !formObj.classList.contains('woocommerce-checkout') &&\n        //     formObj.hasAttribute('data-hs-cf-bound')\n        // ) || // Hubspot integration in Elementor form// Hubspot integration in Elementor form\n        formAction.indexOf('eloqua.com') !== -1 || // Eloqua integration\n        formAction.indexOf('kulahub.net') !== -1 || // Kulahub integration\n        isFormHasDiviRedirect(formObj) || // Divi contact form\n        formAction.indexOf('eocampaign1.com') !== -1 || // EmailOctopus Campaign form\n        formAction.indexOf('wufoo.com') !== -1 || // Wufoo form\n        formAction.indexOf('publisher.copernica.com') !== -1 || // publisher.copernica\n        ( formObj.classList !== undefined &&\n            formObj.classList.contains('sp-element-container') ) || // Sendpulse form\n        apbctIsFormInDiv(formObj, 'b24-form') // Bitrix24 CRM external forms\n    ) {\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * This function detect if the form has DIVI redirect. If so, the form will work as external.\n * @param {HTMLElement} formObj\n * @return {boolean}\n */\nfunction isFormHasDiviRedirect(formObj) {\n    let result = false;\n    const diviRedirectedSignSet = document.querySelector('div[id^=\"et_pb_contact_form\"]');\n    if (\n        typeof formObj === 'object' && formObj !== null &&\n        diviRedirectedSignSet !== null &&\n        diviRedirectedSignSet.hasAttribute('data-redirect_url') &&\n        diviRedirectedSignSet.getAttribute('data-redirect_url') !== '' &&\n        diviRedirectedSignSet.querySelector('form[class^=\"et_pb_contact_form\"]') !== null\n    ) {\n        result = formObj === diviRedirectedSignSet.querySelector('form[class^=\"et_pb_contact_form\"]');\n    }\n    return result;\n}\n\n/**\n * Sending Ajax for checking form data\n * @param {HTMLElement} form\n * @param {HTMLElement} prev\n * @param {HTMLElement} formOriginal\n */\nfunction sendAjaxCheckingFormData(form) {\n    // Get visible fields and set cookie\n    const visibleFields = {};\n    visibleFields[0] = apbct_collect_visible_fields(form);\n    apbct_visible_fields_set_cookie( visibleFields );\n\n    const data = {\n        'ct_bot_detector_event_token': apbctLocalStorage.get('bot_detector_event_token'),\n    };\n    let elems = form.elements;\n    elems = Array.prototype.slice.call(elems);\n\n    elems.forEach( function( elem, y ) {\n        if ( elem.name === '' ) {\n            data['input_' + y] = elem.value;\n        } else {\n            data[elem.name] = elem.value;\n        }\n    });\n\n    apbct_public_sendAJAX(\n        data,\n        {\n            async: false,\n            callback: function( result, data, params, obj ) {\n                // MooSend spinner deactivate\n                apbctMoosendSpinnerToggle(form);\n                // hubspot flag\n                const isHubSpotEmbedForm = (\n                    form.hasAttribute('action') &&\n                    form.getAttribute('action').indexOf('hsforms') !== -1\n                );\n                if ( result.apbct === undefined || ! +result.apbct.blocked ) {\n                    // Clear service fields\n                    for (const el of form.querySelectorAll('input[name=\"apbct_visible_fields\"]')) {\n                        el.remove();\n                    }\n                    for (const el of form.querySelectorAll('input[value=\"cleantalk_force_ajax_check\"]')) {\n                        el.remove();\n                    }\n                    for (const el of form.querySelectorAll('input[name=\"ct_no_cookie_hidden_field\"]')) {\n                        el.remove();\n                    }\n\n                    // Klaviyo integration\n                    if (form.classList !== undefined && form.classList.contains('klaviyo-form')) {\n                        const cover = document.getElementById('apbct-klaviyo-cover');\n                        if (cover) {\n                            cover.remove();\n                        }\n                        const btn = form.querySelector('button[type=\"button\"].needsclick');\n                        if (btn) {\n                            btn.disabled = false;\n                            btn.click();\n                        }\n                        return;\n                    }\n\n                    // MooSend integration\n                    if ( form.dataset.mailingListId !== undefined ) {\n                        let submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.remove();\n                        const parent = form.apbctParent;\n                        parent.appendChild(form.submitButtonOriginal);\n                        submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.click();\n                        return;\n                    }\n\n                    // Salesforce integration\n                    if (form.hasAttribute('action') &&\n                        (form.getAttribute('action').indexOf('webto.salesforce.com') !== -1)\n                    ) {\n                        let submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.remove();\n                        const parent = form.apbctParent;\n                        parent.appendChild(form.submitButtonOriginal);\n                        form.onsubmit = form.onsubmitOriginal;\n                        submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.click();\n                        return;\n                    }\n\n\n                    if (\n                        // Active Campaign integration\n                        form.querySelector('[href*=\"activecampaign\"]') ||\n                        // Hubspot bounded integration\n                        isHubSpotEmbedForm\n                    ) {\n                        let submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.remove();\n                        const parent = form.apbctParent;\n                        parent.appendChild(form.submitButtonOriginal);\n                        form.onsubmit = form.onsubmitOriginal;\n                        submitButton = form.querySelector('[type=\"submit\"]');\n                        submitButton.click();\n                        return;\n                    }\n\n                    const formNew = form;\n                    form.parentElement.removeChild(form);\n                    const prev = form.apbctPrev;\n                    const formOriginal = form.apbctFormOriginal;\n                    let mauticIntegration = false;\n\n                    apbctReplaceInputsValuesFromOtherForm(formNew, formOriginal);\n\n                    // mautic forms integration\n                    if (formOriginal &&\n                        typeof formOriginal.id === 'string' &&\n                        formOriginal.id.indexOf('mautic') !== -1\n                    ) {\n                        mauticIntegration = true;\n                    }\n\n                    prev.after( formOriginal );\n\n                    // Clear visible_fields input\n                    for (const el of formOriginal.querySelectorAll('input[name=\"apbct_visible_fields\"]')) {\n                        el.remove();\n                    }\n\n                    for (const el of formOriginal.querySelectorAll('input[value=\"cleantalk_force_ajax_check\"]')) {\n                        el.remove();\n                    }\n\n                    // Common click event\n                    let submButton = formOriginal.querySelectorAll('button[type=submit]');\n                    if ( submButton.length !== 0 ) {\n                        submButton[0].click();\n                        if (mauticIntegration) {\n                            setTimeout(function() {\n                                ctProtectExternal();\n                            }, 1500);\n                        }\n                        return;\n                    }\n\n                    submButton = formOriginal.querySelectorAll('input[type=submit]');\n                    if ( submButton.length !== 0 ) {\n                        submButton[0].click();\n                        return;\n                    }\n\n                    // ConvertKit direct integration\n                    submButton = formOriginal.querySelectorAll('button[data-element=\"submit\"]');\n                    if ( submButton.length !== 0 ) {\n                        submButton[0].click();\n                        return;\n                    }\n                    submButton = formOriginal.querySelectorAll('button#ck_subscribe_button');\n                    if ( submButton.length !== 0 ) {\n                        submButton[0].click();\n                        return;\n                    }\n\n                    // Paypal integration\n                    submButton = formOriginal.querySelectorAll('input[type=\"image\"][name=\"submit\"]');\n                    if ( submButton.length !== 0 ) {\n                        submButton[0].click();\n                    }\n                }\n                if (result.apbct !== undefined && +result.apbct.blocked) {\n                    ctParseBlockMessage(result);\n                    // hubspot embed form needs to reload page to prevent forms mishandling\n                    if (isHubSpotEmbedForm) {\n                        setTimeout(function() {\n                            document.location.reload();\n                        }, 3000);\n                    }\n                }\n            },\n        });\n}\n\n/**\n * Handle dynamic rendered form\n */\nfunction catchDynamicRenderedForm() {\n    const forms = document.getElementsByTagName('form');\n\n    catchDynamicRenderedFormHandler(forms);\n\n    const frames = document.getElementsByTagName('iframe');\n    if ( frames.length > 0 ) {\n        for ( let j = 0; j < frames.length; j++ ) {\n            if ( frames[j].contentDocument == null ) {\n                continue;\n            }\n\n            const iframeForms = frames[j].contentDocument.forms;\n\n            if ( iframeForms.length === 0 ) {\n                return;\n            }\n\n            catchDynamicRenderedFormHandler(iframeForms, frames[j].contentDocument);\n        }\n    }\n}\n\n/**\n * Handles dynamic rendered forms by attaching an onsubmit event handler to them.\n *\n * @param {HTMLCollection} forms - A collection of form elements to be processed.\n * @param {Document} [documentObject=document] - The document object to use for querying elements.\n */\nfunction catchDynamicRenderedFormHandler(forms, documentObject = document) {\n    const neededFormIds = [];\n    for (const form of forms) {\n        const formIdAttr = form.getAttribute('id');\n        if (formIdAttr && formIdAttr.indexOf('hsForm') !== -1) {\n            neededFormIds.push(formIdAttr);\n        }\n        if (formIdAttr && formIdAttr.indexOf('createuser') !== -1 &&\n            (form.classList !== undefined && form.classList.contains('ihc-form-create-edit'))\n        ) {\n            neededFormIds.push(formIdAttr);\n        }\n    }\n\n    for (const formId of neededFormIds) {\n        const form = documentObject.getElementById(formId);\n        form.apbct_external_onsubmit_prev = form.onsubmit;\n        form.onsubmit = sendAjaxCheckingDynamicFormData;\n    }\n}\n\n/**\n * Sending Ajax for checking form data on dynamic rendered form\n * @param {HTMLElement} form\n */\nfunction sendAjaxCheckingDynamicFormData(form) {\n    form.preventDefault();\n    form.stopImmediatePropagation();\n    const formEvent = form;\n    form = form.target;\n\n    const forceAction = document.createElement('input');\n    forceAction.name = 'action';\n    forceAction.value = 'cleantalk_force_ajax_check';\n    forceAction.type = 'hidden';\n    form.appendChild(forceAction);\n\n    // Get visible fields and set cookie\n    const visibleFields = {};\n    visibleFields[0] = apbct_collect_visible_fields(form);\n    apbct_visible_fields_set_cookie(visibleFields);\n    form.append(ctNoCookieConstructHiddenField('hidden'));\n\n    const data = {};\n    let elems = form.elements;\n    elems = Array.prototype.slice.call(elems);\n\n    elems.forEach( function( elem, y ) {\n        if ( elem.name === '' ) {\n            data['input_' + y] = elem.value;\n        } else {\n            data[elem.name] = elem.value;\n        }\n    });\n\n    apbct_public_sendAJAX(\n        data,\n        {\n            async: false,\n            callback: function(result) {\n                if ( result.apbct === undefined || ! +result.apbct.blocked ) {\n                    form.onsubmit = null;\n\n                    // Clear service fields\n                    for (const el of form.querySelectorAll('input[name=\"apbct_visible_fields\"]')) {\n                        el.remove();\n                    }\n                    for (const el of form.querySelectorAll('input[value=\"cleantalk_force_ajax_check\"]')) {\n                        el.remove();\n                    }\n                    for (const el of form.querySelectorAll('input[name=\"ct_no_cookie_hidden_field\"]')) {\n                        el.remove();\n                    }\n\n                    // Call previous submit action\n                    if (form.apbct_external_onsubmit_prev instanceof Function) {\n                        let timerId = setTimeout(function() {\n                            form.apbct_external_onsubmit_prev.call(form, formEvent);\n                        }, 500);\n                        clearTimeout(timerId);\n                    }\n\n                    const submButton = form.querySelector('input[type=\"submit\"]');\n                    if (submButton) {\n                        submButton.click();\n                        return;\n                    }\n                }\n\n                if (result.apbct !== undefined && +result.apbct.blocked) {\n                    ctParseBlockMessage(result);\n                }\n            },\n        });\n}\n\n/**\n * Implement jQuery val() function\n * @param {HTMLElement} el\n * @return {HTMLElements}\n */\nfunction apbctVal(el) {\n    if (el.options && el.multiple) {\n        return el.options\n            .filter((option) => option.selected)\n            .map((option) => option.value);\n    } else if (el.type === 'checkbox' || el.type === 'radio') {\n        return el.checked ? el.checked : null;\n    } else {\n        return el.value;\n    }\n}\n\n/**\n * Checks if a form object is inside a div with a specified class name.\n *\n * @param {HTMLElement} formObj - The form element to check.\n * @param {string} divClassName - The class name of the div to look for.\n * @return {boolean} - Returns true if the form is inside a div with the specified class name, false otherwise.\n */\nfunction apbctIsFormInDiv(formObj, divClassName) {\n    let parent = formObj.parentElement;\n    while (parent) {\n        if (parent.classList.contains(divClassName)) {\n            return true;\n        }\n        parent = parent.parentElement;\n    }\n    return false;\n}\n\n/**\n * @return {HTMLElement} event\n */\nfunction apbctSetEmailDecoderPopupAnimation() {\n    const animationElements = ['apbct_dog_one', 'apbct_dog_two', 'apbct_dog_three'];\n    const animationWrapper = document.createElement('div');\n    animationWrapper.classList = 'apbct-ee-animation-wrapper';\n    for (let i = 0; i < animationElements.length; i++) {\n        const apbctEEAnimationDogOne = document.createElement('span');\n        apbctEEAnimationDogOne.classList = 'apbct_dog ' + animationElements[i];\n        apbctEEAnimationDogOne.innerText = '@';\n        animationWrapper.append(apbctEEAnimationDogOne);\n    }\n    return animationWrapper;\n}\n\n/**\n * @param {mixed} event\n */\nfunction ctFillDecodedEmailHandler(event = false) {\n    let clickSource = false;\n    let ctWlBrandname = '';\n    let encodedEmail = '';\n    if (typeof ctPublic !== 'undefined') {\n        this.removeEventListener('click', ctFillDecodedEmailHandler);\n        // remember clickSource\n        clickSource = this;\n        // globally remember if emails is mixed with mailto\n        ctPublic.encodedEmailNodesIsMixed = false;\n        ctWlBrandname = ctPublic.wl_brandname;\n        encodedEmail = ctPublic.encodedEmailNodes;\n    } else if (typeof ctAdminCommon !== 'undefined') {\n        ctWlBrandname = ctAdminCommon.plugin_name;\n        encodedEmail = ctAdminCommon.encodedEmailNode;\n    }\n\n    // get fade\n    document.body.classList.add('apbct-popup-fade');\n    // popup show\n    let encoderPopup = document.getElementById('apbct_popup');\n    if (!encoderPopup) {\n        // construct popup\n        let waitingPopup = document.createElement('div');\n        waitingPopup.setAttribute('class', 'apbct-popup apbct-email-encoder-popup');\n        waitingPopup.setAttribute('id', 'apbct_popup');\n\n        // construct text header\n        let popupHeaderWrapper = document.createElement('span');\n        popupHeaderWrapper.classList = 'apbct-email-encoder-elements_center';\n        let popupHeader = document.createElement('p');\n        popupHeader.innerText = ctWlBrandname;\n        popupHeader.setAttribute('class', 'apbct-email-encoder--popup-header');\n        popupHeaderWrapper.append(popupHeader);\n\n        // construct text wrapper\n        let popupTextWrapper = document.createElement('div');\n        popupTextWrapper.setAttribute('id', 'apbct_popup_text');\n        popupTextWrapper.setAttribute('class', 'apbct-email-encoder-elements_center');\n        popupTextWrapper.style.color = 'black';\n\n        // construct text first node\n        // todo make translatable\n        let popupTextWaiting = document.createElement('p');\n        popupTextWaiting.id = 'apbct_email_ecoder__popup_text_node_first';\n        if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_wait_for_decoding) {\n            popupTextWaiting.innerText = ctPublicFunctions.text__ee_wait_for_decoding;\n        } else {\n            popupTextWaiting.innerText = ctAdminCommon.text__ee_wait_for_decoding;\n        }\n        popupTextWaiting.setAttribute('class', 'apbct-email-encoder-elements_center');\n\n        // construct text second node\n        // todo make translatable\n        let popupTextDecoding = document.createElement('p');\n        popupTextDecoding.id = 'apbct_email_ecoder__popup_text_node_second';\n        if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_decoding_process) {\n            popupTextDecoding.innerText = ctPublicFunctions.text__ee_decoding_process;\n        } else {\n            popupTextDecoding.innerText = ctAdminCommon.text__ee_decoding_process;\n        }\n\n        // appending\n        popupTextWrapper.append(popupTextWaiting);\n        popupTextWrapper.append(popupTextDecoding);\n        waitingPopup.append(popupHeaderWrapper);\n        waitingPopup.append(popupTextWrapper);\n        waitingPopup.append(apbctSetEmailDecoderPopupAnimation());\n        document.body.append(waitingPopup);\n    } else {\n        encoderPopup.setAttribute('style', 'display: inherit');\n        if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_wait_for_decoding) {\n            document.getElementById('apbct_popup_text').innerHTML = ctPublicFunctions.text__ee_wait_for_decoding;\n        } else {\n            document.getElementById('apbct_popup_text').innerHTML = ctAdminCommon.text__ee_wait_for_decoding;\n        }\n    }\n\n    apbctAjaxEmailDecodeBulk(event, encodedEmail, clickSource);\n}\n\n/**\n * @param {mixed} event\n * @param {mixed} encodedEmailNodes\n * @param {mixed} clickSource\n */\nfunction apbctAjaxEmailDecodeBulk(event, encodedEmailNodes, clickSource) {\n    if (event && clickSource) {\n        // collect data\n        const javascriptClientData = getJavascriptClientData();\n        let data = {\n            event_javascript_data: javascriptClientData,\n            post_url: document.location.href,\n            referrer: document.referrer,\n            encodedEmails: '',\n        };\n        let encodedEmailsCollection = {};\n        for (let i = 0; i < encodedEmailNodes.length; i++) {\n            // disable click for mailto\n            if (\n                typeof encodedEmailNodes[i].href !== 'undefined' &&\n                encodedEmailNodes[i].href.indexOf('mailto:') === 0\n            ) {\n                event.preventDefault();\n                ctPublic.encodedEmailNodesIsMixed = true;\n            }\n\n            // Adding a tooltip\n            let apbctTooltip = document.createElement('div');\n            apbctTooltip.setAttribute('class', 'apbct-tooltip');\n            apbct(encodedEmailNodes[i]).append(apbctTooltip);\n\n            // collect encoded email strings\n            encodedEmailsCollection[i] = encodedEmailNodes[i].dataset.originalString;\n        }\n\n        // JSONify encoded email strings\n        data.encodedEmails = JSON.stringify(encodedEmailsCollection);\n\n        // Using REST API handler\n        if ( ctPublicFunctions.data__ajax_type === 'rest' ) {\n            apbct_public_sendREST(\n                'apbct_decode_email',\n                {\n                    data: data,\n                    method: 'POST',\n                    callback: function(result) {\n                        // set alternative cookie to skip next pages encoding\n                        ctSetCookie('apbct_email_encoder_passed', ctPublic.emailEncoderPassKey, '');\n                        apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, clickSource);\n                    },\n                    onErrorCallback: function(res) {\n                        resetEncodedNodes();\n                        ctShowDecodeComment(res);\n                    },\n                },\n            );\n\n            // Using AJAX request and handler\n        } else {\n            data.action = 'apbct_decode_email';\n            apbct_public_sendAJAX(\n                data,\n                {\n                    notJson: false,\n                    callback: function(result) {\n                        console.log('result');\n                        console.log(result);\n\n                        // set alternative cookie to skip next pages encoding\n                        ctSetCookie('apbct_email_encoder_passed', ctPublic.emailEncoderPassKey, '');\n                        apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, clickSource);\n                    },\n                    onErrorCallback: function(res) {\n                        resetEncodedNodes();\n                        ctShowDecodeComment(res);\n                    },\n                },\n            );\n        }\n    } else {\n        const encodedEmail = encodedEmailNodes.dataset.originalString;\n        let data = {\n            encodedEmails: JSON.stringify({0: encodedEmail}),\n        };\n\n        // Adding a tooltip\n        let apbctTooltip = document.createElement('div');\n        apbctTooltip.setAttribute('class', 'apbct-tooltip');\n        encodedEmailNodes.appendChild(apbctTooltip);\n\n        apbct_admin_sendAJAX(\n            {\n                'action': 'apbct_decode_email',\n                'encodedEmails': data.encodedEmails,\n            },\n            {\n                'callback': function(result) {\n                    apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, false);\n                },\n                'notJson': true,\n            },\n        );\n    }\n}\n\n/**\n * @param {mixed} result\n * @param {mixed} encodedEmailNodes\n * @param {mixed} clickSource\n */\nfunction apbctEmailEncoderCallbackBulk(result, encodedEmailNodes, clickSource = false) {\n    if (result.success && result.data[0].is_allowed === true) {\n        // start process of visual decoding\n        setTimeout(function() {\n            // popup remove\n            let popup = document.getElementById('apbct_popup');\n            if (popup !== null) {\n                let email = '';\n                if (clickSource) {\n                    let currentResultData;\n                    result.data.forEach((row) => {\n                        if (row.encoded_email === clickSource.dataset.originalString) {\n                            currentResultData = row;\n                        }\n                    });\n\n                    email = currentResultData.decoded_email.split(/[&?]/)[0];\n                } else {\n                    email = result.data[0].decoded_email;\n                }\n                // handle first node\n                let firstNode = popup.querySelector('#apbct_email_ecoder__popup_text_node_first');\n                // get email selectable by click\n                let selectableEmail = document.createElement('b');\n                selectableEmail.setAttribute('class', 'apbct-email-encoder-select-whole-email');\n                selectableEmail.innerText = email;\n                if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_click_to_select) {\n                    selectableEmail.title = ctPublicFunctions.text__ee_click_to_select;\n                } else {\n                    selectableEmail.title = ctAdminCommon.text__ee_click_to_select;\n                }\n                // add email to the first node\n                if (firstNode) {\n                    if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_original_email) {\n                        firstNode.innerHTML = ctPublicFunctions.text__ee_original_email +\n                            '&nbsp;' + selectableEmail.outerHTML;\n                    } else {\n                        firstNode.innerHTML = ctAdminCommon.text__ee_original_email +\n                            '&nbsp;' + selectableEmail.outerHTML;\n                    }\n\n                    firstNode.setAttribute('style', 'flex-direction: row;');\n                }\n                // remove animation\n                let wrapper = popup.querySelector('.apbct-ee-animation-wrapper');\n                if (wrapper) {\n                    wrapper.remove();\n                }\n                // remove second node\n                let secondNode = popup.querySelector('#apbct_email_ecoder__popup_text_node_second');\n                if (secondNode) {\n                    secondNode.remove();\n                }\n                // add button\n                let buttonWrapper = document.createElement('span');\n                buttonWrapper.classList = 'apbct-email-encoder-elements_center top-margin-long';\n                if (!document.querySelector('.apbct-email-encoder-got-it-button')) {\n                    let button = document.createElement('button');\n                    if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_got_it) {\n                        button.innerText = ctPublicFunctions.text__ee_got_it;\n                    } else {\n                        button.innerText = ctAdminCommon.text__ee_got_it;\n                    }\n                    button.classList = 'apbct-email-encoder-got-it-button';\n                    button.addEventListener('click', function() {\n                        document.body.classList.remove('apbct-popup-fade');\n                        popup.setAttribute('style', 'display:none');\n                        fillDecodedEmails(encodedEmailNodes, result);\n                        // click on mailto if so\n                        if (typeof ctPublic !== 'undefined' && ctPublic.encodedEmailNodesIsMixed && clickSource) {\n                            clickSource.click();\n                        }\n                    });\n                    buttonWrapper.append(button);\n                    popup.append(buttonWrapper);\n                }\n            }\n        }, 3000);\n    } else {\n        if (clickSource) {\n            if (result.success) {\n                resetEncodedNodes();\n                if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_blocked) {\n                    ctShowDecodeComment(ctPublicFunctions.text__ee_blocked + ': ' + result.data[0].comment);\n                } else {\n                    ctShowDecodeComment(ctAdminCommon.text__ee_blocked + ': ' + result.data[0].comment);\n                }\n            } else {\n                resetEncodedNodes();\n                if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_cannot_connect) {\n                    ctShowDecodeComment(ctPublicFunctions.text__ee_cannot_connect + ': ' + result.apbct.comment);\n                } else {\n                    ctShowDecodeComment(ctAdminCommon.text__ee_cannot_connect + ': ' + result.data[0].comment);\n                }\n            }\n        } else {\n            console.log('result', result);\n        }\n    }\n}\n\n/**\n * Reset click event for encoded email\n */\nfunction resetEncodedNodes() {\n    if (typeof ctPublic.encodedEmailNodes !== 'undefined') {\n        ctPublic.encodedEmailNodes.forEach(function(element) {\n            element.addEventListener('click', ctFillDecodedEmailHandler);\n        });\n    }\n}\n\n/**\n * Show Decode Comment\n * @param {string} comment\n */\nfunction ctShowDecodeComment(comment) {\n    if ( ! comment ) {\n        if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_cannot_decode) {\n            comment = ctPublicFunctions.text__ee_cannot_decode;\n        } else {\n            comment = ctAdminCommon.text__ee_cannot_decode;\n        }\n    }\n\n    let popup = document.getElementById('apbct_popup');\n    let popupText = document.getElementById('apbct_popup_text');\n    if (popup !== null) {\n        document.body.classList.remove('apbct-popup-fade');\n        if (typeof ctPublicFunctions !== 'undefined' && ctPublicFunctions.text__ee_email_decoder) {\n            popupText.innerText = ctPublicFunctions.text__ee_email_decoder + ': ' + comment;\n        } else {\n            popupText.innerText = ctAdminCommon.text__ee_email_decoder + ': ' + comment;\n        }\n        setTimeout(function() {\n            popup.setAttribute('style', 'display:none');\n        }, 3000);\n    }\n}\n\n/**\n * Run filling for every node with decoding result.\n * @param {mixed} encodedEmailNodes\n * @param {mixed} decodingResult\n */\nfunction fillDecodedEmails(encodedEmailNodes, decodingResult) {\n    if (encodedEmailNodes.length > 0) {\n        for (let i = 0; i < encodedEmailNodes.length; i++) {\n            // chek what is what\n            let currentResultData;\n            decodingResult.data.forEach((row) => {\n                if (row.encoded_email === encodedEmailNodes[i].dataset.originalString) {\n                    currentResultData = row;\n                }\n            });\n            // quit case on cloud block\n            if (currentResultData.is_allowed === false) {\n                return;\n            }\n            // handler for mailto\n            if (\n                typeof encodedEmailNodes[i].href !== 'undefined' &&\n                encodedEmailNodes[i].href.indexOf('mailto:') === 0\n            ) {\n                let encodedEmail = encodedEmailNodes[i].href.replace('mailto:', '');\n                let baseElementContent = encodedEmailNodes[i].innerHTML;\n                encodedEmailNodes[i].innerHTML = baseElementContent.replace(\n                    encodedEmail,\n                    currentResultData.decoded_email,\n                );\n                encodedEmailNodes[i].href = 'mailto:' + currentResultData.decoded_email;\n\n                encodedEmailNodes[i].querySelectorAll('span.apbct-email-encoder').forEach((el) => {\n                    let encodedEmailTextInsideMailto = '';\n                    decodingResult.data.forEach((row) => {\n                        if (row.encoded_email === el.dataset.originalString) {\n                            encodedEmailTextInsideMailto = row.decoded_email;\n                        }\n                    });\n                    el.innerHTML = encodedEmailTextInsideMailto;\n                });\n            } else {\n                encodedEmailNodes[i].classList.add('no-blur');\n                // fill the nodes\n                setTimeout(() => {\n                    ctProcessDecodedDataResult(currentResultData, encodedEmailNodes[i]);\n                }, 2000);\n            }\n            // remove listeners\n            encodedEmailNodes[i].removeEventListener('click', ctFillDecodedEmailHandler);\n        }\n    } else {\n        let currentResultData = decodingResult.data[0];\n        encodedEmailNodes.classList.add('no-blur');\n        // fill the nodes\n        setTimeout(() => {\n            ctProcessDecodedDataResult(currentResultData, encodedEmailNodes);\n        }, 2000);\n        encodedEmailNodes.removeEventListener('click', ctFillDecodedEmailHandler);\n    }\n}\n\n/**\n * @param {mixed} response\n * @param {mixed} targetElement\n */\nfunction ctProcessDecodedDataResult(response, targetElement) {\n    targetElement.setAttribute('title', '');\n    targetElement.removeAttribute('style');\n    ctFillDecodedEmail(targetElement, response.decoded_email);\n}\n\n/**\n * @param {mixed} target\n * @param {string} email\n */\nfunction ctFillDecodedEmail(target, email) {\n    target.innerHTML = target.innerHTML.replace(/.+?(<div class=[\"']apbct-tooltip[\"'].+?<\\/div>)/, email + '$1');\n}\n"],"names":["ApbctCore","ajax_parameters","restParameters","selector","elements","eventCallback","eventSelector","event","constructor","this","select","HTMLCollection","Array","prototype","slice","call","document","querySelectorAll","deselect","addElement","elemToAdd","push","elem","reduce","css","style","getRaw","styleName","Object","hasOwn","DomStyleName","replace","group","toUpperCase","let","i","length","computedStyle","getComputedStyle","Number","hide","prop","display","show","addClass","classList","add","className","removeClass","remove","toggleClass","toggle","ajax","ajaxParameters","ApbctAjax","rest","ApbctRest","on","args","addEventListener","onChecker","bind","target","querySelector","stopPropagation","ready","callback","change","attr","attrName","outputValue","getAttribute","propName","value","html","val","data","name","is","filter","isElem","elemToCheck","match","newlyCreatedElement","createElement","Boolean","HTMLElement","HTMLUnknownElement","indexOf","tagName","toLowerCase","isWithoutSelector","splice","parent","parentElement","parents","children","siblings","current","after","content","append","fadeIn","time","opacity","last","Date","tick","window","requestAnimationFrame","setTimeout","fadeOut","ctProcessError","msg","url","log","ctJsErrors","message","err","file","fileName","ln","lineNumber","lineNo","col","columnNumber","columnNo","stacktrace","stack","cause","JSON","stringify","errorObj","error","location","href","userAgent","navigator","errArray","localStorage","getItem","parse","setItem","selectActualNonce","defaultNonce","ctPublicFunctions","hasOwnProperty","_fresh_nonce","data__ajax_type","_ajax_nonce","_rest_nonce","apbct","params","Math","floor","random","onerror","exception","filterWords","ApbctXhr","xhr","XMLHttpRequest","method","async","user","password","button","spinner","progressbar","context","onErrorCallback","responseType","headers","timeout","methods_to_convert_data_to_URL","body","http_code","status_text","parameters","key","prepare","keys","deleteDoubleJSONEncoding","convertData","console","open","setHeaders","onreadystatechange","isWpNonceError","getFreshNonceAndRerunXHR","onReadyStateChange","onload","onLoad","onprogress","onProgress","onError","ontimeout","onTimeout","send","setAttribute","cursor","complete","status","statusText","removeAttribute","on_ready_state_change","on_progress","response","restErrror","ajaxErrror","readyState","initialRequestParams","noncePrev","spbc_remote_call_action","plugin_name","nonce_prev","initial_request_params","notJson","host_url","freshNonceResult","newRequestParams","undefined","wpnonce","httpCode","additionalMsg","errorString","errorOutput","errorMsg","headerName","setRequestHeader","convertDataToURL","convertDataToBody","paramsAppendix","URLSearchParams","toString","paramsPrefix","dataKey","FormData","object","objectKey","parsedValue","super","default_route","_rest_url","route","nonce","X-WP-Nonce","defineProperty","property","enumerable","configurable","writable","ApbctCollectingUserActivity","elementBody","collectionForms","forms","setListeners","checkElementInForms","getSelection","type","addSelected","addTarget","resultCheck","outerHTML","innerHTML","addClicks","trackMouseMovement","ctCollectingUserActivityData","clicks","selected","mouseMovementsInsideForm","ctSetCookie","cookies","expires","listOfCookieNamesToForceAlt","skipAlt","data__cookies_type","forcedAltCookiesSet","forEach","item","apbctLocalStorage","set","ctSetAlternativeCookie","ctPublic","force_alt_cookies","forceAltCookies","ctNoCookieAttachHiddenFieldsToForms","_expires","ctSecure","protocol","cookie","cookiePrefix","encodeURIComponent","ctDetectForcedAltCookiesForms","ninjaFormsSign","elementorUltimateAddonsRegister","smartFormsSign","jetpackCommentsForm","cwginstockForm","userRegistrationProForm","etPbDiviSubscriptionForm","fluentBookingApp","bloomPopup","pafeFormsFormElementor","otterForm","smartQuizBuilder","bookingPress","isArray","getJavascriptClientData","e","apbct_force_alt_cookies","apbct_pixel_url","decodeURIComponent","apbct_public_sendREST","apbct_public_sendAJAX","action","beforeSend","ctGetCookie","matches","RegExp","ctDeleteCookie","cookieName","obj","_params","callback_context","callback_params","silent","no_nonce","_ajax_url","no_cache","apbctGenerateUniqueID","substr","get","storageValue","json","isJson","objToSave","timestamp","getTime","isAlive","maxLifetime","isSet","delete","removeItem","getCleanTalkData","apbctSessionStorage","sessionStorage","apbctOnAnimationStart","animationName","apbctAutocomplete","apbctCancelAutocomplete","apbctOnInput","inputType","element","hasAttribute","CustomEvent","bubbles","cancelable","detail","dispatchEvent","ApbctForceProtection","wrappers","findWrappers","checkBot","event_javascript_data","post_url","referrer","checkBotCallback","result","decodeForms","allow","Event","showMessageForBot","form","wrapper","dataset","encodedForm","atob","apbctForceProtect","settings__forms__force_protection","data__key_is_ok","apbct_attach_event_handler","CTTypoData","fieldData","isAutoFill","isUseBuffer","speedDelta","firstKeyTimestamp","lastKeyTimestamp","lastDelta","countOfKey","fields","gatheringFields","field","assign","currentDelta","abs","ctDate","ctTimeMs","ctMouseEventTimerFlag","ctMouseData","ctMouseDataCounter","ctCheckedEmails","ctCheckedEmailsExist","ctMouseReadInterval","ctMouseWriteDataInterval","tokenCheckerIntervalId","botDetectorLogLastUpdate","botDetectorLogEventTypesCollected","attachEvent","apbct_remove_event_handler","removeEventListener","detachEvent","ctFunctionFirstKey","ctKeyStopStopListening","ctFunctionMouseMove","cronFormsHandler","data__bot_detector_enabled","data__frontend_data_log_enabled","sendBotDetectorLogToAltSessions","setInterval","ctSetMouseMoved","round","clientY","clientX","ctMouseStopData","cronStartTimeout","restartFieldsListening","restartBotDetectorEventTokenAttach","interval","currentLog","needsSaveLogToAltSessions","log_last_update","records","currentType","frontend_data","js_event","includes","token","doAttach","getElementsByClassName","getElementById","setEventTokenField","clearInterval","checkEmail","currentEmail","test","email","now","checkEmailExist","hint","getResultCheckEmailExist","viewCheckEmailExist","envelope","text_result","state","textResult","inputEmail","top","getBoundingClientRect","ctEmailExistSetElementsPositions","onmouseover","textContent","height","color","onmouseout","left","right","offsetHeight","width","envelopeWidth","offsetWidth","ctIsDrawPixel","pixel__setting","settings__data__bot_detector_enabled","pixel__enabled","ctSetPixelImg","pixelUrl","insertedImg","ctSetPixelImgFromLocalstorage","ctGetPixelUrl","localStoragePixelUrl","String","ctSetHasScrolled","ctStartFieldsListening","ctGetPageForms","handled_fields","handledFormFields","ctFunctionHasInputFocused","ctFunctionHasKeyUp","ctStopFieldsListening","eventName","functionName","ctSetHasInputFocused","ctSetHasKeyUp","apbctPrepareBlockForAjaxForms","ctPrepareBlockMessage","responseText","ctParseBlockMessage","jQuery","ajaxComplete","settings","startForcedAltEventTokenChecker","eventToken","apbct_ready","botDetectorLocalStorage","wc_ajax_add_to_cart","apbctCheckAddToCartByGet","sessionID","URL","host","apbctWriteReferrersToSessionStorage","cookiesType","initCookies","ctTypoData","getTimezoneOffset","apbctGetScreenInfo","webdriver","cookiesArray","split","trim","pixel__url","data__email_check_before_post","data__email_check_exist_post","tokenForForceAlt","encodedEmailNodes","ctAjaxSetupAddCleanTalkDataBeforeSendAjax","ctAddWCMiddlewares","hiddenInput","visibleFieldsToInput","ctCheckHiddenFieldsExclusions","apbct_visible_fields","visibleFields","removeChild","apbct_collect_visible_fields","btoa","onsubmit_prev","onsubmit","ctFormIndex","apbct_visible_fields_set_cookie","isFormThatNeedCatchXhr","noCookieData","getNoCookieData","defaultSend","Function","ctOnsubmitPrevCallExclude","preventDefault","ctFillDecodedEmailHandler","_form","settings__forms__search_test","apbctSearchPrevOnsubmit","ctSearchFormOnSubmitHandler","apbctCatchXmlHttpRequest","settings__sfw__anti_crawler","checkBotDetectorExist","botDetectorIntervalSearch","bot_detector_event_token","wp","apiFetch","use","options","next","requests","path","ct_no_cookie_hidden_field","event_token","originalSend","addidionalCleantalkData","apply","apbctAjaxSetImportantParametersOnCacheExist","cacheExist","ajaxSetup","sourceSign","contains","targetForm","honeyPotField","hpValue","callBack","parsedCookies","cleantalkStorageDataArray","getCleanTalkStorageDataArray","eventTokenLocalStorage","parentNode","HTMLFormElement","submit","apbct_search_form__honeypot_value","ct_bot_detector_event_token","warn","commonCookies","resultDataJson","ct_checked_emails","ct_checked_emails_exist","ct_checkjs","ct_fkp_timestamp","ct_pointer_data","ct_ps_timestamp","ct_screen_info","ct_timezone","ctMouseMovedLocalStorage","ctHasScrolledLocalStorage","ctCookiesTypeLocalStorage","apbctPageHits","apbctPrevReferer","apbctSiteReferer","ctJsErrorsLocalStorage","ctPixelUrl","apbctHeadless","ctBotDetectorFrontendDataLog","ctMouseMovedCookie","ctHasScrolledCookie","ctCookiesTypeCookie","ctCookiesPixelUrl","apbctHeadlessNative","ct_mouse_moved","ct_has_scrolled","ct_cookies_type","apbct_headless","ct_bot_detector_frontend_data_log","apbct_page_hits","apbct_prev_referer","apbct_site_referer","apbct_ct_js_errors","removeDoubleJsonEncoding","inputs","inputsVisible","inputsVisibleCount","inputsInvisible","inputsInvisibleCount","inputsWithDuplicateNames","isNaN","visibility","visible_fields","visible_fields_count","invisible_fields","invisible_fields_count","visibleFieldsCollection","formId","collection","apbct_js_keys__set_input_value","js_key","fullWidth","documentElement","scrollWidth","fullHeight","max","scrollHeight","clientHeight","visibleWidth","clientWidth","visibleHeight","blocked","comment","cleantalkModal","loaded","stop_script","stop","ctSetPixelUrlLocalstorage","ajaxPixelUrl","ctNoCookieConstructHiddenField","collectingUserActivityData","noCookieDataLocal","noCookieDataSession","noCookieDataTypo","typo","noCookieDataFromUserActivity","collecting_user_activity_data","ctGetHiddenFieldExclusionsType","no_cookie","ncFieldExclusionsSign","data__visible_fields_required","id","hiddenFieldType","formAction","j","ct_checkjs_key","defaultFetch","fetch","checkFormsExistForCatching","isFormThatNeedCatch","formClasses","classExists","classForm","sessionCurrentPage","el","loading","opened","opening","ignoreURLConvert","load","apbct_admin_sendAJAX","renderCss","cssStr","styles","overlayCss","z-index","position","background","justify-content","align-items","innerCss","padding","border","border-radius","box-shadow","closeCss","box-sizing","closeCssBefore","transform","closeCssAfter","bodyCss","overflow","cleantalkModalStyle","overlay","inner","close","urlRegex","closeAllPopupTRP","allDisplayPopup","ctProtectExternal","cleantalk_hidden_action","cleantalk_hidden_method","ctMethod","currentForm","formIsExclusion","isIntegratedForm","apbctProcessExternalForm","mailingListId","apbctProcessExternalFormByFakeButton","tmp","hostname","ctAction","appendChild","apbctProcessIframes","exclusionAction","exclusionId","exclusionClass","foundClass","formClass","apbctGetFormClass","exclusionRole","formRole","table","frames","getElementsByTagName","contentDocument","iframeForms","y","iterator","documentObject","cleantalkPlaceholder","prev","insertBefore","previousSibling","formHtml","formOriginal","placeholder","forceAction","firstElementChild","reUseCurrentForm","mailerliteDetectedClass","apbctPrev","apbctFormOriginal","mailerliteClass","mailerliteSubmitButton","sendAjaxCheckingFormData","currentTarget","submitButtonOriginal","onsubmitOriginal","submitButtonHtml","apbctParent","apbctMoosendSpinnerToggle","buttonElement","submitText","zIndex","apbctReplaceInputsValuesFromOtherForm","formSource","formTarget","inputsSource","inputsTarget","isFormHasDiviRedirect","elemSource","elemTarget","checked","apbctVal","ctProtectKlaviyoForm","klaviyoForms","index","apbctProcessExternalFormKlaviyo","cover","btn","disabled","onclick","ctProtectOutsideIframe","iframes","iframe","src","ctProtectOutsideIframeHandler","ctTrpLocalize","ctTrpIsAdminCommentsList","ctTrpAdminLocalize","theRealPerson","themesCommentsSelector","trpComments","trpLayout","trpImage","trpDescription","trpDescriptionHeading","trpDescriptionContent","trpDescriptionContentSpan","learnMoreLink","pagenow","imgPersonUrl","phrases","trpHeading","trpContent1","trpContent2","trpContentLink","text","trpContentLearnMore","hideTimeout","popup","badge","nextElementSibling","clearTimeout","selection","onSelectionChange","settings__forms__check_external","catchDynamicRenderedForm","catchNextendSocialLoginForm","ctProtectOutsideIframeCheck","currentDiv","preloader","botDetectorToken","blockNSL","blockBtnNextendSocialLogin","parentBtnsNSL","childBtnsNSL","ctCheckAjax","allowAjaxNextendSocialLogin","childBtn","click","forbiddenAjaxNextendSocialLogin","elemForMsg","insertAdjacentElement","getElementsByName","formObj","firstChild","apbctIsFormInDiv","diviRedirectedSignSet","elems","isHubSpotEmbedForm","submitButton","formNew","mauticIntegration","submButton","reload","catchDynamicRenderedFormHandler","neededFormIds","formIdAttr","apbct_external_onsubmit_prev","sendAjaxCheckingDynamicFormData","stopImmediatePropagation","formEvent","timerId","multiple","option","map","divClassName","apbctSetEmailDecoderPopupAnimation","animationElements","animationWrapper","apbctEEAnimationDogOne","innerText","clickSource","ctWlBrandname","encodedEmail","encodedEmailNodesIsMixed","wl_brandname","ctAdminCommon","encodedEmailNode","popupHeaderWrapper","popupTextWrapper","popupTextWaiting","popupTextDecoding","encoderPopup","text__ee_wait_for_decoding","waitingPopup","popupHeader","text__ee_decoding_process","apbctAjaxEmailDecodeBulk","encodedEmails","encodedEmailsCollection","apbctTooltip","originalString","emailEncoderPassKey","apbctEmailEncoderCallbackBulk","res","resetEncodedNodes","ctShowDecodeComment","0","success","is_allowed","currentResultData","row","encoded_email","decoded_email","firstNode","selectableEmail","text__ee_click_to_select","title","text__ee_original_email","secondNode","buttonWrapper","text__ee_got_it","fillDecodedEmails","text__ee_blocked","text__ee_cannot_connect","text__ee_cannot_decode","popupText","text__ee_email_decoder","decodingResult","baseElementContent","encodedEmailTextInsideMailto","ctProcessDecodedDataResult","targetElement","ctFillDecodedEmail"],"mappings":"MAGMA,UACFC,gBAAkB,GAClBC,eAAiB,GAEjBC,SAAW,KACXC,SAAW,GAGXC,cACAC,cACAC,MAMAC,YAAYL,GACRM,KAAKC,OAAOP,CAAQ,CACxB,CAQAO,OAAOP,GAiBH,OAhBIA,aAAoBQ,gBACpBF,KAAKN,SAAW,KAChBM,KAAKL,SAAW,GAChBK,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKZ,CAAQ,GACvB,UAApB,OAAOA,GACfM,KAAKN,SAAW,KAChBM,KAAKL,SAAW,GAChBK,KAAKL,SAAS,GAAKD,GACS,UAApB,OAAOA,GACfM,KAAKN,SAAWA,EAChBM,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKC,SAASC,iBAAiBd,CAAQ,CAAC,GAG9EM,KAAKS,SAAS,EAGXT,IACX,CAKAU,WAAWC,GACmB,UAArB,OAAOA,EACRX,KAAKL,SAASiB,KAAKD,CAAS,EACC,UAArB,OAAOA,GACfX,KAAKN,SAAWiB,EAChBX,KAAKL,SAAWQ,MAAMC,UAAUC,MAAMC,KAAKC,SAASC,iBAAiBG,CAAS,CAAC,GAE/EX,KAAKS,SAAS,CAEtB,CAKAG,KAAKC,GACDb,KAAKL,SAASiB,KAAKC,CAAI,CAC3B,CAKAC,SACId,KAAKL,SAAWK,KAAKL,SAASU,MAAM,EAAG,CAAC,CAAC,CAC7C,CAKAI,WACIT,KAAKL,SAAW,EACpB,CAUAoB,IAAIC,EAAOC,GAIP,GAHAA,EAASA,GAAU,CAAA,EAGE,UAAjB,OAAOD,EAAoB,CAU3B,IAAK,IAAME,KAAaF,EACpB,GAAIG,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