'use strict';

var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
require('./web.dom.iterable-d98303e0.js');
var core_getIteratorMethod = require('./core.get-iterator-method-5643aa10.js');

var ITERATOR = core_getIteratorMethod._wks('iterator');

var core_isIterable = core_getIteratorMethod._core.isIterable = function (it) {
  var O = Object(it);
  return O[ITERATOR] !== undefined
    || '@@iterator' in O
    // eslint-disable-next-line no-prototype-builtins
    || core_getIteratorMethod._iterators.hasOwnProperty(core_getIteratorMethod._classof(O));
};

var isIterable$1 = core_isIterable;

var isIterable = _commonjsHelpers.createCommonjsModule(function (module) {
module.exports = { "default": isIterable$1, __esModule: true };
});

_commonjsHelpers.unwrapExports(isIterable);

var core_getIterator = core_getIteratorMethod._core.getIterator = function (it) {
  var iterFn = core_getIteratorMethod.core_getIteratorMethod(it);
  if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!');
  return core_getIteratorMethod._anObject(iterFn.call(it));
};

var getIterator$1 = core_getIterator;

var getIterator = _commonjsHelpers.createCommonjsModule(function (module) {
module.exports = { "default": getIterator$1, __esModule: true };
});

var _getIterator = _commonjsHelpers.unwrapExports(getIterator);

var slicedToArray = _commonjsHelpers.createCommonjsModule(function (module, exports) {

exports.__esModule = true;



var _isIterable3 = _interopRequireDefault(isIterable);



var _getIterator3 = _interopRequireDefault(getIterator);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  function sliceIterator(arr, i) {
    var _arr = [];
    var _n = true;
    var _d = false;
    var _e = undefined;

    try {
      for (var _i = (0, _getIterator3.default)(arr), _s; !(_n = (_s = _i.next()).done); _n = true) {
        _arr.push(_s.value);

        if (i && _arr.length === i) break;
      }
    } catch (err) {
      _d = true;
      _e = err;
    } finally {
      try {
        if (!_n && _i["return"]) _i["return"]();
      } finally {
        if (_d) throw _e;
      }
    }

    return _arr;
  }

  return function (arr, i) {
    if (Array.isArray(arr)) {
      return arr;
    } else if ((0, _isIterable3.default)(Object(arr))) {
      return sliceIterator(arr, i);
    } else {
      throw new TypeError("Invalid attempt to destructure non-iterable instance");
    }
  };
}();
});

var _slicedToArray = _commonjsHelpers.unwrapExports(slicedToArray);

exports._getIterator = _getIterator;
exports._slicedToArray = _slicedToArray;
