/******/ (() => { // webpackBootstrap
/******/ 	var __webpack_modules__ = ({

/***/ "5kPh":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Cookie = __webpack_require__("ebuU");
var KeyboardNavigation = __webpack_require__("qjcf");
var document = __webpack_require__("ofPo");
var cookieName = 'legal_age';
var consentCallback = function () {};
var ageVerificationOverlay;
function visitorConsented() {
  // Set verification cookie
  Cookie.set(cookieName);

  // Hide verification overlay
  document.body.classList.remove('overlay-is-displayed');
  if (ageVerificationOverlay !== null) {
    ageVerificationOverlay.parentNode.removeChild(ageVerificationOverlay);
    KeyboardNavigation.liftTabbingRestrictions();
  }

  // Call consented callback
  consentCallback();
}

/**
 * Initializes age verification
 *
 * @param {function} [callback] - Function to be called when visitor consented
 */
exports.init = function (callback) {
  if (typeof callback === 'function') {
    consentCallback = callback;
  }
  ageVerificationOverlay = document.getElementById('ageVerification');

  // legal age cookie is set and overlay is not on page
  if (Cookie.get(cookieName) !== undefined && ageVerificationOverlay === null) {
    consentCallback();
    return;
  }

  // legal age cookie is set and overlay is on page (user navigated back, page served from cache)
  if (Cookie.get(cookieName) !== undefined && ageVerificationOverlay !== null) {
    visitorConsented();
    return;
  }

  // legal age cookie is not set and overlay is not on page
  if (Cookie.get(cookieName) === undefined && ageVerificationOverlay === null) {
    consentCallback();
    return;
  }

  // legal age cookie is not set
  var consentButton = document.getElementById('ageVerificationConsent');
  if (consentButton !== null) {
    consentButton.addEventListener('click', visitorConsented);
  }
  if (ageVerificationOverlay !== null) {
    KeyboardNavigation.restrictTabbingToContainer(ageVerificationOverlay);
  }
};

/***/ }),

/***/ "f2U1":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Cookie = __webpack_require__("ebuU");
var countdownBanner;
var countdownCounterContainer;
var countdownFinishDate;
var remainingTime;
var remainingMilliseconds;
var countdownInterval;
var countdownMinutes;
var countdownSeconds;
var backofferHasStartedName = 'backofferHasStarted';
var backofferHasStarted;
var joinPromoBanner = document.getElementById('joinPromoBanner');
function removeCountDown() {
  var countdownBanner = document.getElementById('countdownBanner');
  if (countdownBanner) {
    countdownBanner.parentElement.removeChild(countdownBanner);
    countdownBanner = undefined;
  }
  if (joinPromoBanner) {
    joinPromoBanner.classList.remove('is-hidden');
  }
}
function updateCounter() {
  remainingMilliseconds = countdownFinishDate - Date.now();
  if ((remainingMilliseconds <= 1000 || isNaN(remainingMilliseconds)) && backofferHasStarted) {
    clearInterval(countdownInterval);
    Cookie.set(backofferHasStartedName, false, new Date(0));
    removeCountDown();
    return false;
  }
  remainingTime = getRemainingTime(remainingMilliseconds);
  countdownMinutes.innerText = remainingTime.minutes < 10 ? '0' + remainingTime.minutes : remainingTime.minutes;
  countdownSeconds.innerText = remainingTime.seconds < 10 ? '0' + remainingTime.seconds : remainingTime.seconds;
}
function getRemainingTime(endTime) {
  var seconds = endTime / 1000;
  var days = Math.floor(seconds / (3600 * 24));
  seconds -= days * 3600 * 24;
  var hours = Math.floor(seconds / 3600);
  seconds -= hours * 3600;
  var minutes = Math.floor(seconds / 60);
  seconds -= minutes * 60;
  seconds = Math.floor(seconds);
  return {
    days: days,
    hours: hours,
    minutes: minutes,
    seconds: seconds
  };
}
exports.revealCountDownBanner = function () {
  exports.init();
  updateCounter();
  countdownInterval = window.setInterval(updateCounter, 1000);
  countdownCounterContainer.classList.remove('is-hidden');
  countdownBanner.classList.remove('is-hidden');
  if (joinPromoBanner) {
    joinPromoBanner.classList.add('is-hidden');
  }
};
exports.init = function () {
  countdownBanner = document.getElementById('countdownBanner');
  countdownCounterContainer = document.getElementById('countdownCounterContainer');
  if (countdownCounterContainer === null) {
    return;
  }
  var countdownCookie = countdownCounterContainer.getAttribute('data-countdown-cookie');
  if (countdownCookie === null) {
    return;
  }
  var backofferPercentage = Cookie.get('backofferPercentage');
  if (backofferPercentage !== null) {
    var countdownBackofferPercentage = document.getElementById('countdownBackofferPercentage');
    countdownBackofferPercentage.innerText = backofferPercentage;
  }
  countdownFinishDate = Cookie.get(countdownCookie);
  countdownFinishDate = parseInt(countdownFinishDate, 10);
  remainingMilliseconds = countdownFinishDate - Date.now();
  backofferHasStarted = Cookie.get(backofferHasStartedName);
  backofferHasStarted = backofferHasStarted === 'true';
  if ((remainingMilliseconds <= 1000 || isNaN(remainingMilliseconds)) && backofferHasStarted) {
    clearInterval(countdownInterval);
    Cookie.set(backofferHasStartedName, false, new Date(0));
    removeCountDown();
    return;
  }
  countdownMinutes = document.getElementById('countdownMinutes');
  countdownSeconds = document.getElementById('countdownSeconds');
  if (backofferHasStarted) {
    updateCounter();
    countdownInterval = window.setInterval(updateCounter, 1000);
    countdownCounterContainer.classList.remove('is-hidden');
  }
};

/***/ }),

/***/ "s9eF":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var mainPageElement = null;
function getPageModuleArguments() {
  mainPageElement = document.querySelector('main[data-page]');
  if (mainPageElement === null) {
    return [];
  }
  var argumentsString = mainPageElement.getAttribute('data-page-args');
  if (argumentsString === null) {
    return [];
  }
  return argumentsString.split(';;');
}
exports.initModule = init => {
  var pageArguments = getPageModuleArguments();
  init.apply(null, pageArguments);
};

/***/ }),

/***/ "aEL6":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Ajax = __webpack_require__("khm0");

/**
 * Increases the value of a metric
 *
 * @param {string} metric - The name of the metric
 * @param {object|string} [tags] - The tags of the metric
 *
 * @return {boolean}
 */
exports.increase = function (metric, tags) {
  if (typeof metric !== 'string' || metric.length === 0) {
    return false;
  }
  var datadogTags = {};
  if (typeof tags === 'string' && tags.length !== 0) {
    datadogTags.tags = {};
    datadogTags.tags[tags] = 'true';
  } else if (tags !== undefined && typeof tags === 'object' && tags !== null) {
    datadogTags.tags = tags;
  }
  Ajax.post('/datadog/increment/' + metric).setHeader('X-Requested-With', 'XMLHttpRequest').sendJSON(datadogTags);
  return true;
};

/***/ }),

/***/ "sqKB":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Url = __webpack_require__("nHg3");
var Ajax = __webpack_require__("khm0");
const favoritesLocalStorageName = 'favoriteScenes';
const favoriteSceneLinkClass = 'is-favorite';
const favoriteRemovedVideoCardClass = 'video-card--removed-from-favorite';
var addFavoriteSceneApiUrl = '/member/favorites/add';
var removeFavoriteSceneApiUrl = '/member/favorites/remove';
var allFavoriteSceneApiUrl = '/members/favorites/all';

/**
 * Get local storage scene ids array
 */
function getLocalStorageScenesIds() {
  const favoritesListObject = JSON.parse(localStorage.getItem(favoritesLocalStorageName));
  const sceneIdsList = favoritesListObject !== null ? favoritesListObject.sceneIds : [];
  return sceneIdsList;
}

/**
 * Get local storage updated value
 */
function isLocalStorageUpdated() {
  const favoritesListObject = JSON.parse(localStorage.getItem(favoritesLocalStorageName));
  const isUpdated = favoritesListObject !== null ? favoritesListObject.updated : false;
  return isUpdated;
}

/**
 * Save local storage scenes array
 */
function saveLocalStorageScenesIds(scenes) {
  const favoritesListObject = {
    sceneIds: scenes,
    updated: true
  };
  localStorage.setItem(favoritesLocalStorageName, JSON.stringify(favoritesListObject));
}

/**
 * Find scene index in array
 */
function findSceneInFavorites(scenes, sceneId) {
  return scenes.findIndex(scene => scene === sceneId);
}

/**
 * Add scene to favorites
 * @param favoriteLinkElement
 * @param videoCardElement
 */
function toggleFavoriteScene(favoriteLinkElement, videoCardElement) {
  const scenes = getLocalStorageScenesIds();
  const sceneId = favoriteLinkElement.getAttribute('data-id');
  if (findSceneInFavorites(scenes, parseInt(sceneId)) === -1) {
    addFavoriteScene(scenes, parseInt(sceneId), favoriteLinkElement, videoCardElement);
  } else {
    removeFavoriteScene(scenes, parseInt(sceneId), favoriteLinkElement, videoCardElement);
  }
  return false;
}

/**
 * Add scene to favorites
 */
function addFavoriteScene(scenes, sceneId, favoriteLinkElement, videoCardElement) {
  Ajax.post(addFavoriteSceneApiUrl).onSuccess(function () {
    if (favoriteLinkElement.classList.contains('favorites-link--favorites-page') === true) {
      videoCardElement.classList.remove(favoriteRemovedVideoCardClass);
    }
    favoriteLinkElement.classList.add(favoriteSceneLinkClass);
    scenes.push(sceneId);
    saveLocalStorageScenesIds(scenes);
  }).sendForm({
    sceneId: sceneId
  });
}

/**
 * Remove scene to favorites
 */
function removeFavoriteScene(scenes, sceneId, favoriteLinkElement, videoCardElement) {
  Ajax.post(removeFavoriteSceneApiUrl).onSuccess(function () {
    if (favoriteLinkElement.classList.contains('favorites-link--favorites-page') === true) {
      videoCardElement.classList.add(favoriteRemovedVideoCardClass);
    }
    favoriteLinkElement.classList.remove(favoriteSceneLinkClass);
    const index = findSceneInFavorites(scenes, parseInt(sceneId));
    scenes.splice(index, 1);
    saveLocalStorageScenesIds(scenes);
  }).sendForm({
    sceneId: sceneId
  });
}

/**
 * Update Local Storage with the favorite scenes of the user
 */
exports.updateStorage = function () {
  const isFavoritesStorageUpdated = isLocalStorageUpdated();
  if (isFavoritesStorageUpdated === true) {
    return;
  }
  const scenes = getLocalStorageScenesIds();
  Ajax.get(allFavoriteSceneApiUrl).onSuccess(function (response) {
    response.forEach(function (item) {
      if (findSceneInFavorites(scenes, item.sceneId) === -1) {
        scenes.push(item.sceneId);
        saveLocalStorageScenesIds(scenes);
      }
    });
  }).send();
};

/**
 * Initializes the favorite functionality
 */
exports.init = function (isLoggedIn) {
  const favoritesLinks = document.querySelectorAll('.favorites-link');
  const scenes = getLocalStorageScenesIds();
  favoritesLinks.forEach(function (favoritesLink) {
    var videoCardElement = favoritesLink.parentElement.parentElement;
    var isUserExpired = favoritesLink.hasAttribute('data-must-reenable');
    if (isUserExpired === false) {
      favoritesLink.addEventListener('click', function (e) {
        e.preventDefault();
        if (isLoggedIn === false) {
          let url = this.href;
          Url.redirectTo(url);
        } else {
          toggleFavoriteScene(e.target, videoCardElement);
        }
      });
    }
    const sceneId = favoritesLink.getAttribute('data-id');
    if (findSceneInFavorites(scenes, parseInt(sceneId)) !== -1) {
      favoritesLink.classList.add(favoriteSceneLinkClass);
    }
  });
};

/***/ }),

/***/ "qjcf":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var container;
var containerFocusableElements;

/**
 * Returns a list of elements that can get focus in the container
 *
 * @return {array}
 */
function getFocusableElements() {
  return container.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]');
}

/**
 * Returns the element that should receive focus
 *
 * @param {HTMLElement} focusedElement - The element currently focused
 *
 * @return {HTMLElement}
 */
function getElementToFocus(focusedElement) {
  var nodePosition = container.compareDocumentPosition(focusedElement);

  // means the focusedElement contains the container, treat is as a preceeding
  nodePosition = nodePosition === 10 ? Node.DOCUMENT_POSITION_PRECEDING : nodePosition;
  if (nodePosition === Node.DOCUMENT_POSITION_FOLLOWING) {
    // Focus is on an element after the container
    return containerFocusableElements[0];
  }
  if (nodePosition === Node.DOCUMENT_POSITION_PRECEDING) {
    // Focus on an element before the container
    return containerFocusableElements[containerFocusableElements.length - 1];
  }
}

/**
 * Contrains tabbing to the container set
 *
 * @param {object} e - focus event
 */
function tabConstrain(e) {
  if (container === undefined) {
    return;
  }
  var targetElement = e.target;
  if (container.contains(targetElement) === true) {
    return;
  }
  var nextElement = getElementToFocus(targetElement);
  nextElement.focus();
}

/**
 * Restrict tabbing to a specified container
 *
 * @param {HTMLElement} containerElement - The container to restrict tabbing to
 */
exports.restrictTabbingToContainer = function (containerElement) {
  if (container === containerElement) {
    return;
  }
  container = containerElement;
  containerFocusableElements = getFocusableElements();
  document.addEventListener('focus', tabConstrain, true);
};

/**
 * Removes tabbing restrictions
 */
exports.liftTabbingRestrictions = function () {
  document.removeEventListener('focus', tabConstrain, true);
};

/***/ }),

/***/ "0ydy":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Ajax = __webpack_require__("khm0");
var upgradeApiUrl = '/member/upgrade';
var reenableUrl = '/member/reenable-membership';
var updateProductsUrl = '/productsNeedUpdate';
var Url = __webpack_require__("nHg3");

/**
 * Upgrade the membership from trial to monthly
 *
 * @param {function} callback - function to be called when upgrade is done
 */
exports.upgrade = function (callback) {
  Ajax.post(upgradeApiUrl).onSuccess(function () {
    callback();
  }).onError(function (response, requestInfo) {
    var cardNeedsToBeUpdated;
    if (requestInfo.statusCode === 402) {
      cardNeedsToBeUpdated = true;
    }
    if (requestInfo.statusCode === 302) {
      Url.redirectTo(response.url);
      return;
    }
    callback(true, cardNeedsToBeUpdated);
  }).send();
};

/**
 * Re-enables member subscription
 *
 * @param {string} email - The member's email
 * @param {string} memberId - The member's id
 * @param {string} plan - The plan the user wants to reenable with
 * @param {function} callback - The function to be called when the reenalbe is done
 */
exports.reenable = function (email, memberId, plan, callback) {
  var postData = {
    'member_id': memberId,
    'email': email,
    'plan': plan
  };
  Ajax.post(reenableUrl).onSuccess(function (response) {
    callback(undefined, response.reenabled);
  }).onError(function () {
    callback(true);
  }).sendForm(postData);
};

/**
 * Marks the member's products list to be updated on next page load
 */
exports.updateProducts = function () {
  window.setTimeout(function () {
    Ajax.post(updateProductsUrl).send();
  }, 2000);
};
exports.upsellInBackgroundViaURL = function (URL, callback) {
  Ajax.post(URL).onSuccess(function (response) {
    callback(true, response);
  }).onError(function (response) {
    callback(false, response);
  }).send();
};

/***/ }),

/***/ "U8d1":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Ajax = __webpack_require__("khm0");
var KeyboardNavigation = __webpack_require__("qjcf");
var document = __webpack_require__("ofPo");
var visibleOffer;
var offerContainer;
var offerContent;
var offerContainerDisplayed = false;
var offerContainerInitialized = false;
var offersApiUrl = '/offer/';
var offerModules = {};
var offerNodes = {};
var closeButton = document.getElementById('offerClose');
var abbreviatedSitename = getAbbreviatedSitename();
var trackingConfigElement;
var isAdGlareModal = false;
var adGlareTimeout = null;
var adGlareModalShownSeconds = 120;
function getSiteName() {
  if (trackingConfigElement === undefined) {
    trackingConfigElement = document.getElementById('trackingConfig');
  }
  return trackingConfigElement.getAttribute('data-sitename') || '';
}
function getAbbreviatedSitename() {
  var siteName = getSiteName();
  switch (siteName) {
    case 'badoinkvr':
      return 'BDVR';
    case 'vrcosplayx':
      return 'VRCX';
    case 'babevr':
      return 'BBVR';
    case '18vr':
      return '18VR';
    case 'realvr':
      return 'RVR';
    default:
      return '';
  }
}
function fetchOfferTemplate(offerId, callback) {
  Ajax.get(offersApiUrl + offerId).onSuccess(function (response) {
    callback(undefined, response, offerId);
  }).onError(function () {
    callback(true);
  }).send();
}
function fetchOfferTemplateForCategory(offerId, videoId, callback) {
  Ajax.get(offersApiUrl + offerId + '/' + videoId).onSuccess(function (response) {
    callback(undefined, response, offerId);
  }).onError(function () {
    callback(true);
  }).send();
}
function getAdjustedC2AURLByTrigger(trigger, originalURL) {
  var extractor = /(Mobile|Desktop)_(.*)_(.*)/gmi;
  var matchedElements = extractor.exec(originalURL) || [];
  if (matchedElements.length < 4) {
    return originalURL;
  }
  var adjustedSid = getAdjustedC2ASubIdByTrigger(trigger, matchedElements[0]);
  var splitOriginalURL = originalURL.split('&');
  var adjustedURL = '';
  for (var i = 0; i < splitOriginalURL.length; i++) {
    if (splitOriginalURL[i].indexOf('sid') !== -1) {
      adjustedURL = adjustedURL + 'sid=' + adjustedSid;
    } else {
      adjustedURL = adjustedURL + splitOriginalURL[i];
    }
    if (i < splitOriginalURL.length - 1) {
      adjustedURL = adjustedURL + '&';
    }
  }
  return adjustedURL;
}
function getAdjustedC2ASubIdByTrigger(trigger, originalSubId) {
  var extractor = /(Mobile|Desktop)_(.*)_(.*)/gmi;
  var matchedElements = extractor.exec(originalSubId) || [];
  if (matchedElements.length < 4) {
    return originalSubId;
  }
  var originalDevice = matchedElements[1] && matchedElements[1].toLowerCase();
  var originalSite = matchedElements[3];
  var adjustedPartialSid = trigger + '_to';
  if (trigger === 'login') {
    adjustedPartialSid = 'popup_after_' + trigger + '_to';
  }
  var adjustedSid = originalDevice + '_' + adjustedPartialSid + '_' + originalSite;
  if (abbreviatedSitename !== '') {
    adjustedSid = abbreviatedSitename + '_' + adjustedSid;
  }
  return adjustedSid;
}
function handleTemplateFetchResult(error, templateHtml, offerId) {
  if (error === true) {
    return;
  }
  var tempContainer = document.createElement('div');
  tempContainer.innerHTML = templateHtml;
  offerModules[offerId] = __webpack_require__("ZEy8");
  offerNodes[offerId] = tempContainer.firstElementChild;
  offerModules[offerId].init(offerNodes[offerId], offerId);
}
function initializeContainer() {
  offerContainer = document.getElementById('offerContainer');
  if (offerContainer !== null) {
    offerContent = document.getElementById('offerContent');
    closeButton.addEventListener('click', function (e) {
      e.preventDefault();
      exports.hide();
    }, true);
    offerContainer.addEventListener('click', dismissOfferNotification);
    offerContainerInitialized = true;
  }
}
function keyPressed(e) {
  if (e.keyCode === 27) {
    exports.hide();
  }
}

/**
 * Loads an offer
 *
 * @param {string} offerId - The id of the offer
 * @param {function} callback
 */
exports.load = function (offerId, trigger, callback) {
  if (offerModules[offerId] !== undefined) {
    callback(trigger);
    return;
  }
  fetchOfferTemplate(offerId, function (error, templateHtml, offerId) {
    handleTemplateFetchResult(error, templateHtml, offerId);
    callback(trigger);
  });
};
function dismissAdGlareOfferNotification() {
  exports.hide();
}
function dismissOfferNotification(e) {
  if (e.target === this) {
    exports.hide();
  }
}

/**
 * Displays an offer
 *
 * @param {string} offerId
 */
exports.show = function (offerId, trigger) {
  if (visibleOffer === offerId) {
    return;
  }
  if (offerContainerInitialized === false) {
    initializeContainer();
  }
  if (offerContainerDisplayed === true) {
    exports.hide();
  } else if (offerContainer !== null) {
    KeyboardNavigation.restrictTabbingToContainer(offerContainer);
    document.addEventListener('keydown', keyPressed);
  }
  if (offerContainer !== null) {
    offerContainer.classList.remove('is-hidden');
    document.body.classList.add('overlay-is-displayed');
    offerContainerDisplayed = true;
  }
  exports.load(offerId, trigger, function (trigger) {
    isAdGlareModal = offerContent.classList.contains('offer__adglare');
    if (offerContainerDisplayed === false) {
      return;
    }
    if (isAdGlareModal === true) {
      offerContainer.classList.remove('offer--loading');
      adGlareTimeout = setTimeout(dismissAdGlareOfferNotification, adGlareModalShownSeconds * 1000);
      return;
    }
    var c2aButtonBanner = offerNodes[offerId].querySelector('#upsellC2aBanner');
    if (c2aButtonBanner) {
      var originalURLBanner = c2aButtonBanner.href;
      var newC2AURLBanner = getAdjustedC2AURLByTrigger(trigger, originalURLBanner);
      c2aButtonBanner.setAttribute('href', newC2AURLBanner);
      var originalSubIdBanner = c2aButtonBanner.getAttribute('data-subid');
      var newC2ASubIdBanner = getAdjustedC2ASubIdByTrigger(trigger, originalSubIdBanner);
      c2aButtonBanner.setAttribute('data-subid', newC2ASubIdBanner);
    }
    var c2aButton = offerNodes[offerId].querySelector('#upsellC2a');
    if (c2aButton) {
      var originalURL = c2aButton.href;
      var newC2AURL = getAdjustedC2AURLByTrigger(trigger, originalURL);
      c2aButton.setAttribute('href', newC2AURL);
      var originalSubId = c2aButton.getAttribute('data-subid');
      var newC2ASubId = getAdjustedC2ASubIdByTrigger(trigger, originalSubId);
      c2aButton.setAttribute('data-subid', newC2ASubId);
    }
    offerModules[offerId].show(trigger);
    offerContent.insertBefore(offerNodes[offerId], closeButton);
    if (offerContainer !== null) {
      offerContainer.classList.remove('offer--loading');
    }
    visibleOffer = offerId;
  });
};

/**
 * Loads an offer
 *
 * @param {string} offerId - The id of the offer
 * @param {string} offerId - The id of the video
 * @param {function} callback
 */
exports.loadCategoryOffer = function (offerId, videoId, trigger, callback) {
  if (offerModules[offerId] !== undefined) {
    callback(trigger);
    return;
  }
  fetchOfferTemplateForCategory(offerId, videoId, function (error, templateHtml, offerId) {
    handleTemplateFetchResult(error, templateHtml, offerId);
    callback(trigger);
  });
};

/**
 * Displays an offer
 *
 * @param {string} offerId
 */
exports.showCategoryOffer = function (offerId, videoId, trigger) {
  if (visibleOffer === offerId) {
    return;
  }
  if (offerContainerInitialized === false) {
    initializeContainer();
  }
  if (offerContainerDisplayed === true) {
    exports.hide();
  } else {
    KeyboardNavigation.restrictTabbingToContainer(offerContainer);
    document.addEventListener('keydown', keyPressed);
  }
  offerContainer.classList.remove('is-hidden');
  document.body.classList.add('overlay-is-displayed');
  offerContainerDisplayed = true;
  exports.loadCategoryOffer(offerId, videoId, trigger, function (trigger) {
    if (offerContainerDisplayed === false) {
      return;
    }
    offerModules[offerId].show(trigger);
    offerContent.insertBefore(offerNodes[offerId], closeButton);
    offerContainer.classList.remove('offer--loading');
    visibleOffer = offerId;
  });
};

/**
 * Hides the currently displayed offer
 *
 * @return {boolean}
 */
exports.hide = function () {
  if (adGlareTimeout !== null) {
    clearInterval(adGlareTimeout);
    document.querySelectorAll('.offer__adglare-ad').forEach(el => el.remove());
    offerContent.classList.remove('offer__adglare');
    closeButton.classList.remove('offer__icon-close-adglare');
    if (document.getElementById('adGlareX')) {
      document.getElementById('adGlareX').remove();
    }
  }
  if (offerContainerDisplayed === false) {
    return false;
  }
  var hiddenNav = document.querySelector('.navigation-container--hidden');
  document.removeEventListener('keydown', keyPressed);
  KeyboardNavigation.liftTabbingRestrictions();
  if (hiddenNav) {
    document.body.classList.remove('overlay-is-displayed');
  }
  offerContainer.classList.add('is-hidden');
  offerContainer.classList.add('offer--loading');
  if (offerModules[visibleOffer] !== undefined) {
    offerContent.removeChild(offerNodes[visibleOffer]);
    offerModules[visibleOffer].hide();
  }
  offerContainerDisplayed = false;
  visibleOffer = undefined;
  return true;
};

/**
 * Loads offer templates from a DOM element
 *
 * @param {string} elementId - The id of the element containing the offers
 *
 * @return {boolean}
 */
exports.loadFromDOM = function (elementId, trigger) {
  var container = document.getElementById(elementId);
  if (container === null) {
    return false;
  }
  var offersOnPage = container.querySelectorAll('[data-offer]');
  if (offersOnPage.length === 0) {
    return false;
  }
  var offerId;
  var i;
  for (i = 0; i < offersOnPage.length; i++) {
    offerId = offersOnPage[i].getAttribute('data-offer');
    if (offerId.length === 0 || offerModules[offerId] !== undefined) {
      continue;
    }
    offerModules[offerId] = __webpack_require__("ZEy8");
    offerNodes[offerId] = offersOnPage[i];
    offerModules[offerId].init(offerNodes[offerId], offerId);
  }
  var offerToShow = container.getAttribute('data-show');
  if (offerToShow !== null && offerModules[offerToShow] !== undefined) {
    exports.show(offerToShow, trigger);
  }
  return true;
};

/***/ }),

/***/ "7Sdh":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var KeyboardNavigation = __webpack_require__("qjcf");
var overlayStucture;
var overlayContent;
var overlayIsDisplayed = false;
var currentContent;
var currentContentOriginalParent;
var onHideSubscribers = [];
function createOverlayStucture(classModifiers) {
  var wrapper = document.createElement('div');
  wrapper.classList.add('overlay');
  if (classModifiers) {
    wrapper.classList.add(classModifiers);
  }
  var container = document.createElement('div');
  container.setAttribute('tabindex', '0');
  container.classList.add('overlay-container');
  wrapper.appendChild(container);
  var closeButton = document.createElement('a');
  closeButton.setAttribute('href', '#');
  closeButton.setAttribute('title', 'close');
  closeButton.classList.add('overlay-close');
  closeButton.id = 'overlayClose';
  container.appendChild(closeButton);
  closeButton.addEventListener('click', function (e) {
    e.preventDefault();
    exports.hide();
  });
  var content = document.createElement('div');
  content.setAttribute('data-overlay-content', '');
  content.classList.add('overlay-content');
  container.appendChild(content);
  return wrapper;
}

/**
 * Hide overlay onclick outside
 */
function dismissOvelay(e) {
  if (e.target === this) {
    exports.hide();
  }
}

/**
 * Move an element to the specified container
 *
 * @param {HTMLElement} elem
 * @param {HTMLElement} parentElem
 */
function moveElementToParent(elem, parentElem) {
  if (parentElem === null) {
    elem.parentNode.removeChild(elem);
    return;
  }
  parentElem.appendChild(elem);
}

/**
  * Called when a key is pressed while the overlay is displayed
  *
  * @param {object} e The event
 */
function keyPressed(e) {
  if (e.keyCode === 27) {
    exports.hide();
  }
}

/**
 * Calls all on hide subscribers
 *
 * @param {string} contentId - The content id of the overlay
 */
function notifyOnHideSubscribers(contentId) {
  var i;
  for (i = 0; i < onHideSubscribers.length; i++) {
    onHideSubscribers[i](contentId);
  }
}

/**
 * Displays an overlay
 *
 * @param {string|HTMLElement} overlay - The id or node to be displayed inside the overlay
 *
 * @param classModifiers
 * @return {boolean}
 */
exports.display = function (overlay, classModifiers, shouldHideOverlayOnClickOutside) {
  // sanity check
  if (typeof overlay !== 'string' && typeof overlay !== 'object') {
    return false;
  }
  var content;
  if (typeof overlay === 'string') {
    content = document.getElementById(overlay);
    if (content === null) {
      return false;
    }
  } else {
    if (overlay === null || overlay.innerHTML === undefined) {
      return false;
    }
    content = overlay;
  }

  // check if content is already displayed
  if (currentContent === content) {
    return false;
  }
  if (overlayIsDisplayed === false) {
    // append the overlay structure to the body if no overlay was displayed before
    overlayStucture = createOverlayStucture(classModifiers);
    document.body.appendChild(overlayStucture);
    document.addEventListener('keydown', keyPressed);
    overlayContent = overlayStucture.querySelector('[data-overlay-content]');
    overlayIsDisplayed = true;
  } else if (currentContent !== undefined) {
    // hide previous content
    moveElementToParent(currentContent, currentContentOriginalParent);
  }
  currentContentOriginalParent = content.parentNode;
  currentContent = content;
  overlayContent.appendChild(content);
  KeyboardNavigation.restrictTabbingToContainer(overlayStucture);
  overlayContent.focus();
  document.body.classList.add('overlay-is-displayed');
  if (shouldHideOverlayOnClickOutside === true) {
    var overlayContainer = document.querySelector('.overlay');
    overlayContainer.addEventListener('click', dismissOvelay);
  }
  return true;
};

/**
 * Hides the overlay
 *
 * @return {boolean}
 */
exports.hide = function () {
  if (currentContent === undefined) {
    return false;
  }
  var currentContentId = currentContent.id;
  KeyboardNavigation.liftTabbingRestrictions();
  document.removeEventListener('keydown', keyPressed);
  moveElementToParent(currentContent, currentContentOriginalParent);
  overlayStucture.parentNode.removeChild(overlayStucture);
  currentContent = undefined;
  currentContentOriginalParent = undefined;
  overlayIsDisplayed = false;
  notifyOnHideSubscribers(currentContentId);
  document.body.classList.remove('overlay-is-displayed');
  return true;
};

/**
 * Adds a subscriber to be called when the overlay gets hidden
 *
 * @param {function} subscriber - The function to be called when overlay gets hidden
 *
 * @return {boolean}
 */
exports.onHideSubscribe = function (subscriber) {
  if (typeof subscriber !== 'function') {
    return false;
  }
  if (onHideSubscribers.indexOf(subscriber) !== -1) {
    return true;
  }
  onHideSubscribers.push(subscriber);
  return true;
};

/**
 * Removes a subscriber from the overlay hidden event
 *
 * @param {function} subscriber - The subscriber function to be removed
 *
 * @return {boolean}
 */
exports.onHideUnsubscribe = function (subscriber) {
  if (typeof subscriber !== 'function') {
    return false;
  }
  var subscriberPosition = onHideSubscribers.indexOf(subscriber);
  if (subscriberPosition === -1) {
    return true;
  }
  onHideSubscribers.splice(subscriberPosition, 1);
  return true;
};

/**
 * Returns if an overlay is displayed
 *
 * @return {boolean}
 */
exports.isDisplayed = function () {
  return overlayIsDisplayed;
};

/***/ }),

/***/ "DbbC":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var window = __webpack_require__("4uwT");
var Url = __webpack_require__("nHg3");
var container;
var variation;
function createGalleryItems(elements, variation) {
  bindLockedGalleryC2AButton();
  switch (variation) {
    case '1':
      return getFullyLockedGalleryItems(elements);
    case '2':
      return getPartiallyLockedGalleryItems(elements);
    default:
      return getFullyUnlockedGalleryItems(elements);
  }
}
function getFullyUnlockedGalleryItems(elements) {
  var items = [];
  var i;
  for (i = 0; i < elements.length; i++) {
    if (elements[i].getAttribute('data-type') === 'video' && window.matchMedia('(min-width: 1025px)').matches) {
      items.push({
        html: '<div class="gallery-video-wrapper"><video id="pswpVideo' + i + '" class="pswp__video" controls>' + '<source src="' + elements[i].getAttribute('data-video-mp4') + '" type="video/mp4">' + '</video></div>',
        slideIndex: i
      });
    } else if (elements[i].getAttribute('data-type') === 'video') {
      items.push({
        html: '<div class="gallery-video-wrapper"><video id="pswpVideo' + i + '" class="pswp__video" controls>' + '<source src="' + elements[i].getAttribute('data-video-webm') + '" type="video/webm">' + '<source src="' + elements[i].getAttribute('data-video-mp4') + '" type="video/mp4">' + '</video></div>',
        slideIndex: i
      });
    } else {
      items.push({
        src: elements[i].getAttribute('data-big-image'),
        w: parseInt(elements[i].getAttribute('data-image-width'), 10),
        h: parseInt(elements[i].getAttribute('data-image-height'), 10),
        slideIndex: i
      });
    }
  }
  return items;
}
function getFullyLockedGalleryItems(elements) {
  var items = [];
  var i;
  for (i = 0; i < elements.length; i++) {
    items.push({
      html: getLockedSlideHTMLTemplate(elements[i].getAttribute('data-big-image'))
    });
  }
  return items;
}
function getPartiallyLockedGalleryItems(elements) {
  var items = [];
  var i;
  for (i = 0; i < elements.length; i++) {
    if (i < 2) {
      items.push({
        src: elements[i].getAttribute('data-big-image'),
        w: 1500,
        h: 1000
      });
    } else {
      items.push({
        html: getLockedSlideHTMLTemplate(elements[i].getAttribute('data-big-image'))
      });
    }
  }
  return items;
}
function getLockedSlideHTMLTemplate(imageSource) {
  return '<div class="gallery__locker-main-container">' + '    <div style="width: 100%;height: 100%;background-image: url(' + imageSource + ');background-repeat: no-repeat;background-position: center;background-size: contain;">' + '       <div class="gallery__locker-background">' + '           <div class="gallery__locker-title">Member\'s Area</div>' + '           <div class="gallery__locker-copy">Find the plan that’s right for you! 100% access for as little as $1</div>' + '           <a class="gallery__locker-c2a button" href="#" data-c2a-id="galleryLockerC2a">Join Today</a>' + '       </div>' + '   </div>' + '</div>';
}
function bindLockedGalleryC2AButton() {
  document.addEventListener('click', function (event) {
    if (event.target.getAttribute('data-c2a-id') === 'galleryLockerC2a') {
      Url.redirectTo('/join/');
    }
  });
}
function getThumbailBounds(galleryIndex) {
  var thumbnail = container.querySelector('[data-gallery-index="' + galleryIndex + '"]');
  if (thumbnail === null) {
    return {};
  }
  var pageYScroll = window.pageYOffset || document.documentElement.scrollTop;
  var rect = thumbnail.getBoundingClientRect();
  return {
    x: rect.left,
    y: rect.top + pageYScroll,
    w: rect.width
  };
}
function pauseAllVideos() {
  var videosList = document.querySelectorAll('.pswp__video');
  if (videosList === null) {
    return false;
  }
  var i;
  for (i = 0; i < videosList.length; i++) {
    videosList[i].pause();
    videosList[i].currentTime = 0;
  }
}
exports.init = function (imagesContainerId, imageIndex, lastItem, isLoggedIn) {
  if (window.PhotoSwipe === undefined) {
    return false;
  }
  container = document.getElementById(imagesContainerId);
  if (container === null) {
    return false;
  }
  variation = container.getAttribute('data-variation');
  var imagesList = container.querySelectorAll('[data-big-image]');
  var photoSwipeItems = createGalleryItems(imagesList, variation);
  if (lastItem) {
    photoSwipeItems.push({
      slideIndex: 5,
      html: lastItem
    });
  }
  if (photoSwipeItems.length === 0) {
    return false;
  }
  var photoSwipeOptions = {
    index: imageIndex || 0,
    shareEl: false,
    history: false,
    getThumbBoundsFn: getThumbailBounds
  };
  var gallery = new window.PhotoSwipe(document.getElementById('photoswipeContainer'), window.PhotoSwipeUI_Default, photoSwipeItems, photoSwipeOptions);
  gallery.init();

  // Gallery starts closing
  gallery.listen('beforeChange', function () {
    pauseAllVideos();
    if (isLoggedIn !== undefined && !isLoggedIn && lastItem.indexOf('goToGirlPageButton') > -1) {
      var goToGalleryButton = document.getElementById('goToGirlPageButton');
      if (goToGalleryButton) {
        goToGalleryButton.addEventListener('click', function (event) {
          event.preventDefault();
          var url = this.href;
          Url.redirectTo(url);
        });
      }
    }
  });
  gallery.listen('close', pauseAllVideos);
  return gallery;
};

/***/ }),

/***/ "Fazu":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Membership = __webpack_require__("0ydy");
var Overlay = __webpack_require__("7Sdh");
var Url = __webpack_require__("nHg3");
var document = __webpack_require__("ofPo");
var reenableMembershipOverlay;
var initialized = false;
var membershipReenablingInProgress = false;
var reenabledPlanType;
function handleMemebershipReenableResponse(error, reenabled) {
  membershipReenablingInProgress = false;
  if (error === true) {
    Url.redirectTo('/error');
    return;
  }
  if (reenabled === true) {
    Overlay.display('membershipReenableSuccessOverlay');
    if (document.getElementById('trackingConfig') === null) {
      return;
    }
    var paysite = document.getElementById('trackingConfig').getAttribute('data-sitename');
    var izScript = document.querySelector('script[src="https://cdn.izooto.com/scripts/3607ba1af5eb6eef7c5eeaebc0b96d968dbf9d08.js"');
    if (paysite === 'badoinkvr' && izScript !== null) {
      window._izq = window._izq || [];
      window._izq.push(['userProfile', {
        'add': {
          'is_paying_member': 'true'
        }
      }]);
      Overlay.onHideSubscribe(function () {
        setTimeout(function () {
          Url.reload();
        }, 1000);
      });
    } else {
      Overlay.onHideSubscribe(Url.reload);
    }
    return;
  }
  Overlay.display('paymentProcessingErrorOverlay');
}
function handleReenableButtonClicked(event) {
  event.preventDefault();
  reenabledPlanType = event.target.getAttribute('data-plan-type');
  var email = reenableMembershipOverlay.getAttribute('data-email');
  var memberId = reenableMembershipOverlay.getAttribute('data-member-id');
  if (membershipReenablingInProgress === true) {
    return;
  }
  Membership.reenable(email, memberId, reenabledPlanType, handleMemebershipReenableResponse);
  membershipReenablingInProgress = true;
}

/**
 * Displays the reenable membership overaly
 */
exports.displayReenableOverlay = function () {
  if (initialized === false) {
    return false;
  }
  Overlay.display('reenableMembershipOverlay', 'overlay--reenable');
  return true;
};
exports.init = function () {
  var updateCCButton = document.getElementById('updateCreditCard');
  var membershipReenabledContinueButton = document.getElementById('membershipReenabledContinue');
  var downloadButtonsForCancelledUser = document.querySelectorAll('[data-must-reenable]');
  if (updateCCButton === null || membershipReenabledContinueButton === null) {
    return;
  }
  reenableMembershipOverlay = document.getElementById('reenableMembershipOverlay');
  if (null === reenableMembershipOverlay) {
    return;
  }
  var trialLimitBannerC2a = document.getElementById('reenableMessageBannerC2a');
  if (trialLimitBannerC2a !== null) {
    trialLimitBannerC2a.addEventListener('click', function (e) {
      e.preventDefault();
      exports.displayReenableOverlay();
    });
  }
  var reenableButtons = reenableMembershipOverlay.querySelectorAll('.reenable-membership__c2a');
  for (var i = 0; i < reenableButtons.length; i++) {
    var button = reenableButtons[i];
    button.addEventListener('click', handleReenableButtonClicked);
  }
  updateCCButton.addEventListener('click', function () {
    Url.redirectTo('/member/update-cc?plan=' + reenabledPlanType);
  });
  membershipReenabledContinueButton.addEventListener('click', Overlay.hide);
  if (downloadButtonsForCancelledUser) {
    for (var j = 0; j < downloadButtonsForCancelledUser.length; j++) {
      var forbiddenButton = downloadButtonsForCancelledUser[j];
      forbiddenButton.addEventListener('click', function (event) {
        event.preventDefault();
        exports.displayReenableOverlay();
      });
    }
  }
  initialized = true;
};

/***/ }),

/***/ "pTIX":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

var Ajax = __webpack_require__("khm0");
var document = __webpack_require__("ofPo");
var window = __webpack_require__("4uwT");
var inputValues;
var searchDataList;
var numberOfSuggestions;
var searchTimeout;
var searchIndex;
var searchContainer = document.querySelectorAll('.search');
var searchBtnMobile = document.getElementById('searchBtnMobile');
var searchBtnDesktop = document.getElementById('searchBtnDesktop');
var searchInputMobile = document.getElementById('siteSearchMobile');
var trackingConfig = document.getElementById('trackingConfig');
var currentSite = trackingConfig && trackingConfig.getAttribute('data-sitename');
var searchInputDesktop = document.getElementById('siteSearchDesktop');
var searchInputs = document.querySelectorAll('.search__input');
var activePage = searchBtnDesktop && searchBtnDesktop.getAttribute('data-search-type');
var searchCMobile = document.querySelector('.search--is-mobile');
var closeBtn = document.getElementById('searchClose');
var datalists = document.querySelectorAll('.search__datalist');
var activeDatalist = document.getElementById('jsonDataListDesktop');
var mobileSelect = document.getElementById('searchSiteMobile');
var desktopSelect = document.getElementById('searchSiteDesktop');
var allSelects = document.querySelectorAll('.search__site');
var searchInitialized = false;
var hoveringDatalist = false;
var keysPressed = false;
var navigating = false;
var typingTimeOffset = 800;
var site;
var sitePathNames = {
  'badoinkvr': {
    'videoPath': 'vrpornvideos',
    'girlPath': 'vr-pornstars'
  },
  '18vr': {
    'videoPath': 'vrpornvideos',
    'girlPath': 'vrgirls'
  },
  'babevr': {
    'videoPath': 'vrpornvideos',
    'girlPath': 'vrbabes'
  },
  'vrcosplayx': {
    'videoPath': 'cosplaypornvideos',
    'girlPath': 'cosplaygirls'
  },
  'realvr': {
    'videoPath': 'vrpornvideos',
    'girlPath': 'pornstars'
  }
};
function searchSiteSwitch() {
  if (window.matchMedia('(max-width: 1024px)').matches) {
    site = mobileSelect.value;
  } else {
    site = desktopSelect.value;
  }
}
function searchSiteSwitchResize() {
  searchSiteSwitch();
  window.addEventListener('resize', function () {
    searchSiteSwitch();
  });
}
function multisiteSearch() {
  searchSiteSwitchResize();
}
function navSearch() {
  searchInputs.forEach(function (e) {
    if (e.value !== '') {
      e.parentElement.classList.add('writing');
    }
  });
  searchInputs.forEach(function (e) {
    e.addEventListener('focus', function () {
      e.parentElement.classList.add('is-focused');
    });
  });
  searchInputs.forEach(function (e) {
    e.addEventListener('blur', function () {
      e.parentElement.classList.remove('is-focused');
    });
  });
  searchInputs.forEach(function (e) {
    e.addEventListener('input', function () {
      multisiteSearch();
      if (e.value === '') {
        searchContainer.forEach(function (e) {
          e.classList.remove('writing');
        });
        searchInitialized = false;
        datalists.forEach(function (el) {
          el.classList.remove('search__datalist--is-active');
        });
      } else {
        searchContainer.forEach(function (e) {
          e.classList.add('writing');
        });
        searchInitialized = true;
      }
      searchInputMobile.value = this.value;
      searchInputDesktop.value = this.value;
    });
  });
  searchBtnMobile.addEventListener('click', function () {
    searchCMobile.classList.add('is-active');
    searchInputMobile.focus();
  });
  if (activePage !== sitePathNames[currentSite].girlPath) {
    activePage = sitePathNames[currentSite].videoPath;
  }
  function searchRedirect() {
    if (inputValues === '' || inputValues === undefined) {
      return;
    } else {
      multisiteSearch();
      searchTermRegister(encodeURIComponent(inputValues));
      var url = '/' + activePage + '/search/' + encodeURIComponent(inputValues);
      if (site === 'all') {
        url += '?all=1';
      }
      window.location = url;
    }
  }
  function searchTermRegister(searchTerm) {
    var url = '/search/' + searchTerm;
    if (site === 'all') {
      url += '?all=1';
    }
    Ajax.get(url).setHeader('X-Requested-With', 'XMLHttpRequest').send();
  }
  searchInputs.forEach(function (e) {
    var inputSelected = false;
    e.addEventListener('keypress', function (event) {
      // Enter key
      if (event.keyCode === 13) {
        inputValues = e.value;
        searchRedirect();
      }
    });
    e.addEventListener('keyup', function () {
      if (e.value === '') {
        navigating = true;
      }
    });
    e.addEventListener('keydown', function (event) {
      //Arrows and Esc keys
      if (event.keyCode === 40 || event.keyCode === 38 || event.keyCode === 37 || event.keyCode === 39 || event.keyCode === 27) {
        keysPressed = true;
      }

      //Space key
      if (event.keyCode === 32 && e.value === '') {
        event.preventDefault();
      }
      if (event.keyCode === 32 && e.value !== '') {
        navigating = false;
      }

      //Delete key
      if (event.keyCode === 8 && e.value === '') {
        event.preventDefault();
      }
      if (event.keyCode === 8 && e.value !== '') {
        navigating = true;
      }

      //Esc key
      if (event.keyCode === 27) {
        navigating = false;
        searchIndex = -1;
      }

      //Delete key
      if (event.keyCode === 8 && e.value !== '' && navigating === true) {
        navigating = false;
      }
      if (event.keyCode === 8 && e.value.length <= 1) {
        navigating = true;
      } else if (inputSelected === true && event.keyCode === 8) {
        navigating = true;
        inputSelected = false;
      } else {
        navigating = false;
      }
    });
    e.addEventListener('select', function () {
      inputSelected = true;
      navigating = true;
    });
    e.addEventListener('input', function () {
      searchIndex = -1;
    });
  });
  searchBtnDesktop.addEventListener('click', function () {
    searchInputs.forEach(function (e) {
      inputValues = e.value;
    });
    searchRedirect();
  });
  dropdownRedirect();
  closer();
}
function autoComplete() {
  window.addEventListener('load', function () {
    searchInputDesktop.addEventListener('input', hinter);
    searchInputMobile.addEventListener('input', hinter);
  });
}
function attachEventListenersToSuggestions() {
  var clickedValue;
  document.querySelectorAll('.search__datalist__value').forEach(function (item) {
    item.addEventListener('click', function (event) {
      clickedValue = event.target.value;
      datalists.forEach(function (i) {
        i.classList.remove('search__datalist--is-active');
      });
      searchInputs.forEach(function (i) {
        i.value = clickedValue;
        i.focus();
      });
      inputValues = clickedValue;
      var url = '/' + activePage + '/search/' + encodeURIComponent(inputValues);
      if (site === 'all') {
        url += '?all=1';
      }

      //EncodeURL
      window.location = url;
    });
  });
}
function closer() {
  var bodyCloser = document.getElementById('pageLayout');
  bodyCloser.addEventListener('click', function () {
    navigating = false;
    datalists.forEach(function (el) {
      if (el.classList.contains('search__datalist--is-active')) {
        el.classList.remove('search__datalist--is-active');
      }
    });
  }, false);
  closeBtn.addEventListener('click', function () {
    searchCMobile.classList.remove('is-active');
    navigating = false;
  });
  window.addEventListener('resize', function () {
    navigating = false;
    datalists.forEach(function (i) {
      i.classList.remove('search__datalist--is-active');
    });
  });
}
function hinter(event) {
  clearTimeout(searchTimeout);
  inputValues = event.target.value;
  var resizeDatalistSwitch = function () {
    if (window.matchMedia('(max-width: 1024px)').matches) {
      searchDataList = document.getElementById('jsonDataListMobile');
      activeDatalist = searchDataList;
    } else {
      searchDataList = document.getElementById('jsonDataListDesktop');
      activeDatalist = searchDataList;
    }
  };
  resizeDatalistSwitch();
  window.addEventListener('resize', function () {
    resizeDatalistSwitch();
  });
  var searchBox = event.target,
    minCharacters = 1;
  if (searchBox.value.length < minCharacters && (keysPressed === true || navigating === true) && inputValues !== undefined) {
    return;
  } else {
    searchTimeout = setTimeout(function () {
      var url = '/search/autocomplete/' + encodeURIComponent(inputValues);
      if (site === 'all') {
        url += '?all=1';
      }
      Ajax.get(url).onSuccess(function (response) {
        var results = response.suggestions;
        numberOfSuggestions = results.length;
        searchDataList.innerHTML = '';
        results.forEach(function (item) {
          var option = document.createElement('div');
          option.classList.add('search__datalist__value');
          option.value = item;
          option.innerHTML = item;
          searchDataList.appendChild(option);
        });
        document.querySelectorAll('.search__datalist').forEach(function (item) {
          if (results.length > 0 && searchInitialized === true) {
            item.classList.add('search__datalist--is-active');
          } else {
            item.classList.remove('search__datalist--is-active');
          }
        });
        attachEventListenersToSuggestions();
      }).send();
    }, typingTimeOffset);
  }
}
function listKeyNavigation() {
  var selectedDatalistItem;
  searchIndex = -1;
  document.addEventListener('keydown', function (event) {
    if (!searchInitialized) {
      return;
    }
    var suggestions = numberOfSuggestions - 1;
    if (event.which === 40 || event.which === 38) {
      navigating = true;
      document.querySelectorAll('.search__datalist__value').forEach(function (e) {
        e.classList.remove('is-active');
      });
    }
    if (event.which === 40) {
      //Down key
      if (selectedDatalistItem) {
        searchIndex++;
        removeClassDatalistItem(selectedDatalistItem, 'is-active');
        var next = activeDatalist.querySelectorAll('.search__datalist__value')[searchIndex];
        if (typeof next !== undefined && searchIndex <= suggestions) {
          selectedDatalistItem = next;
        } else {
          searchIndex = 0;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[0];
        }
        addClassDatalistItem(selectedDatalistItem, 'is-active');
      } else {
        if (!hoveringDatalist) {
          searchIndex = 0;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[0];
        } else {
          searchIndex++;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[searchIndex];
        }
        addClassDatalistItem(selectedDatalistItem, 'is-active');
      }
    } else if (event.which === 38) {
      //Up key
      if (selectedDatalistItem) {
        removeClassDatalistItem(selectedDatalistItem, 'is-active');
        searchIndex--;
        next = activeDatalist.querySelectorAll('.search__datalist__value')[searchIndex];
        if (typeof next !== undefined && searchIndex >= 0) {
          selectedDatalistItem = next;
        } else {
          searchIndex = suggestions;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[suggestions];
        }
        addClassDatalistItem(selectedDatalistItem, 'is-active');
      } else {
        if (!hoveringDatalist) {
          searchIndex = suggestions;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[suggestions];
        } else {
          searchIndex--;
          selectedDatalistItem = activeDatalist.querySelectorAll('.search__datalist__value')[searchIndex];
        }
        addClassDatalistItem(selectedDatalistItem, 'is-active');
      }
    }
    if (event.which === 40 || event.which === 38) {
      navigating = true;
      searchInputs.forEach(function (e) {
        if (selectedDatalistItem) {
          e.value = selectedDatalistItem.value;
        }
      });
    }
  }, false);
  function removeClassDatalistItem(el, className) {
    el.classList.remove(className);
  }
  function addClassDatalistItem(el, className) {
    if (el.classList) {
      el.classList.add(className);
    } else {
      el.className += ' ' + className;
    }
  }
  activeDatalist.onmouseover = function (event) {
    hoveringDatalist = true;
    if (event.target !== document.querySelectorAll('.search__datalist__value')) {
      searchIndex = Array.prototype.indexOf.call(event.target.parentElement.children, event.target);
    }
  };
  activeDatalist.onmousemove = function (event) {
    hoveringDatalist = true;
    if (event.target.classList.contains('search__datalist__value')) {
      searchInputs.forEach(function (el) {
        inputValues = el.value;
        el.value = event.target.value;
      });
    }
    if (event.target.classList.contains('is-active')) {
      document.querySelectorAll('.search__datalist__value.is-active').forEach(function (e) {
        e.classList.remove('is-active');
      });
    }
    if (!event.target.classList.contains('is-active')) {
      event.target.classList.add('is-active');
    }
  };
  activeDatalist.onmouseout = function (event) {
    hoveringDatalist = false;
    searchIndex = -1;
    document.querySelectorAll('.search__datalist__value').forEach(function (e) {
      e.classList.remove('is-active');
    });
    if (event.target.classList.contains('search__input')) {
      return;
    }
  };
  activeDatalist.onmouseenter = function () {
    document.querySelectorAll('.search__datalist__value').forEach(function (el) {
      el.classList.remove('is-active');
    });
  };
}
function dropdownRedirect() {
  allSelects.forEach(function (e) {
    e.addEventListener('change', function () {
      inputValues = searchInputMobile.value;
      if (inputValues === '') {
        return;
      }
      site = e.value;
      var url = '/' + activePage + '/search/' + encodeURIComponent(inputValues);
      if (site === 'all') {
        url += '?all=1';
      }
      window.location = url;
    });
  });
}

/**
 * Initializes search
 */
exports.init = function () {
  if (searchInputDesktop && searchInputMobile) {
    navSearch();
    listKeyNavigation();
    autoComplete();
  }
};

/***/ }),

/***/ "ZEy8":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Datadog = __webpack_require__("aEL6");
var Offers = __webpack_require__("U8d1");
var Membership = __webpack_require__("0ydy");
var SiteKeyToDisplayNameMap = __webpack_require__("FEq4");
var c2aButton;
var genericOfferStatusMessage;
var originalC2aMessage;
var siteKey;
var siteDisplayName;
function offerAccepted(event) {
  var mustRunInBackground = this.getAttribute('data-in-background') === 'true';
  genericOfferStatusMessage.innerText = '';
  genericOfferStatusMessage.classList.add('is-hidden');
  if (mustRunInBackground) {
    event.preventDefault();
    c2aButton.removeEventListener('click', offerAccepted);
    c2aButton.addEventListener('click', lockUpsellbutton);
    handleUpsellProcessingStatus();
    var theEndpoint = this.getAttribute('href');
    Membership.upsellInBackgroundViaURL(theEndpoint, onBackgroundUpsellCompleted);
  } else {
    // straight attempt via go link in new tab. Not handled by JS.
    trackSuccessfulSubscription();
    Membership.updateProducts();
    Offers.hide();
  }
}
function lockUpsellbutton(event) {
  event.preventDefault();
}
function onBackgroundUpsellCompleted(success, response) {
  c2aButton.removeEventListener('click', lockUpsellbutton);
  if (success) {
    handleUpsellSuccessfulStatus(response.ssoLink);
    trackSuccessfulSubscription();
    Membership.updateProducts();
  } else {
    // add the error message
    handleUpsellErrorStatus(response.message);
  }
}
function handleUpsellProcessingStatus() {
  c2aButton.innerText = 'Processing...';
}
function handleUpsellSuccessfulStatus(ssoLink) {
  c2aButton.innerText = 'Enter ' + siteDisplayName;
  c2aButton.href = ssoLink;
  c2aButton.target = '_blank';
  c2aButton.addEventListener('click', function () {
    Offers.hide();
  });
  genericOfferStatusMessage.innerText = siteDisplayName + ' Purchase Successful!';
  genericOfferStatusMessage.classList.remove('is-hidden');
  genericOfferStatusMessage.classList.remove('callout--error');
  genericOfferStatusMessage.classList.add('callout--success');
  c2aButton.setAttribute('data-purchase-completed', 'true');
  genericOfferStatusMessage.setAttribute('data-purchase-completed', 'true');
}
function handleUpsellErrorStatus(message) {
  c2aButton.innerText = 'Close';
  var finalMessage = siteDisplayName + ' Purchase Failed!';
  if (typeof message === 'string') {
    finalMessage = finalMessage + '\n' + message;
  }
  genericOfferStatusMessage.innerText = finalMessage;
  genericOfferStatusMessage.classList.remove('is-hidden');
  genericOfferStatusMessage.classList.add('callout--error');
  genericOfferStatusMessage.classList.remove('callout--success');
  c2aButton.addEventListener('click', restoreOriginalEventListener);
}
function restoreOriginalEventListener(event) {
  event.preventDefault();
  Offers.hide();
  c2aButton.addEventListener('click', offerAccepted);
  c2aButton.removeEventListener('click', restoreOriginalEventListener);
  c2aButton.innerText = originalC2aMessage;
  genericOfferStatusMessage.innerText = '';
  genericOfferStatusMessage.classList.add('is-hidden');
}
function trackSuccessfulSubscription() {
  Datadog.increase('popup_upsell', {
    type: siteKey,
    action: 'subscribed'
  });
}

/**
 * Initialize the module
 * @param {HTMLElement} offerElement The element containing the markup of the offer
 * @param {string} siteName The lowercase name of the site
 */
exports.init = function (offerElement, siteName) {
  c2aButton = offerElement.querySelector('[data-c2a]');
  if (c2aButton === null) {
    return;
  }
  siteKey = siteName;
  siteDisplayName = SiteKeyToDisplayNameMap.map[siteKey];
  genericOfferStatusMessage = offerElement.querySelector('#genericOfferStatusMessage');
  c2aButton.addEventListener('click', offerAccepted);
  originalC2aMessage = c2aButton.innerText.trim();
};
exports.show = function (trigger) {
  c2aButton.setAttribute('data-trigger', trigger);
  Datadog.increase('popup_upsell', {
    type: siteKey,
    action: 'displayed'
  });
};
exports.hide = function () {
  Datadog.increase('popup_upsell', {
    type: siteKey,
    action: 'dismissed'
  });
};

/***/ }),

/***/ "PNQ1":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Membership = __webpack_require__("0ydy");
var Overlay = __webpack_require__("7Sdh");
var Cookie = __webpack_require__("ebuU");
var Url = __webpack_require__("nHg3");
var document = __webpack_require__("ofPo");
var Datadog = __webpack_require__("aEL6");
var membershipUpgradeInProgress = false;
var initialized = false;
var upgradeMembershipButtons = [];
function setUpgradeButtonsText(text) {
  for (var i = 0; i < upgradeMembershipButtons.length; i++) {
    upgradeMembershipButtons[i].innerText = text;
  }
}
function handleMembershipUgradeResponse(errorOccured) {
  if (errorOccured !== true) {
    Overlay.display('membershipUpgradeSuccessOverlay');
    var headerMessage = document.querySelector('[data-header-message]');
    if (headerMessage !== null) {
      headerMessage.parentNode.removeChild(headerMessage);
    }
  } else {
    Overlay.display('paymentProcessingErrorOverlay');
  }
  setUpgradeButtonsText('Upgrade');
}
function upgradeButtonClicked() {
  setUpgradeButtonsText('Upgrading...');
  exports.upgradeMembership(handleMembershipUgradeResponse);
}
function displayTrialUserOverlay(event) {
  event.preventDefault();
  exports.displayUpgradeOverlay();
}

/**
 * Upgrades the membership of the user from trial to monthly
 *
 * @param function [callback] - Function to be called when upgrade process is done
 */
exports.upgradeMembership = function (callback) {
  if (membershipUpgradeInProgress === true) {
    return;
  }
  membershipUpgradeInProgress = true;
  Membership.upgrade(function (error, cardNeedsToBeUpdated) {
    membershipUpgradeInProgress = false;
    if (error !== undefined && cardNeedsToBeUpdated !== true) {
      Url.redirectTo('/error');
      return;
    } else if (error !== undefined && cardNeedsToBeUpdated === true) {
      if (typeof callback === 'function') {
        callback(true);
      }
      return;
    }
    if (typeof callback === 'function') {
      callback();
    }
  });
};

/**
 * Displays the membership upgrade overaly
 */
exports.displayUpgradeOverlay = function () {
  if (initialized === false) {
    return false;
  }
  Overlay.display('trialLimitReachedOverlay', 'trial-limit-reached-overlay');
  Datadog.increase('user_has_to_upgrade', {
    popup: 'trial-limit-reached',
    action: 'displayed'
  });
  return true;
};

/**
 * Feature/VSV-656 Instant upgrade on login
 */
function instantUpgradeOnLogin(shouldUserSeeInstantUpgrade, currentLoginCount) {
  var offerCookieName = 'showFullScreenUpgradeV2';
  if (['false', 'never'].indexOf(Cookie.get(offerCookieName)) !== -1) {
    return;
  }
  if (shouldUserSeeInstantUpgrade === true && currentLoginCount > 0) {
    initialized = true;
    exports.displayUpgradeOverlay();
    var expirationDate = new Date();

    //Set the offer to show every hour if upgradeTestOnLoginV2 flag is true
    expirationDate.setHours(expirationDate.getHours() + 1);
    Cookie.set(offerCookieName, 'false', expirationDate);
  }
}

/**
 * Initializes the trial user module
 */
exports.init = function (shouldUserSeeInstantUpgrade, currentLoginCount) {
  var limitReachedOverlay = document.getElementById('trialLimitReachedOverlay');
  var upgradedButton = document.getElementById('membershipUpgradedContinue');
  var updateCCButton = document.getElementById('updateCreditCard');
  var videoPreviewFakeContainer = document.getElementById('videoPreviewFakeContainer');
  shouldUserSeeInstantUpgrade = shouldUserSeeInstantUpgrade !== undefined ? shouldUserSeeInstantUpgrade : false;
  currentLoginCount = currentLoginCount !== undefined ? parseInt(currentLoginCount, 10) : -1;
  if (videoPreviewFakeContainer !== null) {
    videoPreviewFakeContainer.addEventListener('click', displayTrialUserOverlay);
  }
  if (limitReachedOverlay === null || upgradedButton === null || updateCCButton === null) {
    return false;
  }
  upgradeMembershipButtons = limitReachedOverlay.querySelectorAll('[data-upgrade-button]');
  if (upgradeMembershipButtons.length === 0) {
    return false;
  }
  for (var i = 0; i < upgradeMembershipButtons.length; i++) {
    upgradeMembershipButtons[i].addEventListener('click', upgradeButtonClicked);
  }
  upgradedButton.addEventListener('click', function () {
    Overlay.hide();
    document.location.reload(true);
  });
  updateCCButton.addEventListener('click', function () {
    Url.redirectTo('/member/update-cc-upgrade');
  });
  var trialLimitBannerC2a = document.getElementById('trialLimitMessageBannerC2a');
  if (trialLimitBannerC2a !== null) {
    trialLimitBannerC2a.addEventListener('click', function (e) {
      e.preventDefault();
      exports.displayUpgradeOverlay();
    });
  }
  var trialUpgradeBannerC2a = document.getElementById('trialUpgradeMessageBannerC2a');
  if (trialUpgradeBannerC2a !== null) {
    trialUpgradeBannerC2a.addEventListener('click', function (e) {
      e.preventDefault();
      exports.displayUpgradeOverlay();
    });
  }
  var trialUpgradePopUpC2a = document.getElementById('trialUpgradePopUp');
  if (trialUpgradePopUpC2a !== null) {
    trialUpgradePopUpC2a.addEventListener('click', function (e) {
      e.preventDefault();
      exports.displayUpgradeOverlay();
    });
  }
  instantUpgradeOnLogin(shouldUserSeeInstantUpgrade, currentLoginCount);
  initialized = true;
  return true;
};

/***/ }),

/***/ "6K9W":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var Membership = __webpack_require__("0ydy");
var KeyboardNavigation = __webpack_require__("qjcf");
var SiteKeyToDisplayNameMap = __webpack_require__("FEq4");
var document = __webpack_require__("ofPo");
var upsellSisterSiteOneclickContainer;
var upsellSisterSiteOneclickC2a;
var upsellSisterSiteOneclickPrice;
var upsellSisterSiteOneclickDays;
var upsellSisterSiteOneclickPricePerDays;
var upsellSisterSiteOneclickDisplayed = false;
var upsellSisterSiteOneclickInitialized = false;
var confirmationNoticeRegularPlans;
var confirmationNoticeLifetimePlans;
var siteDisplayName;
var genericOfferStatusMessage;
var originalC2aMessage;
function initializeContainer(inBackground, siteKey) {
  upsellSisterSiteOneclickContainer = document.getElementById('upsellSisterSiteOneclickContainer');
  upsellSisterSiteOneclickC2a = document.getElementById('upsellSisterSiteOneclickC2a');
  upsellSisterSiteOneclickPrice = document.getElementById('upsellSisterSiteOneclickPrice');
  upsellSisterSiteOneclickDays = document.getElementById('upsellSisterSiteOneclickDays');
  upsellSisterSiteOneclickPricePerDays = document.getElementById('upsellSisterSiteOneclickPricePerDays');
  confirmationNoticeRegularPlans = document.getElementById('confirmationNoticeRegularPlans');
  confirmationNoticeLifetimePlans = document.getElementById('confirmationNoticeLifetimePlans');
  var closeButton = document.getElementById('upsellSisterSiteOneclickClose');
  closeButton.addEventListener('click', exports.hide);
  upsellSisterSiteOneclickInitialized = true;
  if (inBackground) {
    siteDisplayName = SiteKeyToDisplayNameMap.map[siteKey];
    originalC2aMessage = upsellSisterSiteOneclickC2a.innerText.trim();
    genericOfferStatusMessage = document.querySelector('#genericOfferStatusMessage');
    initializeInBackgroundOneClickEvents();
  }
}
function keyPressed(e) {
  if (e.keyCode === 27) {
    exports.hide();
  }
}

/**
 * Displays a oneclick
 *
 */
exports.show = function (planUrl, planPrice, planDays, planRecurrentPrice, inBackground, siteKey) {
  if (upsellSisterSiteOneclickInitialized === false) {
    initializeContainer(inBackground, siteKey);
  }
  if (upsellSisterSiteOneclickDisplayed === true) {
    exports.hide();
  } else {
    KeyboardNavigation.restrictTabbingToContainer(upsellSisterSiteOneclickContainer);
    document.addEventListener('keydown', keyPressed);
  }
  var thePrice = parseInt(planPrice, 10);
  if (isNaN(thePrice) === false && thePrice >= 200) {
    confirmationNoticeRegularPlans.classList.add('is-hidden');
    confirmationNoticeLifetimePlans.classList.remove('is-hidden');
  } else {
    confirmationNoticeRegularPlans.classList.remove('is-hidden');
    confirmationNoticeLifetimePlans.classList.add('is-hidden');
  }
  upsellSisterSiteOneclickC2a.href = planUrl;
  upsellSisterSiteOneclickPrice.innerHTML = planPrice;
  upsellSisterSiteOneclickDays.innerHTML = planDays;
  upsellSisterSiteOneclickPricePerDays.innerHTML = planRecurrentPrice;
  upsellSisterSiteOneclickContainer.classList.remove('is-hidden');
  document.body.classList.add('overlay-is-displayed');
  upsellSisterSiteOneclickDisplayed = true;
};

/**
 * Hides the currently displayed oneclick
 *
 * @return {boolean}
 */
exports.hide = function () {
  if (upsellSisterSiteOneclickDisplayed === false) {
    return false;
  }
  document.removeEventListener('keydown', keyPressed);
  KeyboardNavigation.liftTabbingRestrictions();
  document.body.classList.remove('overlay-is-displayed');
  upsellSisterSiteOneclickContainer.classList.add('is-hidden');
  upsellSisterSiteOneclickContainer.classList.add('confirmation--loading');
  upsellSisterSiteOneclickDisplayed = false;
  return true;
};

/**
 * Set upsell sister site info
 *
 */
exports.setUpsellSisterSiteInfo = function (elem) {
  var upsellUrl = elem.getAttribute('data-upsell-url');
  var upsellInitialAmount = elem.getAttribute('data-upsell-initial-amount');
  var upsellInitialPeriod = elem.getAttribute('data-upsell-initial-period');
  var upsellRecurringAmount = elem.getAttribute('data-upsell-recurring-amount');
  var upsellMustRunInBackground = elem.getAttribute('data-upsell-must-run-in-bg');
  var upsellCurrentSite = elem.getAttribute('data-current-site-name');
  exports.show(upsellUrl, upsellInitialAmount, upsellInitialPeriod, upsellRecurringAmount, upsellMustRunInBackground, upsellCurrentSite);
};
function initializeInBackgroundOneClickEvents() {
  upsellSisterSiteOneclickC2a.addEventListener('click', acceptOneClick);
}
function acceptOneClick(event) {
  event.preventDefault();
  this.removeEventListener('click', acceptOneClick);
  this.innerText = 'Processing...';
  genericOfferStatusMessage.innerText = '';
  genericOfferStatusMessage.classList.add('is-hidden');
  var theEndpoint = this.getAttribute('href');
  Membership.upsellInBackgroundViaURL(theEndpoint, onBackgroundUpsellCompleted);
}
function onBackgroundUpsellCompleted(success, response) {
  if (success) {
    handleUpsellSuccessfulStatus(response.ssoLink);
    Membership.updateProducts();
  } else {
    // add the error message
    handleUpsellErrorStatus(response.message);
  }
}
function handleUpsellSuccessfulStatus(ssoLink) {
  upsellSisterSiteOneclickC2a.innerText = 'Enter ' + siteDisplayName;
  upsellSisterSiteOneclickC2a.href = ssoLink;
  upsellSisterSiteOneclickC2a.addEventListener('click', function () {
    exports.hide();
  });
  genericOfferStatusMessage.innerText = siteDisplayName + ' Purchase Successful!';
  genericOfferStatusMessage.setAttribute('data-purchase-completed', 'true');
  genericOfferStatusMessage.classList.remove('is-hidden');
  genericOfferStatusMessage.classList.remove('callout--error');
  genericOfferStatusMessage.classList.add('callout--success');
}
function handleUpsellErrorStatus(message) {
  upsellSisterSiteOneclickC2a.innerText = 'Close';
  var finalMessage = siteDisplayName + ' Purchase Failed!';
  if (typeof message === 'string') {
    finalMessage = finalMessage + '\n' + message;
  }
  genericOfferStatusMessage.innerText = finalMessage;
  genericOfferStatusMessage.classList.remove('is-hidden');
  genericOfferStatusMessage.classList.add('callout--error');
  genericOfferStatusMessage.classList.remove('callout--success');
  upsellSisterSiteOneclickC2a.addEventListener('click', restoreOriginalEventListener);
}
function restoreOriginalEventListener(event) {
  event.preventDefault();
  exports.hide();
  upsellSisterSiteOneclickC2a.addEventListener('click', acceptOneClick);
  upsellSisterSiteOneclickC2a.removeEventListener('click', restoreOriginalEventListener);
  upsellSisterSiteOneclickC2a.innerText = originalC2aMessage;
  genericOfferStatusMessage.innerText = '';
  genericOfferStatusMessage.classList.add('is-hidden');
}

/***/ }),

/***/ "VJs5":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var playingVideoTrailer = null;
const eventListenerCompatibility = __webpack_require__("EFmU");
function onMouseEnter(previewableVideo) {
  if (!previewableVideo) {
    return;
  }
  if (playingVideoTrailer) {
    playingVideoTrailer.classList.remove('video-card__video-preview--revealed');
  }
  previewableVideo.classList.add('video-card__video-preview--revealed');
  playingVideoTrailer = previewableVideo;
  previewableVideo.pause();
  previewableVideo.play();
}
function onMouseLeave(previewableVideo) {
  if (!previewableVideo) {
    return;
  }
  previewableVideo.classList.remove('video-card__video-preview--revealed');
  playingVideoTrailer = null;
}
function onTouchStart(previewableVideo) {
  if (!previewableVideo) {
    return;
  }
  if (playingVideoTrailer !== previewableVideo) {
    if (playingVideoTrailer) {
      playingVideoTrailer.classList.remove('video-card__video-preview--revealed');
    }
    previewableVideo.classList.add('video-card__video-preview--revealed');
    playingVideoTrailer = previewableVideo;
    previewableVideo.pause();
    previewableVideo.play();
  }
}
function transitionend(previewableVideo) {
  if (!previewableVideo) {
    return;
  }
  if (!previewableVideo.classList.contains('video-card__video-preview--revealed')) {
    previewableVideo.load();
  }
}
function attachEventListenerToVideoElement(previewableVideo, isPassive) {
  //desktop event listeners
  previewableVideo.addEventListener('mouseenter', onMouseEnter.bind(this, previewableVideo));
  previewableVideo.addEventListener('mouseleave', onMouseLeave.bind(this, previewableVideo));
  //end of desktop event listeners

  //mobile event listeners
  previewableVideo.addEventListener('touchstart', onTouchStart.bind(this, previewableVideo), isPassive);
  // end of mobile event listeners

  //wait until the video has finished fading out before stopping playback
  previewableVideo.addEventListener('transitionend', transitionend.bind(this, previewableVideo));
}
exports.init = function () {
  var videoCardsWithPreview = document.querySelectorAll('.video-card__video-preview');
  if (videoCardsWithPreview.length === 0) {
    return;
  }
  const isPassive = eventListenerCompatibility.isPassive();
  videoCardsWithPreview.forEach(function (previewableVideo) {
    previewableVideo.onerror = function () {
      var sceneId = previewableVideo.getAttribute('data-video-preview-scene-id');
      var videoCardForThisvideoPreview = document.querySelector('[data-video-card-scene-id="' + sceneId + '"]');
      if (videoCardForThisvideoPreview) {
        videoCardForThisvideoPreview.classList.remove('video-card--with-video-preview');
      }
      previewableVideo.remove();
    };
    window.setTimeout(function () {
      // waiting 2 seconds to give time to the onerror event to be fired
      // in case of something went wrong with the video url
      attachEventListenerToVideoElement(previewableVideo, isPassive);
    }, 1000);
  });
};

/***/ }),

/***/ "khm0":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var window = __webpack_require__("4uwT");
var AjaxModule;
AjaxModule = function (url, httpMethod) {
  var ajaxModule = this,
    xhr = new window.XMLHttpRequest(),
    successCallback = function () {},
    errorCallback = function () {},
    alwaysCallback = function () {},
    requestStartTime,
    requestEndTime;
  function objectToFormData(obj, prefix) {
    var str = [],
      objKeys = Object.keys(obj),
      keyValueStr,
      objKey,
      value,
      param,
      i;
    for (i = 0; i < objKeys.length; i++) {
      objKey = objKeys[i];
      param = prefix ? prefix + '[' + objKey + ']' : objKey;
      value = obj[objKey];
      if (typeof value === 'object') {
        keyValueStr = objectToFormData(value, param);
      } else {
        keyValueStr = param + '=' + window.encodeURIComponent(value);
      }
      str.push(keyValueStr);
    }
    return str.join('&');
  }
  function getRequestInfo() {
    return {
      statusCode: xhr.status,
      statusText: xhr.statusText,
      url: url,
      method: httpMethod,
      duration: requestEndTime - requestStartTime
    };
  }
  function getResponse() {
    var responseIsJSON = xhr.getResponseHeader('content-type') && xhr.getResponseHeader('content-type').indexOf('application/json') === 0;
    if (responseIsJSON === false && xhr.response === null) {
      return '';
    }
    if (responseIsJSON === true && xhr.response === null) {
      return {};
    }
    if (responseIsJSON === true) {
      try {
        return window.JSON.parse(xhr.response);
      } catch (e) {
        throw new Error('Ajax call: response expected to be valid JSON');
      }
    }
    return xhr.response;
  }
  function readyStateChangeHandler() {
    var requestInfo, response;
    if (xhr.readyState !== 4) {
      return;
    }
    requestEndTime = window.Date.now();
    requestInfo = getRequestInfo();
    response = getResponse();
    if (xhr.status >= 200 && xhr.status < 300) {
      successCallback(response, requestInfo);
      alwaysCallback(response, requestInfo);
      return;
    }
    errorCallback(response, requestInfo);
    alwaysCallback(response, requestInfo);
  }
  function sendRequest(data) {
    requestStartTime = window.Date.now();
    xhr.send(data);
  }
  xhr.open(httpMethod, url);
  xhr.onreadystatechange = readyStateChangeHandler;
  ajaxModule.setHeader = function (header, value) {
    xhr.setRequestHeader(header, value);
    return ajaxModule;
  };
  ajaxModule.setTimeout = function (milliseconds) {
    xhr.timeout = milliseconds;
    return ajaxModule;
  };
  ajaxModule.onSuccess = function (callback) {
    successCallback = callback;
    return ajaxModule;
  };
  ajaxModule.onError = function (callback) {
    errorCallback = callback;
    return ajaxModule;
  };
  ajaxModule.onTimeout = function (callback) {
    xhr.ontimeout = callback;
    return ajaxModule;
  };
  ajaxModule.always = function (callback) {
    alwaysCallback = callback;
    return ajaxModule;
  };
  ajaxModule.send = function (data) {
    sendRequest(data);
  };
  ajaxModule.sendJSON = function (data) {
    if (typeof data === 'object' && data !== null) {
      data = window.JSON.stringify(data);
    }
    if (typeof data !== 'string') {
      throw new Error('Ajax call: data provided is not JSON');
    }
    xhr.setRequestHeader('Content-Type', 'application/json');
    sendRequest(data);
  };
  ajaxModule.sendForm = function (data) {
    if (typeof data === 'object') {
      data = objectToFormData(data);
    }
    xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    sendRequest(data);
  };
};
exports.get = function (url) {
  return new AjaxModule(url, 'GET');
};
exports.post = function (url) {
  return new AjaxModule(url, 'POST');
};
exports.put = function (url) {
  return new AjaxModule(url, 'PUT');
};
exports.del = function (url) {
  return new AjaxModule(url, 'DELETE');
};

/***/ }),

/***/ "ebuU":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var window = __webpack_require__("4uwT");

/**
 * Returns all the cookies JS has access to
 *
 * @return {object}
 */
exports.getAll = function () {
  var cookies = {};
  if (document.cookie.length === 0) {
    return cookies;
  }
  var pairs = document.cookie.split(';');
  var pair;
  var i;
  for (i = 0; i < pairs.length; i++) {
    pair = pairs[i].split('=');
    cookies[pair[0].trim()] = window.unescape(pair[1].trim());
  }
  return cookies;
};

/**
 * Returns the value of a cookie
 *
 * @param {string} cookieName
 *
 * @return {mixed}
 */
exports.get = function (cookieName) {
  var cookies = exports.getAll();
  return cookies[cookieName];
};

/**
 * Sets a cookie
 *
 * @param {string} cookieName - The name of the cookie
 * @param {string|number|boolean} [value] - The value of the cookie
 * @param {date} [expirationDate] - The date the cookie will expire
 *
 * @return {boolean}
 */
exports.set = function (cookieName, value, expirationDate) {
  if (typeof cookieName !== 'string' || typeof value === 'object' || typeof value === 'function') {
    return false;
  }
  if (value === undefined) {
    value = true;
  }
  if (expirationDate === undefined) {
    expirationDate = new Date();
    expirationDate.setFullYear(expirationDate.getFullYear() + 1);
  }
  var domain = window.location.hostname;
  if (window.location.hostname.split('.').length !== 4) {
    // Not great check for IP
    domain = '.' + domain;
  }
  document.cookie = cookieName + '=' + value + ';expires=' + expirationDate.toGMTString() + ';path=/;domain=' + domain + ';';
  return true;
};

/***/ }),

/***/ "EFmU":
/***/ ((__unused_webpack_module, exports) => {

"use strict";


/**
 * Returns a boolean depending on the compatibility with the object instead of a boolean in the third parameter of a event listener
 *
 * @return {boolean}
 */
function isPassiveSupported() {
  let passiveSupported = false;
  try {
    const options = {
      get passive() {
        passiveSupported = true;
        return false;
      }
    };
    window.addEventListener('test', null, options);
    window.removeEventListener('test', null, options);
  } catch (err) {
    passiveSupported = false;
  }
  return passiveSupported;
}
exports.isPassiveAndHasCapture = value => {
  return isPassiveSupported() ? {
    capture: value,
    passive: true
  } : value;
};
exports.isPassive = () => {
  return isPassiveSupported() ? {
    passive: true
  } : false;
};

/***/ }),

/***/ "FEq4":
/***/ ((__unused_webpack_module, exports) => {

exports.map = {
  'badoinkvr': 'BaDoinkVR',
  'vrcosplayx': 'VRCosplayX',
  '18vr': '18VR',
  'babevr': 'BabeVR',
  'realvr': 'RealVR',
  'babe': 'BabeVR',
  'cosplay': 'VRCosplayX',
  'teen': '18VR'
};

/***/ }),

/***/ "OHGQ":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var document = __webpack_require__("ofPo");
var window = __webpack_require__("4uwT");
function easeInOutQuad(t, b, c, d) {
  t /= d / 2;
  if (t < 1) {
    return c / 2 * t * t + b;
  }
  t--;
  return -c / 2 * (t * (t - 2) - 1) + b;
}
var jumper = function jumper() {
  var element; // element to scroll to (node)
  var start; // where scroll starts (px)
  var stop; // where scroll stops (px)
  var offset; // adjustment from the stop position (px)
  var easing; // easing function (function)
  var a11y; // accessibility support flag (boolean)
  var distance; // distance of scroll (px)
  var duration; // scroll duration (ms)
  var timeStart; // time scroll started (ms)
  var timeElapsed; // time spent scrolling thus far (ms)
  var next; // next scroll position (px)
  var callback; // to call when done scrolling (function)

  // scroll position helper
  function location() {
    return window.scrollY || window.pageYOffset;
  }

  // element offset helper
  function top(element) {
    return element.getBoundingClientRect().top + start;
  }
  function loop(timeCurrent) {
    // store time scroll started, if not started already
    if (!timeStart) {
      timeStart = timeCurrent;
    }

    // determine time spent scrolling so far
    timeElapsed = timeCurrent - timeStart;

    // calculate next scroll position
    next = easing(timeElapsed, start, distance, duration);

    // scroll to it
    window.scrollTo(0, next);

    // check progress
    timeElapsed < duration ? window.requestAnimationFrame(loop) : done();
  }
  function done() {
    // account for rAF time rounding inaccuracies
    window.scrollTo(0, start + distance);

    // if scrolling to an element, and accessibility is enabled
    if (element && a11y) {
      element.setAttribute('tabindex', '-1');
      element.focus();
    }

    // if it exists, fire the callback
    if (typeof callback === 'function') {
      callback();
    }

    // reset time for next jump
    timeStart = false;
  }

  // API
  function jump(target) {
    var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};

    // resolve options, or use defaults
    duration = options.duration || 1000;
    offset = options.offset || 0;
    callback = options.callback; // "undefined" is a suitable default, and won't be called
    easing = options.easing || easeInOutQuad;
    a11y = options.a11y || false;

    // cache starting position
    start = location();

    // resolve target
    switch (typeof target) {
      // scroll from current position
      case 'number':
        element = undefined; // no element to scroll to
        a11y = false; // make sure accessibility is off
        stop = start + target;
        break;

      // scroll to element (node)
      // bounding rect is relative to the viewport
      case 'object':
        element = target;
        stop = top(element);
        break;

      // scroll to element (selector)
      // bounding rect is relative to the viewport
      case 'string':
        element = document.querySelector(target);
        stop = top(element);
        break;
    }

    // resolve scroll distance, accounting for offset
    distance = stop - start + offset;

    // resolve duration
    switch (typeof options.duration) {
      // number in ms
      case 'number':
        duration = options.duration;
        break;

      // function passed the distance of the scroll
      case 'function':
        duration = options.duration(distance);
        break;
    }

    // start the loop
    window.requestAnimationFrame(loop);
  }

  // expose only the jump method
  return jump;
};
var jumpSingleton = jumper();
exports.scrollTo = jumpSingleton;

/**
 * Sets a function to be called when an element's contents scroll
 *
 * @param {HTMLElement} elem - The DOM element to listen for scroll
 * @param {function} callback - Function to be called on scroll
 * @param {number} [fallbackIntervalMs=250] - Interval (miliseconds) to fire updates in case requestAnimationFrame is not supported
 */
exports.onScroll = function (elem, callback, fallbackIntervalMs) {
  fallbackIntervalMs = fallbackIntervalMs || 250;
  function fireOnRequestAnimation() {
    var elementIsScrorlling = false;
    elem.addEventListener('scroll', function () {
      if (elementIsScrorlling === false) {
        window.requestAnimationFrame(function () {
          callback();
          elementIsScrorlling = false;
        });
      }
      elementIsScrorlling = true;
    });
  }
  function fireOnInterval() {
    var elementScrolled = false;
    function documentScrollCheckInterval() {
      if (elementScrolled === false) {
        return;
      }
      callback();
      elementScrolled = false;
    }
    elem.addEventListener('scroll', function () {
      elementScrolled = true;
    });
    window.setInterval(documentScrollCheckInterval, fallbackIntervalMs);
  }
  if (window.requestAnimationFrame !== undefined) {
    fireOnRequestAnimation();
  } else {
    fireOnInterval();
  }
};

/**
 * Scolls a container to the position of the child passed
 *
 * @param {HTMLElement} parent - The parent DOM element
 * @param {HTMLElement} targetChildElement - The child DOM element to scroll the parent to
 * @param {number} [duration] - The animation duration in ms
 */
exports.elementScrollTo = function (parent, targetChildElement, duration) {
  var timeStart;
  function loop(timeCurrent) {
    // store time scroll started, if not started already
    if (timeStart === undefined) {
      timeStart = timeCurrent;
    }

    // determine time spent scrolling so far
    var timeElapsed = timeCurrent - timeStart;

    // calculate next scroll position
    var next = easeInOutQuad(timeElapsed, start, distance, duration);

    // scroll to it
    parent.scrollTop = next;

    // check progress
    timeElapsed < duration ? window.requestAnimationFrame(loop) : done();
  }
  function done() {
    parent.scrollTop = start + distance;
    timeStart = undefined;
  }
  duration = duration || 0;
  var start = parent.scrollTop;
  var stop = targetChildElement.offsetTop;
  var distance = stop - start;
  window.requestAnimationFrame(loop);
};

/**
 * Sets a function to be called when an element's contents copied to clipboard
 *
 * @param {HTMLElement} elem - The DOM element to listen for copy to clipboard
 */
exports.copyToClipboard = function (elem) {
  if (navigator.userAgent.match(/iPad|iPhone|iPod/i)) {
    var range = document.createRange();
    range.selectNodeContents(elem);
    var selection = window.getSelection();
    selection.removeAllRanges();
    selection.addRange(range);
    elem.setSelectionRange(0, 999999);
  } else {
    elem.select();
  }
  document.execCommand('copy');
};

/***/ }),

/***/ "nHg3":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var window = __webpack_require__("4uwT");

/**
 * Redirects to the specified url
 *
 * @param {string} url
 *
 * @retun {boolean}
 */
exports.redirectTo = function (url) {
  if (typeof url !== 'string') {
    return false;
  }
  window.location = url;
  return true;
};

/**
 * Opens the specified url in a new window/tab
 *
 * @param {string} url
 *
 * @retun {boolean}
 */
exports.openNewWindow = function (url) {
  if (typeof url !== 'string') {
    return false;
  }
  window.open(url, '_blank');
  return true;
};

/**
 * Reload the current Url
 *
 * @return {boolean}
 */
exports.reload = function () {
  window.location.reload();
};

/**
 * Set params to the specified url
 *
 * @param {string} url
 * @param {object} newParams
 *
 * @retun {string}
 */
exports.setParams = function (url, newParams) {
  if (typeof url !== 'string') {
    return url;
  }
  if (typeof newParams !== 'object' || Object.keys(newParams).length === 0) {
    return url;
  }
  for (var key in newParams) {
    var urlParams = '';
    if (url.indexOf('?') !== -1) {
      urlParams = url.split('?')[1];
    }
    if (urlParams !== '') {
      var splitParams = urlParams.split('&');
      var paramExist = false;
      for (var i = 0; i < splitParams.length; i++) {
        var thePair = splitParams[i].split('=');
        if (thePair[0] === key) {
          url = url.replace(thePair[1], newParams[key]);
          paramExist = true;
        }
      }
      if (paramExist === false) {
        url = url + '&' + key + '=' + newParams[key];
      }
    } else {
      url = url + '?' + key + '=' + newParams[key];
    }
  }
  return url;
};

/**
 * create url agruments object
 *
 * @param {string} params
 *
 * @return {object}
 */
exports.extractValueKeyPair = function (params) {
  var newParams = {};
  if (typeof params !== 'string' || params === null || params === undefined) {
    return newParams;
  }
  var urlParameters = params.split(';;');
  for (var i = 0; i < urlParameters.length; i++) {
    if (urlParameters[i].indexOf('::') === -1) {
      return newParams;
    }
    var paramsPair = urlParameters[i].split('::');
    newParams[paramsPair[0]] = paramsPair[1];
  }
  return newParams;
};

// Expose whole module to global scope so methods can be intercepted by QA tests
window.url = exports;

/***/ }),

/***/ "ofPo":
/***/ ((module) => {

module.exports = window.document;

/***/ }),

/***/ "4uwT":
/***/ ((module) => {

module.exports = typeof window !== 'undefined' ? window : {};

/***/ }),

/***/ "ztH4":
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

"use strict";


var KeyboardNavigation = __webpack_require__("qjcf");
var Ui = __webpack_require__("OHGQ");
var Search = __webpack_require__("pTIX");
var Url = __webpack_require__("nHg3");
var document = __webpack_require__("ofPo");
var window = __webpack_require__("4uwT");
var Offers = __webpack_require__("U8d1");
var BannerCountdown = __webpack_require__("f2U1");
var LazyLoad = __webpack_require__("HToz");
var UpsellSisterSiteOneclick = __webpack_require__("6K9W");
var FavoritesToggle = __webpack_require__("sqKB");
var navigation;
var navigationHide;
var toggler;
var mobileNavigationUmbrellaProducts;
var floatingTogglerThreshold;

/**
 * Shows the navigation element
 *
 * @param {MouseEvent} e
 */
function showNavigation(e) {
  if (e !== undefined) {
    e.preventDefault();
  }
  navigation.classList.remove('navigation-container--hidden');
  navigation.setAttribute('tabindex', '0');
  navigation.focus();
  KeyboardNavigation.restrictTabbingToContainer(navigation);
  document.body.classList.add('overlay-is-displayed');
}

/**
 * Hides the navigation element
 *
 * @param {MouseEvent} e
 */
function hideNavigation(e) {
  e !== undefined ? e.preventDefault() : null;
  navigation.removeAttribute('tabindex');
  KeyboardNavigation.liftTabbingRestrictions();
  navigation.classList.add('navigation-container--is-hidding');
  window.setTimeout(function () {
    navigation.classList.add('navigation-container--hidden');
    navigation.classList.remove('navigation-container--is-hidding');
  }, 300); //TODO: add animation end listener instead of timeout

  document.body.classList.remove('overlay-is-displayed');
}
function calculateFloatingTogglerThreshold() {
  var headerMessage = document.querySelector('[data-header-message]');
  if (headerMessage === null) {
    floatingTogglerThreshold = 16;
  } else {
    floatingTogglerThreshold = headerMessage.offsetHeight;
  }
}

/**
 * Hides the mobile navigation if given media query matches
 *
 * @param {MediaQueryListEvent} mediaQueryList
 */
function windowResized(mediaQueryList) {
  if (mediaQueryList.matches === true) {
    hideNavigation();
  }
}

/**
 * Updates the visual style of the navigation toggler
 */
function updateNavigationMenuToggler() {
  var scrollPosition = window.pageYOffset;
  if (scrollPosition > floatingTogglerThreshold) {
    toggler.classList.add('navigation-menu-toggler--float');
  } else {
    toggler.classList.remove('navigation-menu-toggler--float');
  }
}

/**
 *
 * @param event | click event
 */
function showOffer(event) {
  event.preventDefault();
  var productName = event.target.getAttribute('data-product-name');
  var trigger = event.target.getAttribute('data-trigger');
  if (productName) {
    Offers.show(productName, trigger);
  }
  return;
}
function onNetworkProductSelected() {
  var index = this.selectedIndex;
  var selectedOption = this.options[index];
  var productName = selectedOption.getAttribute('data-product-name');
  if (productName !== null) {
    var trigger = 'networktab'; // mobile selector
    hideNavigation();
    Offers.show(productName, trigger);
    this.selectedIndex = 0;
    return;
  }
  // or redirect to the landing/home for public area or user owned product
  var url = this.value;
  Url.redirectTo(url);
}
function onSisterSiteUpsellClicked(e, upsellOneClickConfig) {
  e.preventDefault();
  hideNavigation();
  UpsellSisterSiteOneclick.setUpsellSisterSiteInfo(upsellOneClickConfig);
}
function removeFavoriteScenesStorage() {
  if (localStorage.getItem('favoriteScenes') === null) {
    return;
  }
  localStorage.removeItem('favoriteScenes');
}

/**
 * Initializes navigation
 */
exports.init = function () {
  navigation = document.getElementById('navigation');
  if (navigation === null) {
    return;
  }
  toggler = document.getElementById('navigationToggler');
  navigationHide = document.getElementById('navigationHide');
  if (toggler !== null) {
    toggler.addEventListener('click', showNavigation);
  }
  if (navigationHide !== null) {
    navigationHide.addEventListener('click', hideNavigation);
    window.addEventListener('resize', calculateFloatingTogglerThreshold);
    calculateFloatingTogglerThreshold();
    Ui.onScroll(window, updateNavigationMenuToggler);
  }

  // Reset the mobile navigation when browser goes to 'medium' width and above
  if (window.matchMedia !== undefined) {
    var mobileView = window.matchMedia('(min-width: 1025px)');
    mobileView.addListener(windowResized);
  }
  var notOwnedProducts = document.querySelectorAll('#umbrellaProducts [data-product-name], #footer [data-product-name]');
  for (var i = 0; i < notOwnedProducts.length; i++) {
    notOwnedProducts[i].addEventListener('click', showOffer);
  }
  var linksNeedingParams = document.querySelectorAll('[data-params]');
  if (linksNeedingParams.length > 0) {
    linksNeedingParams.forEach(function (theLink) {
      var params = theLink.getAttribute('data-params');
      var plainURL = theLink.href;
      var url = plainURL + '?' + params;
      var isNewWindow = theLink.target === '_blank';
      theLink.addEventListener('click', function (event) {
        event.preventDefault();
        if (isNewWindow) {
          Url.openNewWindow(url);
        } else {
          Url.redirectTo(url);
        }
      });
    });
  }
  mobileNavigationUmbrellaProducts = document.getElementById('mobileNavigationUmbrellaProducts');
  if (mobileNavigationUmbrellaProducts !== null) {
    mobileNavigationUmbrellaProducts.addEventListener('change', onNetworkProductSelected);
    window.addEventListener('pageshow', function () {
      // workaround for ios to have the current site preselected when hitting back button
      mobileNavigationUmbrellaProducts.selectedIndex = 0;
    });
  }
  var lazyLoadInstances = [];
  var pageLazyLoad = new LazyLoad({
    'elements_selector': '.lazyLoadContainer',
    'callback_enter': function (el) {
      var onElement = new LazyLoad({
        container: el
      });
      lazyLoadInstances.push(onElement);
    }
  });
  pageLazyLoad.update();
  var showUpsellPopupButton = document.querySelectorAll('[data-show-upsell-popup]');
  var upsellOneClickConfig = document.querySelector('[data-upsell-config]');
  if (upsellOneClickConfig !== null) {
    showUpsellPopupButton.forEach(function (link) {
      link.addEventListener('click', function (e) {
        onSisterSiteUpsellClicked(e, upsellOneClickConfig);
      });
    });
  }
  var headerLogoutLink = document.getElementById('headerNavigationLogout');
  if (headerLogoutLink !== null) {
    headerLogoutLink.addEventListener('click', removeFavoriteScenesStorage);
  }
  Search.init();
  BannerCountdown.init();
  var isUserLoggedIn = document.querySelector('.navigation--is-logged-in');
  if (isUserLoggedIn) {
    FavoritesToggle.updateStorage();
  }
  var footerPressInquiriesLink = document.getElementById('footerPressInquiries');
  if (footerPressInquiriesLink !== null) {
    footerPressInquiriesLink.setAttribute('href', 'mailto:press@vrcosplayx.com');
  }
};

/***/ }),

/***/ "HToz":
/***/ (function(module) {

!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";const e="undefined"!=typeof window,t=e&&!("onscroll"in window)||"undefined"!=typeof navigator&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),a=e&&window.devicePixelRatio>1,n={elements_selector:".lazy",container:t||e?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},s=e=>Object.assign({},n,e),l=function(e,t){let a;const n="LazyLoad::Initialized",s=new e(t);try{a=new CustomEvent(n,{detail:{instance:s}})}catch(e){a=document.createEvent("CustomEvent"),a.initCustomEvent(n,!1,!1,{instance:s})}window.dispatchEvent(a)},o="src",r="srcset",i="sizes",d="poster",c="llOriginalAttrs",_="data",u="loading",g="loaded",b="applied",h="error",m="native",p="data-",f="ll-status",v=(e,t)=>e.getAttribute(p+t),E=e=>v(e,f),I=(e,t)=>((e,t,a)=>{const n=p+t;null!==a?e.setAttribute(n,a):e.removeAttribute(n)})(e,f,t),y=e=>I(e,null),k=e=>null===E(e),A=e=>E(e)===m,L=[u,g,b,h],w=(e,t,a,n)=>{e&&"function"==typeof e&&(void 0===n?void 0===a?e(t):e(t,a):e(t,a,n))},x=(t,a)=>{e&&""!==a&&t.classList.add(a)},C=(t,a)=>{e&&""!==a&&t.classList.remove(a)},O=e=>e.llTempImage,M=(e,t)=>{if(!t)return;const a=t._observer;a&&a.unobserve(e)},z=(e,t)=>{e&&(e.loadingCount+=t)},N=(e,t)=>{e&&(e.toLoadCount=t)},T=e=>{let t=[];for(let a,n=0;a=e.children[n];n+=1)"SOURCE"===a.tagName&&t.push(a);return t},R=(e,t)=>{const a=e.parentNode;a&&"PICTURE"===a.tagName&&T(a).forEach(t)},G=(e,t)=>{T(e).forEach(t)},D=[o],H=[o,d],V=[o,r,i],F=[_],j=e=>!!e[c],B=e=>e[c],J=e=>delete e[c],S=(e,t)=>{if(j(e))return;const a={};t.forEach((t=>{a[t]=e.getAttribute(t)})),e[c]=a},P=(e,t)=>{if(!j(e))return;const a=B(e);t.forEach((t=>{((e,t,a)=>{a?e.setAttribute(t,a):e.removeAttribute(t)})(e,t,a[t])}))},U=(e,t,a)=>{x(e,t.class_applied),I(e,b),a&&(t.unobserve_completed&&M(e,t),w(t.callback_applied,e,a))},$=(e,t,a)=>{x(e,t.class_loading),I(e,u),a&&(z(a,1),w(t.callback_loading,e,a))},q=(e,t,a)=>{a&&e.setAttribute(t,a)},K=(e,t)=>{q(e,i,v(e,t.data_sizes)),q(e,r,v(e,t.data_srcset)),q(e,o,v(e,t.data_src))},Q={IMG:(e,t)=>{R(e,(e=>{S(e,V),K(e,t)})),S(e,V),K(e,t)},IFRAME:(e,t)=>{S(e,D),q(e,o,v(e,t.data_src))},VIDEO:(e,t)=>{G(e,(e=>{S(e,D),q(e,o,v(e,t.data_src))})),S(e,H),q(e,d,v(e,t.data_poster)),q(e,o,v(e,t.data_src)),e.load()},OBJECT:(e,t)=>{S(e,F),q(e,_,v(e,t.data_src))}},W=["IMG","IFRAME","VIDEO","OBJECT"],X=(e,t)=>{!t||(e=>e.loadingCount>0)(t)||(e=>e.toLoadCount>0)(t)||w(e.callback_finish,t)},Y=(e,t,a)=>{e.addEventListener(t,a),e.llEvLisnrs[t]=a},Z=(e,t,a)=>{e.removeEventListener(t,a)},ee=e=>!!e.llEvLisnrs,te=e=>{if(!ee(e))return;const t=e.llEvLisnrs;for(let a in t){const n=t[a];Z(e,a,n)}delete e.llEvLisnrs},ae=(e,t,a)=>{(e=>{delete e.llTempImage})(e),z(a,-1),(e=>{e&&(e.toLoadCount-=1)})(a),C(e,t.class_loading),t.unobserve_completed&&M(e,a)},ne=(e,t,a)=>{const n=O(e)||e;ee(n)||((e,t,a)=>{ee(e)||(e.llEvLisnrs={});const n="VIDEO"===e.tagName?"loadeddata":"load";Y(e,n,t),Y(e,"error",a)})(n,(s=>{((e,t,a,n)=>{const s=A(t);ae(t,a,n),x(t,a.class_loaded),I(t,g),w(a.callback_loaded,t,n),s||X(a,n)})(0,e,t,a),te(n)}),(s=>{((e,t,a,n)=>{const s=A(t);ae(t,a,n),x(t,a.class_error),I(t,h),w(a.callback_error,t,n),a.restore_on_error&&P(t,V),s||X(a,n)})(0,e,t,a),te(n)}))},se=(e,t,n)=>{(e=>W.indexOf(e.tagName)>-1)(e)?((e,t,a)=>{ne(e,t,a),((e,t,a)=>{const n=Q[e.tagName];n&&(n(e,t),$(e,t,a))})(e,t,a)})(e,t,n):((e,t,n)=>{(e=>{e.llTempImage=document.createElement("IMG")})(e),ne(e,t,n),(e=>{j(e)||(e[c]={backgroundImage:e.style.backgroundImage})})(e),((e,t,n)=>{const s=v(e,t.data_bg),l=v(e,t.data_bg_hidpi),r=a&&l?l:s;r&&(e.style.backgroundImage=`url("${r}")`,O(e).setAttribute(o,r),$(e,t,n))})(e,t,n),((e,t,n)=>{const s=v(e,t.data_bg_multi),l=v(e,t.data_bg_multi_hidpi),o=a&&l?l:s;o&&(e.style.backgroundImage=o,U(e,t,n))})(e,t,n),((e,t,a)=>{const n=v(e,t.data_bg_set);if(!n)return;let s=n.split("|").map((e=>`image-set(${e})`));e.style.backgroundImage=s.join(),U(e,t,a)})(e,t,n)})(e,t,n)},le=e=>{e.removeAttribute(o),e.removeAttribute(r),e.removeAttribute(i)},oe=e=>{R(e,(e=>{P(e,V)})),P(e,V)},re={IMG:oe,IFRAME:e=>{P(e,D)},VIDEO:e=>{G(e,(e=>{P(e,D)})),P(e,H),e.load()},OBJECT:e=>{P(e,F)}},ie=(e,t)=>{(e=>{const t=re[e.tagName];t?t(e):(e=>{if(!j(e))return;const t=B(e);e.style.backgroundImage=t.backgroundImage})(e)})(e),((e,t)=>{k(e)||A(e)||(C(e,t.class_entered),C(e,t.class_exited),C(e,t.class_applied),C(e,t.class_loading),C(e,t.class_loaded),C(e,t.class_error))})(e,t),y(e),J(e)},de=["IMG","IFRAME","VIDEO"],ce=e=>e.use_native&&"loading"in HTMLImageElement.prototype,_e=(e,t,a)=>{e.forEach((e=>(e=>e.isIntersecting||e.intersectionRatio>0)(e)?((e,t,a,n)=>{const s=(e=>L.indexOf(E(e))>=0)(e);I(e,"entered"),x(e,a.class_entered),C(e,a.class_exited),((e,t,a)=>{t.unobserve_entered&&M(e,a)})(e,a,n),w(a.callback_enter,e,t,n),s||se(e,a,n)})(e.target,e,t,a):((e,t,a,n)=>{k(e)||(x(e,a.class_exited),((e,t,a,n)=>{a.cancel_on_exit&&(e=>E(e)===u)(e)&&"IMG"===e.tagName&&(te(e),(e=>{R(e,(e=>{le(e)})),le(e)})(e),oe(e),C(e,a.class_loading),z(n,-1),y(e),w(a.callback_cancel,e,t,n))})(e,t,a,n),w(a.callback_exit,e,t,n))})(e.target,e,t,a)))},ue=e=>Array.prototype.slice.call(e),ge=e=>e.container.querySelectorAll(e.elements_selector),be=e=>(e=>E(e)===h)(e),he=(e,t)=>(e=>ue(e).filter(k))(e||ge(t)),me=function(t,a){const n=s(t);this._settings=n,this.loadingCount=0,((e,t)=>{ce(e)||(t._observer=new IntersectionObserver((a=>{_e(a,e,t)}),(e=>({root:e.container===document?null:e.container,rootMargin:e.thresholds||e.threshold+"px"}))(e)))})(n,this),((t,a)=>{e&&(a._onlineHandler=()=>{((e,t)=>{var a;(a=ge(e),ue(a).filter(be)).forEach((t=>{C(t,e.class_error),y(t)})),t.update()})(t,a)},window.addEventListener("online",a._onlineHandler))})(n,this),this.update(a)};return me.prototype={update:function(e){const a=this._settings,n=he(e,a);var s,l;N(this,n.length),t?this.loadAll(n):ce(a)?((e,t,a)=>{e.forEach((e=>{-1!==de.indexOf(e.tagName)&&((e,t,a)=>{e.setAttribute("loading","lazy"),ne(e,t,a),((e,t)=>{const a=Q[e.tagName];a&&a(e,t)})(e,t),I(e,m)})(e,t,a)})),N(a,0)})(n,a,this):(l=n,(e=>{e.disconnect()})(s=this._observer),((e,t)=>{t.forEach((t=>{e.observe(t)}))})(s,l))},destroy:function(){this._observer&&this._observer.disconnect(),e&&window.removeEventListener("online",this._onlineHandler),ge(this._settings).forEach((e=>{J(e)})),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(e){const t=this._settings;he(e,t).forEach((e=>{M(e,this),se(e,t,this)}))},restoreAll:function(){const e=this._settings;ge(e).forEach((t=>{ie(t,e)}))}},me.load=(e,t)=>{const a=s(t);se(e,a)},me.resetStatus=e=>{y(e)},e&&((e,t)=>{if(t)if(t.length)for(let a,n=0;a=t[n];n+=1)l(e,a);else l(e,t)})(me,window.lazyLoadOptions),me}));


/***/ })

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	var __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		var cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
var __webpack_exports__ = {};
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
(() => {
"use strict";


var Navigation = __webpack_require__("ztH4");
var AgeVerification = __webpack_require__("5kPh");
var Photoswipe = __webpack_require__("DbbC");
var Url = __webpack_require__("nHg3");
var TrialUser = __webpack_require__("PNQ1");
var ReenableMembership = __webpack_require__("Fazu");
var VideoPreview = __webpack_require__("VJs5");
var SingleGirl_document = __webpack_require__("ofPo");
var SingleGirl_window = __webpack_require__("4uwT");
var UI = __webpack_require__("OHGQ");
var Bootstrap = __webpack_require__("s9eF");
var UpsellSisterSiteOneclick = __webpack_require__("6K9W");
var FavoritesToggle = __webpack_require__("sqKB");
var collapsedBioClass = 'girl-details-bio--collapsed';
var bioIsExpanded = false;
var girlDetailsContainer;
var girlDetailsImage;
var girlBio;
var readMore;
var galleryClickTracked = false;
var isLoggedIn = false;
var tabHeads;
function resizeGirlDetailsContainer() {
  girlDetailsContainer.style.height = girlDetailsImage.offsetHeight + 'px';
}
function biographyOverflows() {
  return girlBio.scrollHeight > girlBio.offsetHeight;
}
function updateReadMoreVisibility() {
  if (biographyOverflows() === true) {
    readMore.classList.remove('is-hidden');
    girlBio.classList.add(collapsedBioClass);
    return;
  }
  girlBio.classList.remove(collapsedBioClass);
  readMore.classList.add('is-hidden');
}
function updateGirlDetailsElements() {
  resizeGirlDetailsContainer();
  updateReadMoreVisibility();
}
function windowResized() {
  if (bioIsExpanded === true) {
    return;
  }
  if (SingleGirl_window.innerWidth < 641) {
    girlDetailsContainer.style.height = 'auto';
    return;
  }
  updateGirlDetailsElements();
}
function expandBio() {
  if (bioIsExpanded === true) {
    return;
  }
  bioIsExpanded = true;
  readMore.classList.add('is-hidden');
  girlDetailsContainer.style.height = 'auto';
  girlBio.classList.remove(collapsedBioClass);
}

/**
 * Displays the photo gallery with the image clicked selected
 *
 * @param {MouseEvent} e
 */
function displayPhotoGallery(e, isLoggedIn, mustReenableAttribute) {
  var thisGallery;
  var target = e.target;
  var bigImage = target.getAttribute('data-big-image');
  var galleryIndex = target.getAttribute('data-gallery-index');
  var galleryId = target.getAttribute('data-parent-gallery-id');
  var photoSwipeGallery = SingleGirl_document.getElementById('photoswipeContainer');
  var upsellOneClickConfig = SingleGirl_document.querySelector('[data-upsell-config]');
  var lastItem = '<div class="gallery-last-item-container"><div style="width:100%;height:100%;background-image:url(' + bigImage + ');background-repeat:no-repeat;background-position:center;background-size:contain;">' + '<div class="gallery-last-item"><img class="gallery-last-item__image" src="https://cdnimg.badoink.com/content/paysites/common/images/loading.gif"></div>' + '<a class="gallery-last-item__link" href="/join"></div></div>';
  if (bigImage === null) {
    return;
  }
  e.preventDefault();
  if (galleryIndex === null) {
    galleryIndex = 0;
  } else {
    galleryIndex = parseInt(galleryIndex, 10);
  }

  // locked gallery with more than 5 images
  if (!isLoggedIn && upsellOneClickConfig !== null) {
    thisGallery = Photoswipe.init(galleryId, galleryIndex, lastItem);
    thisGallery.listen('beforeChange', function () {
      if (thisGallery.currItem.slideIndex && thisGallery.currItem.slideIndex > 4) {
        UpsellSisterSiteOneclick.setUpsellSisterSiteInfo(upsellOneClickConfig);
        photoSwipeGallery.classList.add('gallery-sister-site-user');
        SingleGirl_window.setTimeout(function () {
          thisGallery.close();
          SingleGirl_window.setTimeout(function () {
            photoSwipeGallery.classList.remove('gallery-sister-site-user');
          }, 600);
        }, 50);
      }
    });
  } else if (!isLoggedIn) {
    thisGallery = Photoswipe.init(galleryId, galleryIndex, lastItem);
    thisGallery.listen('beforeChange', function () {
      if (thisGallery.currItem.slideIndex && thisGallery.currItem.slideIndex > 4) {
        photoSwipeGallery.classList.add('gallery-public-user');
        Url.redirectTo('/join/');
      }
    });
  } else if (isLoggedIn && mustReenableAttribute) {
    thisGallery = Photoswipe.init(galleryId, galleryIndex);
    thisGallery.listen('beforeChange', function () {
      if (thisGallery.currItem.slideIndex && thisGallery.currItem.slideIndex > 4) {
        ReenableMembership.displayReenableOverlay();
        photoSwipeGallery.classList.add('gallery-cancel-user');
        SingleGirl_window.setTimeout(function () {
          thisGallery.close();
          SingleGirl_window.setTimeout(function () {
            photoSwipeGallery.classList.remove('gallery-cancel-user');
          }, 600);
        }, 50);
      }
    });
  } else {
    thisGallery = Photoswipe.init(galleryId, galleryIndex);
  }
  if (galleryClickTracked === true) {
    return;
  }
  galleryClickTracked = true;
}

/**
 * Updates the visual style of the option tabs
 */
function updateTabOptionsToggler() {
  var scrollPosition = SingleGirl_window.pageYOffset;
  var toggler = SingleGirl_document.getElementById('tabOptionsToggler');
  var togglerSections = SingleGirl_document.querySelectorAll('.girl-option-section');
  if (scrollPosition > 168) {
    toggler.classList.add('girl-details-tabs--float');
  } else {
    toggler.classList.remove('girl-details-tabs--float');
  }
  togglerSections.forEach(function (e) {
    if (scrollPosition > e.offsetTop - 20) {
      for (var j = 0; j < tabHeads.length; j++) {
        tabHeads[j].children[0].classList.remove('girl-details-tabs__title--active');
        tabHeads[j].children[1].classList.remove('girl-details-tabs__title--active');
        tabHeads[j].children[2].classList.remove('girl-details-tabs__title--active');
      }
      var tabOption = SingleGirl_document.querySelectorAll('a[href$="' + e.id + '"]');
      tabOption[0].parentElement.classList.add('girl-details-tabs__title--active');
    }
  });
}
function toggleGirlTabsOptions(e) {
  e.preventDefault();
  var targetTab = e.target;
  var targetId = targetTab.getAttribute('href');
  var toggler = SingleGirl_document.getElementById('tabOptionsToggler');
  if (targetId === null) {
    return;
  }
  if (toggler.classList.contains('girl-details-tabs--float')) {
    UI.scrollTo(targetId, {
      offset: -70,
      a11y: true
    });
  } else {
    UI.scrollTo(targetId, {
      offset: -145,
      a11y: true
    });
  }
}
function initTabHeader() {
  var tabHeadersContainerAll = SingleGirl_document.querySelectorAll('.girl-details-tabs');
  if (tabHeadersContainerAll.length === 0) {
    return;
  }
  tabHeads = [];
  tabHeadersContainerAll.forEach(function (e) {
    tabHeads.push(e);
  });
  if (tabHeads.length === 0) {
    return;
  }
  UI.onScroll(SingleGirl_window, updateTabOptionsToggler);
  for (var i = 0; i < tabHeads.length; i++) {
    tabHeads[i].addEventListener('click', toggleGirlTabsOptions, true);
  }
}

/**
 * Initializes Single Girl page
 */
var init = function (isUserLoggedIn, mustReenableAttribute) {
  var gallery = SingleGirl_document.getElementById('gallery');
  isLoggedIn = isUserLoggedIn === 'true';
  mustReenableAttribute = mustReenableAttribute === 'true';
  bioIsExpanded = false;
  girlDetailsContainer = SingleGirl_document.getElementById('girlDetails');
  girlDetailsImage = SingleGirl_document.getElementById('girlImage');
  girlBio = SingleGirl_document.getElementById('girlBio');
  readMore = SingleGirl_document.getElementById('readMore');
  Navigation.init();
  AgeVerification.init();
  TrialUser.init();
  ReenableMembership.init();
  VideoPreview.init();
  initTabHeader();
  if (gallery !== null) {
    gallery.addEventListener('click', function (e) {
      displayPhotoGallery(e, isLoggedIn, mustReenableAttribute);
    }, true);
  }
  if (girlDetailsContainer === null) {
    return;
  }
  SingleGirl_window.addEventListener('resize', windowResized);
  readMore.addEventListener('click', expandBio);
  FavoritesToggle.init(isLoggedIn);
  if (SingleGirl_window.innerWidth < 641) {
    return;
  }

  // resize girl details container when photo is loaded
  girlDetailsImage.addEventListener('load', updateGirlDetailsElements);
  if (girlDetailsImage.complete === true) {
    updateGirlDetailsElements();
  }
};
Bootstrap.initModule(init);
})();

/******/ })()
;