ods-component-lib 1.22.5 → 1.23.0
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.
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index2.js.map +1 -1
- package/dist/_virtual/index3.js +4 -4
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/devextreme/DataGrid/hooks/useBodyClasses.js +1 -1
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js +7 -7
- package/dist/components/devextreme/OdsDataGrid.Legacy.js +3 -3
- package/dist/components/devextreme/OdsRemoteDataGrid.js +1 -1
- package/dist/index.js +5 -5
- package/dist/node_modules/canvg/lib/index.es.js +86 -86
- package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
- package/dist/node_modules/core-js/internals/shared-store.js +8 -8
- package/dist/node_modules/core-js/internals/shared-store.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/fflate/esm/browser.js +295 -335
- package/dist/node_modules/fflate/esm/browser.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +278 -295
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/ods-icon/react/24/outline/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/providers/OdsConfigProvider.js +7 -6
- package/package.json +3 -3
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
function I(
|
|
1
|
+
function I(r) {
|
|
2
2
|
"@babel/helpers - typeof";
|
|
3
3
|
return I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(n) {
|
|
4
4
|
return typeof n;
|
|
5
5
|
} : function(n) {
|
|
6
6
|
return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
|
|
7
|
-
}, I(
|
|
7
|
+
}, I(r);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
9
|
+
function ke(r, n) {
|
|
10
|
+
return ke = Object.setPrototypeOf || function(s, c) {
|
|
11
11
|
return s.__proto__ = c, s;
|
|
12
|
-
},
|
|
12
|
+
}, ke(r, n);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Ht() {
|
|
15
15
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
16
16
|
if (typeof Proxy == "function") return !0;
|
|
17
17
|
try {
|
|
@@ -21,119 +21,119 @@ function zt() {
|
|
|
21
21
|
return !1;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function oe(r, n, o) {
|
|
25
|
+
return Ht() ? oe = Reflect.construct : oe = function(c, b, y) {
|
|
26
26
|
var N = [null];
|
|
27
|
-
N.push.apply(N,
|
|
28
|
-
var x = Function.bind.apply(c, N),
|
|
29
|
-
return y &&
|
|
30
|
-
},
|
|
27
|
+
N.push.apply(N, b);
|
|
28
|
+
var x = Function.bind.apply(c, N), $ = new x();
|
|
29
|
+
return y && ke($, y.prototype), $;
|
|
30
|
+
}, oe.apply(null, arguments);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function L(r) {
|
|
33
|
+
return zt(r) || Gt(r) || Wt(r) || Bt();
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
if (Array.isArray(
|
|
35
|
+
function zt(r) {
|
|
36
|
+
if (Array.isArray(r)) return Pe(r);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (typeof Symbol < "u" &&
|
|
38
|
+
function Gt(r) {
|
|
39
|
+
if (typeof Symbol < "u" && r[Symbol.iterator] != null || r["@@iterator"] != null) return Array.from(r);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
if (
|
|
43
|
-
if (typeof
|
|
44
|
-
var o = Object.prototype.toString.call(
|
|
45
|
-
if (o === "Object" &&
|
|
46
|
-
if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return
|
|
41
|
+
function Wt(r, n) {
|
|
42
|
+
if (r) {
|
|
43
|
+
if (typeof r == "string") return Pe(r, n);
|
|
44
|
+
var o = Object.prototype.toString.call(r).slice(8, -1);
|
|
45
|
+
if (o === "Object" && r.constructor && (o = r.constructor.name), o === "Map" || o === "Set") return Array.from(r);
|
|
46
|
+
if (o === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)) return Pe(r, n);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
(n == null || n >
|
|
51
|
-
for (var o = 0, s = new Array(n); o < n; o++) s[o] =
|
|
49
|
+
function Pe(r, n) {
|
|
50
|
+
(n == null || n > r.length) && (n = r.length);
|
|
51
|
+
for (var o = 0, s = new Array(n); o < n; o++) s[o] = r[o];
|
|
52
52
|
return s;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Bt() {
|
|
55
55
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
56
56
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
|
|
58
|
+
var $t = Object.hasOwnProperty, lt = Object.setPrototypeOf, jt = Object.isFrozen, Yt = Object.getPrototypeOf, Vt = Object.getOwnPropertyDescriptor, E = Object.freeze, g = Object.seal, Xt = Object.create, dt = typeof Reflect < "u" && Reflect, se = dt.apply, Fe = dt.construct;
|
|
59
|
+
se || (se = function(n, o, s) {
|
|
60
60
|
return n.apply(o, s);
|
|
61
61
|
});
|
|
62
62
|
E || (E = function(n) {
|
|
63
63
|
return n;
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
g || (g = function(n) {
|
|
66
66
|
return n;
|
|
67
67
|
});
|
|
68
|
-
|
|
69
|
-
return
|
|
68
|
+
Fe || (Fe = function(n, o) {
|
|
69
|
+
return oe(n, L(o));
|
|
70
70
|
});
|
|
71
|
-
var
|
|
72
|
-
function
|
|
71
|
+
var qt = S(Array.prototype.forEach), st = S(Array.prototype.pop), X = S(Array.prototype.push), le = S(String.prototype.toLowerCase), Me = S(String.prototype.toString), ut = S(String.prototype.match), R = S(String.prototype.replace), Kt = S(String.prototype.indexOf), Zt = S(String.prototype.trim), h = S(RegExp.prototype.test), De = Jt(TypeError);
|
|
72
|
+
function S(r) {
|
|
73
73
|
return function(n) {
|
|
74
74
|
for (var o = arguments.length, s = new Array(o > 1 ? o - 1 : 0), c = 1; c < o; c++)
|
|
75
75
|
s[c - 1] = arguments[c];
|
|
76
|
-
return
|
|
76
|
+
return se(r, n, s);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Jt(r) {
|
|
80
80
|
return function() {
|
|
81
81
|
for (var n = arguments.length, o = new Array(n), s = 0; s < n; s++)
|
|
82
82
|
o[s] = arguments[s];
|
|
83
|
-
return
|
|
83
|
+
return Fe(r, o);
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function l(
|
|
86
|
+
function l(r, n, o) {
|
|
87
87
|
var s;
|
|
88
|
-
o = (s = o) !== null && s !== void 0 ? s :
|
|
88
|
+
o = (s = o) !== null && s !== void 0 ? s : le, lt && lt(r, null);
|
|
89
89
|
for (var c = n.length; c--; ) {
|
|
90
|
-
var
|
|
91
|
-
if (typeof
|
|
92
|
-
var y = o(
|
|
93
|
-
y !==
|
|
90
|
+
var b = n[c];
|
|
91
|
+
if (typeof b == "string") {
|
|
92
|
+
var y = o(b);
|
|
93
|
+
y !== b && (jt(n) || (n[c] = y), b = y);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
r[b] = !0;
|
|
96
96
|
}
|
|
97
|
-
return
|
|
97
|
+
return r;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
100
|
-
var n =
|
|
101
|
-
for (o in
|
|
102
|
-
|
|
99
|
+
function F(r) {
|
|
100
|
+
var n = Xt(null), o;
|
|
101
|
+
for (o in r)
|
|
102
|
+
se($t, r, [o]) === !0 && (n[o] = r[o]);
|
|
103
103
|
return n;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
for (;
|
|
107
|
-
var o = Vt(
|
|
105
|
+
function ne(r, n) {
|
|
106
|
+
for (; r !== null; ) {
|
|
107
|
+
var o = Vt(r, n);
|
|
108
108
|
if (o) {
|
|
109
109
|
if (o.get)
|
|
110
|
-
return
|
|
110
|
+
return S(o.get);
|
|
111
111
|
if (typeof o.value == "function")
|
|
112
|
-
return
|
|
112
|
+
return S(o.value);
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
r = Yt(r);
|
|
115
115
|
}
|
|
116
116
|
function s(c) {
|
|
117
117
|
return null;
|
|
118
118
|
}
|
|
119
119
|
return s;
|
|
120
120
|
}
|
|
121
|
-
var
|
|
121
|
+
var ft = E(["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"]), we = E(["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 = E(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Qt = E(["animate", "color-profile", "cursor", "discard", "fedropshadow", "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"]), Ie = E(["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"]), er = E(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), ct = E(["#text"]), mt = E(["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", "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", "xmlns", "slot"]), xe = E(["accent-height", "accumulate", "additive", "alignment-baseline", "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", "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", "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", "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", "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"]), pt = E(["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"]), ie = E(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), tr = g(/\{\{[\w\W]*|[\w\W]*\}\}/gm), rr = g(/<%[\w\W]*|[\w\W]*%>/gm), ar = g(/\${[\w\W]*}/gm), nr = g(/^data-[\-\w.\u00B7-\uFFFF]/), ir = g(/^aria-[\-\w]+$/), or = g(
|
|
122
122
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
123
123
|
// eslint-disable-line no-useless-escape
|
|
124
|
-
),
|
|
124
|
+
), lr = g(/^(?:\w+script|data):/i), sr = g(
|
|
125
125
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
126
126
|
// eslint-disable-line no-control-regex
|
|
127
|
-
),
|
|
127
|
+
), ur = g(/^html$/i), fr = g(/^[a-z][.\w]*(-[.\w]+)+$/i), cr = function() {
|
|
128
128
|
return typeof window > "u" ? null : window;
|
|
129
|
-
},
|
|
129
|
+
}, mr = function(n, o) {
|
|
130
130
|
if (I(n) !== "object" || typeof n.createPolicy != "function")
|
|
131
131
|
return null;
|
|
132
132
|
var s = null, c = "data-tt-policy-suffix";
|
|
133
133
|
o.currentScript && o.currentScript.hasAttribute(c) && (s = o.currentScript.getAttribute(c));
|
|
134
|
-
var
|
|
134
|
+
var b = "dompurify" + (s ? "#" + s : "");
|
|
135
135
|
try {
|
|
136
|
-
return n.createPolicy(
|
|
136
|
+
return n.createPolicy(b, {
|
|
137
137
|
createHTML: function(N) {
|
|
138
138
|
return N;
|
|
139
139
|
},
|
|
@@ -145,25 +145,25 @@ var mt = E(["a", "abbr", "acronym", "address", "area", "article", "aside", "audi
|
|
|
145
145
|
return null;
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
-
return
|
|
148
|
+
function Tt() {
|
|
149
|
+
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : cr(), n = function(e) {
|
|
150
|
+
return Tt(e);
|
|
151
151
|
};
|
|
152
|
-
if (n.version = "2.
|
|
152
|
+
if (n.version = "2.4.9", n.removed = [], !r || !r.document || r.document.nodeType !== 9)
|
|
153
153
|
return n.isSupported = !1, n;
|
|
154
|
-
var o =
|
|
155
|
-
if (typeof
|
|
156
|
-
var
|
|
157
|
-
|
|
154
|
+
var o = r.document, s = r.document, c = r.DocumentFragment, b = r.HTMLTemplateElement, y = r.Node, N = r.Element, x = r.NodeFilter, $ = r.NamedNodeMap, vt = $ === void 0 ? r.NamedNodeMap || r.MozNamedAttrMap : $, _t = r.HTMLFormElement, ht = r.DOMParser, q = r.trustedTypes, K = N.prototype, Et = ne(K, "cloneNode"), At = ne(K, "nextSibling"), yt = ne(K, "childNodes"), ue = ne(K, "parentNode");
|
|
155
|
+
if (typeof b == "function") {
|
|
156
|
+
var fe = s.createElement("template");
|
|
157
|
+
fe.content && fe.content.ownerDocument && (s = fe.content.ownerDocument);
|
|
158
158
|
}
|
|
159
|
-
var
|
|
159
|
+
var O = mr(q, o), ce = O ? O.createHTML("") : "", Z = s, me = Z.implementation, gt = Z.createNodeIterator, St = Z.createDocumentFragment, bt = Z.getElementsByTagName, Ot = o.importNode, Ue = {};
|
|
160
160
|
try {
|
|
161
|
-
|
|
161
|
+
Ue = F(s).documentMode ? s.documentMode : {};
|
|
162
162
|
} catch {
|
|
163
163
|
}
|
|
164
|
-
var
|
|
165
|
-
n.isSupported = typeof
|
|
166
|
-
var de = rr, Te = ar,
|
|
164
|
+
var M = {};
|
|
165
|
+
n.isSupported = typeof ue == "function" && me && me.createHTMLDocument !== void 0 && Ue !== 9;
|
|
166
|
+
var pe = tr, de = rr, Te = ar, Rt = nr, Lt = ir, Nt = lr, He = sr, Mt = fr, ve = or, m = null, ze = l({}, [].concat(L(ft), L(we), L(Ce), L(Ie), L(ct))), p = null, Ge = l({}, [].concat(L(mt), L(xe), L(pt), L(ie))), f = Object.seal(Object.create(null, {
|
|
167
167
|
tagNameCheck: {
|
|
168
168
|
writable: !0,
|
|
169
169
|
configurable: !1,
|
|
@@ -182,66 +182,66 @@ function _t() {
|
|
|
182
182
|
enumerable: !0,
|
|
183
183
|
value: !1
|
|
184
184
|
}
|
|
185
|
-
})),
|
|
185
|
+
})), j = null, _e = null, We = !0, he = !0, Be = !1, $e = !0, U = !1, k = !1, Ee = !1, Ae = !1, H = !1, J = !1, Q = !1, je = !0, Ye = !1, Dt = "user-content-", ye = !0, Y = !1, z = {}, G = null, 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"]), Xe = null, qe = l({}, ["audio", "video", "img", "source", "image", "track"]), ge = null, Ke = l({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ee = "http://www.w3.org/1998/Math/MathML", te = "http://www.w3.org/2000/svg", w = "http://www.w3.org/1999/xhtml", W = w, Se = !1, be = null, wt = l({}, [ee, te, w], Me), P, Ct = ["application/xhtml+xml", "text/html"], It = "text/html", d, B = null, xt = s.createElement("form"), Ze = function(e) {
|
|
186
186
|
return e instanceof RegExp || e instanceof Function;
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
}, Oe = function(e) {
|
|
188
|
+
B && B === e || ((!e || I(e) !== "object") && (e = {}), e = F(e), P = // eslint-disable-next-line unicorn/prefer-includes
|
|
189
|
+
Ct.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? P = It : P = e.PARSER_MEDIA_TYPE, d = P === "application/xhtml+xml" ? Me : le, m = "ALLOWED_TAGS" in e ? l({}, e.ALLOWED_TAGS, d) : ze, p = "ALLOWED_ATTR" in e ? l({}, e.ALLOWED_ATTR, d) : Ge, be = "ALLOWED_NAMESPACES" in e ? l({}, e.ALLOWED_NAMESPACES, Me) : wt, ge = "ADD_URI_SAFE_ATTR" in e ? l(
|
|
190
|
+
F(Ke),
|
|
191
191
|
// eslint-disable-line indent
|
|
192
192
|
e.ADD_URI_SAFE_ATTR,
|
|
193
193
|
// eslint-disable-line indent
|
|
194
|
-
|
|
194
|
+
d
|
|
195
195
|
// eslint-disable-line indent
|
|
196
|
-
) :
|
|
197
|
-
|
|
196
|
+
) : Ke, Xe = "ADD_DATA_URI_TAGS" in e ? l(
|
|
197
|
+
F(qe),
|
|
198
198
|
// eslint-disable-line indent
|
|
199
199
|
e.ADD_DATA_URI_TAGS,
|
|
200
200
|
// eslint-disable-line indent
|
|
201
|
-
|
|
201
|
+
d
|
|
202
202
|
// eslint-disable-line indent
|
|
203
|
-
) :
|
|
204
|
-
},
|
|
205
|
-
l(
|
|
206
|
-
var
|
|
207
|
-
l(
|
|
208
|
-
var
|
|
209
|
-
var t =
|
|
203
|
+
) : qe, G = "FORBID_CONTENTS" in e ? l({}, e.FORBID_CONTENTS, d) : Ve, j = "FORBID_TAGS" in e ? l({}, e.FORBID_TAGS, d) : {}, _e = "FORBID_ATTR" in e ? l({}, e.FORBID_ATTR, d) : {}, z = "USE_PROFILES" in e ? e.USE_PROFILES : !1, We = e.ALLOW_ARIA_ATTR !== !1, he = e.ALLOW_DATA_ATTR !== !1, Be = e.ALLOW_UNKNOWN_PROTOCOLS || !1, $e = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, k = e.WHOLE_DOCUMENT || !1, H = e.RETURN_DOM || !1, J = e.RETURN_DOM_FRAGMENT || !1, Q = e.RETURN_TRUSTED_TYPE || !1, Ae = e.FORCE_BODY || !1, je = e.SANITIZE_DOM !== !1, Ye = e.SANITIZE_NAMED_PROPS || !1, ye = e.KEEP_CONTENT !== !1, Y = e.IN_PLACE || !1, ve = e.ALLOWED_URI_REGEXP || ve, W = e.NAMESPACE || w, f = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (f.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(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), U && (he = !1), J && (H = !0), z && (m = l({}, L(ct)), p = [], z.html === !0 && (l(m, ft), l(p, mt)), z.svg === !0 && (l(m, we), l(p, xe), l(p, ie)), z.svgFilters === !0 && (l(m, Ce), l(p, xe), l(p, ie)), z.mathMl === !0 && (l(m, Ie), l(p, pt), l(p, ie))), e.ADD_TAGS && (m === ze && (m = F(m)), l(m, e.ADD_TAGS, d)), e.ADD_ATTR && (p === Ge && (p = F(p)), l(p, e.ADD_ATTR, d)), e.ADD_URI_SAFE_ATTR && l(ge, e.ADD_URI_SAFE_ATTR, d), e.FORBID_CONTENTS && (G === Ve && (G = F(G)), l(G, e.FORBID_CONTENTS, d)), ye && (m["#text"] = !0), k && l(m, ["html", "head", "body"]), m.table && (l(m, ["tbody"]), delete j.tbody), E && E(e), B = e);
|
|
204
|
+
}, Je = l({}, ["mi", "mo", "mn", "ms", "mtext"]), Qe = l({}, ["foreignobject", "desc", "title", "annotation-xml"]), kt = l({}, ["title", "style", "font", "a", "script"]), re = l({}, we);
|
|
205
|
+
l(re, Ce), l(re, Qt);
|
|
206
|
+
var Re = l({}, Ie);
|
|
207
|
+
l(Re, er);
|
|
208
|
+
var Pt = function(e) {
|
|
209
|
+
var t = ue(e);
|
|
210
210
|
(!t || !t.tagName) && (t = {
|
|
211
|
-
namespaceURI:
|
|
211
|
+
namespaceURI: W,
|
|
212
212
|
tagName: "template"
|
|
213
213
|
});
|
|
214
|
-
var
|
|
215
|
-
return
|
|
216
|
-
},
|
|
217
|
-
|
|
214
|
+
var a = le(e.tagName), u = le(t.tagName);
|
|
215
|
+
return be[e.namespaceURI] ? e.namespaceURI === te ? t.namespaceURI === w ? a === "svg" : t.namespaceURI === ee ? a === "svg" && (u === "annotation-xml" || Je[u]) : !!re[a] : e.namespaceURI === ee ? t.namespaceURI === w ? a === "math" : t.namespaceURI === te ? a === "math" && Qe[u] : !!Re[a] : e.namespaceURI === w ? t.namespaceURI === te && !Qe[u] || t.namespaceURI === ee && !Je[u] ? !1 : !Re[a] && (kt[a] || !re[a]) : !!(P === "application/xhtml+xml" && be[e.namespaceURI]) : !1;
|
|
216
|
+
}, D = function(e) {
|
|
217
|
+
X(n.removed, {
|
|
218
218
|
element: e
|
|
219
219
|
});
|
|
220
220
|
try {
|
|
221
221
|
e.parentNode.removeChild(e);
|
|
222
222
|
} catch {
|
|
223
223
|
try {
|
|
224
|
-
e.outerHTML =
|
|
224
|
+
e.outerHTML = ce;
|
|
225
225
|
} catch {
|
|
226
226
|
e.remove();
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
},
|
|
229
|
+
}, Le = function(e, t) {
|
|
230
230
|
try {
|
|
231
|
-
|
|
231
|
+
X(n.removed, {
|
|
232
232
|
attribute: t.getAttributeNode(e),
|
|
233
233
|
from: t
|
|
234
234
|
});
|
|
235
235
|
} catch {
|
|
236
|
-
|
|
236
|
+
X(n.removed, {
|
|
237
237
|
attribute: null,
|
|
238
238
|
from: t
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
|
-
if (t.removeAttribute(e), e === "is" && !
|
|
242
|
-
if (
|
|
241
|
+
if (t.removeAttribute(e), e === "is" && !p[e])
|
|
242
|
+
if (H || J)
|
|
243
243
|
try {
|
|
244
|
-
|
|
244
|
+
D(t);
|
|
245
245
|
} catch {
|
|
246
246
|
}
|
|
247
247
|
else
|
|
@@ -249,32 +249,32 @@ function _t() {
|
|
|
249
249
|
t.setAttribute(e, "");
|
|
250
250
|
} catch {
|
|
251
251
|
}
|
|
252
|
-
},
|
|
253
|
-
var t,
|
|
254
|
-
if (
|
|
252
|
+
}, et = function(e) {
|
|
253
|
+
var t, a;
|
|
254
|
+
if (Ae)
|
|
255
255
|
e = "<remove></remove>" + e;
|
|
256
256
|
else {
|
|
257
|
-
var u =
|
|
258
|
-
|
|
257
|
+
var u = ut(e, /^[\r\n\t ]+/);
|
|
258
|
+
a = u && u[0];
|
|
259
259
|
}
|
|
260
|
-
P === "application/xhtml+xml" &&
|
|
261
|
-
var A =
|
|
262
|
-
if (
|
|
260
|
+
P === "application/xhtml+xml" && W === w && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
261
|
+
var A = O ? O.createHTML(e) : e;
|
|
262
|
+
if (W === w)
|
|
263
263
|
try {
|
|
264
|
-
t = new
|
|
264
|
+
t = new ht().parseFromString(A, P);
|
|
265
265
|
} catch {
|
|
266
266
|
}
|
|
267
267
|
if (!t || !t.documentElement) {
|
|
268
|
-
t =
|
|
268
|
+
t = me.createDocument(W, "template", null);
|
|
269
269
|
try {
|
|
270
|
-
t.documentElement.innerHTML =
|
|
270
|
+
t.documentElement.innerHTML = Se ? ce : A;
|
|
271
271
|
} catch {
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
|
-
var
|
|
275
|
-
return e &&
|
|
276
|
-
},
|
|
277
|
-
return
|
|
274
|
+
var _ = t.body || t.documentElement;
|
|
275
|
+
return e && a && _.insertBefore(s.createTextNode(a), _.childNodes[0] || null), W === w ? bt.call(t, k ? "html" : "body")[0] : k ? t.documentElement : _;
|
|
276
|
+
}, tt = function(e) {
|
|
277
|
+
return gt.call(
|
|
278
278
|
e.ownerDocument || e,
|
|
279
279
|
e,
|
|
280
280
|
// eslint-disable-next-line no-bitwise
|
|
@@ -282,59 +282,57 @@ function _t() {
|
|
|
282
282
|
null,
|
|
283
283
|
!1
|
|
284
284
|
);
|
|
285
|
-
},
|
|
286
|
-
return e instanceof
|
|
285
|
+
}, Ft = function(e) {
|
|
286
|
+
return e instanceof _t && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof vt) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
287
287
|
}, V = function(e) {
|
|
288
288
|
return I(y) === "object" ? e instanceof y : e && I(e) === "object" && typeof e.nodeType == "number" && typeof e.nodeName == "string";
|
|
289
|
-
}, C = function(e, t,
|
|
290
|
-
|
|
291
|
-
u.call(n, t,
|
|
289
|
+
}, C = function(e, t, a) {
|
|
290
|
+
M[e] && qt(M[e], function(u) {
|
|
291
|
+
u.call(n, t, a, B);
|
|
292
292
|
});
|
|
293
|
-
},
|
|
293
|
+
}, rt = function(e) {
|
|
294
294
|
var t;
|
|
295
|
-
if (C("beforeSanitizeElements", e, null),
|
|
296
|
-
return
|
|
297
|
-
var
|
|
295
|
+
if (C("beforeSanitizeElements", e, null), Ft(e) || h(/[\u0080-\uFFFF]/, e.nodeName))
|
|
296
|
+
return D(e), !0;
|
|
297
|
+
var a = d(e.nodeName);
|
|
298
298
|
if (C("uponSanitizeElement", e, {
|
|
299
|
-
tagName:
|
|
300
|
-
allowedTags:
|
|
301
|
-
}), e.hasChildNodes() && !V(e.firstElementChild) && (!V(e.content) || !V(e.content.firstElementChild)) &&
|
|
302
|
-
return
|
|
303
|
-
if (!
|
|
304
|
-
if (!
|
|
299
|
+
tagName: a,
|
|
300
|
+
allowedTags: m
|
|
301
|
+
}), e.hasChildNodes() && !V(e.firstElementChild) && (!V(e.content) || !V(e.content.firstElementChild)) && h(/<[/\w]/g, e.innerHTML) && h(/<[/\w]/g, e.textContent) || a === "select" && h(/<template/i, e.innerHTML) || e.nodeType === 7)
|
|
302
|
+
return D(e), !0;
|
|
303
|
+
if (!m[a] || j[a]) {
|
|
304
|
+
if (!j[a] && nt(a) && (f.tagNameCheck instanceof RegExp && h(f.tagNameCheck, a) || f.tagNameCheck instanceof Function && f.tagNameCheck(a)))
|
|
305
305
|
return !1;
|
|
306
|
-
if (
|
|
307
|
-
var u =
|
|
306
|
+
if (ye && !G[a]) {
|
|
307
|
+
var u = ue(e) || e.parentNode, A = yt(e) || e.childNodes;
|
|
308
308
|
if (A && u)
|
|
309
|
-
for (var
|
|
310
|
-
|
|
311
|
-
F.__removalCount = (e.__removalCount || 0) + 1, u.insertBefore(F, gt(e));
|
|
312
|
-
}
|
|
309
|
+
for (var _ = A.length, v = _ - 1; v >= 0; --v)
|
|
310
|
+
u.insertBefore(Et(A[v], !0), At(e));
|
|
313
311
|
}
|
|
314
|
-
return
|
|
312
|
+
return D(e), !0;
|
|
315
313
|
}
|
|
316
|
-
return e instanceof N && !
|
|
314
|
+
return e instanceof N && !Pt(e) || (a === "noscript" || a === "noembed" || a === "noframes") && h(/<\/no(script|embed|frames)/i, e.innerHTML) ? (D(e), !0) : (U && e.nodeType === 3 && (t = e.textContent, t = R(t, pe, " "), t = R(t, de, " "), t = R(t, Te, " "), e.textContent !== t && (X(n.removed, {
|
|
317
315
|
element: e.cloneNode()
|
|
318
316
|
}), e.textContent = t)), C("afterSanitizeElements", e, null), !1);
|
|
319
|
-
},
|
|
320
|
-
if (
|
|
317
|
+
}, at = function(e, t, a) {
|
|
318
|
+
if (je && (t === "id" || t === "name") && (a in s || a in xt))
|
|
321
319
|
return !1;
|
|
322
|
-
if (!(
|
|
323
|
-
if (!(
|
|
324
|
-
if (!
|
|
320
|
+
if (!(he && !_e[t] && h(Rt, t))) {
|
|
321
|
+
if (!(We && h(Lt, t))) {
|
|
322
|
+
if (!p[t] || _e[t]) {
|
|
325
323
|
if (
|
|
326
324
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
327
325
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
328
326
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
329
|
-
!(
|
|
327
|
+
!(nt(e) && (f.tagNameCheck instanceof RegExp && h(f.tagNameCheck, e) || f.tagNameCheck instanceof Function && f.tagNameCheck(e)) && (f.attributeNameCheck instanceof RegExp && h(f.attributeNameCheck, t) || f.attributeNameCheck instanceof Function && f.attributeNameCheck(t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
330
328
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
331
|
-
t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp &&
|
|
329
|
+
t === "is" && f.allowCustomizedBuiltInElements && (f.tagNameCheck instanceof RegExp && h(f.tagNameCheck, a) || f.tagNameCheck instanceof Function && f.tagNameCheck(a)))
|
|
332
330
|
) return !1;
|
|
333
|
-
} else if (!
|
|
334
|
-
if (!
|
|
335
|
-
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" &&
|
|
336
|
-
if (!(
|
|
337
|
-
if (
|
|
331
|
+
} else if (!ge[t]) {
|
|
332
|
+
if (!h(ve, R(a, He, ""))) {
|
|
333
|
+
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Kt(a, "data:") === 0 && Xe[e])) {
|
|
334
|
+
if (!(Be && !h(Nt, R(a, He, "")))) {
|
|
335
|
+
if (a)
|
|
338
336
|
return !1;
|
|
339
337
|
}
|
|
340
338
|
}
|
|
@@ -343,47 +341,43 @@ function _t() {
|
|
|
343
341
|
}
|
|
344
342
|
}
|
|
345
343
|
return !0;
|
|
346
|
-
},
|
|
347
|
-
return e !== "annotation-xml" &&
|
|
348
|
-
},
|
|
349
|
-
var t,
|
|
344
|
+
}, nt = function(e) {
|
|
345
|
+
return e !== "annotation-xml" && ut(e, Mt);
|
|
346
|
+
}, it = function(e) {
|
|
347
|
+
var t, a, u, A;
|
|
350
348
|
C("beforeSanitizeAttributes", e, null);
|
|
351
|
-
var
|
|
352
|
-
if (
|
|
349
|
+
var _ = e.attributes;
|
|
350
|
+
if (_) {
|
|
353
351
|
var v = {
|
|
354
352
|
attrName: "",
|
|
355
353
|
attrValue: "",
|
|
356
354
|
keepAttr: !0,
|
|
357
|
-
allowedAttributes:
|
|
355
|
+
allowedAttributes: p
|
|
358
356
|
};
|
|
359
|
-
for (A =
|
|
360
|
-
t =
|
|
361
|
-
var
|
|
362
|
-
if (
|
|
363
|
-
if (
|
|
364
|
-
|
|
357
|
+
for (A = _.length; A--; ) {
|
|
358
|
+
t = _[A];
|
|
359
|
+
var ae = t, T = ae.name, Ne = ae.namespaceURI;
|
|
360
|
+
if (a = T === "value" ? t.value : Zt(t.value), u = d(T), v.attrName = u, v.attrValue = a, v.keepAttr = !0, v.forceKeepAttr = void 0, C("uponSanitizeAttribute", e, v), a = v.attrValue, !v.forceKeepAttr && (Le(T, e), !!v.keepAttr)) {
|
|
361
|
+
if (!$e && h(/\/>/i, a)) {
|
|
362
|
+
Le(T, e);
|
|
365
363
|
continue;
|
|
366
364
|
}
|
|
367
|
-
|
|
368
|
-
var
|
|
369
|
-
if (
|
|
370
|
-
if (
|
|
371
|
-
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
if (R && I(K) === "object" && typeof K.getAttributeType == "function" && !De)
|
|
375
|
-
switch (K.getAttributeType(st, u)) {
|
|
365
|
+
U && (a = R(a, pe, " "), a = R(a, de, " "), a = R(a, Te, " "));
|
|
366
|
+
var ot = d(e.nodeName);
|
|
367
|
+
if (at(ot, u, a)) {
|
|
368
|
+
if (Ye && (u === "id" || u === "name") && (Le(T, e), a = Dt + a), O && I(q) === "object" && typeof q.getAttributeType == "function" && !Ne)
|
|
369
|
+
switch (q.getAttributeType(ot, u)) {
|
|
376
370
|
case "TrustedHTML": {
|
|
377
|
-
|
|
371
|
+
a = O.createHTML(a);
|
|
378
372
|
break;
|
|
379
373
|
}
|
|
380
374
|
case "TrustedScriptURL": {
|
|
381
|
-
|
|
375
|
+
a = O.createScriptURL(a);
|
|
382
376
|
break;
|
|
383
377
|
}
|
|
384
378
|
}
|
|
385
379
|
try {
|
|
386
|
-
|
|
380
|
+
Ne ? e.setAttributeNS(Ne, T, a) : e.setAttribute(T, a), st(n.removed);
|
|
387
381
|
} catch {
|
|
388
382
|
}
|
|
389
383
|
}
|
|
@@ -391,81 +385,81 @@ function _t() {
|
|
|
391
385
|
}
|
|
392
386
|
C("afterSanitizeAttributes", e, null);
|
|
393
387
|
}
|
|
394
|
-
},
|
|
395
|
-
var t,
|
|
396
|
-
for (C("beforeSanitizeShadowDOM", e, null); t =
|
|
397
|
-
C("uponSanitizeShadowNode", t, null),
|
|
388
|
+
}, Ut = function i(e) {
|
|
389
|
+
var t, a = tt(e);
|
|
390
|
+
for (C("beforeSanitizeShadowDOM", e, null); t = a.nextNode(); )
|
|
391
|
+
C("uponSanitizeShadowNode", t, null), !rt(t) && (t.content instanceof c && i(t.content), it(t));
|
|
398
392
|
C("afterSanitizeShadowDOM", e, null);
|
|
399
393
|
};
|
|
400
394
|
return n.sanitize = function(i) {
|
|
401
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t,
|
|
402
|
-
if (
|
|
395
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t, a, u, A, _;
|
|
396
|
+
if (Se = !i, Se && (i = "<!-->"), typeof i != "string" && !V(i))
|
|
403
397
|
if (typeof i.toString == "function") {
|
|
404
398
|
if (i = i.toString(), typeof i != "string")
|
|
405
|
-
throw
|
|
399
|
+
throw De("dirty is not a string, aborting");
|
|
406
400
|
} else
|
|
407
|
-
throw
|
|
401
|
+
throw De("toString is not a function");
|
|
408
402
|
if (!n.isSupported) {
|
|
409
|
-
if (I(
|
|
403
|
+
if (I(r.toStaticHTML) === "object" || typeof r.toStaticHTML == "function") {
|
|
410
404
|
if (typeof i == "string")
|
|
411
|
-
return
|
|
405
|
+
return r.toStaticHTML(i);
|
|
412
406
|
if (V(i))
|
|
413
|
-
return
|
|
407
|
+
return r.toStaticHTML(i.outerHTML);
|
|
414
408
|
}
|
|
415
409
|
return i;
|
|
416
410
|
}
|
|
417
|
-
if (
|
|
411
|
+
if (Ee || Oe(e), n.removed = [], typeof i == "string" && (Y = !1), Y) {
|
|
418
412
|
if (i.nodeName) {
|
|
419
|
-
var v =
|
|
420
|
-
if (!
|
|
421
|
-
throw
|
|
413
|
+
var v = d(i.nodeName);
|
|
414
|
+
if (!m[v] || j[v])
|
|
415
|
+
throw De("root node is forbidden and cannot be sanitized in-place");
|
|
422
416
|
}
|
|
423
417
|
} else if (i instanceof y)
|
|
424
|
-
t =
|
|
418
|
+
t = et("<!---->"), a = t.ownerDocument.importNode(i, !0), a.nodeType === 1 && a.nodeName === "BODY" || a.nodeName === "HTML" ? t = a : t.appendChild(a);
|
|
425
419
|
else {
|
|
426
|
-
if (!
|
|
420
|
+
if (!H && !U && !k && // eslint-disable-next-line unicorn/prefer-includes
|
|
427
421
|
i.indexOf("<") === -1)
|
|
428
|
-
return
|
|
429
|
-
if (t =
|
|
430
|
-
return
|
|
422
|
+
return O && Q ? O.createHTML(i) : i;
|
|
423
|
+
if (t = et(i), !t)
|
|
424
|
+
return H ? null : Q ? ce : "";
|
|
431
425
|
}
|
|
432
|
-
t &&
|
|
433
|
-
for (var
|
|
434
|
-
u.nodeType === 3 && u === A || (
|
|
435
|
-
if (A = null,
|
|
426
|
+
t && Ae && D(t.firstChild);
|
|
427
|
+
for (var ae = tt(Y ? i : t); u = ae.nextNode(); )
|
|
428
|
+
u.nodeType === 3 && u === A || rt(u) || (u.content instanceof c && Ut(u.content), it(u), A = u);
|
|
429
|
+
if (A = null, Y)
|
|
436
430
|
return i;
|
|
437
|
-
if (
|
|
438
|
-
if (
|
|
439
|
-
for (
|
|
440
|
-
|
|
431
|
+
if (H) {
|
|
432
|
+
if (J)
|
|
433
|
+
for (_ = St.call(t.ownerDocument); t.firstChild; )
|
|
434
|
+
_.appendChild(t.firstChild);
|
|
441
435
|
else
|
|
442
|
-
|
|
443
|
-
return (
|
|
436
|
+
_ = t;
|
|
437
|
+
return (p.shadowroot || p.shadowrootmod) && (_ = Ot.call(o, _, !0)), _;
|
|
444
438
|
}
|
|
445
|
-
var
|
|
446
|
-
return k &&
|
|
447
|
-
` +
|
|
439
|
+
var T = k ? t.outerHTML : t.innerHTML;
|
|
440
|
+
return k && m["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && h(ur, t.ownerDocument.doctype.name) && (T = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
441
|
+
` + T), U && (T = R(T, pe, " "), T = R(T, de, " "), T = R(T, Te, " ")), O && Q ? O.createHTML(T) : T;
|
|
448
442
|
}, n.setConfig = function(i) {
|
|
449
|
-
|
|
443
|
+
Oe(i), Ee = !0;
|
|
450
444
|
}, n.clearConfig = function() {
|
|
451
|
-
|
|
445
|
+
B = null, Ee = !1;
|
|
452
446
|
}, n.isValidAttribute = function(i, e, t) {
|
|
453
|
-
|
|
454
|
-
var
|
|
455
|
-
return
|
|
447
|
+
B || Oe({});
|
|
448
|
+
var a = d(i), u = d(e);
|
|
449
|
+
return at(a, u, t);
|
|
456
450
|
}, n.addHook = function(i, e) {
|
|
457
|
-
typeof e == "function" && (
|
|
451
|
+
typeof e == "function" && (M[i] = M[i] || [], X(M[i], e));
|
|
458
452
|
}, n.removeHook = function(i) {
|
|
459
|
-
if (
|
|
460
|
-
return
|
|
453
|
+
if (M[i])
|
|
454
|
+
return st(M[i]);
|
|
461
455
|
}, n.removeHooks = function(i) {
|
|
462
|
-
|
|
456
|
+
M[i] && (M[i] = []);
|
|
463
457
|
}, n.removeAllHooks = function() {
|
|
464
|
-
|
|
458
|
+
M = {};
|
|
465
459
|
}, n;
|
|
466
460
|
}
|
|
467
|
-
var
|
|
461
|
+
var dr = Tt();
|
|
468
462
|
export {
|
|
469
|
-
|
|
463
|
+
dr as default
|
|
470
464
|
};
|
|
471
465
|
//# sourceMappingURL=purify.es.js.map
|