@nysds/nys-icon 1.19.2 → 1.19.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.
package/dist/nys-icon.js CHANGED
@@ -1,215 +1,213 @@
1
- import { LitElement as Pn, unsafeCSS as kn, html as zn } from "lit";
2
- import { property as Q, state as Un } from "lit/decorators.js";
1
+ import { LitElement as Bn, unsafeCSS as Wn, html as Yn } from "lit";
2
+ import { property as nt, state as jn } from "lit/decorators.js";
3
3
  /*!
4
4
  * █▄ █ █ █ █▀▀▀█ █▀▀▄ █▀▀▀█
5
5
  * █ █ █ █▄▄▄█ ▀▀▀▄▄ █ █ ▀▀▀▄▄
6
6
  * █ ▀█ █ █▄▄▄█ █▄▄▀ █▄▄▄█
7
7
  *
8
- * Icon Component v1.19.2
8
+ * Icon Component v1.19.4
9
9
  * Part of the New York State Design System
10
10
  * Repository: https://github.com/its-hcd/nysds
11
11
  * License: MIT
12
12
  */
13
- window.__nysIconRegistry || (window.__nysIconRegistry = /* @__PURE__ */ new Map());
14
- window.__nysIconWatchers || (window.__nysIconWatchers = /* @__PURE__ */ new Map());
15
- const bt = window.__nysIconRegistry, ct = window.__nysIconWatchers;
16
- function Fn() {
17
- const o = /(?:^|\/)(?:nysds(?:\.es|\.min)?|nys-icon)\.js(?:[?#]|$)/;
18
- if (typeof document < "u") {
19
- const s = document.currentScript;
20
- if (s?.src) return new URL("./icons/", s.src).href;
21
- const l = Array.from(
22
- document.querySelectorAll("script[src]")
23
- ).find((m) => o.test(m.src));
24
- if (l?.src) return new URL("./icons/", l.src).href;
25
- }
26
- const n = import.meta.url;
27
- return n ? new URL("./icons/", n).href : new URL("./icons/", document.baseURI).href;
13
+ const Ot = globalThis.__nysIconRegistry ??= /* @__PURE__ */ new Map(), mt = globalThis.__nysIconWatchers ??= /* @__PURE__ */ new Map();
14
+ let ie = null, Be = null;
15
+ async function $n() {
16
+ return ie || (Be ??= import("./nys-icon.library-3w_7rLli.js").then(
17
+ (o) => ie = o.default
18
+ ), Be);
28
19
  }
29
- if (!bt.has("default")) {
30
- const o = Fn();
31
- bt.set("default", {
32
- resolver: (n) => n ? `${o}${n}.svg` : void 0
20
+ function Xn() {
21
+ if (globalThis.__nysIconDefaultRegistered || Ot.has("default")) {
22
+ globalThis.__nysIconDefaultRegistered = !0;
23
+ return;
24
+ }
25
+ globalThis.__nysIconDefaultRegistered = !0, Ot.set("default", {
26
+ resolver: async (o) => {
27
+ if (!o) return;
28
+ const s = (await $n())[o];
29
+ return s ? { type: "svg", content: s } : void 0;
30
+ }
33
31
  });
34
32
  }
35
- function Lo(o, n) {
36
- bt.set(o, n), ct.get(o)?.forEach((s) => s.redraw());
33
+ function ko(o, n) {
34
+ Ot.set(o, n), mt.get(o)?.forEach((s) => s.redraw());
37
35
  }
38
- function Do(o) {
39
- bt.delete(o), ct.get(o)?.forEach((n) => n.redraw());
36
+ function zo(o) {
37
+ Ot.delete(o), mt.get(o)?.forEach((n) => n.redraw());
40
38
  }
41
- function Hn(o) {
42
- return bt.get(o);
39
+ function Vn(o) {
40
+ return Xn(), Ot.get(o);
43
41
  }
44
- function Fe(o, n) {
45
- ct.has(o) || ct.set(o, /* @__PURE__ */ new Set()), ct.get(o).add(n);
42
+ function We(o, n) {
43
+ mt.has(o) || mt.set(o, /* @__PURE__ */ new Set()), mt.get(o).add(n);
46
44
  }
47
- function He(o, n) {
48
- ct.get(o)?.delete(n);
45
+ function Ye(o, n) {
46
+ mt.get(o)?.delete(n);
49
47
  }
50
- /*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
51
- function Ge(o, n) {
48
+ /*! @license DOMPurify 3.4.12 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.12/LICENSE */
49
+ function je(o, n) {
52
50
  (n == null || n > o.length) && (n = o.length);
53
- for (var s = 0, c = Array(n); s < n; s++) c[s] = o[s];
54
- return c;
51
+ for (var s = 0, l = Array(n); s < n; s++) l[s] = o[s];
52
+ return l;
55
53
  }
56
- function Gn(o) {
54
+ function qn(o) {
57
55
  if (Array.isArray(o)) return o;
58
56
  }
59
- function Bn(o, n) {
57
+ function Kn(o, n) {
60
58
  var s = o == null ? null : typeof Symbol < "u" && o[Symbol.iterator] || o["@@iterator"];
61
59
  if (s != null) {
62
- var c, l, m, d, lt = [], D = !0, ut = !1;
60
+ var l, u, m, A, dt = [], M = !0, ht = !1;
63
61
  try {
64
- if (m = (s = s.call(o)).next, n !== 0) for (; !(D = (c = m.call(s)).done) && (lt.push(c.value), lt.length !== n); D = !0) ;
65
- } catch (xt) {
66
- ut = !0, l = xt;
62
+ if (m = (s = s.call(o)).next, n !== 0) for (; !(M = (l = m.call(s)).done) && (dt.push(l.value), dt.length !== n); M = !0) ;
63
+ } catch (kt) {
64
+ ht = !0, u = kt;
67
65
  } finally {
68
66
  try {
69
- if (!D && s.return != null && (d = s.return(), Object(d) !== d)) return;
67
+ if (!M && s.return != null && (A = s.return(), Object(A) !== A)) return;
70
68
  } finally {
71
- if (ut) throw l;
69
+ if (ht) throw u;
72
70
  }
73
71
  }
74
- return lt;
72
+ return dt;
75
73
  }
76
74
  }
77
- function Wn() {
75
+ function Zn() {
78
76
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
79
77
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
80
78
  }
81
- function Yn(o, n) {
82
- return Gn(o) || Bn(o, n) || jn(o, n) || Wn();
79
+ function Jn(o, n) {
80
+ return qn(o) || Kn(o, n) || Qn(o, n) || Zn();
83
81
  }
84
- function jn(o, n) {
82
+ function Qn(o, n) {
85
83
  if (o) {
86
- if (typeof o == "string") return Ge(o, n);
84
+ if (typeof o == "string") return je(o, n);
87
85
  var s = {}.toString.call(o).slice(8, -1);
88
- return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Ge(o, n) : void 0;
86
+ return s === "Object" && o.constructor && (s = o.constructor.name), s === "Map" || s === "Set" ? Array.from(o) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? je(o, n) : void 0;
89
87
  }
90
88
  }
91
- const en = Object.entries, Be = Object.setPrototypeOf, $n = Object.isFrozen, Xn = Object.getPrototypeOf, Vn = Object.getOwnPropertyDescriptor;
92
- let O = Object.freeze, R = Object.seal, at = Object.create, nn = typeof Reflect < "u" && Reflect, se = nn.apply, ae = nn.construct;
89
+ const ln = Object.entries, $e = Object.setPrototypeOf, to = Object.isFrozen, eo = Object.getPrototypeOf, no = Object.getOwnPropertyDescriptor;
90
+ let O = Object.freeze, w = Object.seal, pt = Object.create, cn = typeof Reflect < "u" && Reflect, ue = cn.apply, fe = cn.construct;
93
91
  O || (O = function(n) {
94
92
  return n;
95
93
  });
96
- R || (R = function(n) {
94
+ w || (w = function(n) {
97
95
  return n;
98
96
  });
99
- se || (se = function(n, s) {
100
- for (var c = arguments.length, l = new Array(c > 2 ? c - 2 : 0), m = 2; m < c; m++)
101
- l[m - 2] = arguments[m];
102
- return n.apply(s, l);
97
+ ue || (ue = function(n, s) {
98
+ for (var l = arguments.length, u = new Array(l > 2 ? l - 2 : 0), m = 2; m < l; m++)
99
+ u[m - 2] = arguments[m];
100
+ return n.apply(s, u);
103
101
  });
104
- ae || (ae = function(n) {
105
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++)
106
- c[l - 1] = arguments[l];
107
- return new n(...c);
102
+ fe || (fe = function(n) {
103
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
104
+ l[u - 1] = arguments[u];
105
+ return new n(...l);
108
106
  });
109
- const yt = A(Array.prototype.forEach), qn = A(Array.prototype.lastIndexOf), We = A(Array.prototype.pop), st = A(Array.prototype.push), Kn = A(Array.prototype.splice), j = Array.isArray, At = A(String.prototype.toLowerCase), ee = A(String.prototype.toString), Ye = A(String.prototype.match), gt = A(String.prototype.replace), je = A(String.prototype.indexOf), Zn = A(String.prototype.trim), Jn = A(Number.prototype.toString), Qn = A(Boolean.prototype.toString), $e = typeof BigInt > "u" ? null : A(BigInt.prototype.toString), Xe = typeof Symbol > "u" ? null : A(Symbol.prototype.toString), b = A(Object.prototype.hasOwnProperty), Et = A(Object.prototype.toString), w = A(RegExp.prototype.test), J = to(TypeError);
110
- function A(o) {
107
+ const ut = E(Array.prototype.forEach), oo = E(Array.prototype.lastIndexOf), Xe = E(Array.prototype.pop), ft = E(Array.prototype.push), io = E(Array.prototype.splice), X = Array.isArray, bt = E(String.prototype.toLowerCase), re = E(String.prototype.toString), Ve = E(String.prototype.match), Et = E(String.prototype.replace), qe = E(String.prototype.indexOf), ro = E(String.prototype.trim), so = E(Number.prototype.toString), ao = E(Boolean.prototype.toString), Ke = typeof BigInt > "u" ? null : E(BigInt.prototype.toString), Ze = typeof Symbol > "u" ? null : E(Symbol.prototype.toString), S = E(Object.prototype.hasOwnProperty), At = E(Object.prototype.toString), b = E(RegExp.prototype.test), et = lo(TypeError);
108
+ function E(o) {
111
109
  return function(n) {
112
110
  n instanceof RegExp && (n.lastIndex = 0);
113
- for (var s = arguments.length, c = new Array(s > 1 ? s - 1 : 0), l = 1; l < s; l++)
114
- c[l - 1] = arguments[l];
115
- return se(o, n, c);
111
+ for (var s = arguments.length, l = new Array(s > 1 ? s - 1 : 0), u = 1; u < s; u++)
112
+ l[u - 1] = arguments[u];
113
+ return ue(o, n, l);
116
114
  };
117
115
  }
118
- function to(o) {
116
+ function lo(o) {
119
117
  return function() {
120
- for (var n = arguments.length, s = new Array(n), c = 0; c < n; c++)
121
- s[c] = arguments[c];
122
- return ae(o, s);
118
+ for (var n = arguments.length, s = new Array(n), l = 0; l < n; l++)
119
+ s[l] = arguments[l];
120
+ return fe(o, s);
123
121
  };
124
122
  }
125
- function f(o, n) {
126
- let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : At;
127
- if (Be && Be(o, null), !j(n))
123
+ function p(o, n) {
124
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : bt;
125
+ if ($e && $e(o, null), !X(n))
128
126
  return o;
129
- let c = n.length;
130
- for (; c--; ) {
131
- let l = n[c];
132
- if (typeof l == "string") {
133
- const m = s(l);
134
- m !== l && ($n(n) || (n[c] = m), l = m);
127
+ let l = n.length;
128
+ for (; l--; ) {
129
+ let u = n[l];
130
+ if (typeof u == "string") {
131
+ const m = s(u);
132
+ m !== u && (to(n) || (n[l] = m), u = m);
135
133
  }
136
- o[l] = !0;
134
+ o[u] = !0;
137
135
  }
138
136
  return o;
139
137
  }
140
- function eo(o) {
138
+ function co(o) {
141
139
  for (let n = 0; n < o.length; n++)
142
- b(o, n) || (o[n] = null);
140
+ S(o, n) || (o[n] = null);
143
141
  return o;
144
142
  }
145
- function N(o) {
146
- const n = at(null);
147
- for (const c of en(o)) {
148
- var s = Yn(c, 2);
149
- const l = s[0], m = s[1];
150
- b(o, l) && (j(m) ? n[l] = eo(m) : m && typeof m == "object" && m.constructor === Object ? n[l] = N(m) : n[l] = m);
143
+ function L(o) {
144
+ const n = pt(null);
145
+ for (const l of ln(o)) {
146
+ var s = Jn(l, 2);
147
+ const u = s[0], m = s[1];
148
+ S(o, u) && (X(m) ? n[u] = co(m) : m && typeof m == "object" && m.constructor === Object ? n[u] = L(m) : n[u] = m);
151
149
  }
152
150
  return n;
153
151
  }
154
- function no(o) {
152
+ function uo(o) {
155
153
  switch (typeof o) {
156
154
  case "string":
157
155
  return o;
158
156
  case "number":
159
- return Jn(o);
157
+ return so(o);
160
158
  case "boolean":
161
- return Qn(o);
159
+ return ao(o);
162
160
  case "bigint":
163
- return $e ? $e(o) : "0";
161
+ return Ke ? Ke(o) : "0";
164
162
  case "symbol":
165
- return Xe ? Xe(o) : "Symbol()";
163
+ return Ze ? Ze(o) : "Symbol()";
166
164
  case "undefined":
167
- return Et(o);
165
+ return At(o);
168
166
  case "function":
169
167
  case "object": {
170
168
  if (o === null)
171
- return Et(o);
172
- const n = o, s = z(n, "toString");
169
+ return At(o);
170
+ const n = o, s = H(n, "toString");
173
171
  if (typeof s == "function") {
174
- const c = s(n);
175
- return typeof c == "string" ? c : Et(c);
172
+ const l = s(n);
173
+ return typeof l == "string" ? l : At(l);
176
174
  }
177
- return Et(o);
175
+ return At(o);
178
176
  }
179
177
  default:
180
- return Et(o);
178
+ return At(o);
181
179
  }
182
180
  }
183
- function z(o, n) {
181
+ function H(o, n) {
184
182
  for (; o !== null; ) {
185
- const c = Vn(o, n);
186
- if (c) {
187
- if (c.get)
188
- return A(c.get);
189
- if (typeof c.value == "function")
190
- return A(c.value);
183
+ const l = no(o, n);
184
+ if (l) {
185
+ if (l.get)
186
+ return E(l.get);
187
+ if (typeof l.value == "function")
188
+ return E(l.value);
191
189
  }
192
- o = Xn(o);
190
+ o = eo(o);
193
191
  }
194
192
  function s() {
195
193
  return null;
196
194
  }
197
195
  return s;
198
196
  }
199
- function oo(o) {
197
+ function fo(o) {
200
198
  try {
201
- return w(o, ""), !0;
199
+ return b(o, ""), !0;
202
200
  } catch {
203
201
  return !1;
204
202
  }
205
203
  }
206
- const Ve = O(["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"]), ne = O(["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"]), oe = O(["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"]), io = O(["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"]), ie = O(["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"]), ro = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), qe = O(["#text"]), Ke = O(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]), re = O(["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"]), Ze = O(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), vt = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), so = R(/{{[\w\W]*|^[\w\W]*}}/g), ao = R(/<%[\w\W]*|^[\w\W]*%>/g), co = R(/\${[\w\W]*/g), lo = R(/^data-[\-\w.\u00B7-\uFFFF]+$/), uo = R(/^aria-[\-\w]+$/), Je = R(
204
+ const Je = O(["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"]), se = O(["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"]), ae = O(["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"]), po = O(["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"]), le = O(["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"]), mo = O(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qe = O(["#text"]), tn = O(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "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"]), ce = O(["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", "dominant-baseline", "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-orientation", "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"]), en = O(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "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"]), xt = O(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), ho = w(/{{[\w\W]*|^[\w\W]*}}/g), _o = w(/<%[\w\W]*|^[\w\W]*%>/g), To = w(/\${[\w\W]*/g), go = w(/^data-[\-\w.\u00B7-\uFFFF]+$/), yo = w(/^aria-[\-\w]+$/), nn = w(
207
205
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
208
206
  // eslint-disable-line no-useless-escape
209
- ), fo = R(/^(?:\w+script|data):/i), po = R(
207
+ ), Eo = w(/^(?:\w+script|data):/i), Ao = w(
210
208
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
211
209
  // eslint-disable-line no-control-regex
212
- ), mo = R(/^html$/i), ho = R(/^[a-z][.\w]*(-[.\w]+)+$/i), Qe = R(/<[/\w!]/g), _o = R(/<[/\w]/g), To = R(/<\/no(script|embed|frames)/i), yo = R(/\/>/i), k = {
210
+ ), bo = w(/^html$/i), So = w(/^[a-z][.\w]*(-[.\w]+)+$/i), on = w(/<[/\w!]/g), rn = w(/<[/\w]/g), Oo = w(/<\/no(script|embed|frames)/i), wo = w(/\/>/i), v = {
213
211
  element: 1,
214
212
  attribute: 2,
215
213
  text: 3,
@@ -225,28 +223,28 @@ const Ve = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
225
223
  documentFragment: 11,
226
224
  notation: 12
227
225
  // Deprecated
228
- }, go = function() {
226
+ }, Ro = function() {
229
227
  return typeof window > "u" ? null : window;
230
- }, Eo = function(n, s) {
228
+ }, Io = function(n, s) {
231
229
  if (typeof n != "object" || typeof n.createPolicy != "function")
232
230
  return null;
233
- let c = null;
234
- const l = "data-tt-policy-suffix";
235
- s && s.hasAttribute(l) && (c = s.getAttribute(l));
236
- const m = "dompurify" + (c ? "#" + c : "");
231
+ let l = null;
232
+ const u = "data-tt-policy-suffix";
233
+ s && s.hasAttribute(u) && (l = s.getAttribute(u));
234
+ const m = "dompurify" + (l ? "#" + l : "");
237
235
  try {
238
236
  return n.createPolicy(m, {
239
- createHTML(d) {
240
- return d;
237
+ createHTML(A) {
238
+ return A;
241
239
  },
242
- createScriptURL(d) {
243
- return d;
240
+ createScriptURL(A) {
241
+ return A;
244
242
  }
245
243
  });
246
244
  } catch {
247
245
  return console.warn("TrustedTypes policy " + m + " could not be created."), null;
248
246
  }
249
- }, tn = function() {
247
+ }, sn = function() {
250
248
  return {
251
249
  afterSanitizeAttributes: [],
252
250
  afterSanitizeElements: [],
@@ -258,53 +256,53 @@ const Ve = O(["a", "abbr", "acronym", "address", "area", "article", "aside", "au
258
256
  uponSanitizeElement: [],
259
257
  uponSanitizeShadowNode: []
260
258
  };
261
- }, Y = function(n, s, c, l) {
262
- return b(n, s) && j(n[s]) ? f(l.base ? N(l.base) : {}, n[s], l.transform) : c;
259
+ }, $ = function(n, s, l, u) {
260
+ return S(n, s) && X(n[s]) ? p(u.base ? L(u.base) : {}, n[s], u.transform) : l;
263
261
  };
264
- function on() {
265
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : go();
266
- const n = (r) => on(r);
267
- if (n.version = "3.4.11", n.removed = [], !o || !o.document || o.document.nodeType !== k.document || !o.Element)
262
+ function un() {
263
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Ro();
264
+ const n = (r) => un(r);
265
+ if (n.version = "3.4.12", n.removed = [], !o || !o.document || o.document.nodeType !== v.document || !o.Element)
268
266
  return n.isSupported = !1, n;
269
267
  let s = o.document;
270
- const c = s, l = c.currentScript;
268
+ const l = s, u = l.currentScript;
271
269
  o.DocumentFragment;
272
- const m = o.HTMLTemplateElement, d = o.Node, lt = o.Element, D = o.NodeFilter, ut = o.NamedNodeMap;
273
- ut === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
274
- const xt = o.DOMParser, wt = o.trustedTypes, V = lt.prototype, rn = z(V, "cloneNode"), ce = z(V, "remove"), sn = z(V, "nextSibling"), ft = z(V, "childNodes"), pt = z(V, "parentNode"), le = z(V, "shadowRoot"), Pt = z(V, "attributes"), C = d && d.prototype ? z(d.prototype, "nodeType") : null, H = d && d.prototype ? z(d.prototype, "nodeName") : null;
270
+ const m = o.HTMLTemplateElement, A = o.Node, dt = o.Element, M = o.NodeFilter, ht = o.NamedNodeMap;
271
+ ht === void 0 && (o.NamedNodeMap || o.MozNamedAttrMap), o.HTMLFormElement;
272
+ const kt = o.DOMParser, wt = o.trustedTypes, K = dt.prototype, pn = H(K, "cloneNode"), zt = H(K, "remove"), mn = H(K, "nextSibling"), ot = H(K, "childNodes"), Z = H(K, "parentNode"), me = H(K, "shadowRoot"), Ft = H(K, "attributes"), I = A && A.prototype ? H(A.prototype, "nodeType") : null, k = A && A.prototype ? H(A.prototype, "nodeName") : null;
275
273
  if (typeof m == "function") {
276
274
  const r = s.createElement("template");
277
275
  r.content && r.content.ownerDocument && (s = r.content.ownerDocument);
278
276
  }
279
- let L, q = "", kt, ue = !1, mt = 0;
280
- const fe = function() {
281
- if (mt > 0)
282
- throw J('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
283
- }, tt = function(t) {
284
- fe(), mt++;
277
+ let D, J = "", Ut, de = !1, _t = 0;
278
+ const he = function() {
279
+ if (_t > 0)
280
+ throw et('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
281
+ }, it = function(t) {
282
+ he(), _t++;
285
283
  try {
286
- return L.createHTML(t);
284
+ return D.createHTML(t);
287
285
  } finally {
288
- mt--;
286
+ _t--;
289
287
  }
290
- }, an = function(t) {
291
- fe(), mt++;
288
+ }, dn = function(t) {
289
+ he(), _t++;
292
290
  try {
293
- return L.createScriptURL(t);
291
+ return D.createScriptURL(t);
294
292
  } finally {
295
- mt--;
293
+ _t--;
296
294
  }
297
- }, cn = function() {
298
- return ue || (kt = Eo(wt, l), ue = !0), kt;
299
- }, Ot = s, zt = Ot.implementation, pe = Ot.createNodeIterator, ln = Ot.createDocumentFragment, un = Ot.getElementsByTagName, fn = c.importNode;
300
- let g = tn();
301
- n.isSupported = typeof en == "function" && typeof pt == "function" && zt && zt.createHTMLDocument !== void 0;
302
- const pn = so, mn = ao, dn = co, hn = lo, _n = uo, Tn = fo, me = po, yn = ho;
303
- let de = Je, h = null;
304
- const he = f({}, [...Ve, ...ne, ...oe, ...ie, ...qe]);
305
- let _ = null;
306
- const _e = f({}, [...Ke, ...re, ...Ze, ...vt]);
307
- let T = Object.seal(at(null, {
295
+ }, hn = function() {
296
+ return de || (Ut = Io(wt, u), de = !0), Ut;
297
+ }, Rt = s, Ht = Rt.implementation, _e = Rt.createNodeIterator, _n = Rt.createDocumentFragment, Tn = Rt.getElementsByTagName, gn = l.importNode;
298
+ let h = sn();
299
+ n.isSupported = typeof ln == "function" && typeof Z == "function" && Ht && Ht.createHTMLDocument !== void 0;
300
+ const yn = ho, En = _o, An = To, bn = go, Sn = yo, On = Eo, Te = Ao, wn = So;
301
+ let ge = nn, _ = null;
302
+ const ye = p({}, [...Je, ...se, ...ae, ...le, ...Qe]);
303
+ let T = null;
304
+ const Ee = p({}, [...tn, ...ce, ...en, ...xt]);
305
+ let g = Object.seal(pt(null, {
308
306
  tagNameCheck: {
309
307
  writable: !0,
310
308
  configurable: !1,
@@ -323,8 +321,8 @@ function on() {
323
321
  enumerable: !0,
324
322
  value: !1
325
323
  }
326
- })), dt = null, Te = null;
327
- const G = Object.seal(at(null, {
324
+ })), Tt = null, Ae = null;
325
+ const B = Object.seal(pt(null, {
328
326
  tagCheck: {
329
327
  writable: !0,
330
328
  configurable: !1,
@@ -338,10 +336,10 @@ function on() {
338
336
  value: null
339
337
  }
340
338
  }));
341
- let ye = !0, Ut = !0, ge = !1, Ee = !0, B = !1, ht = !0, K = !1, Ft = !1, Ht = null, Gt = null, Bt = !1, et = !1, Rt = !1, It = !1, Ae = !0, Se = !1;
342
- const be = "user-content-";
343
- let Wt = !0, Yt = !1, nt = {}, x = null;
344
- const jt = f({}, [
339
+ let be = !0, Gt = !0, Se = !1, Oe = !0, W = !1, Y = !0, Q = !1, Bt = !1, Wt = null, Yt = null, jt = !1, rt = !1, It = !1, Nt = !1, we = !0, Re = !1;
340
+ const Ie = "user-content-";
341
+ let $t = !0, Xt = !1, st = {}, z = null;
342
+ const Vt = p({}, [
345
343
  "annotation-xml",
346
344
  "audio",
347
345
  "colgroup",
@@ -378,123 +376,124 @@ function on() {
378
376
  "video",
379
377
  "xmp"
380
378
  ]);
381
- let we = null;
382
- const Oe = f({}, ["audio", "video", "img", "source", "image", "track"]);
383
- let $t = null;
384
- const Re = f({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Nt = "http://www.w3.org/1998/Math/MathML", Lt = "http://www.w3.org/2000/svg", P = "http://www.w3.org/1999/xhtml";
385
- let ot = P, Xt = !1, Vt = null;
386
- const gn = f({}, [Nt, Lt, P], ee), Ie = O(["mi", "mo", "mn", "ms", "mtext"]);
387
- let qt = f({}, Ie);
388
- const Ne = O(["annotation-xml"]);
389
- let Kt = f({}, Ne);
390
- const En = f({}, ["title", "style", "font", "a", "script"]);
391
- let _t = null;
392
- const An = ["application/xhtml+xml", "text/html"], Sn = "text/html";
393
- let y = null, it = null;
394
- const bn = s.createElement("form"), Le = function(t) {
379
+ let Ne = null;
380
+ const Le = p({}, ["audio", "video", "img", "source", "image", "track"]);
381
+ let qt = null;
382
+ const De = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Lt = "http://www.w3.org/1998/Math/MathML", Dt = "http://www.w3.org/2000/svg", F = "http://www.w3.org/1999/xhtml";
383
+ let at = F, Kt = !1, Zt = null;
384
+ const Rn = p({}, [Lt, Dt, F], re), Ce = O(["mi", "mo", "mn", "ms", "mtext"]);
385
+ let Jt = p({}, Ce);
386
+ const Me = O(["annotation-xml"]);
387
+ let Qt = p({}, Me);
388
+ const In = p({}, ["title", "style", "font", "a", "script"]);
389
+ let gt = null;
390
+ const Nn = ["application/xhtml+xml", "text/html"], Ln = "text/html";
391
+ let d = null, lt = null;
392
+ const Dn = s.createElement("form"), ve = function(t) {
395
393
  return t instanceof RegExp || t instanceof Function;
396
- }, Zt = function() {
394
+ }, te = function() {
397
395
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
398
- if (it && it === t)
396
+ if (lt && lt === t)
399
397
  return;
400
- (!t || typeof t != "object") && (t = {}), t = N(t), _t = // eslint-disable-next-line unicorn/prefer-includes
401
- An.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Sn : t.PARSER_MEDIA_TYPE, y = _t === "application/xhtml+xml" ? ee : At, h = Y(t, "ALLOWED_TAGS", he, {
402
- transform: y
403
- }), _ = Y(t, "ALLOWED_ATTR", _e, {
404
- transform: y
405
- }), Vt = Y(t, "ALLOWED_NAMESPACES", gn, {
406
- transform: ee
407
- }), $t = Y(t, "ADD_URI_SAFE_ATTR", Re, {
408
- transform: y,
409
- base: Re
410
- }), we = Y(t, "ADD_DATA_URI_TAGS", Oe, {
411
- transform: y,
412
- base: Oe
413
- }), x = Y(t, "FORBID_CONTENTS", jt, {
414
- transform: y
415
- }), dt = Y(t, "FORBID_TAGS", N({}), {
416
- transform: y
417
- }), Te = Y(t, "FORBID_ATTR", N({}), {
418
- transform: y
419
- }), nt = b(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? N(t.USE_PROFILES) : t.USE_PROFILES : !1, ye = t.ALLOW_ARIA_ATTR !== !1, Ut = t.ALLOW_DATA_ATTR !== !1, ge = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, B = t.SAFE_FOR_TEMPLATES || !1, ht = t.SAFE_FOR_XML !== !1, K = t.WHOLE_DOCUMENT || !1, et = t.RETURN_DOM || !1, Rt = t.RETURN_DOM_FRAGMENT || !1, It = t.RETURN_TRUSTED_TYPE || !1, Bt = t.FORCE_BODY || !1, Ae = t.SANITIZE_DOM !== !1, Se = t.SANITIZE_NAMED_PROPS || !1, Wt = t.KEEP_CONTENT !== !1, Yt = t.IN_PLACE || !1, de = oo(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : Je, ot = typeof t.NAMESPACE == "string" ? t.NAMESPACE : P, qt = b(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? N(t.MATHML_TEXT_INTEGRATION_POINTS) : f({}, Ie), Kt = b(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? N(t.HTML_INTEGRATION_POINTS) : f({}, Ne);
420
- const e = b(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? N(t.CUSTOM_ELEMENT_HANDLING) : at(null);
421
- if (T = at(null), b(e, "tagNameCheck") && Le(e.tagNameCheck) && (T.tagNameCheck = e.tagNameCheck), b(e, "attributeNameCheck") && Le(e.attributeNameCheck) && (T.attributeNameCheck = e.attributeNameCheck), b(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (T.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), R(T), B && (Ut = !1), Rt && (et = !0), nt && (h = f({}, qe), _ = at(null), nt.html === !0 && (f(h, Ve), f(_, Ke)), nt.svg === !0 && (f(h, ne), f(_, re), f(_, vt)), nt.svgFilters === !0 && (f(h, oe), f(_, re), f(_, vt)), nt.mathMl === !0 && (f(h, ie), f(_, Ze), f(_, vt))), G.tagCheck = null, G.attributeCheck = null, b(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? G.tagCheck = t.ADD_TAGS : j(t.ADD_TAGS) && (h === he && (h = N(h)), f(h, t.ADD_TAGS, y))), b(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? G.attributeCheck = t.ADD_ATTR : j(t.ADD_ATTR) && (_ === _e && (_ = N(_)), f(_, t.ADD_ATTR, y))), b(t, "ADD_URI_SAFE_ATTR") && j(t.ADD_URI_SAFE_ATTR) && f($t, t.ADD_URI_SAFE_ATTR, y), b(t, "FORBID_CONTENTS") && j(t.FORBID_CONTENTS) && (x === jt && (x = N(x)), f(x, t.FORBID_CONTENTS, y)), b(t, "ADD_FORBID_CONTENTS") && j(t.ADD_FORBID_CONTENTS) && (x === jt && (x = N(x)), f(x, t.ADD_FORBID_CONTENTS, y)), Wt && (h["#text"] = !0), K && f(h, ["html", "head", "body"]), h.table && (f(h, ["tbody"]), delete dt.tbody), t.TRUSTED_TYPES_POLICY) {
398
+ (!t || typeof t != "object") && (t = {}), t = L(t), gt = // eslint-disable-next-line unicorn/prefer-includes
399
+ Nn.indexOf(t.PARSER_MEDIA_TYPE) === -1 ? Ln : t.PARSER_MEDIA_TYPE, d = gt === "application/xhtml+xml" ? re : bt, _ = $(t, "ALLOWED_TAGS", ye, {
400
+ transform: d
401
+ }), T = $(t, "ALLOWED_ATTR", Ee, {
402
+ transform: d
403
+ }), Zt = $(t, "ALLOWED_NAMESPACES", Rn, {
404
+ transform: re
405
+ }), qt = $(t, "ADD_URI_SAFE_ATTR", De, {
406
+ transform: d,
407
+ base: De
408
+ }), Ne = $(t, "ADD_DATA_URI_TAGS", Le, {
409
+ transform: d,
410
+ base: Le
411
+ }), z = $(t, "FORBID_CONTENTS", Vt, {
412
+ transform: d
413
+ }), Tt = $(t, "FORBID_TAGS", L({}), {
414
+ transform: d
415
+ }), Ae = $(t, "FORBID_ATTR", L({}), {
416
+ transform: d
417
+ }), st = S(t, "USE_PROFILES") ? t.USE_PROFILES && typeof t.USE_PROFILES == "object" ? L(t.USE_PROFILES) : t.USE_PROFILES : !1, be = t.ALLOW_ARIA_ATTR !== !1, Gt = t.ALLOW_DATA_ATTR !== !1, Se = t.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = t.ALLOW_SELF_CLOSE_IN_ATTR !== !1, W = t.SAFE_FOR_TEMPLATES || !1, Y = t.SAFE_FOR_XML !== !1, Q = t.WHOLE_DOCUMENT || !1, rt = t.RETURN_DOM || !1, It = t.RETURN_DOM_FRAGMENT || !1, Nt = t.RETURN_TRUSTED_TYPE || !1, jt = t.FORCE_BODY || !1, we = t.SANITIZE_DOM !== !1, Re = t.SANITIZE_NAMED_PROPS || !1, $t = t.KEEP_CONTENT !== !1, Xt = t.IN_PLACE || !1, ge = fo(t.ALLOWED_URI_REGEXP) ? t.ALLOWED_URI_REGEXP : nn, at = typeof t.NAMESPACE == "string" ? t.NAMESPACE : F, Jt = S(t, "MATHML_TEXT_INTEGRATION_POINTS") && t.MATHML_TEXT_INTEGRATION_POINTS && typeof t.MATHML_TEXT_INTEGRATION_POINTS == "object" ? L(t.MATHML_TEXT_INTEGRATION_POINTS) : p({}, Ce), Qt = S(t, "HTML_INTEGRATION_POINTS") && t.HTML_INTEGRATION_POINTS && typeof t.HTML_INTEGRATION_POINTS == "object" ? L(t.HTML_INTEGRATION_POINTS) : p({}, Me);
418
+ const e = S(t, "CUSTOM_ELEMENT_HANDLING") && t.CUSTOM_ELEMENT_HANDLING && typeof t.CUSTOM_ELEMENT_HANDLING == "object" ? L(t.CUSTOM_ELEMENT_HANDLING) : pt(null);
419
+ if (g = pt(null), S(e, "tagNameCheck") && ve(e.tagNameCheck) && (g.tagNameCheck = e.tagNameCheck), S(e, "attributeNameCheck") && ve(e.attributeNameCheck) && (g.attributeNameCheck = e.attributeNameCheck), S(e, "allowCustomizedBuiltInElements") && typeof e.allowCustomizedBuiltInElements == "boolean" && (g.allowCustomizedBuiltInElements = e.allowCustomizedBuiltInElements), w(g), W && (Gt = !1), It && (rt = !0), st && (_ = p({}, Qe), T = pt(null), st.html === !0 && (p(_, Je), p(T, tn)), st.svg === !0 && (p(_, se), p(T, ce), p(T, xt)), st.svgFilters === !0 && (p(_, ae), p(T, ce), p(T, xt)), st.mathMl === !0 && (p(_, le), p(T, en), p(T, xt))), B.tagCheck = null, B.attributeCheck = null, S(t, "ADD_TAGS") && (typeof t.ADD_TAGS == "function" ? B.tagCheck = t.ADD_TAGS : X(t.ADD_TAGS) && (_ === ye && (_ = L(_)), p(_, t.ADD_TAGS, d))), S(t, "ADD_ATTR") && (typeof t.ADD_ATTR == "function" ? B.attributeCheck = t.ADD_ATTR : X(t.ADD_ATTR) && (T === Ee && (T = L(T)), p(T, t.ADD_ATTR, d))), S(t, "ADD_URI_SAFE_ATTR") && X(t.ADD_URI_SAFE_ATTR) && p(qt, t.ADD_URI_SAFE_ATTR, d), S(t, "FORBID_CONTENTS") && X(t.FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.FORBID_CONTENTS, d)), S(t, "ADD_FORBID_CONTENTS") && X(t.ADD_FORBID_CONTENTS) && (z === Vt && (z = L(z)), p(z, t.ADD_FORBID_CONTENTS, d)), $t && (_["#text"] = !0), Q && p(_, ["html", "head", "body"]), _.table && (p(_, ["tbody"]), delete Tt.tbody), t.TRUSTED_TYPES_POLICY) {
422
420
  if (typeof t.TRUSTED_TYPES_POLICY.createHTML != "function")
423
- throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
421
+ throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
424
422
  if (typeof t.TRUSTED_TYPES_POLICY.createScriptURL != "function")
425
- throw J('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
426
- const i = L;
427
- L = t.TRUSTED_TYPES_POLICY;
423
+ throw et('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
424
+ const i = D;
425
+ D = t.TRUSTED_TYPES_POLICY;
428
426
  try {
429
- q = tt("");
427
+ J = it("");
430
428
  } catch (a) {
431
- throw L = i, a;
429
+ throw D = i, a;
432
430
  }
433
- } else t.TRUSTED_TYPES_POLICY === null ? (L = void 0, q = "") : (L === void 0 && (L = cn()), L && typeof q == "string" && (q = tt("")));
434
- O && O(t), it = t;
435
- }, De = f({}, [...ne, ...oe, ...io]), Ce = f({}, [...ie, ...ro]), wn = function(t, e, i) {
436
- return e.namespaceURI === P ? t === "svg" : e.namespaceURI === Nt ? t === "svg" && (i === "annotation-xml" || qt[i]) : !!De[t];
437
- }, On = function(t, e, i) {
438
- return e.namespaceURI === P ? t === "math" : e.namespaceURI === Lt ? t === "math" && Kt[i] : !!Ce[t];
439
- }, Rn = function(t, e, i) {
440
- return e.namespaceURI === Lt && !Kt[i] || e.namespaceURI === Nt && !qt[i] ? !1 : !Ce[t] && (En[t] || !De[t]);
441
- }, In = function(t) {
442
- let e = pt(t);
431
+ } else t.TRUSTED_TYPES_POLICY === null ? (D = void 0, J = "") : (D === void 0 && (D = hn()), D && typeof J == "string" && (J = it("")));
432
+ O && O(t), lt = t;
433
+ }, Pe = p({}, [...se, ...ae, ...po]), xe = p({}, [...le, ...mo]), Cn = function(t, e, i) {
434
+ return e.namespaceURI === F ? t === "svg" : e.namespaceURI === Lt ? t === "svg" && (i === "annotation-xml" || Jt[i]) : !!Pe[t];
435
+ }, Mn = function(t, e, i) {
436
+ return e.namespaceURI === F ? t === "math" : e.namespaceURI === Dt ? t === "math" && Qt[i] : !!xe[t];
437
+ }, vn = function(t, e, i) {
438
+ return e.namespaceURI === Dt && !Qt[i] || e.namespaceURI === Lt && !Jt[i] ? !1 : !xe[t] && (In[t] || !Pe[t]);
439
+ }, Pn = function(t) {
440
+ let e = Z(t);
443
441
  (!e || !e.tagName) && (e = {
444
- namespaceURI: ot,
442
+ namespaceURI: at,
445
443
  tagName: "template"
446
444
  });
447
- const i = At(t.tagName), a = At(e.tagName);
448
- return Vt[t.namespaceURI] ? t.namespaceURI === Lt ? wn(i, e, a) : t.namespaceURI === Nt ? On(i, e, a) : t.namespaceURI === P ? Rn(i, e, a) : !!(_t === "application/xhtml+xml" && Vt[t.namespaceURI]) : !1;
449
- }, W = function(t) {
450
- st(n.removed, {
445
+ const i = bt(t.tagName), a = bt(e.tagName);
446
+ return Zt[t.namespaceURI] ? t.namespaceURI === Dt ? Cn(i, e, a) : t.namespaceURI === Lt ? Mn(i, e, a) : t.namespaceURI === F ? vn(i, e, a) : !!(gt === "application/xhtml+xml" && Zt[t.namespaceURI]) : !1;
447
+ }, j = function(t) {
448
+ ft(n.removed, {
451
449
  element: t
452
450
  });
453
451
  try {
454
- pt(t).removeChild(t);
452
+ Z(t).removeChild(t);
455
453
  } catch {
456
- if (ce(t), !pt(t))
457
- throw J("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
454
+ if (zt(t), !Z(t))
455
+ throw et("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
458
456
  }
459
- }, Me = function(t) {
460
- const e = ft(t);
457
+ }, Ct = function(t) {
458
+ ee(t);
459
+ const e = ot(t);
461
460
  if (e) {
462
461
  const a = [];
463
- yt(e, (u) => {
464
- st(a, u);
465
- }), yt(a, (u) => {
462
+ ut(e, (c) => {
463
+ ft(a, c);
464
+ }), ut(a, (c) => {
466
465
  try {
467
- ce(u);
466
+ zt(c);
468
467
  } catch {
469
468
  }
470
469
  });
471
470
  }
472
- const i = Pt(t);
471
+ const i = Ft(t);
473
472
  if (i)
474
473
  for (let a = i.length - 1; a >= 0; --a) {
475
- const u = i[a], p = u && u.name;
476
- if (typeof p == "string")
474
+ const c = i[a], f = c && c.name;
475
+ if (typeof f == "string")
477
476
  try {
478
- t.removeAttribute(p);
477
+ t.removeAttribute(f);
479
478
  } catch {
480
479
  }
481
480
  }
482
- }, Z = function(t, e) {
481
+ }, tt = function(t, e) {
483
482
  try {
484
- st(n.removed, {
483
+ ft(n.removed, {
485
484
  attribute: e.getAttributeNode(t),
486
485
  from: e
487
486
  });
488
487
  } catch {
489
- st(n.removed, {
488
+ ft(n.removed, {
490
489
  attribute: null,
491
490
  from: e
492
491
  });
493
492
  }
494
493
  if (e.removeAttribute(t), t === "is")
495
- if (et || Rt)
494
+ if (rt || It)
496
495
  try {
497
- W(e);
496
+ j(e);
498
497
  } catch {
499
498
  }
500
499
  else
@@ -502,93 +501,118 @@ function on() {
502
501
  e.setAttribute(t, "");
503
502
  } catch {
504
503
  }
505
- }, Nn = function(t) {
506
- const e = Pt(t);
504
+ }, xn = function(t) {
505
+ const e = Ft(t);
507
506
  if (e)
508
507
  for (let i = e.length - 1; i >= 0; --i) {
509
- const a = e[i], u = a && a.name;
510
- if (!(typeof u != "string" || _[y(u)]))
508
+ const a = e[i], c = a && a.name;
509
+ if (!(typeof c != "string" || T[d(c)]))
511
510
  try {
512
- t.removeAttribute(u);
511
+ t.removeAttribute(c);
513
512
  } catch {
514
513
  }
515
514
  }
516
- }, Ln = function(t) {
515
+ }, ee = function(t) {
517
516
  const e = [t];
518
517
  for (; e.length > 0; ) {
519
518
  const i = e.pop();
520
- (C ? C(i) : i.nodeType) === k.element && Nn(i);
521
- const u = ft(i);
522
- if (u)
523
- for (let p = u.length - 1; p >= 0; --p)
524
- e.push(u[p]);
519
+ (I ? I(i) : i.nodeType) === v.element && xn(i);
520
+ const c = ot(i);
521
+ if (c)
522
+ for (let f = c.length - 1; f >= 0; --f)
523
+ e.push(c[f]);
524
+ }
525
+ }, kn = function(t) {
526
+ if (!Y)
527
+ return;
528
+ const e = [t];
529
+ for (; e.length > 0; ) {
530
+ const i = e.pop(), a = I ? I(i) : i.nodeType;
531
+ if (a === v.processingInstruction || a === v.comment && b(rn, i.data)) {
532
+ try {
533
+ zt(i);
534
+ } catch {
535
+ }
536
+ continue;
537
+ }
538
+ if (a === v.element) {
539
+ const f = i, y = d(k ? k(i) : i.nodeName);
540
+ try {
541
+ f.hasAttribute && f.hasAttribute("patchsrc") && f.removeAttribute("patchsrc"), f.hasAttribute && f.hasAttribute("for") && y !== "label" && y !== "output" && f.removeAttribute("for");
542
+ } catch {
543
+ }
544
+ }
545
+ const c = ot(i);
546
+ if (c)
547
+ for (let f = c.length - 1; f >= 0; --f)
548
+ e.push(c[f]);
525
549
  }
526
- }, ve = function(t) {
550
+ }, ke = function(t) {
527
551
  let e = null, i = null;
528
- if (Bt)
552
+ if (jt)
529
553
  t = "<remove></remove>" + t;
530
554
  else {
531
- const p = Ye(t, /^[\r\n\t ]+/);
532
- i = p && p[0];
555
+ const f = Ve(t, /^[\r\n\t ]+/);
556
+ i = f && f[0];
533
557
  }
534
- _t === "application/xhtml+xml" && ot === P && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
535
- const a = L ? tt(t) : t;
536
- if (ot === P)
558
+ gt === "application/xhtml+xml" && at === F && (t = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + t + "</body></html>");
559
+ const a = D ? it(t) : t;
560
+ if (at === F)
537
561
  try {
538
- e = new xt().parseFromString(a, _t);
562
+ e = new kt().parseFromString(a, gt);
539
563
  } catch {
540
564
  }
541
565
  if (!e || !e.documentElement) {
542
- e = zt.createDocument(ot, "template", null);
566
+ e = Ht.createDocument(at, "template", null);
543
567
  try {
544
- e.documentElement.innerHTML = Xt ? q : a;
568
+ e.documentElement.innerHTML = Kt ? J : a;
545
569
  } catch {
546
570
  }
547
571
  }
548
- const u = e.body || e.documentElement;
549
- return t && i && u.insertBefore(s.createTextNode(i), u.childNodes[0] || null), ot === P ? un.call(e, K ? "html" : "body")[0] : K ? e.documentElement : u;
550
- }, xe = function(t) {
551
- return pe.call(
572
+ const c = e.body || e.documentElement;
573
+ return t && i && c.insertBefore(s.createTextNode(i), c.childNodes[0] || null), at === F ? Tn.call(e, Q ? "html" : "body")[0] : Q ? e.documentElement : c;
574
+ }, ze = function(t) {
575
+ return _e.call(
552
576
  t.ownerDocument || t,
553
577
  t,
554
578
  // eslint-disable-next-line no-bitwise
555
- D.SHOW_ELEMENT | D.SHOW_COMMENT | D.SHOW_TEXT | D.SHOW_PROCESSING_INSTRUCTION | D.SHOW_CDATA_SECTION,
579
+ M.SHOW_ELEMENT | M.SHOW_COMMENT | M.SHOW_TEXT | M.SHOW_PROCESSING_INSTRUCTION | M.SHOW_CDATA_SECTION,
556
580
  null
557
581
  );
558
- }, Dt = function(t) {
559
- return t = gt(t, pn, " "), t = gt(t, mn, " "), t = gt(t, dn, " "), t;
560
- }, Jt = function(t) {
582
+ }, Mt = function(t) {
583
+ return t = Et(t, yn, " "), t = Et(t, En, " "), t = Et(t, An, " "), t;
584
+ }, ne = function(t) {
561
585
  var e;
562
586
  t.normalize();
563
- const i = pe.call(
587
+ const i = _e.call(
564
588
  t.ownerDocument || t,
565
589
  t,
566
590
  // eslint-disable-next-line no-bitwise
567
- D.SHOW_TEXT | D.SHOW_COMMENT | D.SHOW_CDATA_SECTION | D.SHOW_PROCESSING_INSTRUCTION,
591
+ M.SHOW_TEXT | M.SHOW_COMMENT | M.SHOW_CDATA_SECTION | M.SHOW_PROCESSING_INSTRUCTION,
568
592
  null
569
593
  );
570
594
  let a = i.nextNode();
571
595
  for (; a; )
572
- a.data = Dt(a.data), a = i.nextNode();
573
- const u = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
574
- u && yt(u, (p) => {
575
- rt(p.content) && Jt(p.content);
596
+ a.data = Mt(a.data), a = i.nextNode();
597
+ const c = (e = t.querySelectorAll) === null || e === void 0 ? void 0 : e.call(t, "template");
598
+ c && ut(c, (f) => {
599
+ ct(f.content) && ne(f.content);
576
600
  });
577
- }, Ct = function(t) {
578
- const e = H ? H(t) : null;
579
- return typeof e != "string" || y(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
601
+ }, vt = function(t) {
602
+ const e = k ? k(t) : null;
603
+ return typeof e != "string" || d(e) !== "form" ? !1 : typeof t.nodeName != "string" || typeof t.textContent != "string" || typeof t.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
580
604
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
581
605
  // makes the direct read diverge from the cached read; a clean form
582
606
  // (same-realm OR foreign-realm) has both reads pointing at the same
583
607
  // canonical NamedNodeMap.
584
- t.attributes !== Pt(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
608
+ t.attributes !== Ft(t) || typeof t.removeAttribute != "function" || typeof t.setAttribute != "function" || typeof t.namespaceURI != "string" || typeof t.insertBefore != "function" || typeof t.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
585
609
  // returns the integer 1 for any Element regardless of realm; direct
586
610
  // read on a clobbered form (e.g. <input name="nodeType">) returns
587
611
  // the named child element. Cheap addition — nodeType is read from
588
612
  // an internal slot, no serialization cost — and removes a residual
589
613
  // clobbering surface used by several mXSS / PI / comment branches
590
614
  // in _sanitizeElements that compare currentNode.nodeType directly.
591
- t.nodeType !== C(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
615
+ t.nodeType !== I(t) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
592
616
  // "childNodes" shadows the prototype getter. Direct reads of
593
617
  // form.childNodes from a clobbered form return the named child
594
618
  // instead of the real NodeList, so any walk that reads it directly
@@ -599,76 +623,82 @@ function on() {
599
623
  // select, etc.) regardless of whether the named child happens to
600
624
  // carry a numeric .length, which a typeof-based probe would miss
601
625
  // (e.g. HTMLSelectElement.length is a defined unsigned-long).
602
- t.childNodes !== ft(t);
603
- }, rt = function(t) {
604
- if (!C || typeof t != "object" || t === null)
626
+ t.childNodes !== ot(t);
627
+ }, ct = function(t) {
628
+ if (!I || typeof t != "object" || t === null)
605
629
  return !1;
606
630
  try {
607
- return C(t) === k.documentFragment;
631
+ return I(t) === v.documentFragment;
608
632
  } catch {
609
633
  return !1;
610
634
  }
611
- }, Tt = function(t) {
612
- if (!C || typeof t != "object" || t === null)
635
+ }, yt = function(t) {
636
+ if (!I || typeof t != "object" || t === null)
613
637
  return !1;
614
638
  try {
615
- return typeof C(t) == "number";
639
+ return typeof I(t) == "number";
616
640
  } catch {
617
641
  return !1;
618
642
  }
619
643
  };
620
644
  function U(r, t, e) {
621
- r.length !== 0 && yt(r, (i) => {
622
- i.call(n, t, e, it);
645
+ r.length !== 0 && ut(r, (i) => {
646
+ i.call(n, t, e, lt);
623
647
  });
624
648
  }
625
- const Dn = function(t, e) {
626
- return !!(ht && t.hasChildNodes() && !Tt(t.firstElementChild) && w(Qe, t.textContent) && w(Qe, t.innerHTML) || ht && t.namespaceURI === P && e === "style" && Tt(t.firstElementChild) || t.nodeType === k.processingInstruction || ht && t.nodeType === k.comment && w(_o, t.data));
627
- }, Cn = function(t, e) {
628
- if (!dt[e] && ze(e) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, e) || T.tagNameCheck instanceof Function && T.tagNameCheck(e)))
649
+ const zn = function(t, e) {
650
+ return !!(Y && t.hasChildNodes() && !yt(t.firstElementChild) && b(on, t.textContent) && b(on, t.innerHTML) || Y && t.namespaceURI === F && e === "style" && yt(t.firstElementChild) || t.nodeType === v.processingInstruction || Y && t.nodeType === v.comment && b(rn, t.data));
651
+ }, Fn = function(t, e) {
652
+ if (!Tt[e] && He(e) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, e) || g.tagNameCheck instanceof Function && g.tagNameCheck(e)))
629
653
  return !1;
630
- if (Wt && !x[e]) {
631
- const i = pt(t), a = ft(t);
654
+ if ($t && !z[e]) {
655
+ const i = Z(t), a = ot(t);
632
656
  if (a && i) {
633
- const u = a.length;
634
- for (let p = u - 1; p >= 0; --p) {
635
- const S = Yt ? a[p] : rn(a[p], !0);
636
- i.insertBefore(S, sn(t));
657
+ const c = a.length;
658
+ for (let f = c - 1; f >= 0; --f) {
659
+ const y = Xt ? a[f] : pn(a[f], !0);
660
+ i.insertBefore(y, mn(t));
637
661
  }
638
662
  }
639
663
  }
640
- return W(t), !0;
641
- }, Pe = function(t) {
642
- if (U(g.beforeSanitizeElements, t, null), Ct(t))
643
- return W(t), !0;
644
- const e = y(H ? H(t) : t.nodeName);
645
- if (U(g.uponSanitizeElement, t, {
646
- tagName: e,
647
- allowedTags: h
648
- }), Dn(t, e))
649
- return W(t), !0;
650
- if (dt[e] || !(G.tagCheck instanceof Function && G.tagCheck(e)) && !h[e])
651
- return Cn(t, e);
652
- if ((C ? C(t) : t.nodeType) === k.element && !In(t) || (e === "noscript" || e === "noembed" || e === "noframes") && w(To, t.innerHTML))
653
- return W(t), !0;
654
- if (B && t.nodeType === k.text) {
655
- const a = Dt(t.textContent);
656
- t.textContent !== a && (st(n.removed, {
664
+ return j(t), !0;
665
+ }, Fe = function(t, e) {
666
+ if (U(h.beforeSanitizeElements, t, null), t !== e && Z(t) === null)
667
+ return !0;
668
+ if (vt(t))
669
+ return j(t), !0;
670
+ const i = d(k ? k(t) : t.nodeName);
671
+ if (U(h.uponSanitizeElement, t, {
672
+ tagName: i,
673
+ allowedTags: _
674
+ }), t !== e && Z(t) === null)
675
+ return !0;
676
+ if (zn(t, i))
677
+ return j(t), !0;
678
+ if (Tt[i] || !(B.tagCheck instanceof Function && B.tagCheck(i)) && !_[i]) {
679
+ const c = Fn(t, i);
680
+ return c === !1 && U(h.afterSanitizeElements, t, null), c;
681
+ }
682
+ if ((I ? I(t) : t.nodeType) === v.element && !Pn(t) || (i === "noscript" || i === "noembed" || i === "noframes") && b(Oo, t.innerHTML))
683
+ return j(t), !0;
684
+ if (W && t.nodeType === v.text) {
685
+ const c = Mt(t.textContent);
686
+ t.textContent !== c && (ft(n.removed, {
657
687
  element: t.cloneNode()
658
- }), t.textContent = a);
688
+ }), t.textContent = c);
659
689
  }
660
- return U(g.afterSanitizeElements, t, null), !1;
661
- }, ke = function(t, e, i) {
662
- if (Te[e] || Ae && (e === "id" || e === "name") && (i in s || i in bn))
690
+ return U(h.afterSanitizeElements, t, null), !1;
691
+ }, Ue = function(t, e, i) {
692
+ if (Ae[e] || Y && e === "patchsrc" || Y && e === "for" && t !== "label" && t !== "output" || we && (e === "id" || e === "name") && (i in s || i in Dn))
663
693
  return !1;
664
- const a = _[e] || G.attributeCheck instanceof Function && G.attributeCheck(e, t);
665
- if (!(Ut && w(hn, e))) {
666
- if (!(ye && w(_n, e))) {
694
+ const a = T[e] || B.attributeCheck instanceof Function && B.attributeCheck(e, t);
695
+ if (!(Gt && b(bn, e))) {
696
+ if (!(be && b(Sn, e))) {
667
697
  if (a) {
668
- if (!$t[e]) {
669
- if (!w(de, gt(i, me, ""))) {
670
- if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && je(i, "data:") === 0 && we[t])) {
671
- if (!(ge && !w(Tn, gt(i, me, "")))) {
698
+ if (!qt[e]) {
699
+ if (!b(ge, Et(i, Te, ""))) {
700
+ if (!((e === "src" || e === "xlink:href" || e === "href") && t !== "script" && qe(i, "data:") === 0 && Ne[t])) {
701
+ if (!(Se && !b(On, Et(i, Te, "")))) {
672
702
  if (i)
673
703
  return !1;
674
704
  }
@@ -679,82 +709,82 @@ function on() {
679
709
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
680
710
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
681
711
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
682
- !(ze(t) && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, t) || T.tagNameCheck instanceof Function && T.tagNameCheck(t)) && (T.attributeNameCheck instanceof RegExp && w(T.attributeNameCheck, e) || T.attributeNameCheck instanceof Function && T.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
712
+ !(He(t) && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, t) || g.tagNameCheck instanceof Function && g.tagNameCheck(t)) && (g.attributeNameCheck instanceof RegExp && b(g.attributeNameCheck, e) || g.attributeNameCheck instanceof Function && g.attributeNameCheck(e, t)) || // Alternative, second condition checks if it's an `is`-attribute, AND
683
713
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
684
- e === "is" && T.allowCustomizedBuiltInElements && (T.tagNameCheck instanceof RegExp && w(T.tagNameCheck, i) || T.tagNameCheck instanceof Function && T.tagNameCheck(i)))
714
+ e === "is" && g.allowCustomizedBuiltInElements && (g.tagNameCheck instanceof RegExp && b(g.tagNameCheck, i) || g.tagNameCheck instanceof Function && g.tagNameCheck(i)))
685
715
  ) return !1;
686
716
  }
687
717
  }
688
718
  return !0;
689
- }, Mn = f({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), ze = function(t) {
690
- return !Mn[At(t)] && w(yn, t);
691
- }, vn = function(t, e, i, a) {
692
- if (L && typeof wt == "object" && typeof wt.getAttributeType == "function" && !i)
719
+ }, Un = p({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), He = function(t) {
720
+ return !Un[bt(t)] && b(wn, t);
721
+ }, Hn = function(t, e, i, a) {
722
+ if (D && typeof wt == "object" && typeof wt.getAttributeType == "function" && !i)
693
723
  switch (wt.getAttributeType(t, e)) {
694
724
  case "TrustedHTML":
695
- return tt(a);
725
+ return it(a);
696
726
  case "TrustedScriptURL":
697
- return an(a);
727
+ return dn(a);
698
728
  }
699
729
  return a;
700
- }, xn = function(t, e, i, a) {
730
+ }, Gn = function(t, e, i, a) {
701
731
  try {
702
- i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), Ct(t) ? W(t) : We(n.removed);
732
+ i ? t.setAttributeNS(i, e, a) : t.setAttribute(e, a), vt(t) ? j(t) : Xe(n.removed);
703
733
  } catch {
704
- Z(e, t);
734
+ tt(e, t);
705
735
  }
706
- }, Ue = function(t) {
707
- U(g.beforeSanitizeAttributes, t, null);
736
+ }, Ge = function(t) {
737
+ U(h.beforeSanitizeAttributes, t, null);
708
738
  const e = t.attributes;
709
- if (!e || Ct(t))
739
+ if (!e || vt(t))
710
740
  return;
711
741
  const i = {
712
742
  attrName: "",
713
743
  attrValue: "",
714
744
  keepAttr: !0,
715
- allowedAttributes: _,
745
+ allowedAttributes: T,
716
746
  forceKeepAttr: void 0
717
747
  };
718
748
  let a = e.length;
719
- const u = y(t.nodeName);
749
+ const c = d(t.nodeName);
720
750
  for (; a--; ) {
721
- const p = e[a], S = p.name, E = p.namespaceURI, M = p.value, v = y(S), te = M;
722
- let I = S === "value" ? te : Zn(te);
723
- if (i.attrName = v, i.attrValue = I, i.keepAttr = !0, i.forceKeepAttr = void 0, U(g.uponSanitizeAttribute, t, i), I = i.attrValue, Se && (v === "id" || v === "name") && je(I, be) !== 0 && (Z(S, t), I = be + I), ht && w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, I)) {
724
- Z(S, t);
751
+ const f = e[a], y = f.name, R = f.namespaceURI, P = f.value, C = d(y), x = P;
752
+ let N = y === "value" ? x : ro(x);
753
+ if (i.attrName = C, i.attrValue = N, i.keepAttr = !0, i.forceKeepAttr = void 0, U(h.uponSanitizeAttribute, t, i), N = i.attrValue, Re && (C === "id" || C === "name") && qe(N, Ie) !== 0 && (tt(y, t), N = Ie + N), Y && b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, N)) {
754
+ tt(y, t);
725
755
  continue;
726
756
  }
727
- if (v === "attributename" && Ye(I, "href")) {
728
- Z(S, t);
757
+ if (C === "attributename" && Ve(N, "href")) {
758
+ tt(y, t);
729
759
  continue;
730
760
  }
731
761
  if (!i.forceKeepAttr) {
732
762
  if (!i.keepAttr) {
733
- Z(S, t);
763
+ tt(y, t);
734
764
  continue;
735
765
  }
736
- if (!Ee && w(yo, I)) {
737
- Z(S, t);
766
+ if (!Oe && b(wo, N)) {
767
+ tt(y, t);
738
768
  continue;
739
769
  }
740
- if (B && (I = Dt(I)), !ke(u, v, I)) {
741
- Z(S, t);
770
+ if (W && (N = Mt(N)), !Ue(c, C, N)) {
771
+ tt(y, t);
742
772
  continue;
743
773
  }
744
- I = vn(u, v, E, I), I !== te && xn(t, S, E, I);
774
+ N = Hn(c, C, R, N), N !== x && Gn(t, y, R, N);
745
775
  }
746
776
  }
747
- U(g.afterSanitizeAttributes, t, null);
748
- }, Mt = function(t) {
777
+ U(h.afterSanitizeAttributes, t, null);
778
+ }, Pt = function(t) {
749
779
  let e = null;
750
- const i = xe(t);
751
- for (U(g.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
752
- if (U(g.uponSanitizeShadowNode, e, null), Pe(e), Ue(e), rt(e.content) && Mt(e.content), (C ? C(e) : e.nodeType) === k.element) {
753
- const u = le(e);
754
- rt(u) && (Qt(u), Mt(u));
780
+ const i = ze(t);
781
+ for (U(h.beforeSanitizeShadowDOM, t, null); e = i.nextNode(); )
782
+ if (U(h.uponSanitizeShadowNode, e, null), Fe(e, t), Ge(e), ct(e.content) && Pt(e.content), (I ? I(e) : e.nodeType) === v.element) {
783
+ const c = me(e);
784
+ ct(c) && (oe(c), Pt(c));
755
785
  }
756
- U(g.afterSanitizeShadowDOM, t, null);
757
- }, Qt = function(t) {
786
+ U(h.afterSanitizeShadowDOM, t, null);
787
+ }, oe = function(t) {
758
788
  const e = [{
759
789
  node: t,
760
790
  shadow: null
@@ -762,146 +792,156 @@ function on() {
762
792
  for (; e.length > 0; ) {
763
793
  const i = e.pop();
764
794
  if (i.shadow) {
765
- Mt(i.shadow);
795
+ Pt(i.shadow);
766
796
  continue;
767
797
  }
768
- const a = i.node, p = (C ? C(a) : a.nodeType) === k.element, S = ft(a);
769
- if (S)
770
- for (let E = S.length - 1; E >= 0; --E)
798
+ const a = i.node, f = (I ? I(a) : a.nodeType) === v.element, y = ot(a);
799
+ if (y)
800
+ for (let R = y.length - 1; R >= 0; --R)
771
801
  e.push({
772
- node: S[E],
802
+ node: y[R],
773
803
  shadow: null
774
804
  });
775
- if (p) {
776
- const E = H ? H(a) : null;
777
- if (typeof E == "string" && y(E) === "template") {
778
- const M = a.content;
779
- rt(M) && e.push({
780
- node: M,
805
+ if (f) {
806
+ const R = k ? k(a) : null;
807
+ if (typeof R == "string" && d(R) === "template") {
808
+ const P = a.content;
809
+ ct(P) && e.push({
810
+ node: P,
781
811
  shadow: null
782
812
  });
783
813
  }
784
814
  }
785
- if (p) {
786
- const E = le(a);
787
- rt(E) && e.push({
815
+ if (f) {
816
+ const R = me(a);
817
+ ct(R) && e.push({
788
818
  node: null,
789
- shadow: E
819
+ shadow: R
790
820
  }, {
791
- node: E,
821
+ node: R,
792
822
  shadow: null
793
823
  });
794
824
  }
795
825
  }
796
826
  };
797
827
  return n.sanitize = function(r) {
798
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, u = null;
799
- if (Xt = !r, Xt && (r = "<!-->"), typeof r != "string" && !Tt(r) && (r = no(r), typeof r != "string"))
800
- throw J("dirty is not a string, aborting");
828
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, e = null, i = null, a = null, c = null;
829
+ if (Kt = !r, Kt && (r = "<!-->"), typeof r != "string" && !yt(r) && (r = uo(r), typeof r != "string"))
830
+ throw et("dirty is not a string, aborting");
801
831
  if (!n.isSupported)
802
832
  return r;
803
- Ft ? (h = Ht, _ = Gt) : Zt(t), (g.uponSanitizeElement.length > 0 || g.uponSanitizeAttribute.length > 0) && (h = N(h)), g.uponSanitizeAttribute.length > 0 && (_ = N(_)), n.removed = [];
804
- const p = Yt && typeof r != "string" && Tt(r);
805
- if (p) {
806
- const M = H ? H(r) : r.nodeName;
807
- if (typeof M == "string") {
808
- const v = y(M);
809
- if (!h[v] || dt[v])
810
- throw J("root node is forbidden and cannot be sanitized in-place");
833
+ Bt ? (_ = Wt, T = Yt) : te(t), (h.uponSanitizeElement.length > 0 || h.uponSanitizeAttribute.length > 0) && (_ = L(_)), h.uponSanitizeAttribute.length > 0 && (T = L(T)), n.removed = [];
834
+ const f = Xt && typeof r != "string" && yt(r);
835
+ if (f) {
836
+ kn(r);
837
+ const C = k ? k(r) : r.nodeName;
838
+ if (typeof C == "string") {
839
+ const x = d(C);
840
+ if (!_[x] || Tt[x])
841
+ throw Ct(r), et("root node is forbidden and cannot be sanitized in-place");
811
842
  }
812
- if (Ct(r))
813
- throw J("root node is clobbered and cannot be sanitized in-place");
843
+ if (vt(r))
844
+ throw Ct(r), et("root node is clobbered and cannot be sanitized in-place");
814
845
  try {
815
- Qt(r);
816
- } catch (v) {
817
- throw Me(r), v;
846
+ oe(r);
847
+ } catch (x) {
848
+ throw Ct(r), x;
818
849
  }
819
- } else if (Tt(r))
820
- e = ve("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === k.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), Qt(i);
850
+ } else if (yt(r))
851
+ e = ke("<!---->"), i = e.ownerDocument.importNode(r, !0), i.nodeType === v.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? e = i : e.appendChild(i), oe(i);
821
852
  else {
822
- if (!et && !B && !K && // eslint-disable-next-line unicorn/prefer-includes
853
+ if (!rt && !W && !Q && // eslint-disable-next-line unicorn/prefer-includes
823
854
  r.indexOf("<") === -1)
824
- return L && It ? tt(r) : r;
825
- if (e = ve(r), !e)
826
- return et ? null : It ? q : "";
855
+ return D && Nt ? it(r) : r;
856
+ if (e = ke(r), !e)
857
+ return rt ? null : Nt ? J : "";
827
858
  }
828
- e && Bt && W(e.firstChild);
829
- const S = xe(p ? r : e);
859
+ e && jt && j(e.firstChild);
860
+ const y = f ? r : e, R = ze(y);
830
861
  try {
831
- for (; a = S.nextNode(); )
832
- Pe(a), Ue(a), rt(a.content) && Mt(a.content);
833
- } catch (M) {
834
- throw p && Me(r), M;
862
+ for (; a = R.nextNode(); )
863
+ Fe(a, y), Ge(a), ct(a.content) && Pt(a.content);
864
+ } catch (C) {
865
+ throw f && (Ct(r), ut(n.removed, (x) => {
866
+ x.element && ee(x.element);
867
+ })), C;
835
868
  }
836
- if (p)
837
- return yt(n.removed, (M) => {
838
- M.element && Ln(M.element);
839
- }), B && Jt(r), r;
840
- if (et) {
841
- if (B && Jt(e), Rt)
842
- for (u = ln.call(e.ownerDocument); e.firstChild; )
843
- u.appendChild(e.firstChild);
869
+ if (f)
870
+ return ut(n.removed, (C) => {
871
+ C.element && ee(C.element);
872
+ }), W && ne(r), r;
873
+ if (rt) {
874
+ if (W && ne(e), It)
875
+ for (c = _n.call(e.ownerDocument); e.firstChild; )
876
+ c.appendChild(e.firstChild);
844
877
  else
845
- u = e;
846
- return (_.shadowroot || _.shadowrootmode) && (u = fn.call(c, u, !0)), u;
878
+ c = e;
879
+ return (T.shadowroot || T.shadowrootmode) && (c = gn.call(l, c, !0)), c;
847
880
  }
848
- let E = K ? e.outerHTML : e.innerHTML;
849
- return K && h["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && w(mo, e.ownerDocument.doctype.name) && (E = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
850
- ` + E), B && (E = Dt(E)), L && It ? tt(E) : E;
881
+ let P = Q ? e.outerHTML : e.innerHTML;
882
+ return Q && _["!doctype"] && e.ownerDocument && e.ownerDocument.doctype && e.ownerDocument.doctype.name && b(bo, e.ownerDocument.doctype.name) && (P = "<!DOCTYPE " + e.ownerDocument.doctype.name + `>
883
+ ` + P), W && (P = Mt(P)), D && Nt ? it(P) : P;
851
884
  }, n.setConfig = function() {
852
885
  let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
853
- Zt(r), Ft = !0, Ht = h, Gt = _;
886
+ te(r), Bt = !0, Wt = _, Yt = T;
854
887
  }, n.clearConfig = function() {
855
- it = null, Ft = !1, Ht = null, Gt = null, L = kt, q = "";
888
+ lt = null, Bt = !1, Wt = null, Yt = null, D = Ut, J = "";
856
889
  }, n.isValidAttribute = function(r, t, e) {
857
- it || Zt({});
858
- const i = y(r), a = y(t);
859
- return ke(i, a, e);
890
+ lt || te({});
891
+ const i = d(r), a = d(t);
892
+ return Ue(i, a, e);
860
893
  }, n.addHook = function(r, t) {
861
- typeof t == "function" && b(g, r) && st(g[r], t);
894
+ typeof t == "function" && S(h, r) && ft(h[r], t);
862
895
  }, n.removeHook = function(r, t) {
863
- if (b(g, r)) {
896
+ if (S(h, r)) {
864
897
  if (t !== void 0) {
865
- const e = qn(g[r], t);
866
- return e === -1 ? void 0 : Kn(g[r], e, 1)[0];
898
+ const e = oo(h[r], t);
899
+ return e === -1 ? void 0 : io(h[r], e, 1)[0];
867
900
  }
868
- return We(g[r]);
901
+ return Xe(h[r]);
869
902
  }
870
903
  }, n.removeHooks = function(r) {
871
- b(g, r) && (g[r] = []);
904
+ S(h, r) && (h[r] = []);
872
905
  }, n.removeAllHooks = function() {
873
- g = tn();
906
+ h = sn();
874
907
  }, n;
875
908
  }
876
- var Ao = on();
877
- const St = /* @__PURE__ */ new Map();
878
- async function So(o) {
879
- const n = await fetch(o);
880
- if (!n.ok)
881
- throw new Error(`Failed to load icon: ${n.status}`);
882
- const s = await n.text(), c = Ao.sanitize(s, {
909
+ var No = un();
910
+ const St = /* @__PURE__ */ new Map(), pe = /* @__PURE__ */ new Map();
911
+ function fn(o, n) {
912
+ const s = No.sanitize(o, {
883
913
  USE_PROFILES: { svg: !0, svgFilters: !0 },
884
914
  FORBID_TAGS: ["script", "use"],
885
915
  // <use> can SSRF to external hrefs
886
916
  FORBID_ATTR: ["onload", "onerror", "onbegin", "href", "xlink:href"]
887
- }), d = new DOMParser().parseFromString(c, "image/svg+xml").documentElement;
888
- if (!(d instanceof SVGElement))
889
- throw new Error(`Invalid SVG from ${o}`);
890
- return d;
917
+ }), m = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
918
+ if (!(m instanceof SVGElement))
919
+ throw new Error(`Invalid SVG from ${n}`);
920
+ return m;
921
+ }
922
+ async function Lo(o) {
923
+ const n = await fetch(o);
924
+ if (!n.ok)
925
+ throw new Error(`Failed to load icon: ${n.status}`);
926
+ return fn(await n.text(), o);
891
927
  }
892
- async function bo(o) {
893
- return St.has(o) || St.set(o, So(o)), (await St.get(o)).cloneNode(!0);
928
+ async function an(o) {
929
+ return St.has(o) || St.set(o, Lo(o)), (await St.get(o)).cloneNode(!0);
894
930
  }
895
- function Co(o) {
896
- o ? St.delete(o) : St.clear();
931
+ function Do(o) {
932
+ let n = pe.get(o);
933
+ return n || (n = fn(o, "inline SVG source"), pe.set(o, n)), n.cloneNode(!0);
897
934
  }
898
- const wo = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
899
- var Oo = Object.defineProperty, X = (o, n, s, c) => {
900
- for (var l = void 0, m = o.length - 1, d; m >= 0; m--)
901
- (d = o[m]) && (l = d(n, s, l) || l);
902
- return l && Oo(n, s, l), l;
903
- }, $;
904
- const F = ($ = class extends Pn {
935
+ function Fo(o) {
936
+ o ? St.delete(o) : (St.clear(), pe.clear());
937
+ }
938
+ const Co = ":host{display:inline-block;width:fit-content;height:fit-content;--_nys-icon-size: var( --nys-icon-size, .7em );box-sizing:content-box!important;vertical-align:middle}@supports (font-size: 1cap){:host{--_nys-icon-size: var(--nys-icon-size, 1cap)}}.nys-icon--svg{width:var(--_nys-icon-size, 1em);height:var(--_nys-icon-size, 1em);display:block;white-space:nowrap}.nys-icon--xs{width:calc(var(--_nys-icon-size) * .75);height:calc(var(--_nys-icon-size) * .75)}.nys-icon--sm{width:calc(var(--_nys-icon-size) * .875);height:calc(var(--_nys-icon-size) * .875)}.nys-icon--md{width:var(--_nys-icon-size);height:var(--_nys-icon-size)}.nys-icon--lg{width:calc(var(--_nys-icon-size) * 1.125);height:calc(var(--_nys-icon-size) * 1.125)}.nys-icon--xl{width:calc(var(--_nys-icon-size) * 1.25);height:calc(var(--_nys-icon-size) * 1.25)}.nys-icon--2xl{width:calc(var(--_nys-icon-size) * 1.5);height:calc(var(--_nys-icon-size) * 1.5)}.nys-icon--3xl{width:calc(var(--_nys-icon-size) * 1.875);height:calc(var(--_nys-icon-size) * 1.875)}.nys-icon--4xl{width:calc(var(--_nys-icon-size) * 2.25);height:calc(var(--_nys-icon-size) * 2.25)}.nys-icon--5xl{width:calc(var(--_nys-icon-size) * 3);height:calc(var(--_nys-icon-size) * 3)}.nys-icon--12{width:.75rem;height:.75rem}.nys-icon--14{width:.875rem;height:.875rem}.nys-icon--16{width:1rem;height:1rem}.nys-icon--18{width:1.125rem;height:1.125rem}.nys-icon--20{width:1.25rem;height:1.25rem}.nys-icon--24{width:1.5rem;height:1.5rem}.nys-icon--32{width:2rem;height:2rem}.nys-icon--40{width:2.5rem;height:2.5rem}.nys-icon--50{width:3.125rem;height:3.125rem}.nys-icon--flip-horizontal{transform:scaleX(-1)}.nys-icon--flip-vertical{transform:scaleY(-1)}.nys-icon--flip-both{transform:scale(-1)}";
939
+ var Mo = Object.defineProperty, q = (o, n, s, l) => {
940
+ for (var u = void 0, m = o.length - 1, A; m >= 0; m--)
941
+ (A = o[m]) && (u = A(n, s, u) || u);
942
+ return u && Mo(n, s, u), u;
943
+ }, V;
944
+ const G = (V = class extends Bn {
905
945
  constructor() {
906
946
  super(...arguments), this.name = "", this.library = "default", this.ariaLabel = "", this.rotate = "0", this.flip = "", this.color = "", this.size = "md", this._svg = null, this._loadSeq = 0, this._loadPromise = null;
907
947
  }
@@ -913,10 +953,10 @@ const F = ($ = class extends Pn {
913
953
  })();
914
954
  }
915
955
  connectedCallback() {
916
- super.connectedCallback(), Fe(this.library, this);
956
+ super.connectedCallback(), We(this.library, this);
917
957
  }
918
958
  disconnectedCallback() {
919
- super.disconnectedCallback(), He(this.library, this);
959
+ super.disconnectedCallback(), Ye(this.library, this);
920
960
  }
921
961
  /** Called by the icon library registry when the current library changes. */
922
962
  redraw() {
@@ -933,14 +973,14 @@ const F = ($ = class extends Pn {
933
973
  this._loadIcon();
934
974
  }
935
975
  updated(n) {
936
- if (n.has("name") && !$._validName.test(this.name)) {
976
+ if (n.has("name") && !V._validName.test(this.name)) {
937
977
  console.warn(`nys-icon: invalid name "${this.name}" — ignored`), this._svg = null;
938
978
  return;
939
979
  }
940
980
  if (n.has("name") || n.has("library")) {
941
981
  if (n.has("library")) {
942
982
  const s = n.get("library");
943
- s && He(s, this), Fe(this.library, this);
983
+ s && Ye(s, this), We(this.library, this);
944
984
  }
945
985
  this._loadIcon();
946
986
  }
@@ -949,62 +989,64 @@ const F = ($ = class extends Pn {
949
989
  _loadIcon() {
950
990
  const n = ++this._loadSeq;
951
991
  this._loadPromise = (async () => {
952
- const s = Hn(this.library);
992
+ const s = Vn(this.library);
953
993
  if (!s || !this.name) {
954
994
  this._svg = null;
955
995
  return;
956
996
  }
957
- const c = s.resolver(this.name);
958
- if (!c) {
959
- this._svg = null;
960
- return;
961
- }
962
997
  try {
963
- const l = await bo(c);
998
+ const l = await s.resolver(this.name);
999
+ if (n !== this._loadSeq) return;
1000
+ if (!l) {
1001
+ this._svg = null;
1002
+ return;
1003
+ }
1004
+ const u = typeof l == "string" ? await an(l) : l.type === "url" ? await an(l.href) : Do(l.content);
964
1005
  if (n !== this._loadSeq) return;
965
- s.mutator?.(l), this._applyAttributes(l), this._svg = l;
1006
+ s.mutator?.(u), this._applyAttributes(u), this._svg = u;
966
1007
  } catch {
967
1008
  n === this._loadSeq && (this._svg = null);
968
1009
  }
969
1010
  })();
970
1011
  }
971
1012
  _applyAttributes(n) {
972
- n.setAttribute("role", "img"), this.ariaLabel ? (n.setAttribute("aria-label", this.ariaLabel), n.removeAttribute("aria-hidden")) : (n.setAttribute("aria-hidden", "true"), n.removeAttribute("aria-label")), n.style.rotate = `${this.rotate}deg`, n.style.color = this.color || "currentcolor", n.classList.add(`nys-icon--${this.size}`), n.classList.add("nys-icon--svg"), this.flip && n.classList.add(`nys-icon--flip-${this.flip}`);
1013
+ n.setAttribute("role", "img"), this.ariaLabel ? (n.setAttribute("aria-label", this.ariaLabel), n.removeAttribute("aria-hidden")) : (n.setAttribute("aria-hidden", "true"), n.removeAttribute("aria-label")), this.rotate && this.rotate !== "0" ? n.style.rotate = `${this.rotate}deg` : n.style.removeProperty("rotate"), n.style.color = this.color || "currentcolor", n.classList.add(`nys-icon--${this.size}`), n.classList.add("nys-icon--svg"), this.flip && n.classList.add(`nys-icon--flip-${this.flip}`);
973
1014
  }
974
1015
  render() {
975
- return this._svg ? zn`${this._svg}` : null;
1016
+ return this._svg ? Yn`${this._svg}` : null;
976
1017
  }
977
- }, $.styles = kn(wo), $._validName = /^[a-zA-Z0-9_-]+$/, $);
978
- X([
979
- Q({ type: String, reflect: !0 })
980
- ], F.prototype, "name");
981
- X([
982
- Q({ type: String, reflect: !0 })
983
- ], F.prototype, "library");
984
- X([
985
- Q({ type: String })
986
- ], F.prototype, "ariaLabel");
987
- X([
988
- Q({ type: String })
989
- ], F.prototype, "rotate");
990
- X([
991
- Q({ type: String })
992
- ], F.prototype, "flip");
993
- X([
994
- Q({ type: String })
995
- ], F.prototype, "color");
996
- X([
997
- Q({ type: String })
998
- ], F.prototype, "size");
999
- X([
1000
- Un()
1001
- ], F.prototype, "_svg");
1002
- let Ro = F;
1003
- customElements.get("nys-icon") || customElements.define("nys-icon", Ro);
1018
+ }, V.styles = Wn(Co), V._validName = /^[a-zA-Z0-9_-]+$/, V);
1019
+ q([
1020
+ nt({ type: String, reflect: !0 })
1021
+ ], G.prototype, "name");
1022
+ q([
1023
+ nt({ type: String, reflect: !0 })
1024
+ ], G.prototype, "library");
1025
+ q([
1026
+ nt({ type: String })
1027
+ ], G.prototype, "ariaLabel");
1028
+ q([
1029
+ nt({ type: String })
1030
+ ], G.prototype, "rotate");
1031
+ q([
1032
+ nt({ type: String })
1033
+ ], G.prototype, "flip");
1034
+ q([
1035
+ nt({ type: String })
1036
+ ], G.prototype, "color");
1037
+ q([
1038
+ nt({ type: String })
1039
+ ], G.prototype, "size");
1040
+ q([
1041
+ jn()
1042
+ ], G.prototype, "_svg");
1043
+ let vo = G;
1044
+ customElements.get("nys-icon") || customElements.define("nys-icon", vo);
1004
1045
  export {
1005
- Ro as NysIcon,
1006
- Co as clearIconCache,
1007
- Lo as registerIconLibrary,
1008
- Do as unregisterIconLibrary
1046
+ vo as NysIcon,
1047
+ Fo as clearIconCache,
1048
+ Vn as getIconLibrary,
1049
+ ko as registerIconLibrary,
1050
+ zo as unregisterIconLibrary
1009
1051
  };
1010
1052
  //# sourceMappingURL=nys-icon.js.map