function e(e){let t=String(e||``).trim();if(!t)return``;try{if(/^https?:\/\//i.test(t)){let e=new URL(t);return e.pathname.includes(`/storage/`)?`${window.location.origin}${e.pathname}${e.search}`:t}if(t.startsWith(`/storage/`)||t.startsWith(`/`))return`${window.location.origin}${t}`;let e=t.replace(/^\/+/,``);return`${window.location.origin}/storage/${e}`}catch{return t}}export{e as t};