var o=/^[A-Za-z]:[/\\]/,m=/^[A-Za-z][\dA-Za-z+.-]*:\/\//;const d={isAbsolute:i=>i.startsWith("/")||i.startsWith("\\")||o.test(i)||m.test(i),dirname:i=>r.guessDeliminator(i).dirname(i),basename:i=>r.guessDeliminator(i).basename(i),rest:(i,t)=>r.guessDeliminator(i).rest(i,t),extension:i=>{let t=i.split(".");return t.length===1?"":t.at(-1)??""}};var r=class a{constructor(t){this.deliminator=t}static guessDeliminator(t){return t.includes("/")?new a("/"):new a("\\")}join(...t){return t.filter(Boolean).join(this.deliminator)}basename(t){return t.split(this.deliminator).pop()??""}rest(t,s){let n=t.split(this.deliminator),l=s.split(this.deliminator),e=0;for(;e<n.length&&e<l.length&&n[e]===l[e];++e);return n.slice(e).join(this.deliminator)}dirname(t){let s=t.split(this.deliminator);return s.pop(),s.join(this.deliminator)}};export{d as n,r as t};
