{"version":3,"file":"jarallax.min.js","sources":["../src/utils/ready.js","../src/utils/global.js","../src/defaults.js","../src/utils/isMobile.js","../src/utils/getWindowSize.js","../src/utils/observer.js","../src/core.js","../src/utils/css.js","../src/utils/extend.js","../src/utils/getParents.js","../src/core.umd.js"],"sourcesContent":["/**\n * Document ready callback.\n * @param {Function} callback - callback will be fired once Document ready.\n */\nfunction ready(callback) {\n  if (document.readyState === 'complete' || document.readyState === 'interactive') {\n    // Already ready or interactive, execute callback\n    callback();\n  } else {\n    document.addEventListener('DOMContentLoaded', callback, {\n      capture: true,\n      once: true,\n      passive: true,\n    });\n  }\n}\n\nexport default ready;\n","/* eslint-disable import/no-mutable-exports */\n/* eslint-disable no-restricted-globals */\nlet win;\n\nif (typeof window !== 'undefined') {\n  win = window;\n} else if (typeof global !== 'undefined') {\n  win = global;\n} else if (typeof self !== 'undefined') {\n  win = self;\n} else {\n  win = {};\n}\n\nexport default win;\n","export default {\n  // Base parallax options.\n  type: 'scroll',\n  speed: 0.5,\n  containerClass: 'jarallax-container',\n  imgSrc: null,\n  imgElement: '.jarallax-img',\n  imgSize: 'cover',\n  imgPosition: '50% 50%',\n  imgRepeat: 'no-repeat',\n  keepImg: false,\n  elementInViewport: null,\n  zIndex: -100,\n  disableParallax: false,\n\n  // Callbacks.\n  onScroll: null,\n  onInit: null,\n  onDestroy: null,\n  onCoverImage: null,\n\n  // Video options.\n  videoClass: 'jarallax-video',\n  videoSrc: null,\n  videoStartTime: 0,\n  videoEndTime: 0,\n  videoVolume: 0,\n  videoLoop: true,\n  videoPlayOnlyVisible: true,\n  videoLazyLoading: true,\n  disableVideo: false,\n\n  // Video callbacks.\n  onVideoInsert: null,\n  onVideoWorkerInit: null,\n};\n","import global from './global';\n\nconst { navigator } = global;\n\nconst mobileAgent = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n  navigator.userAgent\n);\n\nexport default function isMobile() {\n  return mobileAgent;\n}\n","import global from './global';\nimport domReady from './ready';\nimport isMobile from './isMobile';\n\nlet wndW;\nlet wndH;\nlet $deviceHelper;\n\n/**\n * The most popular mobile browsers changes height after page scroll and this generates image jumping.\n * We can fix it using this workaround with vh units.\n */\nfunction getDeviceHeight() {\n  if (!$deviceHelper && document.body) {\n    $deviceHelper = document.createElement('div');\n    $deviceHelper.style.cssText =\n      'position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;';\n    document.body.appendChild($deviceHelper);\n  }\n\n  return (\n    ($deviceHelper ? $deviceHelper.clientHeight : 0) ||\n    global.innerHeight ||\n    document.documentElement.clientHeight\n  );\n}\n\nfunction updateWindowHeight() {\n  wndW = global.innerWidth || document.documentElement.clientWidth;\n\n  if (isMobile()) {\n    wndH = getDeviceHeight();\n  } else {\n    wndH = global.innerHeight || document.documentElement.clientHeight;\n  }\n}\n\nupdateWindowHeight();\nglobal.addEventListener('resize', updateWindowHeight);\nglobal.addEventListener('orientationchange', updateWindowHeight);\nglobal.addEventListener('load', updateWindowHeight);\ndomReady(() => {\n  updateWindowHeight({\n    type: 'dom-loaded',\n  });\n});\n\nexport default function getWindowSize() {\n  return {\n    width: wndW,\n    height: wndH,\n  };\n}\n","import global from './global';\nimport getWindowSize from './getWindowSize';\n\n// List with all jarallax instances\n// need to render all in one scroll/resize event.\nconst jarallaxList = [];\n\nfunction updateParallax() {\n  if (!jarallaxList.length) {\n    return;\n  }\n\n  const { width: wndW, height: wndH } = getWindowSize();\n\n  jarallaxList.forEach((data, k) => {\n    const { instance, oldData } = data;\n\n    if (!instance.isVisible()) {\n      return;\n    }\n\n    const clientRect = instance.$item.getBoundingClientRect();\n\n    const newData = {\n      width: clientRect.width,\n      height: clientRect.height,\n      top: clientRect.top,\n      bottom: clientRect.bottom,\n      wndW,\n      wndH,\n    };\n\n    const isResized =\n      !oldData ||\n      oldData.wndW !== newData.wndW ||\n      oldData.wndH !== newData.wndH ||\n      oldData.width !== newData.width ||\n      oldData.height !== newData.height;\n    const isScrolled =\n      isResized || !oldData || oldData.top !== newData.top || oldData.bottom !== newData.bottom;\n\n    jarallaxList[k].oldData = newData;\n\n    if (isResized) {\n      instance.onResize();\n    }\n    if (isScrolled) {\n      instance.onScroll();\n    }\n  });\n\n  global.requestAnimationFrame(updateParallax);\n}\n\nconst visibilityObserver = new global.IntersectionObserver(\n  (entries) => {\n    entries.forEach((entry) => {\n      entry.target.jarallax.isElementInViewport = entry.isIntersecting;\n    });\n  },\n  {\n    // We have to start parallax calculation before the block is in view\n    // to prevent possible parallax jumping.\n    rootMargin: '50px',\n  }\n);\n\nexport function addObserver(instance) {\n  jarallaxList.push({\n    instance,\n  });\n\n  if (jarallaxList.length === 1) {\n    global.requestAnimationFrame(updateParallax);\n  }\n\n  visibilityObserver.observe(instance.options.elementInViewport || instance.$item);\n}\n\nexport function removeObserver(instance) {\n  jarallaxList.forEach((data, key) => {\n    if (data.instance.instanceID === instance.instanceID) {\n      jarallaxList.splice(key, 1);\n    }\n  });\n\n  visibilityObserver.unobserve(instance.options.elementInViewport || instance.$item);\n}\n","/* eslint-disable class-methods-use-this */\nimport defaults from './defaults';\nimport global from './utils/global';\nimport css from './utils/css';\nimport extend from './utils/extend';\nimport getParents from './utils/getParents';\nimport getWindowSize from './utils/getWindowSize';\nimport { addObserver, removeObserver } from './utils/observer';\n\nconst { navigator } = global;\n\nlet instanceID = 0;\n\n// Jarallax class\nclass Jarallax {\n  constructor(item, userOptions) {\n    const self = this;\n\n    self.instanceID = instanceID;\n    instanceID += 1;\n\n    self.$item = item;\n\n    self.defaults = { ...defaults };\n\n    // prepare data-options\n    const dataOptions = self.$item.dataset || {};\n    const pureDataOptions = {};\n    Object.keys(dataOptions).forEach((key) => {\n      const lowerCaseOption = key.substr(0, 1).toLowerCase() + key.substr(1);\n      if (lowerCaseOption && typeof self.defaults[lowerCaseOption] !== 'undefined') {\n        pureDataOptions[lowerCaseOption] = dataOptions[key];\n      }\n    });\n\n    self.options = self.extend({}, self.defaults, pureDataOptions, userOptions);\n    self.pureOptions = self.extend({}, self.options);\n\n    // prepare 'true' and 'false' strings to boolean\n    Object.keys(self.options).forEach((key) => {\n      if (self.options[key] === 'true') {\n        self.options[key] = true;\n      } else if (self.options[key] === 'false') {\n        self.options[key] = false;\n      }\n    });\n\n    // fix speed option [-1.0, 2.0]\n    self.options.speed = Math.min(2, Math.max(-1, parseFloat(self.options.speed)));\n\n    // prepare disableParallax callback\n    if (typeof self.options.disableParallax === 'string') {\n      self.options.disableParallax = new RegExp(self.options.disableParallax);\n    }\n    if (self.options.disableParallax instanceof RegExp) {\n      const disableParallaxRegexp = self.options.disableParallax;\n      self.options.disableParallax = () => disableParallaxRegexp.test(navigator.userAgent);\n    }\n    if (typeof self.options.disableParallax !== 'function') {\n      // Support for `true` option value.\n      const disableParallaxDefault = self.options.disableParallax;\n      self.options.disableParallax = () => disableParallaxDefault === true;\n    }\n\n    // prepare disableVideo callback\n    if (typeof self.options.disableVideo === 'string') {\n      self.options.disableVideo = new RegExp(self.options.disableVideo);\n    }\n    if (self.options.disableVideo instanceof RegExp) {\n      const disableVideoRegexp = self.options.disableVideo;\n      self.options.disableVideo = () => disableVideoRegexp.test(navigator.userAgent);\n    }\n    if (typeof self.options.disableVideo !== 'function') {\n      // Support for `true` option value.\n      const disableVideoDefault = self.options.disableVideo;\n      self.options.disableVideo = () => disableVideoDefault === true;\n    }\n\n    // custom element to check if parallax in viewport\n    let elementInVP = self.options.elementInViewport;\n    // get first item from array\n    if (\n      elementInVP &&\n      typeof elementInVP === 'object' &&\n      typeof elementInVP.length !== 'undefined'\n    ) {\n      [elementInVP] = elementInVP;\n    }\n    // check if dom element\n    if (!(elementInVP instanceof Element)) {\n      elementInVP = null;\n    }\n    self.options.elementInViewport = elementInVP;\n\n    self.image = {\n      src: self.options.imgSrc || null,\n      $container: null,\n      useImgTag: false,\n\n      // 1. Position fixed is needed for the most of browsers because absolute position have glitches\n      // 2. On MacOS with smooth scroll there is a huge lags with absolute position - https://github.com/nk-o/jarallax/issues/75\n      // 3. Previously used 'absolute' for mobile devices. But we re-tested on iPhone 12 and 'fixed' position is working better, then 'absolute', so for now position is always 'fixed'\n      position: 'fixed',\n    };\n\n    if (self.initImg() && self.canInitParallax()) {\n      self.init();\n    }\n  }\n\n  css(el, styles) {\n    return css(el, styles);\n  }\n\n  extend(out, ...args) {\n    return extend(out, ...args);\n  }\n\n  // get window size and scroll position. Useful for extensions\n  getWindowData() {\n    const { width, height } = getWindowSize();\n\n    return {\n      width,\n      height,\n      y: document.documentElement.scrollTop,\n    };\n  }\n\n  // Jarallax functions\n  initImg() {\n    const self = this;\n\n    // find image element\n    let $imgElement = self.options.imgElement;\n    if ($imgElement && typeof $imgElement === 'string') {\n      $imgElement = self.$item.querySelector($imgElement);\n    }\n\n    // check if dom element\n    if (!($imgElement instanceof Element)) {\n      if (self.options.imgSrc) {\n        $imgElement = new Image();\n        $imgElement.src = self.options.imgSrc;\n      } else {\n        $imgElement = null;\n      }\n    }\n\n    if ($imgElement) {\n      if (self.options.keepImg) {\n        self.image.$item = $imgElement.cloneNode(true);\n      } else {\n        self.image.$item = $imgElement;\n        self.image.$itemParent = $imgElement.parentNode;\n      }\n      self.image.useImgTag = true;\n    }\n\n    // true if there is img tag\n    if (self.image.$item) {\n      return true;\n    }\n\n    // get image src\n    if (self.image.src === null) {\n      self.image.src =\n        'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';\n      self.image.bgImage = self.css(self.$item, 'background-image');\n    }\n    return !(!self.image.bgImage || self.image.bgImage === 'none');\n  }\n\n  canInitParallax() {\n    return !this.options.disableParallax();\n  }\n\n  init() {\n    const self = this;\n    const containerStyles = {\n      position: 'absolute',\n      top: 0,\n      left: 0,\n      width: '100%',\n      height: '100%',\n      overflow: 'hidden',\n    };\n    let imageStyles = {\n      pointerEvents: 'none',\n      transformStyle: 'preserve-3d',\n      backfaceVisibility: 'hidden',\n    };\n\n    if (!self.options.keepImg) {\n      // save default user styles\n      const curStyle = self.$item.getAttribute('style');\n      if (curStyle) {\n        self.$item.setAttribute('data-jarallax-original-styles', curStyle);\n      }\n      if (self.image.useImgTag) {\n        const curImgStyle = self.image.$item.getAttribute('style');\n        if (curImgStyle) {\n          self.image.$item.setAttribute('data-jarallax-original-styles', curImgStyle);\n        }\n      }\n    }\n\n    // set relative position and z-index to the parent\n    if (self.css(self.$item, 'position') === 'static') {\n      self.css(self.$item, {\n        position: 'relative',\n      });\n    }\n    if (self.css(self.$item, 'z-index') === 'auto') {\n      self.css(self.$item, {\n        zIndex: 0,\n      });\n    }\n\n    // container for parallax image\n    self.image.$container = document.createElement('div');\n    self.css(self.image.$container, containerStyles);\n    self.css(self.image.$container, {\n      'z-index': self.options.zIndex,\n    });\n\n    // it will remove some image overlapping\n    // overlapping occur due to an image position fixed inside absolute position element\n    // needed only when background in fixed position\n    if (this.image.position === 'fixed') {\n      self.css(self.image.$container, {\n        '-webkit-clip-path': 'polygon(0 0, 100% 0, 100% 100%, 0 100%)',\n        'clip-path': 'polygon(0 0, 100% 0, 100% 100%, 0 100%)',\n      });\n    }\n\n    // Add container unique ID.\n    self.image.$container.setAttribute('id', `jarallax-container-${self.instanceID}`);\n\n    // Add container class.\n    if (self.options.containerClass) {\n      self.image.$container.setAttribute('class', self.options.containerClass);\n    }\n\n    self.$item.appendChild(self.image.$container);\n\n    // use img tag\n    if (self.image.useImgTag) {\n      imageStyles = self.extend(\n        {\n          'object-fit': self.options.imgSize,\n          'object-position': self.options.imgPosition,\n          'max-width': 'none',\n        },\n        containerStyles,\n        imageStyles\n      );\n\n      // use div with background image\n    } else {\n      self.image.$item = document.createElement('div');\n      if (self.image.src) {\n        imageStyles = self.extend(\n          {\n            'background-position': self.options.imgPosition,\n            'background-size': self.options.imgSize,\n            'background-repeat': self.options.imgRepeat,\n            'background-image': self.image.bgImage || `url(\"${self.image.src}\")`,\n          },\n          containerStyles,\n          imageStyles\n        );\n      }\n    }\n\n    if (\n      self.options.type === 'opacity' ||\n      self.options.type === 'scale' ||\n      self.options.type === 'scale-opacity' ||\n      self.options.speed === 1\n    ) {\n      self.image.position = 'absolute';\n    }\n\n    // 1. Check if one of parents have transform style (without this check, scroll transform will be inverted if used parallax with position fixed)\n    //    discussion - https://github.com/nk-o/jarallax/issues/9\n    // 2. Check if parents have overflow scroll\n    if (self.image.position === 'fixed') {\n      const $parents = getParents(self.$item).filter((el) => {\n        const styles = global.getComputedStyle(el);\n        const parentTransform =\n          styles['-webkit-transform'] || styles['-moz-transform'] || styles.transform;\n        const overflowRegex = /(auto|scroll)/;\n\n        return (\n          (parentTransform && parentTransform !== 'none') ||\n          overflowRegex.test(styles.overflow + styles['overflow-y'] + styles['overflow-x'])\n        );\n      });\n\n      self.image.position = $parents.length ? 'absolute' : 'fixed';\n    }\n\n    // add position to parallax block\n    imageStyles.position = self.image.position;\n\n    // insert parallax image\n    self.css(self.image.$item, imageStyles);\n    self.image.$container.appendChild(self.image.$item);\n\n    // set initial position and size\n    self.onResize();\n    self.onScroll(true);\n\n    // call onInit event\n    if (self.options.onInit) {\n      self.options.onInit.call(self);\n    }\n\n    // remove default user background\n    if (self.css(self.$item, 'background-image') !== 'none') {\n      self.css(self.$item, {\n        'background-image': 'none',\n      });\n    }\n\n    addObserver(self);\n  }\n\n  destroy() {\n    const self = this;\n\n    removeObserver(self);\n\n    // return styles on container as before jarallax init\n    const originalStylesTag = self.$item.getAttribute('data-jarallax-original-styles');\n    self.$item.removeAttribute('data-jarallax-original-styles');\n    // null occurs if there is no style tag before jarallax init\n    if (!originalStylesTag) {\n      self.$item.removeAttribute('style');\n    } else {\n      self.$item.setAttribute('style', originalStylesTag);\n    }\n\n    if (self.image.useImgTag) {\n      // return styles on img tag as before jarallax init\n      const originalStylesImgTag = self.image.$item.getAttribute('data-jarallax-original-styles');\n      self.image.$item.removeAttribute('data-jarallax-original-styles');\n      // null occurs if there is no style tag before jarallax init\n      if (!originalStylesImgTag) {\n        self.image.$item.removeAttribute('style');\n      } else {\n        self.image.$item.setAttribute('style', originalStylesTag);\n      }\n\n      // move img tag to its default position\n      if (self.image.$itemParent) {\n        self.image.$itemParent.appendChild(self.image.$item);\n      }\n    }\n\n    // remove additional dom elements\n    if (self.image.$container) {\n      self.image.$container.parentNode.removeChild(self.image.$container);\n    }\n\n    // call onDestroy event\n    if (self.options.onDestroy) {\n      self.options.onDestroy.call(self);\n    }\n\n    // delete jarallax from item\n    delete self.$item.jarallax;\n  }\n\n  coverImage() {\n    const self = this;\n\n    const { height: wndH } = getWindowSize();\n    const rect = self.image.$container.getBoundingClientRect();\n    const contH = rect.height;\n    const { speed } = self.options;\n    const isScroll = self.options.type === 'scroll' || self.options.type === 'scroll-opacity';\n    let scrollDist = 0;\n    let resultH = contH;\n    let resultMT = 0;\n\n    // scroll parallax\n    if (isScroll) {\n      // scroll distance and height for image\n      if (speed < 0) {\n        scrollDist = speed * Math.max(contH, wndH);\n\n        if (wndH < contH) {\n          scrollDist -= speed * (contH - wndH);\n        }\n      } else {\n        scrollDist = speed * (contH + wndH);\n      }\n\n      // size for scroll parallax\n      if (speed > 1) {\n        resultH = Math.abs(scrollDist - wndH);\n      } else if (speed < 0) {\n        resultH = scrollDist / speed + Math.abs(scrollDist);\n      } else {\n        resultH += (wndH - contH) * (1 - speed);\n      }\n\n      scrollDist /= 2;\n    }\n\n    // store scroll distance\n    self.parallaxScrollDistance = scrollDist;\n\n    // vertical center\n    if (isScroll) {\n      resultMT = (wndH - resultH) / 2;\n    } else {\n      resultMT = (contH - resultH) / 2;\n    }\n\n    // apply result to item\n    self.css(self.image.$item, {\n      height: `${resultH}px`,\n      marginTop: `${resultMT}px`,\n      left: self.image.position === 'fixed' ? `${rect.left}px` : '0',\n      width: `${rect.width}px`,\n    });\n\n    // call onCoverImage event\n    if (self.options.onCoverImage) {\n      self.options.onCoverImage.call(self);\n    }\n\n    // return some useful data. Used in the video cover function\n    return {\n      image: {\n        height: resultH,\n        marginTop: resultMT,\n      },\n      container: rect,\n    };\n  }\n\n  isVisible() {\n    return this.isElementInViewport || false;\n  }\n\n  onScroll(force) {\n    const self = this;\n\n    // stop calculations if item is not in viewport\n    if (!force && !self.isVisible()) {\n      return;\n    }\n\n    const { height: wndH } = getWindowSize();\n    const rect = self.$item.getBoundingClientRect();\n    const contT = rect.top;\n    const contH = rect.height;\n    const styles = {};\n\n    // calculate parallax helping variables\n    const beforeTop = Math.max(0, contT);\n    const beforeTopEnd = Math.max(0, contH + contT);\n    const afterTop = Math.max(0, -contT);\n    const beforeBottom = Math.max(0, contT + contH - wndH);\n    const beforeBottomEnd = Math.max(0, contH - (contT + contH - wndH));\n    const afterBottom = Math.max(0, -contT + wndH - contH);\n    const fromViewportCenter = 1 - 2 * ((wndH - contT) / (wndH + contH));\n\n    // calculate on how percent of section is visible\n    let visiblePercent = 1;\n    if (contH < wndH) {\n      visiblePercent = 1 - (afterTop || beforeBottom) / contH;\n    } else if (beforeTopEnd <= wndH) {\n      visiblePercent = beforeTopEnd / wndH;\n    } else if (beforeBottomEnd <= wndH) {\n      visiblePercent = beforeBottomEnd / wndH;\n    }\n\n    // opacity\n    if (\n      self.options.type === 'opacity' ||\n      self.options.type === 'scale-opacity' ||\n      self.options.type === 'scroll-opacity'\n    ) {\n      styles.transform = 'translate3d(0,0,0)';\n      styles.opacity = visiblePercent;\n    }\n\n    // scale\n    if (self.options.type === 'scale' || self.options.type === 'scale-opacity') {\n      let scale = 1;\n      if (self.options.speed < 0) {\n        scale -= self.options.speed * visiblePercent;\n      } else {\n        scale += self.options.speed * (1 - visiblePercent);\n      }\n      styles.transform = `scale(${scale}) translate3d(0,0,0)`;\n    }\n\n    // scroll\n    if (self.options.type === 'scroll' || self.options.type === 'scroll-opacity') {\n      let positionY = self.parallaxScrollDistance * fromViewportCenter;\n\n      // fix if parallax block in absolute position\n      if (self.image.position === 'absolute') {\n        positionY -= contT;\n      }\n\n      styles.transform = `translate3d(0,${positionY}px,0)`;\n    }\n\n    self.css(self.image.$item, styles);\n\n    // call onScroll event\n    if (self.options.onScroll) {\n      self.options.onScroll.call(self, {\n        section: rect,\n\n        beforeTop,\n        beforeTopEnd,\n        afterTop,\n        beforeBottom,\n        beforeBottomEnd,\n        afterBottom,\n\n        visiblePercent,\n        fromViewportCenter,\n      });\n    }\n  }\n\n  onResize() {\n    this.coverImage();\n  }\n}\n\n// global definition\nconst jarallax = function (items, options, ...args) {\n  // check for dom element\n  // thanks: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n  if (\n    typeof HTMLElement === 'object'\n      ? items instanceof HTMLElement\n      : items &&\n        typeof items === 'object' &&\n        items !== null &&\n        items.nodeType === 1 &&\n        typeof items.nodeName === 'string'\n  ) {\n    items = [items];\n  }\n\n  const len = items.length;\n  let k = 0;\n  let ret;\n\n  for (k; k < len; k += 1) {\n    if (typeof options === 'object' || typeof options === 'undefined') {\n      if (!items[k].jarallax) {\n        items[k].jarallax = new Jarallax(items[k], options);\n      }\n    } else if (items[k].jarallax) {\n      // eslint-disable-next-line prefer-spread\n      ret = items[k].jarallax[options].apply(items[k].jarallax, args);\n    }\n    if (typeof ret !== 'undefined') {\n      return ret;\n    }\n  }\n\n  return items;\n};\njarallax.constructor = Jarallax;\n\nexport default jarallax;\n","import global from './global';\n\n/**\n * Add styles to element.\n *\n * @param {Element} el - element.\n * @param {String|Object} styles - styles list.\n *\n * @returns {Element}\n */\nexport default function css(el, styles) {\n  if (typeof styles === 'string') {\n    return global.getComputedStyle(el).getPropertyValue(styles);\n  }\n\n  Object.keys(styles).forEach((key) => {\n    el.style[key] = styles[key];\n  });\n  return el;\n}\n","/**\n * Extend like jQuery.extend\n *\n * @param {Object} out - output object.\n * @param {...any} args - additional objects to extend.\n *\n * @returns {Object}\n */\nexport default function extend(out, ...args) {\n  out = out || {};\n\n  Object.keys(args).forEach((i) => {\n    if (!args[i]) {\n      return;\n    }\n    Object.keys(args[i]).forEach((key) => {\n      out[key] = args[i][key];\n    });\n  });\n\n  return out;\n}\n","/**\n * Get all parents of the element.\n *\n * @param {Element} elem - DOM element.\n *\n * @returns {Array}\n */\nexport default function getParents(elem) {\n  const parents = [];\n\n  while (elem.parentElement !== null) {\n    elem = elem.parentElement;\n\n    if (elem.nodeType === 1) {\n      parents.push(elem);\n    }\n  }\n\n  return parents;\n}\n","import domReady from './utils/ready';\nimport global from './utils/global';\nimport jarallax from './core';\n\nconst $ = global.jQuery;\n\n// jQuery support\nif (typeof $ !== 'undefined') {\n  const $Plugin = function (...args) {\n    Array.prototype.unshift.call(args, this);\n    const res = jarallax.apply(global, args);\n    return typeof res !== 'object' ? res : this;\n  };\n  $Plugin.constructor = jarallax.constructor;\n\n  // no conflict\n  const old$Plugin = $.fn.jarallax;\n  $.fn.jarallax = $Plugin;\n  $.fn.jarallax.noConflict = function () {\n    $.fn.jarallax = old$Plugin;\n    return this;\n  };\n}\n\n// data-jarallax initialization\ndomReady(() => {\n  jarallax(document.querySelectorAll('[data-jarallax]'));\n});\n\nexport default jarallax;\n"],"names":["g","f","exports","module","define","amd","globalThis","self","jarallax","this","ready","callback","document","readyState","addEventListener","capture","once","passive","win","window","global","defaults","type","speed","containerClass","imgSrc","imgElement","imgSize","imgPosition","imgRepeat","keepImg","elementInViewport","zIndex","disableParallax","onScroll","onInit","onDestroy","onCoverImage","videoClass","videoSrc","videoStartTime","videoEndTime","videoVolume","videoLoop","videoPlayOnlyVisible","videoLazyLoading","disableVideo","onVideoInsert","onVideoWorkerInit","navigator","mobileAgent","test","userAgent","wndW","wndH","$deviceHelper","updateWindowHeight","innerWidth","documentElement","clientWidth","body","createElement","style","cssText","appendChild","clientHeight","innerHeight","getWindowSize","width","height","domReady","jarallaxList","updateParallax","length","forEach","data","k","instance","oldData","isVisible","clientRect","$item","getBoundingClientRect","newData","top","bottom","isResized","isScrolled","onResize","requestAnimationFrame","visibilityObserver","IntersectionObserver","entries","entry","target","isElementInViewport","isIntersecting","rootMargin","instanceID","Jarallax","constructor","item","userOptions","dataOptions","dataset","pureDataOptions","Object","keys","key","lowerCaseOption","substr","toLowerCase","options","extend","pureOptions","Math","min","max","parseFloat","RegExp","disableParallaxRegexp","disableParallaxDefault","disableVideoRegexp","disableVideoDefault","elementInVP","Element","image","src","$container","useImgTag","position","initImg","canInitParallax","init","css","el","styles","getComputedStyle","getPropertyValue","out","args","i","getWindowData","y","scrollTop","$imgElement","querySelector","Image","cloneNode","$itemParent","parentNode","bgImage","containerStyles","left","overflow","imageStyles","pointerEvents","transformStyle","backfaceVisibility","curStyle","getAttribute","setAttribute","curImgStyle","$parents","elem","parents","parentElement","nodeType","push","getParents","filter","parentTransform","transform","call","observe","destroy","splice","unobserve","originalStylesTag","removeAttribute","originalStylesImgTag","removeChild","coverImage","rect","contH","isScroll","scrollDist","resultH","resultMT","abs","parallaxScrollDistance","marginTop","container","force","contT","beforeTop","beforeTopEnd","afterTop","beforeBottom","beforeBottomEnd","afterBottom","fromViewportCenter","visiblePercent","opacity","scale","positionY","section","items","HTMLElement","nodeName","len","ret","apply","$","jQuery","$Plugin","Array","prototype","unshift","res","old$Plugin","fn","noConflict","querySelectorAll"],"mappings":";;;;;CAAA,SAAAA,EAAAC,GAAA,iBAAAC,SAAA,oBAAAC,OAAAA,OAAAD,QAAAD,IAAA,mBAAAG,QAAAA,OAAAC,IAAAD,OAAAH,IAAAD,EAAA,oBAAAM,WAAAA,WAAAN,GAAAO,MAAAC,SAAAP,GAAA,CAAA,CAAAQ,MAAA,WAAA,aAIA,SAASC,EAAMC,GACe,aAAxBC,SAASC,YAAqD,gBAAxBD,SAASC,WAEjDF,IAEAC,SAASE,iBAAiB,mBAAoBH,EAAU,CACtDI,SAAS,EACTC,MAAM,EACNC,SAAS,GAGf,CCbA,IAAIC,EAGFA,EADoB,oBAAXC,OACHA,OACqB,oBAAXC,OACVA,OACmB,oBAATb,KACVA,KAEA,CAAA,EAGR,IAAeW,EAAAA,ECdAG,EAAA,CAEbC,KAAM,SACNC,MAAO,GACPC,eAAgB,qBAChBC,OAAQ,KACRC,WAAY,gBACZC,QAAS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