System.register(["__unresolved_0", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7", "__unresolved_8", "__unresolved_9", "__unresolved_10", "__unresolved_11", "__unresolved_12", "__unresolved_13", "__unresolved_14"], function (_export, _context) {
  "use strict";

  var _req, _req2, _req3, _req4, _req5, _req6, _req7, _req8, _req9, _req10, _req11, _req12, _req13, _req14, _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _req = _unresolved_.__cjsMetaURL;
    }, function (_unresolved_2) {
      _req2 = _unresolved_2.__cjsMetaURL;
    }, function (_unresolved_3) {
      _req3 = _unresolved_3.__cjsMetaURL;
    }, function (_unresolved_4) {
      _req4 = _unresolved_4.__cjsMetaURL;
    }, function (_unresolved_5) {
      _req5 = _unresolved_5.__cjsMetaURL;
    }, function (_unresolved_6) {
      _req6 = _unresolved_6.__cjsMetaURL;
    }, function (_unresolved_7) {
      _req7 = _unresolved_7.__cjsMetaURL;
    }, function (_unresolved_8) {
      _req8 = _unresolved_8.__cjsMetaURL;
    }, function (_unresolved_9) {
      _req9 = _unresolved_9.__cjsMetaURL;
    }, function (_unresolved_10) {
      _req10 = _unresolved_10.__cjsMetaURL;
    }, function (_unresolved_11) {
      _req11 = _unresolved_11.__cjsMetaURL;
    }, function (_unresolved_12) {
      _req12 = _unresolved_12.__cjsMetaURL;
    }, function (_unresolved_13) {
      _req13 = _unresolved_13.__cjsMetaURL;
    }, function (_unresolved_14) {
      _req14 = _unresolved_14.__cjsMetaURL;
    }, function (_unresolved_15) {
      _loader = _unresolved_15.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        var require = _loader.createRequireWithReqMap({
          "../internals/export": _req,
          "../internals/function-call": _req2,
          "../internals/is-pure": _req3,
          "../internals/function-name": _req4,
          "../internals/is-callable": _req5,
          "../internals/create-iterator-constructor": _req6,
          "../internals/object-get-prototype-of": _req7,
          "../internals/object-set-prototype-of": _req8,
          "../internals/set-to-string-tag": _req9,
          "../internals/create-non-enumerable-property": _req10,
          "../internals/redefine": _req11,
          "../internals/well-known-symbol": _req12,
          "../internals/iterators": _req13,
          "../internals/iterators-core": _req14
        }, _require);

        (function () {
          var $ = require('../internals/export');

          var call = require('../internals/function-call');

          var IS_PURE = require('../internals/is-pure');

          var FunctionName = require('../internals/function-name');

          var isCallable = require('../internals/is-callable');

          var createIteratorConstructor = require('../internals/create-iterator-constructor');

          var getPrototypeOf = require('../internals/object-get-prototype-of');

          var setPrototypeOf = require('../internals/object-set-prototype-of');

          var setToStringTag = require('../internals/set-to-string-tag');

          var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');

          var redefine = require('../internals/redefine');

          var wellKnownSymbol = require('../internals/well-known-symbol');

          var Iterators = require('../internals/iterators');

          var IteratorsCore = require('../internals/iterators-core');

          var PROPER_FUNCTION_NAME = FunctionName.PROPER;
          var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
          var IteratorPrototype = IteratorsCore.IteratorPrototype;
          var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
          var ITERATOR = wellKnownSymbol('iterator');
          var KEYS = 'keys';
          var VALUES = 'values';
          var ENTRIES = 'entries';

          var returnThis = function returnThis() {
            return this;
          };

          module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
            createIteratorConstructor(IteratorConstructor, NAME, next);

            var getIterationMethod = function getIterationMethod(KIND) {
              if (KIND === DEFAULT && defaultIterator) return defaultIterator;
              if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];

              switch (KIND) {
                case KEYS:
                  return function keys() {
                    return new IteratorConstructor(this, KIND);
                  };

                case VALUES:
                  return function values() {
                    return new IteratorConstructor(this, KIND);
                  };

                case ENTRIES:
                  return function entries() {
                    return new IteratorConstructor(this, KIND);
                  };
              }

              return function () {
                return new IteratorConstructor(this);
              };
            };

            var TO_STRING_TAG = NAME + ' Iterator';
            var INCORRECT_VALUES_NAME = false;
            var IterablePrototype = Iterable.prototype;
            var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT];
            var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
            var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
            var CurrentIteratorPrototype, methods, KEY; // fix native

            if (anyNativeIterator) {
              CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));

              if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
                if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
                  if (setPrototypeOf) {
                    setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
                  } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
                    redefine(CurrentIteratorPrototype, ITERATOR, returnThis);
                  }
                } // Set @@toStringTag to native iterators


                setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
                if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
              }
            } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF


            if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
              if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
                createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
              } else {
                INCORRECT_VALUES_NAME = true;

                defaultIterator = function values() {
                  return call(nativeIterator, this);
                };
              }
            } // export additional methods


            if (DEFAULT) {
              methods = {
                values: getIterationMethod(VALUES),
                keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
                entries: getIterationMethod(ENTRIES)
              };
              if (FORCED) for (KEY in methods) {
                if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
                  redefine(IterablePrototype, KEY, methods[KEY]);
                }
              } else $({
                target: NAME,
                proto: true,
                forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME
              }, methods);
            } // define iterator


            if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
              redefine(IterablePrototype, ITERATOR, defaultIterator, {
                name: DEFAULT
              });
            }

            Iterators[NAME] = defaultIterator;
            return methods;
          };
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=define-iterator.js.map