var e="";function setBasePath(t){e=t}function getBasePath(t=""){if(!e){const e=[...document.getElementsByTagName("script")],t=e.find((e=>e.hasAttribute("data-shoelace")));if(t)setBasePath(t.getAttribute("data-shoelace"));else{const t=e.find((e=>/shoelace(\.min)?\.js($|\?)/.test(e.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(e.src)));let s="";t&&(s=t.getAttribute("src")),setBasePath(s.split("/").slice(0,-1).join("/"))}}return e.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}export{setBasePath,getBasePath};