import{a as s}from"./chunk-352L4K62.js";function o(n){let p=[...n],e=p.pop(),t;if(n.length===0)return null;if(p.length===0)t=new s("",{});else{t=p.reduce((i,r)=>(i.path=i.path+"/"+r.path,i),new s("",{}));let h=t.path.split("..");h.length!==-1&&(t.path=h[h.length-1]),t.path=t.path.slice(1)}return{consumed:n,posParams:{id:e,description:t}}}function c(n){let p=[...n],e;if(n.length===0)e=new s("",{});else{e=p.reduce((h,i)=>(h.path=`${h.path}/${i.path}`,h),new s("",{}));let t=e.path.split("..");t.length!==-1&&(e.path=t[t.length-1]),e.path=e.path.slice(1)}return{consumed:n,posParams:{description:e}}}export{o as a,c as b};