import o from "../../../../../../../../_virtual/window.js";
var n = "https://example.com", l = function(t, r) {
  if (/^[a-z]+:/i.test(r))
    return r;
  /^data:/.test(t) && (t = o.location && o.location.href || "");
  var i = /^\/\//.test(t), c = !o.location && !/\/\//i.test(t);
  t = new o.URL(t, o.location || n);
  var e = new URL(r, t);
  return c ? e.href.slice(n.length) : i ? e.href.slice(e.protocol.length) : e.href;
};
export {
  l as default
};
//# sourceMappingURL=resolve-url.js.map
