import { getConfig as r } from "@das-fed/utils/config";
const c = (t) => {
  let { baseURL: i, publicPath: n = "" } = r();
  if (document.getElementById(t)) return;
  const e = document.createElement("script");
  return t.startsWith("/") && (t = `${i}/${n}/${t}`), t = t.replace(/\/\//g, "/").replace(/\/\//g, "/").replace("http:/", "http://").replace("https:/", "https://"), e.src = t, e.id = t, document.body.appendChild(e), new Promise((o, p) => {
    e.onload = o, e.onerror = p;
  });
};
export {
  c as loadJs
};
