dist/glide.esm.js
function collect() {
      var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var slides = Components.Html.slides;
      var _Glide$settings = Glide.settings,
          perView = _Glide$settings.perView,
          classes = _Glide$settings.classes;


      var peekIncrementer = +!!Glide.settings.peek;
      var part = perView + peekIncrementer;
      var start = slides.slice(0, part);
      var end = slides.slice(-part);

      for (var r = 0; r < Math.max(1, Math.floor(perView / slides.length)); r++) {
        for (var i = 0; i < start.length; i++) {
          var clone = start[i].cloneNode(true);

          clone.classList.add(classes.cloneSlide);

          items.push(clone);
        }

        for (var _i = 0; _i < end.length; _i++) {
          var _clone = end[_i].cloneNode(true);

          _clone.classList.add(classes.cloneSlide);

          items.unshift(_clone);
        }
      }

      return items;
    }
function collect() {
      var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var slides = Components.Html.slides;
      var _Glide$settings = Glide.settings,
          perView = _Glide$settings.perView,
          classes = _Glide$settings.classes;


      var peekIncrementer = +!!Glide.settings.peek;
      var part = perView + peekIncrementer;
      var start = slides.slice(0, part);
      var end = slides.slice(-part);

      for (var r = 0; r < Math.max(1, Math.floor(perView / slides.length)); r++) {
        for (var i = 0; i < start.length; i++) {
          var clone = start[i].cloneNode(true);

          clone.classList.add(classes.cloneSlide);

          items.push(clone);
        }

        for (var _i = 0; _i < end.length; _i++) {
          var _clone = end[_i].cloneNode(true);

          _clone.classList.add(classes.cloneSlide);

          items.unshift(_clone);
        }
      }

      return items;
    }
function collect ( ) { var items = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : [ ] ; var slides = Components . Html . slides ; var _Glide$settings = Glide . settings , perView = _Glide$settings . perView , classes = _Glide$settings . classes ; var peekIncrementer = + ! ! Glide . settings . peek ; var part = perView + peekIncrementer ; var start = slides . slice ( 0 , part ) ; var end = slides . slice ( - part ) ; for ( var r = 0 ; r < Math . max ( 1 , Math . floor ( perView / slides . length ) ) ; r ++ ) { for ( var i = 0 ; i < start . length ; i ++ ) { var clone = start [ i ] . cloneNode ( true ) ; clone . classList . add ( classes . cloneSlide ) ; items . push ( clone ) ; } for ( var _i = 0 ; _i < end . length ; _i ++ ) { var _clone = end [ _i ] . cloneNode ( true ) ; _clone . classList . add ( classes . cloneSlide ) ; items . unshift ( _clone ) ; } } return items ; }
Collect clones with pattern.

@return {Void}
Collect clones with pattern .