function ScrollManager() {
      var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
          _ref2$xOffset = _ref2.xOffset,
          xOffset = _ref2$xOffset === void 0 ? 0 : _ref2$xOffset,
          _ref2$yOffset = _ref2.yOffset,
          yOffset = _ref2$yOffset === void 0 ? 0 : _ref2$yOffset,
          _ref2$lastXDelta = _ref2.lastXDelta,
          lastXDelta = _ref2$lastXDelta === void 0 ? 0 : _ref2$lastXDelta,
          _ref2$lastYDelta = _ref2.lastYDelta,
          lastYDelta = _ref2$lastYDelta === void 0 ? 0 : _ref2$lastYDelta,
          _ref2$shouldWatch = _ref2.shouldWatch,
          shouldWatch = _ref2$shouldWatch === void 0 ? true : _ref2$shouldWatch,
          _ref2$onScroll = _ref2.onScroll,
          onScroll = _ref2$onScroll === void 0 ? function () {} : _ref2$onScroll;

      _classCallCheck(this, ScrollManager);

      this.xOffset = xOffset;
      this.yOffset = yOffset;
      this.lastXDelta = lastXDelta;
      this.lastYDelta = lastYDelta;
      this.shouldWatch = shouldWatch;
      this.onScroll = onScroll; // keep a ref to our scroll event

      this.handler = this.scroll.bind(this, true);

      if (this.shouldWatch) {
        window.addEventListener("scroll", this.handler, {
          passive: true
        });
      }
    }
Here we create a ScrollManager class object
   This keeps track of our scroll position, scroll deltas and triggers an onScroll callback
   Could either listen to the native scroll event or be hooked to any scroll (natural or virtual) scroll event
     params:
   @xOffset (float): scroll along X axis
   @yOffset (float): scroll along Y axis
   @lastXDelta (float): last scroll delta along X axis
   @lastYDelta (float): last scroll delta along Y axis
     @shouldWatch (bool): if the scroll manager should listen to the scroll event or not. Default to true.
     @onScroll (function): callback to execute each time the scroll values changed
     returns:
   @this: our ScrollManager class object
*