import{__exports as r}from"../../../_virtual/es.iterator.flat-map.mjs";import{__require as t}from"../internals/export.mjs";import{__require as e}from"../internals/function-call.mjs";import{__require as i}from"../internals/a-callable.mjs";import{__require as a}from"../internals/an-object.mjs";import{__require as n}from"../internals/get-iterator-direct.mjs";import{__require as o}from"../internals/get-iterator-flattenable.mjs";import{__require as s}from"../internals/iterator-create-proxy.mjs";import{__require as l}from"../internals/iterator-close.mjs";import{__require as m}from"../internals/is-pure.mjs";import{__require as u}from"../internals/iterator-helper-throws-on-invalid-iterator.mjs";import{__require as p}from"../internals/iterator-helper-without-closing-on-early-error.mjs";var f;function _(){if(f)return r;f=1;var _=t(),c=e(),h=i(),j=a(),q=n(),v=o(),y=s(),w=l(),x=m(),d=u(),M=p();var g=!x&&!d("flatMap",function(){}),b=!x&&!g&&M("flatMap",TypeError),I=x||g||b||function(){try{var r=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(r){return r});r.next(),r.return()}catch(r){return!0}}(),E=y(function(){for(var r,t,e=this.iterator,i=this.mapper;;){if(t=this.inner)try{if(!(r=j(c(t.next,t.iterator))).done)return r.value;this.inner=null}catch(r){w(e,"throw",r)}if(r=j(c(this.next,e)),this.done=!!r.done)return;try{this.inner=v(i(r.value,this.counter++),!1)}catch(r){w(e,"throw",r)}}});return _({target:"Iterator",proto:!0,real:!0,forced:I},{flatMap:function(r){j(this);try{h(r)}catch(r){w(this,"throw",r)}return b?c(b,this,r):new E(q(this),{mapper:r,inner:null})}}),r}export{_ as __require};