@commercetools/nimbus 0.0.0-canary-20251229194207 → 0.0.0-canary-20260105083104
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.
|
@@ -8,42 +8,42 @@ const {
|
|
|
8
8
|
} = Object;
|
|
9
9
|
let {
|
|
10
10
|
freeze: R,
|
|
11
|
-
seal:
|
|
12
|
-
create:
|
|
11
|
+
seal: b,
|
|
12
|
+
create: ve
|
|
13
13
|
} = Object, {
|
|
14
|
-
apply:
|
|
15
|
-
construct:
|
|
14
|
+
apply: ke,
|
|
15
|
+
construct: Ue
|
|
16
16
|
} = typeof Reflect < "u" && Reflect;
|
|
17
17
|
R || (R = function(o) {
|
|
18
18
|
return o;
|
|
19
19
|
});
|
|
20
|
-
|
|
20
|
+
b || (b = function(o) {
|
|
21
21
|
return o;
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
ke || (ke = function(o, l) {
|
|
24
24
|
for (var a = arguments.length, c = new Array(a > 2 ? a - 2 : 0), _ = 2; _ < a; _++)
|
|
25
25
|
c[_ - 2] = arguments[_];
|
|
26
26
|
return o.apply(l, c);
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
Ue || (Ue = function(o) {
|
|
29
29
|
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
30
30
|
a[c - 1] = arguments[c];
|
|
31
31
|
return new o(...a);
|
|
32
32
|
});
|
|
33
|
-
const ce = /* @__PURE__ */ O(Array.prototype.forEach), $t = /* @__PURE__ */ O(Array.prototype.lastIndexOf), ft = /* @__PURE__ */ O(Array.prototype.pop), q = /* @__PURE__ */ O(Array.prototype.push), qt = /* @__PURE__ */ O(Array.prototype.splice), ue = /* @__PURE__ */ O(String.prototype.toLowerCase), Ie = /* @__PURE__ */ O(String.prototype.toString),
|
|
33
|
+
const ce = /* @__PURE__ */ O(Array.prototype.forEach), $t = /* @__PURE__ */ O(Array.prototype.lastIndexOf), ft = /* @__PURE__ */ O(Array.prototype.pop), q = /* @__PURE__ */ O(Array.prototype.push), qt = /* @__PURE__ */ O(Array.prototype.splice), ue = /* @__PURE__ */ O(String.prototype.toLowerCase), Ie = /* @__PURE__ */ O(String.prototype.toString), Ce = /* @__PURE__ */ O(String.prototype.match), K = /* @__PURE__ */ O(String.prototype.replace), Kt = /* @__PURE__ */ O(String.prototype.indexOf), Zt = /* @__PURE__ */ O(String.prototype.trim), y = /* @__PURE__ */ O(Object.prototype.hasOwnProperty), S = /* @__PURE__ */ O(RegExp.prototype.test), Z = /* @__PURE__ */ Jt(TypeError);
|
|
34
34
|
function O(r) {
|
|
35
35
|
return function(o) {
|
|
36
36
|
o instanceof RegExp && (o.lastIndex = 0);
|
|
37
37
|
for (var l = arguments.length, a = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++)
|
|
38
38
|
a[c - 1] = arguments[c];
|
|
39
|
-
return
|
|
39
|
+
return ke(r, o, a);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function Jt(r) {
|
|
43
43
|
return function() {
|
|
44
44
|
for (var o = arguments.length, l = new Array(o), a = 0; a < o; a++)
|
|
45
45
|
l[a] = arguments[a];
|
|
46
|
-
return
|
|
46
|
+
return Ue(r, l);
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function s(r, o) {
|
|
@@ -62,13 +62,13 @@ function s(r, o) {
|
|
|
62
62
|
}
|
|
63
63
|
function Qt(r) {
|
|
64
64
|
for (let o = 0; o < r.length; o++)
|
|
65
|
-
|
|
65
|
+
y(r, o) || (r[o] = null);
|
|
66
66
|
return r;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
const o =
|
|
68
|
+
function I(r) {
|
|
69
|
+
const o = ve(null);
|
|
70
70
|
for (const [l, a] of _t(r))
|
|
71
|
-
|
|
71
|
+
y(r, l) && (Array.isArray(a) ? o[l] = Qt(a) : a && typeof a == "object" && a.constructor === Object ? o[l] = I(a) : o[l] = a);
|
|
72
72
|
return o;
|
|
73
73
|
}
|
|
74
74
|
function J(r, o) {
|
|
@@ -87,13 +87,13 @@ function J(r, o) {
|
|
|
87
87
|
}
|
|
88
88
|
return l;
|
|
89
89
|
}
|
|
90
|
-
const ut = /* @__PURE__ */ R(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]),
|
|
90
|
+
const ut = /* @__PURE__ */ R(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Me = /* @__PURE__ */ R(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), we = /* @__PURE__ */ R(["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"]), en = /* @__PURE__ */ R(["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"]), xe = /* @__PURE__ */ R(["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"]), tn = /* @__PURE__ */ R(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), mt = /* @__PURE__ */ R(["#text"]), pt = /* @__PURE__ */ R(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Pe = /* @__PURE__ */ R(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), dt = /* @__PURE__ */ R(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), fe = /* @__PURE__ */ R(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), nn = /* @__PURE__ */ b(/\{\{[\w\W]*|[\w\W]*\}\}/gm), on = /* @__PURE__ */ b(/<%[\w\W]*|[\w\W]*%>/gm), an = /* @__PURE__ */ b(/\$\{[\w\W]*/gm), rn = /* @__PURE__ */ b(/^data-[\-\w.\u00B7-\uFFFF]+$/), sn = /* @__PURE__ */ b(/^aria-[\-\w]+$/), At = /* @__PURE__ */ b(
|
|
91
91
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
92
92
|
// eslint-disable-line no-useless-escape
|
|
93
|
-
), ln = /* @__PURE__ */
|
|
93
|
+
), ln = /* @__PURE__ */ b(/^(?:\w+script|data):/i), cn = /* @__PURE__ */ b(
|
|
94
94
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
95
95
|
// eslint-disable-line no-control-regex
|
|
96
|
-
), gt = /* @__PURE__ */
|
|
96
|
+
), gt = /* @__PURE__ */ b(/^html$/i), fn = /* @__PURE__ */ b(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
97
97
|
var Tt = /* @__PURE__ */ Object.freeze({
|
|
98
98
|
__proto__: null,
|
|
99
99
|
ARIA_ATTR: sn,
|
|
@@ -125,11 +125,11 @@ const Q = {
|
|
|
125
125
|
const _ = "dompurify" + (a ? "#" + a : "");
|
|
126
126
|
try {
|
|
127
127
|
return o.createPolicy(_, {
|
|
128
|
-
createHTML(
|
|
129
|
-
return
|
|
128
|
+
createHTML(x) {
|
|
129
|
+
return x;
|
|
130
130
|
},
|
|
131
|
-
createScriptURL(
|
|
132
|
-
return
|
|
131
|
+
createScriptURL(x) {
|
|
132
|
+
return x;
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
135
|
} catch {
|
|
@@ -151,31 +151,31 @@ const Q = {
|
|
|
151
151
|
function ht() {
|
|
152
152
|
let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : un();
|
|
153
153
|
const o = (i) => ht(i);
|
|
154
|
-
if (o.version = "3.3.
|
|
154
|
+
if (o.version = "3.3.1", o.removed = [], !r || !r.document || r.document.nodeType !== Q.document || !r.Element)
|
|
155
155
|
return o.isSupported = !1, o;
|
|
156
156
|
let {
|
|
157
157
|
document: l
|
|
158
158
|
} = r;
|
|
159
159
|
const a = l, c = a.currentScript, {
|
|
160
160
|
DocumentFragment: _,
|
|
161
|
-
HTMLTemplateElement:
|
|
161
|
+
HTMLTemplateElement: x,
|
|
162
162
|
Node: me,
|
|
163
|
-
Element:
|
|
163
|
+
Element: Fe,
|
|
164
164
|
NodeFilter: B,
|
|
165
165
|
NamedNodeMap: St = r.NamedNodeMap || r.MozNamedAttrMap,
|
|
166
166
|
HTMLFormElement: Rt,
|
|
167
167
|
DOMParser: Ot,
|
|
168
168
|
trustedTypes: ee
|
|
169
|
-
} = r, Y =
|
|
170
|
-
if (typeof
|
|
169
|
+
} = r, Y = Fe.prototype, Dt = J(Y, "cloneNode"), bt = J(Y, "remove"), yt = J(Y, "nextSibling"), Lt = J(Y, "childNodes"), te = J(Y, "parentNode");
|
|
170
|
+
if (typeof x == "function") {
|
|
171
171
|
const i = l.createElement("template");
|
|
172
172
|
i.content && i.content.ownerDocument && (l = i.content.ownerDocument);
|
|
173
173
|
}
|
|
174
174
|
let g, X = "";
|
|
175
175
|
const {
|
|
176
176
|
implementation: pe,
|
|
177
|
-
createNodeIterator:
|
|
178
|
-
createDocumentFragment:
|
|
177
|
+
createNodeIterator: Nt,
|
|
178
|
+
createDocumentFragment: It,
|
|
179
179
|
getElementsByTagName: Ct
|
|
180
180
|
} = l, {
|
|
181
181
|
importNode: Mt
|
|
@@ -189,16 +189,16 @@ function ht() {
|
|
|
189
189
|
DATA_ATTR: wt,
|
|
190
190
|
ARIA_ATTR: xt,
|
|
191
191
|
IS_SCRIPT_OR_DATA: Pt,
|
|
192
|
-
ATTR_WHITESPACE:
|
|
192
|
+
ATTR_WHITESPACE: He,
|
|
193
193
|
CUSTOM_ELEMENT: vt
|
|
194
194
|
} = Tt;
|
|
195
195
|
let {
|
|
196
|
-
IS_ALLOWED_URI:
|
|
197
|
-
} = Tt,
|
|
198
|
-
const
|
|
196
|
+
IS_ALLOWED_URI: ze
|
|
197
|
+
} = Tt, d = null;
|
|
198
|
+
const Ge = s({}, [...ut, ...Me, ...we, ...xe, ...mt]);
|
|
199
199
|
let T = null;
|
|
200
|
-
const
|
|
201
|
-
let u = Object.seal(
|
|
200
|
+
const We = s({}, [...pt, ...Pe, ...dt, ...fe]);
|
|
201
|
+
let u = Object.seal(ve(null, {
|
|
202
202
|
tagNameCheck: {
|
|
203
203
|
writable: !0,
|
|
204
204
|
configurable: !1,
|
|
@@ -218,7 +218,7 @@ function ht() {
|
|
|
218
218
|
value: !1
|
|
219
219
|
}
|
|
220
220
|
})), j = null, _e = null;
|
|
221
|
-
const
|
|
221
|
+
const k = Object.seal(ve(null, {
|
|
222
222
|
tagCheck: {
|
|
223
223
|
writable: !0,
|
|
224
224
|
configurable: !1,
|
|
@@ -232,28 +232,28 @@ function ht() {
|
|
|
232
232
|
value: null
|
|
233
233
|
}
|
|
234
234
|
}));
|
|
235
|
-
let
|
|
235
|
+
let Be = !0, Ae = !0, Ye = !1, Xe = !0, U = !1, ne = !0, P = !1, ge = !1, he = !1, F = !1, oe = !1, ie = !1, je = !0, Ve = !1;
|
|
236
236
|
const kt = "user-content-";
|
|
237
|
-
let Se = !0, V = !1,
|
|
238
|
-
const
|
|
237
|
+
let Se = !0, V = !1, H = {}, L = null;
|
|
238
|
+
const Re = s({}, ["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"]);
|
|
239
239
|
let $e = null;
|
|
240
240
|
const qe = s({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
241
|
-
let
|
|
242
|
-
const Ke = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ae = "http://www.w3.org/1998/Math/MathML", re = "http://www.w3.org/2000/svg",
|
|
243
|
-
let z =
|
|
244
|
-
const Ut = s({}, [ae, re,
|
|
241
|
+
let Oe = null;
|
|
242
|
+
const Ke = s({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ae = "http://www.w3.org/1998/Math/MathML", re = "http://www.w3.org/2000/svg", C = "http://www.w3.org/1999/xhtml";
|
|
243
|
+
let z = C, De = !1, be = null;
|
|
244
|
+
const Ut = s({}, [ae, re, C], Ie);
|
|
245
245
|
let se = s({}, ["mi", "mo", "mn", "ms", "mtext"]), le = s({}, ["annotation-xml"]);
|
|
246
246
|
const Ft = s({}, ["title", "style", "font", "a", "script"]);
|
|
247
247
|
let $ = null;
|
|
248
248
|
const Ht = ["application/xhtml+xml", "text/html"], zt = "text/html";
|
|
249
|
-
let
|
|
249
|
+
let p = null, G = null;
|
|
250
250
|
const Gt = l.createElement("form"), Ze = function(e) {
|
|
251
251
|
return e instanceof RegExp || e instanceof Function;
|
|
252
252
|
}, ye = function() {
|
|
253
253
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
254
254
|
if (!(G && G === e)) {
|
|
255
|
-
if ((!e || typeof e != "object") && (e = {}), e =
|
|
256
|
-
Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE,
|
|
255
|
+
if ((!e || typeof e != "object") && (e = {}), e = I(e), $ = // eslint-disable-next-line unicorn/prefer-includes
|
|
256
|
+
Ht.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? zt : e.PARSER_MEDIA_TYPE, p = $ === "application/xhtml+xml" ? Ie : ue, d = y(e, "ALLOWED_TAGS") ? s({}, e.ALLOWED_TAGS, p) : Ge, T = y(e, "ALLOWED_ATTR") ? s({}, e.ALLOWED_ATTR, p) : We, be = y(e, "ALLOWED_NAMESPACES") ? s({}, e.ALLOWED_NAMESPACES, Ie) : Ut, Oe = y(e, "ADD_URI_SAFE_ATTR") ? s(I(Ke), e.ADD_URI_SAFE_ATTR, p) : Ke, $e = y(e, "ADD_DATA_URI_TAGS") ? s(I(qe), e.ADD_DATA_URI_TAGS, p) : qe, L = y(e, "FORBID_CONTENTS") ? s({}, e.FORBID_CONTENTS, p) : Re, j = y(e, "FORBID_TAGS") ? s({}, e.FORBID_TAGS, p) : I({}), _e = y(e, "FORBID_ATTR") ? s({}, e.FORBID_ATTR, p) : I({}), H = y(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Be = e.ALLOW_ARIA_ATTR !== !1, Ae = e.ALLOW_DATA_ATTR !== !1, Ye = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Xe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, U = e.SAFE_FOR_TEMPLATES || !1, ne = e.SAFE_FOR_XML !== !1, P = e.WHOLE_DOCUMENT || !1, F = e.RETURN_DOM || !1, oe = e.RETURN_DOM_FRAGMENT || !1, ie = e.RETURN_TRUSTED_TYPE || !1, he = e.FORCE_BODY || !1, je = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Se = e.KEEP_CONTENT !== !1, V = e.IN_PLACE || !1, ze = e.ALLOWED_URI_REGEXP || At, z = e.NAMESPACE || C, se = e.MATHML_TEXT_INTEGRATION_POINTS || se, le = e.HTML_INTEGRATION_POINTS || le, u = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (u.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Ze(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (u.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (u.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), U && (Ae = !1), oe && (F = !0), H && (d = s({}, mt), T = [], H.html === !0 && (s(d, ut), s(T, pt)), H.svg === !0 && (s(d, Me), s(T, Pe), s(T, fe)), H.svgFilters === !0 && (s(d, we), s(T, Pe), s(T, fe)), H.mathMl === !0 && (s(d, xe), s(T, dt), s(T, fe))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? k.tagCheck = e.ADD_TAGS : (d === Ge && (d = I(d)), s(d, e.ADD_TAGS, p))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? k.attributeCheck = e.ADD_ATTR : (T === We && (T = I(T)), s(T, e.ADD_ATTR, p))), e.ADD_URI_SAFE_ATTR && s(Oe, e.ADD_URI_SAFE_ATTR, p), e.FORBID_CONTENTS && (L === Re && (L = I(L)), s(L, e.FORBID_CONTENTS, p)), e.ADD_FORBID_CONTENTS && (L === Re && (L = I(L)), s(L, e.ADD_FORBID_CONTENTS, p)), Se && (d["#text"] = !0), P && s(d, ["html", "head", "body"]), d.table && (s(d, ["tbody"]), delete j.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
257
257
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
258
258
|
throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
259
259
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -263,24 +263,24 @@ function ht() {
|
|
|
263
263
|
g === void 0 && (g = mn(ee, c)), g !== null && typeof X == "string" && (X = g.createHTML(""));
|
|
264
264
|
R && R(e), G = e;
|
|
265
265
|
}
|
|
266
|
-
}, Je = s({}, [...
|
|
266
|
+
}, Je = s({}, [...Me, ...we, ...en]), Qe = s({}, [...xe, ...tn]), Wt = function(e) {
|
|
267
267
|
let t = te(e);
|
|
268
268
|
(!t || !t.tagName) && (t = {
|
|
269
269
|
namespaceURI: z,
|
|
270
270
|
tagName: "template"
|
|
271
271
|
});
|
|
272
272
|
const n = ue(e.tagName), f = ue(t.tagName);
|
|
273
|
-
return be[e.namespaceURI] ? e.namespaceURI === re ? t.namespaceURI ===
|
|
274
|
-
},
|
|
273
|
+
return be[e.namespaceURI] ? e.namespaceURI === re ? t.namespaceURI === C ? n === "svg" : t.namespaceURI === ae ? n === "svg" && (f === "annotation-xml" || se[f]) : !!Je[n] : e.namespaceURI === ae ? t.namespaceURI === C ? n === "math" : t.namespaceURI === re ? n === "math" && le[f] : !!Qe[n] : e.namespaceURI === C ? t.namespaceURI === re && !le[f] || t.namespaceURI === ae && !se[f] ? !1 : !Qe[n] && (Ft[n] || !Je[n]) : !!($ === "application/xhtml+xml" && be[e.namespaceURI]) : !1;
|
|
274
|
+
}, N = function(e) {
|
|
275
275
|
q(o.removed, {
|
|
276
276
|
element: e
|
|
277
277
|
});
|
|
278
278
|
try {
|
|
279
279
|
te(e).removeChild(e);
|
|
280
280
|
} catch {
|
|
281
|
-
|
|
281
|
+
bt(e);
|
|
282
282
|
}
|
|
283
|
-
},
|
|
283
|
+
}, v = function(e, t) {
|
|
284
284
|
try {
|
|
285
285
|
q(o.removed, {
|
|
286
286
|
attribute: t.getAttributeNode(e),
|
|
@@ -293,9 +293,9 @@ function ht() {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
if (t.removeAttribute(e), e === "is")
|
|
296
|
-
if (
|
|
296
|
+
if (F || oe)
|
|
297
297
|
try {
|
|
298
|
-
|
|
298
|
+
N(t);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
301
|
else
|
|
@@ -308,12 +308,12 @@ function ht() {
|
|
|
308
308
|
if (he)
|
|
309
309
|
e = "<remove></remove>" + e;
|
|
310
310
|
else {
|
|
311
|
-
const m =
|
|
311
|
+
const m = Ce(e, /^[\r\n\t ]+/);
|
|
312
312
|
n = m && m[0];
|
|
313
313
|
}
|
|
314
|
-
$ === "application/xhtml+xml" && z ===
|
|
314
|
+
$ === "application/xhtml+xml" && z === C && (e = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + e + "</body></html>");
|
|
315
315
|
const f = g ? g.createHTML(e) : e;
|
|
316
|
-
if (z ===
|
|
316
|
+
if (z === C)
|
|
317
317
|
try {
|
|
318
318
|
t = new Ot().parseFromString(f, $);
|
|
319
319
|
} catch {
|
|
@@ -321,66 +321,66 @@ function ht() {
|
|
|
321
321
|
if (!t || !t.documentElement) {
|
|
322
322
|
t = pe.createDocument(z, "template", null);
|
|
323
323
|
try {
|
|
324
|
-
t.documentElement.innerHTML =
|
|
324
|
+
t.documentElement.innerHTML = De ? X : f;
|
|
325
325
|
} catch {
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
const A = t.body || t.documentElement;
|
|
329
|
-
return e && n && A.insertBefore(l.createTextNode(n), A.childNodes[0] || null), z ===
|
|
329
|
+
return e && n && A.insertBefore(l.createTextNode(n), A.childNodes[0] || null), z === C ? Ct.call(t, P ? "html" : "body")[0] : P ? t.documentElement : A;
|
|
330
330
|
}, tt = function(e) {
|
|
331
|
-
return
|
|
331
|
+
return Nt.call(
|
|
332
332
|
e.ownerDocument || e,
|
|
333
333
|
e,
|
|
334
334
|
// eslint-disable-next-line no-bitwise
|
|
335
335
|
B.SHOW_ELEMENT | B.SHOW_COMMENT | B.SHOW_TEXT | B.SHOW_PROCESSING_INSTRUCTION | B.SHOW_CDATA_SECTION,
|
|
336
336
|
null
|
|
337
337
|
);
|
|
338
|
-
},
|
|
338
|
+
}, Le = function(e) {
|
|
339
339
|
return e instanceof Rt && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof St) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
340
340
|
}, nt = function(e) {
|
|
341
341
|
return typeof me == "function" && e instanceof me;
|
|
342
342
|
};
|
|
343
|
-
function
|
|
343
|
+
function M(i, e, t) {
|
|
344
344
|
ce(i, (n) => {
|
|
345
345
|
n.call(o, e, t, G);
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
const ot = function(e) {
|
|
349
349
|
let t = null;
|
|
350
|
-
if (
|
|
351
|
-
return
|
|
352
|
-
const n =
|
|
353
|
-
if (
|
|
350
|
+
if (M(h.beforeSanitizeElements, e, null), Le(e))
|
|
351
|
+
return N(e), !0;
|
|
352
|
+
const n = p(e.nodeName);
|
|
353
|
+
if (M(h.uponSanitizeElement, e, {
|
|
354
354
|
tagName: n,
|
|
355
|
-
allowedTags:
|
|
355
|
+
allowedTags: d
|
|
356
356
|
}), ne && e.hasChildNodes() && !nt(e.firstElementChild) && S(/<[/\w!]/g, e.innerHTML) && S(/<[/\w!]/g, e.textContent) || e.nodeType === Q.progressingInstruction || ne && e.nodeType === Q.comment && S(/<[/\w]/g, e.data))
|
|
357
|
-
return
|
|
358
|
-
if (!(
|
|
357
|
+
return N(e), !0;
|
|
358
|
+
if (!(k.tagCheck instanceof Function && k.tagCheck(n)) && (!d[n] || j[n])) {
|
|
359
359
|
if (!j[n] && at(n) && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
360
360
|
return !1;
|
|
361
|
-
if (Se && !
|
|
361
|
+
if (Se && !L[n]) {
|
|
362
362
|
const f = te(e) || e.parentNode, A = Lt(e) || e.childNodes;
|
|
363
363
|
if (A && f) {
|
|
364
364
|
const m = A.length;
|
|
365
|
-
for (let
|
|
366
|
-
const
|
|
367
|
-
|
|
365
|
+
for (let D = m - 1; D >= 0; --D) {
|
|
366
|
+
const w = Dt(A[D], !0);
|
|
367
|
+
w.__removalCount = (e.__removalCount || 0) + 1, f.insertBefore(w, yt(e));
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
return
|
|
371
|
+
return N(e), !0;
|
|
372
372
|
}
|
|
373
|
-
return e instanceof
|
|
373
|
+
return e instanceof Fe && !Wt(e) || (n === "noscript" || n === "noembed" || n === "noframes") && S(/<\/no(script|embed|frames)/i, e.innerHTML) ? (N(e), !0) : (U && e.nodeType === Q.text && (t = e.textContent, ce([de, Te, Ee], (f) => {
|
|
374
374
|
t = K(t, f, " ");
|
|
375
375
|
}), e.textContent !== t && (q(o.removed, {
|
|
376
376
|
element: e.cloneNode()
|
|
377
|
-
}), e.textContent = t)),
|
|
377
|
+
}), e.textContent = t)), M(h.afterSanitizeElements, e, null), !1);
|
|
378
378
|
}, it = function(e, t, n) {
|
|
379
|
-
if (
|
|
379
|
+
if (je && (t === "id" || t === "name") && (n in l || n in Gt))
|
|
380
380
|
return !1;
|
|
381
381
|
if (!(Ae && !_e[t] && S(wt, t))) {
|
|
382
|
-
if (!(
|
|
383
|
-
if (!(
|
|
382
|
+
if (!(Be && S(xt, t))) {
|
|
383
|
+
if (!(k.attributeCheck instanceof Function && k.attributeCheck(t, e))) {
|
|
384
384
|
if (!T[t] || _e[t]) {
|
|
385
385
|
if (
|
|
386
386
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
@@ -390,10 +390,10 @@ function ht() {
|
|
|
390
390
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
391
391
|
t === "is" && u.allowCustomizedBuiltInElements && (u.tagNameCheck instanceof RegExp && S(u.tagNameCheck, n) || u.tagNameCheck instanceof Function && u.tagNameCheck(n)))
|
|
392
392
|
) return !1;
|
|
393
|
-
} else if (!
|
|
394
|
-
if (!S(
|
|
393
|
+
} else if (!Oe[t]) {
|
|
394
|
+
if (!S(ze, K(n, He, ""))) {
|
|
395
395
|
if (!((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Kt(n, "data:") === 0 && $e[e])) {
|
|
396
|
-
if (!(
|
|
396
|
+
if (!(Ye && !S(Pt, K(n, He, "")))) {
|
|
397
397
|
if (n)
|
|
398
398
|
return !1;
|
|
399
399
|
}
|
|
@@ -405,13 +405,13 @@ function ht() {
|
|
|
405
405
|
}
|
|
406
406
|
return !0;
|
|
407
407
|
}, at = function(e) {
|
|
408
|
-
return e !== "annotation-xml" &&
|
|
408
|
+
return e !== "annotation-xml" && Ce(e, vt);
|
|
409
409
|
}, rt = function(e) {
|
|
410
|
-
|
|
410
|
+
M(h.beforeSanitizeAttributes, e, null);
|
|
411
411
|
const {
|
|
412
412
|
attributes: t
|
|
413
413
|
} = e;
|
|
414
|
-
if (!t ||
|
|
414
|
+
if (!t || Le(e))
|
|
415
415
|
return;
|
|
416
416
|
const n = {
|
|
417
417
|
attrName: "",
|
|
@@ -424,37 +424,37 @@ function ht() {
|
|
|
424
424
|
for (; f--; ) {
|
|
425
425
|
const A = t[f], {
|
|
426
426
|
name: m,
|
|
427
|
-
namespaceURI:
|
|
428
|
-
value:
|
|
429
|
-
} = A, W =
|
|
430
|
-
let E = m === "value" ?
|
|
431
|
-
if (n.attrName = W, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0,
|
|
432
|
-
|
|
427
|
+
namespaceURI: D,
|
|
428
|
+
value: w
|
|
429
|
+
} = A, W = p(m), Ne = w;
|
|
430
|
+
let E = m === "value" ? Ne : Zt(Ne);
|
|
431
|
+
if (n.attrName = W, n.attrValue = E, n.keepAttr = !0, n.forceKeepAttr = void 0, M(h.uponSanitizeAttribute, e, n), E = n.attrValue, Ve && (W === "id" || W === "name") && (v(m, e), E = kt + E), ne && S(/((--!?|])>)|<\/(style|title|textarea)/i, E)) {
|
|
432
|
+
v(m, e);
|
|
433
433
|
continue;
|
|
434
434
|
}
|
|
435
|
-
if (W === "attributename" &&
|
|
436
|
-
|
|
435
|
+
if (W === "attributename" && Ce(E, "href")) {
|
|
436
|
+
v(m, e);
|
|
437
437
|
continue;
|
|
438
438
|
}
|
|
439
439
|
if (n.forceKeepAttr)
|
|
440
440
|
continue;
|
|
441
441
|
if (!n.keepAttr) {
|
|
442
|
-
|
|
442
|
+
v(m, e);
|
|
443
443
|
continue;
|
|
444
444
|
}
|
|
445
|
-
if (!
|
|
446
|
-
|
|
445
|
+
if (!Xe && S(/\/>/i, E)) {
|
|
446
|
+
v(m, e);
|
|
447
447
|
continue;
|
|
448
448
|
}
|
|
449
|
-
|
|
449
|
+
U && ce([de, Te, Ee], (lt) => {
|
|
450
450
|
E = K(E, lt, " ");
|
|
451
451
|
});
|
|
452
|
-
const st =
|
|
452
|
+
const st = p(e.nodeName);
|
|
453
453
|
if (!it(st, W, E)) {
|
|
454
|
-
|
|
454
|
+
v(m, e);
|
|
455
455
|
continue;
|
|
456
456
|
}
|
|
457
|
-
if (g && typeof ee == "object" && typeof ee.getAttributeType == "function" && !
|
|
457
|
+
if (g && typeof ee == "object" && typeof ee.getAttributeType == "function" && !D)
|
|
458
458
|
switch (ee.getAttributeType(st, W)) {
|
|
459
459
|
case "TrustedHTML": {
|
|
460
460
|
E = g.createHTML(E);
|
|
@@ -465,24 +465,24 @@ function ht() {
|
|
|
465
465
|
break;
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
if (E !==
|
|
468
|
+
if (E !== Ne)
|
|
469
469
|
try {
|
|
470
|
-
|
|
470
|
+
D ? e.setAttributeNS(D, m, E) : e.setAttribute(m, E), Le(e) ? N(e) : ft(o.removed);
|
|
471
471
|
} catch {
|
|
472
|
-
|
|
472
|
+
v(m, e);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
|
|
475
|
+
M(h.afterSanitizeAttributes, e, null);
|
|
476
476
|
}, Bt = function i(e) {
|
|
477
477
|
let t = null;
|
|
478
478
|
const n = tt(e);
|
|
479
|
-
for (
|
|
480
|
-
|
|
481
|
-
|
|
479
|
+
for (M(h.beforeSanitizeShadowDOM, e, null); t = n.nextNode(); )
|
|
480
|
+
M(h.uponSanitizeShadowNode, t, null), ot(t), rt(t), t.content instanceof _ && i(t.content);
|
|
481
|
+
M(h.afterSanitizeShadowDOM, e, null);
|
|
482
482
|
};
|
|
483
483
|
return o.sanitize = function(i) {
|
|
484
484
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = null, n = null, f = null, A = null;
|
|
485
|
-
if (
|
|
485
|
+
if (De = !i, De && (i = "<!-->"), typeof i != "string" && !nt(i))
|
|
486
486
|
if (typeof i.toString == "function") {
|
|
487
487
|
if (i = i.toString(), typeof i != "string")
|
|
488
488
|
throw Z("dirty is not a string, aborting");
|
|
@@ -492,38 +492,38 @@ function ht() {
|
|
|
492
492
|
return i;
|
|
493
493
|
if (ge || ye(e), o.removed = [], typeof i == "string" && (V = !1), V) {
|
|
494
494
|
if (i.nodeName) {
|
|
495
|
-
const
|
|
496
|
-
if (!
|
|
495
|
+
const w = p(i.nodeName);
|
|
496
|
+
if (!d[w] || j[w])
|
|
497
497
|
throw Z("root node is forbidden and cannot be sanitized in-place");
|
|
498
498
|
}
|
|
499
499
|
} else if (i instanceof me)
|
|
500
500
|
t = et("<!---->"), n = t.ownerDocument.importNode(i, !0), n.nodeType === Q.element && n.nodeName === "BODY" || n.nodeName === "HTML" ? t = n : t.appendChild(n);
|
|
501
501
|
else {
|
|
502
|
-
if (!
|
|
502
|
+
if (!F && !U && !P && // eslint-disable-next-line unicorn/prefer-includes
|
|
503
503
|
i.indexOf("<") === -1)
|
|
504
504
|
return g && ie ? g.createHTML(i) : i;
|
|
505
505
|
if (t = et(i), !t)
|
|
506
|
-
return
|
|
506
|
+
return F ? null : ie ? X : "";
|
|
507
507
|
}
|
|
508
|
-
t && he &&
|
|
508
|
+
t && he && N(t.firstChild);
|
|
509
509
|
const m = tt(V ? i : t);
|
|
510
510
|
for (; f = m.nextNode(); )
|
|
511
511
|
ot(f), rt(f), f.content instanceof _ && Bt(f.content);
|
|
512
512
|
if (V)
|
|
513
513
|
return i;
|
|
514
|
-
if (
|
|
514
|
+
if (F) {
|
|
515
515
|
if (oe)
|
|
516
|
-
for (A =
|
|
516
|
+
for (A = It.call(t.ownerDocument); t.firstChild; )
|
|
517
517
|
A.appendChild(t.firstChild);
|
|
518
518
|
else
|
|
519
519
|
A = t;
|
|
520
520
|
return (T.shadowroot || T.shadowrootmode) && (A = Mt.call(a, A, !0)), A;
|
|
521
521
|
}
|
|
522
|
-
let
|
|
523
|
-
return
|
|
524
|
-
` +
|
|
525
|
-
|
|
526
|
-
}), g && ie ? g.createHTML(
|
|
522
|
+
let D = P ? t.outerHTML : t.innerHTML;
|
|
523
|
+
return P && d["!doctype"] && t.ownerDocument && t.ownerDocument.doctype && t.ownerDocument.doctype.name && S(gt, t.ownerDocument.doctype.name) && (D = "<!DOCTYPE " + t.ownerDocument.doctype.name + `>
|
|
524
|
+
` + D), U && ce([de, Te, Ee], (w) => {
|
|
525
|
+
D = K(D, w, " ");
|
|
526
|
+
}), g && ie ? g.createHTML(D) : D;
|
|
527
527
|
}, o.setConfig = function() {
|
|
528
528
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
529
529
|
ye(i), ge = !0;
|
|
@@ -531,7 +531,7 @@ function ht() {
|
|
|
531
531
|
G = null, ge = !1;
|
|
532
532
|
}, o.isValidAttribute = function(i, e, t) {
|
|
533
533
|
G || ye({});
|
|
534
|
-
const n =
|
|
534
|
+
const n = p(i), f = p(e);
|
|
535
535
|
return it(n, f, t);
|
|
536
536
|
}, o.addHook = function(i, e) {
|
|
537
537
|
typeof e == "function" && q(h[i], e);
|
|
@@ -558,14 +558,14 @@ function En(r, o = {}) {
|
|
|
558
558
|
return null;
|
|
559
559
|
if (!dn())
|
|
560
560
|
return r;
|
|
561
|
-
const _ = [...Yt, ...c],
|
|
561
|
+
const _ = [...Yt, ...c], x = [
|
|
562
562
|
...l ? [] : ["style"],
|
|
563
563
|
...a
|
|
564
564
|
];
|
|
565
565
|
return pn.sanitize(r, {
|
|
566
566
|
USE_PROFILES: { svg: !0, svgFilters: !0 },
|
|
567
567
|
FORBID_TAGS: _,
|
|
568
|
-
FORBID_ATTR:
|
|
568
|
+
FORBID_ATTR: x
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
571
|
function dn() {
|