if (vertical) {
    return position.y;
  }
  return position.x;
}

function isMobile() {
  if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
    return true;
  }
  return false;
}

function getPageURL() {
  if (top !== self) {
    if (document.referrer) {
      return document.referrer
    }
    const ancestors = window.location.ancestorOrigins
    if (ancestors) {
      return ancestors[ancestors.length - 1]
    }
    return ''
  } else {
    return window.l