code: function Viewer(element) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      classCallCheck(this, Viewer);
  
      if (!element || element.nodeType !== 1) {
        throw new Error('The first argument is required and must be an element.');
      }
  
      this.element = element;
      this.options = assign({}, DEFAULTS, isPlainObject(options) && options);
      this.action = false;
      this.fading = false;
      this.fulled = false;
      this.hiding = false;
      this.index = 0;
      this.isImg = false;
      this.length = 0;
      this.played = false;
      this.playing = false;
      this.pointers = {};
      this.ready = false;
      this.showing = false;
      this.timeout = false;
      this.tooltipping = false;
      this.viewed = false;
      this.viewing = false;
      this.isShown = false;
      this.wheeling = false;
      this.init();
    }
docs: Create a new Viewer.
  @param {Element} element - The target element for viewing.
  @param {Object} [options={}] - The configuration options.