import{Ed as e,Pd as t,zd as n}from"./index-Q5R6-AeA.js";var r=n(t(),1);function i(){let{search:t}=e(),n=(0,r.useMemo)(()=>new URLSearchParams(t),[t]),i=(0,r.useCallback)(()=>{if(window.history.pushState){let e=n.keys().next().done?``:`?${n.toString()}`,t=window.location.protocol+`//`+window.location.host+window.location.pathname+e;window.history.pushState({path:t},``,t)}},[n]);return{query:n,queryString:()=>n.toString(),get:e=>n?.get(e),set:(e,t)=>{t==null?n.delete(e):n.set(e,t),i()}}}export{i as t};