const n=(t,r,e)=>{const a=new URLSearchParams(r.toString());return e.forEach(s=>{a.delete(s),c(t,s).forEach(o=>a.append(s,o))}),a},c=(t,r)=>t.filter(e=>e.lead===r||r==="query"&&e.quoteValue).map(e=>e.value),u=(t,r)=>{const e=[];return r.forEach(a=>e.push(...t.getAll(a).map(s=>a==="query"?{quoteValue:!0,value:s}:{lead:a,value:s}))),e};export{n as p,u as s};
