function vetUrl(url, base = VM_HOME, throwOnFailure) {
  let res, err;
  if (isDataUri(url)) {
    res = url;
  } else {
    res = tryUrl(url, base);
    err = !res ? 'Invalid'
      : (res.startsWith(extensionRoot) || testBlacklistNet(res)) && 'Blacklisted';
    if (err) {
      err = `${err} URL ${res || url}`;
      if (throwOnFailure) throw err;
      res = `data:,${err}`;
    }
  }
  return res;
}
@param {string} url
@param {string} [base]
@param {boolean} [throwOnFailure]
@returns {string} a resolved `url` or `data:,Invalid URL ${url}`