var { entries, setPrototypeOf, isFrozen, getPrototypeOf, getOwnPropertyDescriptor } = Object, { freeze, seal, create } = Object, { apply, construct } = typeof Reflect < "u" && Reflect;
freeze ||= function(e) {
	return e;
}, seal ||= function(e) {
	return e;
}, apply ||= function(e, t) {
	var n = [...arguments].slice(2);
	return e.apply(t, n);
}, construct ||= function(e) {
	return new e(...[...arguments].slice(1));
};
var arrayForEach = unapply(Array.prototype.forEach), arrayLastIndexOf = unapply(Array.prototype.lastIndexOf), arrayPop = unapply(Array.prototype.pop), arrayPush = unapply(Array.prototype.push), arraySplice = unapply(Array.prototype.splice), stringToLowerCase = unapply(String.prototype.toLowerCase), stringToString = unapply(String.prototype.toString), stringMatch = unapply(String.prototype.match), stringReplace = unapply(String.prototype.replace), stringIndexOf = unapply(String.prototype.indexOf), stringTrim = unapply(String.prototype.trim), objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty), regExpTest = unapply(RegExp.prototype.test), typeErrorCreate = unconstruct(TypeError);
function unapply(e) {
	return function(t) {
		t instanceof RegExp && (t.lastIndex = 0);
		var n = [...arguments].slice(1);
		return apply(e, t, n);
	};
}
function unconstruct(e) {
	return function() {
		return construct(e, [...arguments]);
	};
}
function addToSet(e, r) {
	let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
	setPrototypeOf && setPrototypeOf(e, null);
	let a = r.length;
	for (; a--;) {
		let t = r[a];
		if (typeof t == "string") {
			let e = i(t);
			e !== t && (isFrozen(r) || (r[a] = e), t = e);
		}
		e[t] = !0;
	}
	return e;
}
function cleanArray(e) {
	for (let t = 0; t < e.length; t++) objectHasOwnProperty(e, t) || (e[t] = null);
	return e;
}
function clone(t) {
	let n = create(null);
	for (let [r, i] of entries(t)) objectHasOwnProperty(t, r) && (Array.isArray(i) ? n[r] = cleanArray(i) : i && typeof i == "object" && i.constructor === Object ? n[r] = clone(i) : n[r] = i);
	return n;
}
function lookupGetter(e, t) {
	for (; e !== null;) {
		let n = getOwnPropertyDescriptor(e, t);
		if (n) {
			if (n.get) return unapply(n.get);
			if (typeof n.value == "function") return unapply(n.value);
		}
		e = getPrototypeOf(e);
	}
	function n() {
		return null;
	}
	return n;
}
var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), svg$1 = freeze(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), svgFilters = freeze([
	"feBlend",
	"feColorMatrix",
	"feComponentTransfer",
	"feComposite",
	"feConvolveMatrix",
	"feDiffuseLighting",
	"feDisplacementMap",
	"feDistantLight",
	"feDropShadow",
	"feFlood",
	"feFuncA",
	"feFuncB",
	"feFuncG",
	"feFuncR",
	"feGaussianBlur",
	"feImage",
	"feMerge",
	"feMergeNode",
	"feMorphology",
	"feOffset",
	"fePointLight",
	"feSpecularLighting",
	"feSpotLight",
	"feTile",
	"feTurbulence"
]), svgDisallowed = freeze([
	"animate",
	"color-profile",
	"cursor",
	"discard",
	"font-face",
	"font-face-format",
	"font-face-name",
	"font-face-src",
	"font-face-uri",
	"foreignobject",
	"hatch",
	"hatchpath",
	"mesh",
	"meshgradient",
	"meshpatch",
	"meshrow",
	"missing-glyph",
	"script",
	"set",
	"solidcolor",
	"unknown",
	"use"
]), mathMl$1 = freeze(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), mathMlDisallowed = freeze([
	"maction",
	"maligngroup",
	"malignmark",
	"mlongdiv",
	"mscarries",
	"mscarry",
	"msgroup",
	"mstack",
	"msline",
	"msrow",
	"semantics",
	"annotation",
	"annotation-xml",
	"mprescripts",
	"none"
]), text = freeze(["#text"]), html = freeze(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot".split(".")), svg = freeze(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), mathMl = freeze(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), xml = freeze([
	"xlink:href",
	"xml:id",
	"xlink:title",
	"xml:space",
	"xmlns:xlink"
]), MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm), ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm), TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm), DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/), ARIA_ATTR = seal(/^aria-[\-\w]+$/), IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i), ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), DOCTYPE_NAME = seal(/^html$/i), CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i), EXPRESSIONS = /* @__PURE__ */ Object.freeze({
	__proto__: null,
	ARIA_ATTR,
	ATTR_WHITESPACE,
	CUSTOM_ELEMENT,
	DATA_ATTR,
	DOCTYPE_NAME,
	ERB_EXPR,
	IS_ALLOWED_URI,
	IS_SCRIPT_OR_DATA,
	MUSTACHE_EXPR,
	TMPLIT_EXPR
}), NODE_TYPE = {
	element: 1,
	attribute: 2,
	text: 3,
	cdataSection: 4,
	entityReference: 5,
	entityNode: 6,
	progressingInstruction: 7,
	comment: 8,
	document: 9,
	documentType: 10,
	documentFragment: 11,
	notation: 12
}, getGlobal = function() {
	return typeof window > "u" ? null : window;
}, _createTrustedTypesPolicy = function(e, t) {
	if (typeof e != "object" || typeof e.createPolicy != "function") return null;
	let n = null, r = "data-tt-policy-suffix";
	t && t.hasAttribute(r) && (n = t.getAttribute(r));
	let i = "dompurify" + (n ? "#" + n : "");
	try {
		return e.createPolicy(i, {
			createHTML(e) {
				return e;
			},
			createScriptURL(e) {
				return e;
			}
		});
	} catch {
		return console.warn("TrustedTypes policy " + i + " could not be created."), null;
	}
}, _createHooksMap = function() {
	return {
		afterSanitizeAttributes: [],
		afterSanitizeElements: [],
		afterSanitizeShadowDOM: [],
		beforeSanitizeAttributes: [],
		beforeSanitizeElements: [],
		beforeSanitizeShadowDOM: [],
		uponSanitizeAttribute: [],
		uponSanitizeElement: [],
		uponSanitizeShadowNode: []
	};
};
function createDOMPurify() {
	let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), n = (e) => createDOMPurify(e);
	if (n.version = "3.3.1", n.removed = [], !t || !t.document || t.document.nodeType !== NODE_TYPE.document || !t.Element) return n.isSupported = !1, n;
	let { document: r } = t, i = r, o = i.currentScript, { DocumentFragment: c, HTMLTemplateElement: l, Node: d, Element: Fe, NodeFilter: f, NamedNodeMap: Ie = t.NamedNodeMap || t.MozNamedAttrMap, HTMLFormElement: Le, DOMParser: Re, trustedTypes: p } = t, m = Fe.prototype, ze = lookupGetter(m, "cloneNode"), Be = lookupGetter(m, "remove"), Ve = lookupGetter(m, "nextSibling"), He = lookupGetter(m, "childNodes"), h = lookupGetter(m, "parentNode");
	if (typeof l == "function") {
		let e = r.createElement("template");
		e.content && e.content.ownerDocument && (r = e.content.ownerDocument);
	}
	let g, _ = "", { implementation: v, createNodeIterator: Ue, createDocumentFragment: We, getElementsByTagName: Ge } = r, { importNode: Ke } = i, y = _createHooksMap();
	n.isSupported = typeof entries == "function" && typeof h == "function" && v && v.createHTMLDocument !== void 0;
	let { MUSTACHE_EXPR: b, ERB_EXPR: x, TMPLIT_EXPR: S, DATA_ATTR: qe, ARIA_ATTR: Je, IS_SCRIPT_OR_DATA: Ye, ATTR_WHITESPACE: Xe, CUSTOM_ELEMENT: Ze } = EXPRESSIONS, { IS_ALLOWED_URI: Qe } = EXPRESSIONS, C = null, $e = addToSet({}, [
		...html$1,
		...svg$1,
		...svgFilters,
		...mathMl$1,
		...text
	]), w = null, et = addToSet({}, [
		...html,
		...svg,
		...mathMl,
		...xml
	]), T = Object.seal(create(null, {
		tagNameCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		attributeNameCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		allowCustomizedBuiltInElements: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: !1
		}
	})), E = null, D = null, O = Object.seal(create(null, {
		tagCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		},
		attributeCheck: {
			writable: !0,
			configurable: !1,
			enumerable: !0,
			value: null
		}
	})), tt = !0, k = !0, nt = !1, rt = !0, A = !1, j = !0, M = !1, N = !1, P = !1, F = !1, I = !1, L = !1, it = !0, at = !1, ot = !0, R = !1, z = {}, B = null, st = addToSet({}, [
		"annotation-xml",
		"audio",
		"colgroup",
		"desc",
		"foreignobject",
		"head",
		"iframe",
		"math",
		"mi",
		"mn",
		"mo",
		"ms",
		"mtext",
		"noembed",
		"noframes",
		"noscript",
		"plaintext",
		"script",
		"style",
		"svg",
		"template",
		"thead",
		"title",
		"video",
		"xmp"
	]), ct = null, lt = addToSet({}, [
		"audio",
		"video",
		"img",
		"source",
		"image",
		"track"
	]), ut = null, dt = addToSet({}, [
		"alt",
		"class",
		"for",
		"id",
		"label",
		"name",
		"pattern",
		"placeholder",
		"role",
		"summary",
		"title",
		"value",
		"style",
		"xmlns"
	]), V = "http://www.w3.org/1998/Math/MathML", H = "http://www.w3.org/2000/svg", U = "http://www.w3.org/1999/xhtml", W = U, ft = !1, pt = null, mt = addToSet({}, [
		V,
		H,
		U
	], stringToString), G = addToSet({}, [
		"mi",
		"mo",
		"mn",
		"ms",
		"mtext"
	]), K = addToSet({}, ["annotation-xml"]), ht = addToSet({}, [
		"title",
		"style",
		"font",
		"a",
		"script"
	]), q = null, gt = ["application/xhtml+xml", "text/html"], J = null, Y = null, _t = r.createElement("form"), vt = function(e) {
		return e instanceof RegExp || e instanceof Function;
	}, yt = function() {
		let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
		if (!(Y && Y === e)) {
			if ((!e || typeof e != "object") && (e = {}), e = clone(e), q = gt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, J = q === "application/xhtml+xml" ? stringToString : stringToLowerCase, C = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, J) : $e, w = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, J) : et, pt = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : mt, ut = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(dt), e.ADD_URI_SAFE_ATTR, J) : dt, ct = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(lt), e.ADD_DATA_URI_TAGS, J) : lt, B = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, J) : st, E = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, J) : clone({}), D = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, J) : clone({}), z = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, tt = e.ALLOW_ARIA_ATTR !== !1, k = e.ALLOW_DATA_ATTR !== !1, nt = e.ALLOW_UNKNOWN_PROTOCOLS || !1, rt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, A = e.SAFE_FOR_TEMPLATES || !1, j = e.SAFE_FOR_XML !== !1, M = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, I = e.RETURN_DOM_FRAGMENT || !1, L = e.RETURN_TRUSTED_TYPE || !1, P = e.FORCE_BODY || !1, it = e.SANITIZE_DOM !== !1, at = e.SANITIZE_NAMED_PROPS || !1, ot = e.KEEP_CONTENT !== !1, R = e.IN_PLACE || !1, Qe = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, W = e.NAMESPACE || U, G = e.MATHML_TEXT_INTEGRATION_POINTS || G, K = e.HTML_INTEGRATION_POINTS || K, T = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (T.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && vt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (T.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), A && (k = !1), I && (F = !0), z && (C = addToSet({}, text), w = [], z.html === !0 && (addToSet(C, html$1), addToSet(w, html)), z.svg === !0 && (addToSet(C, svg$1), addToSet(w, svg), addToSet(w, xml)), z.svgFilters === !0 && (addToSet(C, svgFilters), addToSet(w, svg), addToSet(w, xml)), z.mathMl === !0 && (addToSet(C, mathMl$1), addToSet(w, mathMl), addToSet(w, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? O.tagCheck = e.ADD_TAGS : (C === $e && (C = clone(C)), addToSet(C, e.ADD_TAGS, J))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? O.attributeCheck = e.ADD_ATTR : (w === et && (w = clone(w)), addToSet(w, e.ADD_ATTR, J))), e.ADD_URI_SAFE_ATTR && addToSet(ut, e.ADD_URI_SAFE_ATTR, J), e.FORBID_CONTENTS && (B === st && (B = clone(B)), addToSet(B, e.FORBID_CONTENTS, J)), e.ADD_FORBID_CONTENTS && (B === st && (B = clone(B)), addToSet(B, e.ADD_FORBID_CONTENTS, J)), ot && (C["#text"] = !0), M && addToSet(C, [
				"html",
				"head",
				"body"
			]), C.table && (addToSet(C, ["tbody"]), delete E.tbody), e.TRUSTED_TYPES_POLICY) {
				if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
				if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
				g = e.TRUSTED_TYPES_POLICY, _ = g.createHTML("");
			} else g === void 0 && (g = _createTrustedTypesPolicy(p, o)), g !== null && typeof _ == "string" && (_ = g.createHTML(""));
			freeze && freeze(e), Y = e;
		}
	}, bt = addToSet({}, [
		...svg$1,
		...svgFilters,
		...svgDisallowed
	]), xt = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), St = function(e) {
		let t = h(e);
		(!t || !t.tagName) && (t = {
			namespaceURI: W,
			tagName: "template"
		});
		let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
		return pt[e.namespaceURI] ? e.namespaceURI === H ? t.namespaceURI === U ? n === "svg" : t.namespaceURI === V ? n === "svg" && (r === "annotation-xml" || G[r]) : !!bt[n] : e.namespaceURI === V ? t.namespaceURI === U ? n === "math" : t.namespaceURI === H ? n === "math" && K[r] : !!xt[n] : e.namespaceURI === U ? t.namespaceURI === H && !K[r] || t.namespaceURI === V && !G[r] ? !1 : !xt[n] && (ht[n] || !bt[n]) : !!(q === "application/xhtml+xml" && pt[e.namespaceURI]) : !1;
	}, X = function(e) {
		arrayPush(n.removed, { element: e });
		try {
			h(e).removeChild(e);
		} catch {
			Be(e);
		}
	}, Z = function(e, t) {
		try {
			arrayPush(n.removed, {
				attribute: t.getAttributeNode(e),
				from: t
			});
		} catch {
			arrayPush(n.removed, {
				attribute: null,
				from: t
			});
		}
		if (t.removeAttribute(e), e === "is") if (F || I) try {
			X(t);
		} catch {}
		else try {
			t.setAttribute(e, "");
		} catch {}
	}, Ct = function(e) {
		let t = null, n = null;
		if (P) e = "<remove></remove>" + e;
		else {
			let t = stringMatch(e, /^[\r\n\t ]+/);
			n = t && t[0];
		}
		q === "application/xhtml+xml" && W === U && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
		let i = g ? g.createHTML(e) : e;
		if (W === U) try {
			t = new Re().parseFromString(i, q);
		} catch {}
		if (!t || !t.documentElement) {
			t = v.createDocument(W, "template", null);
			try {
				t.documentElement.innerHTML = ft ? _ : i;
			} catch {}
		}
		let a = t.body || t.documentElement;
		return e && n && a.insertBefore(r.createTextNode(n), a.childNodes[0] || null), W === U ? Ge.call(t, M ? "html" : "body")[0] : M ? t.documentElement : a;
	}, wt = function(e) {
		return Ue.call(e.ownerDocument || e, e, f.SHOW_ELEMENT | f.SHOW_COMMENT | f.SHOW_TEXT | f.SHOW_PROCESSING_INSTRUCTION | f.SHOW_CDATA_SECTION, null);
	}, Q = function(e) {
		return e instanceof Le && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Ie) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
	}, Tt = function(e) {
		return typeof d == "function" && e instanceof d;
	};
	function $(e, t, r) {
		arrayForEach(e, (e) => {
			e.call(n, t, r, Y);
		});
	}
	let Et = function(e) {
		let t = null;
		if ($(y.beforeSanitizeElements, e, null), Q(e)) return X(e), !0;
		let r = J(e.nodeName);
		if ($(y.uponSanitizeElement, e, {
			tagName: r,
			allowedTags: C
		}), j && e.hasChildNodes() && !Tt(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || j && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return X(e), !0;
		if (!(O.tagCheck instanceof Function && O.tagCheck(r)) && (!C[r] || E[r])) {
			if (!E[r] && Ot(r) && (T.tagNameCheck instanceof RegExp && regExpTest(T.tagNameCheck, r) || T.tagNameCheck instanceof Function && T.tagNameCheck(r))) return !1;
			if (ot && !B[r]) {
				let t = h(e) || e.parentNode, n = He(e) || e.childNodes;
				if (n && t) {
					let r = n.length;
					for (let i = r - 1; i >= 0; --i) {
						let r = ze(n[i], !0);
						r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Ve(e));
					}
				}
			}
			return X(e), !0;
		}
		return e instanceof Fe && !St(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (X(e), !0) : (A && e.nodeType === NODE_TYPE.text && (t = e.textContent, arrayForEach([
			b,
			x,
			S
		], (e) => {
			t = stringReplace(t, e, " ");
		}), e.textContent !== t && (arrayPush(n.removed, { element: e.cloneNode() }), e.textContent = t)), $(y.afterSanitizeElements, e, null), !1);
	}, Dt = function(e, t, n) {
		if (it && (t === "id" || t === "name") && (n in r || n in _t)) return !1;
		if (!(k && !D[t] && regExpTest(qe, t)) && !(tt && regExpTest(Je, t)) && !(O.attributeCheck instanceof Function && O.attributeCheck(t, e))) {
			if (!w[t] || D[t]) {
				if (!(Ot(e) && (T.tagNameCheck instanceof RegExp && regExpTest(T.tagNameCheck, e) || T.tagNameCheck instanceof Function && T.tagNameCheck(e)) && (T.attributeNameCheck instanceof RegExp && regExpTest(T.attributeNameCheck, t) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(t, e)) || t === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && regExpTest(T.tagNameCheck, n) || T.tagNameCheck instanceof Function && T.tagNameCheck(n)))) return !1;
			} else if (!ut[t] && !regExpTest(Qe, stringReplace(n, Xe, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(n, "data:") === 0 && ct[e]) && !(nt && !regExpTest(Ye, stringReplace(n, Xe, ""))) && n) return !1;
		}
		return !0;
	}, Ot = function(e) {
		return e !== "annotation-xml" && stringMatch(e, Ze);
	}, kt = function(e) {
		$(y.beforeSanitizeAttributes, e, null);
		let { attributes: t } = e;
		if (!t || Q(e)) return;
		let r = {
			attrName: "",
			attrValue: "",
			keepAttr: !0,
			allowedAttributes: w,
			forceKeepAttr: void 0
		}, i = t.length;
		for (; i--;) {
			let { name: a, namespaceURI: o, value: s } = t[i], c = J(a), l = s, u = a === "value" ? l : stringTrim(l);
			if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, $(y.uponSanitizeAttribute, e, r), u = r.attrValue, at && (c === "id" || c === "name") && (Z(a, e), u = "user-content-" + u), j && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
				Z(a, e);
				continue;
			}
			if (c === "attributename" && stringMatch(u, "href")) {
				Z(a, e);
				continue;
			}
			if (r.forceKeepAttr) continue;
			if (!r.keepAttr) {
				Z(a, e);
				continue;
			}
			if (!rt && regExpTest(/\/>/i, u)) {
				Z(a, e);
				continue;
			}
			A && arrayForEach([
				b,
				x,
				S
			], (e) => {
				u = stringReplace(u, e, " ");
			});
			let Pe = J(e.nodeName);
			if (!Dt(Pe, c, u)) {
				Z(a, e);
				continue;
			}
			if (g && typeof p == "object" && typeof p.getAttributeType == "function" && !o) switch (p.getAttributeType(Pe, c)) {
				case "TrustedHTML":
					u = g.createHTML(u);
					break;
				case "TrustedScriptURL":
					u = g.createScriptURL(u);
					break;
			}
			if (u !== l) try {
				o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), Q(e) ? X(e) : arrayPop(n.removed);
			} catch {
				Z(a, e);
			}
		}
		$(y.afterSanitizeAttributes, e, null);
	}, At = function e(t) {
		let n = null, r = wt(t);
		for ($(y.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) $(y.uponSanitizeShadowNode, n, null), Et(n), kt(n), n.content instanceof c && e(n.content);
		$(y.afterSanitizeShadowDOM, t, null);
	};
	return n.sanitize = function(e) {
		let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, a = null, o = null, s = null;
		if (ft = !e, ft && (e = "<!-->"), typeof e != "string" && !Tt(e)) if (typeof e.toString == "function") {
			if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
		} else throw typeErrorCreate("toString is not a function");
		if (!n.isSupported) return e;
		if (N || yt(t), n.removed = [], typeof e == "string" && (R = !1), R) {
			if (e.nodeName) {
				let t = J(e.nodeName);
				if (!C[t] || E[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
			}
		} else if (e instanceof d) r = Ct("<!---->"), a = r.ownerDocument.importNode(e, !0), a.nodeType === NODE_TYPE.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? r = a : r.appendChild(a);
		else {
			if (!F && !A && !M && e.indexOf("<") === -1) return g && L ? g.createHTML(e) : e;
			if (r = Ct(e), !r) return F ? null : L ? _ : "";
		}
		r && P && X(r.firstChild);
		let l = wt(R ? e : r);
		for (; o = l.nextNode();) Et(o), kt(o), o.content instanceof c && At(o.content);
		if (R) return e;
		if (F) {
			if (I) for (s = We.call(r.ownerDocument); r.firstChild;) s.appendChild(r.firstChild);
			else s = r;
			return (w.shadowroot || w.shadowrootmode) && (s = Ke.call(i, s, !0)), s;
		}
		let u = M ? r.outerHTML : r.innerHTML;
		return M && C["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, r.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + u), A && arrayForEach([
			b,
			x,
			S
		], (e) => {
			u = stringReplace(u, e, " ");
		}), g && L ? g.createHTML(u) : u;
	}, n.setConfig = function() {
		yt(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), N = !0;
	}, n.clearConfig = function() {
		Y = null, N = !1;
	}, n.isValidAttribute = function(e, t, n) {
		return Y || yt({}), Dt(J(e), J(t), n);
	}, n.addHook = function(e, t) {
		typeof t == "function" && arrayPush(y[e], t);
	}, n.removeHook = function(e, t) {
		if (t !== void 0) {
			let n = arrayLastIndexOf(y[e], t);
			return n === -1 ? void 0 : arraySplice(y[e], n, 1)[0];
		}
		return arrayPop(y[e]);
	}, n.removeHooks = function(e) {
		y[e] = [];
	}, n.removeAllHooks = function() {
		y = _createHooksMap();
	}, n;
}
var purify = createDOMPurify();
export { purify };
