code: function getMaxOffset({ items, slideWidth }) {
      if (!items.length) {
          return 0;
      }
      return Math.max(items[items.length - 1].right - slideWidth, 0) || 0;
  }
docs: Given the current widget state, finds the last valid offset.
  
  @param {object} state The widget state.
  @return {number}