var c=Object.defineProperty;var o=(e,r)=>c(e,"name",{value:r,configurable:!0});var n=Object.defineProperty,t=o((e,r)=>n(e,"name",{value:r,configurable:!0}),"s");const p=t(e=>e?Array.isArray(e)?e:[e]:[],"toStringArray"),g=t(e=>e instanceof Error?e.message:typeof e=="string"?e:String(e),"errorMessage"),v=/^(.+?)(?:@(.+))?$/,m=t(e=>{if(e.startsWith("@")){const i=e.indexOf("/");if(i===-1)return{name:e,versionSpec:void 0};const a=e.slice(i+1),s=a.indexOf("@");return s===-1?{name:e,versionSpec:void 0}:{name:e.slice(0,i+1+s),versionSpec:a.slice(s+1)}}const r=v.exec(e);return r?{name:r[1]??e,versionSpec:r[2]}:{name:e,versionSpec:void 0}},"parsePackageArgument");export{m as d,g as f,p as o};
