import{promiseMapLimit as f}from"./promise-map-limit.js";async function m(s,i,n,a){const t=await f(s,i,async r=>{try{return await n(r),{status:"ok"}}catch(o){const e=o instanceof Error?o:new Error(String(o));return a?.error("Processing failed for item:",e),{status:"error",error:e}}}),c=t.filter(r=>r.status==="ok").length,u=t.filter(r=>r.status==="error").length;return{result:t,count:{ok:c,failed:u}}}export{m as promiseMapLimitWithStatus};
