import { defineComponent as qt, useCssVars as Kt, useCssModule as Zt, computed as lt, openBlock as be, createElementBlock as De, normalizeClass as Qt, unref as le, createVNode as ct, isVNode as Jt } from "vue";
import ft from "@leaflink/snitch";
import { capitalize as en } from "es-toolkit";
import { S as ut, b as tn } from "./statusLevels-D8EgtE_L.js";
import nn from "./CustomRender.js";
import on from "./Icon.js";
import { _ as rn } from "./_plugin-vue_export-helper-CHgC5LLL.js";
/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
const {
  entries: St,
  setPrototypeOf: mt,
  isFrozen: an,
  getPrototypeOf: sn,
  getOwnPropertyDescriptor: ln
} = Object;
let {
  freeze: S,
  seal: L,
  create: Rt
} = Object, {
  apply: Pe,
  construct: ve
} = typeof Reflect < "u" && Reflect;
S || (S = function(n) {
  return n;
});
L || (L = function(n) {
  return n;
});
Pe || (Pe = function(n, r, s) {
  return n.apply(r, s);
});
ve || (ve = function(n, r) {
  return new n(...r);
});
const ce = R(Array.prototype.forEach), cn = R(Array.prototype.lastIndexOf), pt = R(Array.prototype.pop), j = R(Array.prototype.push), fn = R(Array.prototype.splice), ue = R(String.prototype.toLowerCase), Ie = R(String.prototype.toString), dt = R(String.prototype.match), $ = R(String.prototype.replace), un = R(String.prototype.indexOf), mn = R(String.prototype.trim), b = R(Object.prototype.hasOwnProperty), A = R(RegExp.prototype.test), q = pn(TypeError);
function R(a) {
  return function(n) {
    for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++)
      s[u - 1] = arguments[u];
    return Pe(a, n, s);
  };
}
function pn(a) {
  return function() {
    for (var n = arguments.length, r = new Array(n), s = 0; s < n; s++)
      r[s] = arguments[s];
    return ve(a, r);
  };
}
function l(a, n) {
  let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ue;
  mt && mt(a, null);
  let s = n.length;
  for (; s--; ) {
    let u = n[s];
    if (typeof u == "string") {
      const O = r(u);
      O !== u && (an(n) || (n[s] = O), u = O);
    }
    a[u] = !0;
  }
  return a;
}
function dn(a) {
  for (let n = 0; n < a.length; n++)
    b(a, n) || (a[n] = null);
  return a;
}
function x(a) {
  const n = Rt(null);
  for (const [r, s] of St(a))
    b(a, r) && (Array.isArray(s) ? n[r] = dn(s) : s && typeof s == "object" && s.constructor === Object ? n[r] = x(s) : n[r] = s);
  return n;
}
function K(a, n) {
  for (; a !== null; ) {
    const s = ln(a, n);
    if (s) {
      if (s.get)
        return R(s.get);
      if (typeof s.value == "function")
        return R(s.value);
    }
    a = sn(a);
  }
  function r() {
    return null;
  }
  return r;
}
const Tt = S(["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", "section", "select", "shadow", "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"]), Me = S(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ce = S(["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"]), Tn = S(["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"]), we = S(["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"]), _n = S(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), _t = S(["#text"]), Et = S(["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", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "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", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), xe = S(["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", "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"]), gt = S(["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"]), fe = S(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), En = L(/\{\{[\w\W]*|[\w\W]*\}\}/gm), gn = L(/<%[\w\W]*|[\w\W]*%>/gm), hn = L(/\$\{[\w\W]*/gm), An = L(/^data-[\-\w.\u00B7-\uFFFF]+$/), Sn = L(/^aria-[\-\w]+$/), yt = L(
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
  // eslint-disable-line no-useless-escape
), Rn = L(/^(?:\w+script|data):/i), yn = L(
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
  // eslint-disable-line no-control-regex
), Lt = L(/^html$/i), Ln = L(/^[a-z][.\w]*(-[.\w]+)+$/i);
var ht = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  ARIA_ATTR: Sn,
  ATTR_WHITESPACE: yn,
  CUSTOM_ELEMENT: Ln,
  DATA_ATTR: An,
  DOCTYPE_NAME: Lt,
  ERB_EXPR: gn,
  IS_ALLOWED_URI: yt,
  IS_SCRIPT_OR_DATA: Rn,
  MUSTACHE_EXPR: En,
  TMPLIT_EXPR: hn
});
const Z = {
  element: 1,
  text: 3,
  // Deprecated
  progressingInstruction: 7,
  comment: 8,
  document: 9
}, On = function() {
  return typeof window > "u" ? null : window;
}, Nn = function(n, r) {
  if (typeof n != "object" || typeof n.createPolicy != "function")
    return null;
  let s = null;
  const u = "data-tt-policy-suffix";
  r && r.hasAttribute(u) && (s = r.getAttribute(u));
  const O = "dompurify" + (s ? "#" + s : "");
  try {
    return n.createPolicy(O, {
      createHTML(N) {
        return N;
      },
      createScriptURL(N) {
        return N;
      }
    });
  } catch {
    return console.warn("TrustedTypes policy " + O + " could not be created."), null;
  }
}, At = function() {
  return {
    afterSanitizeAttributes: [],
    afterSanitizeElements: [],
    afterSanitizeShadowDOM: [],
    beforeSanitizeAttributes: [],
    beforeSanitizeElements: [],
    beforeSanitizeShadowDOM: [],
    uponSanitizeAttribute: [],
    uponSanitizeElement: [],
    uponSanitizeShadowNode: []
  };
};
function Ot() {
  let a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : On();
  const n = (i) => Ot(i);
  if (n.version = "3.2.4", n.removed = [], !a || !a.document || a.document.nodeType !== Z.document || !a.Element)
    return n.isSupported = !1, n;
  let {
    document: r
  } = a;
  const s = r, u = s.currentScript, {
    DocumentFragment: O,
    HTMLTemplateElement: N,
    Node: Q,
    Element: ke,
    NodeFilter: z,
    NamedNodeMap: Nt = a.NamedNodeMap || a.MozNamedAttrMap,
    HTMLFormElement: bt,
    DOMParser: Dt,
    trustedTypes: J
  } = a, G = ke.prototype, It = K(G, "cloneNode"), Mt = K(G, "remove"), Ct = K(G, "nextSibling"), wt = K(G, "childNodes"), ee = K(G, "parentNode");
  if (typeof N == "function") {
    const i = r.createElement("template");
    i.content && i.content.ownerDocument && (r = i.content.ownerDocument);
  }
  let E, W = "";
  const {
    implementation: me,
    createNodeIterator: xt,
    createDocumentFragment: Pt,
    getElementsByTagName: vt
  } = r, {
    importNode: kt
  } = s;
  let g = At();
  n.isSupported = typeof St == "function" && typeof ee == "function" && me && me.createHTMLDocument !== void 0;
  const {
    MUSTACHE_EXPR: pe,
    ERB_EXPR: de,
    TMPLIT_EXPR: Te,
    DATA_ATTR: Ut,
    ARIA_ATTR: Ft,
    IS_SCRIPT_OR_DATA: Ht,
    ATTR_WHITESPACE: Ue,
    CUSTOM_ELEMENT: zt
  } = ht;
  let {
    IS_ALLOWED_URI: Fe
  } = ht, m = null;
  const He = l({}, [...Tt, ...Me, ...Ce, ...we, ..._t]);
  let d = null;
  const ze = l({}, [...Et, ...xe, ...gt, ...fe]);
  let f = Object.seal(Rt(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
    }
  })), B = null, _e = null, Ge = !0, Ee = !0, We = !1, Be = !0, P = !1, ge = !0, w = !1, he = !1, Ae = !1, v = !1, te = !1, ne = !1, Ye = !0, Xe = !1;
  const Gt = "user-content-";
  let Se = !0, Y = !1, k = {}, U = null;
  const Ve = l({}, ["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"]);
  let je = null;
  const $e = l({}, ["audio", "video", "img", "source", "image", "track"]);
  let Re = null;
  const qe = l({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), oe = "http://www.w3.org/1998/Math/MathML", ie = "http://www.w3.org/2000/svg", M = "http://www.w3.org/1999/xhtml";
  let F = M, ye = !1, Le = null;
  const Wt = l({}, [oe, ie, M], Ie);
  let re = l({}, ["mi", "mo", "mn", "ms", "mtext"]), ae = l({}, ["annotation-xml"]);
  const Bt = l({}, ["title", "style", "font", "a", "script"]);
  let X = null;
  const Yt = ["application/xhtml+xml", "text/html"], Xt = "text/html";
  let p = null, H = null;
  const Vt = r.createElement("form"), Ke = function(e) {
    return e instanceof RegExp || e instanceof Function;
  }, Oe = function() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    if (!(H && H === e)) {
      if ((!e || typeof e != "object") && (e = {}), e = x(e), X = // eslint-disable-next-line unicorn/prefer-includes
      Yt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? Xt : e.PARSER_MEDIA_TYPE, p = X === "application/xhtml+xml" ? Ie : ue, m = b(e, "ALLOWED_TAGS") ? l({}, e.ALLOWED_TAGS, p) : He, d = b(e, "ALLOWED_ATTR") ? l({}, e.ALLOWED_ATTR, p) : ze, Le = b(e, "ALLOWED_NAMESPACES") ? l({}, e.ALLOWED_NAMESPACES, Ie) : Wt, Re = b(e, "ADD_URI_SAFE_ATTR") ? l(x(qe), e.ADD_URI_SAFE_ATTR, p) : qe, je = b(e, "ADD_DATA_URI_TAGS") ? l(x($e), e.ADD_DATA_URI_TAGS, p) : $e, U = b(e, "FORBID_CONTENTS") ? l({}, e.FORBID_CONTENTS, p) : Ve, B = b(e, "FORBID_TAGS") ? l({}, e.FORBID_TAGS, p) : {}, _e = b(e, "FORBID_ATTR") ? l({}, e.FORBID_ATTR, p) : {}, k = b(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Ge = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, We = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Be = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, P = e.SAFE_FOR_TEMPLATES || !1, ge = e.SAFE_FOR_XML !== !1, w = e.WHOLE_DOCUMENT || !1, v = e.RETURN_DOM || !1, te = e.RETURN_DOM_FRAGMENT || !1, ne = e.RETURN_TRUSTED_TYPE || !1, Ae = e.FORCE_BODY || !1, Ye = e.SANITIZE_DOM !== !1, Xe = e.SANITIZE_NAMED_PROPS || !1, Se = e.KEEP_CONTENT !== !1, Y = e.IN_PLACE || !1, Fe = e.ALLOWED_URI_REGEXP || yt, F = e.NAMESPACE || M, re = e.MATHML_TEXT_INTEGRATION_POINTS || re, ae = e.HTML_INTEGRATION_POINTS || ae, f = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ke(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (f.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ke(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (f.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (f.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), P && (Ee = !1), te && (v = !0), k && (m = l({}, _t), d = [], k.html === !0 && (l(m, Tt), l(d, Et)), k.svg === !0 && (l(m, Me), l(d, xe), l(d, fe)), k.svgFilters === !0 && (l(m, Ce), l(d, xe), l(d, fe)), k.mathMl === !0 && (l(m, we), l(d, gt), l(d, fe))), e.ADD_TAGS && (m === He && (m = x(m)), l(m, e.ADD_TAGS, p)), e.ADD_ATTR && (d === ze && (d = x(d)), l(d, e.ADD_ATTR, p)), e.ADD_URI_SAFE_ATTR && l(Re, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (U === Ve && (U = x(U)), l(U, e.FORBID_CONTENTS, p)), Se && (m["#text"] = !0), w && l(m, ["html", "head", "body"]), m.table && (l(m, ["tbody"]), delete B.tbody), e.TRUSTED_TYPES_POLICY) {
        if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
          throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
        if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
          throw q('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
        E = e.TRUSTED_TYPES_POLICY, W = E.createHTML("");
      } else
        E === void 0 && (E = Nn(J, u)), E !== null && typeof W == "string" && (W = E.createHTML(""));
      S && S(e), H = e;
    }
  }, Ze = l({}, [...Me, ...Ce, ...Tn]), Qe = l({}, [...we, ..._n]), jt = function(e) {
    let t = ee(e);
    (!t || !t.tagName) && (t = {
      namespaceURI: F,
      tagName: "template"
    });
    const o = ue(e.tagName), c = ue(t.tagName);
    return Le[e.namespaceURI] ? e.namespaceURI === ie ? t.namespaceURI === M ? o === "svg" : t.namespaceURI === oe ? o === "svg" && (c === "annotation-xml" || re[c]) : !!Ze[o] : e.namespaceURI === oe ? t.namespaceURI === M ? o === "math" : t.namespaceURI === ie ? o === "math" && ae[c] : !!Qe[o] : e.namespaceURI === M ? t.namespaceURI === ie && !ae[c] || t.namespaceURI === oe && !re[c] ? !1 : !Qe[o] && (Bt[o] || !Ze[o]) : !!(X === "application/xhtml+xml" && Le[e.namespaceURI]) : !1;
  }, D = function(e) {
    j(n.removed, {
      element: e
    });
    try {
      ee(e).removeChild(e);
    } catch {
      Mt(e);
    }
  }, se = function(e, t) {
    try {
      j(n.removed, {
        attribute: t.getAttributeNode(e),
        from: t
      });
    } catch {
      j(n.removed, {
        attribute: null,
        from: t
      });
    }
    if (t.removeAttribute(e), e === "is")
      if (v || te)
        try {
          D(t);
        } catch {
        }
      else
        try {
          t.setAttribute(e, "");
        } catch {
        }
  }, Je = function(e) {
    let t = null, o = null;
    if (Ae)
      e = "<remove></remove>" + e;
    else {
      const T = dt(e, /^[\r\n\t ]+/);
      o = T && T[0];
    }
    X === "application/xhtml+xml" && F === M && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
    const c = E ? E.createHTML(e) : e;
    if (F === M)
      try {
        t = new Dt().parseFromString(c, X);
      } catch {
      }
    if (!t || !t.documentElement) {
      t = me.createDocument(F, "template", null);
      try {
        t.documentElement.innerHTML = ye ? W : c;
      } catch {
      }
    }
    const _ = t.body || t.documentElement;
    return e && o && _.insertBefore(r.createTextNode(o), _.childNodes[0] || null), F === M ? vt.call(t, w ? "html" : "body")[0] : w ? t.documentElement : _;
  }, et = function(e) {
    return xt.call(
      e.ownerDocument || e,
      e,
      // eslint-disable-next-line no-bitwise
      z.SHOW_ELEMENT | z.SHOW_COMMENT | z.SHOW_TEXT | z.SHOW_PROCESSING_INSTRUCTION | z.SHOW_CDATA_SECTION,
      null
    );
  }, Ne = function(e) {
    return e instanceof bt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof Nt) || 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 Q == "function" && e instanceof Q;
  };
  function C(i, e, t) {
    ce(i, (o) => {
      o.call(n, e, t, H);
    });
  }
  const nt = function(e) {
    let t = null;
    if (C(g.beforeSanitizeElements, e, null), Ne(e))
      return D(e), !0;
    const o = p(e.nodeName);
    if (C(g.uponSanitizeElement, e, {
      tagName: o,
      allowedTags: m
    }), e.hasChildNodes() && !tt(e.firstElementChild) && A(/<[/\w]/g, e.innerHTML) && A(/<[/\w]/g, e.textContent) || e.nodeType === Z.progressingInstruction || ge && e.nodeType === Z.comment && A(/<[/\w]/g, e.data))
      return D(e), !0;
    if (!m[o] || B[o]) {
      if (!B[o] && it(o) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, o) || f.tagNameCheck instanceof Function && f.tagNameCheck(o)))
        return !1;
      if (Se && !U[o]) {
        const c = ee(e) || e.parentNode, _ = wt(e) || e.childNodes;
        if (_ && c) {
          const T = _.length;
          for (let y = T - 1; y >= 0; --y) {
            const I = It(_[y], !0);
            I.__removalCount = (e.__removalCount || 0) + 1, c.insertBefore(I, Ct(e));
          }
        }
      }
      return D(e), !0;
    }
    return e instanceof ke && !jt(e) || (o === "noscript" || o === "noembed" || o === "noframes") && A(/<\/no(script|embed|frames)/i, e.innerHTML) ? (D(e), !0) : (P && e.nodeType === Z.text && (t = e.textContent, ce([pe, de, Te], (c) => {
      t = $(t, c, " ");
    }), e.textContent !== t && (j(n.removed, {
      element: e.cloneNode()
    }), e.textContent = t)), C(g.afterSanitizeElements, e, null), !1);
  }, ot = function(e, t, o) {
    if (Ye && (t === "id" || t === "name") && (o in r || o in Vt))
      return !1;
    if (!(Ee && !_e[t] && A(Ut, t))) {
      if (!(Ge && A(Ft, t))) {
        if (!d[t] || _e[t]) {
          if (
            // First condition does a very basic check if a) it's basically a valid custom element tagname AND
            // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
            !(it(e) && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && A(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
            // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
            t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && A(f.tagNameCheck, o) || f.tagNameCheck instanceof Function && f.tagNameCheck(o)))
          ) return !1;
        } else if (!Re[t]) {
          if (!A(Fe, $(o, Ue, ""))) {
            if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && un(o, "data:") === 0 && je[e])) {
              if (!(We && !A(Ht, $(o, Ue, "")))) {
                if (o)
                  return !1;
              }
            }
          }
        }
      }
    }
    return !0;
  }, it = function(e) {
    return e !== "annotation-xml" && dt(e, zt);
  }, rt = function(e) {
    C(g.beforeSanitizeAttributes, e, null);
    const {
      attributes: t
    } = e;
    if (!t || Ne(e))
      return;
    const o = {
      attrName: "",
      attrValue: "",
      keepAttr: !0,
      allowedAttributes: d,
      forceKeepAttr: void 0
    };
    let c = t.length;
    for (; c--; ) {
      const _ = t[c], {
        name: T,
        namespaceURI: y,
        value: I
      } = _, V = p(T);
      let h = T === "value" ? I : mn(I);
      if (o.attrName = V, o.attrValue = h, o.keepAttr = !0, o.forceKeepAttr = void 0, C(g.uponSanitizeAttribute, e, o), h = o.attrValue, Xe && (V === "id" || V === "name") && (se(T, e), h = Gt + h), ge && A(/((--!?|])>)|<\/(style|title)/i, h)) {
        se(T, e);
        continue;
      }
      if (o.forceKeepAttr || (se(T, e), !o.keepAttr))
        continue;
      if (!Be && A(/\/>/i, h)) {
        se(T, e);
        continue;
      }
      P && ce([pe, de, Te], (st) => {
        h = $(h, st, " ");
      });
      const at = p(e.nodeName);
      if (ot(at, V, h)) {
        if (E && typeof J == "object" && typeof J.getAttributeType == "function" && !y)
          switch (J.getAttributeType(at, V)) {
            case "TrustedHTML": {
              h = E.createHTML(h);
              break;
            }
            case "TrustedScriptURL": {
              h = E.createScriptURL(h);
              break;
            }
          }
        try {
          y ? e.setAttributeNS(y, T, h) : e.setAttribute(T, h), Ne(e) ? D(e) : pt(n.removed);
        } catch {
        }
      }
    }
    C(g.afterSanitizeAttributes, e, null);
  }, $t = function i(e) {
    let t = null;
    const o = et(e);
    for (C(g.beforeSanitizeShadowDOM, e, null); t = o.nextNode(); )
      C(g.uponSanitizeShadowNode, t, null), nt(t), rt(t), t.content instanceof O && i(t.content);
    C(g.afterSanitizeShadowDOM, e, null);
  };
  return n.sanitize = function(i) {
    let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, o = null, c = null, _ = null;
    if (ye = !i, ye && (i = "<!-->"), typeof i != "string" && !tt(i))
      if (typeof i.toString == "function") {
        if (i = i.toString(), typeof i != "string")
          throw q("dirty is not a string, aborting");
      } else
        throw q("toString is not a function");
    if (!n.isSupported)
      return i;
    if (he || Oe(e), n.removed = [], typeof i == "string" && (Y = !1), Y) {
      if (i.nodeName) {
        const I = p(i.nodeName);
        if (!m[I] || B[I])
          throw q("root node is forbidden and cannot be sanitized in-place");
      }
    } else if (i instanceof Q)
      t = Je("<!---->"), o = t.ownerDocument.importNode(i, !0), o.nodeType === Z.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? t = o : t.appendChild(o);
    else {
      if (!v && !P && !w && // eslint-disable-next-line unicorn/prefer-includes
      i.indexOf("<") === -1)
        return E && ne ? E.createHTML(i) : i;
      if (t = Je(i), !t)
        return v ? null : ne ? W : "";
    }
    t && Ae && D(t.firstChild);
    const T = et(Y ? i : t);
    for (; c = T.nextNode(); )
      nt(c), rt(c), c.content instanceof O && $t(c.content);
    if (Y)
      return i;
    if (v) {
      if (te)
        for (_ = Pt.call(t.ownerDocument); t.firstChild; )
          _.appendChild(t.firstChild);
      else
        _ = t;
      return (d.shadowroot || d.shadowrootmode) && (_ = kt.call(s, _, !0)), _;
    }
    let y = w ? t.outerHTML : t.innerHTML;
    return w && m["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && A(Lt, t.ownerDocument.doctype.name) && (y = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
` + y), P && ce([pe, de, Te], (I) => {
      y = $(y, I, " ");
    }), E && ne ? E.createHTML(y) : y;
  }, n.setConfig = function() {
    let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    Oe(i), he = !0;
  }, n.clearConfig = function() {
    H = null, he = !1;
  }, n.isValidAttribute = function(i, e, t) {
    H || Oe({});
    const o = p(i), c = p(e);
    return ot(o, c, t);
  }, n.addHook = function(i, e) {
    typeof e == "function" && j(g[i], e);
  }, n.removeHook = function(i, e) {
    if (e !== void 0) {
      const t = cn(g[i], e);
      return t === -1 ? void 0 : fn(g[i], t, 1)[0];
    }
    return pt(g[i]);
  }, n.removeHooks = function(i) {
    g[i] = [];
  }, n.removeAllHooks = function() {
    g = At();
  }, n;
}
var bn = Ot();
const Dn = ["role"], In = ["innerHTML"], Mn = { key: 1 }, Cn = /* @__PURE__ */ qt({
  __name: "Toast",
  props: {
    text: {},
    status: { default: "info" },
    offsetTop: { default: void 0 }
  },
  setup(a) {
    Kt((N) => ({
      v480df7aa: r.offsetTop
    }));
    const n = Zt(), r = a, s = lt(
      () => r.status ? ut[en(r.status)] : ut.Info
    ), u = lt(() => r.status === tn.Error ? "alert" : "status"), O = () => {
      if (typeof r.text != "function")
        return ft.error(
          `Toast: ${r.text} is not a valid text prop value. Must be either a render function or a string.`
        ), null;
      const N = r.text();
      return Jt(N) ? N : (ft.error("Toast: The text prop must return a VNode."), null);
    };
    return (N, Q) => (be(), De("li", {
      role: u.value,
      class: Qt([[le(n).root, le(n)[`status--${r.status}`], { [le(n)["custom-offset-top"]]: r.offsetTop }], "stash-toast"]),
      "data-test": "stash-toast"
    }, [
      ct(on, { name: s.value }, null, 8, ["name"]),
      typeof r.text == "string" ? (be(), De("div", {
        key: 0,
        innerHTML: le(bn).sanitize(a.text)
      }, null, 8, In)) : (be(), De("div", Mn, [
        ct(nn, { render: O })
      ]))
    ], 10, Dn));
  }
}), wn = "_root_CNh3K", xn = {
  root: wn,
  "custom-offset-top": "_custom-offset-top_isQB4",
  "status--success": "_status--success_i0XTl",
  "status--error": "_status--error_EHL3v",
  "status--info": "_status--info_3gVpj",
  "status--warning": "_status--warning_kpqQb"
}, Pn = {
  $style: xn
}, Wn = /* @__PURE__ */ rn(Cn, [["__cssModules", Pn]]);
export {
  Wn as default
};
//# sourceMappingURL=Toast.js.map
