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,EAAa,aAGbC,EAAY,cAGZC,EAAeC,SA8CnB9E,EAAOC,QArBP,SAAkBvF,GAChB,GAAoB,iBAATA,EACT,OAAOA,EAET,GAAI+J,EAAS/J,GACX,OA1CM,IA4CR,GAAImH,EAASnH,GAAQ,CACnB,IAAIqK,EAAgC,mBAAjBrK,EAAMsK,QAAwBtK,EAAMsK,UAAYtK,EACnEA,EAAQmH,EAASkD,GAAUA,EAAQ,GAAMA,CAC3C,CACA,GAAoB,iBAATrK,EACT,OAAiB,IAAVA,EAAcA,GAASA,EAEhCA,EAAQ8J,EAAS9J,GACjB,IAAIuK,EAAWN,EAAWpG,KAAK7D,GAC/B,OAAQuK,GAAYL,EAAUrG,KAAK7D,GAC/BmK,EAAanK,EAAMgG,MAAM,GAAIuE,EAAW,EAAI,GAC3CP,EAAWnG,KAAK7D,GAvDb,KAuD6BA,CACvC,C","sources":["webpack://@template/frontend/./scripts/libraries/_plugins/popup-module.js","webpack://@template/frontend/./node_modules/lodash/_Symbol.js","webpack://@template/frontend/./node_modules/lodash/_baseGetTag.js","webpack://@template/frontend/./node_modules/lodash/_baseTrim.js","webpack://@template/frontend/./node_modules/lodash/_freeGlobal.js","webpack://@template/frontend/./node_modules/lodash/_getRawTag.js","webpack://@template/frontend/./node_modules/lodash/_objectToString.js","webpack://@template/frontend/./node_modules/lodash/_root.js","webpack://@template/frontend/./node_modules/lodash/_trimmedEndIndex.js","webpack://@template/frontend/./node_modules/lodash/debounce.js","webpack://@template/frontend/./node_modules/lodash/isObject.js","webpack://@template/frontend/./node_modules/lodash/isObjectLike.js","webpack://@template/frontend/./node_modules/lodash/isSymbol.js","webpack://@template/frontend/./node_modules/lodash/now.js","webpack://@template/frontend/./node_modules/lodash/throttle.js","webpack://@template/frontend/./node_modules/lodash/toNumber.js"],"sourcesContent":["import { throttle } from \"lodash\";\n\nexport default class PopUpModule {\n  constructor() {\n    const _this = this;\n\n    if ($(\"[js-newsletter-popup]\").length === 0) return;\n\n    _this.popupDataKey = \"popup_module\";\n    _this.turnstileCaptchaTokenKey = \"captcha_token\";\n    _this.popupsArr = [];\n    _this.captchaDone = false;\n    _this.isPopupVisible = false;\n    _this.siteKey = window.trunstileSiteKey;\n    _this.secret = window.trunstileSecret;\n    _this.turnstileVerifyUrl = window.trunstileSiteVerifyURL;\n\n    _this.popupStatus = {\n      enabled: \"enabled\", // default state\n      complete: \"complete\", // form is filled by user\n      disabled: \"disabled\"  // newsletter box closed by visitor\n    };\n  }\n\n  init(elem) {\n    const _this = this;\n\n    // Display popup on user scroll by 100px from top\n    window.addEventListener(\"scroll\", throttle(_this.displayPopup.bind(this), 300));\n\n    // Initialize popup for each element\n    _this.popupId = $(elem).attr(\"data-popup-campaignId\");\n\n    _this.popup = $(`[data-popup-campaignId=\"${_this.popupId}\"]`);\n    _this.popupWrap = _this.popup.parents(\".vbw-popup-wrap\");\n    _this.popupCampaign = _this.popup.attr(\"data-popup-campaignId\");\n    _this.newsletterUrl = _this.popup.attr(\"data-newsletter-url\");\n    _this.turnstileContainer = '#' + _this.popupCampaign;\n    _this.newsletterProspect = _this.popup.attr(\"data-newsletter-prospect\");\n    _this.newsletterInput = _this.popup.find(\".vbw-newsletter-email-input\");\n    _this.newsletterBtn = _this.popup.find(\".vbw-newsletter-email-btn\");\n\n    // Newsletter popup close\n    _this.popupWrap.on(\"click\", function (e) {\n      e.stopPropagation();\n      const $elem = $(e.target);\n      requestAnimationFrame(() => {\n        setTimeout(() => {\n          if ($elem.hasClass(\"vbw-popup-close\") || $elem.hasClass(\"vbw-popup-wrap\")) {\n            const popupItem = _this.getPopupItem();\n            if (popupItem.status != _this.popupStatus.complete) {\n              popupItem.status = _this.popupStatus.disabled;\n              _this.updatePopupData();\n            }\n            _this.isPopupVisible = false;\n            _this.popupWrap?.hide();\n          }\n        }, 0);\n      });\n    });\n    // Email Validation\n    _this.newsletterInput.on(\"keyup\", function () {\n      requestAnimationFrame(() => {\n        setTimeout(() => {\n          const inputValue = this.value;\n          _this.validateEmail(inputValue);\n        }, 0);\n      });\n    });\n\n    // Newsletter Submit\n    _this.newsletterBtn.on(\"click\", function () {\n      requestAnimationFrame(() => {\n        setTimeout(() => {\n          const inputValue = _this.newsletterInput.val();\n          if (_this.validateEmail(inputValue) && _this.validateCaptcha()) {\n            const popupItem = _this.getPopupItem();\n            popupItem.status = _this.popupStatus.complete;\n            _this.updatePopupData();\n\n            // Update image to submit data\n            const newUrl = _this.newsletterUrl?.replace(\"{newsLetterEmail}\", inputValue).replace(\"{newsletterProspect}\", _this.newsletterProspect);\n            $(\".vbw-pixel-img-wrap\").append(`<img src=\"${newUrl}\" alt=\"newsletter image\" />`);\n\n            // newsletter submit success message\n            $(\".vbw-newsletter-email\").addClass(\"submit-success\");\n\n            // hide input-btn section\n            $(\".vbw-popup-form-content\").hide();\n            $(\".vbw-newsletter-wrap\").show();\n          }\n        }, 0);\n      });\n    });\n\n    setTimeout(_this.readyTurnstileCaptcha(), 600);\n  }\n\n  readyTurnstileCaptcha() {\n    const _this = this;\n    turnstile.ready(function () {\n      turnstile.render(_this.turnstileContainer, {\n        sitekey: _this.siteKey,\n        callback: function (token) {\n          _this.captchaDone = false;\n          const verifyURL = _this.turnstileVerifyUrl.replace('{token}', token);\n          $.ajax({\n            url: verifyURL,\n            type: \"GET\",\n            success: function (result) {\n              let outcome = JSON.parse(result);\n              if (outcome.success)\n                _this.captchaDone = true;\n              else\n                turnstile.reset(_this.turnstileContainer)\n            }\n          });\n        },\n        'expired-callback': function () {\n          _this.captchaDone = false;\n        },\n      });\n    });\n  }\n\n  isEmail(email) {\n    const regex = /^([a-zA-Z0-9_.+-])+\\@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$/;\n    return regex.test(email);\n  }\n\n  validateEmail(inputValue) {\n    const _this = this;\n\n    if ((!!inputValue && !_this.isEmail(inputValue)) || !inputValue) {\n      $(\".vbw-newsletter-email\").addClass(\"email-validation-error\");\n      return false;\n    }\n\n    $(\".vbw-newsletter-email\").removeClass(\"email-validation-error\");\n    return true;\n  }\n\n  validateCaptcha() {\n    const _this = this;\n    if (!_this.captchaDone) {\n      $(\".vbw-newsletter-email\").addClass(\"captcha-validation-error\");\n      return false;\n    }\n\n    $(\".vbw-newsletter-email\").removeClass(\"captcha-validation-error\");\n    return true;\n  }\n\n  isUserLoggedIn() {\n    const token = getCookie('azureb2c_token');\n    return token !== undefined;\n  }\n\n  isNewsletterSubscribed() {\n    const consent = getCookie('azureb2c_extension_NewsLetter');\n    return consent == \"true\";\n  }\n\n  isPopupStatusValid(status) {\n    const _this = this;\n    return status !== _this.popupStatus.complete && status !== _this.popupStatus.disabled;\n  }\n\n  isShowPopup() {\n    const _this = this;\n    const popupItem = _this.getPopupItem();\n\n    // Is status valid\n    if (!_this.isPopupStatusValid(popupItem.status)) {\n      return false;\n    }\n\n    // Is logged in and newsletter not subscribed\n    if (_this.isUserLoggedIn() && _this.isNewsletterSubscribed()) {\n      return false;\n    }\n\n    return true;\n  }\n\n  getPopupItem() {\n    const _this = this;\n    const item = { id: _this.popupCampaign, status: _this.popupStatus.enabled };\n    const localStoreData = localStorage.getItem(_this.popupDataKey);\n    _this.popupsArr = !!localStoreData ? JSON.parse(localStoreData) : [];\n\n    if (!!_this.popupsArr && _this.popupsArr.length > 0) {\n      const popupItemPos = _this.popupsArr.findIndex(x => x.id === _this.popupCampaign);\n\n      if (popupItemPos >= 0) {\n        return _this.popupsArr[popupItemPos];\n      }\n\n      _this.popupsArr.push(item);\n      _this.updatePopupData();\n      return item;\n    }\n\n    _this.popupsArr.push(item);\n    _this.updatePopupData();\n    return item;\n  }\n\n  displayPopup() {\n    const _this = this;\n\n    if (!_this.isPopupVisible && window.scrollY > 100 && _this.isShowPopup()) {\n      _this.isPopupVisible = true;\n      _this.popupWrap?.show();\n      _this.popup?.show();\n\n\n      window.removeEventListener(\"scroll\", _this.displayPopup);\n    }\n  }\n\n  updatePopupData() {\n    const _this = this;\n    localStorage.setItem(_this.popupDataKey, JSON.stringify(_this.popupsArr));\n  }\n\n}\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol'),\n    getRawTag = require('./_getRawTag'),\n    objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n    undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n  if (value == null) {\n    return value === undefined ? undefinedTag : nullTag;\n  }\n  return (symToStringTag && symToStringTag in Object(value))\n    ? getRawTag(value)\n    : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n  return string\n    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n    : string;\n}\n\nmodule.exports = baseTrim;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n  var isOwn = hasOwnProperty.call(value, symToStringTag),\n      tag = value[symToStringTag];\n\n  try {\n    value[symToStringTag] = undefined;\n    var unmasked = true;\n  } catch (e) {}\n\n  var result = nativeObjectToString.call(value);\n  if (unmasked) {\n    if (isOwn) {\n      value[symToStringTag] = tag;\n    } else {\n      delete value[symToStringTag];\n    }\n  }\n  return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n  return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n  var index = string.length;\n\n  while (index-- && reWhitespace.test(string.charAt(index))) {}\n  return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var isObject = require('./isObject'),\n    now = require('./now'),\n    toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n    nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n *  Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n *  The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n *   'leading': true,\n *   'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n  var lastArgs,\n      lastThis,\n      maxWait,\n      result,\n      timerId,\n      lastCallTime,\n      lastInvokeTime = 0,\n      leading = false,\n      maxing = false,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  wait = toNumber(wait) || 0;\n  if (isObject(options)) {\n    leading = !!options.leading;\n    maxing = 'maxWait' in options;\n    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n\n  function invokeFunc(time) {\n    var args = lastArgs,\n        thisArg = lastThis;\n\n    lastArgs = lastThis = undefined;\n    lastInvokeTime = time;\n    result = func.apply(thisArg, args);\n    return result;\n  }\n\n  function leadingEdge(time) {\n    // Reset any `maxWait` timer.\n    lastInvokeTime = time;\n    // Start the timer for the trailing edge.\n    timerId = setTimeout(timerExpired, wait);\n    // Invoke the leading edge.\n    return leading ? invokeFunc(time) : result;\n  }\n\n  function remainingWait(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime,\n        timeWaiting = wait - timeSinceLastCall;\n\n    return maxing\n      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n      : timeWaiting;\n  }\n\n  function shouldInvoke(time) {\n    var timeSinceLastCall = time - lastCallTime,\n        timeSinceLastInvoke = time - lastInvokeTime;\n\n    // Either this is the first call, activity has stopped and we're at the\n    // trailing edge, the system time has gone backwards and we're treating\n    // it as the trailing edge, or we've hit the `maxWait` limit.\n    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n  }\n\n  function timerExpired() {\n    var time = now();\n    if (shouldInvoke(time)) {\n      return trailingEdge(time);\n    }\n    // Restart the timer.\n    timerId = setTimeout(timerExpired, remainingWait(time));\n  }\n\n  function trailingEdge(time) {\n    timerId = undefined;\n\n    // Only invoke if we have `lastArgs` which means `func` has been\n    // debounced at least once.\n    if (trailing && lastArgs) {\n      return invokeFunc(time);\n    }\n    lastArgs = lastThis = undefined;\n    return result;\n  }\n\n  function cancel() {\n    if (timerId !== undefined) {\n      clearTimeout(timerId);\n    }\n    lastInvokeTime = 0;\n    lastArgs = lastCallTime = lastThis = timerId = undefined;\n  }\n\n  function flush() {\n    return timerId === undefined ? result : trailingEdge(now());\n  }\n\n  function debounced() {\n    var time = now(),\n        isInvoking = shouldInvoke(time);\n\n    lastArgs = arguments;\n    lastThis = this;\n    lastCallTime = time;\n\n    if (isInvoking) {\n      if (timerId === undefined) {\n        return leadingEdge(lastCallTime);\n      }\n      if (maxing) {\n        // Handle invocations in a tight loop.\n        clearTimeout(timerId);\n        timerId = setTimeout(timerExpired, wait);\n        return invokeFunc(lastCallTime);\n      }\n    }\n    if (timerId === undefined) {\n      timerId = setTimeout(timerExpired, wait);\n    }\n    return result;\n  }\n  debounced.cancel = cancel;\n  debounced.flush = flush;\n  return debounced;\n}\n\nmodule.exports = debounce;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n  var type = typeof value;\n  return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n    isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n *   console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n  return root.Date.now();\n};\n\nmodule.exports = now;\n","var debounce = require('./debounce'),\n    isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n *  Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n *  Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n  var leading = true,\n      trailing = true;\n\n  if (typeof func != 'function') {\n    throw new TypeError(FUNC_ERROR_TEXT);\n  }\n  if (isObject(options)) {\n    leading = 'leading' in options ? !!options.leading : leading;\n    trailing = 'trailing' in options ? !!options.trailing : trailing;\n  }\n  return debounce(func, wait, {\n    'leading': leading,\n    'maxWait': wait,\n    'trailing': trailing\n  });\n}\n\nmodule.exports = throttle;\n","var baseTrim = require('./_baseTrim'),\n    isObject = require('./isObject'),\n    isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n  if (typeof value == 'number') {\n    return value;\n  }\n  if (isSymbol(value)) {\n    return NAN;\n  }\n  if (isObject(value)) {\n    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n    value = isObject(other) ? (other + '') : other;\n  }\n  if (typeof value != 'string') {\n    return value === 0 ? value : +value;\n  }\n  value = baseTrim(value);\n  var isBinary = reIsBinary.test(value);\n  return (isBinary || reIsOctal.test(value))\n    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n    : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n"],"names":["PopUpModule","_classCallCheck","_this","this","$","length","popupDataKey","turnstileCaptchaTokenKey","popupsArr","captchaDone","isPopupVisible","siteKey","window","trunstileSiteKey","secret","trunstileSecret","turnstileVerifyUrl","trunstileSiteVerifyURL","popupStatus","enabled","complete","disabled","_createClass","key","value","elem","addEventListener","_throttle","displayPopup","bind","popupId","attr","popup","concat","popupWrap","parents","popupCampaign","newsletterUrl","turnstileContainer","newsletterProspect","newsletterInput","find","newsletterBtn","on","e","stopPropagation","$elem","target","requestAnimationFrame","setTimeout","hasClass","_this$popupWrap","popupItem","getPopupItem","status","updatePopupData","hide","_this2","inputValue","validateEmail","val","validateCaptcha","_this$newsletterUrl","newUrl","replace","append","addClass","show","readyTurnstileCaptcha","turnstile","ready","render","sitekey","callback","token","verifyURL","ajax","url","type","success","result","JSON","parse","reset","email","test","isEmail","removeClass","undefined","getCookie","isPopupStatusValid","isUserLoggedIn","isNewsletterSubscribed","item","id","localStoreData","localStorage","getItem","popupItemPos","findIndex","x","push","_this$popupWrap2","_this$popup","scrollY","isShowPopup","removeEventListener","setItem","stringify","Symbol","module","exports","getRawTag","objectToString","symToStringTag","toStringTag","Object","trimmedEndIndex","reTrimStart","string","slice","freeGlobal","g","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","isOwn","call","tag","unmasked","freeSelf","self","root","Function","reWhitespace","index","charAt","isObject","now","toNumber","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","apply","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","leadingEdge","clearTimeout","cancel","flush","baseGetTag","isObjectLike","Date","debounce","baseTrim","isSymbol","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","other","valueOf","isBinary"],"sourceRoot":""}