import { p as a } from "../.chunks/punycode.es6-CgGegfA_.es.js";
const s = (t, n = "download") => {
  const o = document.createElement("a");
  o.download = n, o.href = t, o.click();
}, i = (t, n) => {
  let o = 32;
  return n && (o = 120), t = t.replace(/^\w+:\/\/|^www\.|\/.*/g, ""), t = a.toASCII(t), '<img src="https://favicon.yandex.net/favicon/' + t + "?size=" + o + '" class="top-favicon empty" ' + `
		onload="
			var that = this;
			$.ajax({
				type:'get',
				url:this.src,
				success:function(res){ if(res.length > 100) that.className='top-favicon'; },
				error:function(){ }
			});
		"
	` + ' alt="">';
};
export {
  s as downloadImageFromString,
  i as genFaviconImgHtml
};
//# sourceMappingURL=image.js.map
