@clevertask/scribe 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- /*! @license DOMPurify 3.2.2 | (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.2/LICENSE */
1
+ /*! @license DOMPurify 3.2.5 | (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.5/LICENSE */
2
2
  const {
3
- entries: Dt,
3
+ entries: Lt,
4
4
  setPrototypeOf: Tt,
5
5
  isFrozen: sn,
6
6
  getPrototypeOf: cn,
@@ -9,10 +9,10 @@ const {
9
9
  let {
10
10
  freeze: v,
11
11
  seal: C,
12
- create: Lt
12
+ create: Dt
13
13
  } = Object, {
14
- apply: Fe,
15
- construct: He
14
+ apply: He,
15
+ construct: Be
16
16
  } = typeof Reflect < "u" && Reflect;
17
17
  v || (v = function(t) {
18
18
  return t;
@@ -20,25 +20,26 @@ v || (v = function(t) {
20
20
  C || (C = function(t) {
21
21
  return t;
22
22
  });
23
- Fe || (Fe = function(t, r, i) {
23
+ He || (He = function(t, r, i) {
24
24
  return t.apply(r, i);
25
25
  });
26
- He || (He = function(t, r) {
26
+ Be || (Be = function(t, r) {
27
27
  return new t(...r);
28
28
  });
29
- const ue = L(Array.prototype.forEach), Et = L(Array.prototype.pop), Z = L(Array.prototype.push), pe = L(String.prototype.toLowerCase), Ce = L(String.prototype.toString), At = L(String.prototype.match), Q = L(String.prototype.replace), un = L(String.prototype.indexOf), mn = L(String.prototype.trim), I = L(Object.prototype.hasOwnProperty), N = L(RegExp.prototype.test), J = pn(TypeError);
30
- function L(e) {
29
+ const ue = b(Array.prototype.forEach), un = b(Array.prototype.lastIndexOf), Et = b(Array.prototype.pop), Z = b(Array.prototype.push), mn = b(Array.prototype.splice), pe = b(String.prototype.toLowerCase), Ie = b(String.prototype.toString), At = b(String.prototype.match), Q = b(String.prototype.replace), pn = b(String.prototype.indexOf), dn = b(String.prototype.trim), I = b(Object.prototype.hasOwnProperty), O = b(RegExp.prototype.test), J = hn(TypeError);
30
+ function b(e) {
31
31
  return function(t) {
32
- for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
33
- i[l - 1] = arguments[l];
34
- return Fe(e, t, i);
32
+ t instanceof RegExp && (t.lastIndex = 0);
33
+ for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
34
+ i[s - 1] = arguments[s];
35
+ return He(e, t, i);
35
36
  };
36
37
  }
37
- function pn(e) {
38
+ function hn(e) {
38
39
  return function() {
39
40
  for (var t = arguments.length, r = new Array(t), i = 0; i < t; i++)
40
41
  r[i] = arguments[i];
41
- return He(e, r);
42
+ return Be(e, r);
42
43
  };
43
44
  }
44
45
  function f(e, t) {
@@ -46,24 +47,24 @@ function f(e, t) {
46
47
  Tt && Tt(e, null);
47
48
  let i = t.length;
48
49
  for (; i--; ) {
49
- let l = t[i];
50
- if (typeof l == "string") {
51
- const c = r(l);
52
- c !== l && (sn(t) || (t[i] = c), l = c);
50
+ let s = t[i];
51
+ if (typeof s == "string") {
52
+ const c = r(s);
53
+ c !== s && (sn(t) || (t[i] = c), s = c);
53
54
  }
54
- e[l] = !0;
55
+ e[s] = !0;
55
56
  }
56
57
  return e;
57
58
  }
58
- function dn(e) {
59
+ function gn(e) {
59
60
  for (let t = 0; t < e.length; t++)
60
61
  I(e, t) || (e[t] = null);
61
62
  return e;
62
63
  }
63
64
  function U(e) {
64
- const t = Lt(null);
65
- for (const [r, i] of Dt(e))
66
- I(e, r) && (Array.isArray(i) ? t[r] = dn(i) : i && typeof i == "object" && i.constructor === Object ? t[r] = U(i) : t[r] = i);
65
+ const t = Dt(null);
66
+ for (const [r, i] of Lt(e))
67
+ I(e, r) && (Array.isArray(i) ? t[r] = gn(i) : i && typeof i == "object" && i.constructor === Object ? t[r] = U(i) : t[r] = i);
67
68
  return t;
68
69
  }
69
70
  function ee(e, t) {
@@ -71,9 +72,9 @@ function ee(e, t) {
71
72
  const i = fn(e, t);
72
73
  if (i) {
73
74
  if (i.get)
74
- return L(i.get);
75
+ return b(i.get);
75
76
  if (typeof i.value == "function")
76
- return L(i.value);
77
+ return b(i.value);
77
78
  }
78
79
  e = cn(e);
79
80
  }
@@ -82,50 +83,41 @@ function ee(e, t) {
82
83
  }
83
84
  return r;
84
85
  }
85
- const _t = v(["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"]), Ie = v(["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"]), Me = v(["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"]), hn = v(["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 = v(["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"]), gn = v(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), St = v(["#text"]), Rt = v(["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"]), ke = v(["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"]), yt = v(["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"]), me = v(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Tn = C(/\{\{[\w\W]*|[\w\W]*\}\}/gm), En = C(/<%[\w\W]*|[\w\W]*%>/gm), An = C(/\${[\w\W]*}/gm), _n = C(/^data-[\-\w.\u00B7-\uFFFF]/), Sn = C(/^aria-[\-\w]+$/), Ct = C(
86
+ const _t = v(["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 = v(["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"]), we = v(["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 = v(["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"]), ke = v(["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"]), En = v(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), St = v(["#text"]), Rt = v(["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 = v(["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"]), yt = v(["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"]), me = v(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), An = C(/\{\{[\w\W]*|[\w\W]*\}\}/gm), _n = C(/<%[\w\W]*|[\w\W]*%>/gm), Sn = C(/\$\{[\w\W]*/gm), Rn = C(/^data-[\-\w.\u00B7-\uFFFF]+$/), yn = C(/^aria-[\-\w]+$/), Ct = C(
86
87
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
87
88
  // eslint-disable-line no-useless-escape
88
- ), Rn = C(/^(?:\w+script|data):/i), yn = C(
89
+ ), Nn = C(/^(?:\w+script|data):/i), On = C(
89
90
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
90
91
  // eslint-disable-line no-control-regex
91
- ), It = C(/^html$/i), Nn = C(/^[a-z][.\w]*(-[.\w]+)+$/i);
92
+ ), It = C(/^html$/i), vn = C(/^[a-z][.\w]*(-[.\w]+)+$/i);
92
93
  var Nt = /* @__PURE__ */ Object.freeze({
93
94
  __proto__: null,
94
- ARIA_ATTR: Sn,
95
- ATTR_WHITESPACE: yn,
96
- CUSTOM_ELEMENT: Nn,
97
- DATA_ATTR: _n,
95
+ ARIA_ATTR: yn,
96
+ ATTR_WHITESPACE: On,
97
+ CUSTOM_ELEMENT: vn,
98
+ DATA_ATTR: Rn,
98
99
  DOCTYPE_NAME: It,
99
- ERB_EXPR: En,
100
+ ERB_EXPR: _n,
100
101
  IS_ALLOWED_URI: Ct,
101
- IS_SCRIPT_OR_DATA: Rn,
102
- MUSTACHE_EXPR: Tn,
103
- TMPLIT_EXPR: An
102
+ IS_SCRIPT_OR_DATA: Nn,
103
+ MUSTACHE_EXPR: An,
104
+ TMPLIT_EXPR: Sn
104
105
  });
105
106
  const te = {
106
107
  element: 1,
107
- attribute: 2,
108
108
  text: 3,
109
- cdataSection: 4,
110
- entityReference: 5,
111
- // Deprecated
112
- entityNode: 6,
113
109
  // Deprecated
114
110
  progressingInstruction: 7,
115
111
  comment: 8,
116
- document: 9,
117
- documentType: 10,
118
- documentFragment: 11,
119
- notation: 12
120
- // Deprecated
121
- }, vn = function() {
112
+ document: 9
113
+ }, bn = function() {
122
114
  return typeof window > "u" ? null : window;
123
- }, On = function(t, r) {
115
+ }, Ln = function(t, r) {
124
116
  if (typeof t != "object" || typeof t.createPolicy != "function")
125
117
  return null;
126
118
  let i = null;
127
- const l = "data-tt-policy-suffix";
128
- r && r.hasAttribute(l) && (i = r.getAttribute(l));
119
+ const s = "data-tt-policy-suffix";
120
+ r && r.hasAttribute(s) && (i = r.getAttribute(s));
129
121
  const c = "dompurify" + (i ? "#" + i : "");
130
122
  try {
131
123
  return t.createPolicy(c, {
@@ -139,7 +131,7 @@ const te = {
139
131
  } catch {
140
132
  return console.warn("TrustedTypes policy " + c + " could not be created."), null;
141
133
  }
142
- }, vt = function() {
134
+ }, Ot = function() {
143
135
  return {
144
136
  afterSanitizeAttributes: [],
145
137
  afterSanitizeElements: [],
@@ -153,17 +145,17 @@ const te = {
153
145
  };
154
146
  };
155
147
  function Mt() {
156
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : vn();
157
- const t = (s) => Mt(s);
158
- if (t.version = "3.2.2", t.removed = [], !e || !e.document || e.document.nodeType !== te.document)
148
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : bn();
149
+ const t = (l) => Mt(l);
150
+ if (t.version = "3.2.5", t.removed = [], !e || !e.document || e.document.nodeType !== te.document || !e.Element)
159
151
  return t.isSupported = !1, t;
160
152
  let {
161
153
  document: r
162
154
  } = e;
163
- const i = r, l = i.currentScript, {
155
+ const i = r, s = i.currentScript, {
164
156
  DocumentFragment: c,
165
157
  HTMLTemplateElement: p,
166
- Node: O,
158
+ Node: L,
167
159
  Element: m,
168
160
  NodeFilter: S,
169
161
  NamedNodeMap: F = e.NamedNodeMap || e.MozNamedAttrMap,
@@ -172,8 +164,8 @@ function Mt() {
172
164
  trustedTypes: ne
173
165
  } = e, $ = m.prototype, zt = ee($, "cloneNode"), Wt = ee($, "remove"), Gt = ee($, "nextSibling"), Yt = ee($, "childNodes"), re = ee($, "parentNode");
174
166
  if (typeof p == "function") {
175
- const s = r.createElement("template");
176
- s.content && s.content.ownerDocument && (r = s.content.ownerDocument);
167
+ const l = r.createElement("template");
168
+ l.content && l.content.ownerDocument && (r = l.content.ownerDocument);
177
169
  }
178
170
  let R, V = "";
179
171
  const {
@@ -184,8 +176,8 @@ function Mt() {
184
176
  } = r, {
185
177
  importNode: jt
186
178
  } = i;
187
- let D = vt();
188
- t.isSupported = typeof Dt == "function" && typeof re == "function" && ge && ge.createHTMLDocument !== void 0;
179
+ let y = Ot();
180
+ t.isSupported = typeof Lt == "function" && typeof re == "function" && ge && ge.createHTMLDocument !== void 0;
189
181
  const {
190
182
  MUSTACHE_EXPR: Te,
191
183
  ERB_EXPR: Ee,
@@ -193,16 +185,16 @@ function Mt() {
193
185
  DATA_ATTR: Kt,
194
186
  ARIA_ATTR: qt,
195
187
  IS_SCRIPT_OR_DATA: Zt,
196
- ATTR_WHITESPACE: $e,
188
+ ATTR_WHITESPACE: Ve,
197
189
  CUSTOM_ELEMENT: Qt
198
190
  } = Nt;
199
191
  let {
200
- IS_ALLOWED_URI: Ve
192
+ IS_ALLOWED_URI: Xe
201
193
  } = Nt, h = null;
202
- const Xe = f({}, [..._t, ...Ie, ...Me, ...we, ...St]);
194
+ const je = f({}, [..._t, ...Me, ...we, ...ke, ...St]);
203
195
  let T = null;
204
- const je = f({}, [...Rt, ...ke, ...yt, ...me]);
205
- let d = Object.seal(Lt(null, {
196
+ const Ke = f({}, [...Rt, ...xe, ...yt, ...me]);
197
+ let d = Object.seal(Dt(null, {
206
198
  tagNameCheck: {
207
199
  writable: !0,
208
200
  configurable: !1,
@@ -221,45 +213,45 @@ function Mt() {
221
213
  enumerable: !0,
222
214
  value: !1
223
215
  }
224
- })), X = null, _e = null, Ke = !0, Se = !0, qe = !1, Ze = !0, H = !1, Re = !0, x = !1, ye = !1, Ne = !1, B = !1, ie = !1, ae = !1, Qe = !0, Je = !1;
216
+ })), X = null, _e = null, qe = !0, Se = !0, Ze = !1, Qe = !0, H = !1, Re = !0, P = !1, ye = !1, Ne = !1, B = !1, ie = !1, ae = !1, Je = !0, et = !1;
225
217
  const Jt = "user-content-";
226
- let ve = !0, j = !1, z = {}, W = null;
227
- const et = f({}, ["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"]);
228
- let tt = null;
229
- const nt = f({}, ["audio", "video", "img", "source", "image", "track"]);
230
- let Oe = null;
231
- const rt = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), oe = "http://www.w3.org/1998/Math/MathML", le = "http://www.w3.org/2000/svg", k = "http://www.w3.org/1999/xhtml";
232
- let G = k, be = !1, De = null;
233
- const en = f({}, [oe, le, k], Ce);
218
+ let Oe = !0, j = !1, z = {}, W = null;
219
+ const tt = f({}, ["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"]);
220
+ let nt = null;
221
+ const rt = f({}, ["audio", "video", "img", "source", "image", "track"]);
222
+ let ve = null;
223
+ const it = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), oe = "http://www.w3.org/1998/Math/MathML", le = "http://www.w3.org/2000/svg", k = "http://www.w3.org/1999/xhtml";
224
+ let G = k, be = !1, Le = null;
225
+ const en = f({}, [oe, le, k], Ie);
234
226
  let se = f({}, ["mi", "mo", "mn", "ms", "mtext"]), ce = f({}, ["annotation-xml"]);
235
227
  const tn = f({}, ["title", "style", "font", "a", "script"]);
236
228
  let K = null;
237
229
  const nn = ["application/xhtml+xml", "text/html"], rn = "text/html";
238
230
  let g = null, Y = null;
239
- const an = r.createElement("form"), it = function(n) {
231
+ const an = r.createElement("form"), at = function(n) {
240
232
  return n instanceof RegExp || n instanceof Function;
241
- }, Le = function() {
233
+ }, De = function() {
242
234
  let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
243
235
  if (!(Y && Y === n)) {
244
236
  if ((!n || typeof n != "object") && (n = {}), n = U(n), K = // eslint-disable-next-line unicorn/prefer-includes
245
- nn.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? rn : n.PARSER_MEDIA_TYPE, g = K === "application/xhtml+xml" ? Ce : pe, h = I(n, "ALLOWED_TAGS") ? f({}, n.ALLOWED_TAGS, g) : Xe, T = I(n, "ALLOWED_ATTR") ? f({}, n.ALLOWED_ATTR, g) : je, De = I(n, "ALLOWED_NAMESPACES") ? f({}, n.ALLOWED_NAMESPACES, Ce) : en, Oe = I(n, "ADD_URI_SAFE_ATTR") ? f(U(rt), n.ADD_URI_SAFE_ATTR, g) : rt, tt = I(n, "ADD_DATA_URI_TAGS") ? f(U(nt), n.ADD_DATA_URI_TAGS, g) : nt, W = I(n, "FORBID_CONTENTS") ? f({}, n.FORBID_CONTENTS, g) : et, X = I(n, "FORBID_TAGS") ? f({}, n.FORBID_TAGS, g) : {}, _e = I(n, "FORBID_ATTR") ? f({}, n.FORBID_ATTR, g) : {}, z = I(n, "USE_PROFILES") ? n.USE_PROFILES : !1, Ke = n.ALLOW_ARIA_ATTR !== !1, Se = n.ALLOW_DATA_ATTR !== !1, qe = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ze = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = n.SAFE_FOR_TEMPLATES || !1, Re = n.SAFE_FOR_XML !== !1, x = n.WHOLE_DOCUMENT || !1, B = n.RETURN_DOM || !1, ie = n.RETURN_DOM_FRAGMENT || !1, ae = n.RETURN_TRUSTED_TYPE || !1, Ne = n.FORCE_BODY || !1, Qe = n.SANITIZE_DOM !== !1, Je = n.SANITIZE_NAMED_PROPS || !1, ve = n.KEEP_CONTENT !== !1, j = n.IN_PLACE || !1, Ve = n.ALLOWED_URI_REGEXP || Ct, G = n.NAMESPACE || k, se = n.MATHML_TEXT_INTEGRATION_POINTS || se, ce = n.HTML_INTEGRATION_POINTS || ce, d = n.CUSTOM_ELEMENT_HANDLING || {}, n.CUSTOM_ELEMENT_HANDLING && it(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (d.tagNameCheck = n.CUSTOM_ELEMENT_HANDLING.tagNameCheck), n.CUSTOM_ELEMENT_HANDLING && it(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (d.attributeNameCheck = n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (d.allowCustomizedBuiltInElements = n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), H && (Se = !1), ie && (B = !0), z && (h = f({}, St), T = [], z.html === !0 && (f(h, _t), f(T, Rt)), z.svg === !0 && (f(h, Ie), f(T, ke), f(T, me)), z.svgFilters === !0 && (f(h, Me), f(T, ke), f(T, me)), z.mathMl === !0 && (f(h, we), f(T, yt), f(T, me))), n.ADD_TAGS && (h === Xe && (h = U(h)), f(h, n.ADD_TAGS, g)), n.ADD_ATTR && (T === je && (T = U(T)), f(T, n.ADD_ATTR, g)), n.ADD_URI_SAFE_ATTR && f(Oe, n.ADD_URI_SAFE_ATTR, g), n.FORBID_CONTENTS && (W === et && (W = U(W)), f(W, n.FORBID_CONTENTS, g)), ve && (h["#text"] = !0), x && f(h, ["html", "head", "body"]), h.table && (f(h, ["tbody"]), delete X.tbody), n.TRUSTED_TYPES_POLICY) {
237
+ nn.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? rn : n.PARSER_MEDIA_TYPE, g = K === "application/xhtml+xml" ? Ie : pe, h = I(n, "ALLOWED_TAGS") ? f({}, n.ALLOWED_TAGS, g) : je, T = I(n, "ALLOWED_ATTR") ? f({}, n.ALLOWED_ATTR, g) : Ke, Le = I(n, "ALLOWED_NAMESPACES") ? f({}, n.ALLOWED_NAMESPACES, Ie) : en, ve = I(n, "ADD_URI_SAFE_ATTR") ? f(U(it), n.ADD_URI_SAFE_ATTR, g) : it, nt = I(n, "ADD_DATA_URI_TAGS") ? f(U(rt), n.ADD_DATA_URI_TAGS, g) : rt, W = I(n, "FORBID_CONTENTS") ? f({}, n.FORBID_CONTENTS, g) : tt, X = I(n, "FORBID_TAGS") ? f({}, n.FORBID_TAGS, g) : {}, _e = I(n, "FORBID_ATTR") ? f({}, n.FORBID_ATTR, g) : {}, z = I(n, "USE_PROFILES") ? n.USE_PROFILES : !1, qe = n.ALLOW_ARIA_ATTR !== !1, Se = n.ALLOW_DATA_ATTR !== !1, Ze = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Qe = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = n.SAFE_FOR_TEMPLATES || !1, Re = n.SAFE_FOR_XML !== !1, P = n.WHOLE_DOCUMENT || !1, B = n.RETURN_DOM || !1, ie = n.RETURN_DOM_FRAGMENT || !1, ae = n.RETURN_TRUSTED_TYPE || !1, Ne = n.FORCE_BODY || !1, Je = n.SANITIZE_DOM !== !1, et = n.SANITIZE_NAMED_PROPS || !1, Oe = n.KEEP_CONTENT !== !1, j = n.IN_PLACE || !1, Xe = n.ALLOWED_URI_REGEXP || Ct, G = n.NAMESPACE || k, se = n.MATHML_TEXT_INTEGRATION_POINTS || se, ce = n.HTML_INTEGRATION_POINTS || ce, d = n.CUSTOM_ELEMENT_HANDLING || {}, n.CUSTOM_ELEMENT_HANDLING && at(n.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (d.tagNameCheck = n.CUSTOM_ELEMENT_HANDLING.tagNameCheck), n.CUSTOM_ELEMENT_HANDLING && at(n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (d.attributeNameCheck = n.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (d.allowCustomizedBuiltInElements = n.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), H && (Se = !1), ie && (B = !0), z && (h = f({}, St), T = [], z.html === !0 && (f(h, _t), f(T, Rt)), z.svg === !0 && (f(h, Me), f(T, xe), f(T, me)), z.svgFilters === !0 && (f(h, we), f(T, xe), f(T, me)), z.mathMl === !0 && (f(h, ke), f(T, yt), f(T, me))), n.ADD_TAGS && (h === je && (h = U(h)), f(h, n.ADD_TAGS, g)), n.ADD_ATTR && (T === Ke && (T = U(T)), f(T, n.ADD_ATTR, g)), n.ADD_URI_SAFE_ATTR && f(ve, n.ADD_URI_SAFE_ATTR, g), n.FORBID_CONTENTS && (W === tt && (W = U(W)), f(W, n.FORBID_CONTENTS, g)), Oe && (h["#text"] = !0), P && f(h, ["html", "head", "body"]), h.table && (f(h, ["tbody"]), delete X.tbody), n.TRUSTED_TYPES_POLICY) {
246
238
  if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function")
247
239
  throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
248
240
  if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function")
249
241
  throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
250
242
  R = n.TRUSTED_TYPES_POLICY, V = R.createHTML("");
251
243
  } else
252
- R === void 0 && (R = On(ne, l)), R !== null && typeof V == "string" && (V = R.createHTML(""));
244
+ R === void 0 && (R = Ln(ne, s)), R !== null && typeof V == "string" && (V = R.createHTML(""));
253
245
  v && v(n), Y = n;
254
246
  }
255
- }, at = f({}, [...Ie, ...Me, ...hn]), ot = f({}, [...we, ...gn]), on = function(n) {
247
+ }, ot = f({}, [...Me, ...we, ...Tn]), lt = f({}, [...ke, ...En]), on = function(n) {
256
248
  let a = re(n);
257
249
  (!a || !a.tagName) && (a = {
258
250
  namespaceURI: G,
259
251
  tagName: "template"
260
252
  });
261
253
  const o = pe(n.tagName), u = pe(a.tagName);
262
- return De[n.namespaceURI] ? n.namespaceURI === le ? a.namespaceURI === k ? o === "svg" : a.namespaceURI === oe ? o === "svg" && (u === "annotation-xml" || se[u]) : !!at[o] : n.namespaceURI === oe ? a.namespaceURI === k ? o === "math" : a.namespaceURI === le ? o === "math" && ce[u] : !!ot[o] : n.namespaceURI === k ? a.namespaceURI === le && !ce[u] || a.namespaceURI === oe && !se[u] ? !1 : !ot[o] && (tn[o] || !at[o]) : !!(K === "application/xhtml+xml" && De[n.namespaceURI]) : !1;
254
+ return Le[n.namespaceURI] ? n.namespaceURI === le ? a.namespaceURI === k ? o === "svg" : a.namespaceURI === oe ? o === "svg" && (u === "annotation-xml" || se[u]) : !!ot[o] : n.namespaceURI === oe ? a.namespaceURI === k ? o === "math" : a.namespaceURI === le ? o === "math" && ce[u] : !!lt[o] : n.namespaceURI === k ? a.namespaceURI === le && !ce[u] || a.namespaceURI === oe && !se[u] ? !1 : !lt[o] && (tn[o] || !ot[o]) : !!(K === "application/xhtml+xml" && Le[n.namespaceURI]) : !1;
263
255
  }, M = function(n) {
264
256
  Z(t.removed, {
265
257
  element: n
@@ -292,7 +284,7 @@ function Mt() {
292
284
  a.setAttribute(n, "");
293
285
  } catch {
294
286
  }
295
- }, lt = function(n) {
287
+ }, st = function(n) {
296
288
  let a = null, o = null;
297
289
  if (Ne)
298
290
  n = "<remove></remove>" + n;
@@ -315,8 +307,8 @@ function Mt() {
315
307
  }
316
308
  }
317
309
  const A = a.body || a.documentElement;
318
- return n && o && A.insertBefore(r.createTextNode(o), A.childNodes[0] || null), G === k ? Xt.call(a, x ? "html" : "body")[0] : x ? a.documentElement : A;
319
- }, st = function(n) {
310
+ return n && o && A.insertBefore(r.createTextNode(o), A.childNodes[0] || null), G === k ? Xt.call(a, P ? "html" : "body")[0] : P ? a.documentElement : A;
311
+ }, ct = function(n) {
320
312
  return $t.call(
321
313
  n.ownerDocument || n,
322
314
  n,
@@ -324,64 +316,64 @@ function Mt() {
324
316
  S.SHOW_ELEMENT | S.SHOW_COMMENT | S.SHOW_TEXT | S.SHOW_PROCESSING_INSTRUCTION | S.SHOW_CDATA_SECTION,
325
317
  null
326
318
  );
327
- }, ct = function(n) {
319
+ }, Ce = function(n) {
328
320
  return n instanceof he && (typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || !(n.attributes instanceof F) || typeof n.removeAttribute != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function");
329
321
  }, ft = function(n) {
330
- return typeof O == "function" && n instanceof O;
322
+ return typeof L == "function" && n instanceof L;
331
323
  };
332
- function P(s, n, a) {
333
- ue(s, (o) => {
324
+ function x(l, n, a) {
325
+ ue(l, (o) => {
334
326
  o.call(t, n, a, Y);
335
327
  });
336
328
  }
337
329
  const ut = function(n) {
338
330
  let a = null;
339
- if (P(D.beforeSanitizeElements, n, null), ct(n))
331
+ if (x(y.beforeSanitizeElements, n, null), Ce(n))
340
332
  return M(n), !0;
341
333
  const o = g(n.nodeName);
342
- if (P(D.uponSanitizeElement, n, {
334
+ if (x(y.uponSanitizeElement, n, {
343
335
  tagName: o,
344
336
  allowedTags: h
345
- }), n.hasChildNodes() && !ft(n.firstElementChild) && N(/<[/\w]/g, n.innerHTML) && N(/<[/\w]/g, n.textContent) || n.nodeType === te.progressingInstruction || Re && n.nodeType === te.comment && N(/<[/\w]/g, n.data))
337
+ }), n.hasChildNodes() && !ft(n.firstElementChild) && O(/<[/\w!]/g, n.innerHTML) && O(/<[/\w!]/g, n.textContent) || n.nodeType === te.progressingInstruction || Re && n.nodeType === te.comment && O(/<[/\w]/g, n.data))
346
338
  return M(n), !0;
347
339
  if (!h[o] || X[o]) {
348
- if (!X[o] && pt(o) && (d.tagNameCheck instanceof RegExp && N(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
340
+ if (!X[o] && pt(o) && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
349
341
  return !1;
350
- if (ve && !W[o]) {
342
+ if (Oe && !W[o]) {
351
343
  const u = re(n) || n.parentNode, A = Yt(n) || n.childNodes;
352
344
  if (A && u) {
353
345
  const E = A.length;
354
- for (let b = E - 1; b >= 0; --b) {
355
- const w = zt(A[b], !0);
346
+ for (let D = E - 1; D >= 0; --D) {
347
+ const w = zt(A[D], !0);
356
348
  w.__removalCount = (n.__removalCount || 0) + 1, u.insertBefore(w, Gt(n));
357
349
  }
358
350
  }
359
351
  }
360
352
  return M(n), !0;
361
353
  }
362
- return n instanceof m && !on(n) || (o === "noscript" || o === "noembed" || o === "noframes") && N(/<\/no(script|embed|frames)/i, n.innerHTML) ? (M(n), !0) : (H && n.nodeType === te.text && (a = n.textContent, ue([Te, Ee, Ae], (u) => {
354
+ return n instanceof m && !on(n) || (o === "noscript" || o === "noembed" || o === "noframes") && O(/<\/no(script|embed|frames)/i, n.innerHTML) ? (M(n), !0) : (H && n.nodeType === te.text && (a = n.textContent, ue([Te, Ee, Ae], (u) => {
363
355
  a = Q(a, u, " ");
364
356
  }), n.textContent !== a && (Z(t.removed, {
365
357
  element: n.cloneNode()
366
- }), n.textContent = a)), P(D.afterSanitizeElements, n, null), !1);
358
+ }), n.textContent = a)), x(y.afterSanitizeElements, n, null), !1);
367
359
  }, mt = function(n, a, o) {
368
- if (Qe && (a === "id" || a === "name") && (o in r || o in an))
360
+ if (Je && (a === "id" || a === "name") && (o in r || o in an))
369
361
  return !1;
370
- if (!(Se && !_e[a] && N(Kt, a))) {
371
- if (!(Ke && N(qt, a))) {
362
+ if (!(Se && !_e[a] && O(Kt, a))) {
363
+ if (!(qe && O(qt, a))) {
372
364
  if (!T[a] || _e[a]) {
373
365
  if (
374
366
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
375
367
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
376
368
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
377
- !(pt(n) && (d.tagNameCheck instanceof RegExp && N(d.tagNameCheck, n) || d.tagNameCheck instanceof Function && d.tagNameCheck(n)) && (d.attributeNameCheck instanceof RegExp && N(d.attributeNameCheck, a) || d.attributeNameCheck instanceof Function && d.attributeNameCheck(a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
369
+ !(pt(n) && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, n) || d.tagNameCheck instanceof Function && d.tagNameCheck(n)) && (d.attributeNameCheck instanceof RegExp && O(d.attributeNameCheck, a) || d.attributeNameCheck instanceof Function && d.attributeNameCheck(a)) || // Alternative, second condition checks if it's an `is`-attribute, AND
378
370
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
379
- a === "is" && d.allowCustomizedBuiltInElements && (d.tagNameCheck instanceof RegExp && N(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
371
+ a === "is" && d.allowCustomizedBuiltInElements && (d.tagNameCheck instanceof RegExp && O(d.tagNameCheck, o) || d.tagNameCheck instanceof Function && d.tagNameCheck(o)))
380
372
  ) return !1;
381
- } else if (!Oe[a]) {
382
- if (!N(Ve, Q(o, $e, ""))) {
383
- if (!((a === "src" || a === "xlink:href" || a === "href") && n !== "script" && un(o, "data:") === 0 && tt[n])) {
384
- if (!(qe && !N(Zt, Q(o, $e, "")))) {
373
+ } else if (!ve[a]) {
374
+ if (!O(Xe, Q(o, Ve, ""))) {
375
+ if (!((a === "src" || a === "xlink:href" || a === "href") && n !== "script" && pn(o, "data:") === 0 && nt[n])) {
376
+ if (!(Ze && !O(Zt, Q(o, Ve, "")))) {
385
377
  if (o)
386
378
  return !1;
387
379
  }
@@ -394,11 +386,11 @@ function Mt() {
394
386
  }, pt = function(n) {
395
387
  return n !== "annotation-xml" && At(n, Qt);
396
388
  }, dt = function(n) {
397
- P(D.beforeSanitizeAttributes, n, null);
389
+ x(y.beforeSanitizeAttributes, n, null);
398
390
  const {
399
391
  attributes: a
400
392
  } = n;
401
- if (!a)
393
+ if (!a || Ce(n))
402
394
  return;
403
395
  const o = {
404
396
  attrName: "",
@@ -411,81 +403,81 @@ function Mt() {
411
403
  for (; u--; ) {
412
404
  const A = a[u], {
413
405
  name: E,
414
- namespaceURI: b,
406
+ namespaceURI: D,
415
407
  value: w
416
408
  } = A, q = g(E);
417
- let y = E === "value" ? w : mn(w);
418
- if (o.attrName = q, o.attrValue = y, o.keepAttr = !0, o.forceKeepAttr = void 0, P(D.uponSanitizeAttribute, n, o), y = o.attrValue, Je && (q === "id" || q === "name") && (fe(E, n), y = Jt + y), Re && N(/((--!?|])>)|<\/(style|title)/i, y)) {
409
+ let N = E === "value" ? w : dn(w);
410
+ if (o.attrName = q, o.attrValue = N, o.keepAttr = !0, o.forceKeepAttr = void 0, x(y.uponSanitizeAttribute, n, o), N = o.attrValue, et && (q === "id" || q === "name") && (fe(E, n), N = Jt + N), Re && O(/((--!?|])>)|<\/(style|title)/i, N)) {
419
411
  fe(E, n);
420
412
  continue;
421
413
  }
422
414
  if (o.forceKeepAttr || (fe(E, n), !o.keepAttr))
423
415
  continue;
424
- if (!Ze && N(/\/>/i, y)) {
416
+ if (!Qe && O(/\/>/i, N)) {
425
417
  fe(E, n);
426
418
  continue;
427
419
  }
428
420
  H && ue([Te, Ee, Ae], (gt) => {
429
- y = Q(y, gt, " ");
421
+ N = Q(N, gt, " ");
430
422
  });
431
423
  const ht = g(n.nodeName);
432
- if (mt(ht, q, y)) {
433
- if (R && typeof ne == "object" && typeof ne.getAttributeType == "function" && !b)
424
+ if (mt(ht, q, N)) {
425
+ if (R && typeof ne == "object" && typeof ne.getAttributeType == "function" && !D)
434
426
  switch (ne.getAttributeType(ht, q)) {
435
427
  case "TrustedHTML": {
436
- y = R.createHTML(y);
428
+ N = R.createHTML(N);
437
429
  break;
438
430
  }
439
431
  case "TrustedScriptURL": {
440
- y = R.createScriptURL(y);
432
+ N = R.createScriptURL(N);
441
433
  break;
442
434
  }
443
435
  }
444
436
  try {
445
- b ? n.setAttributeNS(b, E, y) : n.setAttribute(E, y), ct(n) ? M(n) : Et(t.removed);
437
+ D ? n.setAttributeNS(D, E, N) : n.setAttribute(E, N), Ce(n) ? M(n) : Et(t.removed);
446
438
  } catch {
447
439
  }
448
440
  }
449
441
  }
450
- P(D.afterSanitizeAttributes, n, null);
451
- }, ln = function s(n) {
442
+ x(y.afterSanitizeAttributes, n, null);
443
+ }, ln = function l(n) {
452
444
  let a = null;
453
- const o = st(n);
454
- for (P(D.beforeSanitizeShadowDOM, n, null); a = o.nextNode(); )
455
- P(D.uponSanitizeShadowNode, a, null), !ut(a) && (a.content instanceof c && s(a.content), dt(a));
456
- P(D.afterSanitizeShadowDOM, n, null);
445
+ const o = ct(n);
446
+ for (x(y.beforeSanitizeShadowDOM, n, null); a = o.nextNode(); )
447
+ x(y.uponSanitizeShadowNode, a, null), ut(a), dt(a), a.content instanceof c && l(a.content);
448
+ x(y.afterSanitizeShadowDOM, n, null);
457
449
  };
458
- return t.sanitize = function(s) {
450
+ return t.sanitize = function(l) {
459
451
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = null, o = null, u = null, A = null;
460
- if (be = !s, be && (s = "<!-->"), typeof s != "string" && !ft(s))
461
- if (typeof s.toString == "function") {
462
- if (s = s.toString(), typeof s != "string")
452
+ if (be = !l, be && (l = "<!-->"), typeof l != "string" && !ft(l))
453
+ if (typeof l.toString == "function") {
454
+ if (l = l.toString(), typeof l != "string")
463
455
  throw J("dirty is not a string, aborting");
464
456
  } else
465
457
  throw J("toString is not a function");
466
458
  if (!t.isSupported)
467
- return s;
468
- if (ye || Le(n), t.removed = [], typeof s == "string" && (j = !1), j) {
469
- if (s.nodeName) {
470
- const w = g(s.nodeName);
459
+ return l;
460
+ if (ye || De(n), t.removed = [], typeof l == "string" && (j = !1), j) {
461
+ if (l.nodeName) {
462
+ const w = g(l.nodeName);
471
463
  if (!h[w] || X[w])
472
464
  throw J("root node is forbidden and cannot be sanitized in-place");
473
465
  }
474
- } else if (s instanceof O)
475
- a = lt("<!---->"), o = a.ownerDocument.importNode(s, !0), o.nodeType === te.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? a = o : a.appendChild(o);
466
+ } else if (l instanceof L)
467
+ a = st("<!---->"), o = a.ownerDocument.importNode(l, !0), o.nodeType === te.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? a = o : a.appendChild(o);
476
468
  else {
477
- if (!B && !H && !x && // eslint-disable-next-line unicorn/prefer-includes
478
- s.indexOf("<") === -1)
479
- return R && ae ? R.createHTML(s) : s;
480
- if (a = lt(s), !a)
469
+ if (!B && !H && !P && // eslint-disable-next-line unicorn/prefer-includes
470
+ l.indexOf("<") === -1)
471
+ return R && ae ? R.createHTML(l) : l;
472
+ if (a = st(l), !a)
481
473
  return B ? null : ae ? V : "";
482
474
  }
483
475
  a && Ne && M(a.firstChild);
484
- const E = st(j ? s : a);
476
+ const E = ct(j ? l : a);
485
477
  for (; u = E.nextNode(); )
486
- ut(u) || (u.content instanceof c && ln(u.content), dt(u));
478
+ ut(u), dt(u), u.content instanceof c && ln(u.content);
487
479
  if (j)
488
- return s;
480
+ return l;
489
481
  if (B) {
490
482
  if (ie)
491
483
  for (A = Vt.call(a.ownerDocument); a.firstChild; )
@@ -494,32 +486,36 @@ function Mt() {
494
486
  A = a;
495
487
  return (T.shadowroot || T.shadowrootmode) && (A = jt.call(i, A, !0)), A;
496
488
  }
497
- let b = x ? a.outerHTML : a.innerHTML;
498
- return x && h["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && N(It, a.ownerDocument.doctype.name) && (b = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
499
- ` + b), H && ue([Te, Ee, Ae], (w) => {
500
- b = Q(b, w, " ");
501
- }), R && ae ? R.createHTML(b) : b;
489
+ let D = P ? a.outerHTML : a.innerHTML;
490
+ return P && h["!doctype"] && a.ownerDocument && a.ownerDocument.doctype && a.ownerDocument.doctype.name && O(It, a.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + a.ownerDocument.doctype.name + `>
491
+ ` + D), H && ue([Te, Ee, Ae], (w) => {
492
+ D = Q(D, w, " ");
493
+ }), R && ae ? R.createHTML(D) : D;
502
494
  }, t.setConfig = function() {
503
- let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
504
- Le(s), ye = !0;
495
+ let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
496
+ De(l), ye = !0;
505
497
  }, t.clearConfig = function() {
506
498
  Y = null, ye = !1;
507
- }, t.isValidAttribute = function(s, n, a) {
508
- Y || Le({});
509
- const o = g(s), u = g(n);
499
+ }, t.isValidAttribute = function(l, n, a) {
500
+ Y || De({});
501
+ const o = g(l), u = g(n);
510
502
  return mt(o, u, a);
511
- }, t.addHook = function(s, n) {
512
- typeof n == "function" && Z(D[s], n);
513
- }, t.removeHook = function(s) {
514
- return Et(D[s]);
515
- }, t.removeHooks = function(s) {
516
- D[s] = [];
503
+ }, t.addHook = function(l, n) {
504
+ typeof n == "function" && Z(y[l], n);
505
+ }, t.removeHook = function(l, n) {
506
+ if (n !== void 0) {
507
+ const a = un(y[l], n);
508
+ return a === -1 ? void 0 : mn(y[l], a, 1)[0];
509
+ }
510
+ return Et(y[l]);
511
+ }, t.removeHooks = function(l) {
512
+ y[l] = [];
517
513
  }, t.removeAllHooks = function() {
518
- D = vt();
514
+ y = Ot();
519
515
  }, t;
520
516
  }
521
- var Qn = Mt();
522
- function bn(e) {
517
+ var er = Mt();
518
+ function Dn(e) {
523
519
  for (var t = 1; t < arguments.length; t++) {
524
520
  var r = arguments[t];
525
521
  for (var i in r)
@@ -527,18 +523,18 @@ function bn(e) {
527
523
  }
528
524
  return e;
529
525
  }
530
- function Be(e, t) {
526
+ function ze(e, t) {
531
527
  return Array(t + 1).join(e);
532
528
  }
533
- function Dn(e) {
529
+ function Cn(e) {
534
530
  return e.replace(/^\n*/, "");
535
531
  }
536
- function Ln(e) {
532
+ function In(e) {
537
533
  for (var t = e.length; t > 0 && e[t - 1] === `
538
534
  `; ) t--;
539
535
  return e.substring(0, t);
540
536
  }
541
- var Cn = [
537
+ var Mn = [
542
538
  "ADDRESS",
543
539
  "ARTICLE",
544
540
  "ASIDE",
@@ -589,8 +585,8 @@ var Cn = [
589
585
  "TR",
590
586
  "UL"
591
587
  ];
592
- function We(e) {
593
- return Ge(e, Cn);
588
+ function Ge(e) {
589
+ return Ye(e, Mn);
594
590
  }
595
591
  var wt = [
596
592
  "AREA",
@@ -611,12 +607,12 @@ var wt = [
611
607
  "WBR"
612
608
  ];
613
609
  function kt(e) {
614
- return Ge(e, wt);
610
+ return Ye(e, wt);
615
611
  }
616
- function In(e) {
617
- return xt(e, wt);
612
+ function wn(e) {
613
+ return Pt(e, wt);
618
614
  }
619
- var Pt = [
615
+ var xt = [
620
616
  "A",
621
617
  "TABLE",
622
618
  "THEAD",
@@ -629,16 +625,16 @@ var Pt = [
629
625
  "AUDIO",
630
626
  "VIDEO"
631
627
  ];
632
- function Mn(e) {
633
- return Ge(e, Pt);
628
+ function kn(e) {
629
+ return Ye(e, xt);
634
630
  }
635
- function wn(e) {
636
- return xt(e, Pt);
631
+ function xn(e) {
632
+ return Pt(e, xt);
637
633
  }
638
- function Ge(e, t) {
634
+ function Ye(e, t) {
639
635
  return t.indexOf(e.nodeName) >= 0;
640
636
  }
641
- function xt(e, t) {
637
+ function Pt(e, t) {
642
638
  return e.getElementsByTagName && t.some(function(r) {
643
639
  return e.getElementsByTagName(r).length;
644
640
  });
@@ -666,17 +662,17 @@ _.heading = {
666
662
  replacement: function(e, t, r) {
667
663
  var i = Number(t.nodeName.charAt(1));
668
664
  if (r.headingStyle === "setext" && i < 3) {
669
- var l = Be(i === 1 ? "=" : "-", e.length);
665
+ var s = ze(i === 1 ? "=" : "-", e.length);
670
666
  return `
671
667
 
672
668
  ` + e + `
673
- ` + l + `
669
+ ` + s + `
674
670
 
675
671
  `;
676
672
  } else
677
673
  return `
678
674
 
679
- ` + Be("#", i) + " " + e + `
675
+ ` + ze("#", i) + " " + e + `
680
676
 
681
677
  `;
682
678
  }
@@ -709,9 +705,9 @@ _.listItem = {
709
705
  e = e.replace(/^\n+/, "").replace(/\n+$/, `
710
706
  `).replace(/\n/gm, `
711
707
  `);
712
- var i = r.bulletListMarker + " ", l = t.parentNode;
713
- if (l.nodeName === "OL") {
714
- var c = l.getAttribute("start"), p = Array.prototype.indexOf.call(l.children, t);
708
+ var i = r.bulletListMarker + " ", s = t.parentNode;
709
+ if (s.nodeName === "OL") {
710
+ var c = s.getAttribute("start"), p = Array.prototype.indexOf.call(s.children, t);
715
711
  i = (c ? Number(c) + p : p + 1) + ". ";
716
712
  }
717
713
  return i + e + (t.nextSibling && !/\n$/.test(e) ? `
@@ -736,12 +732,12 @@ _.fencedCodeBlock = {
736
732
  return t.codeBlockStyle === "fenced" && e.nodeName === "PRE" && e.firstChild && e.firstChild.nodeName === "CODE";
737
733
  },
738
734
  replacement: function(e, t, r) {
739
- for (var i = t.firstChild.getAttribute("class") || "", l = (i.match(/language-(\S+)/) || [null, ""])[1], c = t.firstChild.textContent, p = r.fence.charAt(0), O = 3, m = new RegExp("^" + p + "{3,}", "gm"), S; S = m.exec(c); )
740
- S[0].length >= O && (O = S[0].length + 1);
741
- var F = Be(p, O);
735
+ for (var i = t.firstChild.getAttribute("class") || "", s = (i.match(/language-(\S+)/) || [null, ""])[1], c = t.firstChild.textContent, p = r.fence.charAt(0), L = 3, m = new RegExp("^" + p + "{3,}", "gm"), S; S = m.exec(c); )
736
+ S[0].length >= L && (L = S[0].length + 1);
737
+ var F = ze(p, L);
742
738
  return `
743
739
 
744
- ` + F + l + `
740
+ ` + F + s + `
745
741
  ` + c.replace(/\n$/, "") + `
746
742
  ` + F + `
747
743
 
@@ -774,19 +770,19 @@ _.referenceLink = {
774
770
  return t.linkStyle === "referenced" && e.nodeName === "A" && e.getAttribute("href");
775
771
  },
776
772
  replacement: function(e, t, r) {
777
- var i = t.getAttribute("href"), l = de(t.getAttribute("title"));
778
- l && (l = ' "' + l + '"');
773
+ var i = t.getAttribute("href"), s = de(t.getAttribute("title"));
774
+ s && (s = ' "' + s + '"');
779
775
  var c, p;
780
776
  switch (r.linkReferenceStyle) {
781
777
  case "collapsed":
782
- c = "[" + e + "][]", p = "[" + e + "]: " + i + l;
778
+ c = "[" + e + "][]", p = "[" + e + "]: " + i + s;
783
779
  break;
784
780
  case "shortcut":
785
- c = "[" + e + "]", p = "[" + e + "]: " + i + l;
781
+ c = "[" + e + "]", p = "[" + e + "]: " + i + s;
786
782
  break;
787
783
  default:
788
- var O = this.references.length + 1;
789
- c = "[" + e + "][" + O + "]", p = "[" + O + "]: " + i + l;
784
+ var L = this.references.length + 1;
785
+ c = "[" + e + "][" + L + "]", p = "[" + L + "]: " + i + s;
790
786
  }
791
787
  return this.references.push(p), c;
792
788
  },
@@ -828,7 +824,7 @@ _.code = {
828
824
  _.image = {
829
825
  filter: "img",
830
826
  replacement: function(e, t) {
831
- var r = de(t.getAttribute("alt")), i = t.getAttribute("src") || "", l = de(t.getAttribute("title")), c = l ? ' "' + l + '"' : "";
827
+ var r = de(t.getAttribute("alt")), i = t.getAttribute("src") || "", s = de(t.getAttribute("title")), c = s ? ' "' + s + '"' : "";
832
828
  return i ? "![" + r + "](" + i + c + ")" : "";
833
829
  }
834
830
  };
@@ -873,11 +869,11 @@ Ut.prototype = {
873
869
  };
874
870
  function Pe(e, t, r) {
875
871
  for (var i = 0; i < e.length; i++) {
876
- var l = e[i];
877
- if (kn(l, t, r)) return l;
872
+ var s = e[i];
873
+ if (Pn(s, t, r)) return s;
878
874
  }
879
875
  }
880
- function kn(e, t, r) {
876
+ function Pn(e, t, r) {
881
877
  var i = e.filter;
882
878
  if (typeof i == "string") {
883
879
  if (i === t.nodeName.toLowerCase()) return !0;
@@ -888,51 +884,51 @@ function kn(e, t, r) {
888
884
  } else
889
885
  throw new TypeError("`filter` needs to be a string, array, or function");
890
886
  }
891
- function Pn(e) {
892
- var t = e.element, r = e.isBlock, i = e.isVoid, l = e.isPre || function(he) {
887
+ function Un(e) {
888
+ var t = e.element, r = e.isBlock, i = e.isVoid, s = e.isPre || function(he) {
893
889
  return he.nodeName === "PRE";
894
890
  };
895
- if (!(!t.firstChild || l(t))) {
896
- for (var c = null, p = !1, O = null, m = Ot(O, t, l); m !== t; ) {
891
+ if (!(!t.firstChild || s(t))) {
892
+ for (var c = null, p = !1, L = null, m = vt(L, t, s); m !== t; ) {
897
893
  if (m.nodeType === 3 || m.nodeType === 4) {
898
894
  var S = m.data.replace(/[ \r\n\t]+/g, " ");
899
895
  if ((!c || / $/.test(c.data)) && !p && S[0] === " " && (S = S.substr(1)), !S) {
900
- m = xe(m);
896
+ m = Ue(m);
901
897
  continue;
902
898
  }
903
899
  m.data = S, c = m;
904
900
  } else if (m.nodeType === 1)
905
- r(m) || m.nodeName === "BR" ? (c && (c.data = c.data.replace(/ $/, "")), c = null, p = !1) : i(m) || l(m) ? (c = null, p = !0) : c && (p = !1);
901
+ r(m) || m.nodeName === "BR" ? (c && (c.data = c.data.replace(/ $/, "")), c = null, p = !1) : i(m) || s(m) ? (c = null, p = !0) : c && (p = !1);
906
902
  else {
907
- m = xe(m);
903
+ m = Ue(m);
908
904
  continue;
909
905
  }
910
- var F = Ot(O, m, l);
911
- O = m, m = F;
906
+ var F = vt(L, m, s);
907
+ L = m, m = F;
912
908
  }
913
- c && (c.data = c.data.replace(/ $/, ""), c.data || xe(c));
909
+ c && (c.data = c.data.replace(/ $/, ""), c.data || Ue(c));
914
910
  }
915
911
  }
916
- function xe(e) {
912
+ function Ue(e) {
917
913
  var t = e.nextSibling || e.parentNode;
918
914
  return e.parentNode.removeChild(e), t;
919
915
  }
920
- function Ot(e, t, r) {
916
+ function vt(e, t, r) {
921
917
  return e && e.parentNode === t || r(t) ? t.nextSibling || t.parentNode : t.firstChild || t.nextSibling || t.parentNode;
922
918
  }
923
- var Ye = typeof window < "u" ? window : {};
924
- function xn() {
925
- var e = Ye.DOMParser, t = !1;
919
+ var $e = typeof window < "u" ? window : {};
920
+ function Fn() {
921
+ var e = $e.DOMParser, t = !1;
926
922
  try {
927
923
  new e().parseFromString("", "text/html") && (t = !0);
928
924
  } catch {
929
925
  }
930
926
  return t;
931
927
  }
932
- function Un() {
928
+ function Hn() {
933
929
  var e = function() {
934
930
  };
935
- return Fn() ? e.prototype.parseFromString = function(t) {
931
+ return Bn() ? e.prototype.parseFromString = function(t) {
936
932
  var r = new window.ActiveXObject("htmlfile");
937
933
  return r.designMode = "on", r.open(), r.write(t), r.close(), r;
938
934
  } : e.prototype.parseFromString = function(t) {
@@ -940,20 +936,20 @@ function Un() {
940
936
  return r.open(), r.write(t), r.close(), r;
941
937
  }, e;
942
938
  }
943
- function Fn() {
939
+ function Bn() {
944
940
  var e = !1;
945
941
  try {
946
942
  document.implementation.createHTMLDocument("").open();
947
943
  } catch {
948
- Ye.ActiveXObject && (e = !0);
944
+ $e.ActiveXObject && (e = !0);
949
945
  }
950
946
  return e;
951
947
  }
952
- var Hn = xn() ? Ye.DOMParser : Un();
953
- function Bn(e, t) {
948
+ var zn = Fn() ? $e.DOMParser : Hn();
949
+ function Wn(e, t) {
954
950
  var r;
955
951
  if (typeof e == "string") {
956
- var i = zn().parseFromString(
952
+ var i = Gn().parseFromString(
957
953
  // DOM parsers arrange elements in the <head> and <body>.
958
954
  // Wrapping in a custom element ensures elements are reliably arranged in
959
955
  // a single element.
@@ -963,33 +959,33 @@ function Bn(e, t) {
963
959
  r = i.getElementById("turndown-root");
964
960
  } else
965
961
  r = e.cloneNode(!0);
966
- return Pn({
962
+ return Un({
967
963
  element: r,
968
- isBlock: We,
964
+ isBlock: Ge,
969
965
  isVoid: kt,
970
- isPre: t.preformattedCode ? Wn : null
966
+ isPre: t.preformattedCode ? Yn : null
971
967
  }), r;
972
968
  }
973
- var Ue;
974
- function zn() {
975
- return Ue = Ue || new Hn(), Ue;
969
+ var Fe;
970
+ function Gn() {
971
+ return Fe = Fe || new zn(), Fe;
976
972
  }
977
- function Wn(e) {
973
+ function Yn(e) {
978
974
  return e.nodeName === "PRE" || e.nodeName === "CODE";
979
975
  }
980
- function Gn(e, t) {
981
- return e.isBlock = We(e), e.isCode = e.nodeName === "CODE" || e.parentNode.isCode, e.isBlank = Yn(e), e.flankingWhitespace = $n(e, t), e;
976
+ function $n(e, t) {
977
+ return e.isBlock = Ge(e), e.isCode = e.nodeName === "CODE" || e.parentNode.isCode, e.isBlank = Vn(e), e.flankingWhitespace = Xn(e, t), e;
982
978
  }
983
- function Yn(e) {
984
- return !kt(e) && !Mn(e) && /^\s*$/i.test(e.textContent) && !In(e) && !wn(e);
979
+ function Vn(e) {
980
+ return !kt(e) && !kn(e) && /^\s*$/i.test(e.textContent) && !wn(e) && !xn(e);
985
981
  }
986
- function $n(e, t) {
982
+ function Xn(e, t) {
987
983
  if (e.isBlock || t.preformattedCode && e.isCode)
988
984
  return { leading: "", trailing: "" };
989
- var r = Vn(e.textContent);
985
+ var r = jn(e.textContent);
990
986
  return r.leadingAscii && bt("left", e, t) && (r.leading = r.leadingNonAscii), r.trailingAscii && bt("right", e, t) && (r.trailing = r.trailingNonAscii), { leading: r.leading, trailing: r.trailing };
991
987
  }
992
- function Vn(e) {
988
+ function jn(e) {
993
989
  var t = e.match(/^(([ \t\r\n]*)(\s*))(?:(?=\S)[\s\S]*\S)?((\s*?)([ \t\r\n]*))$/);
994
990
  return {
995
991
  leading: t[1],
@@ -1003,10 +999,10 @@ function Vn(e) {
1003
999
  };
1004
1000
  }
1005
1001
  function bt(e, t, r) {
1006
- var i, l, c;
1007
- return e === "left" ? (i = t.previousSibling, l = / $/) : (i = t.nextSibling, l = /^ /), i && (i.nodeType === 3 ? c = l.test(i.nodeValue) : r.preformattedCode && i.nodeName === "CODE" ? c = !1 : i.nodeType === 1 && !We(i) && (c = l.test(i.textContent))), c;
1002
+ var i, s, c;
1003
+ return e === "left" ? (i = t.previousSibling, s = / $/) : (i = t.nextSibling, s = /^ /), i && (i.nodeType === 3 ? c = s.test(i.nodeValue) : r.preformattedCode && i.nodeName === "CODE" ? c = !1 : i.nodeType === 1 && !Ge(i) && (c = s.test(i.textContent))), c;
1008
1004
  }
1009
- var Xn = Array.prototype.reduce, jn = [
1005
+ var Kn = Array.prototype.reduce, qn = [
1010
1006
  [/\\/g, "\\\\"],
1011
1007
  [/\*/g, "\\*"],
1012
1008
  [/^-/g, "\\-"],
@@ -1021,8 +1017,8 @@ var Xn = Array.prototype.reduce, jn = [
1021
1017
  [/_/g, "\\_"],
1022
1018
  [/^(\d+)\. /g, "$1\\. "]
1023
1019
  ];
1024
- function ze(e) {
1025
- if (!(this instanceof ze)) return new ze(e);
1020
+ function We(e) {
1021
+ if (!(this instanceof We)) return new We(e);
1026
1022
  var t = {
1027
1023
  rules: _,
1028
1024
  headingStyle: "setext",
@@ -1056,9 +1052,9 @@ function ze(e) {
1056
1052
  ` : r;
1057
1053
  }
1058
1054
  };
1059
- this.options = bn({}, t, e), this.rules = new Ut(this.options);
1055
+ this.options = Dn({}, t, e), this.rules = new Ut(this.options);
1060
1056
  }
1061
- ze.prototype = {
1057
+ We.prototype = {
1062
1058
  /**
1063
1059
  * The entry point for converting a string or DOM node to Markdown
1064
1060
  * @public
@@ -1067,13 +1063,13 @@ ze.prototype = {
1067
1063
  * @type String
1068
1064
  */
1069
1065
  turndown: function(e) {
1070
- if (!Zn(e))
1066
+ if (!Jn(e))
1071
1067
  throw new TypeError(
1072
1068
  e + " is not a string, or an element/document/fragment node."
1073
1069
  );
1074
1070
  if (e === "") return "";
1075
- var t = Ft.call(this, new Bn(e, this.options));
1076
- return Kn.call(this, t);
1071
+ var t = Ft.call(this, new Wn(e, this.options));
1072
+ return Zn.call(this, t);
1077
1073
  },
1078
1074
  /**
1079
1075
  * Add one or more plugins
@@ -1130,39 +1126,39 @@ ze.prototype = {
1130
1126
  * @type String
1131
1127
  */
1132
1128
  escape: function(e) {
1133
- return jn.reduce(function(t, r) {
1129
+ return qn.reduce(function(t, r) {
1134
1130
  return t.replace(r[0], r[1]);
1135
1131
  }, e);
1136
1132
  }
1137
1133
  };
1138
1134
  function Ft(e) {
1139
1135
  var t = this;
1140
- return Xn.call(e.childNodes, function(r, i) {
1141
- i = new Gn(i, t.options);
1142
- var l = "";
1143
- return i.nodeType === 3 ? l = i.isCode ? i.nodeValue : t.escape(i.nodeValue) : i.nodeType === 1 && (l = qn.call(t, i)), Ht(r, l);
1136
+ return Kn.call(e.childNodes, function(r, i) {
1137
+ i = new $n(i, t.options);
1138
+ var s = "";
1139
+ return i.nodeType === 3 ? s = i.isCode ? i.nodeValue : t.escape(i.nodeValue) : i.nodeType === 1 && (s = Qn.call(t, i)), Ht(r, s);
1144
1140
  }, "");
1145
1141
  }
1146
- function Kn(e) {
1142
+ function Zn(e) {
1147
1143
  var t = this;
1148
1144
  return this.rules.forEach(function(r) {
1149
1145
  typeof r.append == "function" && (e = Ht(e, r.append(t.options)));
1150
1146
  }), e.replace(/^[\t\r\n]+/, "").replace(/[\t\r\n\s]+$/, "");
1151
1147
  }
1152
- function qn(e) {
1148
+ function Qn(e) {
1153
1149
  var t = this.rules.forNode(e), r = Ft.call(this, e), i = e.flankingWhitespace;
1154
1150
  return (i.leading || i.trailing) && (r = r.trim()), i.leading + t.replacement(r, e, this.options) + i.trailing;
1155
1151
  }
1156
1152
  function Ht(e, t) {
1157
- var r = Ln(e), i = Dn(t), l = Math.max(e.length - r.length, t.length - i.length), c = `
1153
+ var r = In(e), i = Cn(t), s = Math.max(e.length - r.length, t.length - i.length), c = `
1158
1154
 
1159
- `.substring(0, l);
1155
+ `.substring(0, s);
1160
1156
  return r + c + i;
1161
1157
  }
1162
- function Zn(e) {
1158
+ function Jn(e) {
1163
1159
  return e != null && (typeof e == "string" || e.nodeType && (e.nodeType === 1 || e.nodeType === 9 || e.nodeType === 11));
1164
1160
  }
1165
1161
  export {
1166
- ze as T,
1167
- Qn as p
1162
+ We as T,
1163
+ er as p
1168
1164
  };