var J=Object.create,b=Object.defineProperty,C=Object.getOwnPropertyDescriptor,D=Object.getOwnPropertyNames,L=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,M=(e,t)=>()=>(e&&(t=e(e=0)),t),R=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h=(e,t)=>{let r={};for(var u in e)b(r,u,{get:e[u],enumerable:!0});return t||b(r,Symbol.toStringTag,{value:"Module"}),r},E=(e,t,r,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=D(t),c=0,m=o.length,n;c<m;c++)n=o[c],!j.call(e,n)&&n!==r&&b(e,n,{get:(l=>t[l]).bind(null,n),enumerable:!(u=C(t,n))||u.enumerable});return e},$=(e,t,r)=>(r=e!=null?J(L(e)):{},E(t||!e||!e.__esModule?b(r,"default",{value:e,enumerable:!0}):r,e)),F=e=>j.call(e,"module.exports")?e["module.exports"]:E(b({},"__esModule",{value:!0}),e),V=h({default:()=>N,pMapSkip:()=>y});async function N(e,t,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:u=!0,signal:o}={}){return new Promise((c,m)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(r)&&r>=1||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);const n=[],l=[],d=new Map;let O=!1,f=!1,P=!1,v=0,w=0;const T=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),I=()=>{s(o.reason)},x=()=>{o?.removeEventListener("abort",I)},S=a=>{c(a),x()},s=a=>{O=!0,f=!0,m(a),x()};o&&(o.aborted&&s(o.reason),o.addEventListener("abort",I,{once:!0}));const g=async()=>{if(f)return;const a=await T.next(),_=w;if(w++,a.done){if(P=!0,v===0&&!f){if(!u&&l.length>0){s(new AggregateError(l));return}if(f=!0,d.size===0){S(n);return}const i=[];for(const[p,A]of n.entries())d.get(p)!==y&&i.push(A);S(i)}return}v++,(async()=>{try{const i=await a.value;if(f)return;const p=await t(i,_);p===y&&d.set(_,p),n[_]=p,v--,await g()}catch(i){if(u)s(i);else{l.push(i),v--;try{await g()}catch(p){s(p)}}}})()};(async()=>{for(let a=0;a<r;a++){try{await g()}catch(_){s(_);break}if(P||O)break}})()})}var y,Y=M((()=>{y=Symbol("skip")}));Object.defineProperty(exports,"__commonJSMin",{enumerable:!0,get:function(){return R}});Object.defineProperty(exports,"__esmMin",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"__exportAll",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"__toCommonJS",{enumerable:!0,get:function(){return F}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return $}});Object.defineProperty(exports,"init_p_map",{enumerable:!0,get:function(){return Y}});Object.defineProperty(exports,"pMap",{enumerable:!0,get:function(){return N}});Object.defineProperty(exports,"p_map_exports",{enumerable:!0,get:function(){return V}});

//# sourceMappingURL=p-map-iLLJQmmj.cjs.map